diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/vnet/fib/fib_api.c | 15 | ||||
-rw-r--r-- | src/vnet/fib/fib_api.h | 1 | ||||
-rw-r--r-- | src/vpp/api/types.c | 15 | ||||
-rw-r--r-- | src/vpp/api/types.h | 1 |
4 files changed, 16 insertions, 16 deletions
diff --git a/src/vnet/fib/fib_api.c b/src/vnet/fib/fib_api.c index 1b1c0d113c0..426161b0670 100644 --- a/src/vnet/fib/fib_api.c +++ b/src/vnet/fib/fib_api.c @@ -494,6 +494,21 @@ fib_api_route_add_del (u8 is_add, return (0); } +u8 * +format_vl_api_address_union (u8 * s, va_list * args) +{ + const vl_api_address_union_t *addr = + va_arg (*args, vl_api_address_union_t *); + vl_api_address_family_t af = va_arg (*args, int); + + if (ADDRESS_IP6 == af) + s = format (s, "%U", format_ip6_address, addr->ip6); + else + s = format (s, "%U", format_ip4_address, addr->ip4); + + return s; +} + u8* format_vl_api_fib_path (u8 * s, va_list * args) { diff --git a/src/vnet/fib/fib_api.h b/src/vnet/fib/fib_api.h index 0c59531b438..9eac62fe1c6 100644 --- a/src/vnet/fib/fib_api.h +++ b/src/vnet/fib/fib_api.h @@ -51,6 +51,7 @@ extern int fib_api_route_add_del (u8 is_add, fib_entry_flag_t entry_flags, fib_route_path_t *rpaths); +extern u8 *format_vl_api_address_union (u8 * s, va_list * args); extern u8* format_vl_api_fib_path(u8 * s, va_list * args); diff --git a/src/vpp/api/types.c b/src/vpp/api/types.c index 92bbdb30ac9..8e118109492 100644 --- a/src/vpp/api/types.c +++ b/src/vpp/api/types.c @@ -49,21 +49,6 @@ format_vl_api_address (u8 * s, va_list * args) } u8 * -format_vl_api_address_union (u8 * s, va_list * args) -{ - const vl_api_address_union_t *addr = - va_arg (*args, vl_api_address_union_t *); - vl_api_address_family_t af = va_arg (*args, int); - - if (ADDRESS_IP6 == af) - s = format (s, "%U", format_ip6_address, addr->ip6); - else - s = format (s, "%U", format_ip4_address, addr->ip4); - - return s; -} - -u8 * format_vl_api_ip4_address (u8 * s, va_list * args) { const vl_api_ip4_address_t *addr = va_arg (*args, vl_api_ip4_address_t *); diff --git a/src/vpp/api/types.h b/src/vpp/api/types.h index 9864e8c38a8..7a546dbdc0d 100644 --- a/src/vpp/api/types.h +++ b/src/vpp/api/types.h @@ -40,7 +40,6 @@ extern u8 *format_vl_api_address (u8 * s, va_list * args); extern u8 *format_vl_api_address_family (u8 * s, va_list * args); extern u8 *format_vl_api_ip4_address (u8 * s, va_list * args); extern u8 *format_vl_api_ip6_address (u8 * s, va_list * args); -extern u8 *format_vl_api_address_union (u8 * s, va_list * args); extern u8 *format_vl_api_prefix (u8 * s, va_list * args); extern u8 *format_vl_api_mprefix (u8 * s, va_list * args); extern u8 *format_vl_api_mac_address (u8 * s, va_list * args); |