diff options
Diffstat (limited to 'src/vnet')
-rw-r--r-- | src/vnet/ethernet/ethernet_types.api | 4 | ||||
-rw-r--r-- | src/vnet/ethernet/ethernet_types_api.c | 8 | ||||
-rw-r--r-- | src/vnet/ethernet/ethernet_types_api.h | 11 | ||||
-rw-r--r-- | src/vnet/l2/l2.api | 2 | ||||
-rw-r--r-- | src/vnet/l2/l2_api.c | 2 |
5 files changed, 9 insertions, 18 deletions
diff --git a/src/vnet/ethernet/ethernet_types.api b/src/vnet/ethernet/ethernet_types.api index c33a02c377a..f945f20910f 100644 --- a/src/vnet/ethernet/ethernet_types.api +++ b/src/vnet/ethernet/ethernet_types.api @@ -14,6 +14,4 @@ * limitations under the License. */ -typedef mac_address { - u8 bytes[6]; -}; +typedef u8 mac_address[6]; diff --git a/src/vnet/ethernet/ethernet_types_api.c b/src/vnet/ethernet/ethernet_types_api.c index 4b84d386e4e..90b630d46be 100644 --- a/src/vnet/ethernet/ethernet_types_api.c +++ b/src/vnet/ethernet/ethernet_types_api.c @@ -30,15 +30,15 @@ #undef vl_printfun void -mac_address_decode (const vl_api_mac_address_t * in, mac_address_t * out) +mac_address_decode (const u8 * in, mac_address_t * out) { - mac_address_from_bytes (out, in->bytes); + mac_address_from_bytes (out, in); } void -mac_address_encode (const mac_address_t * in, vl_api_mac_address_t * out) +mac_address_encode (const mac_address_t * in, u8 * out) { - clib_memcpy_fast (out->bytes, in->bytes, 6); + clib_memcpy_fast (out, in->bytes, 6); } /* diff --git a/src/vnet/ethernet/ethernet_types_api.h b/src/vnet/ethernet/ethernet_types_api.h index b65d9d46c86..e2c638d1fec 100644 --- a/src/vnet/ethernet/ethernet_types_api.h +++ b/src/vnet/ethernet/ethernet_types_api.h @@ -22,15 +22,8 @@ #include <vnet/ethernet/mac_address.h> -/** - * Forward declarations so we need not #include the API definitions here - */ -struct _vl_api_mac_address; - -extern void mac_address_decode (const struct _vl_api_mac_address *in, - mac_address_t * out); -extern void mac_address_encode (const mac_address_t * in, - struct _vl_api_mac_address *out); +extern void mac_address_decode (const u8 * in, mac_address_t * out); +extern void mac_address_encode (const mac_address_t * in, u8 * out); #endif diff --git a/src/vnet/l2/l2.api b/src/vnet/l2/l2.api index 7c71ea6e151..ea24a71feb5 100644 --- a/src/vnet/l2/l2.api +++ b/src/vnet/l2/l2.api @@ -499,7 +499,7 @@ define bd_ip_mac_details u32 bd_id; u8 is_ipv6; u8 ip_address[16]; - u8 mac_address[6]; + vl_api_mac_address_t mac_address; }; /** \brief Dump bridge domain IP to MAC entries diff --git a/src/vnet/l2/l2_api.c b/src/vnet/l2/l2_api.c index 2fa238eadb3..9e3a47f772b 100644 --- a/src/vnet/l2/l2_api.c +++ b/src/vnet/l2/l2_api.c @@ -883,7 +883,7 @@ vl_api_bd_ip_mac_add_del_t_handler (vl_api_bd_ip_mac_add_del_t * mp) bd_index = p[0]; type = ip_address_decode (&mp->ip, &ip_addr); - mac_address_decode (&mp->mac, &mac); + mac_address_decode (mp->mac, &mac); if (bd_add_del_ip_mac (bd_index, type, &ip_addr, &mac, mp->is_add)) rv = VNET_API_ERROR_UNSPECIFIED; |