FD.io VPP  v17.07.01-10-g3be13f0
Vector Packet Processing
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
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)
 
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 166 of file ip_null_dpo.c.

Function Documentation

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

Definition at line 113 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 346 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 357 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 381 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:

static void ip_null_dpo_lock ( dpo_id_t dpo)
static

Definition at line 100 of file ip_null_dpo.c.

void ip_null_dpo_module_init ( void  )

Definition at line 405 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 174 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 108 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:357
static u8 * format_ip_null_dpo_trace(u8 *s, va_list *args)
Definition: ip_null_dpo.c:346
unsigned int u32
Definition: types.h:88

(constructor) VLIB_REGISTER_NODE (ip4_null_dpo_node)

Definition at line 367 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 141 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:346
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:381

(constructor) VLIB_REGISTER_NODE (ip6_null_dpo_node)

Definition at line 391 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 146 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:146
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:141

Definition at line 152 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:108
static u8 * format_ip_null_dpo(u8 *s, va_list *ap)
Definition: ip_null_dpo.c:113
static void ip_null_dpo_lock(dpo_id_t *dpo)
Definition: ip_null_dpo.c:100

Definition at line 128 of file ip_null_dpo.c.