pub struct Ospfv2PacketHeader {
pub version: u8,
pub packet_type: OspfPacketType,
pub packet_length: u16,
pub router_id: u32,
pub area_id: u32,
pub checksum: u16,
pub au_type: u16,
pub authentication: u64,
}
Expand description
The OSPF packet header
Every OSPF packet starts with a common 24 byte header. This header contains all the necessary information to determine whether the packet should be accepted for further processing. This determination is described in Section 8.2 of the specification.
Fields§
§version: u8
§packet_type: OspfPacketType
§packet_length: u16
§router_id: u32
§area_id: u32
§checksum: u16
§au_type: u16
§authentication: u64
Implementations§
Source§impl Ospfv2PacketHeader
impl Ospfv2PacketHeader
pub fn source_router(&self) -> Ipv4Addr
Trait Implementations§
Source§impl Debug for Ospfv2PacketHeader
impl Debug for Ospfv2PacketHeader
Source§impl<'nom> Parse<&'nom [u8]> for Ospfv2PacketHeader
impl<'nom> Parse<&'nom [u8]> for Ospfv2PacketHeader
Auto Trait Implementations§
impl Freeze for Ospfv2PacketHeader
impl RefUnwindSafe for Ospfv2PacketHeader
impl Send for Ospfv2PacketHeader
impl Sync for Ospfv2PacketHeader
impl Unpin for Ospfv2PacketHeader
impl UnwindSafe for Ospfv2PacketHeader
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