diff options
author | Simon THOBY <git@nightmared.fr> | 2022-11-08 22:07:45 +0100 |
---|---|---|
committer | Simon THOBY <git@nightmared.fr> | 2022-11-11 15:56:57 +0100 |
commit | 84fc84c32e62e3d2c5fe7ab6c35b5d05f890e8a6 (patch) | |
tree | b3017222a52aec640d225cf2e49d62748e1eaedf /src/lib.rs | |
parent | 771b6a1879a96353c737bac0886d80444d27dff8 (diff) |
Improved parsing with even more macros
Diffstat (limited to 'src/lib.rs')
-rw-r--r-- | src/lib.rs | 20 |
1 files changed, 10 insertions, 10 deletions
@@ -100,7 +100,7 @@ pub mod table; pub use table::Table; //pub use table::{get_tables_cb, list_tables}; // -//mod chain; +mod chain; //pub use chain::{get_chains_cb, list_chains_for_table}; //pub use chain::{Chain, ChainType, Hook, Policy, Priority}; @@ -141,17 +141,17 @@ pub enum MsgType { /// Denotes a protocol. Used to specify which protocol a table or set belongs to. #[derive(Debug, Copy, Clone, Eq, PartialEq, PartialOrd, Ord, Hash)] -#[repr(u16)] +#[repr(u32)] pub enum ProtoFamily { - Unspec = libc::NFPROTO_UNSPEC as u16, + Unspec = libc::NFPROTO_UNSPEC as u32, /// Inet - Means both IPv4 and IPv6 - Inet = libc::NFPROTO_INET as u16, - Ipv4 = libc::NFPROTO_IPV4 as u16, - Arp = libc::NFPROTO_ARP as u16, - NetDev = libc::NFPROTO_NETDEV as u16, - Bridge = libc::NFPROTO_BRIDGE as u16, - Ipv6 = libc::NFPROTO_IPV6 as u16, - DecNet = libc::NFPROTO_DECNET as u16, + Inet = libc::NFPROTO_INET as u32, + Ipv4 = libc::NFPROTO_IPV4 as u32, + Arp = libc::NFPROTO_ARP as u32, + NetDev = libc::NFPROTO_NETDEV as u32, + Bridge = libc::NFPROTO_BRIDGE as u32, + Ipv6 = libc::NFPROTO_IPV6 as u32, + DecNet = libc::NFPROTO_DECNET as u32, } #[derive(Error, Debug)] |