FD.io VPP  v19.04.4-rc0-5-ge88582fac
Vector Packet Processing
gbp_policy_node.c File Reference
+ Include dependency graph for gbp_policy_node.c:

Go to the source code of this file.

Data Structures

struct  gbp_policy_trace_t_
 per-packet trace data More...
 

Macros

#define foreach_gbp_policy
 

Typedefs

typedef struct gbp_policy_trace_t_ gbp_policy_trace_t
 per-packet trace data More...
 

Enumerations

enum  gbp_policy_error_t { GBP_POLICY_N_ERROR }
 
enum  gbp_policy_next_t { GBP_POLICY_DROP, GBP_POLICY_N_NEXT, GBP_POLICY_NEXT_DROP, GBP_POLICY_N_NEXT }
 

Functions

static dpo_proto_t ethertype_to_dpo_proto (u16 etype)
 
static u32 gbp_rule_l2_redirect (const gbp_rule_t *gu, vlib_buffer_t *b0)
 
static u8 gbp_policy_is_ethertype_allowed (const gbp_contract_t *gc0, u16 ethertype)
 
static uword gbp_policy_inline (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, u8 is_port_based)
 
VLIB_NODE_FN() gbp_policy_port_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
VLIB_NODE_FN() gbp_policy_mac_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
static u8format_gbp_policy_trace (u8 *s, va_list *args)
 

Variables

static char * gbp_policy_error_strings []
 
vlib_node_registration_t gbp_policy_port_node
 (constructor) VLIB_REGISTER_NODE (gbp_policy_port_node) More...
 
vlib_node_registration_t gbp_policy_mac_node
 (constructor) VLIB_REGISTER_NODE (gbp_policy_mac_node) More...
 

Macro Definition Documentation

◆ foreach_gbp_policy

#define foreach_gbp_policy
Value:
_(DENY, "deny") \
_(REFLECTION, "reflection")

Definition at line 22 of file gbp_policy_node.c.

Typedef Documentation

◆ gbp_policy_trace_t

per-packet trace data

Enumeration Type Documentation

◆ gbp_policy_error_t

Enumerator
GBP_POLICY_N_ERROR 

Definition at line 26 of file gbp_policy_node.c.

◆ gbp_policy_next_t

Enumerator
GBP_POLICY_DROP 
GBP_POLICY_N_NEXT 
GBP_POLICY_NEXT_DROP 
GBP_POLICY_N_NEXT 

Definition at line 40 of file gbp_policy_node.c.

Function Documentation

◆ ethertype_to_dpo_proto()

static dpo_proto_t ethertype_to_dpo_proto ( u16  etype)
inlinestatic

Definition at line 60 of file gbp_policy_node.c.

+ Here is the caller graph for this function:

◆ format_gbp_policy_trace()

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

Definition at line 400 of file gbp_policy_node.c.

+ Here is the call graph for this function:

◆ gbp_policy_inline()

static uword gbp_policy_inline ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame,
u8  is_port_based 
)
static

Definition at line 111 of file gbp_policy_node.c.

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

◆ gbp_policy_is_ethertype_allowed()

static u8 gbp_policy_is_ethertype_allowed ( const gbp_contract_t gc0,
u16  ethertype 
)
inlinestatic

Definition at line 98 of file gbp_policy_node.c.

+ Here is the caller graph for this function:

◆ gbp_policy_mac_node()

VLIB_NODE_FN() gbp_policy_mac_node ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)

Definition at line 391 of file gbp_policy_node.c.

+ Here is the call graph for this function:

◆ gbp_policy_port_node()

VLIB_NODE_FN() gbp_policy_port_node ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)

Definition at line 384 of file gbp_policy_node.c.

+ Here is the call graph for this function:

◆ gbp_rule_l2_redirect()

static u32 gbp_rule_l2_redirect ( const gbp_rule_t gu,
vlib_buffer_t b0 
)
inlinestatic

Definition at line 76 of file gbp_policy_node.c.

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

Variable Documentation

◆ gbp_policy_error_strings

char* gbp_policy_error_strings[]
static
Initial value:
= {
#define _(sym,string)
}
#define foreach_gbp_policy_error
Definition: gbp_contract.h:21

Definition at line 34 of file gbp_policy_node.c.

◆ gbp_policy_mac_node

vlib_node_registration_t gbp_policy_mac_node
Initial value:
= {
.name = "gbp-policy-mac",
.vector_size = sizeof (u32),
.format_trace = format_gbp_policy_trace,
.error_strings = gbp_policy_error_strings,
.n_next_nodes = GBP_POLICY_N_NEXT,
.next_nodes = {
[GBP_POLICY_NEXT_DROP] = "error-drop",
},
}
unsigned int u32
Definition: types.h:88
#define ARRAY_LEN(x)
Definition: clib.h:62
static char * gbp_policy_error_strings[]
static u8 * format_gbp_policy_trace(u8 *s, va_list *args)

(constructor) VLIB_REGISTER_NODE (gbp_policy_mac_node)

Definition at line 430 of file gbp_policy_node.c.

◆ gbp_policy_port_node

vlib_node_registration_t gbp_policy_port_node
Initial value:
= {
.name = "gbp-policy-port",
.vector_size = sizeof (u32),
.format_trace = format_gbp_policy_trace,
.error_strings = gbp_policy_error_strings,
.n_next_nodes = GBP_POLICY_N_NEXT,
.next_nodes = {
[GBP_POLICY_NEXT_DROP] = "error-drop",
},
}
unsigned int u32
Definition: types.h:88
#define ARRAY_LEN(x)
Definition: clib.h:62
static char * gbp_policy_error_strings[]
static u8 * format_gbp_policy_trace(u8 *s, va_list *args)

(constructor) VLIB_REGISTER_NODE (gbp_policy_port_node)

Definition at line 415 of file gbp_policy_node.c.