aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/ip/ip_frag.h
diff options
context:
space:
mode:
authorNeale Ranns <neale@graphiant.com>2022-08-09 03:03:29 +0000
committerBeno�t Ganne <bganne@cisco.com>2022-08-11 06:54:16 +0000
commite22a7041626cf1ebee7534d84068d48e8671a6ab (patch)
treedc3a7f46c3a4aef4c3af20229d3df18fb5465f8a /src/vnet/ip/ip_frag.h
parent93688d7341ada44755dc0432de3e3dbaaa8aa111 (diff)
ip: Use .api declared error counters
Type: improvement Signed-off-by: Neale Ranns <neale@graphiant.com> Change-Id: I822ead1495edb96ee62e53dc5920aa6c565e3621
Diffstat (limited to 'src/vnet/ip/ip_frag.h')
-rw-r--r--src/vnet/ip/ip_frag.h22
1 files changed, 2 insertions, 20 deletions
diff --git a/src/vnet/ip/ip_frag.h b/src/vnet/ip/ip_frag.h
index ac562c944a3..4ddd62b89e6 100644
--- a/src/vnet/ip/ip_frag.h
+++ b/src/vnet/ip/ip_frag.h
@@ -36,6 +36,7 @@
#define IP_FRAG_H
#include <vnet/vnet.h>
+#include <vnet/ip/ip.api_enum.h>
#define IP_FRAG_FLAG_IP4_HEADER 0x01 //Encapsulating IPv4 header
#define IP_FRAG_FLAG_IP6_HEADER 0x02 //Encapsulating IPv6 header
@@ -57,26 +58,7 @@ typedef enum
IP_FRAG_N_NEXT
} ip_frag_next_t;
-#define foreach_ip_frag_error \
- /* Must be first. */ \
- _(NONE, "packet fragmented") \
- _(SMALL_PACKET, "packet smaller than MTU") \
- _(FRAGMENT_SENT, "number of sent fragments") \
- _(CANT_FRAGMENT_HEADER, "can't fragment header") \
- _(DONT_FRAGMENT_SET, "can't fragment this packet") \
- _(MALFORMED, "malformed packet") \
- _(MEMORY, "could not allocate buffer") \
- _(UNKNOWN, "unknown error")
-
-typedef enum
-{
-#define _(sym,str) IP_FRAG_ERROR_##sym,
- foreach_ip_frag_error
-#undef _
- IP_FRAG_N_ERROR,
-} ip_frag_error_t;
-
-extern char *ip4_frag_error_strings[];
+typedef vl_counter_ip_frag_enum_t ip_frag_error_t;
void ip_frag_set_vnet_buffer (vlib_buffer_t * b, u16 mtu,
u8 next_index, u8 flags);