FD.io VPP  v19.08.3-2-gbabecb413
Vector Packet Processing
ip_null_dpo.c File Reference
+ Include dependency graph for ip_null_dpo.c:

Go to the source code of this file.

Data Structures

struct  ip_null_dpo_t_
 The data-path object representing dropping the packet. More...
 
struct  ip_null_dpo_trace_t_
 

Typedefs

typedef struct ip_null_dpo_t_ ip_null_dpo_t
 The data-path object representing dropping the packet. More...
 
typedef struct ip_null_dpo_trace_t_ ip_null_dpo_trace_t
 
typedef enum ip_null_next_t_ ip_null_next_t
 Exit nodes from a IP_NULL. More...
 

Enumerations

enum  ip_null_next_t_ { IP_NULL_NEXT_DROP, IP_NULL_NEXT_ICMP, IP_NULL_NEXT_NUM }
 Exit nodes from a IP_NULL. More...
 

Functions

void ip_null_dpo_add_and_lock (dpo_proto_t proto, ip_null_dpo_action_t action, dpo_id_t *dpo)
 
static const ip_null_dpo_tip_null_dpo_get (index_t indi)
 
ip_null_dpo_action_t ip_null_dpo_get_action (index_t indi)
 
static void ip_null_dpo_lock (dpo_id_t *dpo)
 
static void ip_null_dpo_unlock (dpo_id_t *dpo)
 
static u8format_ip_null_dpo (u8 *s, va_list *ap)
 
static uword ip_null_dpo_switch (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, u8 is_ip4)
 
static u8format_ip_null_dpo_trace (u8 *s, va_list *args)
 
static uword ip4_null_dpo_switch (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
static uword ip6_null_dpo_switch (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
void ip_null_dpo_module_init (void)
 

Variables

static ip_null_dpo_t ip_null_dpos [2 *IP_NULL_DPO_ACTION_NUM]
 the IP_NULL dpos are shared by all routes, hence they are global. More...
 
const char * ip_null_action_strings [] = IP_NULL_ACTIONS
 Action strings. More...
 
static const dpo_vft_t ip_null_vft
 
static const char *const ip4_null_nodes []
 The per-protocol VLIB graph nodes that are assigned to a ip_null object. More...
 
static const char *const ip6_null_nodes []
 
static const char *const *const ip_null_nodes [DPO_PROTO_NUM]
 
vlib_node_registration_t ip4_null_dpo_node
 (constructor) VLIB_REGISTER_NODE (ip4_null_dpo_node) More...
 
vlib_node_registration_t ip6_null_dpo_node
 (constructor) VLIB_REGISTER_NODE (ip6_null_dpo_node) More...
 

Typedef Documentation

◆ ip_null_dpo_t

typedef struct ip_null_dpo_t_ ip_null_dpo_t

The data-path object representing dropping the packet.

A representation of the IP_NULL DPO

◆ ip_null_dpo_trace_t

◆ ip_null_next_t

Exit nodes from a IP_NULL.

Enumeration Type Documentation

◆ ip_null_next_t_

Exit nodes from a IP_NULL.

Enumerator
IP_NULL_NEXT_DROP 
IP_NULL_NEXT_ICMP 
IP_NULL_NEXT_NUM 

Definition at line 172 of file ip_null_dpo.c.

Function Documentation

◆ format_ip_null_dpo()

static u8* format_ip_null_dpo ( u8 s,
va_list *  ap 
)
static

Definition at line 119 of file ip_null_dpo.c.

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

◆ format_ip_null_dpo_trace()

static u8* format_ip_null_dpo_trace ( u8 s,
va_list *  args 
)
static

Definition at line 352 of file ip_null_dpo.c.

+ Here is the call graph for this function:

◆ ip4_null_dpo_switch()

static uword ip4_null_dpo_switch ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)
static

Definition at line 363 of file ip_null_dpo.c.

+ Here is the call graph for this function:

◆ ip6_null_dpo_switch()

static uword ip6_null_dpo_switch ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)
static

Definition at line 387 of file ip_null_dpo.c.

+ Here is the call graph for this function:

◆ ip_null_dpo_add_and_lock()

void ip_null_dpo_add_and_lock ( dpo_proto_t  proto,
ip_null_dpo_action_t  action,
dpo_id_t dpo 
)

Definition at line 78 of file ip_null_dpo.c.

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

◆ ip_null_dpo_get()

static const ip_null_dpo_t* ip_null_dpo_get ( index_t  indi)
inlinestatic

Definition at line 94 of file ip_null_dpo.c.

+ Here is the caller graph for this function:

◆ ip_null_dpo_get_action()

ip_null_dpo_action_t ip_null_dpo_get_action ( index_t  indi)

Definition at line 100 of file ip_null_dpo.c.

◆ ip_null_dpo_lock()

static void ip_null_dpo_lock ( dpo_id_t dpo)
static

Definition at line 106 of file ip_null_dpo.c.

◆ ip_null_dpo_module_init()

void ip_null_dpo_module_init ( void  )

Definition at line 411 of file ip_null_dpo.c.

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

◆ ip_null_dpo_switch()

static uword ip_null_dpo_switch ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame,
u8  is_ip4 
)
inlinestatic

Definition at line 180 of file ip_null_dpo.c.

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

◆ ip_null_dpo_unlock()

static void ip_null_dpo_unlock ( dpo_id_t dpo)
static

Definition at line 114 of file ip_null_dpo.c.

Variable Documentation

◆ ip4_null_dpo_node

vlib_node_registration_t ip4_null_dpo_node
Initial value:
= {
.function = ip4_null_dpo_switch,
.name = "ip4-null",
.vector_size = sizeof (u32),
.format_trace = format_ip_null_dpo_trace,
.n_next_nodes = IP_NULL_NEXT_NUM,
.next_nodes = {
[IP_NULL_NEXT_DROP] = "ip4-drop",
[IP_NULL_NEXT_ICMP] = "ip4-icmp-error",
},
}
static uword ip4_null_dpo_switch(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: ip_null_dpo.c:363
unsigned int u32
Definition: types.h:88
static u8 * format_ip_null_dpo_trace(u8 *s, va_list *args)
Definition: ip_null_dpo.c:352

(constructor) VLIB_REGISTER_NODE (ip4_null_dpo_node)

Definition at line 373 of file ip_null_dpo.c.

◆ ip4_null_nodes

const char* const ip4_null_nodes[]
static
Initial value:
=
{
"ip4-null",
NULL,
}

The per-protocol VLIB graph nodes that are assigned to a ip_null object.

this means that these graph nodes are ones from which a ip_null is the parent object in the DPO-graph.

Definition at line 147 of file ip_null_dpo.c.

◆ ip6_null_dpo_node

vlib_node_registration_t ip6_null_dpo_node
Initial value:
= {
.function = ip6_null_dpo_switch,
.name = "ip6-null",
.vector_size = sizeof (u32),
.format_trace = format_ip_null_dpo_trace,
.n_next_nodes = IP_NULL_NEXT_NUM,
.next_nodes = {
[IP_NULL_NEXT_DROP] = "ip6-drop",
[IP_NULL_NEXT_ICMP] = "ip6-icmp-error",
},
}
unsigned int u32
Definition: types.h:88
static u8 * format_ip_null_dpo_trace(u8 *s, va_list *args)
Definition: ip_null_dpo.c:352
static uword ip6_null_dpo_switch(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: ip_null_dpo.c:387

(constructor) VLIB_REGISTER_NODE (ip6_null_dpo_node)

Definition at line 397 of file ip_null_dpo.c.

◆ ip6_null_nodes

const char* const ip6_null_nodes[]
static
Initial value:
=
{
"ip6-null",
NULL,
}

Definition at line 152 of file ip_null_dpo.c.

◆ ip_null_action_strings

const char* ip_null_action_strings[] = IP_NULL_ACTIONS

Action strings.

Definition at line 75 of file ip_null_dpo.c.

◆ ip_null_dpos

ip_null_dpo_t ip_null_dpos[2 *IP_NULL_DPO_ACTION_NUM]
static
Initial value:
= {
[0] = {
.ind_action = IP_NULL_ACTION_NONE,
},
[1] = {
},
[2] = {
},
[3] = {
.ind_action = IP_NULL_ACTION_NONE,
},
[4] = {
},
[5] = {
},
}

the IP_NULL dpos are shared by all routes, hence they are global.

As the neame implies this is only for IP, hence 2.

Definition at line 45 of file ip_null_dpo.c.

◆ ip_null_nodes

const char* const* const ip_null_nodes[DPO_PROTO_NUM]
static
Initial value:
=
{
}
static const char *const ip6_null_nodes[]
Definition: ip_null_dpo.c:152
static const char *const ip4_null_nodes[]
The per-protocol VLIB graph nodes that are assigned to a ip_null object.
Definition: ip_null_dpo.c:147

Definition at line 158 of file ip_null_dpo.c.

◆ ip_null_vft

const dpo_vft_t ip_null_vft
static
Initial value:
= {
.dv_lock = ip_null_dpo_lock,
.dv_unlock = ip_null_dpo_unlock,
.dv_format = format_ip_null_dpo,
}
static void ip_null_dpo_unlock(dpo_id_t *dpo)
Definition: ip_null_dpo.c:114
static u8 * format_ip_null_dpo(u8 *s, va_list *ap)
Definition: ip_null_dpo.c:119
static void ip_null_dpo_lock(dpo_id_t *dpo)
Definition: ip_null_dpo.c:106

Definition at line 134 of file ip_null_dpo.c.