pub struct Request<'buf> { /* private fields */ }Available on crate feature
rt-route only.Implementations§
Source§impl<'buf> Request<'buf>
impl<'buf> Request<'buf>
pub fn new_with_buf(buf: &'buf mut Vec<u8>) -> Self
pub fn new_extend(buf: &'buf mut Vec<u8>) -> Self
pub fn buf(&self) -> &Vec<u8> ⓘ
pub fn buf_mut(&mut self) -> &mut Vec<u8> ⓘ
Sourcepub fn set_create(self) -> Self
pub fn set_create(self) -> Self
Set NLM_F_CREATE flag
Sourcepub fn set_replace(self) -> Self
pub fn set_replace(self) -> Self
Set NLM_F_REPLACE flag
Sourcepub fn set_change(self) -> Self
pub fn set_change(self) -> Self
Set NLM_F_CREATE and NLM_F_REPLACE flag
Sourcepub fn set_append(self) -> Self
pub fn set_append(self) -> Self
Set NLM_F_APPEND flag
Sourcepub fn unset_flags(self, flags: u16) -> Self
pub fn unset_flags(self, flags: u16) -> Self
Set self.flags ^= self.flags & flags
Sourcepub fn op_getroute_dump(self, header: &Rtmsg) -> OpGetrouteDump<'buf>
pub fn op_getroute_dump(self, header: &Rtmsg) -> OpGetrouteDump<'buf>
Dump route information.
Reply attributes:
- .get_dst()
- .get_src()
- .get_iif()
- .get_oif()
- .get_gateway()
- .get_priority()
- .get_prefsrc()
- .get_metrics()
- .get_multipath()
- .get_flow()
- .get_cacheinfo()
- .get_table()
- .get_mark()
- .get_mfc_stats()
- .get_via()
- .get_newdst()
- .get_pref()
- .get_encap_type()
- .get_encap()
- .get_expires()
- .get_pad()
- .get_uid()
- .get_ttl_propagate()
- .get_ip_proto()
- .get_sport()
- .get_dport()
- .get_nh_id()
- .get_flowlabel()
Sourcepub fn op_getroute_do(self, header: &Rtmsg) -> OpGetrouteDo<'buf>
pub fn op_getroute_do(self, header: &Rtmsg) -> OpGetrouteDo<'buf>
Dump route information.
Request attributes:
- .push_dst()
- .push_src()
- .push_iif()
- .push_oif()
- .push_mark()
- .push_uid()
- .push_ip_proto()
- .push_sport()
- .push_dport()
- .push_flowlabel()
Reply attributes:
- .get_dst()
- .get_src()
- .get_iif()
- .get_oif()
- .get_gateway()
- .get_priority()
- .get_prefsrc()
- .get_metrics()
- .get_multipath()
- .get_flow()
- .get_cacheinfo()
- .get_table()
- .get_mark()
- .get_mfc_stats()
- .get_via()
- .get_newdst()
- .get_pref()
- .get_encap_type()
- .get_encap()
- .get_expires()
- .get_pad()
- .get_uid()
- .get_ttl_propagate()
- .get_ip_proto()
- .get_sport()
- .get_dport()
- .get_nh_id()
- .get_flowlabel()
Sourcepub fn op_newroute_do(self, header: &Rtmsg) -> OpNewrouteDo<'buf>
pub fn op_newroute_do(self, header: &Rtmsg) -> OpNewrouteDo<'buf>
Create a new route
Request attributes:
- .push_dst()
- .push_src()
- .push_iif()
- .push_oif()
- .push_gateway()
- .push_priority()
- .push_prefsrc()
- .nested_metrics()
- .push_multipath()
- .push_flow()
- .push_cacheinfo()
- .push_table()
- .push_mark()
- .push_mfc_stats()
- .push_via()
- .push_newdst()
- .push_pref()
- .push_encap_type()
- .push_encap()
- .push_expires()
- .push_pad()
- .push_uid()
- .push_ttl_propagate()
- .push_ip_proto()
- .push_sport()
- .push_dport()
- .push_nh_id()
- .push_flowlabel()
Sourcepub fn op_delroute_do(self, header: &Rtmsg) -> OpDelrouteDo<'buf>
pub fn op_delroute_do(self, header: &Rtmsg) -> OpDelrouteDo<'buf>
Delete an existing route
Request attributes:
- .push_dst()
- .push_src()
- .push_iif()
- .push_oif()
- .push_gateway()
- .push_priority()
- .push_prefsrc()
- .nested_metrics()
- .push_multipath()
- .push_flow()
- .push_cacheinfo()
- .push_table()
- .push_mark()
- .push_mfc_stats()
- .push_via()
- .push_newdst()
- .push_pref()
- .push_encap_type()
- .push_encap()
- .push_expires()
- .push_pad()
- .push_uid()
- .push_ttl_propagate()
- .push_ip_proto()
- .push_sport()
- .push_dport()
- .push_nh_id()
- .push_flowlabel()
Trait Implementations§
Auto Trait Implementations§
impl<'buf> !UnwindSafe for Request<'buf>
impl<'buf> Freeze for Request<'buf>
impl<'buf> RefUnwindSafe for Request<'buf>
impl<'buf> Send for Request<'buf>
impl<'buf> Sync for Request<'buf>
impl<'buf> Unpin for Request<'buf>
impl<'buf> UnsafeUnpin for Request<'buf>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more