ip: common icmp echo structure 99/43099/5
authorOle Troan <[email protected]>
Thu, 5 Jun 2025 10:39:58 +0000 (12:39 +0200)
committerBenoit Ganne <[email protected]>
Tue, 22 Jul 2025 09:17:17 +0000 (09:17 +0000)
Move the replicated ICMP echo structure from the NAT implementations
to the common IP ICMP header.

Type: improvement
Change-Id: I3770d2609c2366859b014ae66096cd545f4b1262
Signed-off-by: Ole Troan <[email protected]>
src/plugins/nat/det44/det44.h
src/plugins/nat/nat44-ei/nat44_ei.h
src/plugins/nat/nat64/nat64.h
src/vnet/ip/icmp46_packet.h

index 683f554..ae57631 100644 (file)
@@ -63,12 +63,6 @@ typedef enum
 
 #define DET44_SES_PER_USER 1000
 
-typedef struct
-{
-  u16 identifier;
-  u16 sequence;
-} icmp_echo_header_t;
-
 typedef struct
 {
   u16 src_port, dst_port;
index 786fb0c..d399fc8 100644 (file)
@@ -83,12 +83,6 @@ typedef int (nat44_ei_alloc_out_addr_and_port_function_t) (
   nat_protocol_t proto, ip4_address_t s_addr, ip4_address_t *addr, u16 *port,
   u16 port_per_thread, u32 snat_thread_index);
 
-typedef struct
-{
-  u16 identifier;
-  u16 sequence;
-} icmp_echo_header_t;
-
 typedef struct
 {
   u16 src_port, dst_port;
index 2577880..1e144ca 100644 (file)
 
 #include <nat/nat64/nat64_db.h>
 
-typedef struct
-{
-  u16 identifier;
-  u16 sequence;
-} icmp_echo_header_t;
-
 typedef struct
 {
   u16 src_port, dst_port;
index 08e73f6..55b5b4e 100644 (file)
@@ -355,4 +355,10 @@ typedef CLIB_PACKED (struct
     link_layer_option;
 }) icmp6_neighbor_solicitation_header_t;
 
+typedef struct
+{
+    u16 identifier;
+    u16 sequence;
+} icmp_echo_header_t;
+
 #endif /* included_vnet_icmp46_packet_h */