X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvpp%2Fapi%2Fvpe.api;h=3a35a54a23ac48fc27c658a605e621f3ab78f858;hb=c8d8770a3e09c300eeff461a11ef3723b8e029cb;hp=e784fa01f085eb5800e96c04469914edd85c906c;hpb=0f971d8c22adf89d3f8592ac0d207727f2b1a23a;p=vpp.git diff --git a/src/vpp/api/vpe.api b/src/vpp/api/vpe.api index e784fa01f08..3a35a54a23a 100644 --- a/src/vpp/api/vpe.api +++ b/src/vpp/api/vpe.api @@ -26,7 +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} - * AF-PACKET APIs: ... see /vnet/devices/af_packet/{af_packet.api, af_packet_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} * VXLAN GPE APIs: see .../src/vnet/vxlan-gpe/{vxlan_gpe.api, vxlan_gpe_api.c} @@ -40,7 +40,10 @@ * LISP-GPE APIs: see .../src/vnet/lisp-gpe/{lisp_gpe.api, lisp_gpe_api.c} * MPLS APIs: see .../src/vnet/mpls/{mpls.api, mpls_api.c} * SR APIs: see .../src/vnet/sr/{sr.api, sr_api.c} - * DPDK APIs: ... see /src/vnet/devices/dpdk/{dpdk.api, dpdk_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 @@ -228,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]; @@ -243,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 @@ -355,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[] - -*/ -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 @@ -685,109 +667,6 @@ define bd_ip_mac_add_del_reply i32 retval; }; -/** \brief Add/Delete classification table request - @param client_index - opaque cookie to identify the sender - @param context - sender context, to match reply w/ request - @param is_add- if non-zero add the table, else delete it - @param del_chain - if non-zero delete the whole chain of tables - @param table_index - if add, reuturns index of the created table, else specifies the table to delete - @param nbuckets - number of buckets when adding a table - @param memory_size - memory size when adding a table - @param match_n_vectors - number of match vectors - @param next_table_index - index of next table - @param miss_next_index - index of miss table - @param current_data_flag - option to use current node's packet payload - as the starting point from where packets are classified, - This option is only valid for L2/L3 input ACL for now. - 0: by default, classify data from the buffer's start location - 1: classify packets from VPP node’s current data pointer - @param current_data_offset - a signed value to shift the start location of - the packet to be classified - For example, if input IP ACL node is used, L2 header’s first byte - can be accessible by configuring current_data_offset to -14 - if there is no vlan tag. - This is valid only if current_data_flag is set to 1. - @param mask[] - match mask -*/ -define classify_add_del_table -{ - u32 client_index; - u32 context; - u8 is_add; - u8 del_chain; - u32 table_index; - u32 nbuckets; - u32 memory_size; - u32 skip_n_vectors; - u32 match_n_vectors; - u32 next_table_index; - u32 miss_next_index; - u32 current_data_flag; - i32 current_data_offset; - u8 mask[0]; -}; - -/** \brief Add/Delete classification table response - @param context - sender context, to match reply w/ request - @param retval - return code for the table add/del requst - @param new_table_index - for add, returned index of the new table - @param skip_n_vectors - for add, returned value of skip_n_vectors in table - @param match_n_vectors -for add, returned value of match_n_vectors in table -*/ -define classify_add_del_table_reply -{ - u32 context; - i32 retval; - u32 new_table_index; - u32 skip_n_vectors; - u32 match_n_vectors; -}; - -/** \brief Classify add / del session request - @param client_index - opaque cookie to identify the sender - @param context - sender context, to match reply w/ request - @param is_add - add session if non-zero, else delete - @param table_index - index of the table to add/del the session, required - @param hit_next_index - for add, hit_next_index of new session, required - @param opaque_index - for add, opaque_index of new session - @param advance -for add, advance value for session - @param action - - 0: no action (by default) - metadata is not used. - 1: Classified IP packets will be looked up from the - specified ipv4 fib table (configured by metadata as VRF id). - Only valid for L3 input ACL node - 2: Classified IP packets will be looked up from the - specified ipv6 fib table (configured by metadata as VRF id). - Only valid for L3 input ACL node - @param metadata - valid only if action != 0 - VRF id if action is 1 or 2. - @param match[] - for add, match value for session, required -*/ -define classify_add_del_session -{ - u32 client_index; - u32 context; - u8 is_add; - u32 table_index; - u32 hit_next_index; - u32 opaque_index; - i32 advance; - u8 action; - u32 metadata; - u8 match[0]; -}; - -/** \brief Classify add / del session response - @param context - sender context, to match reply w/ request - @param retval - return code for the add/del session request -*/ -define classify_add_del_session_reply -{ - u32 context; - i32 retval; -}; - /** \brief Set/unset the classification table for an interface request @param client_index - opaque cookie to identify the sender @param context - sender context, to match reply w/ request @@ -894,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[] - -*/ -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 @@ -1143,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 @@ -1206,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 @@ -1491,391 +1286,6 @@ define policer_details u64 last_update_time; }; -/** \brief Set/unset policer classify interface - @param client_index - opaque cookie to identify the sender - @param context - sender context, to match reply w/ request - @param sw_if_index - interface to set/unset policer classify - @param ip4_table_index - ip4 classify table index (~0 for skip) - @param ip6_table_index - ip6 classify table index (~0 for skip) - @param l2_table_index - l2 classify table index (~0 for skip) - @param is_add - Set if non-zero, else unset - Note: User is recommeneded to use just one valid table_index per call. - (ip4_table_index, ip6_table_index, or l2_table_index) -*/ -define policer_classify_set_interface -{ - u32 client_index; - u32 context; - u32 sw_if_index; - u32 ip4_table_index; - u32 ip6_table_index; - u32 l2_table_index; - u8 is_add; -}; - -/** \brief Set/unset policer classify interface response - @param context - sender context, to match reply w/ request - @param retval - return value for request -*/ -define policer_classify_set_interface_reply -{ - u32 context; - i32 retval; -}; - -/** \brief Get list of policer classify interfaces and tables - @param client_index - opaque cookie to identify the sender - @param context - sender context, to match reply w/ request - @param type - classify table type -*/ -define policer_classify_dump -{ - u32 client_index; - u32 context; - u8 type; -}; - -/** \brief Policer iclassify operational state response. - @param context - sender context, to match reply w/ request - @param sw_if_index - software interface index - @param table_index - classify table index -*/ -define policer_classify_details -{ - u32 context; - u32 sw_if_index; - u32 table_index; -}; - -/** \brief Classify get table IDs request - @param client_index - opaque cookie to identify the sender - @param context - sender context, to match reply w/ request -*/ -define classify_table_ids -{ - u32 client_index; - u32 context; -}; - -/** \brief Reply for classify get table IDs request - @param context - sender context which was passed in the request - @param count - number of ids returned in response - @param ids - array of classify table ids -*/ -define classify_table_ids_reply -{ - u32 context; - i32 retval; - u32 count; - u32 ids[count]; -}; - -/** \brief Classify table ids by interface index 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 -*/ -define classify_table_by_interface -{ - u32 client_index; - u32 context; - u32 sw_if_index; -}; - -/** \brief Reply for classify table id by interface index request - @param context - sender context which was passed in the request - @param count - number of ids returned in response - @param sw_if_index - index of the interface - @param l2_table_id - l2 classify table index - @param ip4_table_id - ip4 classify table index - @param ip6_table_id - ip6 classify table index -*/ -define classify_table_by_interface_reply -{ - u32 context; - i32 retval; - u32 sw_if_index; - u32 l2_table_id; - u32 ip4_table_id; - u32 ip6_table_id; -}; - -/** \brief Classify table info - @param client_index - opaque cookie to identify the sender - @param context - sender context, to match reply w/ request - @param table_id - classify table index -*/ -define classify_table_info -{ - u32 client_index; - u32 context; - u32 table_id; -}; - -/** \brief Reply for classify table info request - @param context - sender context which was passed in the request - @param count - number of ids returned in response - @param table_id - classify table index - @param nbuckets - number of buckets when adding a table - @param match_n_vectors - number of match vectors - @param skip_n_vectors - number of skip_n_vectors - @param active_sessions - number of sessions (active entries) - @param next_table_index - index of next table - @param miss_next_index - index of miss table - @param mask[] - match mask -*/ -define classify_table_info_reply -{ - u32 context; - i32 retval; - u32 table_id; - u32 nbuckets; - u32 match_n_vectors; - u32 skip_n_vectors; - u32 active_sessions; - u32 next_table_index; - u32 miss_next_index; - u32 mask_length; - u8 mask[mask_length]; -}; - -/** \brief Classify sessions dump request - @param client_index - opaque cookie to identify the sender - @param context - sender context, to match reply w/ request - @param table_id - classify table index -*/ -define classify_session_dump -{ - u32 client_index; - u32 context; - u32 table_id; -}; - -/** \brief Reply for classify table session dump request - @param context - sender context which was passed in the request - @param count - number of ids returned in response - @param table_id - classify table index - @param hit_next_index - hit_next_index of session - @param opaque_index - for add, opaque_index of session - @param advance - advance value of session - @param match[] - match value for session -*/ -define classify_session_details -{ - u32 context; - i32 retval; - u32 table_id; - u32 hit_next_index; - i32 advance; - u32 opaque_index; - u32 match_length; - u8 match[match_length]; -}; - -/** \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 Set/unset flow classify interface - @param client_index - opaque cookie to identify the sender - @param context - sender context, to match reply w/ request - @param sw_if_index - interface to set/unset flow classify - @param ip4_table_index - ip4 classify table index (~0 for skip) - @param ip6_table_index - ip6 classify table index (~0 for skip) - @param l2_table_index - l2 classify table index (~0 for skip) - @param is_add - Set if non-zero, else unset - Note: User is recommeneded to use just one valid table_index per call. - (ip4_table_index, ip6_table_index, or l2_table_index) -*/ -define flow_classify_set_interface { - u32 client_index; - u32 context; - u32 sw_if_index; - u32 ip4_table_index; - u32 ip6_table_index; - u8 is_add; -}; - -/** \brief Set/unset flow classify interface response - @param context - sender context, to match reply w/ request - @param retval - return value for request -*/ -define flow_classify_set_interface_reply { - u32 context; - i32 retval; -}; - -/** \brief Get list of flow classify interfaces and tables - @param client_index - opaque cookie to identify the sender - @param context - sender context, to match reply w/ request - @param type - classify table type -*/ -define flow_classify_dump { - u32 client_index; - u32 context; - u8 type; -}; - -/** \brief Flow classify operational state response. - @param context - sender context, to match reply w/ request - @param sw_if_index - software interface index - @param table_index - classify table index -*/ -define flow_classify_details { - u32 context; - u32 sw_if_index; - u32 table_index; -}; - /** \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