32 u8 *
a = va_arg (*args,
u8 *);
33 return format (s,
"%d.%d.%d.%d", a[0], a[1], a[2], a[3]);
40 u32 i, i_max_n_zero, max_n_zeros, i_first_zero, n_zeros, last_double_colon;
44 i_first_zero = i_max_n_zero;
49 if (is_zero && i_first_zero >= ARRAY_LEN (a->
as_u16))
55 if ((!is_zero && n_zeros > max_n_zeros)
58 i_max_n_zero = i_first_zero;
59 max_n_zeros = n_zeros;
65 last_double_colon = 0;
68 if (i == i_max_n_zero && max_n_zeros > 1)
72 last_double_colon = 1;
77 (last_double_colon || i == 0) ?
"" :
":",
78 clib_net_to_host_u16 (a->
as_u16[i]));
79 last_double_colon = 0;
90 ip46_address_t *ip46 = va_arg (*args, ip46_address_t *);
116 u64 *
a = va_arg (*args,
u64 *);
117 if (
unformat (input,
"%lluGb", &_a))
119 else if (
unformat (input,
"%lluMb", &_a))
121 else if (
unformat (input,
"%lluKb", &_a))
123 else if (
unformat (input,
"%llu", a))
134 i32 error = va_arg (*args,
u32);
140 s =
format (s,
"%s", p[0]);
142 s =
format (s,
"%d", error);
152 #define _(n,v,s) hash_set (ecm->error_string_by_error_number, -v, s); u8 * format_ip46_address(u8 *s, va_list *args)
#define hash_set(h, key, value)
u8 * format_ip4_address(u8 *s, va_list *args)
static void init_error_string_table()
u8 * format_ip6_address(u8 *s, va_list *args)
vl_api_fib_path_type_t type
#define ip46_address_is_ip4(ip46)
static u8 * format_api_error(u8 *s, va_list *args)
#define foreach_vnet_api_error
static uword unformat_data(unformat_input_t *input, va_list *args)
#define hash_create(elts, value_bytes)
echo_common_main_t echo_common_main
uword * error_string_by_error_number