nf 0.1.0

A port of the netfilter framework written entirely in rust.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
pub mod mnl;

#[macro_export]
macro_rules! tp {
    ($($t:tt)*) => {{
      unsafe {  core::mem::transmute::<&[u8],&[i8]>(&str::as_bytes(concat!($($t)*,"\0"))).as_ptr() as *const i8 }
    }};
    ($($t:tt)*, $d:tt) => {{
      unsafe {  core::mem::transmute::<&[u8],&[i8]>(&str::as_bytes(concat!($($t)*,$d,"\0"))).as_ptr() as *const i8 }
    }}
}
#[macro_export]
macro_rules! ts {
    ($($t:tt)*) => {{
        unsafe { core::ffi::CStr::from_ptr($($t)* as *const i8).to_str().unwrap().trim() }
    }}
}