pub struct RouteHeader {
pub address_family: AddressFamily,
pub destination_prefix_length: u8,
pub source_prefix_length: u8,
pub tos: u8,
pub table: u8,
pub protocol: RouteProtocol,
pub scope: RouteScope,
pub kind: RouteType,
pub flags: RouteFlags,
}
Expand description
High level representation of RTM_GETROUTE
, RTM_ADDROUTE
, RTM_DELROUTE
messages headers.
Fields§
§address_family: AddressFamily
Address family of the route: either AddressFamily::Inet for IPv4, or AddressFamily::Inet6 for IPv6.
destination_prefix_length: u8
Prefix length of the destination subnet.
source_prefix_length: u8
Prefix length of the source address.
tos: u8
Type of service.
table: u8
Routing table ID.
protocol: RouteProtocol
Route Protocol
scope: RouteScope
Route scope
kind: RouteType
Route type.
flags: RouteFlags
Flags when querying the kernel with a RTM_GETROUTE
message.
Implementations§
Source§impl RouteHeader
impl RouteHeader
pub const RT_TABLE_MAIN: u8 = 254u8
pub const RT_TABLE_UNSPEC: u8 = 0u8
Trait Implementations§
Source§impl Clone for RouteHeader
impl Clone for RouteHeader
Source§fn clone(&self) -> RouteHeader
fn clone(&self) -> RouteHeader
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for RouteHeader
impl Debug for RouteHeader
Source§impl Default for RouteHeader
impl Default for RouteHeader
Source§fn default() -> RouteHeader
fn default() -> RouteHeader
Returns the “default value” for a type. Read more
Source§impl Emitable for RouteHeader
impl Emitable for RouteHeader
Source§impl Hash for RouteHeader
impl Hash for RouteHeader
Source§impl<'a, T: AsRef<[u8]> + ?Sized> Parseable<RouteMessageBuffer<&'a T>> for RouteHeader
impl<'a, T: AsRef<[u8]> + ?Sized> Parseable<RouteMessageBuffer<&'a T>> for RouteHeader
Source§impl PartialEq for RouteHeader
impl PartialEq for RouteHeader
impl Eq for RouteHeader
impl StructuralPartialEq for RouteHeader
Auto Trait Implementations§
impl Freeze for RouteHeader
impl RefUnwindSafe for RouteHeader
impl Send for RouteHeader
impl Sync for RouteHeader
impl Unpin for RouteHeader
impl UnwindSafe for RouteHeader
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)