This patch introduces structs for both ESP headers and ESP trailers along with expected size assertions.
Signed-off-by: Ian Stokes <[email protected]> --- lib/packets.h | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-) diff --git a/lib/packets.h b/lib/packets.h index 705d0b2..057935c 100644 --- a/lib/packets.h +++ b/lib/packets.h @@ -799,6 +799,20 @@ struct udp_header { }; BUILD_ASSERT_DECL(UDP_HEADER_LEN == sizeof(struct udp_header)); +#define ESP_HEADER_LEN 8 +struct esp_header { + ovs_be32 spi; + ovs_be32 seq_no; +}; +BUILD_ASSERT_DECL(ESP_HEADER_LEN == sizeof(struct esp_header)); + +#define ESP_TRAILER_LEN 2 +struct esp_trailer { + uint8_t pad_len; + uint8_t next_hdr; +}; +BUILD_ASSERT_DECL(ESP_TRAILER_LEN == sizeof(struct esp_trailer)); + #define TCP_FIN 0x001 #define TCP_SYN 0x002 #define TCP_RST 0x004 -- 1.7.0.7 _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
