summaryrefslogtreecommitdiffstats
path: root/src/vnet/udp/udp.h
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2020-04-01 00:11:16 +0000
committerDave Barach <openvpp@barachs.net>2020-04-01 19:20:55 +0000
commita039620c2eec19a6c2e525645eeb0728a1c18c8d (patch)
tree7ff66fd434ca0ca9b7a747a50e122815a666bf5f /src/vnet/udp/udp.h
parent6eef40bce3f5ae2b06ba75d5b4cf32f168a801e4 (diff)
udp: track connection port sharing
Type: feature Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I822ed0596944a554595eb62a45841d216d1ab611
Diffstat (limited to 'src/vnet/udp/udp.h')
-rw-r--r--src/vnet/udp/udp.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/vnet/udp/udp.h b/src/vnet/udp/udp.h
index 5ff613b568a..32e660be12f 100644
--- a/src/vnet/udp/udp.h
+++ b/src/vnet/udp/udp.h
@@ -106,7 +106,7 @@ typedef struct
/* Name (a c string). */
char *name;
- /* GRE protocol type in host byte order. */
+ /* Port number in host byte order. */
udp_dst_port_t dst_port;
/* Node which handles this type. */
@@ -115,6 +115,9 @@ typedef struct
/* Next index for this type. */
u32 next_index;
+ /* UDP sessions refcount (not tunnels) */
+ u32 n_connections;
+
/* Parser for packet generator edits for this protocol */
unformat_function_t *unformat_pg_edit;
} udp_dst_port_info_t;
@@ -141,6 +144,9 @@ typedef struct
u8 punt_unknown4;
u8 punt_unknown6;
+ /* Udp local to input arc index */
+ u32 local_to_input_edge[N_UDP_AF];
+
/*
* Per-worker thread udp connection pools used with session layer
*/
@@ -257,6 +263,8 @@ format_function_t format_udp_header;
format_function_t format_udp_rx_trace;
unformat_function_t unformat_udp_header;
+void udp_add_dst_port (udp_main_t * um, udp_dst_port_t dst_port,
+ char *dst_port_name, u8 is_ip4);
void udp_register_dst_port (vlib_main_t * vm,
udp_dst_port_t dst_port,
u32 node_index, u8 is_ip4);
@@ -264,6 +272,8 @@ void udp_unregister_dst_port (vlib_main_t * vm,
udp_dst_port_t dst_port, u8 is_ip4);
bool udp_is_valid_dst_port (udp_dst_port_t dst_port, u8 is_ip4);
+void udp_connection_share_port (u16 lcl_port, u8 is_ip4);
+
void udp_punt_unknown (vlib_main_t * vm, u8 is_ip4, u8 is_add);
always_inline void *