API refactoring : dhcp
[vpp.git] / src / vpp / api / vpe.api
index a9b34d1..3a35a54 100644 (file)
@@ -42,6 +42,8 @@
  * SR APIs: see .../src/vnet/sr/{sr.api, sr_api.c}
  * 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
@@ -229,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];
@@ -244,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
@@ -356,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
@@ -792,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
@@ -1041,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
@@ -1104,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
@@ -1389,159 +1286,6 @@ define policer_details
   u64 last_update_time;
 };
 
-/** \brief Configure IPFIX exporter process request
-    @param client_index - opaque cookie to identify the sender
-    @param context - sender context, to match reply w/ request
-    @param collector_address - address of IPFIX collector
-    @param collector_port - port of IPFIX collector
-    @param src_address - address of IPFIX exporter
-    @param vrf_id - VRF / fib table ID
-    @param path_mtu - Path MTU between exporter and collector
-    @param template_interval - number of seconds after which to resend template
-    @param udp_checksum - UDP checksum calculation enable flag
-*/
-define set_ipfix_exporter
-{
-  u32 client_index;
-  u32 context;
-  u8 collector_address[16];
-  u16 collector_port;
-  u8 src_address[16];
-  u32 vrf_id;
-  u32 path_mtu;
-  u32 template_interval;
-  u8 udp_checksum;
-};
-
-/** \brief Reply to IPFIX exporter configure request
-    @param context - sender context which was passed in the request
-*/
-define set_ipfix_exporter_reply
-{
-  u32 context;
-  i32 retval;
-};
-
-/** \brief IPFIX exporter dump request
-    @param client_index - opaque cookie to identify the sender
-    @param context - sender context, to match reply w/ request
-*/
-define ipfix_exporter_dump
-{
-  u32 client_index;
-  u32 context;
-};
-
-/** \brief Reply to IPFIX exporter dump request
-    @param context - sender context which was passed in the request
-    @param collector_address - address of IPFIX collector
-    @param collector_port - port of IPFIX collector
-    @param src_address - address of IPFIX exporter
-    @param fib_index - fib table index
-    @param path_mtu - Path MTU between exporter and collector
-    @param template_interval - number of seconds after which to resend template
-    @param udp_checksum - UDP checksum calculation enable flag
-*/
-define ipfix_exporter_details
-{
-  u32 context;
-  u8 collector_address[16];
-  u16 collector_port;
-  u8 src_address[16];
-  u32 vrf_id;
-  u32 path_mtu;
-  u32 template_interval;
-  u8 udp_checksum;
-};
-
-/** \brief IPFIX classify stream configure request
-    @param client_index - opaque cookie to identify the sender
-    @param context - sender context, to match reply w/ request
-    @param domain_id - domain ID reported in IPFIX messages for classify stream
-    @param src_port - source port of UDP session for classify stream
-*/
-define set_ipfix_classify_stream {
-    u32 client_index;
-    u32 context;
-    u32 domain_id;
-    u16 src_port;
-};
-
-/** \brief IPFIX classify stream configure response
-    @param context - sender context, to match reply w/ request
-    @param retval - return value for request
-*/
-define set_ipfix_classify_stream_reply {
-    u32 context;
-    i32 retval;
-};
-
-/** \brief IPFIX classify stream dump request
-    @param client_index - opaque cookie to identify the sender
-    @param context - sender context, to match reply w/ request
-*/
-define ipfix_classify_stream_dump {
-    u32 client_index;
-    u32 context;
-};
-
-/** \brief Reply to IPFIX classify stream dump request
-    @param context - sender context, to match reply w/ request
-    @param domain_id - domain ID reported in IPFIX messages for classify stream
-    @param src_port - source port of UDP session for classify stream
-*/
-define ipfix_classify_stream_details {
-    u32 context;
-    u32 domain_id;
-    u16 src_port;
-};
-
-/** \brief IPFIX add or delete classifier table request
-    @param client_index - opaque cookie to identify the sender
-    @param context - sender context, to match reply w/ request
-    @param table_id - classifier table ID
-    @param ip_version - version of IP used in the classifier table
-    @param transport_protocol - transport protocol used in the classifier table or 255 for unspecified
-*/
-define ipfix_classify_table_add_del {
-    u32 client_index;
-    u32 context;
-    u32 table_id;
-    u8 ip_version;
-    u8 transport_protocol;
-    u8 is_add;
-};
-
-/** \brief IPFIX add classifier table response
-    @param context - sender context which was passed in the request
-*/
-define ipfix_classify_table_add_del_reply {
-    u32 context;
-    i32 retval;
-};
-
-/** \brief IPFIX classify tables dump request
-    @param client_index - opaque cookie to identify the sender
-    @param context - sender context, to match reply w/ request
-*/
-define ipfix_classify_table_dump {
-    u32 client_index;
-    u32 context;
-};
-
-/** \brief Reply to IPFIX classify tables dump request
-    @param context - sender context, to match reply w/ request
-    @param table_id - classifier table ID
-    @param ip_version - version of IP used in the classifier table
-    @param transport_protocol - transport protocol used in the classifier table or 255 for unspecified
-*/
-define ipfix_classify_table_details {
-    u32 context;
-    u32 table_id;
-    u8 ip_version;
-    u8 transport_protocol;
-};
-
 /** \brief Query relative index via node names
     @param client_index - opaque cookie to identify the sender
     @param context - sender context, to match reply w/ request