diff options
Diffstat (limited to 'src/vnet/ip/ip4_packet.h')
-rw-r--r-- | src/vnet/ip/ip4_packet.h | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/src/vnet/ip/ip4_packet.h b/src/vnet/ip/ip4_packet.h index 513a7449b54..269049194e6 100644 --- a/src/vnet/ip/ip4_packet.h +++ b/src/vnet/ip/ip4_packet.h @@ -41,7 +41,6 @@ #define included_ip4_packet_h #include <vnet/ip/ip_packet.h> /* for ip_csum_t */ -#include <vnet/tcp/tcp_packet.h> /* for tcp_header_t */ #include <vppinfra/byte_order.h> /* for clib_net_to_host_u16 */ #include <vppinfra/warnings.h> /* for WARN_OFF/WARN_ON macro */ @@ -130,19 +129,15 @@ typedef union /* For checksumming we'll want to access IP header in word sized chunks. */ /* For 64 bit machines. */ - /* *INDENT-OFF* */ CLIB_PACKED (struct { u64 checksum_data_64[2]; u32 checksum_data_64_32[1]; }); - /* *INDENT-ON* */ /* For 32 bit machines. */ - /* *INDENT-OFF* */ CLIB_PACKED (struct { u32 checksum_data_32[5]; }); - /* *INDENT-ON* */ } ip4_header_t; /* Value of ip_version_and_header_length for packets w/o options. */ @@ -201,9 +196,7 @@ ip4_next_header (ip4_header_t * i) /* Turn off array bounds check due to ip4_header_t option field operations. */ -/* *INDENT-OFF* */ WARN_OFF(array-bounds) -/* *INDENT-ON* */ static_always_inline u16 ip4_header_checksum_inline (ip4_header_t * i, int with_checksum) @@ -306,9 +299,7 @@ ip4_header_checksum_inline (ip4_header_t * i, int with_checksum) return ~((u16) sum); } -/* *INDENT-OFF* */ WARN_ON(array-bounds) -/* *INDENT-ON* */ always_inline u16 ip4_header_checksum (ip4_header_t * i) @@ -476,47 +467,6 @@ ip4_multicast_ethernet_address (u8 * ethernet_address, ethernet_address[5] = d[3]; } -always_inline void -ip4_tcp_reply_x1 (ip4_header_t * ip0, tcp_header_t * tcp0) -{ - u32 src0, dst0; - - src0 = ip0->src_address.data_u32; - dst0 = ip0->dst_address.data_u32; - ip0->src_address.data_u32 = dst0; - ip0->dst_address.data_u32 = src0; - - src0 = tcp0->src; - dst0 = tcp0->dst; - tcp0->src = dst0; - tcp0->dst = src0; -} - -always_inline void -ip4_tcp_reply_x2 (ip4_header_t * ip0, ip4_header_t * ip1, - tcp_header_t * tcp0, tcp_header_t * tcp1) -{ - u32 src0, dst0, src1, dst1; - - src0 = ip0->src_address.data_u32; - src1 = ip1->src_address.data_u32; - dst0 = ip0->dst_address.data_u32; - dst1 = ip1->dst_address.data_u32; - ip0->src_address.data_u32 = dst0; - ip1->src_address.data_u32 = dst1; - ip0->dst_address.data_u32 = src0; - ip1->dst_address.data_u32 = src1; - - src0 = tcp0->src; - src1 = tcp1->src; - dst0 = tcp0->dst; - dst1 = tcp1->dst; - tcp0->src = dst0; - tcp1->src = dst1; - tcp0->dst = src0; - tcp1->dst = src1; -} - #endif /* included_ip4_packet_h */ /* |