summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/vnet/interface.api6
-rw-r--r--src/vnet/interface_api.c5
2 files changed, 8 insertions, 3 deletions
diff --git a/src/vnet/interface.api b/src/vnet/interface.api
index a18907065a5..7a3743dda6c 100644
--- a/src/vnet/interface.api
+++ b/src/vnet/interface.api
@@ -29,7 +29,8 @@ autoreply define sw_interface_set_mtu
};
/** \brief Interface Event generated by want_interface_events
- @param context - sender context, to match reply w/ request
+ @param client_index - opaque cookie to identify the sender
+ @param pid - client pid registered to receive notification
@param sw_if_index - index of the interface of the event
@param admin_up_down - The administrative state; 1 = up, 0 = down
@param link_up_down - The operational state; 1 = up, 0 = down
@@ -37,7 +38,8 @@ autoreply define sw_interface_set_mtu
*/
define sw_interface_event
{
- u32 context;
+ u32 client_index;
+ u32 pid;
u32 sw_if_index;
u8 admin_up_down;
u8 link_up_down;
diff --git a/src/vnet/interface_api.c b/src/vnet/interface_api.c
index c56fef688e7..9949f83660b 100644
--- a/src/vnet/interface_api.c
+++ b/src/vnet/interface_api.c
@@ -572,6 +572,7 @@ event_data_cmp (void *a1, void *a2)
static void
send_sw_interface_event (vpe_api_main_t * am,
+ vpe_client_registration_t * reg,
unix_shared_memory_queue_t * q,
vnet_sw_interface_t * swif)
{
@@ -584,6 +585,8 @@ send_sw_interface_event (vpe_api_main_t * am,
memset (mp, 0, sizeof (*mp));
mp->_vl_msg_id = ntohs (VL_API_SW_INTERFACE_EVENT);
mp->sw_if_index = ntohl (swif->sw_if_index);
+ mp->client_index = reg->client_index;
+ mp->pid = reg->client_pid;
mp->admin_up_down = (swif->flags & VNET_SW_INTERFACE_FLAG_ADMIN_UP) ? 1 : 0;
mp->link_up_down = (hi->flags & VNET_HW_INTERFACE_FLAG_LINK_UP) ? 1 : 0;
@@ -638,7 +641,7 @@ link_state_process (vlib_main_t * vm,
event_data[i]))
{
swif = vnet_get_sw_interface (vnm, event_data[i]);
- send_sw_interface_event (vam, q, swif);
+ send_sw_interface_event (vam, reg, q, swif);
}
}
}));