Struct ipsec_parser::IkeV2Header
[−]
[src]
pub struct IkeV2Header { pub init_spi: u64, pub resp_spi: u64, pub next_payload: IkePayloadType, pub maj_ver: u8, pub min_ver: u8, pub exch_type: IkeExchangeType, pub flags: u8, pub msg_id: u32, pub length: u32, }
The IKE Header
IKE messages use UDP ports 500 and/or 4500, with one IKE message per UDP datagram. Information from the beginning of the packet through the UDP header is largely ignored except that the IP addresses and UDP ports from the headers are reversed and used for return packets. When sent on UDP port 500, IKE messages begin immediately following the UDP header. When sent on UDP port 4500, IKE messages have prepended four octets of zeros. These four octets of zeros are not part of the IKE message and are not included in any of the length fields or checksums defined by IKE. Each IKE message begins with the IKE header, denoted HDR in this document. Following the header are one or more IKE payloads each identified by a Next Payload field in the preceding payload. Payloads are identified in the order in which they appear in an IKE message by looking in the Next Payload field in the IKE header, and subsequently according to the Next Payload field in the IKE payload itself until a Next Payload field of zero indicates that no payloads follow. If a payload of type "Encrypted" is found, that payload is decrypted and its contents parsed as additional payloads. An Encrypted payload MUST be the last payload in a packet and an Encrypted payload MUST NOT contain another Encrypted payload.
The responder's SPI in the header identifies an instance of an IKE Security Association. It is therefore possible for a single instance of IKE to multiplex distinct sessions with multiple peers, including multiple sessions per peer.
All multi-octet fields representing integers are laid out in big endian order (also known as "most significant byte first", or "network byte order").
Defined in RFC7296 section 3.1
Fields
init_spi: u64
resp_spi: u64
next_payload: IkePayloadType
maj_ver: u8
min_ver: u8
exch_type: IkeExchangeType
flags: u8
msg_id: u32
length: u32
Trait Implementations
impl Clone for IkeV2Header
[src]
fn clone(&self) -> IkeV2Header
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for IkeV2Header
[src]
impl PartialEq for IkeV2Header
[src]
fn eq(&self, __arg_0: &IkeV2Header) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &IkeV2Header) -> bool
[src]
This method tests for !=
.