FD.io VPP  v18.04-17-g3a0d853
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

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

Exit nodes from a IP_NULL.

Enumeration Type Documentation

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

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:

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:

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:

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:

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:

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_action_t ip_null_dpo_get_action ( index_t  indi)

Definition at line 100 of file ip_null_dpo.c.

+ Here is the caller graph for this function:

static void ip_null_dpo_lock ( dpo_id_t dpo)
static

Definition at line 106 of file ip_null_dpo.c.

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:

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:

static void ip_null_dpo_unlock ( dpo_id_t dpo)
static

Definition at line 114 of file ip_null_dpo.c.

Variable Documentation

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
static u8 * format_ip_null_dpo_trace(u8 *s, va_list *args)
Definition: ip_null_dpo.c:352
unsigned int u32
Definition: types.h:88

(constructor) VLIB_REGISTER_NODE (ip4_null_dpo_node)

Definition at line 373 of file ip_null_dpo.c.

const char* const ip4_null_nodes[]
static
Initial value:
=
{
"ip4-null",
}
#define NULL
Definition: clib.h:55

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.

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",
},
}
static u8 * format_ip_null_dpo_trace(u8 *s, va_list *args)
Definition: ip_null_dpo.c:352
unsigned int u32
Definition: types.h:88
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.

const char* const ip6_null_nodes[]
static
Initial value:
=
{
"ip6-null",
}
#define NULL
Definition: clib.h:55

Definition at line 152 of file ip_null_dpo.c.

const char* ip_null_action_strings[] = IP_NULL_ACTIONS

Action strings.

Definition at line 75 of file ip_null_dpo.c.

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.

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.

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.