summaryrefslogtreecommitdiffstats
path: root/src/vnet/interface_api.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/interface_api.c')
-rw-r--r--src/vnet/interface_api.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/src/vnet/interface_api.c b/src/vnet/interface_api.c
index e2f4d8fd130..1d167c680fe 100644
--- a/src/vnet/interface_api.c
+++ b/src/vnet/interface_api.c
@@ -70,7 +70,9 @@ _(CREATE_LOOPBACK, create_loopback) \
_(CREATE_LOOPBACK_INSTANCE, create_loopback_instance) \
_(DELETE_LOOPBACK, delete_loopback) \
_(INTERFACE_NAME_RENUMBER, interface_name_renumber) \
-_(COLLECT_DETAILED_INTERFACE_STATS, collect_detailed_interface_stats)
+_(COLLECT_DETAILED_INTERFACE_STATS, collect_detailed_interface_stats) \
+_(SW_INTERFACE_SET_IP_DIRECTED_BROADCAST, \
+ sw_interface_set_ip_directed_broadcast)
static void
vl_api_sw_interface_set_flags_t_handler (vl_api_sw_interface_set_flags_t * mp)
@@ -164,6 +166,23 @@ vl_api_sw_interface_set_mtu_t_handler (vl_api_sw_interface_set_mtu_t * mp)
}
static void
+ vl_api_sw_interface_set_ip_directed_broadcast_t_handler
+ (vl_api_sw_interface_set_ip_directed_broadcast_t * mp)
+{
+ vl_api_sw_interface_set_ip_directed_broadcast_reply_t *rmp;
+ u32 sw_if_index = ntohl (mp->sw_if_index);
+ int rv = 0;
+
+ VALIDATE_SW_IF_INDEX (mp);
+
+ vnet_sw_interface_ip_directed_broadcast (vnet_get_main (),
+ sw_if_index, mp->enable);
+
+ BAD_SW_IF_INDEX_LABEL;
+ REPLY_MACRO (VL_API_SW_INTERFACE_SET_IP_DIRECTED_BROADCAST_REPLY);
+}
+
+static void
send_sw_interface_details (vpe_api_main_t * am,
vl_api_registration_t * rp,
vnet_sw_interface_t * swif,