#include <vnet/interface.h>
#include <vnet/api_errno.h>
#include <vnet/ethernet/ethernet.h>
+#include <vnet/ethernet/ethernet_types_api.h>
#include <vnet/vnet_msg_enum.h>
if (mp->use_custom_mac)
{
- clib_memcpy (ap->hw_addr, mp->mac_address, 6);
+ mac_address_decode (mp->mac_address, (mac_address_t *) ap->hw_addr);
ap->hw_addr_set = 1;
}
- ap->mode = mp->mode;
- ap->lb = mp->lb;
+ ap->mode = ntohl (mp->mode);
+ ap->lb = ntohl (mp->lb);
ap->numa_only = mp->numa_only;
bond_create_if (vm, ap);
clib_memcpy (mp->interface_name, bond_if->interface_name,
MIN (ARRAY_LEN (mp->interface_name) - 1,
strlen ((const char *) bond_if->interface_name)));
- mp->mode = bond_if->mode;
- mp->lb = bond_if->lb;
+ mp->mode = htonl (bond_if->mode);
+ mp->lb = htonl (bond_if->lb);
mp->numa_only = bond_if->numa_only;
mp->active_slaves = htonl (bond_if->active_slaves);
mp->slaves = htonl (bond_if->slaves);
static clib_error_t *
bond_api_hookup (vlib_main_t * vm)
{
- api_main_t *am = &api_main;
+ api_main_t *am = vlibapi_get_main ();
#define _(N,n) \
vl_msg_api_set_handlers(VL_API_##N, #n, \