Punt socket: Fix coverity error for pathname length mismatch between API and sun_path.
[vpp.git] / src / vpp / api / vpe.api
index d3c7e98..eda95ce 100644 (file)
@@ -26,6 +26,7 @@
  * IP APIs: see .../src/vnet/ip/{ip.api, ip_api.c}
  * TAP APIs: see .../src/vnet/unix/{tap.api, tap_api.c}
  * VXLAN APIs: see .../src/vnet/vxlan/{vxlan.api, vxlan_api.c}
+ * LLDP APIs: see .../src/vnet/lldp/{lldp.api, lldp_api.c}
  * AF-PACKET APIs: see ... /vnet/devices/af_packet/{af_packet.api, af_packet_api.c}
  * NETMAP APIs: see ... /src/vnet/devices/netmap/{netmap.api, netmap_api.c}
  * VHOST-USER APIs: see .../vnet/devices/virtio/{vhost_user.api, vhost_user_api.c}
@@ -709,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
@@ -719,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;
@@ -745,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
@@ -755,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];
@@ -994,6 +991,39 @@ autoreply define punt {
     u16 l4_port;
 };
 
+/** \brief Punt traffic to the host via socket
+    @param client_index - opaque cookie to identify the sender
+    @param context - sender context, to match reply w/ request
+    @param header_version - expected meta data header version (currently 1)
+    @param is_ip4 - L3 protocol 1 - IPv4, 0 - IPv6
+    @param l4_protocol - L4 protocol to be punted, only UDP (0x11) is supported
+    @param l4_port - TCP/UDP port to be punted
+*/
+define punt_socket_register {
+    u32 client_index;
+    u32 context;
+    u32 header_version;
+    u8 is_ip4;
+    u8 l4_protocol;
+    u16 l4_port;
+    u8 pathname[108]; /* Linux sun_path defined to be 108 bytes, see unix(7) */
+};
+
+define punt_socket_register_reply
+{
+  u32 context;
+  i32 retval;
+  u8 pathname[64];
+};
+
+autoreply define punt_socket_deregister {
+    u32 client_index;
+    u32 context;
+    u8 is_ip4;
+    u8 l4_protocol;
+    u16 l4_port;
+};
+
 /** \brief Feature path enable/disable request
     @param client_index - opaque cookie to identify the sender
     @param context - sender context, to match reply w/ request