API refactoring : dhcp
[vpp.git] / src / vpp / api / vpe.api
index f32ba67..3a35a54 100644 (file)
@@ -43,6 +43,7 @@
  * DPDK APIs: see ... /src/vnet/devices/dpdk/{dpdk.api, dpdk_api.c}
  * CLASSIFY APIs: see ... /src/vnet/classify/{classify.api, classify_api.c}
  * FLOW APIs: see ... /src/vnet/flow/{flow.api, flow_api.c}
+ * DHCP APIs: see ... /src/vnet/dhcp/{dhcpk.api, dhcp_api.c}
  */
 
 /** \brief Create a new subinterface with the given vlan id
@@ -230,6 +231,31 @@ manual_print manual_endian define vnet_ip4_fib_counters
   vl_api_ip4_fib_counter_t c[count];
 };
 
+typeonly manual_print manual_endian define ip4_nbr_counter
+{
+  u32 address;
+  u8  link_type;
+  u64 packets;
+  u64 bytes;
+};
+
+/**
+ * @brief Per-neighbour (i.e. per-adjacency) coutners
+ * @param count The size of the array of counters
+ * @param sw_if_index The interface the adjacency is on
+ * @param begin Flag to indicate this is the first set of stats for this
+ *        interface. If this flag is not set the it is a continuation of
+ *        stats for this interface
+ * @param  c counters
+ */
+manual_print manual_endian define vnet_ip4_nbr_counters
+{
+  u32 count;
+  u32 sw_if_index;
+  u8 begin;
+  vl_api_ip4_nbr_counter_t c[count];
+};
+
 typeonly manual_print manual_endian define ip6_fib_counter
 {
   u64 address[2];
@@ -245,6 +271,22 @@ manual_print manual_endian define vnet_ip6_fib_counters
   vl_api_ip6_fib_counter_t c[count];
 };
 
+typeonly manual_print manual_endian define ip6_nbr_counter
+{
+  u64 address[2];
+  u8  link_type;
+  u64 packets;
+  u64 bytes;
+};
+
+manual_print manual_endian define vnet_ip6_nbr_counters
+{
+  u32 count;
+  u32 sw_if_index;
+  u8 begin;
+  vl_api_ip6_nbr_counter_t c[count];
+};
+
 /** \brief Request for a single block of summary stats
     @param client_index - opaque cookie to identify the sender
     @param context - sender context, to match reply w/ request
@@ -357,68 +399,6 @@ define reset_fib_reply
   i32 retval;
 };
 
-/** \brief DHCP Proxy config add / del request
-    @param client_index - opaque cookie to identify the sender
-    @param context - sender context, to match reply w/ request
-    @param vrf_id - vrf id
-    @param if_ipv6 - ipv6 if non-zero, else ipv4
-    @param is_add - add the config if non-zero, else delete
-    @param insert_circuit_id - option82 suboption 1 fib number
-    @param dhcp_server[] - server address
-    @param dhcp_src_address[] - <fix this, need details>
-*/
-define dhcp_proxy_config
-{
-  u32 client_index;
-  u32 context;
-  u32 vrf_id;
-  u8 is_ipv6;
-  u8 is_add;
-  u8 insert_circuit_id;
-  u8 dhcp_server[16];
-  u8 dhcp_src_address[16];
-};
-
-/** \brief DHCP Proxy config response
-    @param context - sender context, to match reply w/ request
-    @param retval - return code for the request
-*/
-define dhcp_proxy_config_reply
-{
-  u32 context;
-  i32 retval;
-};
-
-/** \brief DHCP Proxy set / unset vss request
-    @param client_index - opaque cookie to identify the sender
-    @param context - sender context, to match reply w/ request
-    @param tbl_id - table id
-    @param oui - first part of vpn id
-    @param fib_id - second part of vpn id
-    @param is_ipv6 - ip6 if non-zero, else ip4
-    @param is_add - set vss if non-zero, else delete
-*/
-define dhcp_proxy_set_vss
-{
-  u32 client_index;
-  u32 context;
-  u32 tbl_id;
-  u32 oui;
-  u32 fib_id;
-  u8 is_ipv6;
-  u8 is_add;
-};
-
-/** \brief DHCP proxy set / unset vss response
-    @param context - sender context, to match reply w/ request
-    @param retval - return code for the request
-*/
-define dhcp_proxy_set_vss_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
@@ -793,40 +773,6 @@ define add_node_next_reply
   u32 next_index;
 };
 
-/** \brief DHCP Proxy config 2 add / del request
-    @param client_index - opaque cookie to identify the sender
-    @param context - sender context, to match reply w/ request
-    @param rx_vrf_id - receive vrf id
-    @param server_vrf_id - server vrf id
-    @param if_ipv6 - ipv6 if non-zero, else ipv4
-    @param is_add - add the config if non-zero, else delete
-    @param insert_circuit_id - option82 suboption 1 fib number
-    @param dhcp_server[] - server address
-    @param dhcp_src_address[] - <fix this, need details>
-*/
-define dhcp_proxy_config_2
-{
-  u32 client_index;
-  u32 context;
-  u32 rx_vrf_id;
-  u32 server_vrf_id;
-  u8 is_ipv6;
-  u8 is_add;
-  u8 insert_circuit_id;
-  u8 dhcp_server[16];
-  u8 dhcp_src_address[16];
-};
-
-/** \brief DHCP Proxy config 2 add / del response
-    @param context - sender context, to match reply w/ request
-    @param retval - return code for request
-*/
-define dhcp_proxy_config_2_reply
-{
-  u32 context;
-  i32 retval;
-};
-
 /** \brief L2 interface ethernet flow point filtering enable/disable request
     @param client_index - opaque cookie to identify the sender
     @param context - sender context, to match reply w/ request
@@ -1042,37 +988,6 @@ define ip6_nd_event
   u8 mac_ip;
 };
     
-/** \brief DHCP Client config 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 - index of the interface for DHCP client
-    @param hostname - hostname
-    @param is_add - add the config if non-zero, else delete
-    @param want_dhcp_event - DHCP event sent to the sender
-           via dhcp_compl_event API message if non-zero
-    @param pid - sender's pid
-*/
-define dhcp_client_config
-{
-  u32 client_index;
-  u32 context;
-  u32 sw_if_index;
-  u8 hostname[64];
-  u8 is_add;
-  u8 want_dhcp_event;
-  u32 pid;
-};
-
-/** \brief DHCP Client config response
-    @param context - sender context, to match reply w/ request
-    @param retval - return code for the request
-*/
-define dhcp_client_config_reply
-{
-  u32 context;
-  i32 retval;
-};
-
 /** \brief Set/unset input ACL interface
     @param client_index - opaque cookie to identify the sender
     @param context - sender context, to match reply w/ request
@@ -1105,25 +1020,6 @@ define input_acl_set_interface_reply
   i32 retval;
 };
 
-/** \brief Tell client about a DHCP completion event
-    @param client_index - opaque cookie to identify the sender
-    @param pid - client pid registered to receive notification
-    @param is_ipv6 - if non-zero the address is ipv6, else ipv4
-    @param host_address - Host IP address
-    @param router_address - Router IP address
-    @param host_mac - Host MAC address
-*/
-define dhcp_compl_event
-{
-  u32 client_index;
-  u32 pid;
-  u8 hostname[64];
-  u8 is_ipv6;
-  u8 host_address[16];
-  u8 router_address[16];
-  u8 host_mac[6];
-};
-
 /** \brief cop: enable/disable junk filtration features on an interface
     @param client_index - opaque cookie to identify the sender
     @param context - sender context, to match reply w/ request