|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
50 #define _(f) case SRP_MODE_##f: t = #f; break;
53 default: t = 0;
break;
66 u32 max_header_bytes = va_arg (*args,
u32);
68 u32 indent, header_bytes;
70 header_bytes =
sizeof (
h[0]);
71 if (max_header_bytes != 0 && header_bytes > max_header_bytes)
72 return format (s,
"srp header truncated");
76 s =
format (s,
"mode %U, ring %s, priority %d, ttl %d",
78 h->srp.is_inner_ring ?
"inner" :
"outer",
79 h->srp.priority,
h->srp.ttl);
81 s =
format (s,
"\n%U%U: %U -> %U",
87 if (max_header_bytes != 0 && header_bytes < max_header_bytes)
97 node->format_buffer, (
void *)
h + header_bytes,
98 max_header_bytes - header_bytes);
113 u8 ** result = va_arg (*args,
u8 **);
122 if (!
unformat (input,
"%U: %U -> %U",
128 h->srp.mode = SRP_MODE_data;
134 h->srp.mode = SRP_MODE_control_pass_to_host;
136 else if (
unformat (input,
"pri %d", &x))
139 else if (
unformat (input,
"ttl %d", &x))
vlib_main_t vlib_node_runtime_t * node
vl_api_tunnel_mode_t mode
#define vec_add2(V, P, N)
Add N elements to end of vector V, return pointer to new elements in P.
static vlib_node_t * vlib_get_node(vlib_main_t *vm, u32 i)
Get vlib node by index.
ethernet_main_t ethernet_main
static ethernet_type_info_t * ethernet_get_type_info(ethernet_main_t *em, ethernet_type_t type)