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}
46 /** \brief Create a new subinterface with the given vlan id
47 @param client_index - opaque cookie to identify the sender
48 @param context - sender context, to match reply w/ request
49 @param sw_if_index - software index of the new vlan's parent interface
50 @param vlan_id - vlan tag of the new interface
52 define create_vlan_subif
60 /** \brief Reply for the vlan subinterface create request
61 @param context - returned sender context, to match reply w/ request
62 @param retval - return code
63 @param sw_if_index - software index allocated for the new subinterface
65 define create_vlan_subif_reply
72 /** \brief Enable or Disable MPLS on and interface
73 @param client_index - opaque cookie to identify the sender
74 @param context - sender context, to match reply w/ request
75 @param sw_if_index - index of the interface
76 @param enable - if non-zero enable, else disable
78 define sw_interface_set_mpls_enable
86 /** \brief Reply for MPLS state on an interface
87 @param context - returned sender context, to match reply w/ request
88 @param retval - return code
90 define sw_interface_set_mpls_enable_reply
96 /** \brief Proxy ARP add / del request
97 @param client_index - opaque cookie to identify the sender
98 @param context - sender context, to match reply w/ request
99 @param vrf_id - VRF / Fib table ID
100 @param is_add - 1 if adding the Proxy ARP range, 0 if deleting
101 @param low_address[4] - Low address of the Proxy ARP range
102 @param hi_address[4] - High address of the Proxy ARP range
104 define proxy_arp_add_del
114 /** \brief Reply for proxy arp add / del request
115 @param context - returned sender context, to match reply w/ request
116 @param retval - return code
118 define proxy_arp_add_del_reply
124 /** \brief Proxy ARP add / del request
125 @param client_index - opaque cookie to identify the sender
126 @param context - sender context, to match reply w/ request
127 @param sw_if_index - Which interface to enable / disable Proxy Arp on
128 @param enable_disable - 1 to enable Proxy ARP on interface, 0 to disable
130 define proxy_arp_intfc_enable_disable
135 /* 1 = on, 0 = off */
139 /** \brief Reply for Proxy ARP interface enable / disable request
140 @param context - returned sender context, to match reply w/ request
141 @param retval - return code
143 define proxy_arp_intfc_enable_disable_reply
149 /** \brief Reset VRF (remove all routes etc) request
150 @param client_index - opaque cookie to identify the sender
151 @param context - sender context, to match reply w/ request
152 @param is_ipv6 - 1 for IPv6 neighbor, 0 for IPv4
153 @param vrf_id - ID of th FIB table / VRF to reset
163 /** \brief Reply for Reset VRF request
164 @param context - returned sender context, to match reply w/ request
165 @param retval - return code
167 define reset_vrf_reply
173 /** \brief Is Address Reachable request - DISABLED
174 @param client_index - opaque cookie to identify the sender
175 @param context - sender context, to match reply w/ request
176 @param next_hop_sw_if_index - index of interface used to get to next hop
177 @param is_ipv6 - 1 for IPv6, 0 for IPv4
178 @param is_error - address not found or does not match intf
179 @param address[] - Address in question
181 define is_address_reachable
183 u32 client_index; /* (api_main_t *) am->my_client_index */
185 u32 next_hop_sw_if_index;
186 u8 is_known; /* on reply, this is the answer */
188 u8 is_error; /* address not found or does not match intf */
192 /** \brief Want Stats, register for stats updates
193 @param client_index - opaque cookie to identify the sender
194 @param context - sender context, to match reply w/ request
195 @param enable_disable - 1 = enable stats, 0 = disable
196 @param pid - pid of process requesting stats updates
206 /** \brief Reply for Want Stats request
207 @param context - returned sender context, to match reply w/ request
208 @param retval - return code
210 define want_stats_reply
216 typeonly manual_print manual_endian define ip4_fib_counter
224 manual_print manual_endian define vnet_ip4_fib_counters
228 vl_api_ip4_fib_counter_t c[count];
231 typeonly manual_print manual_endian define ip6_fib_counter
239 manual_print manual_endian define vnet_ip6_fib_counters
243 vl_api_ip6_fib_counter_t c[count];
246 /** \brief Request for a single block of summary stats
247 @param client_index - opaque cookie to identify the sender
248 @param context - sender context, to match reply w/ request
250 define vnet_get_summary_stats
256 /** \brief Reply for vnet_get_summary_stats request
257 @param context - sender context, to match reply w/ request
258 @param retval - return code for request
263 define vnet_summary_stats_reply
272 /** \brief OAM event structure
273 @param dst_address[] -
282 /** \brief Want OAM events request
283 @param client_index - opaque cookie to identify the sender
284 @param context - sender context, to match reply w/ request
285 @param enable_disable- enable if non-zero, else disable
286 @param pid - pid of the requesting process
288 define want_oam_events
296 /** \brief Want OAM events response
297 @param context - sender context, to match reply w/ request
298 @param retval - return code for the want oam stats request
300 define want_oam_events_reply
306 /** \brief OAM add / del target request
307 @param client_index - opaque cookie to identify the sender
308 @param context - sender context, to match reply w/ request
309 @param vrf_id - vrf_id of the target
310 @param src_address[] - source address to use for the updates
311 @param dst_address[] - destination address of the target
312 @param is_add - add target if non-zero, else delete
324 /** \brief OAM add / del target response
325 @param context - sender context, to match reply w/ request
326 @param retval - return code of the request
328 define oam_add_del_reply
334 /** \brief Reset fib table request
335 @param client_index - opaque cookie to identify the sender
336 @param context - sender context, to match reply w/ request
337 @param vrf_id - vrf/table id of the fib table to reset
338 @param is_ipv6 - an ipv6 fib to reset if non-zero, else ipv4
348 /** \brief Reset fib response
349 @param context - sender context, to match reply w/ request
350 @param retval - return code for the reset bfib request
352 define reset_fib_reply
358 /** \brief DHCP Proxy config add / del request
359 @param client_index - opaque cookie to identify the sender
360 @param context - sender context, to match reply w/ request
361 @param vrf_id - vrf id
362 @param if_ipv6 - ipv6 if non-zero, else ipv4
363 @param is_add - add the config if non-zero, else delete
364 @param insert_circuit_id - option82 suboption 1 fib number
365 @param dhcp_server[] - server address
366 @param dhcp_src_address[] - <fix this, need details>
368 define dhcp_proxy_config
375 u8 insert_circuit_id;
377 u8 dhcp_src_address[16];
380 /** \brief DHCP Proxy config response
381 @param context - sender context, to match reply w/ request
382 @param retval - return code for the request
384 define dhcp_proxy_config_reply
390 /** \brief DHCP Proxy set / unset vss request
391 @param client_index - opaque cookie to identify the sender
392 @param context - sender context, to match reply w/ request
393 @param tbl_id - table id
394 @param oui - first part of vpn id
395 @param fib_id - second part of vpn id
396 @param is_ipv6 - ip6 if non-zero, else ip4
397 @param is_add - set vss if non-zero, else delete
399 define dhcp_proxy_set_vss
410 /** \brief DHCP proxy set / unset vss response
411 @param context - sender context, to match reply w/ request
412 @param retval - return code for the request
414 define dhcp_proxy_set_vss_reply
420 /** \brief Create loopback interface request
421 @param client_index - opaque cookie to identify the sender
422 @param context - sender context, to match reply w/ request
423 @param mac_address - mac addr to assign to the interface if none-zero
425 define create_loopback
432 /** \brief Create loopback interface response
433 @param context - sender context, to match reply w/ request
434 @param sw_if_index - sw index of the interface that was created
435 @param retval - return code for the request
437 define create_loopback_reply
444 /** \brief Delete loopback interface request
445 @param client_index - opaque cookie to identify the sender
446 @param context - sender context, to match reply w/ request
447 @param sw_if_index - sw index of the interface that was created
449 define delete_loopback
456 /** \brief Delete loopback interface response
457 @param context - sender context, to match reply w/ request
458 @param retval - return code for the request
460 define delete_loopback_reply
466 /** \brief Control ping from client to api server request
467 @param client_index - opaque cookie to identify the sender
468 @param context - sender context, to match reply w/ request
476 /** \brief Control ping from the client to the server response
477 @param client_index - opaque cookie to identify the sender
478 @param context - sender context, to match reply w/ request
479 @param retval - return code for the request
480 @param vpe_pid - the pid of the vpe, returned by the server
482 define control_ping_reply
490 /** \brief Process a vpe parser cli string request
491 @param client_index - opaque cookie to identify the sender
492 @param context - sender context, to match reply w/ request
493 @param cmd_in_shmem - pointer to cli command string
509 /** \brief vpe parser cli string response
510 @param context - sender context, to match reply w/ request
511 @param retval - return code for request
512 @param reply_in_shmem - Reply string from cli processing if any
520 define cli_inband_reply
528 /** \brief Set max allowed ARP or ip6 neighbor entries request
529 @param client_index - opaque cookie to identify the sender
530 @param context - sender context, to match reply w/ request
531 @param is_ipv6 - neighbor limit if non-zero, else ARP limit
532 @param arp_neighbor_limit - the new limit, defaults are ~ 50k
534 define set_arp_neighbor_limit
539 u32 arp_neighbor_limit;
542 /** \brief Set max allowed ARP or ip6 neighbor entries response
543 @param context - sender context, to match reply w/ request
544 @param retval - return code for request
546 define set_arp_neighbor_limit_reply
552 /** \brief L2 interface patch add / del request
553 @param client_index - opaque cookie to identify the sender
554 @param context - sender context, to match reply w/ request
555 @param rx_sw_if_index - receive side interface
556 @param tx_sw_if_index - transmit side interface
557 @param is_add - if non-zero set up the interface patch, else remove it
559 define l2_patch_add_del
568 /** \brief L2 interface patch add / del response
569 @param context - sender context, to match reply w/ request
570 @param retval - return code for the request
572 define l2_patch_add_del_reply
578 /** \brief Interface set vpath request
579 @param client_index - opaque cookie to identify the sender
580 @param context - sender context, to match reply w/ request
581 @param sw_if_index - interface used to reach neighbor
582 @param enable - if non-zero enable, else disable
584 define sw_interface_set_vpath
592 /** \brief Interface set vpath response
593 @param context - sender context, to match reply w/ request
594 @param retval - return code for the request
596 define sw_interface_set_vpath_reply
602 /** \brief Set L2 XConnect between two interfaces request
603 @param client_index - opaque cookie to identify the sender
604 @param context - sender context, to match reply w/ request
605 @param rx_sw_if_index - Receive interface index
606 @param tx_sw_if_index - Transmit interface index
607 @param enable - enable xconnect if not 0, else set to L3 mode
609 define sw_interface_set_l2_xconnect
618 /** \brief Set L2 XConnect response
619 @param context - sender context, to match reply w/ request
620 @param retval - L2 XConnect request return code
622 define sw_interface_set_l2_xconnect_reply
628 /** \brief Interface bridge mode request
629 @param client_index - opaque cookie to identify the sender
630 @param context - sender context, to match reply w/ request
631 @param rx_sw_if_index - the interface
632 @param bd_id - bridge domain id
633 @param bvi - Setup interface as a bvi, bridge mode only
634 @param shg - Shared horizon group, for bridge mode only
635 @param enable - Enable beige mode if not 0, else set to L3 mode
637 define sw_interface_set_l2_bridge
648 /** \brief Interface bridge mode response
649 @param context - sender context, to match reply w/ request
650 @param retval - Bridge mode request return code
652 define sw_interface_set_l2_bridge_reply
658 /** \brief Set bridge domain ip to mac entry request
659 @param client_index - opaque cookie to identify the sender
660 @param context - sender context, to match reply w/ request
661 @param bd_id - the bridge domain to set the flags for
662 @param is_add - if non-zero, add the entry, else clear it
663 @param is_ipv6 - if non-zero, ipv6 address, else ipv4 address
664 @param mac_address - MAC address
667 define bd_ip_mac_add_del
678 /** \brief Set bridge domain ip to mac entry response
679 @param context - sender context, to match reply w/ request
680 @param retval - return code for the set bridge flags request
682 define bd_ip_mac_add_del_reply
688 /** \brief Add/Delete classification table request
689 @param client_index - opaque cookie to identify the sender
690 @param context - sender context, to match reply w/ request
691 @param is_add- if non-zero add the table, else delete it
692 @param del_chain - if non-zero delete the whole chain of tables
693 @param table_index - if add, reuturns index of the created table, else specifies the table to delete
694 @param nbuckets - number of buckets when adding a table
695 @param memory_size - memory size when adding a table
696 @param match_n_vectors - number of match vectors
697 @param next_table_index - index of next table
698 @param miss_next_index - index of miss table
699 @param current_data_flag - option to use current node's packet payload
700 as the starting point from where packets are classified,
701 This option is only valid for L2/L3 input ACL for now.
702 0: by default, classify data from the buffer's start location
703 1: classify packets from VPP node’s current data pointer
704 @param current_data_offset - a signed value to shift the start location of
705 the packet to be classified
706 For example, if input IP ACL node is used, L2 header’s first byte
707 can be accessible by configuring current_data_offset to -14
708 if there is no vlan tag.
709 This is valid only if current_data_flag is set to 1.
710 @param mask[] - match mask
712 define classify_add_del_table
723 u32 next_table_index;
725 u32 current_data_flag;
726 i32 current_data_offset;
730 /** \brief Add/Delete classification table response
731 @param context - sender context, to match reply w/ request
732 @param retval - return code for the table add/del requst
733 @param new_table_index - for add, returned index of the new table
734 @param skip_n_vectors - for add, returned value of skip_n_vectors in table
735 @param match_n_vectors -for add, returned value of match_n_vectors in table
737 define classify_add_del_table_reply
746 /** \brief Classify add / del session request
747 @param client_index - opaque cookie to identify the sender
748 @param context - sender context, to match reply w/ request
749 @param is_add - add session if non-zero, else delete
750 @param table_index - index of the table to add/del the session, required
751 @param hit_next_index - for add, hit_next_index of new session, required
752 @param opaque_index - for add, opaque_index of new session
753 @param advance -for add, advance value for session
755 0: no action (by default)
756 metadata is not used.
757 1: Classified IP packets will be looked up from the
758 specified ipv4 fib table (configured by metadata as VRF id).
759 Only valid for L3 input ACL node
760 2: Classified IP packets will be looked up from the
761 specified ipv6 fib table (configured by metadata as VRF id).
762 Only valid for L3 input ACL node
763 @param metadata - valid only if action != 0
764 VRF id if action is 1 or 2.
765 @param match[] - for add, match value for session, required
767 define classify_add_del_session
781 /** \brief Classify add / del session response
782 @param context - sender context, to match reply w/ request
783 @param retval - return code for the add/del session request
785 define classify_add_del_session_reply
791 /** \brief Set/unset the classification table for an interface request
792 @param client_index - opaque cookie to identify the sender
793 @param context - sender context, to match reply w/ request
794 @param is_ipv6 - ipv6 if non-zero, else ipv4
795 @param sw_if_index - interface to associate with the table
796 @param table_index - index of the table, if ~0 unset the table
798 define classify_set_interface_ip_table
804 u32 table_index; /* ~0 => off */
807 /** \brief Set/unset interface classification table response
808 @param context - sender context, to match reply w/ request
809 @param retval - return code
811 define classify_set_interface_ip_table_reply
817 /** \brief Set/unset l2 classification tables for an interface request
818 @param client_index - opaque cookie to identify the sender
819 @param context - sender context, to match reply w/ request
820 @param sw_if_index - interface to set/unset tables for
821 @param ip4_table_index - ip4 index, use ~0 for all 3 indexes to unset
822 @param ip6_table_index - ip6 index
823 @param other_table_index - other index
825 define classify_set_interface_l2_tables
833 u32 other_table_index;
837 /** \brief Set/unset l2 classification tables for an interface response
838 @param context - sender context, to match reply w/ request
839 @param retval - return code for the request
841 define classify_set_interface_l2_tables_reply
847 /** \brief Get node index using name request
848 @param client_index - opaque cookie to identify the sender
849 @param context - sender context, to match reply w/ request
850 @param node_name[] - name of the node
852 define get_node_index
859 /** \brief Get node index using name request
860 @param context - sender context, to match reply w/ request
861 @param retval - return code for the request
862 @param node_index - index of the desired node if found, else ~0
864 define get_node_index_reply
871 /** \brief Set the next node for a given node request
872 @param client_index - opaque cookie to identify the sender
873 @param context - sender context, to match reply w/ request
874 @param node_name[] - node to add the next node to
875 @param next_name[] - node to add as the next node
885 /** \brief IP Set the next node for a given node response
886 @param context - sender context, to match reply w/ request
887 @param retval - return code for the add next node request
888 @param next_index - the index of the next node if success, else ~0
890 define add_node_next_reply
897 /** \brief DHCP Proxy config 2 add / del request
898 @param client_index - opaque cookie to identify the sender
899 @param context - sender context, to match reply w/ request
900 @param rx_vrf_id - receive vrf id
901 @param server_vrf_id - server vrf id
902 @param if_ipv6 - ipv6 if non-zero, else ipv4
903 @param is_add - add the config if non-zero, else delete
904 @param insert_circuit_id - option82 suboption 1 fib number
905 @param dhcp_server[] - server address
906 @param dhcp_src_address[] - <fix this, need details>
908 define dhcp_proxy_config_2
916 u8 insert_circuit_id;
918 u8 dhcp_src_address[16];
921 /** \brief DHCP Proxy config 2 add / del response
922 @param context - sender context, to match reply w/ request
923 @param retval - return code for request
925 define dhcp_proxy_config_2_reply
931 /** \brief L2 interface ethernet flow point filtering enable/disable request
932 @param client_index - opaque cookie to identify the sender
933 @param context - sender context, to match reply w/ request
934 @param sw_if_index - interface to enable/disable filtering on
935 @param enable_disable - if non-zero enable filtering, else disable
937 define l2_interface_efp_filter
945 /** \brief L2 interface ethernet flow point filtering response
946 @param context - sender context, to match reply w/ request
947 @param retval - return code for the request
949 define l2_interface_efp_filter_reply
955 /** \brief L2 interface vlan tag rewrite configure request
956 @param client_index - opaque cookie to identify the sender
957 @param context - sender context, to match reply w/ request
958 @param sw_if_index - interface the operation is applied to
959 @param vtr_op - Choose from l2_vtr_op_t enum values
960 @param push_dot1q - first pushed flag dot1q id set, else dot1ad
961 @param tag1 - Needed for any push or translate vtr op
962 @param tag2 - Needed for any push 2 or translate x-2 vtr ops
964 define l2_interface_vlan_tag_rewrite
970 u32 push_dot1q; // ethertype of first pushed tag is dot1q/dot1ad
971 u32 tag1; // first pushed tag
972 u32 tag2; // second pushed tag
975 /** \brief L2 interface vlan tag rewrite response
976 @param context - sender context, to match reply w/ request
977 @param retval - return code for the request
979 define l2_interface_vlan_tag_rewrite_reply
992 /* These fields map directly onto the subif template */
996 u8 dot1ad; // 0 = dot1q, 1=dot1ad
999 u8 outer_vlan_id_any;
1000 u8 inner_vlan_id_any;
1005 define create_subif_reply
1012 /** \brief show version
1013 @param client_index - opaque cookie to identify the sender
1014 @param context - sender context, to match reply w/ request
1022 /** \brief show version response
1023 @param context - sender context, to match reply w/ request
1024 @param retval - return code for the request
1025 @param program - name of the program (vpe)
1026 @param version - version of the program
1027 @param build_directory - root of the workspace where the program was built
1029 define show_version_reply
1036 u8 build_directory[256];
1039 /* Gross kludge, DGMS */
1040 define interface_name_renumber
1045 u32 new_show_dev_instance;
1048 define interface_name_renumber_reply
1054 /** \brief Register for ip4 arp resolution events
1055 @param client_index - opaque cookie to identify the sender
1056 @param context - sender context, to match reply w/ request
1057 @param enable_disable - 1 => register for events, 0 => cancel registration
1058 @param pid - sender's pid
1059 @param address - the exact ip4 address of interest
1061 define want_ip4_arp_events
1070 /** \brief Reply for interface events registration
1071 @param context - returned sender context, to match reply w/ request
1072 @param retval - return code
1074 define want_ip4_arp_events_reply
1080 /** \brief Tell client about an ip4 arp resolution event
1081 @param client_index - opaque cookie to identify the sender
1082 @param context - sender context, to match reply w/ request
1083 @param address - the exact ip4 address of interest
1084 @param pid - client pid registered to receive notification
1085 @param sw_if_index - interface which received ARP packet
1086 @param new_mac - the new mac address
1087 @param mac_ip - 0: resolution event, 1: mac/ip binding in bd
1089 define ip4_arp_event
1100 /** \brief Register for ip6 nd resolution events
1101 @param client_index - opaque cookie to identify the sender
1102 @param context - sender context, to match reply w/ request
1103 @param enable_disable - 1 => register for events, 0 => cancel registration
1104 @param pid - sender's pid
1105 @param address - the exact ip6 address of interest
1107 define want_ip6_nd_events
1116 /** \brief Reply for ip6 nd resolution events registration
1117 @param context - returned sender context, to match reply w/ request
1118 @param retval - return code
1120 define want_ip6_nd_events_reply
1126 /** \brief Tell client about an ip6 nd resolution or mac/ip event
1127 @param client_index - opaque cookie to identify the sender
1128 @param context - sender context, to match reply w/ request
1129 @param pid - client pid registered to receive notification
1130 @param sw_if_index - interface which received ARP packet
1131 @param address - the exact ip6 address of interest
1132 @param new_mac - the new mac address
1133 @param mac_ip - 0: resolution event, 1: mac/ip binding in bd
1146 /** \brief DHCP Client config add / del request
1147 @param client_index - opaque cookie to identify the sender
1148 @param context - sender context, to match reply w/ request
1149 @param sw_if_index - index of the interface for DHCP client
1150 @param hostname - hostname
1151 @param is_add - add the config if non-zero, else delete
1152 @param want_dhcp_event - DHCP event sent to the sender
1153 via dhcp_compl_event API message if non-zero
1154 @param pid - sender's pid
1156 define dhcp_client_config
1167 /** \brief DHCP Client config response
1168 @param context - sender context, to match reply w/ request
1169 @param retval - return code for the request
1171 define dhcp_client_config_reply
1177 /** \brief Set/unset input ACL interface
1178 @param client_index - opaque cookie to identify the sender
1179 @param context - sender context, to match reply w/ request
1180 @param sw_if_index - interface to set/unset input ACL
1181 @param ip4_table_index - ip4 classify table index (~0 for skip)
1182 @param ip6_table_index - ip6 classify table index (~0 for skip)
1183 @param l2_table_index - l2 classify table index (~0 for skip)
1184 @param is_add - Set input ACL if non-zero, else unset
1185 Note: User is recommeneded to use just one valid table_index per call.
1186 (ip4_table_index, ip6_table_index, or l2_table_index)
1188 define input_acl_set_interface
1193 u32 ip4_table_index;
1194 u32 ip6_table_index;
1199 /** \brief Set/unset input ACL interface response
1200 @param context - sender context, to match reply w/ request
1201 @param retval - return code for the request
1203 define input_acl_set_interface_reply
1209 /** \brief Tell client about a DHCP completion event
1210 @param client_index - opaque cookie to identify the sender
1211 @param pid - client pid registered to receive notification
1212 @param is_ipv6 - if non-zero the address is ipv6, else ipv4
1213 @param host_address - Host IP address
1214 @param router_address - Router IP address
1215 @param host_mac - Host MAC address
1217 define dhcp_compl_event
1223 u8 host_address[16];
1224 u8 router_address[16];
1228 /** \brief cop: enable/disable junk filtration features on an interface
1229 @param client_index - opaque cookie to identify the sender
1230 @param context - sender context, to match reply w/ request
1231 @param sw_if_inded - desired interface
1232 @param enable_disable - 1 => enable, 0 => disable
1235 define cop_interface_enable_disable
1243 /** \brief cop: interface enable/disable junk filtration reply
1244 @param context - returned sender context, to match reply w/ request
1245 @param retval - return code
1248 define cop_interface_enable_disable_reply
1254 /** \brief cop: enable/disable whitelist filtration features on an interface
1255 Note: the supplied fib_id must match in order to remove the feature!
1257 @param client_index - opaque cookie to identify the sender
1258 @param context - sender context, to match reply w/ request
1259 @param sw_if_index - interface handle, physical interfaces only
1260 @param fib_id - fib identifier for the whitelist / blacklist fib
1261 @param ip4 - 1 => enable ip4 filtration, 0=> disable ip4 filtration
1262 @param ip6 - 1 => enable ip6 filtration, 0=> disable ip6 filtration
1263 @param default_cop - 1 => enable non-ip4, non-ip6 filtration 0=> disable it
1266 define cop_whitelist_enable_disable
1277 /** \brief cop: interface enable/disable junk filtration reply
1278 @param context - returned sender context, to match reply w/ request
1279 @param retval - return code
1282 define cop_whitelist_enable_disable_reply
1288 /** \brief get_node_graph - get a copy of the vpp node graph
1289 including the current set of graph arcs.
1291 @param client_index - opaque cookie to identify the sender
1292 @param context - sender context, to match reply w/ request
1295 define get_node_graph
1301 /** \brief get_node_graph_reply
1302 @param context - returned sender context, to match reply w/ request
1303 @param retval - return code
1304 @param reply_in_shmem - result from vlib_node_serialize, in shared
1305 memory. Process with vlib_node_unserialize, remember to switch
1306 heaps and free the result.
1309 define get_node_graph_reply
1316 /** \brief IOAM enable : Enable in-band OAM
1317 @param id - profile id
1318 @param seqno - To enable Seqno Processing
1319 @param analyse - Enabling analysis of iOAM at decap node
1320 @param pow_enable - Proof of Work enabled or not flag
1321 @param trace_enable - iOAM Trace enabled or not flag
1335 /** \brief iOAM Trace profile add / del response
1336 @param context - sender context, to match reply w/ request
1337 @param retval - return value for request
1339 define ioam_enable_reply
1345 /** \brief iOAM disable
1346 @param client_index - opaque cookie to identify the sender
1347 @param context - sender context, to match reply w/ request
1348 @param index - MAP Domain index
1357 /** \brief iOAM disable response
1358 @param context - sender context, to match reply w/ request
1359 @param retval - return value for request
1361 define ioam_disable_reply
1367 /** \brief Add/del policer
1368 @param client_index - opaque cookie to identify the sender
1369 @param context - sender context, to match reply w/ request
1370 @param is_add - add policer if non-zero, else delete
1371 @param name - policer name
1374 @param cb - Committed Burst
1375 @param eb - Excess or Peak Burst
1376 @param rate_type - rate type
1377 @param round_type - rounding type
1378 @param type - policer algorithm
1379 @param color_aware - 0=color-blind, 1=color-aware
1380 @param conform_action_type - conform action type
1381 @param conform_dscp - DSCP for conform mar-and-transmit action
1382 @param exceed_action_type - exceed action type
1383 @param exceed_dscp - DSCP for exceed mar-and-transmit action
1384 @param violate_action_type - violate action type
1385 @param violate_dscp - DSCP for violate mar-and-transmit action
1387 define policer_add_del
1402 u8 conform_action_type;
1404 u8 exceed_action_type;
1406 u8 violate_action_type;
1410 /** \brief Add/del policer response
1411 @param context - sender context, to match reply w/ request
1412 @param retval - return value for request
1413 @param policer_index - for add, returned index of the new policer
1415 define policer_add_del_reply
1422 /** \brief Get list of policers
1423 @param client_index - opaque cookie to identify the sender
1424 @param context - sender context, to match reply w/ request
1425 @param match_name_valid - if 0 request all policers otherwise use match_name
1426 @param match_name - policer name
1433 u8 match_name_valid;
1437 /** \brief Policer operational state response.
1438 @param context - sender context, to match reply w/ request
1439 @param name - policer name
1442 @param cb - Committed Burst
1443 @param eb - Excess or Peak Burst
1444 @param rate_type - rate type
1445 @param round_type - rounding type
1446 @param type - policer algorithm
1447 @param conform_action_type - conform action type
1448 @param conform_dscp - DSCP for conform mar-and-transmit action
1449 @param exceed_action_type - exceed action type
1450 @param exceed_dscp - DSCP for exceed mar-and-transmit action
1451 @param violate_action_type - violate action type
1452 @param violate_dscp - DSCP for violate mar-and-transmit action
1453 @param single_rate - 1 = single rate policer, 0 = two rate policer
1454 @param color_aware - for hierarchical policing
1455 @param scale - power-of-2 shift amount for lower rates
1456 @param cir_tokens_per_period - number of tokens for each period
1457 @param pir_tokens_per_period - number of tokens for each period for 2-rate policer
1458 @param current_limit - current limit
1459 @param current_bucket - current bucket
1460 @param extended_limit - extended limit
1461 @param extended_bucket - extended bucket
1462 @param last_update_time - last update time
1464 define policer_details
1476 u8 conform_action_type;
1478 u8 exceed_action_type;
1480 u8 violate_action_type;
1485 u32 cir_tokens_per_period;
1486 u32 pir_tokens_per_period;
1490 u32 extended_bucket;
1491 u64 last_update_time;
1494 /** \brief Set/unset policer classify interface
1495 @param client_index - opaque cookie to identify the sender
1496 @param context - sender context, to match reply w/ request
1497 @param sw_if_index - interface to set/unset policer classify
1498 @param ip4_table_index - ip4 classify table index (~0 for skip)
1499 @param ip6_table_index - ip6 classify table index (~0 for skip)
1500 @param l2_table_index - l2 classify table index (~0 for skip)
1501 @param is_add - Set if non-zero, else unset
1502 Note: User is recommeneded to use just one valid table_index per call.
1503 (ip4_table_index, ip6_table_index, or l2_table_index)
1505 define policer_classify_set_interface
1510 u32 ip4_table_index;
1511 u32 ip6_table_index;
1516 /** \brief Set/unset policer classify interface response
1517 @param context - sender context, to match reply w/ request
1518 @param retval - return value for request
1520 define policer_classify_set_interface_reply
1526 /** \brief Get list of policer classify interfaces and tables
1527 @param client_index - opaque cookie to identify the sender
1528 @param context - sender context, to match reply w/ request
1529 @param type - classify table type
1531 define policer_classify_dump
1538 /** \brief Policer iclassify operational state response.
1539 @param context - sender context, to match reply w/ request
1540 @param sw_if_index - software interface index
1541 @param table_index - classify table index
1543 define policer_classify_details
1550 /** \brief Classify get table IDs request
1551 @param client_index - opaque cookie to identify the sender
1552 @param context - sender context, to match reply w/ request
1554 define classify_table_ids
1560 /** \brief Reply for classify get table IDs request
1561 @param context - sender context which was passed in the request
1562 @param count - number of ids returned in response
1563 @param ids - array of classify table ids
1565 define classify_table_ids_reply
1573 /** \brief Classify table ids by interface index request
1574 @param client_index - opaque cookie to identify the sender
1575 @param context - sender context, to match reply w/ request
1576 @param sw_if_index - index of the interface
1578 define classify_table_by_interface
1585 /** \brief Reply for classify table id by interface index request
1586 @param context - sender context which was passed in the request
1587 @param count - number of ids returned in response
1588 @param sw_if_index - index of the interface
1589 @param l2_table_id - l2 classify table index
1590 @param ip4_table_id - ip4 classify table index
1591 @param ip6_table_id - ip6 classify table index
1593 define classify_table_by_interface_reply
1603 /** \brief Classify table info
1604 @param client_index - opaque cookie to identify the sender
1605 @param context - sender context, to match reply w/ request
1606 @param table_id - classify table index
1608 define classify_table_info
1615 /** \brief Reply for classify table info request
1616 @param context - sender context which was passed in the request
1617 @param count - number of ids returned in response
1618 @param table_id - classify table index
1619 @param nbuckets - number of buckets when adding a table
1620 @param match_n_vectors - number of match vectors
1621 @param skip_n_vectors - number of skip_n_vectors
1622 @param active_sessions - number of sessions (active entries)
1623 @param next_table_index - index of next table
1624 @param miss_next_index - index of miss table
1625 @param mask[] - match mask
1627 define classify_table_info_reply
1633 u32 match_n_vectors;
1635 u32 active_sessions;
1636 u32 next_table_index;
1637 u32 miss_next_index;
1639 u8 mask[mask_length];
1642 /** \brief Classify sessions dump request
1643 @param client_index - opaque cookie to identify the sender
1644 @param context - sender context, to match reply w/ request
1645 @param table_id - classify table index
1647 define classify_session_dump
1654 /** \brief Reply for classify table session dump request
1655 @param context - sender context which was passed in the request
1656 @param count - number of ids returned in response
1657 @param table_id - classify table index
1658 @param hit_next_index - hit_next_index of session
1659 @param opaque_index - for add, opaque_index of session
1660 @param advance - advance value of session
1661 @param match[] - match value for session
1663 define classify_session_details
1672 u8 match[match_length];
1675 /** \brief Configure IPFIX exporter process request
1676 @param client_index - opaque cookie to identify the sender
1677 @param context - sender context, to match reply w/ request
1678 @param collector_address - address of IPFIX collector
1679 @param collector_port - port of IPFIX collector
1680 @param src_address - address of IPFIX exporter
1681 @param vrf_id - VRF / fib table ID
1682 @param path_mtu - Path MTU between exporter and collector
1683 @param template_interval - number of seconds after which to resend template
1684 @param udp_checksum - UDP checksum calculation enable flag
1686 define set_ipfix_exporter
1690 u8 collector_address[16];
1695 u32 template_interval;
1699 /** \brief Reply to IPFIX exporter configure request
1700 @param context - sender context which was passed in the request
1702 define set_ipfix_exporter_reply
1708 /** \brief IPFIX exporter dump request
1709 @param client_index - opaque cookie to identify the sender
1710 @param context - sender context, to match reply w/ request
1712 define ipfix_exporter_dump
1718 /** \brief Reply to IPFIX exporter dump request
1719 @param context - sender context which was passed in the request
1720 @param collector_address - address of IPFIX collector
1721 @param collector_port - port of IPFIX collector
1722 @param src_address - address of IPFIX exporter
1723 @param fib_index - fib table index
1724 @param path_mtu - Path MTU between exporter and collector
1725 @param template_interval - number of seconds after which to resend template
1726 @param udp_checksum - UDP checksum calculation enable flag
1728 define ipfix_exporter_details
1731 u8 collector_address[16];
1736 u32 template_interval;
1740 /** \brief IPFIX classify stream configure request
1741 @param client_index - opaque cookie to identify the sender
1742 @param context - sender context, to match reply w/ request
1743 @param domain_id - domain ID reported in IPFIX messages for classify stream
1744 @param src_port - source port of UDP session for classify stream
1746 define set_ipfix_classify_stream {
1753 /** \brief IPFIX classify stream configure response
1754 @param context - sender context, to match reply w/ request
1755 @param retval - return value for request
1757 define set_ipfix_classify_stream_reply {
1762 /** \brief IPFIX classify stream dump request
1763 @param client_index - opaque cookie to identify the sender
1764 @param context - sender context, to match reply w/ request
1766 define ipfix_classify_stream_dump {
1771 /** \brief Reply to IPFIX classify stream dump request
1772 @param context - sender context, to match reply w/ request
1773 @param domain_id - domain ID reported in IPFIX messages for classify stream
1774 @param src_port - source port of UDP session for classify stream
1776 define ipfix_classify_stream_details {
1782 /** \brief IPFIX add or delete classifier table request
1783 @param client_index - opaque cookie to identify the sender
1784 @param context - sender context, to match reply w/ request
1785 @param table_id - classifier table ID
1786 @param ip_version - version of IP used in the classifier table
1787 @param transport_protocol - transport protocol used in the classifier table or 255 for unspecified
1789 define ipfix_classify_table_add_del {
1794 u8 transport_protocol;
1798 /** \brief IPFIX add classifier table response
1799 @param context - sender context which was passed in the request
1801 define ipfix_classify_table_add_del_reply {
1806 /** \brief IPFIX classify tables dump request
1807 @param client_index - opaque cookie to identify the sender
1808 @param context - sender context, to match reply w/ request
1810 define ipfix_classify_table_dump {
1815 /** \brief Reply to IPFIX classify tables dump request
1816 @param context - sender context, to match reply w/ request
1817 @param table_id - classifier table ID
1818 @param ip_version - version of IP used in the classifier table
1819 @param transport_protocol - transport protocol used in the classifier table or 255 for unspecified
1821 define ipfix_classify_table_details {
1825 u8 transport_protocol;
1828 /** \brief Set/unset flow classify interface
1829 @param client_index - opaque cookie to identify the sender
1830 @param context - sender context, to match reply w/ request
1831 @param sw_if_index - interface to set/unset flow classify
1832 @param ip4_table_index - ip4 classify table index (~0 for skip)
1833 @param ip6_table_index - ip6 classify table index (~0 for skip)
1834 @param l2_table_index - l2 classify table index (~0 for skip)
1835 @param is_add - Set if non-zero, else unset
1836 Note: User is recommeneded to use just one valid table_index per call.
1837 (ip4_table_index, ip6_table_index, or l2_table_index)
1839 define flow_classify_set_interface {
1843 u32 ip4_table_index;
1844 u32 ip6_table_index;
1848 /** \brief Set/unset flow classify interface response
1849 @param context - sender context, to match reply w/ request
1850 @param retval - return value for request
1852 define flow_classify_set_interface_reply {
1857 /** \brief Get list of flow classify interfaces and tables
1858 @param client_index - opaque cookie to identify the sender
1859 @param context - sender context, to match reply w/ request
1860 @param type - classify table type
1862 define flow_classify_dump {
1868 /** \brief Flow classify operational state response.
1869 @param context - sender context, to match reply w/ request
1870 @param sw_if_index - software interface index
1871 @param table_index - classify table index
1873 define flow_classify_details {
1879 /** \brief Query relative index via node names
1880 @param client_index - opaque cookie to identify the sender
1881 @param context - sender context, to match reply w/ request
1882 @param node_name - name of node to find relative index from
1883 @param next_name - next node from node_name to find relative index of
1885 define get_next_index
1893 /** \brief Reply for get next node index
1894 @param context - sender context which was passed in the request
1895 @param retval - return value
1896 @param next_index - index of the next_node
1898 define get_next_index_reply
1905 /** \brief PacketGenerator create interface request
1906 @param client_index - opaque cookie to identify the sender
1907 @param context - sender context, to match reply w/ request
1908 @param interface_id - interface index
1910 define pg_create_interface
1917 /** \brief PacketGenerator create interface response
1918 @param context - sender context, to match reply w/ request
1919 @param retval - return value for request
1921 define pg_create_interface_reply
1928 /** \brief PacketGenerator capture packets on given interface request
1929 @param client_index - opaque cookie to identify the sender
1930 @param context - sender context, to match reply w/ request
1931 @param interface_id - pg interface index
1932 @param is_enabled - 1 if enabling streams, 0 if disabling
1933 @param count - number of packets to be captured
1934 @param pcap_file - pacp file name to store captured packets
1943 u32 pcap_name_length;
1944 u8 pcap_file_name[pcap_name_length];
1947 /** \brief PacketGenerator capture packets response
1948 @param context - sender context, to match reply w/ request
1949 @param retval - return value for request
1951 define pg_capture_reply
1957 /** \brief Enable / disable packet generator request
1958 @param client_index - opaque cookie to identify the sender
1959 @param context - sender context, to match reply w/ request
1960 @param is_enabled - 1 if enabling streams, 0 if disabling
1961 @param stream - stream name to be enable/disabled, if not specified handle all streams
1963 define pg_enable_disable
1968 u32 stream_name_length;
1969 u8 stream_name[stream_name_length];
1972 /** \brief Reply for enable / disable packet generator
1973 @param context - returned sender context, to match reply w/ request
1974 @param retval - return code
1976 define pg_enable_disable_reply
1982 /** \brief Configure IP source and L4 port-range check
1983 @param client_index - opaque cookie to identify the sender
1984 @param context - sender context, to match reply w/ request
1985 @param is_ip6 - 1 if source address type is IPv6
1986 @param is_add - 1 if add, 0 if delete
1987 @param mask_length - mask length for address entry
1988 @param address - array of address bytes
1989 @param number_of_ranges - length of low_port and high_port arrays (must match)
1990 @param low_ports[32] - up to 32 low end of port range entries (must have corresponding high_ports entry)
1991 @param high_ports[32] - up to 32 high end of port range entries (must have corresponding low_ports entry)
1992 @param vrf_id - fib table/vrf id to associate the source and port-range check with
1993 @note To specify a single port set low_port and high_port entry the same
1995 define ip_source_and_port_range_check_add_del
2003 u8 number_of_ranges;
2009 /** \brief Configure IP source and L4 port-range check reply
2010 @param context - returned sender context, to match reply w/ request
2011 @param retval - return code
2013 define ip_source_and_port_range_check_add_del_reply
2019 /** \brief Set interface source and L4 port-range request
2020 @param client_index - opaque cookie to identify the sender
2021 @param context - sender context, to match reply w/ request
2022 @param interface_id - interface index
2023 @param tcp_vrf_id - VRF associated with source and TCP port-range check
2024 @param udp_vrf_id - VRF associated with source and TCP port-range check
2026 define ip_source_and_port_range_check_interface_add_del
2038 /** \brief Set interface source and L4 port-range response
2039 @param context - sender context, to match reply w/ request
2040 @param retval - return value for request
2042 define ip_source_and_port_range_check_interface_add_del_reply
2048 /** \brief Delete sub interface request
2049 @param client_index - opaque cookie to identify the sender
2050 @param context - sender context, to match reply w/ request
2051 @param sw_if_index - sw index of the interface that was created by create_subif
2053 define delete_subif {
2059 /** \brief Delete sub interface response
2060 @param context - sender context, to match reply w/ request
2061 @param retval - return code for the request
2063 define delete_subif_reply {
2068 /** \brief L2 interface pbb tag rewrite configure request
2069 @param client_index - opaque cookie to identify the sender
2070 @param context - sender context, to match reply w/ request
2071 @param sw_if_index - interface the operation is applied to
2072 @param vtr_op - Choose from l2_vtr_op_t enum values
2073 @param inner_tag - needed for translate_qinq vtr op only
2074 @param outer_tag - needed for translate_qinq vtr op only
2075 @param b_dmac - B-tag remote mac address, needed for any push or translate_qinq vtr op
2076 @param b_smac - B-tag local mac address, needed for any push or translate qinq vtr op
2077 @param b_vlanid - B-tag vlanid, needed for any push or translate qinq vtr op
2078 @param i_sid - I-tag service id, needed for any push or translate qinq vtr op
2080 define l2_interface_pbb_tag_rewrite
2093 /** \brief L2 interface pbb tag rewrite response
2094 @param context - sender context, to match reply w/ request
2095 @param retval - return code for the request
2097 define l2_interface_pbb_tag_rewrite_reply
2103 /** \brief Punt traffic to the host
2104 @param client_index - opaque cookie to identify the sender
2105 @param context - sender context, to match reply w/ request
2106 @param is_add - add punt if non-zero, else delete
2107 @param ipv - L3 protocol 4 - IPv4, 6 - IPv6, ~0 - All
2108 @param l4_protocol - L4 protocol to be punted, only UDP (0x11) is supported
2109 @param l4_port - TCP/UDP port to be punted
2120 /** \brief Reply to the punt request
2121 @param context - sender context which was passed in the request
2122 @param retval - return code of punt request
2130 /** \brief Feature path enable/disable request
2131 @param client_index - opaque cookie to identify the sender
2132 @param context - sender context, to match reply w/ request
2133 @param sw_if_index - the interface
2134 @param enable - 1 = on, 0 = off
2136 define feature_enable_disable {
2142 u8 feature_name[64];
2145 /** \brief Reply to the eature path enable/disable request
2146 @param context - sender context which was passed in the request
2147 @param retval - return code for the request
2149 define feature_enable_disable_reply
2157 * eval: (c-set-style "gnu")