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}
47 /** \brief Create a new subinterface with the given vlan id
48 @param client_index - opaque cookie to identify the sender
49 @param context - sender context, to match reply w/ request
50 @param sw_if_index - software index of the new vlan's parent interface
51 @param vlan_id - vlan tag of the new interface
53 define create_vlan_subif
61 /** \brief Reply for the vlan subinterface create request
62 @param context - returned sender context, to match reply w/ request
63 @param retval - return code
64 @param sw_if_index - software index allocated for the new subinterface
66 define create_vlan_subif_reply
73 /** \brief Enable or Disable MPLS on and interface
74 @param client_index - opaque cookie to identify the sender
75 @param context - sender context, to match reply w/ request
76 @param sw_if_index - index of the interface
77 @param enable - if non-zero enable, else disable
79 define sw_interface_set_mpls_enable
87 /** \brief Reply for MPLS state on an interface
88 @param context - returned sender context, to match reply w/ request
89 @param retval - return code
91 define sw_interface_set_mpls_enable_reply
97 /** \brief Proxy ARP add / del request
98 @param client_index - opaque cookie to identify the sender
99 @param context - sender context, to match reply w/ request
100 @param vrf_id - VRF / Fib table ID
101 @param is_add - 1 if adding the Proxy ARP range, 0 if deleting
102 @param low_address[4] - Low address of the Proxy ARP range
103 @param hi_address[4] - High address of the Proxy ARP range
105 define proxy_arp_add_del
115 /** \brief Reply for proxy arp add / del request
116 @param context - returned sender context, to match reply w/ request
117 @param retval - return code
119 define proxy_arp_add_del_reply
125 /** \brief Proxy ARP add / del request
126 @param client_index - opaque cookie to identify the sender
127 @param context - sender context, to match reply w/ request
128 @param sw_if_index - Which interface to enable / disable Proxy Arp on
129 @param enable_disable - 1 to enable Proxy ARP on interface, 0 to disable
131 define proxy_arp_intfc_enable_disable
136 /* 1 = on, 0 = off */
140 /** \brief Reply for Proxy ARP interface enable / disable request
141 @param context - returned sender context, to match reply w/ request
142 @param retval - return code
144 define proxy_arp_intfc_enable_disable_reply
150 /** \brief Reset VRF (remove all routes etc) request
151 @param client_index - opaque cookie to identify the sender
152 @param context - sender context, to match reply w/ request
153 @param is_ipv6 - 1 for IPv6 neighbor, 0 for IPv4
154 @param vrf_id - ID of th FIB table / VRF to reset
164 /** \brief Reply for Reset VRF request
165 @param context - returned sender context, to match reply w/ request
166 @param retval - return code
168 define reset_vrf_reply
174 /** \brief Is Address Reachable request - DISABLED
175 @param client_index - opaque cookie to identify the sender
176 @param context - sender context, to match reply w/ request
177 @param next_hop_sw_if_index - index of interface used to get to next hop
178 @param is_ipv6 - 1 for IPv6, 0 for IPv4
179 @param is_error - address not found or does not match intf
180 @param address[] - Address in question
182 define is_address_reachable
184 u32 client_index; /* (api_main_t *) am->my_client_index */
186 u32 next_hop_sw_if_index;
187 u8 is_known; /* on reply, this is the answer */
189 u8 is_error; /* address not found or does not match intf */
193 /** \brief Want Stats, register for stats updates
194 @param client_index - opaque cookie to identify the sender
195 @param context - sender context, to match reply w/ request
196 @param enable_disable - 1 = enable stats, 0 = disable
197 @param pid - pid of process requesting stats updates
207 /** \brief Reply for Want Stats request
208 @param context - returned sender context, to match reply w/ request
209 @param retval - return code
211 define want_stats_reply
217 typeonly manual_print manual_endian define ip4_fib_counter
225 manual_print manual_endian define vnet_ip4_fib_counters
229 vl_api_ip4_fib_counter_t c[count];
232 typeonly manual_print manual_endian define ip6_fib_counter
240 manual_print manual_endian define vnet_ip6_fib_counters
244 vl_api_ip6_fib_counter_t c[count];
247 /** \brief Request for a single block of summary stats
248 @param client_index - opaque cookie to identify the sender
249 @param context - sender context, to match reply w/ request
251 define vnet_get_summary_stats
257 /** \brief Reply for vnet_get_summary_stats request
258 @param context - sender context, to match reply w/ request
259 @param retval - return code for request
264 define vnet_summary_stats_reply
273 /** \brief OAM event structure
274 @param dst_address[] -
283 /** \brief Want OAM events request
284 @param client_index - opaque cookie to identify the sender
285 @param context - sender context, to match reply w/ request
286 @param enable_disable- enable if non-zero, else disable
287 @param pid - pid of the requesting process
289 define want_oam_events
297 /** \brief Want OAM events response
298 @param context - sender context, to match reply w/ request
299 @param retval - return code for the want oam stats request
301 define want_oam_events_reply
307 /** \brief OAM add / del target request
308 @param client_index - opaque cookie to identify the sender
309 @param context - sender context, to match reply w/ request
310 @param vrf_id - vrf_id of the target
311 @param src_address[] - source address to use for the updates
312 @param dst_address[] - destination address of the target
313 @param is_add - add target if non-zero, else delete
325 /** \brief OAM add / del target response
326 @param context - sender context, to match reply w/ request
327 @param retval - return code of the request
329 define oam_add_del_reply
335 /** \brief Reset fib table request
336 @param client_index - opaque cookie to identify the sender
337 @param context - sender context, to match reply w/ request
338 @param vrf_id - vrf/table id of the fib table to reset
339 @param is_ipv6 - an ipv6 fib to reset if non-zero, else ipv4
349 /** \brief Reset fib response
350 @param context - sender context, to match reply w/ request
351 @param retval - return code for the reset bfib request
353 define reset_fib_reply
359 /** \brief DHCP Proxy config add / del request
360 @param client_index - opaque cookie to identify the sender
361 @param context - sender context, to match reply w/ request
362 @param vrf_id - vrf id
363 @param if_ipv6 - ipv6 if non-zero, else ipv4
364 @param is_add - add the config if non-zero, else delete
365 @param insert_circuit_id - option82 suboption 1 fib number
366 @param dhcp_server[] - server address
367 @param dhcp_src_address[] - <fix this, need details>
369 define dhcp_proxy_config
376 u8 insert_circuit_id;
378 u8 dhcp_src_address[16];
381 /** \brief DHCP Proxy config response
382 @param context - sender context, to match reply w/ request
383 @param retval - return code for the request
385 define dhcp_proxy_config_reply
391 /** \brief DHCP Proxy set / unset vss request
392 @param client_index - opaque cookie to identify the sender
393 @param context - sender context, to match reply w/ request
394 @param tbl_id - table id
395 @param oui - first part of vpn id
396 @param fib_id - second part of vpn id
397 @param is_ipv6 - ip6 if non-zero, else ip4
398 @param is_add - set vss if non-zero, else delete
400 define dhcp_proxy_set_vss
411 /** \brief DHCP proxy set / unset vss response
412 @param context - sender context, to match reply w/ request
413 @param retval - return code for the request
415 define dhcp_proxy_set_vss_reply
421 /** \brief Create loopback interface request
422 @param client_index - opaque cookie to identify the sender
423 @param context - sender context, to match reply w/ request
424 @param mac_address - mac addr to assign to the interface if none-zero
426 define create_loopback
433 /** \brief Create loopback interface response
434 @param context - sender context, to match reply w/ request
435 @param sw_if_index - sw index of the interface that was created
436 @param retval - return code for the request
438 define create_loopback_reply
445 /** \brief Delete loopback interface request
446 @param client_index - opaque cookie to identify the sender
447 @param context - sender context, to match reply w/ request
448 @param sw_if_index - sw index of the interface that was created
450 define delete_loopback
457 /** \brief Delete loopback interface response
458 @param context - sender context, to match reply w/ request
459 @param retval - return code for the request
461 define delete_loopback_reply
467 /** \brief Control ping from client to api server request
468 @param client_index - opaque cookie to identify the sender
469 @param context - sender context, to match reply w/ request
477 /** \brief Control ping from the client to the server response
478 @param client_index - opaque cookie to identify the sender
479 @param context - sender context, to match reply w/ request
480 @param retval - return code for the request
481 @param vpe_pid - the pid of the vpe, returned by the server
483 define control_ping_reply
491 /** \brief Process a vpe parser cli string request
492 @param client_index - opaque cookie to identify the sender
493 @param context - sender context, to match reply w/ request
494 @param cmd_in_shmem - pointer to cli command string
510 /** \brief vpe parser cli string response
511 @param context - sender context, to match reply w/ request
512 @param retval - return code for request
513 @param reply_in_shmem - Reply string from cli processing if any
521 define cli_inband_reply
529 /** \brief Set max allowed ARP or ip6 neighbor entries request
530 @param client_index - opaque cookie to identify the sender
531 @param context - sender context, to match reply w/ request
532 @param is_ipv6 - neighbor limit if non-zero, else ARP limit
533 @param arp_neighbor_limit - the new limit, defaults are ~ 50k
535 define set_arp_neighbor_limit
540 u32 arp_neighbor_limit;
543 /** \brief Set max allowed ARP or ip6 neighbor entries response
544 @param context - sender context, to match reply w/ request
545 @param retval - return code for request
547 define set_arp_neighbor_limit_reply
553 /** \brief L2 interface patch add / del request
554 @param client_index - opaque cookie to identify the sender
555 @param context - sender context, to match reply w/ request
556 @param rx_sw_if_index - receive side interface
557 @param tx_sw_if_index - transmit side interface
558 @param is_add - if non-zero set up the interface patch, else remove it
560 define l2_patch_add_del
569 /** \brief L2 interface patch add / del response
570 @param context - sender context, to match reply w/ request
571 @param retval - return code for the request
573 define l2_patch_add_del_reply
579 /** \brief Interface set vpath request
580 @param client_index - opaque cookie to identify the sender
581 @param context - sender context, to match reply w/ request
582 @param sw_if_index - interface used to reach neighbor
583 @param enable - if non-zero enable, else disable
585 define sw_interface_set_vpath
593 /** \brief Interface set vpath response
594 @param context - sender context, to match reply w/ request
595 @param retval - return code for the request
597 define sw_interface_set_vpath_reply
603 /** \brief Set L2 XConnect between two interfaces request
604 @param client_index - opaque cookie to identify the sender
605 @param context - sender context, to match reply w/ request
606 @param rx_sw_if_index - Receive interface index
607 @param tx_sw_if_index - Transmit interface index
608 @param enable - enable xconnect if not 0, else set to L3 mode
610 define sw_interface_set_l2_xconnect
619 /** \brief Set L2 XConnect response
620 @param context - sender context, to match reply w/ request
621 @param retval - L2 XConnect request return code
623 define sw_interface_set_l2_xconnect_reply
629 /** \brief Interface bridge mode request
630 @param client_index - opaque cookie to identify the sender
631 @param context - sender context, to match reply w/ request
632 @param rx_sw_if_index - the interface
633 @param bd_id - bridge domain id
634 @param bvi - Setup interface as a bvi, bridge mode only
635 @param shg - Shared horizon group, for bridge mode only
636 @param enable - Enable beige mode if not 0, else set to L3 mode
638 define sw_interface_set_l2_bridge
649 /** \brief Interface bridge mode response
650 @param context - sender context, to match reply w/ request
651 @param retval - Bridge mode request return code
653 define sw_interface_set_l2_bridge_reply
659 /** \brief Set bridge domain ip to mac entry request
660 @param client_index - opaque cookie to identify the sender
661 @param context - sender context, to match reply w/ request
662 @param bd_id - the bridge domain to set the flags for
663 @param is_add - if non-zero, add the entry, else clear it
664 @param is_ipv6 - if non-zero, ipv6 address, else ipv4 address
665 @param mac_address - MAC address
668 define bd_ip_mac_add_del
679 /** \brief Set bridge domain ip to mac entry response
680 @param context - sender context, to match reply w/ request
681 @param retval - return code for the set bridge flags request
683 define bd_ip_mac_add_del_reply
689 /** \brief Set/unset the classification table for an interface request
690 @param client_index - opaque cookie to identify the sender
691 @param context - sender context, to match reply w/ request
692 @param is_ipv6 - ipv6 if non-zero, else ipv4
693 @param sw_if_index - interface to associate with the table
694 @param table_index - index of the table, if ~0 unset the table
696 define classify_set_interface_ip_table
702 u32 table_index; /* ~0 => off */
705 /** \brief Set/unset interface classification table response
706 @param context - sender context, to match reply w/ request
707 @param retval - return code
709 define classify_set_interface_ip_table_reply
715 /** \brief Set/unset l2 classification tables for an interface request
716 @param client_index - opaque cookie to identify the sender
717 @param context - sender context, to match reply w/ request
718 @param sw_if_index - interface to set/unset tables for
719 @param ip4_table_index - ip4 index, use ~0 for all 3 indexes to unset
720 @param ip6_table_index - ip6 index
721 @param other_table_index - other index
723 define classify_set_interface_l2_tables
731 u32 other_table_index;
735 /** \brief Set/unset l2 classification tables for an interface response
736 @param context - sender context, to match reply w/ request
737 @param retval - return code for the request
739 define classify_set_interface_l2_tables_reply
745 /** \brief Get node index using name request
746 @param client_index - opaque cookie to identify the sender
747 @param context - sender context, to match reply w/ request
748 @param node_name[] - name of the node
750 define get_node_index
757 /** \brief Get node index using name request
758 @param context - sender context, to match reply w/ request
759 @param retval - return code for the request
760 @param node_index - index of the desired node if found, else ~0
762 define get_node_index_reply
769 /** \brief Set the next node for a given node request
770 @param client_index - opaque cookie to identify the sender
771 @param context - sender context, to match reply w/ request
772 @param node_name[] - node to add the next node to
773 @param next_name[] - node to add as the next node
783 /** \brief IP Set the next node for a given node response
784 @param context - sender context, to match reply w/ request
785 @param retval - return code for the add next node request
786 @param next_index - the index of the next node if success, else ~0
788 define add_node_next_reply
795 /** \brief DHCP Proxy config 2 add / del request
796 @param client_index - opaque cookie to identify the sender
797 @param context - sender context, to match reply w/ request
798 @param rx_vrf_id - receive vrf id
799 @param server_vrf_id - server vrf id
800 @param if_ipv6 - ipv6 if non-zero, else ipv4
801 @param is_add - add the config if non-zero, else delete
802 @param insert_circuit_id - option82 suboption 1 fib number
803 @param dhcp_server[] - server address
804 @param dhcp_src_address[] - <fix this, need details>
806 define dhcp_proxy_config_2
814 u8 insert_circuit_id;
816 u8 dhcp_src_address[16];
819 /** \brief DHCP Proxy config 2 add / del response
820 @param context - sender context, to match reply w/ request
821 @param retval - return code for request
823 define dhcp_proxy_config_2_reply
829 /** \brief L2 interface ethernet flow point filtering enable/disable request
830 @param client_index - opaque cookie to identify the sender
831 @param context - sender context, to match reply w/ request
832 @param sw_if_index - interface to enable/disable filtering on
833 @param enable_disable - if non-zero enable filtering, else disable
835 define l2_interface_efp_filter
843 /** \brief L2 interface ethernet flow point filtering response
844 @param context - sender context, to match reply w/ request
845 @param retval - return code for the request
847 define l2_interface_efp_filter_reply
853 /** \brief L2 interface vlan tag rewrite configure request
854 @param client_index - opaque cookie to identify the sender
855 @param context - sender context, to match reply w/ request
856 @param sw_if_index - interface the operation is applied to
857 @param vtr_op - Choose from l2_vtr_op_t enum values
858 @param push_dot1q - first pushed flag dot1q id set, else dot1ad
859 @param tag1 - Needed for any push or translate vtr op
860 @param tag2 - Needed for any push 2 or translate x-2 vtr ops
862 define l2_interface_vlan_tag_rewrite
868 u32 push_dot1q; // ethertype of first pushed tag is dot1q/dot1ad
869 u32 tag1; // first pushed tag
870 u32 tag2; // second pushed tag
873 /** \brief L2 interface vlan tag rewrite response
874 @param context - sender context, to match reply w/ request
875 @param retval - return code for the request
877 define l2_interface_vlan_tag_rewrite_reply
890 /* These fields map directly onto the subif template */
894 u8 dot1ad; // 0 = dot1q, 1=dot1ad
897 u8 outer_vlan_id_any;
898 u8 inner_vlan_id_any;
903 define create_subif_reply
910 /** \brief show version
911 @param client_index - opaque cookie to identify the sender
912 @param context - sender context, to match reply w/ request
920 /** \brief show version response
921 @param context - sender context, to match reply w/ request
922 @param retval - return code for the request
923 @param program - name of the program (vpe)
924 @param version - version of the program
925 @param build_directory - root of the workspace where the program was built
927 define show_version_reply
934 u8 build_directory[256];
937 /* Gross kludge, DGMS */
938 define interface_name_renumber
943 u32 new_show_dev_instance;
946 define interface_name_renumber_reply
952 /** \brief Register for ip4 arp resolution events
953 @param client_index - opaque cookie to identify the sender
954 @param context - sender context, to match reply w/ request
955 @param enable_disable - 1 => register for events, 0 => cancel registration
956 @param pid - sender's pid
957 @param address - the exact ip4 address of interest
959 define want_ip4_arp_events
968 /** \brief Reply for interface events registration
969 @param context - returned sender context, to match reply w/ request
970 @param retval - return code
972 define want_ip4_arp_events_reply
978 /** \brief Tell client about an ip4 arp resolution event
979 @param client_index - opaque cookie to identify the sender
980 @param context - sender context, to match reply w/ request
981 @param address - the exact ip4 address of interest
982 @param pid - client pid registered to receive notification
983 @param sw_if_index - interface which received ARP packet
984 @param new_mac - the new mac address
985 @param mac_ip - 0: resolution event, 1: mac/ip binding in bd
998 /** \brief Register for ip6 nd resolution events
999 @param client_index - opaque cookie to identify the sender
1000 @param context - sender context, to match reply w/ request
1001 @param enable_disable - 1 => register for events, 0 => cancel registration
1002 @param pid - sender's pid
1003 @param address - the exact ip6 address of interest
1005 define want_ip6_nd_events
1014 /** \brief Reply for ip6 nd resolution events registration
1015 @param context - returned sender context, to match reply w/ request
1016 @param retval - return code
1018 define want_ip6_nd_events_reply
1024 /** \brief Tell client about an ip6 nd resolution or mac/ip event
1025 @param client_index - opaque cookie to identify the sender
1026 @param context - sender context, to match reply w/ request
1027 @param pid - client pid registered to receive notification
1028 @param sw_if_index - interface which received ARP packet
1029 @param address - the exact ip6 address of interest
1030 @param new_mac - the new mac address
1031 @param mac_ip - 0: resolution event, 1: mac/ip binding in bd
1044 /** \brief DHCP Client config add / del request
1045 @param client_index - opaque cookie to identify the sender
1046 @param context - sender context, to match reply w/ request
1047 @param sw_if_index - index of the interface for DHCP client
1048 @param hostname - hostname
1049 @param is_add - add the config if non-zero, else delete
1050 @param want_dhcp_event - DHCP event sent to the sender
1051 via dhcp_compl_event API message if non-zero
1052 @param pid - sender's pid
1054 define dhcp_client_config
1065 /** \brief DHCP Client config response
1066 @param context - sender context, to match reply w/ request
1067 @param retval - return code for the request
1069 define dhcp_client_config_reply
1075 /** \brief Set/unset input ACL interface
1076 @param client_index - opaque cookie to identify the sender
1077 @param context - sender context, to match reply w/ request
1078 @param sw_if_index - interface to set/unset input ACL
1079 @param ip4_table_index - ip4 classify table index (~0 for skip)
1080 @param ip6_table_index - ip6 classify table index (~0 for skip)
1081 @param l2_table_index - l2 classify table index (~0 for skip)
1082 @param is_add - Set input ACL if non-zero, else unset
1083 Note: User is recommeneded to use just one valid table_index per call.
1084 (ip4_table_index, ip6_table_index, or l2_table_index)
1086 define input_acl_set_interface
1091 u32 ip4_table_index;
1092 u32 ip6_table_index;
1097 /** \brief Set/unset input ACL interface response
1098 @param context - sender context, to match reply w/ request
1099 @param retval - return code for the request
1101 define input_acl_set_interface_reply
1107 /** \brief Tell client about a DHCP completion event
1108 @param client_index - opaque cookie to identify the sender
1109 @param pid - client pid registered to receive notification
1110 @param is_ipv6 - if non-zero the address is ipv6, else ipv4
1111 @param host_address - Host IP address
1112 @param router_address - Router IP address
1113 @param host_mac - Host MAC address
1115 define dhcp_compl_event
1121 u8 host_address[16];
1122 u8 router_address[16];
1126 /** \brief cop: enable/disable junk filtration features on an interface
1127 @param client_index - opaque cookie to identify the sender
1128 @param context - sender context, to match reply w/ request
1129 @param sw_if_inded - desired interface
1130 @param enable_disable - 1 => enable, 0 => disable
1133 define cop_interface_enable_disable
1141 /** \brief cop: interface enable/disable junk filtration reply
1142 @param context - returned sender context, to match reply w/ request
1143 @param retval - return code
1146 define cop_interface_enable_disable_reply
1152 /** \brief cop: enable/disable whitelist filtration features on an interface
1153 Note: the supplied fib_id must match in order to remove the feature!
1155 @param client_index - opaque cookie to identify the sender
1156 @param context - sender context, to match reply w/ request
1157 @param sw_if_index - interface handle, physical interfaces only
1158 @param fib_id - fib identifier for the whitelist / blacklist fib
1159 @param ip4 - 1 => enable ip4 filtration, 0=> disable ip4 filtration
1160 @param ip6 - 1 => enable ip6 filtration, 0=> disable ip6 filtration
1161 @param default_cop - 1 => enable non-ip4, non-ip6 filtration 0=> disable it
1164 define cop_whitelist_enable_disable
1175 /** \brief cop: interface enable/disable junk filtration reply
1176 @param context - returned sender context, to match reply w/ request
1177 @param retval - return code
1180 define cop_whitelist_enable_disable_reply
1186 /** \brief get_node_graph - get a copy of the vpp node graph
1187 including the current set of graph arcs.
1189 @param client_index - opaque cookie to identify the sender
1190 @param context - sender context, to match reply w/ request
1193 define get_node_graph
1199 /** \brief get_node_graph_reply
1200 @param context - returned sender context, to match reply w/ request
1201 @param retval - return code
1202 @param reply_in_shmem - result from vlib_node_serialize, in shared
1203 memory. Process with vlib_node_unserialize, remember to switch
1204 heaps and free the result.
1207 define get_node_graph_reply
1214 /** \brief IOAM enable : Enable in-band OAM
1215 @param id - profile id
1216 @param seqno - To enable Seqno Processing
1217 @param analyse - Enabling analysis of iOAM at decap node
1218 @param pow_enable - Proof of Work enabled or not flag
1219 @param trace_enable - iOAM Trace enabled or not flag
1233 /** \brief iOAM Trace profile add / del response
1234 @param context - sender context, to match reply w/ request
1235 @param retval - return value for request
1237 define ioam_enable_reply
1243 /** \brief iOAM disable
1244 @param client_index - opaque cookie to identify the sender
1245 @param context - sender context, to match reply w/ request
1246 @param index - MAP Domain index
1255 /** \brief iOAM disable response
1256 @param context - sender context, to match reply w/ request
1257 @param retval - return value for request
1259 define ioam_disable_reply
1265 /** \brief Add/del policer
1266 @param client_index - opaque cookie to identify the sender
1267 @param context - sender context, to match reply w/ request
1268 @param is_add - add policer if non-zero, else delete
1269 @param name - policer name
1272 @param cb - Committed Burst
1273 @param eb - Excess or Peak Burst
1274 @param rate_type - rate type
1275 @param round_type - rounding type
1276 @param type - policer algorithm
1277 @param color_aware - 0=color-blind, 1=color-aware
1278 @param conform_action_type - conform action type
1279 @param conform_dscp - DSCP for conform mar-and-transmit action
1280 @param exceed_action_type - exceed action type
1281 @param exceed_dscp - DSCP for exceed mar-and-transmit action
1282 @param violate_action_type - violate action type
1283 @param violate_dscp - DSCP for violate mar-and-transmit action
1285 define policer_add_del
1300 u8 conform_action_type;
1302 u8 exceed_action_type;
1304 u8 violate_action_type;
1308 /** \brief Add/del policer response
1309 @param context - sender context, to match reply w/ request
1310 @param retval - return value for request
1311 @param policer_index - for add, returned index of the new policer
1313 define policer_add_del_reply
1320 /** \brief Get list of policers
1321 @param client_index - opaque cookie to identify the sender
1322 @param context - sender context, to match reply w/ request
1323 @param match_name_valid - if 0 request all policers otherwise use match_name
1324 @param match_name - policer name
1331 u8 match_name_valid;
1335 /** \brief Policer operational state response.
1336 @param context - sender context, to match reply w/ request
1337 @param name - policer name
1340 @param cb - Committed Burst
1341 @param eb - Excess or Peak Burst
1342 @param rate_type - rate type
1343 @param round_type - rounding type
1344 @param type - policer algorithm
1345 @param conform_action_type - conform action type
1346 @param conform_dscp - DSCP for conform mar-and-transmit action
1347 @param exceed_action_type - exceed action type
1348 @param exceed_dscp - DSCP for exceed mar-and-transmit action
1349 @param violate_action_type - violate action type
1350 @param violate_dscp - DSCP for violate mar-and-transmit action
1351 @param single_rate - 1 = single rate policer, 0 = two rate policer
1352 @param color_aware - for hierarchical policing
1353 @param scale - power-of-2 shift amount for lower rates
1354 @param cir_tokens_per_period - number of tokens for each period
1355 @param pir_tokens_per_period - number of tokens for each period for 2-rate policer
1356 @param current_limit - current limit
1357 @param current_bucket - current bucket
1358 @param extended_limit - extended limit
1359 @param extended_bucket - extended bucket
1360 @param last_update_time - last update time
1362 define policer_details
1374 u8 conform_action_type;
1376 u8 exceed_action_type;
1378 u8 violate_action_type;
1383 u32 cir_tokens_per_period;
1384 u32 pir_tokens_per_period;
1388 u32 extended_bucket;
1389 u64 last_update_time;
1392 /** \brief Configure IPFIX exporter process request
1393 @param client_index - opaque cookie to identify the sender
1394 @param context - sender context, to match reply w/ request
1395 @param collector_address - address of IPFIX collector
1396 @param collector_port - port of IPFIX collector
1397 @param src_address - address of IPFIX exporter
1398 @param vrf_id - VRF / fib table ID
1399 @param path_mtu - Path MTU between exporter and collector
1400 @param template_interval - number of seconds after which to resend template
1401 @param udp_checksum - UDP checksum calculation enable flag
1403 define set_ipfix_exporter
1407 u8 collector_address[16];
1412 u32 template_interval;
1416 /** \brief Reply to IPFIX exporter configure request
1417 @param context - sender context which was passed in the request
1419 define set_ipfix_exporter_reply
1425 /** \brief IPFIX exporter dump request
1426 @param client_index - opaque cookie to identify the sender
1427 @param context - sender context, to match reply w/ request
1429 define ipfix_exporter_dump
1435 /** \brief Reply to IPFIX exporter dump request
1436 @param context - sender context which was passed in the request
1437 @param collector_address - address of IPFIX collector
1438 @param collector_port - port of IPFIX collector
1439 @param src_address - address of IPFIX exporter
1440 @param fib_index - fib table index
1441 @param path_mtu - Path MTU between exporter and collector
1442 @param template_interval - number of seconds after which to resend template
1443 @param udp_checksum - UDP checksum calculation enable flag
1445 define ipfix_exporter_details
1448 u8 collector_address[16];
1453 u32 template_interval;
1457 /** \brief IPFIX classify stream configure request
1458 @param client_index - opaque cookie to identify the sender
1459 @param context - sender context, to match reply w/ request
1460 @param domain_id - domain ID reported in IPFIX messages for classify stream
1461 @param src_port - source port of UDP session for classify stream
1463 define set_ipfix_classify_stream {
1470 /** \brief IPFIX classify stream configure response
1471 @param context - sender context, to match reply w/ request
1472 @param retval - return value for request
1474 define set_ipfix_classify_stream_reply {
1479 /** \brief IPFIX classify stream dump request
1480 @param client_index - opaque cookie to identify the sender
1481 @param context - sender context, to match reply w/ request
1483 define ipfix_classify_stream_dump {
1488 /** \brief Reply to IPFIX classify stream dump request
1489 @param context - sender context, to match reply w/ request
1490 @param domain_id - domain ID reported in IPFIX messages for classify stream
1491 @param src_port - source port of UDP session for classify stream
1493 define ipfix_classify_stream_details {
1499 /** \brief IPFIX add or delete classifier table request
1500 @param client_index - opaque cookie to identify the sender
1501 @param context - sender context, to match reply w/ request
1502 @param table_id - classifier table ID
1503 @param ip_version - version of IP used in the classifier table
1504 @param transport_protocol - transport protocol used in the classifier table or 255 for unspecified
1506 define ipfix_classify_table_add_del {
1511 u8 transport_protocol;
1515 /** \brief IPFIX add classifier table response
1516 @param context - sender context which was passed in the request
1518 define ipfix_classify_table_add_del_reply {
1523 /** \brief IPFIX classify tables dump request
1524 @param client_index - opaque cookie to identify the sender
1525 @param context - sender context, to match reply w/ request
1527 define ipfix_classify_table_dump {
1532 /** \brief Reply to IPFIX classify tables dump request
1533 @param context - sender context, to match reply w/ request
1534 @param table_id - classifier table ID
1535 @param ip_version - version of IP used in the classifier table
1536 @param transport_protocol - transport protocol used in the classifier table or 255 for unspecified
1538 define ipfix_classify_table_details {
1542 u8 transport_protocol;
1545 /** \brief Query relative index via node names
1546 @param client_index - opaque cookie to identify the sender
1547 @param context - sender context, to match reply w/ request
1548 @param node_name - name of node to find relative index from
1549 @param next_name - next node from node_name to find relative index of
1551 define get_next_index
1559 /** \brief Reply for get next node index
1560 @param context - sender context which was passed in the request
1561 @param retval - return value
1562 @param next_index - index of the next_node
1564 define get_next_index_reply
1571 /** \brief PacketGenerator create interface request
1572 @param client_index - opaque cookie to identify the sender
1573 @param context - sender context, to match reply w/ request
1574 @param interface_id - interface index
1576 define pg_create_interface
1583 /** \brief PacketGenerator create interface response
1584 @param context - sender context, to match reply w/ request
1585 @param retval - return value for request
1587 define pg_create_interface_reply
1594 /** \brief PacketGenerator capture packets on given interface request
1595 @param client_index - opaque cookie to identify the sender
1596 @param context - sender context, to match reply w/ request
1597 @param interface_id - pg interface index
1598 @param is_enabled - 1 if enabling streams, 0 if disabling
1599 @param count - number of packets to be captured
1600 @param pcap_file - pacp file name to store captured packets
1609 u32 pcap_name_length;
1610 u8 pcap_file_name[pcap_name_length];
1613 /** \brief PacketGenerator capture packets response
1614 @param context - sender context, to match reply w/ request
1615 @param retval - return value for request
1617 define pg_capture_reply
1623 /** \brief Enable / disable packet generator request
1624 @param client_index - opaque cookie to identify the sender
1625 @param context - sender context, to match reply w/ request
1626 @param is_enabled - 1 if enabling streams, 0 if disabling
1627 @param stream - stream name to be enable/disabled, if not specified handle all streams
1629 define pg_enable_disable
1634 u32 stream_name_length;
1635 u8 stream_name[stream_name_length];
1638 /** \brief Reply for enable / disable packet generator
1639 @param context - returned sender context, to match reply w/ request
1640 @param retval - return code
1642 define pg_enable_disable_reply
1648 /** \brief Configure IP source and L4 port-range check
1649 @param client_index - opaque cookie to identify the sender
1650 @param context - sender context, to match reply w/ request
1651 @param is_ip6 - 1 if source address type is IPv6
1652 @param is_add - 1 if add, 0 if delete
1653 @param mask_length - mask length for address entry
1654 @param address - array of address bytes
1655 @param number_of_ranges - length of low_port and high_port arrays (must match)
1656 @param low_ports[32] - up to 32 low end of port range entries (must have corresponding high_ports entry)
1657 @param high_ports[32] - up to 32 high end of port range entries (must have corresponding low_ports entry)
1658 @param vrf_id - fib table/vrf id to associate the source and port-range check with
1659 @note To specify a single port set low_port and high_port entry the same
1661 define ip_source_and_port_range_check_add_del
1669 u8 number_of_ranges;
1675 /** \brief Configure IP source and L4 port-range check reply
1676 @param context - returned sender context, to match reply w/ request
1677 @param retval - return code
1679 define ip_source_and_port_range_check_add_del_reply
1685 /** \brief Set interface source and L4 port-range request
1686 @param client_index - opaque cookie to identify the sender
1687 @param context - sender context, to match reply w/ request
1688 @param interface_id - interface index
1689 @param tcp_vrf_id - VRF associated with source and TCP port-range check
1690 @param udp_vrf_id - VRF associated with source and TCP port-range check
1692 define ip_source_and_port_range_check_interface_add_del
1704 /** \brief Set interface source and L4 port-range response
1705 @param context - sender context, to match reply w/ request
1706 @param retval - return value for request
1708 define ip_source_and_port_range_check_interface_add_del_reply
1714 /** \brief Delete sub interface request
1715 @param client_index - opaque cookie to identify the sender
1716 @param context - sender context, to match reply w/ request
1717 @param sw_if_index - sw index of the interface that was created by create_subif
1719 define delete_subif {
1725 /** \brief Delete sub interface response
1726 @param context - sender context, to match reply w/ request
1727 @param retval - return code for the request
1729 define delete_subif_reply {
1734 /** \brief L2 interface pbb tag rewrite configure request
1735 @param client_index - opaque cookie to identify the sender
1736 @param context - sender context, to match reply w/ request
1737 @param sw_if_index - interface the operation is applied to
1738 @param vtr_op - Choose from l2_vtr_op_t enum values
1739 @param inner_tag - needed for translate_qinq vtr op only
1740 @param outer_tag - needed for translate_qinq vtr op only
1741 @param b_dmac - B-tag remote mac address, needed for any push or translate_qinq vtr op
1742 @param b_smac - B-tag local mac address, needed for any push or translate qinq vtr op
1743 @param b_vlanid - B-tag vlanid, needed for any push or translate qinq vtr op
1744 @param i_sid - I-tag service id, needed for any push or translate qinq vtr op
1746 define l2_interface_pbb_tag_rewrite
1759 /** \brief L2 interface pbb tag rewrite response
1760 @param context - sender context, to match reply w/ request
1761 @param retval - return code for the request
1763 define l2_interface_pbb_tag_rewrite_reply
1769 /** \brief Punt traffic to the host
1770 @param client_index - opaque cookie to identify the sender
1771 @param context - sender context, to match reply w/ request
1772 @param is_add - add punt if non-zero, else delete
1773 @param ipv - L3 protocol 4 - IPv4, 6 - IPv6, ~0 - All
1774 @param l4_protocol - L4 protocol to be punted, only UDP (0x11) is supported
1775 @param l4_port - TCP/UDP port to be punted
1786 /** \brief Reply to the punt request
1787 @param context - sender context which was passed in the request
1788 @param retval - return code of punt request
1796 /** \brief Feature path enable/disable request
1797 @param client_index - opaque cookie to identify the sender
1798 @param context - sender context, to match reply w/ request
1799 @param sw_if_index - the interface
1800 @param enable - 1 = on, 0 = off
1802 define feature_enable_disable {
1808 u8 feature_name[64];
1811 /** \brief Reply to the eature path enable/disable request
1812 @param context - sender context which was passed in the request
1813 @param retval - return code for the request
1815 define feature_enable_disable_reply
1823 * eval: (c-set-style "gnu")