FD.io VPP  v17.01-9-ge7dcee4
Vector Packet Processing
cnat_show_response.h
Go to the documentation of this file.
1 /*
2  *------------------------------------------------------------------
3  * cnat_show_response.h show command response structs
4  *
5  * Copyright (c) 2007-2013 Cisco and/or its affiliates.
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at:
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  *------------------------------------------------------------------
18  */
19 
20 #ifndef __CNAT_SHOW_RESPONSE_H__
21 #define __CNAT_SHOW_RESPONSE_H__
22 
23 /*
24  * Flags indicating the type of translation entry
25  */
26 #define CNAT_TRANSLATION_ENTRY_ALL 0x0
27 #define CNAT_TRANSLATION_ENTRY_STATIC 0x1
28 #define CNAT_TRANSLATION_ENTRY_ALG 0x2
29 #define CNAT_TRANSLATION_ENTRY_DYNAMIC 0x4
30 
31 /* for PCP support */
32 #define CNAT_TRANSLATION_ENTRY_PCPI_DYNAMIC 0x08
33 #define CNAT_TRANSLATION_ENTRY_PCPE_DYNAMIC 0x10
34 
35 #define MAX_NODE_NAME_LEN 18
36 #define MAX_CTR_NAME_LEN 10
37 
38 /*
39  * show translation entry response structures
40  */
41 typedef struct {
43  u16 cnat_call_id; /* mapped call Id */
44  u16 dst_call_id; /* dest call id */
46 
47 typedef struct {
49  u16 rc; /* o/p parameter. */
50  u16 num_entries; /* Number of entries sent as output */
51  u16 vrf_id; /* vrf id */
55 
56 /*
57  * show translation entry response structures
58  */
59 typedef struct {
62  u16 cnat_port; /* port which replaced the src port */
70 
71 typedef struct {
73  u8 rc; /* o/p parameter. */
74  u8 num_entries; /* Number of entries sent as output */
75  u16 vrf_id; /* vrf id */
79 
80 /*
81  * show free/used ipv4 address/port response structure
82  */
83 typedef struct {
87 
88 typedef struct {
90  u8 rc;
95 
96 /*
97  * Node name to id mapping
98  */
99 typedef struct {
102  char node_name[MAX_NODE_NAME_LEN];
104 
105 typedef struct {
109  cnat_statistics_node_name node_name_array[0];
111 
112 /*
113  * Counter name to id mapping
114  */
115 typedef struct {
118  char counter_name[MAX_CTR_NAME_LEN];
120 
121 typedef struct {
125  cnat_statistics_counter_name counter_name_array[0];
127 
128 
129 /*
130  * Node name to id mapping
131  */
132 typedef struct {
137  u64 counters [0];
139 
140 /*
141  * Summary Stats
142  */
143 typedef struct {
147 
148 typedef struct {
168 
170  u32 pool_address_used; /* The following array size will be lesser of
171  (pool_address_used, 200) */
174  u64 in2out_drops_src_ip_no_config; // for deterministic nat on brahmos
175  pool_address_usage_t pool_address_usage[0];
177 
178 
179 typedef struct {
188 
189 
190 typedef struct {
194 
195  /*
196  * XLAT statistics
197  */
203 
207 
213 
220 
230 
237 
243 
247 
254 
260 
266 
270 
271 typedef struct {
275  /* Total v4 packets to BR */
277  /* Total v4 tunneled packets to BR */
279  /* proto 41 packets without minimum, of 40, v6 payload */
281  /* total proto 41 packets being considered for decap */
283  /* proto 41 packets that failed security check*/
285  /* packets with no active db entry */
287  /* proto 41 packets actually getting decapped */
289  /* total v4 packets which are neither icmp nor 41 */
291  /* v4 tunneled packets with invalid v6 source address */
293  /* total icmpv4 packets destined to BR */
295  /* total icmpv4 echo replies by BR */
297  /* total icmpv4 error messages translated to icmpv6 by BR */
299  /* total packets with icmpv4 type/code which are not supported by BR */
301  /* total icmpv4 packets which are rate-limited by BR */
303  /* total ICMPv4 error messages which could not be translated */
305 
306  /* ipv4 defrag stats */
321 
322  /* total v6 packets input to BR */
324  /* v6 packets with no active db entry */
326  /* forus v6 packets with next header other than icmpv6 */
328  /* total v6 packets that got tunneled */
330  /* total icmpv6 packets destined to BR */
332  /* total icmpv6 echo replies by BR */
334  /* total icmpv6 PTB messages generated by BR */
336  /* total ipv6 packets for which PTBv6 was NOT generated by BR */
338  /* total icmpv6 Neighbor Advertisements generated by BR */
340  /* total icmpv6 TTL expiry messages generated by BR */
342  /* total ICMPv6 fragments, which are dropped by BR */
344  /* total packets with icmpv6 type/code which are not supported by BR */
346  /* total icmpv6 packets which are rate-limited by BR */
349 
350 typedef struct {
354 
355  /* Total Incoming Count */
357  /* Total Drop Count */
359  /* Total Output Count */
361  /* TCP Incoming Count */
363  /* TCP Output Count */
365  /* UDP Incoming Count */
367  /* UDP Output Count */
369  /* ICMPv4 Incoming Count */
371  /* ICMPv4 Output Count */
373  /* Invalid UIDB Drop Count */
375  /* NoDb Drop Count */
377  /* TTL Expire Drop Count */
379  /* Invalid IP Destination Drop Count */
381  /* Packet Execeeding Path MTU Drop Count */
383  /* Unsupported Protocol Drop Count */
385  /* ICMPv4 Generated for TTL Expire Count */
387  /* ICMPv4 Generated for Error Count */
389  /* ICMPv4 Packets Rate-Limited Count */
391  /* TCP MSS Changed Count */
393 
394  /* Total Incoming Count */
396  /* Total Drop Count */
398  /* Total Output Count */
400  /* TCP Incoming Count */
402  /* TCP Output Count */
404  /* UDP Incoming Count */
406  /* UDP Output Count */
408  /* ICMPv4 Incoming Count */
410  /* ICMPv4 Output Count */
412  /* Invalid UIDB Drop Count */
414  /* NoDb Drop Count */
416  /* TTL Expire Drop Count */
418  /* Invalid IPv6 Destination Drop Count */
420  /* Invalid Source Prefix Drop Count */
422  /* Unsupported Protocol Drop Count */
424  /* ICMPv6 Input Count */
426  /* ICMPv6 Invalid UIDB Drop Count */
428  /* ICMPv6 NoDb Drop Count */
430  /* ICMPv6 TTL Expire Drop Count */
432  /* ICMPv6 Invalid IPv6 Destination Drop Count */
434  /* ICMPv6 Unsupported Type Drop Count */
436  /* ICMPv6 Invalid NxtHdr Drop Count*/
438  /* ICMPv6 Frag Drop Count */
440  /* ICMPv6 Forus Count */
442  /* ICMPv6 Echo Response Received Count */
444  /* ICMPv6 Echo Replies Count */
446  /* ICMPv6 Translated to ICMPV4 Output Count*/
448  /* ICMPv6 Generated for TTL Expire Count */
450  /* ICMPv6 Generated for Error Count */
452  /* ICMPv6 Packets Rate-Limited Count */
454  /* TCP MSS Changed Count */
456 
457  /*Total Input Count*/
459  /*Total Drop Count*/
461  /*Reassembled Output Count*/
463 
464  /*TCP Input Count*/
466  /*UDP Input Count*/
468  /*ICMPv4 Input Count*/
470 
471  /*Invalid UIDB Drop Count */
473  /*NoDb Drop Count*/
475  /*Unsupported Protocol Drop Count*/
477  /*Throttled Count*/
479  /*Timeout Drop Count*/
481  /*Duplicates Drop Count*/
483 
484  /*Total Input Count*/
486  /*Total Drop Count*/
488  /*Total Output Count*/
490 
491  /*TCP Input Count*/
493  /*UDP Input Count*/
495  /*ICMPv4 Input Count*/
497 
498  /*Invalid Source Prefix Drop Count*/
500  /*Unsupported Protocol Drop Count*/
502  /*Throttled Count*/
504  /*Timeout Drop Count*/
506  /*Duplicates Drop Count*/
508 
509  /*ICMPv6 Generated for Error Count */
511  /*ICMPv6 Packets Rate-Limited Count */
513 
514  /*TCP MSS Changed Count */
516 
518 
519 /*
520  * The following are the command types for Generic Command cases
521  */
522 #define CNAT_DEBUG_GENERIC_COMMAND_READ_MEM 1
523 #define CNAT_DEBUG_GENERIC_COMMAND_WRITE_MEM 2
524 #define CNAT_DEBUG_GENERIC_COMMAND_DB_SUMMARY 3
525 #define CNAT_DEBUG_GENERIC_COMMAND_USER_DB_PM 4
526 #define CNAT_DEBUG_GET_CGN_DB_SUMMARY 5
527 
528 typedef enum {
563 
564 typedef enum {
570 
571 typedef struct {
576  u8 raw_data[0];
578 
579 extern u32 db_free_entry (void * p);
580 #endif /*__CNAT_SHOW_RESPONSE_H__*/
cnat_debug_flag_type_t
u16 msg_id
u32 ipv4_addr
u16 cnat_call_id
u16 dst_call_id
u32 out2in_packets
u32 pns_ip
unsigned long u64
Definition: types.h:89
u32 in2out_packets
u8 rc
cnat_debug_dump_type_t
u16 nsessions
u16 rc
u16 vrf_id
u32 free_used_ports
u16 vrf_id
#define MAX_CTR_NAME_LEN
u8 rc
u16 call_id
u8 pad
u32 max_ports
unsigned int u32
Definition: types.h:88
u8 count
u16 cnat_port
u16 num_entries
unsigned short u16
Definition: types.h:57
u32 ip_addr
u8 num_entries
unsigned char u8
Definition: types.h:56
#define MAX_NODE_NAME_LEN
u16 flags
u32 db_free_entry(void *p)
u16 pad
u16 src_port
u16 msg_id
u16 msg_id
u8 protocol