pub struct OspfHeader {
pub version: u8,
pub packet_type: OspfPacketType,
pub packet_length: u16,
pub router_id: u32,
pub area_id: u32,
pub checksum: u16,
pub auth_type: AuthType,
}Expand description
OSPF packet header (24 bytes)
Fields§
§version: u8OSPF version (2)
packet_type: OspfPacketTypePacket type
packet_length: u16Packet length including header
router_id: u32Router ID of the originating router
area_id: u32Area ID this packet belongs to
checksum: u16Checksum (IP-style)
auth_type: AuthTypeAuthentication type
Implementations§
Source§impl OspfHeader
impl OspfHeader
Sourcepub fn new(packet_type: OspfPacketType, router_id: u32, area_id: u32) -> Self
pub fn new(packet_type: OspfPacketType, router_id: u32, area_id: u32) -> Self
Create a new OSPF header
Trait Implementations§
Source§impl Clone for OspfHeader
impl Clone for OspfHeader
Source§fn clone(&self) -> OspfHeader
fn clone(&self) -> OspfHeader
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for OspfHeader
impl Debug for OspfHeader
Source§impl PartialEq for OspfHeader
impl PartialEq for OspfHeader
impl Copy for OspfHeader
impl Eq for OspfHeader
impl StructuralPartialEq for OspfHeader
Auto Trait Implementations§
impl Freeze for OspfHeader
impl RefUnwindSafe for OspfHeader
impl Send for OspfHeader
impl Sync for OspfHeader
impl Unpin for OspfHeader
impl UnwindSafe for OspfHeader
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)