Struct etherparse::IpAuthenticationHeader [−][src]
pub struct IpAuthenticationHeader {
pub next_header: u8,
pub spi: u32,
pub sequence_number: u32,
// some fields omitted
}
Expand description
IP Authentication Header (rfc4302)
Fields
next_header: u8
IP protocol number specifying the next header or transport layer protocol.
See IpNumber or ip_number for a definition of the known values.
spi: u32
Security Parameters Index
sequence_number: u32
This unsigned 32-bit field contains a counter value that increases by one for each packet sent.
Implementations
Create a new authentication header with the given parameters.
Note: The length of the raw_icv slice must be a multiple of 4
and the maximum allowed length is 1016 bytes
(IpAuthenticationHeader::MAX_ICV_LEN
). If the slice length does
not fullfill these requirements the value is not copied and an
Err(ValueError::IpAuthenticationHeaderBadIcvLength)
is returned.
If successfull an Ok(()) is returned.
Read an authentication header from a slice and return the header & unused parts of the slice.
Read an authentication header from the current reader position.
Returns a slice the raw icv value.
Sets the icv value to the given raw value. The length of the slice must be
a multiple of 4 and the maximum allowed length is 1016 bytes
(IpAuthenticationHeader::MAX_ICV_LEN
). If the slice length does
not fullfill these requirements the value is not copied and an
Err(ValueError::IpAuthenticationHeaderBadIcvLength)
is returned.
If successfull an Ok(()) is returned.
Writes the given authentication header to the current position.
Length of the header in bytes.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for IpAuthenticationHeader
impl Send for IpAuthenticationHeader
impl Sync for IpAuthenticationHeader
impl Unpin for IpAuthenticationHeader
impl UnwindSafe for IpAuthenticationHeader
Blanket Implementations
Mutably borrows from an owned value. Read more