|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
55 #define _(n,f) case n: t = #f; break;
62 return format (s,
"%s", t);
76 case IEEE_OUI_ethernet:
93 u32 max_header_bytes = va_arg (*args,
u32);
94 u32 indent, header_bytes;
96 header_bytes =
sizeof (
h[0]);
97 if (max_header_bytes != 0 && header_bytes > max_header_bytes)
98 return format (s,
"snap header truncated");
104 if (max_header_bytes != 0 && header_bytes > max_header_bytes && pi != 0)
107 if (
node->format_buffer)
110 node->format_buffer, (
void *) (
h + 1),
111 max_header_bytes - header_bytes);
136 if (p.
oui >= (1 << 24))
160 u8 **result = va_arg (*args,
u8 **);
static u32 snap_header_get_oui(snap_header_t *h)
u8 * format_snap_protocol(u8 *s, va_list *args)
#define clib_memcpy(d, s, n)
vlib_main_t vlib_node_runtime_t * node
#define vlib_call_init_function(vm, x)
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
#define hash_create_string(elts, value_bytes)
u8 * format_snap_header(u8 *s, va_list *args)
static clib_error_t * snap_init(vlib_main_t *vm)
__clib_export void mhash_init(mhash_t *h, uword n_value_bytes, uword n_key_bytes)
#define vec_add2(V, P, N)
Add N elements to end of vector V, return pointer to new elements in P.
snap_oui_and_protocol_t oui_and_protocol
#define vec_elt_at_index(v, i)
Get vector value at index i checking that i is in bounds.
uword unformat_snap_protocol(unformat_input_t *input, va_list *args)
uword * protocol_info_by_name
static vlib_node_t * vlib_get_node(vlib_main_t *vm, u32 i)
Get vlib node by index.
sll srl srl sll sra u16x4 i
u8 * format_ethernet_type(u8 *s, va_list *args)
@ foreach_snap_cisco_protocol
static void snap_header_set_protocol(snap_header_t *h, snap_oui_and_protocol_t *p)
description fragment has unexpected format
static u8 * format_cisco_snap_protocol(u8 *s, va_list *args)
#define VLIB_INIT_FUNCTION(x)
vl_api_ip_proto_t protocol
u8 * format_snap_header_with_length(u8 *s, va_list *args)
static clib_error_t * snap_input_init(vlib_main_t *vm)
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
clib_error_t *() vlib_init_function_t(struct vlib_main_t *vm)
static snap_protocol_info_t * snap_get_protocol_info(snap_main_t *sm, snap_header_t *h)
snap_protocol_info_t * protocols
uword unformat_snap_header(unformat_input_t *input, va_list *args)