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 .../src/vnet/{interface.api,interface_api.c}
26 * IP APIs: see .../src/vnet/ip/{ip.api, ip_api.c}
27 * TAP APIs: see .../src/vnet/unix/{tap.api, tap_api.c}
28 * VXLAN APIs: see .../src/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 ... /src/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 .../src/vnet/vxlan-gpe/{vxlan_gpe.api, vxlan_gpe_api.c}
33 * GRE APIs: see .../src/vnet/gre/{gre.api, gre_api.c}
34 * L2 APIs: see .../src/vnet/l2/{l2.api, l2_api.c}
35 * L2TP APIs: see .../src/vnet/l2tp/{l2tp.api, l2tp_api.c}
36 * BFD APIs: see .../src/vnet/bfd/{bfd.api, bfd_api.c}
37 * IPSEC APIs: see .../src/vnet/ipsec/{ipsec.api, ipsec_api.c}
38 * IPSEC-GRE APIs: see .../src/vnet/ipsec-gre/{ipsec_gre.api, ipsec_gre_api.c}
39 * LISP APIs: see .../src/vnet/lisp/{lisp.api, lisp_api.c}
40 * LISP-GPE APIs: see .../src/vnet/lisp-gpe/{lisp_gpe.api, lisp_gpe_api.c}
41 * MPLS APIs: see .../src/vnet/mpls/{mpls.api, mpls_api.c}
42 * SR APIs: see .../src/vnet/sr/{sr.api, sr_api.c}
43 * DPDK APIs: see ... /src/vnet/devices/dpdk/{dpdk.api, dpdk_api.c}
44 * CLASSIFY APIs: see ... /src/vnet/classify/{classify.api, classify_api.c}
45 * FLOW APIs: see ... /src/vnet/flow/{flow.api, flow_api.c}
48 /** \brief Create a new subinterface with the given vlan id
49 @param client_index - opaque cookie to identify the sender
50 @param context - sender context, to match reply w/ request
51 @param sw_if_index - software index of the new vlan's parent interface
52 @param vlan_id - vlan tag of the new interface
54 define create_vlan_subif
62 /** \brief Reply for the vlan subinterface create request
63 @param context - returned sender context, to match reply w/ request
64 @param retval - return code
65 @param sw_if_index - software index allocated for the new subinterface
67 define create_vlan_subif_reply
74 /** \brief Enable or Disable MPLS on and interface
75 @param client_index - opaque cookie to identify the sender
76 @param context - sender context, to match reply w/ request
77 @param sw_if_index - index of the interface
78 @param enable - if non-zero enable, else disable
80 define sw_interface_set_mpls_enable
88 /** \brief Reply for MPLS state on an interface
89 @param context - returned sender context, to match reply w/ request
90 @param retval - return code
92 define sw_interface_set_mpls_enable_reply
98 /** \brief Proxy ARP add / del request
99 @param client_index - opaque cookie to identify the sender
100 @param context - sender context, to match reply w/ request
101 @param vrf_id - VRF / Fib table ID
102 @param is_add - 1 if adding the Proxy ARP range, 0 if deleting
103 @param low_address[4] - Low address of the Proxy ARP range
104 @param hi_address[4] - High address of the Proxy ARP range
106 define proxy_arp_add_del
116 /** \brief Reply for proxy arp add / del request
117 @param context - returned sender context, to match reply w/ request
118 @param retval - return code
120 define proxy_arp_add_del_reply
126 /** \brief Proxy ARP add / del request
127 @param client_index - opaque cookie to identify the sender
128 @param context - sender context, to match reply w/ request
129 @param sw_if_index - Which interface to enable / disable Proxy Arp on
130 @param enable_disable - 1 to enable Proxy ARP on interface, 0 to disable
132 define proxy_arp_intfc_enable_disable
137 /* 1 = on, 0 = off */
141 /** \brief Reply for Proxy ARP interface enable / disable request
142 @param context - returned sender context, to match reply w/ request
143 @param retval - return code
145 define proxy_arp_intfc_enable_disable_reply
151 /** \brief Reset VRF (remove all routes etc) request
152 @param client_index - opaque cookie to identify the sender
153 @param context - sender context, to match reply w/ request
154 @param is_ipv6 - 1 for IPv6 neighbor, 0 for IPv4
155 @param vrf_id - ID of th FIB table / VRF to reset
165 /** \brief Reply for Reset VRF request
166 @param context - returned sender context, to match reply w/ request
167 @param retval - return code
169 define reset_vrf_reply
175 /** \brief Is Address Reachable request - DISABLED
176 @param client_index - opaque cookie to identify the sender
177 @param context - sender context, to match reply w/ request
178 @param next_hop_sw_if_index - index of interface used to get to next hop
179 @param is_ipv6 - 1 for IPv6, 0 for IPv4
180 @param is_error - address not found or does not match intf
181 @param address[] - Address in question
183 define is_address_reachable
185 u32 client_index; /* (api_main_t *) am->my_client_index */
187 u32 next_hop_sw_if_index;
188 u8 is_known; /* on reply, this is the answer */
190 u8 is_error; /* address not found or does not match intf */
194 /** \brief Want Stats, register for stats updates
195 @param client_index - opaque cookie to identify the sender
196 @param context - sender context, to match reply w/ request
197 @param enable_disable - 1 = enable stats, 0 = disable
198 @param pid - pid of process requesting stats updates
208 /** \brief Reply for Want Stats request
209 @param context - returned sender context, to match reply w/ request
210 @param retval - return code
212 define want_stats_reply
218 typeonly manual_print manual_endian define ip4_fib_counter
226 manual_print manual_endian define vnet_ip4_fib_counters
230 vl_api_ip4_fib_counter_t c[count];
233 typeonly manual_print manual_endian define ip4_nbr_counter
242 * @brief Per-neighbour (i.e. per-adjacency) coutners
243 * @param count The size of the array of counters
244 * @param sw_if_index The interface the adjacency is on
245 * @param begin Flag to indicate this is the first set of stats for this
246 * interface. If this flag is not set the it is a continuation of
247 * stats for this interface
250 manual_print manual_endian define vnet_ip4_nbr_counters
255 vl_api_ip4_nbr_counter_t c[count];
258 typeonly manual_print manual_endian define ip6_fib_counter
266 manual_print manual_endian define vnet_ip6_fib_counters
270 vl_api_ip6_fib_counter_t c[count];
273 typeonly manual_print manual_endian define ip6_nbr_counter
281 manual_print manual_endian define vnet_ip6_nbr_counters
286 vl_api_ip6_nbr_counter_t c[count];
289 /** \brief Request for a single block of summary stats
290 @param client_index - opaque cookie to identify the sender
291 @param context - sender context, to match reply w/ request
293 define vnet_get_summary_stats
299 /** \brief Reply for vnet_get_summary_stats request
300 @param context - sender context, to match reply w/ request
301 @param retval - return code for request
306 define vnet_summary_stats_reply
315 /** \brief OAM event structure
316 @param dst_address[] -
325 /** \brief Want OAM events request
326 @param client_index - opaque cookie to identify the sender
327 @param context - sender context, to match reply w/ request
328 @param enable_disable- enable if non-zero, else disable
329 @param pid - pid of the requesting process
331 define want_oam_events
339 /** \brief Want OAM events response
340 @param context - sender context, to match reply w/ request
341 @param retval - return code for the want oam stats request
343 define want_oam_events_reply
349 /** \brief OAM add / del target request
350 @param client_index - opaque cookie to identify the sender
351 @param context - sender context, to match reply w/ request
352 @param vrf_id - vrf_id of the target
353 @param src_address[] - source address to use for the updates
354 @param dst_address[] - destination address of the target
355 @param is_add - add target if non-zero, else delete
367 /** \brief OAM add / del target response
368 @param context - sender context, to match reply w/ request
369 @param retval - return code of the request
371 define oam_add_del_reply
377 /** \brief Reset fib table request
378 @param client_index - opaque cookie to identify the sender
379 @param context - sender context, to match reply w/ request
380 @param vrf_id - vrf/table id of the fib table to reset
381 @param is_ipv6 - an ipv6 fib to reset if non-zero, else ipv4
391 /** \brief Reset fib response
392 @param context - sender context, to match reply w/ request
393 @param retval - return code for the reset bfib request
395 define reset_fib_reply
401 /** \brief DHCP Proxy config add / del request
402 @param client_index - opaque cookie to identify the sender
403 @param context - sender context, to match reply w/ request
404 @param vrf_id - vrf id
405 @param if_ipv6 - ipv6 if non-zero, else ipv4
406 @param is_add - add the config if non-zero, else delete
407 @param insert_circuit_id - option82 suboption 1 fib number
408 @param dhcp_server[] - server address
409 @param dhcp_src_address[] - <fix this, need details>
411 define dhcp_proxy_config
418 u8 insert_circuit_id;
420 u8 dhcp_src_address[16];
423 /** \brief DHCP Proxy config response
424 @param context - sender context, to match reply w/ request
425 @param retval - return code for the request
427 define dhcp_proxy_config_reply
433 /** \brief DHCP Proxy set / unset vss request
434 @param client_index - opaque cookie to identify the sender
435 @param context - sender context, to match reply w/ request
436 @param tbl_id - table id
437 @param oui - first part of vpn id
438 @param fib_id - second part of vpn id
439 @param is_ipv6 - ip6 if non-zero, else ip4
440 @param is_add - set vss if non-zero, else delete
442 define dhcp_proxy_set_vss
453 /** \brief DHCP proxy set / unset vss response
454 @param context - sender context, to match reply w/ request
455 @param retval - return code for the request
457 define dhcp_proxy_set_vss_reply
463 /** \brief Create loopback interface request
464 @param client_index - opaque cookie to identify the sender
465 @param context - sender context, to match reply w/ request
466 @param mac_address - mac addr to assign to the interface if none-zero
468 define create_loopback
475 /** \brief Create loopback interface response
476 @param context - sender context, to match reply w/ request
477 @param sw_if_index - sw index of the interface that was created
478 @param retval - return code for the request
480 define create_loopback_reply
487 /** \brief Delete loopback interface request
488 @param client_index - opaque cookie to identify the sender
489 @param context - sender context, to match reply w/ request
490 @param sw_if_index - sw index of the interface that was created
492 define delete_loopback
499 /** \brief Delete loopback interface response
500 @param context - sender context, to match reply w/ request
501 @param retval - return code for the request
503 define delete_loopback_reply
509 /** \brief Control ping from client to api server request
510 @param client_index - opaque cookie to identify the sender
511 @param context - sender context, to match reply w/ request
519 /** \brief Control ping from the client to the server response
520 @param client_index - opaque cookie to identify the sender
521 @param context - sender context, to match reply w/ request
522 @param retval - return code for the request
523 @param vpe_pid - the pid of the vpe, returned by the server
525 define control_ping_reply
533 /** \brief Process a vpe parser cli string request
534 @param client_index - opaque cookie to identify the sender
535 @param context - sender context, to match reply w/ request
536 @param cmd_in_shmem - pointer to cli command string
552 /** \brief vpe parser cli string response
553 @param context - sender context, to match reply w/ request
554 @param retval - return code for request
555 @param reply_in_shmem - Reply string from cli processing if any
563 define cli_inband_reply
571 /** \brief Set max allowed ARP or ip6 neighbor entries request
572 @param client_index - opaque cookie to identify the sender
573 @param context - sender context, to match reply w/ request
574 @param is_ipv6 - neighbor limit if non-zero, else ARP limit
575 @param arp_neighbor_limit - the new limit, defaults are ~ 50k
577 define set_arp_neighbor_limit
582 u32 arp_neighbor_limit;
585 /** \brief Set max allowed ARP or ip6 neighbor entries response
586 @param context - sender context, to match reply w/ request
587 @param retval - return code for request
589 define set_arp_neighbor_limit_reply
595 /** \brief L2 interface patch add / del request
596 @param client_index - opaque cookie to identify the sender
597 @param context - sender context, to match reply w/ request
598 @param rx_sw_if_index - receive side interface
599 @param tx_sw_if_index - transmit side interface
600 @param is_add - if non-zero set up the interface patch, else remove it
602 define l2_patch_add_del
611 /** \brief L2 interface patch add / del response
612 @param context - sender context, to match reply w/ request
613 @param retval - return code for the request
615 define l2_patch_add_del_reply
621 /** \brief Interface set vpath request
622 @param client_index - opaque cookie to identify the sender
623 @param context - sender context, to match reply w/ request
624 @param sw_if_index - interface used to reach neighbor
625 @param enable - if non-zero enable, else disable
627 define sw_interface_set_vpath
635 /** \brief Interface set vpath response
636 @param context - sender context, to match reply w/ request
637 @param retval - return code for the request
639 define sw_interface_set_vpath_reply
645 /** \brief Set L2 XConnect between two interfaces request
646 @param client_index - opaque cookie to identify the sender
647 @param context - sender context, to match reply w/ request
648 @param rx_sw_if_index - Receive interface index
649 @param tx_sw_if_index - Transmit interface index
650 @param enable - enable xconnect if not 0, else set to L3 mode
652 define sw_interface_set_l2_xconnect
661 /** \brief Set L2 XConnect response
662 @param context - sender context, to match reply w/ request
663 @param retval - L2 XConnect request return code
665 define sw_interface_set_l2_xconnect_reply
671 /** \brief Interface bridge mode request
672 @param client_index - opaque cookie to identify the sender
673 @param context - sender context, to match reply w/ request
674 @param rx_sw_if_index - the interface
675 @param bd_id - bridge domain id
676 @param bvi - Setup interface as a bvi, bridge mode only
677 @param shg - Shared horizon group, for bridge mode only
678 @param enable - Enable beige mode if not 0, else set to L3 mode
680 define sw_interface_set_l2_bridge
691 /** \brief Interface bridge mode response
692 @param context - sender context, to match reply w/ request
693 @param retval - Bridge mode request return code
695 define sw_interface_set_l2_bridge_reply
701 /** \brief Set bridge domain ip to mac entry request
702 @param client_index - opaque cookie to identify the sender
703 @param context - sender context, to match reply w/ request
704 @param bd_id - the bridge domain to set the flags for
705 @param is_add - if non-zero, add the entry, else clear it
706 @param is_ipv6 - if non-zero, ipv6 address, else ipv4 address
707 @param mac_address - MAC address
710 define bd_ip_mac_add_del
721 /** \brief Set bridge domain ip to mac entry response
722 @param context - sender context, to match reply w/ request
723 @param retval - return code for the set bridge flags request
725 define bd_ip_mac_add_del_reply
731 /** \brief Set/unset the classification table for an interface request
732 @param client_index - opaque cookie to identify the sender
733 @param context - sender context, to match reply w/ request
734 @param is_ipv6 - ipv6 if non-zero, else ipv4
735 @param sw_if_index - interface to associate with the table
736 @param table_index - index of the table, if ~0 unset the table
738 define classify_set_interface_ip_table
744 u32 table_index; /* ~0 => off */
747 /** \brief Set/unset interface classification table response
748 @param context - sender context, to match reply w/ request
749 @param retval - return code
751 define classify_set_interface_ip_table_reply
757 /** \brief Set/unset l2 classification tables for an interface request
758 @param client_index - opaque cookie to identify the sender
759 @param context - sender context, to match reply w/ request
760 @param sw_if_index - interface to set/unset tables for
761 @param ip4_table_index - ip4 index, use ~0 for all 3 indexes to unset
762 @param ip6_table_index - ip6 index
763 @param other_table_index - other index
765 define classify_set_interface_l2_tables
773 u32 other_table_index;
777 /** \brief Set/unset l2 classification tables for an interface response
778 @param context - sender context, to match reply w/ request
779 @param retval - return code for the request
781 define classify_set_interface_l2_tables_reply
787 /** \brief Get node index using name request
788 @param client_index - opaque cookie to identify the sender
789 @param context - sender context, to match reply w/ request
790 @param node_name[] - name of the node
792 define get_node_index
799 /** \brief Get node index using name request
800 @param context - sender context, to match reply w/ request
801 @param retval - return code for the request
802 @param node_index - index of the desired node if found, else ~0
804 define get_node_index_reply
811 /** \brief Set the next node for a given node request
812 @param client_index - opaque cookie to identify the sender
813 @param context - sender context, to match reply w/ request
814 @param node_name[] - node to add the next node to
815 @param next_name[] - node to add as the next node
825 /** \brief IP Set the next node for a given node response
826 @param context - sender context, to match reply w/ request
827 @param retval - return code for the add next node request
828 @param next_index - the index of the next node if success, else ~0
830 define add_node_next_reply
837 /** \brief DHCP Proxy config 2 add / del request
838 @param client_index - opaque cookie to identify the sender
839 @param context - sender context, to match reply w/ request
840 @param rx_vrf_id - receive vrf id
841 @param server_vrf_id - server vrf id
842 @param if_ipv6 - ipv6 if non-zero, else ipv4
843 @param is_add - add the config if non-zero, else delete
844 @param insert_circuit_id - option82 suboption 1 fib number
845 @param dhcp_server[] - server address
846 @param dhcp_src_address[] - <fix this, need details>
848 define dhcp_proxy_config_2
856 u8 insert_circuit_id;
858 u8 dhcp_src_address[16];
861 /** \brief DHCP Proxy config 2 add / del response
862 @param context - sender context, to match reply w/ request
863 @param retval - return code for request
865 define dhcp_proxy_config_2_reply
871 /** \brief L2 interface ethernet flow point filtering enable/disable request
872 @param client_index - opaque cookie to identify the sender
873 @param context - sender context, to match reply w/ request
874 @param sw_if_index - interface to enable/disable filtering on
875 @param enable_disable - if non-zero enable filtering, else disable
877 define l2_interface_efp_filter
885 /** \brief L2 interface ethernet flow point filtering response
886 @param context - sender context, to match reply w/ request
887 @param retval - return code for the request
889 define l2_interface_efp_filter_reply
895 /** \brief L2 interface vlan tag rewrite configure request
896 @param client_index - opaque cookie to identify the sender
897 @param context - sender context, to match reply w/ request
898 @param sw_if_index - interface the operation is applied to
899 @param vtr_op - Choose from l2_vtr_op_t enum values
900 @param push_dot1q - first pushed flag dot1q id set, else dot1ad
901 @param tag1 - Needed for any push or translate vtr op
902 @param tag2 - Needed for any push 2 or translate x-2 vtr ops
904 define l2_interface_vlan_tag_rewrite
910 u32 push_dot1q; // ethertype of first pushed tag is dot1q/dot1ad
911 u32 tag1; // first pushed tag
912 u32 tag2; // second pushed tag
915 /** \brief L2 interface vlan tag rewrite response
916 @param context - sender context, to match reply w/ request
917 @param retval - return code for the request
919 define l2_interface_vlan_tag_rewrite_reply
932 /* These fields map directly onto the subif template */
936 u8 dot1ad; // 0 = dot1q, 1=dot1ad
939 u8 outer_vlan_id_any;
940 u8 inner_vlan_id_any;
945 define create_subif_reply
952 /** \brief show version
953 @param client_index - opaque cookie to identify the sender
954 @param context - sender context, to match reply w/ request
962 /** \brief show version response
963 @param context - sender context, to match reply w/ request
964 @param retval - return code for the request
965 @param program - name of the program (vpe)
966 @param version - version of the program
967 @param build_directory - root of the workspace where the program was built
969 define show_version_reply
976 u8 build_directory[256];
979 /* Gross kludge, DGMS */
980 define interface_name_renumber
985 u32 new_show_dev_instance;
988 define interface_name_renumber_reply
994 /** \brief Register for ip4 arp resolution events
995 @param client_index - opaque cookie to identify the sender
996 @param context - sender context, to match reply w/ request
997 @param enable_disable - 1 => register for events, 0 => cancel registration
998 @param pid - sender's pid
999 @param address - the exact ip4 address of interest
1001 define want_ip4_arp_events
1010 /** \brief Reply for interface events registration
1011 @param context - returned sender context, to match reply w/ request
1012 @param retval - return code
1014 define want_ip4_arp_events_reply
1020 /** \brief Tell client about an ip4 arp resolution event
1021 @param client_index - opaque cookie to identify the sender
1022 @param context - sender context, to match reply w/ request
1023 @param address - the exact ip4 address of interest
1024 @param pid - client pid registered to receive notification
1025 @param sw_if_index - interface which received ARP packet
1026 @param new_mac - the new mac address
1027 @param mac_ip - 0: resolution event, 1: mac/ip binding in bd
1029 define ip4_arp_event
1040 /** \brief Register for ip6 nd resolution events
1041 @param client_index - opaque cookie to identify the sender
1042 @param context - sender context, to match reply w/ request
1043 @param enable_disable - 1 => register for events, 0 => cancel registration
1044 @param pid - sender's pid
1045 @param address - the exact ip6 address of interest
1047 define want_ip6_nd_events
1056 /** \brief Reply for ip6 nd resolution events registration
1057 @param context - returned sender context, to match reply w/ request
1058 @param retval - return code
1060 define want_ip6_nd_events_reply
1066 /** \brief Tell client about an ip6 nd resolution or mac/ip event
1067 @param client_index - opaque cookie to identify the sender
1068 @param context - sender context, to match reply w/ request
1069 @param pid - client pid registered to receive notification
1070 @param sw_if_index - interface which received ARP packet
1071 @param address - the exact ip6 address of interest
1072 @param new_mac - the new mac address
1073 @param mac_ip - 0: resolution event, 1: mac/ip binding in bd
1086 /** \brief DHCP Client config add / del request
1087 @param client_index - opaque cookie to identify the sender
1088 @param context - sender context, to match reply w/ request
1089 @param sw_if_index - index of the interface for DHCP client
1090 @param hostname - hostname
1091 @param is_add - add the config if non-zero, else delete
1092 @param want_dhcp_event - DHCP event sent to the sender
1093 via dhcp_compl_event API message if non-zero
1094 @param pid - sender's pid
1096 define dhcp_client_config
1107 /** \brief DHCP Client config response
1108 @param context - sender context, to match reply w/ request
1109 @param retval - return code for the request
1111 define dhcp_client_config_reply
1117 /** \brief Set/unset input ACL interface
1118 @param client_index - opaque cookie to identify the sender
1119 @param context - sender context, to match reply w/ request
1120 @param sw_if_index - interface to set/unset input ACL
1121 @param ip4_table_index - ip4 classify table index (~0 for skip)
1122 @param ip6_table_index - ip6 classify table index (~0 for skip)
1123 @param l2_table_index - l2 classify table index (~0 for skip)
1124 @param is_add - Set input ACL if non-zero, else unset
1125 Note: User is recommeneded to use just one valid table_index per call.
1126 (ip4_table_index, ip6_table_index, or l2_table_index)
1128 define input_acl_set_interface
1133 u32 ip4_table_index;
1134 u32 ip6_table_index;
1139 /** \brief Set/unset input ACL interface response
1140 @param context - sender context, to match reply w/ request
1141 @param retval - return code for the request
1143 define input_acl_set_interface_reply
1149 /** \brief Tell client about a DHCP completion event
1150 @param client_index - opaque cookie to identify the sender
1151 @param pid - client pid registered to receive notification
1152 @param is_ipv6 - if non-zero the address is ipv6, else ipv4
1153 @param host_address - Host IP address
1154 @param router_address - Router IP address
1155 @param host_mac - Host MAC address
1157 define dhcp_compl_event
1163 u8 host_address[16];
1164 u8 router_address[16];
1168 /** \brief cop: enable/disable junk filtration features on an interface
1169 @param client_index - opaque cookie to identify the sender
1170 @param context - sender context, to match reply w/ request
1171 @param sw_if_inded - desired interface
1172 @param enable_disable - 1 => enable, 0 => disable
1175 define cop_interface_enable_disable
1183 /** \brief cop: interface enable/disable junk filtration reply
1184 @param context - returned sender context, to match reply w/ request
1185 @param retval - return code
1188 define cop_interface_enable_disable_reply
1194 /** \brief cop: enable/disable whitelist filtration features on an interface
1195 Note: the supplied fib_id must match in order to remove the feature!
1197 @param client_index - opaque cookie to identify the sender
1198 @param context - sender context, to match reply w/ request
1199 @param sw_if_index - interface handle, physical interfaces only
1200 @param fib_id - fib identifier for the whitelist / blacklist fib
1201 @param ip4 - 1 => enable ip4 filtration, 0=> disable ip4 filtration
1202 @param ip6 - 1 => enable ip6 filtration, 0=> disable ip6 filtration
1203 @param default_cop - 1 => enable non-ip4, non-ip6 filtration 0=> disable it
1206 define cop_whitelist_enable_disable
1217 /** \brief cop: interface enable/disable junk filtration reply
1218 @param context - returned sender context, to match reply w/ request
1219 @param retval - return code
1222 define cop_whitelist_enable_disable_reply
1228 /** \brief get_node_graph - get a copy of the vpp node graph
1229 including the current set of graph arcs.
1231 @param client_index - opaque cookie to identify the sender
1232 @param context - sender context, to match reply w/ request
1235 define get_node_graph
1241 /** \brief get_node_graph_reply
1242 @param context - returned sender context, to match reply w/ request
1243 @param retval - return code
1244 @param reply_in_shmem - result from vlib_node_serialize, in shared
1245 memory. Process with vlib_node_unserialize, remember to switch
1246 heaps and free the result.
1249 define get_node_graph_reply
1256 /** \brief IOAM enable : Enable in-band OAM
1257 @param id - profile id
1258 @param seqno - To enable Seqno Processing
1259 @param analyse - Enabling analysis of iOAM at decap node
1260 @param pow_enable - Proof of Work enabled or not flag
1261 @param trace_enable - iOAM Trace enabled or not flag
1275 /** \brief iOAM Trace profile add / del response
1276 @param context - sender context, to match reply w/ request
1277 @param retval - return value for request
1279 define ioam_enable_reply
1285 /** \brief iOAM disable
1286 @param client_index - opaque cookie to identify the sender
1287 @param context - sender context, to match reply w/ request
1288 @param index - MAP Domain index
1297 /** \brief iOAM disable response
1298 @param context - sender context, to match reply w/ request
1299 @param retval - return value for request
1301 define ioam_disable_reply
1307 /** \brief Add/del policer
1308 @param client_index - opaque cookie to identify the sender
1309 @param context - sender context, to match reply w/ request
1310 @param is_add - add policer if non-zero, else delete
1311 @param name - policer name
1314 @param cb - Committed Burst
1315 @param eb - Excess or Peak Burst
1316 @param rate_type - rate type
1317 @param round_type - rounding type
1318 @param type - policer algorithm
1319 @param color_aware - 0=color-blind, 1=color-aware
1320 @param conform_action_type - conform action type
1321 @param conform_dscp - DSCP for conform mar-and-transmit action
1322 @param exceed_action_type - exceed action type
1323 @param exceed_dscp - DSCP for exceed mar-and-transmit action
1324 @param violate_action_type - violate action type
1325 @param violate_dscp - DSCP for violate mar-and-transmit action
1327 define policer_add_del
1342 u8 conform_action_type;
1344 u8 exceed_action_type;
1346 u8 violate_action_type;
1350 /** \brief Add/del policer response
1351 @param context - sender context, to match reply w/ request
1352 @param retval - return value for request
1353 @param policer_index - for add, returned index of the new policer
1355 define policer_add_del_reply
1362 /** \brief Get list of policers
1363 @param client_index - opaque cookie to identify the sender
1364 @param context - sender context, to match reply w/ request
1365 @param match_name_valid - if 0 request all policers otherwise use match_name
1366 @param match_name - policer name
1373 u8 match_name_valid;
1377 /** \brief Policer operational state response.
1378 @param context - sender context, to match reply w/ request
1379 @param name - policer name
1382 @param cb - Committed Burst
1383 @param eb - Excess or Peak Burst
1384 @param rate_type - rate type
1385 @param round_type - rounding type
1386 @param type - policer algorithm
1387 @param conform_action_type - conform action type
1388 @param conform_dscp - DSCP for conform mar-and-transmit action
1389 @param exceed_action_type - exceed action type
1390 @param exceed_dscp - DSCP for exceed mar-and-transmit action
1391 @param violate_action_type - violate action type
1392 @param violate_dscp - DSCP for violate mar-and-transmit action
1393 @param single_rate - 1 = single rate policer, 0 = two rate policer
1394 @param color_aware - for hierarchical policing
1395 @param scale - power-of-2 shift amount for lower rates
1396 @param cir_tokens_per_period - number of tokens for each period
1397 @param pir_tokens_per_period - number of tokens for each period for 2-rate policer
1398 @param current_limit - current limit
1399 @param current_bucket - current bucket
1400 @param extended_limit - extended limit
1401 @param extended_bucket - extended bucket
1402 @param last_update_time - last update time
1404 define policer_details
1416 u8 conform_action_type;
1418 u8 exceed_action_type;
1420 u8 violate_action_type;
1425 u32 cir_tokens_per_period;
1426 u32 pir_tokens_per_period;
1430 u32 extended_bucket;
1431 u64 last_update_time;
1434 /** \brief Query relative index via node names
1435 @param client_index - opaque cookie to identify the sender
1436 @param context - sender context, to match reply w/ request
1437 @param node_name - name of node to find relative index from
1438 @param next_name - next node from node_name to find relative index of
1440 define get_next_index
1448 /** \brief Reply for get next node index
1449 @param context - sender context which was passed in the request
1450 @param retval - return value
1451 @param next_index - index of the next_node
1453 define get_next_index_reply
1460 /** \brief PacketGenerator create interface request
1461 @param client_index - opaque cookie to identify the sender
1462 @param context - sender context, to match reply w/ request
1463 @param interface_id - interface index
1465 define pg_create_interface
1472 /** \brief PacketGenerator create interface response
1473 @param context - sender context, to match reply w/ request
1474 @param retval - return value for request
1476 define pg_create_interface_reply
1483 /** \brief PacketGenerator capture packets on given interface request
1484 @param client_index - opaque cookie to identify the sender
1485 @param context - sender context, to match reply w/ request
1486 @param interface_id - pg interface index
1487 @param is_enabled - 1 if enabling streams, 0 if disabling
1488 @param count - number of packets to be captured
1489 @param pcap_file - pacp file name to store captured packets
1498 u32 pcap_name_length;
1499 u8 pcap_file_name[pcap_name_length];
1502 /** \brief PacketGenerator capture packets response
1503 @param context - sender context, to match reply w/ request
1504 @param retval - return value for request
1506 define pg_capture_reply
1512 /** \brief Enable / disable packet generator request
1513 @param client_index - opaque cookie to identify the sender
1514 @param context - sender context, to match reply w/ request
1515 @param is_enabled - 1 if enabling streams, 0 if disabling
1516 @param stream - stream name to be enable/disabled, if not specified handle all streams
1518 define pg_enable_disable
1523 u32 stream_name_length;
1524 u8 stream_name[stream_name_length];
1527 /** \brief Reply for enable / disable packet generator
1528 @param context - returned sender context, to match reply w/ request
1529 @param retval - return code
1531 define pg_enable_disable_reply
1537 /** \brief Configure IP source and L4 port-range check
1538 @param client_index - opaque cookie to identify the sender
1539 @param context - sender context, to match reply w/ request
1540 @param is_ip6 - 1 if source address type is IPv6
1541 @param is_add - 1 if add, 0 if delete
1542 @param mask_length - mask length for address entry
1543 @param address - array of address bytes
1544 @param number_of_ranges - length of low_port and high_port arrays (must match)
1545 @param low_ports[32] - up to 32 low end of port range entries (must have corresponding high_ports entry)
1546 @param high_ports[32] - up to 32 high end of port range entries (must have corresponding low_ports entry)
1547 @param vrf_id - fib table/vrf id to associate the source and port-range check with
1548 @note To specify a single port set low_port and high_port entry the same
1550 define ip_source_and_port_range_check_add_del
1558 u8 number_of_ranges;
1564 /** \brief Configure IP source and L4 port-range check reply
1565 @param context - returned sender context, to match reply w/ request
1566 @param retval - return code
1568 define ip_source_and_port_range_check_add_del_reply
1574 /** \brief Set interface source and L4 port-range request
1575 @param client_index - opaque cookie to identify the sender
1576 @param context - sender context, to match reply w/ request
1577 @param interface_id - interface index
1578 @param tcp_vrf_id - VRF associated with source and TCP port-range check
1579 @param udp_vrf_id - VRF associated with source and TCP port-range check
1581 define ip_source_and_port_range_check_interface_add_del
1593 /** \brief Set interface source and L4 port-range response
1594 @param context - sender context, to match reply w/ request
1595 @param retval - return value for request
1597 define ip_source_and_port_range_check_interface_add_del_reply
1603 /** \brief Delete sub interface request
1604 @param client_index - opaque cookie to identify the sender
1605 @param context - sender context, to match reply w/ request
1606 @param sw_if_index - sw index of the interface that was created by create_subif
1608 define delete_subif {
1614 /** \brief Delete sub interface response
1615 @param context - sender context, to match reply w/ request
1616 @param retval - return code for the request
1618 define delete_subif_reply {
1623 /** \brief L2 interface pbb tag rewrite configure request
1624 @param client_index - opaque cookie to identify the sender
1625 @param context - sender context, to match reply w/ request
1626 @param sw_if_index - interface the operation is applied to
1627 @param vtr_op - Choose from l2_vtr_op_t enum values
1628 @param inner_tag - needed for translate_qinq vtr op only
1629 @param outer_tag - needed for translate_qinq vtr op only
1630 @param b_dmac - B-tag remote mac address, needed for any push or translate_qinq vtr op
1631 @param b_smac - B-tag local mac address, needed for any push or translate qinq vtr op
1632 @param b_vlanid - B-tag vlanid, needed for any push or translate qinq vtr op
1633 @param i_sid - I-tag service id, needed for any push or translate qinq vtr op
1635 define l2_interface_pbb_tag_rewrite
1648 /** \brief L2 interface pbb tag rewrite response
1649 @param context - sender context, to match reply w/ request
1650 @param retval - return code for the request
1652 define l2_interface_pbb_tag_rewrite_reply
1658 /** \brief Punt traffic to the host
1659 @param client_index - opaque cookie to identify the sender
1660 @param context - sender context, to match reply w/ request
1661 @param is_add - add punt if non-zero, else delete
1662 @param ipv - L3 protocol 4 - IPv4, 6 - IPv6, ~0 - All
1663 @param l4_protocol - L4 protocol to be punted, only UDP (0x11) is supported
1664 @param l4_port - TCP/UDP port to be punted
1675 /** \brief Reply to the punt request
1676 @param context - sender context which was passed in the request
1677 @param retval - return code of punt request
1685 /** \brief Feature path enable/disable request
1686 @param client_index - opaque cookie to identify the sender
1687 @param context - sender context, to match reply w/ request
1688 @param sw_if_index - the interface
1689 @param enable - 1 = on, 0 = off
1691 define feature_enable_disable {
1697 u8 feature_name[64];
1700 /** \brief Reply to the eature path enable/disable request
1701 @param context - sender context which was passed in the request
1702 @param retval - return code for the request
1704 define feature_enable_disable_reply
1712 * eval: (c-set-style "gnu")