aboutsummaryrefslogtreecommitdiff
path: root/tests/lib.rs
diff options
context:
space:
mode:
authorSimon THOBY <git@nightmared.fr>2022-11-08 22:07:32 +0100
committerSimon THOBY <git@nightmared.fr>2022-11-08 22:08:11 +0100
commit771b6a1879a96353c737bac0886d80444d27dff8 (patch)
tree909b1cd83afa3e8e0473e36293868898cdde224a /tests/lib.rs
parent92413e071b58db591eb838a1a0e37b7e6bb415c7 (diff)
(re-)add table listing
Diffstat (limited to 'tests/lib.rs')
-rw-r--r--tests/lib.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/lib.rs b/tests/lib.rs
index 34fe16c..66c9ec9 100644
--- a/tests/lib.rs
+++ b/tests/lib.rs
@@ -1,7 +1,7 @@
#![allow(dead_code)]
use std::ffi::CString;
-use libc::{nlmsghdr, AF_UNIX};
+use libc::AF_UNIX;
use rustables::nlmsg::{NfNetlinkObject, NfNetlinkWriter};
use rustables::parser::Nfgenmsg;
//use rustables::set::SetKey;
@@ -100,7 +100,9 @@ impl NetlinkExpr {
}
pub fn get_test_table() -> Table {
- Table::new(TABLE_NAME, ProtoFamily::Inet)
+ Table::new(ProtoFamily::Inet)
+ .with_name(TABLE_NAME)
+ .with_flags(0u32)
}
pub fn get_test_table_raw_expr() -> NetlinkExpr {