]> git.proxmox.com Git - mirror_ovs.git/commitdiff
packets: Add ESP header and trailer.
authorIan Stokes <ian.stokes@intel.com>
Fri, 25 Aug 2017 16:40:25 +0000 (17:40 +0100)
committerBen Pfaff <blp@ovn.org>
Tue, 31 Oct 2017 21:42:50 +0000 (14:42 -0700)
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>
lib/packets.h

index 705d0b2709661613337c19aad9b951b7672bd563..057935cbf76f19559cb4162950abba2a1e8c42a5 100644 (file)
@@ -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