no need to have the cake definition in it's own file

also remove everything we don't use
This commit is contained in:
Nils Andreas Svee committed 2022-11-25 20:21:54 +01:00
1 parent 786639bf56
commit 7d11f2a273
3 files changed
+8 -31

No files matched your search

-24
View File
@@ -1,24 +0,0 @@
#[allow(dead_code)]
pub enum TcaCake {
Unspec = 0,
Pad = 1,
BaseRate64 = 2,
DiffservMode = 3,
Atm = 4,
FlowMode = 5,
Overhead = 6,
Rtt = 7,
Target = 8,
Autorate = 9,
Memory = 10,
Nat = 11,
Raw = 12,
Wash = 13,
Mpu = 14,
Ingress = 15,
AckFilter = 16,
SplitGso = 17,
FwMark = 18,
FwMarkStore = 19,
Sce = 20,
}
-1
View File
@@ -1,7 +1,6 @@
extern crate core; extern crate core;
mod baseliner; mod baseliner;
mod cake;
mod config; mod config;
mod endian; mod endian;
mod log; mod log;
+8 -6
View File
@@ -1,5 +1,3 @@
use crate::cake::TcaCake;
use neli::consts::nl::{NlmF, NlmFFlags}; use neli::consts::nl::{NlmF, NlmFFlags};
use neli::consts::rtnl::{Arphrd, IffFlags, Ifla, RtAddrFamily, Rtm, Tca}; use neli::consts::rtnl::{Arphrd, IffFlags, Ifla, RtAddrFamily, Rtm, Tca};
use neli::consts::socket::NlFamily; use neli::consts::socket::NlFamily;
@@ -48,6 +46,12 @@ pub enum NetlinkError {
WrongType { expected: Rtm, found: Rtm }, WrongType { expected: Rtm, found: Rtm },
} }
#[derive(Clone, Copy, Debug)]
pub struct Qdisc {
ifindex: i32,
parent: u32,
}
#[derive(Deserialize, Copy, Clone, Default, Debug)] #[derive(Deserialize, Copy, Clone, Default, Debug)]
#[repr(C)] #[repr(C)]
pub struct RtnlLinkStats64 { pub struct RtnlLinkStats64 {
@@ -77,10 +81,8 @@ pub struct RtnlLinkStats64 {
pub rx_nohandler: u64, pub rx_nohandler: u64,
} }
#[derive(Clone, Copy, Debug)] pub enum TcaCake {
pub struct Qdisc { BaseRate64 = 2,
ifindex: i32,
parent: u32,
} }
pub struct Netlink {} pub struct Netlink {}