hs-test: more debug output in http3 test
[vpp.git] / src / vnet / ip-neighbor / ip_neighbor.api
index 473024a..24cddd4 100644 (file)
@@ -20,7 +20,7 @@
     called through a shared memory interface. 
 */
 
-option version = "1.0.0";
+option version = "1.0.1";
 
 import "vnet/ip/ip_types.api";
 import "vnet/ethernet/ethernet_types.api";
@@ -126,6 +126,40 @@ autoreply define ip_neighbor_config
   bool recycle;
 };
 
+/** \brief Get neighbor database configuration per AF
+    @param client_index - opaque cookie to identify the sender
+    @param context - sender context, to match reply w/ request
+    @param af - Address family (v4/v6)
+*/
+define ip_neighbor_config_get
+{
+  option in_progress;
+  u32 client_index;
+  u32 context;
+  vl_api_address_family_t af;
+};
+
+/** \brief Neighbor database configuration reply
+    @param context - sender context, to match reply w/ request
+    @param retval - error (0 is "no error")
+    @param af - Address family (v4/v6)
+    @param max_number - The maximum number of neighbours that will be created
+    @param max_age - The maximum age (in seconds) before an inactive neighbour
+                     is flushed
+    @param recycle - If max_number of neighbours is reached and new ones need
+                      to be created, should the oldest neighbour be 'recycled'
+*/
+define ip_neighbor_config_get_reply
+{
+  option in_progress;
+  u32 context;
+  i32 retval;
+  vl_api_address_family_t af;
+  u32 max_number;
+  u32 max_age;
+  bool recycle;
+};
+
 /** \brief IP neighbour replace begin
 
     The use-case is that, for some unspecified reason, the control plane
@@ -163,8 +197,23 @@ autoreply define ip_neighbor_replace_end
   u32 context;
 };
 
-/** \brief Register for IP4 ARP resolution event on receiving ARP reply or
-           MAC/IP info from ARP requests in L2 BDs
+/** \brief IP neighbor flush request - removes *all* neighbours.
+     dynamic and static from API/CLI and dynamic from data-plane.
+
+    @param client_index - opaque cookie to identify the sender
+    @param context - sender context, to match reply w/ request
+    @param af - Flush neighbours of this address family
+    @param sw_if_index - Flush on this interface (~0 => all interfaces)
+*/
+autoreply define ip_neighbor_flush
+{
+  u32 client_index;
+  u32 context;
+  vl_api_address_family_t af;
+  vl_api_interface_index_t sw_if_index [default=0xffffffff];
+};
+
+/** \brief Register for IP neighbour events creation
     @param client_index - opaque cookie to identify the sender
     @param context - sender context, to match reply w/ request
     @param enable - 1 => register for events, 0 => cancel registration
@@ -174,6 +223,7 @@ autoreply define ip_neighbor_replace_end
 */
 autoreply define want_ip_neighbor_events
 {
+  option deprecated;
   u32 client_index;
   u32 context;
   bool enable;
@@ -190,6 +240,7 @@ autoreply define want_ip_neighbor_events
 */
 define ip_neighbor_event
 {
+  option deprecated;
   u32 client_index;
   u32 pid;
   vl_api_ip_neighbor_t neighbor;
@@ -200,6 +251,132 @@ service {
     events ip_neighbor_event;
 };
 
+
+/** \brief Register for IP neighbour events (creation or deletion)
+    @param client_index - opaque cookie to identify the sender
+    @param context - sender context, to match reply w/ request
+    @param enable - 1 => register for events, 0 => cancel registration
+    @param pid - sender's pid
+    @param ip - exact IP address of interested neighbor resolution event
+    @param sw_if_index - interface on which the IP address is present.
+*/
+autoreply define want_ip_neighbor_events_v2
+{
+  u32 client_index;
+  u32 context;
+  bool enable;
+  u32 pid;
+  vl_api_address_t ip;
+  vl_api_interface_index_t sw_if_index [default=0xffffffff];
+};
+
+enum ip_neighbor_event_flags
+{
+ /* The neighbor has been added/learned */
+ IP_NEIGHBOR_API_EVENT_FLAG_ADDED = 0x1,
+ /* The neighbor has been removed/expired */
+ IP_NEIGHBOR_API_EVENT_FLAG_REMOVED = 0x2,
+};
+
+/** \brief Tell client about an IP4 ARP resolution event or
+           MAC/IP info from ARP requests in L2 BDs
+    @param client_index - opaque cookie to identify the sender
+    @param pid - client pid registered to receive notification
+    @param flags - Flags
+    @param neighbor -  neighbor
+*/
+define ip_neighbor_event_v2
+{
+  u32 client_index;
+  u32 pid;
+  vl_api_ip_neighbor_event_flags_t flags;
+  vl_api_ip_neighbor_t neighbor;
+};
+
+service {
+  rpc want_ip_neighbor_events_v2 returns want_ip_neighbor_events_v2_reply
+    events ip_neighbor_event_v2;
+};
+
+counters ip4_neighbor {
+  throttled {
+    severity info;
+    type counter64;
+    units "packets";
+    description "ARP requests throttled";
+  };
+  resolved {
+    severity info;
+    type counter64;
+    units "packets";
+    description "ARP requests resolved";
+  };
+  no_buffers {
+    severity error;
+    type counter64;
+    units "packets";
+    description "ARP requests out of buffer";
+  };
+  request_sent {
+    severity info;
+    type counter64;
+    units "packets";
+    description "ARP requests sent";
+  };
+  non_arp_adj {
+    severity error;
+    type counter64;
+    units "packets";
+    description "ARPs to non-ARP adjacencies";
+  };
+  no_source_address {
+    severity error;
+    type counter64;
+    units "packets";
+    description "no source address for ARP request";
+  };
+};
+
+counters ip6_neighbor {
+  throttled {
+    severity info;
+    type counter64;
+    units "packets";
+    description "throttled";
+  };
+  drop {
+    severity error;
+    type counter64;
+    units "packets";
+    description "address overflow drops";
+  };
+  request_sent {
+    severity info;
+    type counter64;
+    units "packets";
+    description "neighbor solicitations sent";
+  };
+  no_source_address {
+    severity error;
+    type counter64;
+    units "packets";
+    description "no source address for ND solicitation";
+  };
+  no_buffers {
+    severity error;
+    type counter64;
+    units "packets";
+    description "no buffers";
+  };
+};
+
+paths {
+  "/err/ip4-arp" "ip4_neighbor";
+  "/err/ip4-glean" "ip4_neighbor";
+  "/err/ip6-arp" "ip6_neighbor";
+  "/err/ip6-glean" "ip6_neighbor";
+};
+
 /*
  * Local Variables:
  * eval: (c-set-style "gnu")