2 * Copyright (c) 2015-2016 Cisco and/or its affiliates.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at:
7 * http://www.apache.org/licenses/LICENSE-2.0
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
18 This file defines vpe control-plane API messages which are generally
19 called through a shared memory interface.
23 * Note: API placement cleanup in progress
24 * If you're looking for interface APIs, please
25 * see .../vnet/vnet/{interface.api,interface_api.c}
26 * IP APIs: see .../vnet/vnet/ip/{ip.api, ip_api.c}
27 * TAP APIs: see .../vnet/vnet/unix/{tap.api, tap_api.c}
28 * VXLAN APIs: see .../vnet/vnet/vxlan/{vxlan.api, vxlan_api.c}
29 * AF-PACKET APIs: ... see /vnet/devices/af_packet/{af_packet.api, af_packet_api.c}
30 * NETMAP APIs: see ... /vnet/vnet/devices/netmap/{netmap.api, netmap_api.c}
31 * VHOST-USER APIs: see .../vnet/devices/virtio/{vhost_user.api, vhost_user_api.c}
32 * VXLAN GPE APIs: see .../vnet/vnet/vxlan-gpe/{vxlan_gpe.api, vxlan_gpe_api.c}
33 * GRE APIs: see .../vnet/vnet/gre/{gre.api, gre_api.c}
34 * L2TP APIs: see .../vnet/vnet/l2tp/{l2tp.api, l2tp_api.c}
35 * BFD APIs: see .../vnet/vnet/bfd/{bfd.api, bfd_api.c}
36 * IPSEC APIs: see .../vnet/vnet/ipsec/{ipsec.api, ipsec_api.c}
37 * IPSEC-GRE APIs: see .../vnet/vnet/ipsec-gre/{ipsec_gre.api, ipsec_gre_api.c}
38 * LISP APIs: see .../vnet/vnet/lisp/{lisp.api, lisp_api.c}
41 /** \brief Create a new subinterface with the given vlan id
42 @param client_index - opaque cookie to identify the sender
43 @param context - sender context, to match reply w/ request
44 @param sw_if_index - software index of the new vlan's parent interface
45 @param vlan_id - vlan tag of the new interface
47 define create_vlan_subif
55 /** \brief Reply for the vlan subinterface create request
56 @param context - returned sender context, to match reply w/ request
57 @param retval - return code
58 @param sw_if_index - software index allocated for the new subinterface
60 define create_vlan_subif_reply
67 /** \brief Enable or Disable MPLS on and interface
68 @param client_index - opaque cookie to identify the sender
69 @param context - sender context, to match reply w/ request
70 @param sw_if_index - index of the interface
71 @param enable - if non-zero enable, else disable
73 define sw_interface_set_mpls_enable
81 /** \brief Reply for MPLS state on an interface
82 @param context - returned sender context, to match reply w/ request
83 @param retval - return code
85 define sw_interface_set_mpls_enable_reply
91 /** \brief MPLS Route Add / del route
92 @param client_index - opaque cookie to identify the sender
93 @param context - sender context, to match reply w/ request
94 @param mr_label - The MPLS label value
95 @param mr_eos - The End of stack bit
96 @param mr_table_id - The MPLS table-id the route is added in
97 @param mr_classify_table_index - If this is a classify route,
98 this is the classify table index
99 @param mr_create_table_if_needed - If the MPLS or IP tables do not exist,
101 @param mr_is_add - Is this a route add or delete
102 @param mr_is_classify - Is this route result a classify
103 @param mr_is_multipath - Is this route update a multipath - i.e. is this
104 a path addition to an existing route
105 @param mr_is_resolve_host - Recurse resolution constraint via a host prefix
106 @param mr_is_resolve_attached - Recurse resolution constraint via attached prefix
107 @param mr_next_hop_proto_is_ip4 - The next-hop is IPV4
108 @param mr_next_hop_weight - The weight, for UCMP
109 @param mr_next_hop[16] - the nextop address
110 @param mr_next_hop_sw_if_index - the next-hop SW interface
111 @param mr_next_hop_table_id - the next-hop table-id (if appropriate)
112 @param mr_next_hop_n_out_labels - the number of labels in the label stack
113 @param mr_next_hop_out_label_stack - the next-hop output label stack, outer most first
114 @param next_hop_via_label - The next-hop is a resolved via a local label
116 define mpls_route_add_del
123 u32 mr_classify_table_index;
124 u8 mr_create_table_if_needed;
128 u8 mr_is_resolve_host;
129 u8 mr_is_resolve_attached;
130 u8 mr_next_hop_proto_is_ip4;
131 u8 mr_next_hop_weight;
133 u8 mr_next_hop_n_out_labels;
134 u32 mr_next_hop_sw_if_index;
135 u32 mr_next_hop_table_id;
136 u32 mr_next_hop_via_label;
137 u32 mr_next_hop_out_label_stack[mr_next_hop_n_out_labels];
140 /** \brief Reply for MPLS route add / del request
141 @param context - returned sender context, to match reply w/ request
142 @param retval - return code
144 define mpls_route_add_del_reply
150 /** \brief Dump MPLS fib table
151 @param client_index - opaque cookie to identify the sender
160 @param sw_if_index - index of the interface
161 @param weight - The weight, for UCMP
162 @param is_local - local if non-zero, else remote
163 @param is_drop - Drop the packet
164 @param is_unreach - Drop the packet and rate limit send ICMP unreachable
165 @param is_prohibit - Drop the packet and rate limit send ICMP prohibited
166 @param afi - the afi of the next hop, IP46_TYPE_IP4=1, IP46_TYPE_IP6=2
167 @param next_hop[16] - the next hop address
169 WARNING: this type is replicated, pending cleanup completion
172 typeonly manual_print manual_endian define fib_path2
184 /** \brief mpls FIB table response
185 @param table_id - MPLS fib table id
186 @param s_bit - End-of-stack bit
187 @param label - MPLS label value
188 @param count - the number of fib_path in path
189 @param path - array of of fib_path structures
191 manual_endian manual_print define mpls_fib_details
198 vl_api_fib_path2_t path[count];
201 /** \brief Bind/Unbind an MPLS local label to an IP prefix. i.e. create
202 a per-prefix label entry.
203 @param client_index - opaque cookie to identify the sender
204 @param context - sender context, to match reply w/ request
205 @param mb_mpls_table_id - The MPLS table-id the MPLS entry will be added in
206 @param mb_label - The MPLS label value to bind
207 @param mb_ip_table_id - The IP table-id of the IP prefix to bind to.
208 @param mb_create_table_if_needed - Create either/both tables if required.
209 @param mb_is_bind - Bind or unbind
210 @param mb_is_ip4 - The prefix to bind to is IPv4
211 @param mb_address_length - Length of IP prefix
212 @param mb_address[16] - IP prefix/
214 define mpls_ip_bind_unbind
218 u32 mb_mpls_table_id;
221 u8 mb_create_table_if_needed;
224 u8 mb_address_length;
228 /** \brief Reply for MPLS IP bind/unbind request
229 @param context - returned sender context, to match reply w/ request
230 @param retval - return code
232 define mpls_ip_bind_unbind_reply
238 /** \brief MPLS tunnel Add / del route
239 @param client_index - opaque cookie to identify the sender
240 @param context - sender context, to match reply w/ request
241 @param mt_is_add - Is this a route add or delete
242 @param mt_sw_if_index - The SW interface index of the tunnel to delete
243 @param mt_next_hop_proto_is_ip4 - The next-hop is IPV4
244 @param mt_next_hop_weight - The weight, for UCMP
245 @param mt_next_hop[16] - the nextop address
246 @param mt_next_hop_sw_if_index - the next-hop SW interface
247 @param mt_next_hop_table_id - the next-hop table-id (if appropriate)
248 @param mt_next_hop_n_out_labels - the number of next-hop output labels
249 @param mt_next_hop_out_label_stack - the next-hop output label stack, outer most first
251 define mpls_tunnel_add_del
258 u8 mt_next_hop_proto_is_ip4;
259 u8 mt_next_hop_weight;
261 u8 mt_next_hop_n_out_labels;
262 u32 mt_next_hop_sw_if_index;
263 u32 mt_next_hop_table_id;
264 u32 mt_next_hop_out_label_stack[mt_next_hop_n_out_labels];
267 /** \brief Reply for MPLS tunnel add / del request
268 @param context - returned sender context, to match reply w/ request
269 @param retval - return code
270 @param sw_if_index - SW interface index of the tunnel created
272 define mpls_tunnel_add_del_reply
279 /** \brief Dump mpls eth tunnel table
280 @param client_index - opaque cookie to identify the sender
281 @param tunnel_index - eth tunnel identifier or -1 in case of all tunnels
283 define mpls_tunnel_dump
290 /** \brief mpls eth tunnel operational state response
291 @param tunnel_index - eth tunnel identifier
292 @param intfc_address - interface ipv4 addr
293 @param mask_width - interface ipv4 addr mask
294 @param hw_if_index - interface id
296 @param tunnel_dst_mac -
297 @param tx_sw_if_index -
298 @param encap_index - reference to mpls label table
299 @param nlabels - number of resolved labels
300 @param labels - resolved labels
302 define mpls_tunnel_details
308 u8 mt_next_hop_proto_is_ip4;
310 u32 mt_next_hop_sw_if_index;
311 u32 mt_next_hop_table_id;
312 u32 mt_next_hop_n_labels;
313 u32 mt_next_hop_out_labels[mt_next_hop_n_labels];
316 /** \brief Proxy ARP add / del request
317 @param client_index - opaque cookie to identify the sender
318 @param context - sender context, to match reply w/ request
319 @param vrf_id - VRF / Fib table ID
320 @param is_add - 1 if adding the Proxy ARP range, 0 if deleting
321 @param low_address[4] - Low address of the Proxy ARP range
322 @param hi_address[4] - High address of the Proxy ARP range
324 define proxy_arp_add_del
334 /** \brief Reply for proxy arp add / del request
335 @param context - returned sender context, to match reply w/ request
336 @param retval - return code
338 define proxy_arp_add_del_reply
344 /** \brief Proxy ARP add / del request
345 @param client_index - opaque cookie to identify the sender
346 @param context - sender context, to match reply w/ request
347 @param sw_if_index - Which interface to enable / disable Proxy Arp on
348 @param enable_disable - 1 to enable Proxy ARP on interface, 0 to disable
350 define proxy_arp_intfc_enable_disable
355 /* 1 = on, 0 = off */
359 /** \brief Reply for Proxy ARP interface enable / disable request
360 @param context - returned sender context, to match reply w/ request
361 @param retval - return code
363 define proxy_arp_intfc_enable_disable_reply
369 /** \brief Reset VRF (remove all routes etc) request
370 @param client_index - opaque cookie to identify the sender
371 @param context - sender context, to match reply w/ request
372 @param is_ipv6 - 1 for IPv6 neighbor, 0 for IPv4
373 @param vrf_id - ID of th FIB table / VRF to reset
383 /** \brief Reply for Reset VRF request
384 @param context - returned sender context, to match reply w/ request
385 @param retval - return code
387 define reset_vrf_reply
393 /** \brief Is Address Reachable request - DISABLED
394 @param client_index - opaque cookie to identify the sender
395 @param context - sender context, to match reply w/ request
396 @param next_hop_sw_if_index - index of interface used to get to next hop
397 @param is_ipv6 - 1 for IPv6, 0 for IPv4
398 @param is_error - address not found or does not match intf
399 @param address[] - Address in question
401 define is_address_reachable
403 u32 client_index; /* (api_main_t *) am->my_client_index */
405 u32 next_hop_sw_if_index;
406 u8 is_known; /* on reply, this is the answer */
408 u8 is_error; /* address not found or does not match intf */
412 /** \brief Want Stats, register for stats updates
413 @param client_index - opaque cookie to identify the sender
414 @param context - sender context, to match reply w/ request
415 @param enable_disable - 1 = enable stats, 0 = disable
416 @param pid - pid of process requesting stats updates
426 /** \brief Reply for Want Stats request
427 @param context - returned sender context, to match reply w/ request
428 @param retval - return code
430 define want_stats_reply
436 typeonly manual_print manual_endian define ip4_fib_counter
444 manual_print manual_endian define vnet_ip4_fib_counters
448 vl_api_ip4_fib_counter_t c[count];
451 typeonly manual_print manual_endian define ip6_fib_counter
459 manual_print manual_endian define vnet_ip6_fib_counters
463 vl_api_ip6_fib_counter_t c[count];
466 /** \brief Request for a single block of summary stats
467 @param client_index - opaque cookie to identify the sender
468 @param context - sender context, to match reply w/ request
470 define vnet_get_summary_stats
476 /** \brief Reply for vnet_get_summary_stats request
477 @param context - sender context, to match reply w/ request
478 @param retval - return code for request
483 define vnet_summary_stats_reply
492 /** \brief OAM event structure
493 @param dst_address[] -
502 /** \brief Want OAM events request
503 @param client_index - opaque cookie to identify the sender
504 @param context - sender context, to match reply w/ request
505 @param enable_disable- enable if non-zero, else disable
506 @param pid - pid of the requesting process
508 define want_oam_events
516 /** \brief Want OAM events response
517 @param context - sender context, to match reply w/ request
518 @param retval - return code for the want oam stats request
520 define want_oam_events_reply
526 /** \brief OAM add / del target request
527 @param client_index - opaque cookie to identify the sender
528 @param context - sender context, to match reply w/ request
529 @param vrf_id - vrf_id of the target
530 @param src_address[] - source address to use for the updates
531 @param dst_address[] - destination address of the target
532 @param is_add - add target if non-zero, else delete
544 /** \brief OAM add / del target response
545 @param context - sender context, to match reply w/ request
546 @param retval - return code of the request
548 define oam_add_del_reply
554 /** \brief Reset fib table request
555 @param client_index - opaque cookie to identify the sender
556 @param context - sender context, to match reply w/ request
557 @param vrf_id - vrf/table id of the fib table to reset
558 @param is_ipv6 - an ipv6 fib to reset if non-zero, else ipv4
568 /** \brief Reset fib response
569 @param context - sender context, to match reply w/ request
570 @param retval - return code for the reset bfib request
572 define reset_fib_reply
578 /** \brief DHCP Proxy config add / del request
579 @param client_index - opaque cookie to identify the sender
580 @param context - sender context, to match reply w/ request
581 @param vrf_id - vrf id
582 @param if_ipv6 - ipv6 if non-zero, else ipv4
583 @param is_add - add the config if non-zero, else delete
584 @param insert_circuit_id - option82 suboption 1 fib number
585 @param dhcp_server[] - server address
586 @param dhcp_src_address[] - <fix this, need details>
588 define dhcp_proxy_config
595 u8 insert_circuit_id;
597 u8 dhcp_src_address[16];
600 /** \brief DHCP Proxy config response
601 @param context - sender context, to match reply w/ request
602 @param retval - return code for the request
604 define dhcp_proxy_config_reply
610 /** \brief DHCP Proxy set / unset vss request
611 @param client_index - opaque cookie to identify the sender
612 @param context - sender context, to match reply w/ request
613 @param tbl_id - table id
614 @param oui - first part of vpn id
615 @param fib_id - second part of vpn id
616 @param is_ipv6 - ip6 if non-zero, else ip4
617 @param is_add - set vss if non-zero, else delete
619 define dhcp_proxy_set_vss
630 /** \brief DHCP proxy set / unset vss response
631 @param context - sender context, to match reply w/ request
632 @param retval - return code for the request
634 define dhcp_proxy_set_vss_reply
640 /** \brief Create loopback interface request
641 @param client_index - opaque cookie to identify the sender
642 @param context - sender context, to match reply w/ request
643 @param mac_address - mac addr to assign to the interface if none-zero
645 define create_loopback
652 /** \brief Create loopback interface response
653 @param context - sender context, to match reply w/ request
654 @param sw_if_index - sw index of the interface that was created
655 @param retval - return code for the request
657 define create_loopback_reply
664 /** \brief Delete loopback interface request
665 @param client_index - opaque cookie to identify the sender
666 @param context - sender context, to match reply w/ request
667 @param sw_if_index - sw index of the interface that was created
669 define delete_loopback
676 /** \brief Delete loopback interface response
677 @param context - sender context, to match reply w/ request
678 @param retval - return code for the request
680 define delete_loopback_reply
686 /** \brief Control ping from client to api server request
687 @param client_index - opaque cookie to identify the sender
688 @param context - sender context, to match reply w/ request
696 /** \brief Control ping from the client to the server response
697 @param client_index - opaque cookie to identify the sender
698 @param context - sender context, to match reply w/ request
699 @param retval - return code for the request
700 @param vpe_pid - the pid of the vpe, returned by the server
702 define control_ping_reply
710 /** \brief Process a vpe parser cli string request
711 @param client_index - opaque cookie to identify the sender
712 @param context - sender context, to match reply w/ request
713 @param cmd_in_shmem - pointer to cli command string
729 /** \brief vpe parser cli string response
730 @param context - sender context, to match reply w/ request
731 @param retval - return code for request
732 @param reply_in_shmem - Reply string from cli processing if any
740 define cli_inband_reply
748 /** \brief Set max allowed ARP or ip6 neighbor entries request
749 @param client_index - opaque cookie to identify the sender
750 @param context - sender context, to match reply w/ request
751 @param is_ipv6 - neighbor limit if non-zero, else ARP limit
752 @param arp_neighbor_limit - the new limit, defaults are ~ 50k
754 define set_arp_neighbor_limit
759 u32 arp_neighbor_limit;
762 /** \brief Set max allowed ARP or ip6 neighbor entries response
763 @param context - sender context, to match reply w/ request
764 @param retval - return code for request
766 define set_arp_neighbor_limit_reply
772 /** \brief L2 interface patch add / del request
773 @param client_index - opaque cookie to identify the sender
774 @param context - sender context, to match reply w/ request
775 @param rx_sw_if_index - receive side interface
776 @param tx_sw_if_index - transmit side interface
777 @param is_add - if non-zero set up the interface patch, else remove it
779 define l2_patch_add_del
788 /** \brief L2 interface patch add / del response
789 @param context - sender context, to match reply w/ request
790 @param retval - return code for the request
792 define l2_patch_add_del_reply
798 /** \brief IPv6 segment routing tunnel add / del request
799 @param client_index - opaque cookie to identify the sender
800 @param context - sender context, to match reply w/ request
801 @param is_add - add the tunnel if non-zero, else delete it
802 @param name[] - tunnel name (len. 64)
803 @param src_address[] -
804 @param dst_address[] -
805 @param dst_mask_width -
806 @param inner_vrf_id -
807 @param outer_vrf_id -
808 @param flags_net_byte_order -
811 @param segs_and_tags[] -
812 @param policy_name[] - name of policy to associate this tunnel to (len. 64)
814 define sr_tunnel_add_del
825 u16 flags_net_byte_order;
832 /** \brief IPv6 segment routing tunnel add / del response
833 @param context - sender context, to match reply w/ request
834 @param retval - return value for request
836 define sr_tunnel_add_del_reply
842 /** \brief IPv6 segment routing policy add / del request
843 @param client_index - opaque cookie to identify the sender
844 @param context - sender context, to match reply w/ request
845 @param is_add - add the tunnel if non-zero, else delete it
846 @param name[] - policy name (len. 64)
847 @param tunnel_names[] -
849 define sr_policy_add_del
858 /** \brief IPv6 segment routing policy add / del response
859 @param context - sender context, to match reply w/ request
860 @param retval - return value for request
862 define sr_policy_add_del_reply
868 /** \brief IPv6 segment routing multicast map to policy add / del request
869 @param client_index - opaque cookie to identify the sender
870 @param context - sender context, to match reply w/ request
871 @param is_add - add the tunnel if non-zero, else delete it
872 @param multicast_address[] - IP6 multicast address
873 @param policy_name[] = policy name (len.64)
875 define sr_multicast_map_add_del
880 u8 multicast_address[16];
884 /** \brief IPv6 segment routing multicast map to policy add / del response
885 @param context - sender context, to match reply w/ request
886 @param retval - return value for request
888 define sr_multicast_map_add_del_reply
894 /** \brief Interface set vpath request
895 @param client_index - opaque cookie to identify the sender
896 @param context - sender context, to match reply w/ request
897 @param sw_if_index - interface used to reach neighbor
898 @param enable - if non-zero enable, else disable
900 define sw_interface_set_vpath
908 /** \brief Interface set vpath response
909 @param context - sender context, to match reply w/ request
910 @param retval - return code for the request
912 define sw_interface_set_vpath_reply
918 /** \brief Set L2 XConnect between two interfaces request
919 @param client_index - opaque cookie to identify the sender
920 @param context - sender context, to match reply w/ request
921 @param rx_sw_if_index - Receive interface index
922 @param tx_sw_if_index - Transmit interface index
923 @param enable - enable xconnect if not 0, else set to L3 mode
925 define sw_interface_set_l2_xconnect
934 /** \brief Set L2 XConnect response
935 @param context - sender context, to match reply w/ request
936 @param retval - L2 XConnect request return code
938 define sw_interface_set_l2_xconnect_reply
944 /** \brief Interface bridge mode request
945 @param client_index - opaque cookie to identify the sender
946 @param context - sender context, to match reply w/ request
947 @param rx_sw_if_index - the interface
948 @param bd_id - bridge domain id
949 @param bvi - Setup interface as a bvi, bridge mode only
950 @param shg - Shared horizon group, for bridge mode only
951 @param enable - Enable beige mode if not 0, else set to L3 mode
953 define sw_interface_set_l2_bridge
964 /** \brief Interface bridge mode response
965 @param context - sender context, to match reply w/ request
966 @param retval - Bridge mode request return code
968 define sw_interface_set_l2_bridge_reply
974 /** \brief L2 FIB add entry request
975 @param client_index - opaque cookie to identify the sender
976 @param context - sender context, to match reply w/ request
977 @param mac - the entry's mac address
978 @param bd_id - the entry's bridge domain id
979 @param sw_if_index - the interface
980 @param is_add - If non zero add the entry, else delete it
997 /** \brief L2 FIB add entry response
998 @param context - sender context, to match reply w/ request
999 @param retval - return code for the add l2fib entry request
1001 define l2fib_add_del_reply
1007 /** \brief Set L2 flags request !!! TODO - need more info, feature bits in l2_input.h
1008 @param client_index - opaque cookie to identify the sender
1009 @param context - sender context, to match reply w/ request
1010 @param sw_if_index - interface
1011 @param is_set - if non-zero, set the bits, else clear them
1012 @param feature_bitmap - non-zero bits to set or clear
1023 /** \brief Set L2 bits response
1024 @param context - sender context, to match reply w/ request
1025 @param retval - return code for the set l2 bits request
1027 define l2_flags_reply
1031 u32 resulting_feature_bitmap;
1034 /** \brief Set bridge flags (such as L2_LEARN, L2_FWD, L2_FLOOD,
1035 L2_UU_FLOOD, or L2_ARP_TERM) request
1036 @param client_index - opaque cookie to identify the sender
1037 @param context - sender context, to match reply w/ request
1038 @param bd_id - the bridge domain to set the flags for
1039 @param is_set - if non-zero, set the flags, else clear them
1040 @param feature_bitmap - bits that are non-zero to set or clear
1051 /** \brief Set bridge flags response
1052 @param context - sender context, to match reply w/ request
1053 @param retval - return code for the set bridge flags request
1054 @param resulting_feature_bitmap - the feature bitmap value after the request is implemented
1056 define bridge_flags_reply
1060 u32 resulting_feature_bitmap;
1063 /** \brief Set bridge domain ip to mac entry request
1064 @param client_index - opaque cookie to identify the sender
1065 @param context - sender context, to match reply w/ request
1066 @param bd_id - the bridge domain to set the flags for
1067 @param is_add - if non-zero, add the entry, else clear it
1068 @param is_ipv6 - if non-zero, ipv6 address, else ipv4 address
1069 @param mac_address - MAC address
1072 define bd_ip_mac_add_del
1083 /** \brief Set bridge domain ip to mac entry response
1084 @param context - sender context, to match reply w/ request
1085 @param retval - return code for the set bridge flags request
1087 define bd_ip_mac_add_del_reply
1093 /** \brief Add/Delete classification table request
1094 @param client_index - opaque cookie to identify the sender
1095 @param context - sender context, to match reply w/ request
1096 @param is_add- if non-zero add the table, else delete it
1097 @param del_chain - if non-zero delete the whole chain of tables
1098 @param table_index - if add, reuturns index of the created table, else specifies the table to delete
1099 @param nbuckets - number of buckets when adding a table
1100 @param memory_size - memory size when adding a table
1101 @param match_n_vectors - number of match vectors
1102 @param next_table_index - index of next table
1103 @param miss_next_index - index of miss table
1104 @param current_data_flag - option to use current node's packet payload
1105 as the starting point from where packets are classified,
1106 This option is only valid for L2/L3 input ACL for now.
1107 0: by default, classify data from the buffer's start location
1108 1: classify packets from VPP node’s current data pointer
1109 @param current_data_offset - a signed value to shift the start location of
1110 the packet to be classified
1111 For example, if input IP ACL node is used, L2 header’s first byte
1112 can be accessible by configuring current_data_offset to -14
1113 if there is no vlan tag.
1114 This is valid only if current_data_flag is set to 1.
1115 @param mask[] - match mask
1117 define classify_add_del_table
1127 u32 match_n_vectors;
1128 u32 next_table_index;
1129 u32 miss_next_index;
1130 u32 current_data_flag;
1131 i32 current_data_offset;
1135 /** \brief Add/Delete classification table response
1136 @param context - sender context, to match reply w/ request
1137 @param retval - return code for the table add/del requst
1138 @param new_table_index - for add, returned index of the new table
1139 @param skip_n_vectors - for add, returned value of skip_n_vectors in table
1140 @param match_n_vectors -for add, returned value of match_n_vectors in table
1142 define classify_add_del_table_reply
1146 u32 new_table_index;
1148 u32 match_n_vectors;
1151 /** \brief Classify add / del session request
1152 @param client_index - opaque cookie to identify the sender
1153 @param context - sender context, to match reply w/ request
1154 @param is_add - add session if non-zero, else delete
1155 @param table_index - index of the table to add/del the session, required
1156 @param hit_next_index - for add, hit_next_index of new session, required
1157 @param opaque_index - for add, opaque_index of new session
1158 @param advance -for add, advance value for session
1160 0: no action (by default)
1161 metadata is not used.
1162 1: Classified IP packets will be looked up from the
1163 specified ipv4 fib table (configured by metadata as VRF id).
1164 Only valid for L3 input ACL node
1165 2: Classified IP packets will be looked up from the
1166 specified ipv6 fib table (configured by metadata as VRF id).
1167 Only valid for L3 input ACL node
1168 @param metadata - valid only if action != 0
1169 VRF id if action is 1 or 2.
1170 @param match[] - for add, match value for session, required
1172 define classify_add_del_session
1186 /** \brief Classify add / del session response
1187 @param context - sender context, to match reply w/ request
1188 @param retval - return code for the add/del session request
1190 define classify_add_del_session_reply
1196 /** \brief Set/unset the classification table for an interface request
1197 @param client_index - opaque cookie to identify the sender
1198 @param context - sender context, to match reply w/ request
1199 @param is_ipv6 - ipv6 if non-zero, else ipv4
1200 @param sw_if_index - interface to associate with the table
1201 @param table_index - index of the table, if ~0 unset the table
1203 define classify_set_interface_ip_table
1209 u32 table_index; /* ~0 => off */
1212 /** \brief Set/unset interface classification table response
1213 @param context - sender context, to match reply w/ request
1214 @param retval - return code
1216 define classify_set_interface_ip_table_reply
1222 /** \brief Set/unset l2 classification tables for an interface request
1223 @param client_index - opaque cookie to identify the sender
1224 @param context - sender context, to match reply w/ request
1225 @param sw_if_index - interface to set/unset tables for
1226 @param ip4_table_index - ip4 index, use ~0 for all 3 indexes to unset
1227 @param ip6_table_index - ip6 index
1228 @param other_table_index - other index
1230 define classify_set_interface_l2_tables
1236 u32 ip4_table_index;
1237 u32 ip6_table_index;
1238 u32 other_table_index;
1242 /** \brief Set/unset l2 classification tables for an interface response
1243 @param context - sender context, to match reply w/ request
1244 @param retval - return code for the request
1246 define classify_set_interface_l2_tables_reply
1252 /** \brief Get node index using name request
1253 @param client_index - opaque cookie to identify the sender
1254 @param context - sender context, to match reply w/ request
1255 @param node_name[] - name of the node
1257 define get_node_index
1264 /** \brief Get node index using name request
1265 @param context - sender context, to match reply w/ request
1266 @param retval - return code for the request
1267 @param node_index - index of the desired node if found, else ~0
1269 define get_node_index_reply
1276 /** \brief Set the next node for a given node request
1277 @param client_index - opaque cookie to identify the sender
1278 @param context - sender context, to match reply w/ request
1279 @param node_name[] - node to add the next node to
1280 @param next_name[] - node to add as the next node
1282 define add_node_next
1290 /** \brief IP Set the next node for a given node response
1291 @param context - sender context, to match reply w/ request
1292 @param retval - return code for the add next node request
1293 @param next_index - the index of the next node if success, else ~0
1295 define add_node_next_reply
1302 /** \brief DHCP Proxy config 2 add / del request
1303 @param client_index - opaque cookie to identify the sender
1304 @param context - sender context, to match reply w/ request
1305 @param rx_vrf_id - receive vrf id
1306 @param server_vrf_id - server vrf id
1307 @param if_ipv6 - ipv6 if non-zero, else ipv4
1308 @param is_add - add the config if non-zero, else delete
1309 @param insert_circuit_id - option82 suboption 1 fib number
1310 @param dhcp_server[] - server address
1311 @param dhcp_src_address[] - <fix this, need details>
1313 define dhcp_proxy_config_2
1321 u8 insert_circuit_id;
1323 u8 dhcp_src_address[16];
1326 /** \brief DHCP Proxy config 2 add / del response
1327 @param context - sender context, to match reply w/ request
1328 @param retval - return code for request
1330 define dhcp_proxy_config_2_reply
1336 /** \brief L2 fib clear table request, clear all mac entries in the l2 fib
1337 @param client_index - opaque cookie to identify the sender
1338 @param context - sender context, to match reply w/ request
1340 define l2_fib_clear_table
1346 /** \brief L2 fib clear table response
1347 @param context - sender context, to match reply w/ request
1348 @param retval - return code for the request
1350 define l2_fib_clear_table_reply
1356 /** \brief L2 interface ethernet flow point filtering enable/disable request
1357 @param client_index - opaque cookie to identify the sender
1358 @param context - sender context, to match reply w/ request
1359 @param sw_if_index - interface to enable/disable filtering on
1360 @param enable_disable - if non-zero enable filtering, else disable
1362 define l2_interface_efp_filter
1370 /** \brief L2 interface ethernet flow point filtering response
1371 @param context - sender context, to match reply w/ request
1372 @param retval - return code for the request
1374 define l2_interface_efp_filter_reply
1380 /** \brief L2 interface vlan tag rewrite configure request
1381 @param client_index - opaque cookie to identify the sender
1382 @param context - sender context, to match reply w/ request
1383 @param sw_if_index - interface the operation is applied to
1384 @param vtr_op - Choose from l2_vtr_op_t enum values
1385 @param push_dot1q - first pushed flag dot1q id set, else dot1ad
1386 @param tag1 - Needed for any push or translate vtr op
1387 @param tag2 - Needed for any push 2 or translate x-2 vtr ops
1389 define l2_interface_vlan_tag_rewrite
1395 u32 push_dot1q; // ethertype of first pushed tag is dot1q/dot1ad
1396 u32 tag1; // first pushed tag
1397 u32 tag2; // second pushed tag
1400 /** \brief L2 interface vlan tag rewrite response
1401 @param context - sender context, to match reply w/ request
1402 @param retval - return code for the request
1404 define l2_interface_vlan_tag_rewrite_reply
1417 /* These fields map directly onto the subif template */
1421 u8 dot1ad; // 0 = dot1q, 1=dot1ad
1424 u8 outer_vlan_id_any;
1425 u8 inner_vlan_id_any;
1430 define create_subif_reply
1437 /** \brief show version
1438 @param client_index - opaque cookie to identify the sender
1439 @param context - sender context, to match reply w/ request
1447 /** \brief show version response
1448 @param context - sender context, to match reply w/ request
1449 @param retval - return code for the request
1450 @param program - name of the program (vpe)
1451 @param version - version of the program
1452 @param build_directory - root of the workspace where the program was built
1454 define show_version_reply
1461 u8 build_directory[256];
1464 /** \brief l2 fib table entry structure
1465 @param bd_id - the l2 fib / bridge domain table id
1466 @param mac - the entry's mac address
1467 @param sw_if_index - index of the interface
1468 @param static_mac - the entry is statically configured.
1469 @param filter_mac - the entry is a mac filter entry.
1470 @param bvi_mac - the mac address is a bridge virtual interface
1472 define l2_fib_table_entry
1483 /** \brief Dump l2 fib (aka bridge domain) table
1484 @param client_index - opaque cookie to identify the sender
1485 @param bd_id - the l2 fib / bridge domain table identifier
1487 define l2_fib_table_dump
1494 /** \brief add or delete lisp gpe tunnel
1495 @param client_index - opaque cookie to identify the sender
1496 @param context - sender context, to match reply w/ request
1497 @param is_add - add address if non-zero, else delete
1502 @param rmt_eid - remote eid
1503 @param lcl_eid - local eid
1504 @param rmt_len - remote prefix len
1505 @param lcl_len - local prefix len
1506 @param vni - virtual network identifier
1507 @param dp_table - vrf/bridge domain id
1508 @param loc_num - number of locators
1509 @param lcl_locs - array of local locators
1510 @param rmt_locs - array of remote locators
1511 @param action - negative action when 0 locators configured
1513 define lisp_gpe_add_del_fwd_entry
1526 u8 lcl_locs[loc_num];
1527 u8 rmt_locs[loc_num];
1531 /** \brief Reply for gpe_fwd_entry add/del
1532 @param context - returned sender context, to match reply w/ request
1533 @param retval - return code
1535 define lisp_gpe_add_del_fwd_entry_reply
1541 /** \brief add or delete gpe_iface
1542 @param client_index - opaque cookie to identify the sender
1543 @param context - sender context, to match reply w/ request
1544 @param is_add - add address if non-zero, else delete
1546 define lisp_gpe_add_del_iface
1556 /** \brief Reply for gpe_iface add/del
1557 @param context - returned sender context, to match reply w/ request
1558 @param retval - return code
1560 define lisp_gpe_add_del_iface_reply
1566 define lisp_gpe_tunnel_details
1572 u8 destination_ip[16];
1584 /** \brief Request for gpe tunnel summary status
1585 @param client_index - opaque cookie to identify the sender
1586 @param context - sender context, to match reply w/ request
1588 define lisp_gpe_tunnel_dump
1594 /* Gross kludge, DGMS */
1595 define interface_name_renumber
1600 u32 new_show_dev_instance;
1603 define interface_name_renumber_reply
1609 /** \brief Register for ip4 arp resolution events
1610 @param client_index - opaque cookie to identify the sender
1611 @param context - sender context, to match reply w/ request
1612 @param enable_disable - 1 => register for events, 0 => cancel registration
1613 @param pid - sender's pid
1614 @param address - the exact ip4 address of interest
1616 define want_ip4_arp_events
1625 /** \brief Reply for interface events registration
1626 @param context - returned sender context, to match reply w/ request
1627 @param retval - return code
1629 define want_ip4_arp_events_reply
1635 /** \brief Tell client about an ip4 arp resolution event
1636 @param client_index - opaque cookie to identify the sender
1637 @param context - sender context, to match reply w/ request
1638 @param address - the exact ip4 address of interest
1639 @param pid - client pid registered to receive notification
1640 @param sw_if_index - interface which received ARP packet
1641 @param new_mac - the new mac address
1642 @param mac_ip - 0: resolution event, 1: mac/ip binding in bd
1644 define ip4_arp_event
1655 /** \brief Register for ip6 nd resolution events
1656 @param client_index - opaque cookie to identify the sender
1657 @param context - sender context, to match reply w/ request
1658 @param enable_disable - 1 => register for events, 0 => cancel registration
1659 @param pid - sender's pid
1660 @param address - the exact ip6 address of interest
1662 define want_ip6_nd_events
1671 /** \brief Reply for ip6 nd resolution events registration
1672 @param context - returned sender context, to match reply w/ request
1673 @param retval - return code
1675 define want_ip6_nd_events_reply
1681 /** \brief Tell client about an ip6 nd resolution or mac/ip event
1682 @param client_index - opaque cookie to identify the sender
1683 @param context - sender context, to match reply w/ request
1684 @param pid - client pid registered to receive notification
1685 @param sw_if_index - interface which received ARP packet
1686 @param address - the exact ip6 address of interest
1687 @param new_mac - the new mac address
1688 @param mac_ip - 0: resolution event, 1: mac/ip binding in bd
1701 /** \brief L2 bridge domain add or delete request
1702 @param client_index - opaque cookie to identify the sender
1703 @param context - sender context, to match reply w/ request
1704 @param bd_id - the bridge domain to create
1705 @param flood - enable/disable bcast/mcast flooding in the bd
1706 @param uu_flood - enable/disable uknown unicast flood in the bd
1707 @param forward - enable/disable forwarding on all interfaces in the bd
1708 @param learn - enable/disable learning on all interfaces in the bd
1709 @param arp_term - enable/disable arp termination in the bd
1710 @param mac_age - mac aging time in min, 0 for disabled
1711 @param is_add - add or delete flag
1713 define bridge_domain_add_del
1727 /** \brief L2 bridge domain add or delete response
1728 @param context - sender context, to match reply w/ request
1729 @param retval - return code for the set bridge flags request
1731 define bridge_domain_add_del_reply
1737 /** \brief L2 bridge domain request operational state details
1738 @param client_index - opaque cookie to identify the sender
1739 @param context - sender context, to match reply w/ request
1740 @param bd_id - the bridge domain id desired or ~0 to request all bds
1742 define bridge_domain_dump
1749 /** \brief L2 bridge domain operational state response
1750 @param bd_id - the bridge domain id
1751 @param flood - bcast/mcast flooding state on all interfaces in the bd
1752 @param uu_flood - uknown unicast flooding state on all interfaces in the bd
1753 @param forward - forwarding state on all interfaces in the bd
1754 @param learn - learning state on all interfaces in the bd
1755 @param arp_term - arp termination state on all interfaces in the bd
1756 @param mac_age - mac aging time in min, 0 for disabled
1757 @param n_sw_ifs - number of sw_if_index's in the domain
1759 define bridge_domain_details
1769 u32 bvi_sw_if_index;
1773 /** \brief L2 bridge domain sw interface operational state response
1774 @param bd_id - the bridge domain id
1775 @param sw_if_index - sw_if_index in the domain
1776 @param shg - split horizon group for the interface
1778 define bridge_domain_sw_if_details
1786 /** \brief DHCP Client config add / del request
1787 @param client_index - opaque cookie to identify the sender
1788 @param context - sender context, to match reply w/ request
1789 @param sw_if_index - index of the interface for DHCP client
1790 @param hostname - hostname
1791 @param is_add - add the config if non-zero, else delete
1792 @param want_dhcp_event - DHCP event sent to the sender
1793 via dhcp_compl_event API message if non-zero
1794 @param pid - sender's pid
1796 define dhcp_client_config
1807 /** \brief DHCP Client config response
1808 @param context - sender context, to match reply w/ request
1809 @param retval - return code for the request
1811 define dhcp_client_config_reply
1817 /** \brief Set/unset input ACL interface
1818 @param client_index - opaque cookie to identify the sender
1819 @param context - sender context, to match reply w/ request
1820 @param sw_if_index - interface to set/unset input ACL
1821 @param ip4_table_index - ip4 classify table index (~0 for skip)
1822 @param ip6_table_index - ip6 classify table index (~0 for skip)
1823 @param l2_table_index - l2 classify table index (~0 for skip)
1824 @param is_add - Set input ACL if non-zero, else unset
1825 Note: User is recommeneded to use just one valid table_index per call.
1826 (ip4_table_index, ip6_table_index, or l2_table_index)
1828 define input_acl_set_interface
1833 u32 ip4_table_index;
1834 u32 ip6_table_index;
1839 /** \brief Set/unset input ACL interface response
1840 @param context - sender context, to match reply w/ request
1841 @param retval - return code for the request
1843 define input_acl_set_interface_reply
1849 /** \brief Tell client about a DHCP completion event
1850 @param client_index - opaque cookie to identify the sender
1851 @param pid - client pid registered to receive notification
1852 @param is_ipv6 - if non-zero the address is ipv6, else ipv4
1853 @param host_address - Host IP address
1854 @param router_address - Router IP address
1855 @param host_mac - Host MAC address
1857 define dhcp_compl_event
1863 u8 host_address[16];
1864 u8 router_address[16];
1868 /** \brief cop: enable/disable junk filtration features on an interface
1869 @param client_index - opaque cookie to identify the sender
1870 @param context - sender context, to match reply w/ request
1871 @param sw_if_inded - desired interface
1872 @param enable_disable - 1 => enable, 0 => disable
1875 define cop_interface_enable_disable
1883 /** \brief cop: interface enable/disable junk filtration reply
1884 @param context - returned sender context, to match reply w/ request
1885 @param retval - return code
1888 define cop_interface_enable_disable_reply
1894 /** \brief cop: enable/disable whitelist filtration features on an interface
1895 Note: the supplied fib_id must match in order to remove the feature!
1897 @param client_index - opaque cookie to identify the sender
1898 @param context - sender context, to match reply w/ request
1899 @param sw_if_index - interface handle, physical interfaces only
1900 @param fib_id - fib identifier for the whitelist / blacklist fib
1901 @param ip4 - 1 => enable ip4 filtration, 0=> disable ip4 filtration
1902 @param ip6 - 1 => enable ip6 filtration, 0=> disable ip6 filtration
1903 @param default_cop - 1 => enable non-ip4, non-ip6 filtration 0=> disable it
1906 define cop_whitelist_enable_disable
1917 /** \brief cop: interface enable/disable junk filtration reply
1918 @param context - returned sender context, to match reply w/ request
1919 @param retval - return code
1922 define cop_whitelist_enable_disable_reply
1928 /** \brief get_node_graph - get a copy of the vpp node graph
1929 including the current set of graph arcs.
1931 @param client_index - opaque cookie to identify the sender
1932 @param context - sender context, to match reply w/ request
1935 define get_node_graph
1941 /** \brief get_node_graph_reply
1942 @param context - returned sender context, to match reply w/ request
1943 @param retval - return code
1944 @param reply_in_shmem - result from vlib_node_serialize, in shared
1945 memory. Process with vlib_node_unserialize, remember to switch
1946 heaps and free the result.
1949 define get_node_graph_reply
1956 /** \brief IOAM enable : Enable in-band OAM
1957 @param id - profile id
1958 @param seqno - To enable Seqno Processing
1959 @param analyse - Enabling analysis of iOAM at decap node
1960 @param pow_enable - Proof of Work enabled or not flag
1961 @param trace_enable - iOAM Trace enabled or not flag
1975 /** \brief iOAM Trace profile add / del response
1976 @param context - sender context, to match reply w/ request
1977 @param retval - return value for request
1979 define ioam_enable_reply
1985 /** \brief iOAM disable
1986 @param client_index - opaque cookie to identify the sender
1987 @param context - sender context, to match reply w/ request
1988 @param index - MAP Domain index
1997 /** \brief iOAM disable response
1998 @param context - sender context, to match reply w/ request
1999 @param retval - return value for request
2001 define ioam_disable_reply
2007 /** \brief Add/del policer
2008 @param client_index - opaque cookie to identify the sender
2009 @param context - sender context, to match reply w/ request
2010 @param is_add - add policer if non-zero, else delete
2011 @param name - policer name
2014 @param cb - Committed Burst
2015 @param eb - Excess or Peak Burst
2016 @param rate_type - rate type
2017 @param round_type - rounding type
2018 @param type - policer algorithm
2019 @param color_aware - 0=color-blind, 1=color-aware
2020 @param conform_action_type - conform action type
2021 @param conform_dscp - DSCP for conform mar-and-transmit action
2022 @param exceed_action_type - exceed action type
2023 @param exceed_dscp - DSCP for exceed mar-and-transmit action
2024 @param violate_action_type - violate action type
2025 @param violate_dscp - DSCP for violate mar-and-transmit action
2027 define policer_add_del
2042 u8 conform_action_type;
2044 u8 exceed_action_type;
2046 u8 violate_action_type;
2050 /** \brief Add/del policer response
2051 @param context - sender context, to match reply w/ request
2052 @param retval - return value for request
2053 @param policer_index - for add, returned index of the new policer
2055 define policer_add_del_reply
2062 /** \brief Get list of policers
2063 @param client_index - opaque cookie to identify the sender
2064 @param context - sender context, to match reply w/ request
2065 @param match_name_valid - if 0 request all policers otherwise use match_name
2066 @param match_name - policer name
2073 u8 match_name_valid;
2077 /** \brief Policer operational state response.
2078 @param context - sender context, to match reply w/ request
2079 @param name - policer name
2082 @param cb - Committed Burst
2083 @param eb - Excess or Peak Burst
2084 @param rate_type - rate type
2085 @param round_type - rounding type
2086 @param type - policer algorithm
2087 @param conform_action_type - conform action type
2088 @param conform_dscp - DSCP for conform mar-and-transmit action
2089 @param exceed_action_type - exceed action type
2090 @param exceed_dscp - DSCP for exceed mar-and-transmit action
2091 @param violate_action_type - violate action type
2092 @param violate_dscp - DSCP for violate mar-and-transmit action
2093 @param single_rate - 1 = single rate policer, 0 = two rate policer
2094 @param color_aware - for hierarchical policing
2095 @param scale - power-of-2 shift amount for lower rates
2096 @param cir_tokens_per_period - number of tokens for each period
2097 @param pir_tokens_per_period - number of tokens for each period for 2-rate policer
2098 @param current_limit - current limit
2099 @param current_bucket - current bucket
2100 @param extended_limit - extended limit
2101 @param extended_bucket - extended bucket
2102 @param last_update_time - last update time
2104 define policer_details
2116 u8 conform_action_type;
2118 u8 exceed_action_type;
2120 u8 violate_action_type;
2125 u32 cir_tokens_per_period;
2126 u32 pir_tokens_per_period;
2130 u32 extended_bucket;
2131 u64 last_update_time;
2134 /** \brief Set/unset policer classify interface
2135 @param client_index - opaque cookie to identify the sender
2136 @param context - sender context, to match reply w/ request
2137 @param sw_if_index - interface to set/unset policer classify
2138 @param ip4_table_index - ip4 classify table index (~0 for skip)
2139 @param ip6_table_index - ip6 classify table index (~0 for skip)
2140 @param l2_table_index - l2 classify table index (~0 for skip)
2141 @param is_add - Set if non-zero, else unset
2142 Note: User is recommeneded to use just one valid table_index per call.
2143 (ip4_table_index, ip6_table_index, or l2_table_index)
2145 define policer_classify_set_interface
2150 u32 ip4_table_index;
2151 u32 ip6_table_index;
2156 /** \brief Set/unset policer classify interface response
2157 @param context - sender context, to match reply w/ request
2158 @param retval - return value for request
2160 define policer_classify_set_interface_reply
2166 /** \brief Get list of policer classify interfaces and tables
2167 @param client_index - opaque cookie to identify the sender
2168 @param context - sender context, to match reply w/ request
2169 @param type - classify table type
2171 define policer_classify_dump
2178 /** \brief Policer iclassify operational state response.
2179 @param context - sender context, to match reply w/ request
2180 @param sw_if_index - software interface index
2181 @param table_index - classify table index
2183 define policer_classify_details
2190 /** \brief Classify get table IDs request
2191 @param client_index - opaque cookie to identify the sender
2192 @param context - sender context, to match reply w/ request
2194 define classify_table_ids
2200 /** \brief Reply for classify get table IDs request
2201 @param context - sender context which was passed in the request
2202 @param count - number of ids returned in response
2203 @param ids - array of classify table ids
2205 define classify_table_ids_reply
2213 /** \brief Classify table ids by interface index request
2214 @param client_index - opaque cookie to identify the sender
2215 @param context - sender context, to match reply w/ request
2216 @param sw_if_index - index of the interface
2218 define classify_table_by_interface
2225 /** \brief Reply for classify table id by interface index request
2226 @param context - sender context which was passed in the request
2227 @param count - number of ids returned in response
2228 @param sw_if_index - index of the interface
2229 @param l2_table_id - l2 classify table index
2230 @param ip4_table_id - ip4 classify table index
2231 @param ip6_table_id - ip6 classify table index
2233 define classify_table_by_interface_reply
2243 /** \brief Classify table info
2244 @param client_index - opaque cookie to identify the sender
2245 @param context - sender context, to match reply w/ request
2246 @param table_id - classify table index
2248 define classify_table_info
2255 /** \brief Reply for classify table info request
2256 @param context - sender context which was passed in the request
2257 @param count - number of ids returned in response
2258 @param table_id - classify table index
2259 @param nbuckets - number of buckets when adding a table
2260 @param match_n_vectors - number of match vectors
2261 @param skip_n_vectors - number of skip_n_vectors
2262 @param active_sessions - number of sessions (active entries)
2263 @param next_table_index - index of next table
2264 @param miss_next_index - index of miss table
2265 @param mask[] - match mask
2267 define classify_table_info_reply
2273 u32 match_n_vectors;
2275 u32 active_sessions;
2276 u32 next_table_index;
2277 u32 miss_next_index;
2279 u8 mask[mask_length];
2282 /** \brief Classify sessions dump request
2283 @param client_index - opaque cookie to identify the sender
2284 @param context - sender context, to match reply w/ request
2285 @param table_id - classify table index
2287 define classify_session_dump
2294 /** \brief Reply for classify table session dump request
2295 @param context - sender context which was passed in the request
2296 @param count - number of ids returned in response
2297 @param table_id - classify table index
2298 @param hit_next_index - hit_next_index of session
2299 @param opaque_index - for add, opaque_index of session
2300 @param advance - advance value of session
2301 @param match[] - match value for session
2303 define classify_session_details
2312 u8 match[match_length];
2315 /** \brief Configure IPFIX exporter process request
2316 @param client_index - opaque cookie to identify the sender
2317 @param context - sender context, to match reply w/ request
2318 @param collector_address - address of IPFIX collector
2319 @param collector_port - port of IPFIX collector
2320 @param src_address - address of IPFIX exporter
2321 @param vrf_id - VRF / fib table ID
2322 @param path_mtu - Path MTU between exporter and collector
2323 @param template_interval - number of seconds after which to resend template
2324 @param udp_checksum - UDP checksum calculation enable flag
2326 define set_ipfix_exporter
2330 u8 collector_address[16];
2335 u32 template_interval;
2339 /** \brief Reply to IPFIX exporter configure request
2340 @param context - sender context which was passed in the request
2342 define set_ipfix_exporter_reply
2348 /** \brief IPFIX exporter dump request
2349 @param client_index - opaque cookie to identify the sender
2350 @param context - sender context, to match reply w/ request
2352 define ipfix_exporter_dump
2358 /** \brief Reply to IPFIX exporter dump request
2359 @param context - sender context which was passed in the request
2360 @param collector_address - address of IPFIX collector
2361 @param collector_port - port of IPFIX collector
2362 @param src_address - address of IPFIX exporter
2363 @param fib_index - fib table index
2364 @param path_mtu - Path MTU between exporter and collector
2365 @param template_interval - number of seconds after which to resend template
2366 @param udp_checksum - UDP checksum calculation enable flag
2368 define ipfix_exporter_details
2371 u8 collector_address[16];
2376 u32 template_interval;
2380 /** \brief IPFIX classify stream configure request
2381 @param client_index - opaque cookie to identify the sender
2382 @param context - sender context, to match reply w/ request
2383 @param domain_id - domain ID reported in IPFIX messages for classify stream
2384 @param src_port - source port of UDP session for classify stream
2386 define set_ipfix_classify_stream {
2393 /** \brief IPFIX classify stream configure response
2394 @param context - sender context, to match reply w/ request
2395 @param retval - return value for request
2397 define set_ipfix_classify_stream_reply {
2402 /** \brief IPFIX classify stream dump request
2403 @param client_index - opaque cookie to identify the sender
2404 @param context - sender context, to match reply w/ request
2406 define ipfix_classify_stream_dump {
2411 /** \brief Reply to IPFIX classify stream dump request
2412 @param context - sender context, to match reply w/ request
2413 @param domain_id - domain ID reported in IPFIX messages for classify stream
2414 @param src_port - source port of UDP session for classify stream
2416 define ipfix_classify_stream_details {
2422 /** \brief IPFIX add or delete classifier table request
2423 @param client_index - opaque cookie to identify the sender
2424 @param context - sender context, to match reply w/ request
2425 @param table_id - classifier table ID
2426 @param ip_version - version of IP used in the classifier table
2427 @param transport_protocol - transport protocol used in the classifier table or 255 for unspecified
2429 define ipfix_classify_table_add_del {
2434 u8 transport_protocol;
2438 /** \brief IPFIX add classifier table response
2439 @param context - sender context which was passed in the request
2441 define ipfix_classify_table_add_del_reply {
2446 /** \brief IPFIX classify tables dump request
2447 @param client_index - opaque cookie to identify the sender
2448 @param context - sender context, to match reply w/ request
2450 define ipfix_classify_table_dump {
2455 /** \brief Reply to IPFIX classify tables dump request
2456 @param context - sender context, to match reply w/ request
2457 @param table_id - classifier table ID
2458 @param ip_version - version of IP used in the classifier table
2459 @param transport_protocol - transport protocol used in the classifier table or 255 for unspecified
2461 define ipfix_classify_table_details {
2465 u8 transport_protocol;
2468 /** \brief Set/unset flow classify interface
2469 @param client_index - opaque cookie to identify the sender
2470 @param context - sender context, to match reply w/ request
2471 @param sw_if_index - interface to set/unset flow classify
2472 @param ip4_table_index - ip4 classify table index (~0 for skip)
2473 @param ip6_table_index - ip6 classify table index (~0 for skip)
2474 @param l2_table_index - l2 classify table index (~0 for skip)
2475 @param is_add - Set if non-zero, else unset
2476 Note: User is recommeneded to use just one valid table_index per call.
2477 (ip4_table_index, ip6_table_index, or l2_table_index)
2479 define flow_classify_set_interface {
2483 u32 ip4_table_index;
2484 u32 ip6_table_index;
2488 /** \brief Set/unset flow classify interface response
2489 @param context - sender context, to match reply w/ request
2490 @param retval - return value for request
2492 define flow_classify_set_interface_reply {
2497 /** \brief Get list of flow classify interfaces and tables
2498 @param client_index - opaque cookie to identify the sender
2499 @param context - sender context, to match reply w/ request
2500 @param type - classify table type
2502 define flow_classify_dump {
2508 /** \brief Flow classify operational state response.
2509 @param context - sender context, to match reply w/ request
2510 @param sw_if_index - software interface index
2511 @param table_index - classify table index
2513 define flow_classify_details {
2519 /** \brief Query relative index via node names
2520 @param client_index - opaque cookie to identify the sender
2521 @param context - sender context, to match reply w/ request
2522 @param node_name - name of node to find relative index from
2523 @param next_name - next node from node_name to find relative index of
2525 define get_next_index
2533 /** \brief Reply for get next node index
2534 @param context - sender context which was passed in the request
2535 @param retval - return value
2536 @param next_index - index of the next_node
2538 define get_next_index_reply
2545 /** \brief PacketGenerator create interface request
2546 @param client_index - opaque cookie to identify the sender
2547 @param context - sender context, to match reply w/ request
2548 @param interface_id - interface index
2550 define pg_create_interface
2557 /** \brief PacketGenerator create interface response
2558 @param context - sender context, to match reply w/ request
2559 @param retval - return value for request
2561 define pg_create_interface_reply
2568 /** \brief PacketGenerator capture packets on given interface request
2569 @param client_index - opaque cookie to identify the sender
2570 @param context - sender context, to match reply w/ request
2571 @param interface_id - pg interface index
2572 @param is_enabled - 1 if enabling streams, 0 if disabling
2573 @param count - number of packets to be captured
2574 @param pcap_file - pacp file name to store captured packets
2583 u32 pcap_name_length;
2584 u8 pcap_file_name[pcap_name_length];
2587 /** \brief PacketGenerator capture packets response
2588 @param context - sender context, to match reply w/ request
2589 @param retval - return value for request
2591 define pg_capture_reply
2597 /** \brief Enable / disable packet generator request
2598 @param client_index - opaque cookie to identify the sender
2599 @param context - sender context, to match reply w/ request
2600 @param is_enabled - 1 if enabling streams, 0 if disabling
2601 @param stream - stream name to be enable/disabled, if not specified handle all streams
2603 define pg_enable_disable
2608 u32 stream_name_length;
2609 u8 stream_name[stream_name_length];
2612 /** \brief Reply for enable / disable packet generator
2613 @param context - returned sender context, to match reply w/ request
2614 @param retval - return code
2616 define pg_enable_disable_reply
2622 /** \brief Configure IP source and L4 port-range check
2623 @param client_index - opaque cookie to identify the sender
2624 @param context - sender context, to match reply w/ request
2625 @param is_ip6 - 1 if source address type is IPv6
2626 @param is_add - 1 if add, 0 if delete
2627 @param mask_length - mask length for address entry
2628 @param address - array of address bytes
2629 @param number_of_ranges - length of low_port and high_port arrays (must match)
2630 @param low_ports[32] - up to 32 low end of port range entries (must have corresponding high_ports entry)
2631 @param high_ports[32] - up to 32 high end of port range entries (must have corresponding low_ports entry)
2632 @param vrf_id - fib table/vrf id to associate the source and port-range check with
2633 @note To specify a single port set low_port and high_port entry the same
2635 define ip_source_and_port_range_check_add_del
2643 u8 number_of_ranges;
2649 /** \brief Configure IP source and L4 port-range check reply
2650 @param context - returned sender context, to match reply w/ request
2651 @param retval - return code
2653 define ip_source_and_port_range_check_add_del_reply
2659 /** \brief Set interface source and L4 port-range request
2660 @param client_index - opaque cookie to identify the sender
2661 @param context - sender context, to match reply w/ request
2662 @param interface_id - interface index
2663 @param tcp_vrf_id - VRF associated with source and TCP port-range check
2664 @param udp_vrf_id - VRF associated with source and TCP port-range check
2666 define ip_source_and_port_range_check_interface_add_del
2678 /** \brief Set interface source and L4 port-range response
2679 @param context - sender context, to match reply w/ request
2680 @param retval - return value for request
2682 define ip_source_and_port_range_check_interface_add_del_reply
2688 /** \brief Delete sub interface request
2689 @param client_index - opaque cookie to identify the sender
2690 @param context - sender context, to match reply w/ request
2691 @param sw_if_index - sw index of the interface that was created by create_subif
2693 define delete_subif {
2699 /** \brief Delete sub interface response
2700 @param context - sender context, to match reply w/ request
2701 @param retval - return code for the request
2703 define delete_subif_reply {
2708 /** \brief DPDK interface HQoS pipe profile set request
2709 @param client_index - opaque cookie to identify the sender
2710 @param context - sender context, to match reply w/ request
2711 @param sw_if_index - the interface
2712 @param subport - subport ID
2713 @param pipe - pipe ID within its subport
2714 @param profile - pipe profile ID
2716 define sw_interface_set_dpdk_hqos_pipe {
2725 /** \brief DPDK interface HQoS pipe profile set reply
2726 @param context - sender context, to match reply w/ request
2727 @param retval - request return code
2729 define sw_interface_set_dpdk_hqos_pipe_reply {
2734 /** \brief DPDK interface HQoS subport parameters set request
2735 @param client_index - opaque cookie to identify the sender
2736 @param context - sender context, to match reply w/ request
2737 @param sw_if_index - the interface
2738 @param subport - subport ID
2739 @param tb_rate - subport token bucket rate (measured in bytes/second)
2740 @param tb_size - subport token bucket size (measured in credits)
2741 @param tc_rate - subport traffic class 0 .. 3 rates (measured in bytes/second)
2742 @param tc_period - enforcement period for rates (measured in milliseconds)
2744 define sw_interface_set_dpdk_hqos_subport {
2755 /** \brief DPDK interface HQoS subport parameters set reply
2756 @param context - sender context, to match reply w/ request
2757 @param retval - request return code
2759 define sw_interface_set_dpdk_hqos_subport_reply {
2764 /** \brief DPDK interface HQoS tctbl entry set request
2765 @param client_index - opaque cookie to identify the sender
2766 @param context - sender context, to match reply w/ request
2767 @param sw_if_index - the interface
2768 @param entry - entry index ID
2769 @param tc - traffic class (0 .. 3)
2770 @param queue - traffic class queue (0 .. 3)
2772 define sw_interface_set_dpdk_hqos_tctbl {
2781 /** \brief DPDK interface HQoS tctbl entry set reply
2782 @param context - sender context, to match reply w/ request
2783 @param retval - request return code
2785 define sw_interface_set_dpdk_hqos_tctbl_reply {
2790 /** \brief L2 interface pbb tag rewrite configure request
2791 @param client_index - opaque cookie to identify the sender
2792 @param context - sender context, to match reply w/ request
2793 @param sw_if_index - interface the operation is applied to
2794 @param vtr_op - Choose from l2_vtr_op_t enum values
2795 @param inner_tag - needed for translate_qinq vtr op only
2796 @param outer_tag - needed for translate_qinq vtr op only
2797 @param b_dmac - B-tag remote mac address, needed for any push or translate_qinq vtr op
2798 @param b_smac - B-tag local mac address, needed for any push or translate qinq vtr op
2799 @param b_vlanid - B-tag vlanid, needed for any push or translate qinq vtr op
2800 @param i_sid - I-tag service id, needed for any push or translate qinq vtr op
2802 define l2_interface_pbb_tag_rewrite
2815 /** \brief L2 interface pbb tag rewrite response
2816 @param context - sender context, to match reply w/ request
2817 @param retval - return code for the request
2819 define l2_interface_pbb_tag_rewrite_reply
2825 /** \brief Punt traffic to the host
2826 @param client_index - opaque cookie to identify the sender
2827 @param context - sender context, to match reply w/ request
2828 @param is_add - add punt if non-zero, else delete
2829 @param ipv - L3 protocol 4 - IPv4, 6 - IPv6, ~0 - All
2830 @param l4_protocol - L4 protocol to be punted, only UDP (0x11) is supported
2831 @param l4_port - TCP/UDP port to be punted
2842 /** \brief Reply to the punt request
2843 @param context - sender context which was passed in the request
2844 @param retval - return code of punt request
2852 /** \brief Feature path enable/disable request
2853 @param client_index - opaque cookie to identify the sender
2854 @param context - sender context, to match reply w/ request
2855 @param sw_if_index - the interface
2856 @param enable - 1 = on, 0 = off
2858 define feature_enable_disable {
2864 u8 feature_name[64];
2867 /** \brief Reply to the eature path enable/disable request
2868 @param context - sender context which was passed in the request
2869 @param retval - return code for the request
2871 define feature_enable_disable_reply
2879 * eval: (c-set-style "gnu")