diff options
author | Neale Ranns <neale@graphiant.com> | 2022-02-15 09:02:27 +0000 |
---|---|---|
committer | Neale Ranns <neale@graphiant.com> | 2022-02-15 09:02:27 +0000 |
commit | f7040f01a57618c899de8d1feb30bcc70b0a45b9 (patch) | |
tree | f23942c61b8a3b8cc496c054d0d2071a85b330c9 /src/vnet/ip/ip4_packet.h | |
parent | cdaf0d8c884ae0f337ef94b0ceb7449c991a3e6c (diff) |
tcp: Do not include the tcp_packet.h file in the ip4_packet.h
Type: refactor
IP4 does not depend on TCP (it's the other way around).
This upside down dependency leads to some nasty circular includes when trying to use ip46_address.h in interface.h
Signed-off-by: Neale Ranns <neale@graphiant.com>
Change-Id: I4a1bd21543b08b9c1cf1e5563da738414734a878
Diffstat (limited to 'src/vnet/ip/ip4_packet.h')
-rw-r--r-- | src/vnet/ip/ip4_packet.h | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/src/vnet/ip/ip4_packet.h b/src/vnet/ip/ip4_packet.h index 513a7449b54..2673558e19e 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 */ @@ -476,47 +475,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 */ /* |