From 571ab20d1da227fb66d52ed52cce0cbd4591e1c9 Mon Sep 17 00:00:00 2001 From: Neale Ranns Date: Wed, 22 Aug 2018 04:27:15 -0700 Subject: Consolidate the [un]format_mac_address implementations Change-Id: Ic4c42c5610a827234e6582501f0ddcba47aa34ee Signed-off-by: Neale Ranns --- src/vnet/lisp-cp/lisp_types.c | 16 ---------------- src/vnet/lisp-cp/lisp_types.h | 2 -- 2 files changed, 18 deletions(-) (limited to 'src/vnet/lisp-cp') diff --git a/src/vnet/lisp-cp/lisp_types.c b/src/vnet/lisp-cp/lisp_types.c index 05f046fa541..d118717ae10 100644 --- a/src/vnet/lisp-cp/lisp_types.c +++ b/src/vnet/lisp-cp/lisp_types.c @@ -203,22 +203,6 @@ unformat_ip_prefix (unformat_input_t * input, va_list * args) return 1; } -uword -unformat_mac_address (unformat_input_t * input, va_list * args) -{ - u8 *a = va_arg (*args, u8 *); - return unformat (input, "%x:%x:%x:%x:%x:%x", &a[0], &a[1], &a[2], &a[3], - &a[4], &a[5]); -} - -u8 * -format_mac_address (u8 * s, va_list * args) -{ - u8 *a = va_arg (*args, u8 *); - return format (s, "%02x:%02x:%02x:%02x:%02x:%02x", - a[0], a[1], a[2], a[3], a[4], a[5]); -} - uword unformat_nsh_address (unformat_input_t * input, va_list * args) { diff --git a/src/vnet/lisp-cp/lisp_types.h b/src/vnet/lisp-cp/lisp_types.h index 4a919e7988e..ff7880bff12 100644 --- a/src/vnet/lisp-cp/lisp_types.h +++ b/src/vnet/lisp-cp/lisp_types.h @@ -220,8 +220,6 @@ u8 *format_ip_address (u8 * s, va_list * args); uword unformat_ip_address (unformat_input_t * input, va_list * args); u8 *format_ip_prefix (u8 * s, va_list * args); uword unformat_ip_prefix (unformat_input_t * input, va_list * args); -u8 *format_mac_address (u8 * s, va_list * args); -uword unformat_mac_address (unformat_input_t * input, va_list * args); u16 ip4_address_size_to_put (); u16 ip6_address_size_to_put (); -- cgit 1.2.3-korg