_(DELETE_LOOPBACK, delete_loopback) \
_(INTERFACE_NAME_RENUMBER, interface_name_renumber) \
_(COLLECT_DETAILED_INTERFACE_STATS, collect_detailed_interface_stats) \
-_(SW_INTERFACE_SET_IP_DIRECTED_BROADCAST, \
- sw_interface_set_ip_directed_broadcast)
+_(SW_INTERFACE_SET_IP_DIRECTED_BROADCAST, \
+ sw_interface_set_ip_directed_broadcast) \
+_(SW_INTERFACE_ADDRESS_REPLACE_BEGIN, \
+ sw_interface_address_replace_begin) \
+_(SW_INTERFACE_ADDRESS_REPLACE_END, \
+ sw_interface_address_replace_end)
static void
vl_api_sw_interface_set_flags_t_handler (vl_api_sw_interface_set_flags_t * mp)
ethernet_interface_t *ei;
ei = pool_elt_at_index (em->interfaces, hi->hw_instance);
- ASSERT (sizeof (mp->l2_address) >= sizeof (ei->address));
- mac_address_encode ((mac_address_t *) ei->address, mp->l2_address);
+ ASSERT (sizeof (mp->l2_address) >= sizeof (ei->address.mac));
+ mac_address_encode (&ei->address.mac, mp->l2_address);
}
else if (swif->sup_sw_if_index != swif->sw_if_index)
{
if (mp->name_filter_valid)
{
- filter = vl_api_from_api_to_new_vec (&mp->name_filter);
+ filter = vl_api_from_api_to_new_vec (mp, &mp->name_filter);
vec_add1 (filter, 0); /* Ensure it's a C string for strcasecmp() */
}
char *strcasestr (char *, char *); /* lnx hdr file botch */
/* *INDENT-OFF* */
- pool_foreach (swif, im->sw_interfaces,
- ({
+ pool_foreach (swif, im->sw_interfaces)
+ {
if (!vnet_swif_is_api_visible (swif))
continue;
vec_reset_length(name);
continue;
send_sw_interface_details (am, rp, swif, name, mp->context);
- }));
+ }
/* *INDENT-ON* */
vec_free (name);
continue;
/* *INDENT-OFF* */
- pool_foreach(reg, vam->interface_events_registrations,
- ({
+ pool_foreach (reg, vam->interface_events_registrations)
+ {
vl_reg = vl_api_client_index_to_registration (reg->client_index);
if (vl_reg)
send_sw_interface_event (vam, reg, vl_reg, i, event_by_sw_if_index[i]);
- }));
+ }
/* *INDENT-ON* */
}
vec_reset_length (event_by_sw_if_index);
rmp->context = mp->context;
rmp->retval = htonl (rv);
if (!rv && eth_if)
- mac_address_encode ((mac_address_t *) eth_if->address, rmp->mac_address);
+ mac_address_encode (ð_if->address.mac, rmp->mac_address);
vl_api_send_msg (reg, (u8 *) rmp);
}
vnet_sw_interface_t *si;
clib_error_t *error;
int rv = 0;
+ vnet_hw_if_rx_mode rx_mode;
VALIDATE_SW_IF_INDEX (mp);
goto bad_sw_if_index;
}
+ rx_mode = (vnet_hw_if_rx_mode) ntohl (mp->mode);
error = set_hw_interface_change_rx_mode (vnm, si->hw_if_index,
mp->queue_id_valid,
ntohl (mp->queue_id),
- (vnet_hw_interface_rx_mode)
- mp->mode);
+ (vnet_hw_if_rx_mode) rx_mode);
if (error)
{
mp->sw_if_index = htonl (sw_if_index);
mp->queue_id = htonl (queue_id);
mp->worker_id = htonl (worker_id);
- mp->mode = mode;
+ mp->mode = htonl (mode);
mp->context = context;
vl_api_send_msg (rp, (u8 *) mp);
REPLY_MACRO (VL_API_COLLECT_DETAILED_INTERFACE_STATS_REPLY);
}
+static void
+ vl_api_sw_interface_address_replace_begin_t_handler
+ (vl_api_sw_interface_address_replace_begin_t * mp)
+{
+ vl_api_sw_interface_address_replace_begin_reply_t *rmp;
+ int rv = 0;
+
+ ip_interface_address_mark ();
+
+ REPLY_MACRO (VL_API_SW_INTERFACE_ADDRESS_REPLACE_BEGIN_REPLY);
+}
+
+static void
+ vl_api_sw_interface_address_replace_end_t_handler
+ (vl_api_sw_interface_address_replace_end_t * mp)
+{
+ vl_api_sw_interface_address_replace_end_reply_t *rmp;
+ int rv = 0;
+
+ ip_interface_address_sweep ();
+
+ REPLY_MACRO (VL_API_SW_INTERFACE_ADDRESS_REPLACE_END_REPLY);
+}
+
/*
* vpe_api_hookup
* Add vpe's API message handlers to the table.