|
FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
|
Go to the documentation of this file.
25 #define VAT_TAB_WIDTH 2
37 u8 *
a = va_arg (*args,
u8 *);
38 return format (s,
"%d.%d.%d.%d",
a[0],
a[1],
a[2],
a[3]);
45 ip6_address_t *
a = va_arg (*args, ip6_address_t *);
46 u32 i, i_max_n_zero, max_n_zeros, i_first_zero, n_zeros, last_double_colon;
50 i_first_zero = i_max_n_zero;
54 u32 is_zero =
a->as_u16[
i] == 0;
55 if (is_zero && i_first_zero >=
ARRAY_LEN (
a->as_u16))
61 if ((!is_zero && n_zeros > max_n_zeros)
62 || (
i + 1 >=
ARRAY_LEN (
a->as_u16) && n_zeros > max_n_zeros))
64 i_max_n_zero = i_first_zero;
65 max_n_zeros = n_zeros;
71 last_double_colon = 0;
74 if (
i == i_max_n_zero && max_n_zeros > 1)
78 last_double_colon = 1;
83 (last_double_colon ||
i == 0) ?
"" :
":",
84 clib_net_to_host_u16 (
a->as_u16[
i]));
85 last_double_colon = 0;
130 #define P(fmt,...) fformat(ctx->ofp, fmt, ##__VA_ARGS__)
131 #define PL(fmt,...) fformat(ctx->ofp, fmt"\n", ##__VA_ARGS__)
132 #define PPL(fmt,...) vat_json_indent_line(ctx, fmt"\n", ##__VA_ARGS__)
133 #define PP(fmt,...) vat_json_indent_line(ctx, fmt, ##__VA_ARGS__)
134 #define INCR (ctx->indent++)
135 #define DECR (ctx->indent--)
157 pair = &
node->pairs[
i];
158 PP (
"\"%s\": ", pair->
name);
186 elem = &
node->array[
i];
218 P (
"%d",
node->sint);
221 P (
"%" PRIu64,
node->uint);
224 P (
"%f",
node->real);
227 P (
"\"%s\"",
node->string);
272 if (NULL !=
node->pairs)
282 if (NULL !=
node->array)
288 if (NULL !=
node->string)
vlib_main_t vlib_node_runtime_t * node
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
#define vec_free(V)
Free vector's memory (no header).
description fragment has unexpected format
#define vec_foreach(var, vec)
Vector iterator.
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)