Struct netlink_sys::NetlinkHeader [−][src]
pub struct NetlinkHeader {
pub length: u32,
pub message_type: u16,
pub flags: NetlinkFlags,
pub sequence_number: u32,
pub port_number: u32,
}A Netlink header representation. For more details about the meaning of the fields, see man 7 netlink
Fields
length: u32
Length of the netlink packet, including the header and the payload
message_type: u16
Message type. The meaning of this field depends on the netlink protocol family in use.
flags: NetlinkFlags
Flags
sequence_number: u32
Sequence number of the packet
port_number: u32
Port number (usually set to the the process ID)
Methods
impl NetlinkHeader[src]
impl NetlinkHeaderpub fn length(&self) -> u32[src]
pub fn length(&self) -> u32pub fn length_mut(&mut self) -> &mut u32[src]
pub fn length_mut(&mut self) -> &mut u32pub fn set_length(&mut self, value: u32) -> &mut Self[src]
pub fn set_length(&mut self, value: u32) -> &mut Selfpub fn message_type(&self) -> u16[src]
pub fn message_type(&self) -> u16pub fn message_type_mut(&mut self) -> &mut u16[src]
pub fn message_type_mut(&mut self) -> &mut u16pub fn set_message_type(&mut self, value: u16) -> &mut Self[src]
pub fn set_message_type(&mut self, value: u16) -> &mut Selfpub fn flags(&self) -> NetlinkFlags[src]
pub fn flags(&self) -> NetlinkFlagspub fn flags_mut(&mut self) -> &mut NetlinkFlags[src]
pub fn flags_mut(&mut self) -> &mut NetlinkFlagspub fn set_flags(&mut self, value: NetlinkFlags) -> &mut Self[src]
pub fn set_flags(&mut self, value: NetlinkFlags) -> &mut Selfpub fn sequence_number(&self) -> u32[src]
pub fn sequence_number(&self) -> u32pub fn sequence_number_mut(&mut self) -> &mut u32[src]
pub fn sequence_number_mut(&mut self) -> &mut u32pub fn set_sequence_number(&mut self, value: u32) -> &mut Self[src]
pub fn set_sequence_number(&mut self, value: u32) -> &mut Selfpub fn port_number(&self) -> u32[src]
pub fn port_number(&self) -> u32pub fn port_number_mut(&mut self) -> &mut u32[src]
pub fn port_number_mut(&mut self) -> &mut u32pub fn set_port_number(&mut self, value: u32) -> &mut Self[src]
pub fn set_port_number(&mut self, value: u32) -> &mut SelfTrait Implementations
impl Debug for NetlinkHeader[src]
impl Debug for NetlinkHeaderfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl PartialEq for NetlinkHeader[src]
impl PartialEq for NetlinkHeaderfn eq(&self, other: &NetlinkHeader) -> bool[src]
fn eq(&self, other: &NetlinkHeader) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &NetlinkHeader) -> bool[src]
fn ne(&self, other: &NetlinkHeader) -> boolThis method tests for !=.
impl Eq for NetlinkHeader[src]
impl Eq for NetlinkHeaderimpl Clone for NetlinkHeader[src]
impl Clone for NetlinkHeaderfn clone(&self) -> NetlinkHeader[src]
fn clone(&self) -> NetlinkHeaderReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
impl Copy for NetlinkHeader[src]
impl Copy for NetlinkHeaderimpl Hash for NetlinkHeader[src]
impl Hash for NetlinkHeaderfn hash<__H: Hasher>(&self, state: &mut __H)[src]
fn hash<__H: Hasher>(&self, state: &mut __H)Feeds this value into the given [Hasher]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, Feeds a slice of this type into the given [Hasher]. Read more
impl Default for NetlinkHeader[src]
impl Default for NetlinkHeaderfn default() -> NetlinkHeader[src]
fn default() -> NetlinkHeaderReturns the "default value" for a type. Read more
impl Emitable for NetlinkHeader[src]
impl Emitable for NetlinkHeaderfn buffer_len(&self) -> usize[src]
fn buffer_len(&self) -> usizeReturn the length of the serialized data.
fn emit(&self, buffer: &mut [u8])[src]
fn emit(&self, buffer: &mut [u8])Serialize this types and write the serialized data into the given buffer. Read more
impl<'a, T: AsRef<[u8]> + ?Sized> Parseable<NetlinkHeader> for NetlinkBuffer<&'a T>[src]
impl<'a, T: AsRef<[u8]> + ?Sized> Parseable<NetlinkHeader> for NetlinkBuffer<&'a T>fn parse(&self) -> Result<NetlinkHeader>[src]
fn parse(&self) -> Result<NetlinkHeader>Deserialize the current type.
Auto Trait Implementations
impl Send for NetlinkHeader
impl Send for NetlinkHeaderimpl Sync for NetlinkHeader
impl Sync for NetlinkHeader