API:fix arp/ND event messages - remove context 99/7499/3
authorEyal Bari <ebari@cisco.com>
Mon, 10 Jul 2017 07:12:13 +0000 (10:12 +0300)
committerJohn Lo <loj@cisco.com>
Mon, 10 Jul 2017 19:39:21 +0000 (19:39 +0000)
context causes the message to be treated as a reply by the python API

Change-Id: Icf4d051a69f5a2cb9be5879accfe030ebcd650a8
Signed-off-by: Eyal Bari <ebari@cisco.com>
src/vpp/api/api.c
src/vpp/api/vpe.api

index c1dcfb0..de9a247 100644 (file)
@@ -1520,9 +1520,9 @@ vl_api_want_ip4_arp_events_t_handler (vl_api_want_ip4_arp_events_t * mp)
        }
       memset (event, 0, sizeof (*event));
 
+      /* Python API expects events to have no context */
       event->_vl_msg_id = ntohs (VL_API_IP4_ARP_EVENT);
       event->client_index = mp->client_index;
-      event->context = mp->context;
       event->address = mp->address;
       event->pid = mp->pid;
       if (mp->address == 0)
@@ -1568,7 +1568,6 @@ vl_api_want_ip6_nd_events_t_handler (vl_api_want_ip6_nd_events_t * mp)
 
       event->_vl_msg_id = ntohs (VL_API_IP6_ND_EVENT);
       event->client_index = mp->client_index;
-      event->context = mp->context;
       clib_memcpy (event->address, mp->address, 16);
       event->pid = mp->pid;
       if (ip6_address_is_zero ((ip6_address_t *) mp->address))
index 2a763d1..ec5ffbe 100644 (file)
@@ -710,7 +710,6 @@ autoreply define want_ip4_arp_events
 
 /** \brief Tell client about an ip4 arp resolution event
     @param client_index - opaque cookie to identify the sender
-    @param context - sender context, to match reply w/ request
     @param address - the exact ip4 address of interest
     @param pid - client pid registered to receive notification
     @param sw_if_index - interface which received ARP packet
@@ -720,7 +719,6 @@ autoreply define want_ip4_arp_events
 define ip4_arp_event
 {
   u32 client_index;
-  u32 context;
   u32 address;
   u32 pid;
   u32 sw_if_index;
@@ -746,7 +744,6 @@ autoreply define want_ip6_nd_events
 
 /** \brief Tell client about an ip6 nd resolution or mac/ip event
     @param client_index - opaque cookie to identify the sender
-    @param context - sender context, to match reply w/ request
     @param pid - client pid registered to receive notification
     @param sw_if_index - interface which received ARP packet
     @param address - the exact ip6 address of interest
@@ -756,7 +753,6 @@ autoreply define want_ip6_nd_events
 define ip6_nd_event
 {
   u32 client_index;
-  u32 context;
   u32 pid;
   u32 sw_if_index;
   u8 address[16];