api: missing support for dumping of neighbours (VPP-333)
[vpp.git] / vpp / vpp-api / vpe.api
index 2da9421..cc444ba 100644 (file)
@@ -1,4 +1,3 @@
-/* Hey Emacs use -*- mode: C -*- */
 /*
  * Copyright (c) 2015-2016 Cisco and/or its affiliates.
  * Licensed under the Apache License, Version 2.0 (the "License");
     called through a shared memory interface. 
 */
 
-
-/** \brief Register for interface events
-    @param client_index - opaque cookie to identify the sender
-    @param context - sender context, to match reply w/ request
-    @param enable_disable - 1 => register for events, 0 => cancel registration
-    @param pid - sender's pid
-*/
-define want_interface_events
-{
-  u32 client_index;
-  u32 context;
-  u32 enable_disable;
-  u32 pid;
-};
-
-/** \brief Reply for interface events registration
-    @param context - returned sender context, to match reply w/ request
-    @param retval - return code
-*/
-define want_interface_events_reply
-{
-  u32 context;
-  i32 retval;
-};
-
-/** \brief Interface details structure (fix this) 
-    @param sw_if_index - index of the interface
-    @param sup_sw_if_index - index of parent interface if any, else same as sw_if_index  
-    @param l2_address_length - length of the interface's l2 address
-    @param pid - the interface's l2 address
-    @param interface_name - name of the interface
-    @param link_duplex - 1 if half duplex, 2 if full duplex
-    @param link_speed - 1 = 10M, 2 = 100M, 4 = 1G, 8 = 10G, 16 = 40G, 32 = 100G
-    @param link_MTU - max. transmittion unit 
-    @param sub_if_id - A number 0-N to uniquely identify this subif on super if
-    @param sub_dot1ad -  0 = dot1q, 1=dot1ad
-    @param sub_number_of_tags - Number of tags (0 - 2)
-    @param sub_outer_vlan_id
-    @param sub_inner_vlan_id
-    @param sub_exact_match
-    @param sub_default
-    @param sub_outer_vlan_id_any
-    @param sub_inner_vlan_id_any
-    @param vtr_op - vlan tag rewrite operation
-    @param vtr_push_dot1q
-    @param vtr_tag1
-    @param vtr_tag2
-*/
-define sw_interface_details
-{
-  u32 context;
-  u32 sw_if_index;
-
-  /* index of sup interface (e.g. hw interface).
-     equal to sw_if_index for super hw interface. */
-  u32 sup_sw_if_index;
-
-  /* Layer 2 address, if applicable */
-  u32 l2_address_length;
-  u8 l2_address[8];
-
-  /* Interface name */
-  u8 interface_name[64];
-
-  /* 1 = up, 0 = down */
-  u8 admin_up_down;
-  u8 link_up_down;
-
-  /* 1 = half duplex, 2 = full duplex */
-  u8 link_duplex;
-
-  /* 1 = 10M, 2 = 100M, 4 = 1G, 8 = 10G, 16 = 40G, 32 = 100G */
-  u8 link_speed;
-
-  /* MTU */
-  u16 link_mtu;
-
-  /* Subinterface ID. A number 0-N to uniquely identify this subinterface under the super interface */
-  u32 sub_id;
-
-  /* 0 = dot1q, 1=dot1ad */
-  u8 sub_dot1ad;
-
-  /* Number of tags 0-2 */
-  u8 sub_number_of_tags;
-  u16 sub_outer_vlan_id;
-  u16 sub_inner_vlan_id;
-  u8 sub_exact_match;
-  u8 sub_default;
-  u8 sub_outer_vlan_id_any;
-  u8 sub_inner_vlan_id_any;
-
-  /* vlan tag rewrite state */
-  u32 vtr_op;
-  u32 vtr_push_dot1q;          // ethertype of first pushed tag is dot1q/dot1ad
-  u32 vtr_tag1;                        // first pushed tag
-  u32 vtr_tag2;                        // second pushed tag
-  u8 tag[64];
-};
-
-/* works */
-define sw_interface_dump
-{
-  u32 client_index;
-  u32 context;
-  u8 name_filter_valid;
-  u8 name_filter[49];
-};
-
-/** \brief Set or delete one or all ip addresses on a specified interface
-    @param client_index - opaque cookie to identify the sender
-    @param context - sender context, to match reply w/ request
-    @param sw_if_index - index of the interface to add/del addresses 
-    @param is_add - add address if non-zero, else delete
-    @param is_ipv6 - if non-zero the address is ipv6, else ipv4
-    @param del_all - if non-zero delete all addresses on the interface
-    @param address_length - address length in bytes, 4 for ip4, 16 for ip6
-    @param address - array of address bytes
-*/
-define sw_interface_add_del_address
-{
-  u32 client_index;
-  u32 context;
-  u32 sw_if_index;
-  u8 is_add;
-  u8 is_ipv6;
-  u8 del_all;
-  u8 address_length;
-  u8 address[16];
-};
-
-/** \brief Reply for interface events registration
-    @param context - returned sender context, to match reply w/ request
-    @param retval - return code
-*/
-define sw_interface_add_del_address_reply
-{
-  u32 context;
-  i32 retval;
-};
-
-/** \brief Associate the specified interface with a fib table
-    @param client_index - opaque cookie to identify the sender
-    @param context - sender context, to match reply w/ request
-    @param sw_if_index - index of the interface
-    @param is_ipv6 - if non-zero ipv6, else ipv4
-    @param vrf_id - fib table/vrd id to associate the interface with
-*/
-define sw_interface_set_table
-{
-  u32 client_index;
-  u32 context;
-  u32 sw_if_index;
-  u8 is_ipv6;
-  u32 vrf_id;
-};
-
-/** \brief Reply for interface events registration
-    @param context - returned sender context, to match reply w/ request
-    @param retval - return code
-*/
-define sw_interface_set_table_reply
-{
-  u32 context;
-  i32 retval;
-};
-
-/** \brief Enable or Disable MPLS on and interface
-    @param client_index - opaque cookie to identify the sender
-    @param context - sender context, to match reply w/ request
-    @param sw_if_index - index of the interface
-    @param enable - if non-zero enable, else disable
-*/
-define sw_interface_set_mpls_enable
-{
-  u32 client_index;
-  u32 context;
-  u32 sw_if_index;
-  u8 enable;
-};
-
-/** \brief Reply for MPLS state on an interface
-    @param context - returned sender context, to match reply w/ request
-    @param retval - return code
-*/
-define sw_interface_set_mpls_enable_reply
-{
-  u32 context;
-  i32 retval;
-};
+/* 
+ * Note: API placement cleanup in progress
+ * If you're looking for interface APIs, please
+ * see .../vnet/vnet/{interface.api,interface_api.c}
+ */
 
 /** \brief Initialize a new tap interface with the given paramters 
     @param client_index - opaque cookie to identify the sender
@@ -340,6 +154,30 @@ define create_vlan_subif_reply
   u32 sw_if_index;
 };
 
+/** \brief Enable or Disable MPLS on and interface
+    @param client_index - opaque cookie to identify the sender
+    @param context - sender context, to match reply w/ request
+    @param sw_if_index - index of the interface
+    @param enable - if non-zero enable, else disable
+*/
+define sw_interface_set_mpls_enable
+{
+  u32 client_index;
+  u32 context;
+  u32 sw_if_index;
+  u8 enable;
+};
+
+/** \brief Reply for MPLS state on an interface
+    @param context - returned sender context, to match reply w/ request
+    @param retval - return code
+*/
+define sw_interface_set_mpls_enable_reply
+{
+  u32 context;
+  i32 retval;
+};
+
 /** \brief MPLS Route Add / del route
     @param client_index - opaque cookie to identify the sender
     @param context - sender context, to match reply w/ request
@@ -834,23 +672,6 @@ define want_stats_reply
   i32 retval;
 };
 
-/** \brief Want stats counters structure 
-    @param vnet_counter_type- such as ip4, ip6, punts, etc
-    @param is_combined - rx & tx total (all types) counts   
-    @param first_sw_if_index - first sw index in block of index, counts
-    @param count - number of interfaces this stats block includes counters for
-    @param data - contiguous block of vlib_counter_t structures 
-*/
-define vnet_interface_counters
-{
-  /* enums - plural - in vnet/interface.h */
-  u8 vnet_counter_type;
-  u8 is_combined;
-  u32 first_sw_if_index;
-  u32 count;
-  u8 data[count];
-};
-
 typeonly manual_print manual_endian define ip4_fib_counter
 {
   u32 address;
@@ -1230,32 +1051,6 @@ define sw_interface_ip6_set_link_local_address_reply
   i32 retval;
 };
 
-/** \brief Set unnumbered interface add / del request
-    @param client_index - opaque cookie to identify the sender
-    @param context - sender context, to match reply w/ request
-    @param sw_if_index - interface with an IP address
-    @param unnumbered_sw_if_index - interface which will use the address
-    @param is_add - if non-zero set the association, else unset it
-*/
-define sw_interface_set_unnumbered
-{
-  u32 client_index;
-  u32 context;
-  u32 sw_if_index;             /* use this intfc address */
-  u32 unnumbered_sw_if_index;  /* on this interface */
-  u8 is_add;
-};
-
-/** \brief Set unnumbered interface add / del response
-    @param context - sender context, to match reply w/ request
-    @param retval - return code for the request
-*/
-define sw_interface_set_unnumbered_reply
-{
-  u32 context;
-  i32 retval;
-};
-
 /** \brief Create loopback interface request
     @param client_index - opaque cookie to identify the sender
     @param context - sender context, to match reply w/ request
@@ -2574,6 +2369,11 @@ define lisp_add_del_locator_reply
     @param prefix_len - prefix len
     @param locator_set_name - name of locator_set to add/del eid-table
     @param vni - virtual network instance
+    @param key_id
+      HMAC_NO_KEY           0
+      HMAC_SHA_1_96         1
+      HMAC_SHA_256_128      2
+    @param key - secret key
 */
 define lisp_add_del_local_eid
 {
@@ -2585,6 +2385,8 @@ define lisp_add_del_local_eid
   u8 prefix_len;
   u8 locator_set_name[64];
   u32 vni;
+  u16 key_id;
+  u8 key[64];
 };
 
 /** \brief Reply for local_eid add/del
@@ -2644,6 +2446,32 @@ define lisp_gpe_add_del_fwd_entry_reply
   i32 retval;
 };
 
+/** \brief Add/delete map server
+    @param client_index - opaque cookie to identify the sender
+    @param context - sender context, to match reply w/ request
+    @param is_add - add address if non-zero; delete otherwise
+    @param is_ipv6 - if non-zero the address is ipv6, else ipv4
+    @param ip_address - map server IP address
+*/
+define lisp_add_del_map_server
+{
+  u32 client_index;
+  u32 context;
+  u8 is_add;
+  u8 is_ipv6;
+  u8 ip_address[16];
+};
+
+/** \brief Reply for lisp_add_del_map_server
+    @param context - returned sender context, to match reply w/ request
+    @param retval - return code
+*/
+define lisp_add_del_map_server_reply
+{
+  u32 context;
+  i32 retval;
+};
+
 /** \brief add or delete map-resolver
     @param client_index - opaque cookie to identify the sender
     @param context - sender context, to match reply w/ request
@@ -2763,6 +2591,93 @@ define lisp_pitr_set_locator_set_reply
   i32 retval;
 };
 
+/** \brief Get state of LISP RLOC probing
+    @param client_index - opaque cookie to identify the sender
+    @param context - sender context, to match reply w/ request
+*/
+define show_lisp_rloc_probe_state
+{
+  u32 client_index;
+  u32 context;
+};
+
+/** \brief Reply for show_lisp_rloc_probe_state
+    @param context - returned sender context, to match reply w/ request
+    @param retval - return code
+    @param is_enabled - state of RLOC probing
+*/
+define show_lisp_rloc_probe_state_reply
+{
+  u32 context;
+  i32 retval;
+  u8 is_enabled;
+};
+
+/** \brief enable/disable LISP RLOC probing
+    @param client_index - opaque cookie to identify the sender
+    @param context - sender context, to match reply w/ request
+    @param is_enable - enable if non-zero; disable otherwise
+*/
+define lisp_rloc_probe_enable_disable
+{
+  u32 client_index;
+  u32 context;
+  u8 is_enabled;
+};
+
+/** \brief Reply for lisp_rloc_probe_enable_disable
+    @param context - returned sender context, to match reply w/ request
+    @param retval - return code
+*/
+define lisp_rloc_probe_enable_disable_reply
+{
+  u32 context;
+  i32 retval;
+};
+
+/** \brief enable/disable LISP map-register
+    @param client_index - opaque cookie to identify the sender
+    @param context - sender context, to match reply w/ request
+    @param is_enable - enable if non-zero; disable otherwise
+*/
+define lisp_map_register_enable_disable
+{
+  u32 client_index;
+  u32 context;
+  u8 is_enabled;
+};
+
+/** \brief Reply for lisp_map_register_enable_disable
+    @param context - returned sender context, to match reply w/ request
+    @param retval - return code
+*/
+define lisp_map_register_enable_disable_reply
+{
+  u32 context;
+  i32 retval;
+};
+
+/** \brief Get state of LISP map-register
+    @param client_index - opaque cookie to identify the sender
+    @param context - sender context, to match reply w/ request
+*/
+define show_lisp_map_register_state
+{
+  u32 client_index;
+  u32 context;
+};
+
+/** \brief Reply for show_lisp_map_register_state
+    @param context - returned sender context, to match reply w/ request
+    @param retval - return code
+*/
+define show_lisp_map_register_state_reply
+{
+  u32 context;
+  i32 retval;
+  u8 is_enabled;
+};
+
 /** \brief set LISP map-request mode. Based on configuration VPP will send
       src/dest or just normal destination map requests.
     @param client_index - opaque cookie to identify the sender
@@ -3031,6 +2946,11 @@ define lisp_locator_set_dump
     @param vni - virtual network instance
     @param ttl - time to live
     @param authoritative - authoritative
+    @param key_id
+      HMAC_NO_KEY           0
+      HMAC_SHA_1_96         1
+      HMAC_SHA_256_128      2
+    @param key - secret key
 */
 
 define lisp_eid_table_details
@@ -3048,6 +2968,8 @@ define lisp_eid_table_details
   u8 seid_prefix_len;
   u32 ttl;
   u8 authoritative;
+  u16 key_id;
+  u8 key[64];
 };
 
 /** \brief Request for eid table summary status
@@ -3198,7 +3120,6 @@ define lisp_gpe_tunnel_dump
 };
 
 /** \brief LISP map resolver status
-    @param locator_set_name - name of the locator_set
     @param is_ipv6 - if non-zero the address is ipv6, else ipv4
     @param ip_address - array of address bytes
  */
@@ -3219,6 +3140,27 @@ define lisp_map_resolver_dump
   u32 context;
 };
 
+/** \brief LISP map server details
+    @param is_ipv6 - if non-zero the address is ipv6, else ipv4
+    @param ip_address - array of address bytes
+ */
+define lisp_map_server_details
+{
+  u32 context;
+  u8 is_ipv6;
+  u8 ip_address[16];
+};
+
+/** \brief Request for map server summary status
+    @param client_index - opaque cookie to identify the sender
+    @param context - sender context, to match reply w/ request
+ */
+define lisp_map_server_dump
+{
+  u32 client_index;
+  u32 context;
+};
+
 /** \brief Request for lisp-gpe protocol status
     @param client_index - opaque cookie to identify the sender
     @param context - sender context, to match reply w/ request
@@ -4186,28 +4128,6 @@ define get_node_graph_reply
   u64 reply_in_shmem;
 };
 
-/** \brief Clear interface statistics
-    @param client_index - opaque cookie to identify the sender
-    @param context - sender context, to match reply w/ request
-    @param sw_if_index - index of the interface to clear statistics
-*/
-define sw_interface_clear_stats
-{
-  u32 client_index;
-  u32 context;
-  u32 sw_if_index;
-};
-
-/** \brief Reply to sw_interface_clear_stats 
-    @param context - sender context which was passed in the request
-    @param retval - return code of the set flags request
-*/
-define sw_interface_clear_stats_reply
-{
-  u32 context;
-  i32 retval;
-};
-
 /** \brief IOAM enable : Enable in-band OAM
     @param id - profile id
     @param seqno - To enable Seqno Processing
@@ -5390,27 +5310,35 @@ define feature_enable_disable_reply
     i32 retval;
 };
 
-/** \brief Set / clear software interface tag
+/** \brief Dump IP neighboors
     @param client_index - opaque cookie to identify the sender
     @param context - sender context, to match reply w/ request
-    @param sw_if_index - the interface
-    @param add_del - 1 = add, 0 = delete
-    @param tag - an ascii tag
+    @param sw_if_index - the interface to dump neighboors
+    @param is_ipv6 - [1|0] to indicate if address family is ipv[6|4]
 */
-define sw_interface_tag_add_del {
+define ip_neighbor_dump
+{
     u32 client_index;
     u32 context;
-    u8 is_add;
     u32 sw_if_index;
-    u8 tag[64];
+    u8  is_ipv6;
 };
 
-/** \brief Reply to set / clear software interface tag
+/** \brief IP neighboors dump response
     @param context - sender context which was passed in the request
-    @param retval - return code for the request
+    @param is_static - [1|0] to indicate if neighbor is statically configured
+    @param is_ipv6 - [1|0] to indicate if address family is ipv[6|4]
 */
-define sw_interface_tag_add_del_reply
-{
+define ip_neighbor_details {
     u32 context;
-    i32 retval;
+    u32 is_static;
+    u8  is_ipv6;
+    u8  mac_address[6];
+    u8  ip_address[16];
 };
+
+/*
+ * Local Variables:
+ * eval: (c-set-style "gnu")
+ * End:
+ */
\ No newline at end of file