summaryrefslogtreecommitdiff
path: root/lib/packets.h
diff options
context:
space:
mode:
authorIan Stokes <ian.stokes@intel.com>2017-08-25 17:40:25 +0100
committerBen Pfaff <blp@ovn.org>2017-10-31 14:42:50 -0700
commitbc61c7b42352825287b7da0d0a2be80ad4c16de2 (patch)
treef01a9dad60300fe3a0cadb7541056ece92db906d /lib/packets.h
parent4d7b9a37143712ca23e42f526a0b41137f6f50fa (diff)
downloadopenvswitch-bc61c7b42352825287b7da0d0a2be80ad4c16de2.tar.gz
packets: Add ESP header and trailer.
This patch introduces structs for both ESP headers and ESP trailers along with expected size assertions. Signed-off-by: Ian Stokes <ian.stokes@intel.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'lib/packets.h')
-rw-r--r--lib/packets.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/packets.h b/lib/packets.h
index 705d0b270..057935cbf 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