50 #define _(f) case SRP_MODE_##f: t = #f; break; 53 default: t = 0;
break;
58 s =
format (s,
"unknown 0x%x", mode);
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",
81 s =
format (s,
"\n%U%U: %U -> %U",
87 if (max_header_bytes != 0 && header_bytes < max_header_bytes)
98 max_header_bytes - header_bytes);
113 u8 ** result = va_arg (*args,
u8 **);
118 vec_add2 (*result, p,
sizeof (h[0]));
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))
#define vec_add2(V, P, N)
Add N elements to end of vector V, return pointer to new elements in P.
ethernet_header_t ethernet
ethernet_main_t ethernet_main
static ethernet_type_info_t * ethernet_get_type_info(ethernet_main_t *em, ethernet_type_t type)
format_function_t * format_buffer
vl_api_vxlan_gbp_api_tunnel_mode_t mode
static vlib_node_t * vlib_get_node(vlib_main_t *vm, u32 i)
Get vlib node by index.