FD.io VPP  v21.10.1-2-g0a485f517
Vector Packet Processing
udp_encap.h File Reference
+ Include dependency graph for udp_encap.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  udp_encap_t_
 The UDP encap representation. More...
 

Typedefs

typedef enum udp_encap_fixup_flags_t_ udp_encap_fixup_flags_t
 UDP encapsulation. More...
 
typedef struct udp_encap_t_ udp_encap_t
 The UDP encap representation. More...
 
typedef walk_rc_t(* udp_encap_walk_cb_t) (index_t uei, void *ctx)
 Callback function invoked when walking all encap objects. More...
 

Enumerations

enum  udp_encap_fixup_flags_t_ { UDP_ENCAP_FIXUP_NONE = 0, UDP_ENCAP_FIXUP_UDP_SRC_PORT_ENTROPY = (1 << 0) }
 UDP encapsulation. More...
 

Functions

index_t udp_encap_add_and_lock (fib_protocol_t proto, index_t fib_index, const ip46_address_t *src_ip, const ip46_address_t *dst_ip, u16 src_port, u16 dst_port, udp_encap_fixup_flags_t flags)
 
void udp_encap_lock (index_t uei)
 
void udp_encap_unlock (index_t uei)
 
u8format_udp_encap (u8 *s, va_list *args)
 
void udp_encap_contribute_forwarding (index_t uei, dpo_proto_t proto, dpo_id_t *dpo)
 
void udp_encap_get_stats (index_t uei, u64 *packets, u64 *bytes)
 
void udp_encap_walk (udp_encap_walk_cb_t cb, void *ctx)
 Walk each of the encap objects. More...
 
static udp_encap_tudp_encap_get (index_t uei)
 

Variables

udp_encap_tudp_encap_pool
 Pool of encaps. More...
 

Typedef Documentation

◆ udp_encap_fixup_flags_t

UDP encapsulation.

A representation of the encapsulation of packets in UDP-over-IP. This is encapsulation only, there is no tunnel interface, hence it is uni-directional. For decap register a handler with the UDP port dispatcher. Fixup behaviour. Actions performed on the encap in the data-plane

◆ udp_encap_t

typedef struct udp_encap_t_ udp_encap_t

The UDP encap representation.

◆ udp_encap_walk_cb_t

typedef walk_rc_t(* udp_encap_walk_cb_t) (index_t uei, void *ctx)

Callback function invoked when walking all encap objects.

Return non-zero to continue the walk.

Definition at line 128 of file udp_encap.h.

Enumeration Type Documentation

◆ udp_encap_fixup_flags_t_

UDP encapsulation.

A representation of the encapsulation of packets in UDP-over-IP. This is encapsulation only, there is no tunnel interface, hence it is uni-directional. For decap register a handler with the UDP port dispatcher. Fixup behaviour. Actions performed on the encap in the data-plane

Enumerator
UDP_ENCAP_FIXUP_NONE 
UDP_ENCAP_FIXUP_UDP_SRC_PORT_ENTROPY 

UDP source port contains an entropy/hash value for load-balancing by downstream peers.

Definition at line 34 of file udp_encap.h.

Function Documentation

◆ format_udp_encap()

u8* format_udp_encap ( u8 s,
va_list *  args 
)

Definition at line 267 of file udp_encap.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ udp_encap_add_and_lock()

index_t udp_encap_add_and_lock ( fib_protocol_t  proto,
index_t  fib_index,
const ip46_address_t *  src_ip,
const ip46_address_t *  dst_ip,
u16  src_port,
u16  dst_port,
udp_encap_fixup_flags_t  flags 
)

Definition at line 56 of file udp_encap.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ udp_encap_contribute_forwarding()

void udp_encap_contribute_forwarding ( index_t  uei,
dpo_proto_t  proto,
dpo_id_t dpo 
)

Definition at line 131 of file udp_encap.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ udp_encap_get()

static udp_encap_t* udp_encap_get ( index_t  uei)
inlinestatic

Definition at line 141 of file udp_encap.h.

+ Here is the caller graph for this function:

◆ udp_encap_get_stats()

void udp_encap_get_stats ( index_t  uei,
u64 packets,
u64 bytes 
)

Definition at line 247 of file udp_encap.c.

+ Here is the call graph for this function:

◆ udp_encap_lock()

void udp_encap_lock ( index_t  uei)

Definition at line 149 of file udp_encap.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ udp_encap_unlock()

void udp_encap_unlock ( index_t  uei)

Definition at line 162 of file udp_encap.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ udp_encap_walk()

void udp_encap_walk ( udp_encap_walk_cb_t  cb,
void *  ctx 
)

Walk each of the encap objects.

Definition at line 506 of file udp_encap.c.

Variable Documentation

◆ udp_encap_pool

udp_encap_t* udp_encap_pool

Pool of encaps.

Definition at line 30 of file udp_encap.c.