34#include <tins/macros.h>
35#include <tins/endianness.h>
36#include <tins/small_uint.h>
79 return header_.next_header;
87 return header_.length;
95 return Endian::be_to_host(header_.spi);
103 return Endian::be_to_host(header_.seq_number);
166 struct ipsec_header {
171 void write_serialization(uint8_t* buffer, uint32_t total_sz);
173 ipsec_header header_;
212 return Endian::be_to_host(header_.spi);
220 return Endian::be_to_host(header_.seq_number);
257 struct ipsec_header {
261 void write_serialization(uint8_t* buffer, uint32_t total_sz);
263 ipsec_header header_;
Represents a range of addresses.
Definition address_range.h:167
Represents an IPSec Authentication Header.
Definition ipsec.h:44
PDUType pdu_type() const
Getter for the PDU's type.
Definition ipsec.h:157
uint8_t length() const
Getter for the Length field.
Definition ipsec.h:86
uint32_t spi() const
Getter for the Security Parameters Index field.
Definition ipsec.h:94
uint8_t next_header() const
Getter for the Next header field.
Definition ipsec.h:78
IPSecAH * clone() const
Definition ipsec.h:162
uint32_t seq_number() const
Getter for the Sequence number field.
Definition ipsec.h:102
const byte_array & icv() const
Getter for the ICV field.
Definition ipsec.h:110
Represents an IPSec Authentication Header.
Definition ipsec.h:180
PDUType pdu_type() const
Getter for the PDU's type.
Definition ipsec.h:248
IPSecESP * clone() const
Definition ipsec.h:253
uint32_t spi() const
Getter for the Security Parameters Index field.
Definition ipsec.h:211
uint32_t seq_number() const
Getter for the Sequence number field.
Definition ipsec.h:219
Base class for protocol data units.
Definition pdu.h:107
PDUType
Enum which identifies each type of PDU.
Definition pdu.h:127
The Tins namespace.
Definition address_range.h:38
std::vector< uint8_t > byte_array
Definition pdu.h:50