pub struct Request<'buf> { /* private fields */ }Available on crate feature
rt-link 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_newlink_do(self, header: &Ifinfomsg) -> OpNewlinkDo<'buf>
pub fn op_newlink_do(self, header: &Ifinfomsg) -> OpNewlinkDo<'buf>
Create a new link.
Request attributes:
- .push_address()
- .push_broadcast()
- .push_ifname()
- .push_mtu()
- .push_txqlen()
- .push_operstate()
- .push_linkmode()
- .nested_linkinfo()
- .push_net_ns_pid()
- .nested_af_spec()
- .push_group()
- .push_net_ns_fd()
- .push_num_tx_queues()
- .push_num_rx_queues()
- .push_link_netnsid()
- .push_gso_max_segs()
- .push_gso_max_size()
- .push_target_netnsid()
- .push_gro_max_size()
- .push_gso_ipv4_max_size()
- .push_gro_ipv4_max_size()
Sourcepub fn op_dellink_do(self, header: &Ifinfomsg) -> OpDellinkDo<'buf>
pub fn op_dellink_do(self, header: &Ifinfomsg) -> OpDellinkDo<'buf>
Sourcepub fn op_getlink_dump(self, header: &Ifinfomsg) -> OpGetlinkDump<'buf>
pub fn op_getlink_dump(self, header: &Ifinfomsg) -> OpGetlinkDump<'buf>
Get / dump information about a link.
Request attributes:
Reply attributes:
- .get_address()
- .get_broadcast()
- .get_ifname()
- .get_mtu()
- .get_link()
- .get_qdisc()
- .get_stats()
- .get_master()
- .get_wireless()
- .get_protinfo()
- .get_txqlen()
- .get_map()
- .get_weight()
- .get_operstate()
- .get_linkmode()
- .get_linkinfo()
- .get_net_ns_pid()
- .get_ifalias()
- .get_num_vf()
- .get_vfinfo_list()
- .get_stats64()
- .get_vf_ports()
- .get_port_self()
- .get_af_spec()
- .get_group()
- .get_net_ns_fd()
- .get_ext_mask()
- .get_promiscuity()
- .get_num_tx_queues()
- .get_num_rx_queues()
- .get_carrier()
- .get_phys_port_id()
- .get_carrier_changes()
- .get_phys_switch_id()
- .get_link_netnsid()
- .get_phys_port_name()
- .get_proto_down()
- .get_gso_max_segs()
- .get_gso_max_size()
- .get_xdp()
- .get_event()
- .get_new_netnsid()
- .get_target_netnsid()
- .get_carrier_up_count()
- .get_carrier_down_count()
- .get_new_ifindex()
- .get_min_mtu()
- .get_max_mtu()
- .get_prop_list()
- .get_perm_address()
- .get_proto_down_reason()
- .get_parent_dev_name()
- .get_parent_dev_bus_name()
- .get_gro_max_size()
- .get_tso_max_size()
- .get_tso_max_segs()
- .get_allmulti()
- .get_devlink_port()
- .get_gso_ipv4_max_size()
- .get_gro_ipv4_max_size()
Sourcepub fn op_getlink_do(self, header: &Ifinfomsg) -> OpGetlinkDo<'buf>
pub fn op_getlink_do(self, header: &Ifinfomsg) -> OpGetlinkDo<'buf>
Get / dump information about a link.
Request attributes:
Reply attributes:
- .get_address()
- .get_broadcast()
- .get_ifname()
- .get_mtu()
- .get_link()
- .get_qdisc()
- .get_stats()
- .get_master()
- .get_wireless()
- .get_protinfo()
- .get_txqlen()
- .get_map()
- .get_weight()
- .get_operstate()
- .get_linkmode()
- .get_linkinfo()
- .get_net_ns_pid()
- .get_ifalias()
- .get_num_vf()
- .get_vfinfo_list()
- .get_stats64()
- .get_vf_ports()
- .get_port_self()
- .get_af_spec()
- .get_group()
- .get_net_ns_fd()
- .get_ext_mask()
- .get_promiscuity()
- .get_num_tx_queues()
- .get_num_rx_queues()
- .get_carrier()
- .get_phys_port_id()
- .get_carrier_changes()
- .get_phys_switch_id()
- .get_link_netnsid()
- .get_phys_port_name()
- .get_proto_down()
- .get_gso_max_segs()
- .get_gso_max_size()
- .get_xdp()
- .get_event()
- .get_new_netnsid()
- .get_target_netnsid()
- .get_carrier_up_count()
- .get_carrier_down_count()
- .get_new_ifindex()
- .get_min_mtu()
- .get_max_mtu()
- .get_prop_list()
- .get_perm_address()
- .get_proto_down_reason()
- .get_parent_dev_name()
- .get_parent_dev_bus_name()
- .get_gro_max_size()
- .get_tso_max_size()
- .get_tso_max_segs()
- .get_allmulti()
- .get_devlink_port()
- .get_gso_ipv4_max_size()
- .get_gro_ipv4_max_size()
Sourcepub fn op_setlink_do(self, header: &Ifinfomsg) -> OpSetlinkDo<'buf>
pub fn op_setlink_do(self, header: &Ifinfomsg) -> OpSetlinkDo<'buf>
Set information about a link.
Request attributes:
- .push_address()
- .push_broadcast()
- .push_ifname()
- .push_mtu()
- .push_link()
- .push_qdisc()
- .push_stats()
- .push_master()
- .push_wireless()
- .push_protinfo()
- .push_txqlen()
- .push_map()
- .push_weight()
- .push_operstate()
- .push_linkmode()
- .nested_linkinfo()
- .push_net_ns_pid()
- .push_ifalias()
- .push_num_vf()
- .nested_vfinfo_list()
- .push_stats64()
- .nested_vf_ports()
- .nested_port_self()
- .nested_af_spec()
- .push_group()
- .push_net_ns_fd()
- .push_ext_mask()
- .push_promiscuity()
- .push_num_tx_queues()
- .push_num_rx_queues()
- .push_carrier()
- .push_phys_port_id()
- .push_carrier_changes()
- .push_phys_switch_id()
- .push_link_netnsid()
- .push_phys_port_name()
- .push_proto_down()
- .push_gso_max_segs()
- .push_gso_max_size()
- .nested_xdp()
- .push_event()
- .push_new_netnsid()
- .push_target_netnsid()
- .push_carrier_up_count()
- .push_carrier_down_count()
- .push_new_ifindex()
- .push_min_mtu()
- .push_max_mtu()
- .nested_prop_list()
- .push_perm_address()
- .push_proto_down_reason()
- .push_parent_dev_name()
- .push_parent_dev_bus_name()
- .push_gro_max_size()
- .push_tso_max_size()
- .push_tso_max_segs()
- .push_allmulti()
- .push_devlink_port()
- .push_gso_ipv4_max_size()
- .push_gro_ipv4_max_size()
Sourcepub fn op_getstats_dump(self, header: &IfStatsMsg) -> OpGetstatsDump<'buf>
pub fn op_getstats_dump(self, header: &IfStatsMsg) -> OpGetstatsDump<'buf>
Get / dump link stats.
Reply attributes:
Sourcepub fn op_getstats_do(self, header: &IfStatsMsg) -> OpGetstatsDo<'buf>
pub fn op_getstats_do(self, header: &IfStatsMsg) -> OpGetstatsDo<'buf>
Get / dump link stats.
Reply attributes:
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