2 * Copyright (c) 2015-2016 Cisco and/or its affiliates.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at:
7 * http://www.apache.org/licenses/LICENSE-2.0
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
18 This file defines vpe control-plane API messages which are generally
19 called through a shared memory interface.
23 * Note: API placement cleanup in progress
24 * If you're looking for interface APIs, please
25 * see .../src/vnet/{interface.api,interface_api.c}
26 * IP APIs: see .../src/vnet/ip/{ip.api, ip_api.c}
27 * TAP APIs: see .../src/vnet/unix/{tap.api, tap_api.c}
28 * VXLAN APIs: see .../src/vnet/vxlan/{vxlan.api, vxlan_api.c}
29 * AF-PACKET APIs: see ... /vnet/devices/af_packet/{af_packet.api, af_packet_api.c}
30 * NETMAP APIs: see ... /src/vnet/devices/netmap/{netmap.api, netmap_api.c}
31 * VHOST-USER APIs: see .../vnet/devices/virtio/{vhost_user.api, vhost_user_api.c}
32 * VXLAN GPE APIs: see .../src/vnet/vxlan-gpe/{vxlan_gpe.api, vxlan_gpe_api.c}
33 * GRE APIs: see .../src/vnet/gre/{gre.api, gre_api.c}
34 * L2 APIs: see .../src/vnet/l2/{l2.api, l2_api.c}
35 * L2TP APIs: see .../src/vnet/l2tp/{l2tp.api, l2tp_api.c}
36 * BFD APIs: see .../src/vnet/bfd/{bfd.api, bfd_api.c}
37 * IPSEC APIs: see .../src/vnet/ipsec/{ipsec.api, ipsec_api.c}
38 * IPSEC-GRE APIs: see .../src/vnet/ipsec-gre/{ipsec_gre.api, ipsec_gre_api.c}
39 * LISP APIs: see .../src/vnet/lisp/{lisp.api, lisp_api.c}
40 * LISP-GPE APIs: see .../src/vnet/lisp-gpe/{lisp_gpe.api, lisp_gpe_api.c}
41 * MPLS APIs: see .../src/vnet/mpls/{mpls.api, mpls_api.c}
42 * SR APIs: see .../src/vnet/sr/{sr.api, sr_api.c}
43 * DPDK APIs: see ... /src/vnet/devices/dpdk/{dpdk.api, dpdk_api.c}
44 * CLASSIFY APIs: see ... /src/vnet/classify/{classify.api, classify_api.c}
45 * FLOW APIs: see ... /src/vnet/flow/{flow.api, flow_api.c}
46 * DHCP APIs: see ... /src/vnet/dhcp/{dhcpk.api, dhcp_api.c}
49 /** \brief Create a new subinterface with the given vlan id
50 @param client_index - opaque cookie to identify the sender
51 @param context - sender context, to match reply w/ request
52 @param sw_if_index - software index of the new vlan's parent interface
53 @param vlan_id - vlan tag of the new interface
55 define create_vlan_subif
63 /** \brief Reply for the vlan subinterface create request
64 @param context - returned sender context, to match reply w/ request
65 @param retval - return code
66 @param sw_if_index - software index allocated for the new subinterface
68 define create_vlan_subif_reply
75 /** \brief Enable or Disable MPLS on and interface
76 @param client_index - opaque cookie to identify the sender
77 @param context - sender context, to match reply w/ request
78 @param sw_if_index - index of the interface
79 @param enable - if non-zero enable, else disable
81 define sw_interface_set_mpls_enable
89 /** \brief Reply for MPLS state on an interface
90 @param context - returned sender context, to match reply w/ request
91 @param retval - return code
93 define sw_interface_set_mpls_enable_reply
99 /** \brief Proxy ARP add / del request
100 @param client_index - opaque cookie to identify the sender
101 @param context - sender context, to match reply w/ request
102 @param vrf_id - VRF / Fib table ID
103 @param is_add - 1 if adding the Proxy ARP range, 0 if deleting
104 @param low_address[4] - Low address of the Proxy ARP range
105 @param hi_address[4] - High address of the Proxy ARP range
107 define proxy_arp_add_del
117 /** \brief Reply for proxy arp add / del request
118 @param context - returned sender context, to match reply w/ request
119 @param retval - return code
121 define proxy_arp_add_del_reply
127 /** \brief Proxy ARP add / del request
128 @param client_index - opaque cookie to identify the sender
129 @param context - sender context, to match reply w/ request
130 @param sw_if_index - Which interface to enable / disable Proxy Arp on
131 @param enable_disable - 1 to enable Proxy ARP on interface, 0 to disable
133 define proxy_arp_intfc_enable_disable
138 /* 1 = on, 0 = off */
142 /** \brief Reply for Proxy ARP interface enable / disable request
143 @param context - returned sender context, to match reply w/ request
144 @param retval - return code
146 define proxy_arp_intfc_enable_disable_reply
152 /** \brief Reset VRF (remove all routes etc) request
153 @param client_index - opaque cookie to identify the sender
154 @param context - sender context, to match reply w/ request
155 @param is_ipv6 - 1 for IPv6 neighbor, 0 for IPv4
156 @param vrf_id - ID of th FIB table / VRF to reset
166 /** \brief Reply for Reset VRF request
167 @param context - returned sender context, to match reply w/ request
168 @param retval - return code
170 define reset_vrf_reply
176 /** \brief Is Address Reachable request - DISABLED
177 @param client_index - opaque cookie to identify the sender
178 @param context - sender context, to match reply w/ request
179 @param next_hop_sw_if_index - index of interface used to get to next hop
180 @param is_ipv6 - 1 for IPv6, 0 for IPv4
181 @param is_error - address not found or does not match intf
182 @param address[] - Address in question
184 define is_address_reachable
186 u32 client_index; /* (api_main_t *) am->my_client_index */
188 u32 next_hop_sw_if_index;
189 u8 is_known; /* on reply, this is the answer */
191 u8 is_error; /* address not found or does not match intf */
195 /** \brief Want Stats, register for stats updates
196 @param client_index - opaque cookie to identify the sender
197 @param context - sender context, to match reply w/ request
198 @param enable_disable - 1 = enable stats, 0 = disable
199 @param pid - pid of process requesting stats updates
209 /** \brief Reply for Want Stats request
210 @param context - returned sender context, to match reply w/ request
211 @param retval - return code
213 define want_stats_reply
219 typeonly manual_print manual_endian define ip4_fib_counter
227 manual_print manual_endian define vnet_ip4_fib_counters
231 vl_api_ip4_fib_counter_t c[count];
234 typeonly manual_print manual_endian define ip4_nbr_counter
243 * @brief Per-neighbour (i.e. per-adjacency) coutners
244 * @param count The size of the array of counters
245 * @param sw_if_index The interface the adjacency is on
246 * @param begin Flag to indicate this is the first set of stats for this
247 * interface. If this flag is not set the it is a continuation of
248 * stats for this interface
251 manual_print manual_endian define vnet_ip4_nbr_counters
256 vl_api_ip4_nbr_counter_t c[count];
259 typeonly manual_print manual_endian define ip6_fib_counter
267 manual_print manual_endian define vnet_ip6_fib_counters
271 vl_api_ip6_fib_counter_t c[count];
274 typeonly manual_print manual_endian define ip6_nbr_counter
282 manual_print manual_endian define vnet_ip6_nbr_counters
287 vl_api_ip6_nbr_counter_t c[count];
290 /** \brief Request for a single block of summary stats
291 @param client_index - opaque cookie to identify the sender
292 @param context - sender context, to match reply w/ request
294 define vnet_get_summary_stats
300 /** \brief Reply for vnet_get_summary_stats request
301 @param context - sender context, to match reply w/ request
302 @param retval - return code for request
307 define vnet_summary_stats_reply
316 /** \brief OAM event structure
317 @param dst_address[] -
326 /** \brief Want OAM events request
327 @param client_index - opaque cookie to identify the sender
328 @param context - sender context, to match reply w/ request
329 @param enable_disable- enable if non-zero, else disable
330 @param pid - pid of the requesting process
332 define want_oam_events
340 /** \brief Want OAM events response
341 @param context - sender context, to match reply w/ request
342 @param retval - return code for the want oam stats request
344 define want_oam_events_reply
350 /** \brief OAM add / del target request
351 @param client_index - opaque cookie to identify the sender
352 @param context - sender context, to match reply w/ request
353 @param vrf_id - vrf_id of the target
354 @param src_address[] - source address to use for the updates
355 @param dst_address[] - destination address of the target
356 @param is_add - add target if non-zero, else delete
368 /** \brief OAM add / del target response
369 @param context - sender context, to match reply w/ request
370 @param retval - return code of the request
372 define oam_add_del_reply
378 /** \brief Reset fib table request
379 @param client_index - opaque cookie to identify the sender
380 @param context - sender context, to match reply w/ request
381 @param vrf_id - vrf/table id of the fib table to reset
382 @param is_ipv6 - an ipv6 fib to reset if non-zero, else ipv4
392 /** \brief Reset fib response
393 @param context - sender context, to match reply w/ request
394 @param retval - return code for the reset bfib request
396 define reset_fib_reply
402 /** \brief Create loopback interface request
403 @param client_index - opaque cookie to identify the sender
404 @param context - sender context, to match reply w/ request
405 @param mac_address - mac addr to assign to the interface if none-zero
407 define create_loopback
414 /** \brief Create loopback interface response
415 @param context - sender context, to match reply w/ request
416 @param sw_if_index - sw index of the interface that was created
417 @param retval - return code for the request
419 define create_loopback_reply
426 /** \brief Delete loopback interface request
427 @param client_index - opaque cookie to identify the sender
428 @param context - sender context, to match reply w/ request
429 @param sw_if_index - sw index of the interface that was created
431 define delete_loopback
438 /** \brief Delete loopback interface response
439 @param context - sender context, to match reply w/ request
440 @param retval - return code for the request
442 define delete_loopback_reply
448 /** \brief Control ping from client to api server request
449 @param client_index - opaque cookie to identify the sender
450 @param context - sender context, to match reply w/ request
458 /** \brief Control ping from the client to the server response
459 @param client_index - opaque cookie to identify the sender
460 @param context - sender context, to match reply w/ request
461 @param retval - return code for the request
462 @param vpe_pid - the pid of the vpe, returned by the server
464 define control_ping_reply
472 /** \brief Process a vpe parser cli string request
473 @param client_index - opaque cookie to identify the sender
474 @param context - sender context, to match reply w/ request
475 @param cmd_in_shmem - pointer to cli command string
491 /** \brief vpe parser cli string response
492 @param context - sender context, to match reply w/ request
493 @param retval - return code for request
494 @param reply_in_shmem - Reply string from cli processing if any
502 define cli_inband_reply
510 /** \brief Set max allowed ARP or ip6 neighbor entries request
511 @param client_index - opaque cookie to identify the sender
512 @param context - sender context, to match reply w/ request
513 @param is_ipv6 - neighbor limit if non-zero, else ARP limit
514 @param arp_neighbor_limit - the new limit, defaults are ~ 50k
516 define set_arp_neighbor_limit
521 u32 arp_neighbor_limit;
524 /** \brief Set max allowed ARP or ip6 neighbor entries response
525 @param context - sender context, to match reply w/ request
526 @param retval - return code for request
528 define set_arp_neighbor_limit_reply
534 /** \brief L2 interface patch add / del request
535 @param client_index - opaque cookie to identify the sender
536 @param context - sender context, to match reply w/ request
537 @param rx_sw_if_index - receive side interface
538 @param tx_sw_if_index - transmit side interface
539 @param is_add - if non-zero set up the interface patch, else remove it
541 define l2_patch_add_del
550 /** \brief L2 interface patch add / del response
551 @param context - sender context, to match reply w/ request
552 @param retval - return code for the request
554 define l2_patch_add_del_reply
560 /** \brief Interface set vpath request
561 @param client_index - opaque cookie to identify the sender
562 @param context - sender context, to match reply w/ request
563 @param sw_if_index - interface used to reach neighbor
564 @param enable - if non-zero enable, else disable
566 define sw_interface_set_vpath
574 /** \brief Interface set vpath response
575 @param context - sender context, to match reply w/ request
576 @param retval - return code for the request
578 define sw_interface_set_vpath_reply
584 /** \brief Set L2 XConnect between two interfaces request
585 @param client_index - opaque cookie to identify the sender
586 @param context - sender context, to match reply w/ request
587 @param rx_sw_if_index - Receive interface index
588 @param tx_sw_if_index - Transmit interface index
589 @param enable - enable xconnect if not 0, else set to L3 mode
591 define sw_interface_set_l2_xconnect
600 /** \brief Set L2 XConnect response
601 @param context - sender context, to match reply w/ request
602 @param retval - L2 XConnect request return code
604 define sw_interface_set_l2_xconnect_reply
610 /** \brief Interface bridge mode request
611 @param client_index - opaque cookie to identify the sender
612 @param context - sender context, to match reply w/ request
613 @param rx_sw_if_index - the interface
614 @param bd_id - bridge domain id
615 @param bvi - Setup interface as a bvi, bridge mode only
616 @param shg - Shared horizon group, for bridge mode only
617 @param enable - Enable beige mode if not 0, else set to L3 mode
619 define sw_interface_set_l2_bridge
630 /** \brief Interface bridge mode response
631 @param context - sender context, to match reply w/ request
632 @param retval - Bridge mode request return code
634 define sw_interface_set_l2_bridge_reply
640 /** \brief Set bridge domain ip to mac entry request
641 @param client_index - opaque cookie to identify the sender
642 @param context - sender context, to match reply w/ request
643 @param bd_id - the bridge domain to set the flags for
644 @param is_add - if non-zero, add the entry, else clear it
645 @param is_ipv6 - if non-zero, ipv6 address, else ipv4 address
646 @param mac_address - MAC address
649 define bd_ip_mac_add_del
660 /** \brief Set bridge domain ip to mac entry response
661 @param context - sender context, to match reply w/ request
662 @param retval - return code for the set bridge flags request
664 define bd_ip_mac_add_del_reply
670 /** \brief Set/unset the classification table for an interface request
671 @param client_index - opaque cookie to identify the sender
672 @param context - sender context, to match reply w/ request
673 @param is_ipv6 - ipv6 if non-zero, else ipv4
674 @param sw_if_index - interface to associate with the table
675 @param table_index - index of the table, if ~0 unset the table
677 define classify_set_interface_ip_table
683 u32 table_index; /* ~0 => off */
686 /** \brief Set/unset interface classification table response
687 @param context - sender context, to match reply w/ request
688 @param retval - return code
690 define classify_set_interface_ip_table_reply
696 /** \brief Set/unset l2 classification tables for an interface request
697 @param client_index - opaque cookie to identify the sender
698 @param context - sender context, to match reply w/ request
699 @param sw_if_index - interface to set/unset tables for
700 @param ip4_table_index - ip4 index, use ~0 for all 3 indexes to unset
701 @param ip6_table_index - ip6 index
702 @param other_table_index - other index
704 define classify_set_interface_l2_tables
712 u32 other_table_index;
716 /** \brief Set/unset l2 classification tables for an interface response
717 @param context - sender context, to match reply w/ request
718 @param retval - return code for the request
720 define classify_set_interface_l2_tables_reply
726 /** \brief Get node index using name request
727 @param client_index - opaque cookie to identify the sender
728 @param context - sender context, to match reply w/ request
729 @param node_name[] - name of the node
731 define get_node_index
738 /** \brief Get node index using name request
739 @param context - sender context, to match reply w/ request
740 @param retval - return code for the request
741 @param node_index - index of the desired node if found, else ~0
743 define get_node_index_reply
750 /** \brief Set the next node for a given node request
751 @param client_index - opaque cookie to identify the sender
752 @param context - sender context, to match reply w/ request
753 @param node_name[] - node to add the next node to
754 @param next_name[] - node to add as the next node
764 /** \brief IP Set the next node for a given node response
765 @param context - sender context, to match reply w/ request
766 @param retval - return code for the add next node request
767 @param next_index - the index of the next node if success, else ~0
769 define add_node_next_reply
776 /** \brief L2 interface ethernet flow point filtering enable/disable request
777 @param client_index - opaque cookie to identify the sender
778 @param context - sender context, to match reply w/ request
779 @param sw_if_index - interface to enable/disable filtering on
780 @param enable_disable - if non-zero enable filtering, else disable
782 define l2_interface_efp_filter
790 /** \brief L2 interface ethernet flow point filtering response
791 @param context - sender context, to match reply w/ request
792 @param retval - return code for the request
794 define l2_interface_efp_filter_reply
807 /* These fields map directly onto the subif template */
811 u8 dot1ad; // 0 = dot1q, 1=dot1ad
814 u8 outer_vlan_id_any;
815 u8 inner_vlan_id_any;
820 define create_subif_reply
827 /** \brief show version
828 @param client_index - opaque cookie to identify the sender
829 @param context - sender context, to match reply w/ request
837 /** \brief show version response
838 @param context - sender context, to match reply w/ request
839 @param retval - return code for the request
840 @param program - name of the program (vpe)
841 @param version - version of the program
842 @param build_directory - root of the workspace where the program was built
844 define show_version_reply
851 u8 build_directory[256];
854 /* Gross kludge, DGMS */
855 define interface_name_renumber
860 u32 new_show_dev_instance;
863 define interface_name_renumber_reply
869 /** \brief Register for ip4 arp resolution events
870 @param client_index - opaque cookie to identify the sender
871 @param context - sender context, to match reply w/ request
872 @param enable_disable - 1 => register for events, 0 => cancel registration
873 @param pid - sender's pid
874 @param address - the exact ip4 address of interest
876 define want_ip4_arp_events
885 /** \brief Reply for interface events registration
886 @param context - returned sender context, to match reply w/ request
887 @param retval - return code
889 define want_ip4_arp_events_reply
895 /** \brief Tell client about an ip4 arp resolution event
896 @param client_index - opaque cookie to identify the sender
897 @param context - sender context, to match reply w/ request
898 @param address - the exact ip4 address of interest
899 @param pid - client pid registered to receive notification
900 @param sw_if_index - interface which received ARP packet
901 @param new_mac - the new mac address
902 @param mac_ip - 0: resolution event, 1: mac/ip binding in bd
915 /** \brief Register for ip6 nd resolution events
916 @param client_index - opaque cookie to identify the sender
917 @param context - sender context, to match reply w/ request
918 @param enable_disable - 1 => register for events, 0 => cancel registration
919 @param pid - sender's pid
920 @param address - the exact ip6 address of interest
922 define want_ip6_nd_events
931 /** \brief Reply for ip6 nd resolution events registration
932 @param context - returned sender context, to match reply w/ request
933 @param retval - return code
935 define want_ip6_nd_events_reply
941 /** \brief Tell client about an ip6 nd resolution or mac/ip event
942 @param client_index - opaque cookie to identify the sender
943 @param context - sender context, to match reply w/ request
944 @param pid - client pid registered to receive notification
945 @param sw_if_index - interface which received ARP packet
946 @param address - the exact ip6 address of interest
947 @param new_mac - the new mac address
948 @param mac_ip - 0: resolution event, 1: mac/ip binding in bd
961 /** \brief Set/unset input ACL interface
962 @param client_index - opaque cookie to identify the sender
963 @param context - sender context, to match reply w/ request
964 @param sw_if_index - interface to set/unset input ACL
965 @param ip4_table_index - ip4 classify table index (~0 for skip)
966 @param ip6_table_index - ip6 classify table index (~0 for skip)
967 @param l2_table_index - l2 classify table index (~0 for skip)
968 @param is_add - Set input ACL if non-zero, else unset
969 Note: User is recommeneded to use just one valid table_index per call.
970 (ip4_table_index, ip6_table_index, or l2_table_index)
972 define input_acl_set_interface
983 /** \brief Set/unset input ACL interface response
984 @param context - sender context, to match reply w/ request
985 @param retval - return code for the request
987 define input_acl_set_interface_reply
993 /** \brief cop: enable/disable junk filtration features on an interface
994 @param client_index - opaque cookie to identify the sender
995 @param context - sender context, to match reply w/ request
996 @param sw_if_inded - desired interface
997 @param enable_disable - 1 => enable, 0 => disable
1000 define cop_interface_enable_disable
1008 /** \brief cop: interface enable/disable junk filtration reply
1009 @param context - returned sender context, to match reply w/ request
1010 @param retval - return code
1013 define cop_interface_enable_disable_reply
1019 /** \brief cop: enable/disable whitelist filtration features on an interface
1020 Note: the supplied fib_id must match in order to remove the feature!
1022 @param client_index - opaque cookie to identify the sender
1023 @param context - sender context, to match reply w/ request
1024 @param sw_if_index - interface handle, physical interfaces only
1025 @param fib_id - fib identifier for the whitelist / blacklist fib
1026 @param ip4 - 1 => enable ip4 filtration, 0=> disable ip4 filtration
1027 @param ip6 - 1 => enable ip6 filtration, 0=> disable ip6 filtration
1028 @param default_cop - 1 => enable non-ip4, non-ip6 filtration 0=> disable it
1031 define cop_whitelist_enable_disable
1042 /** \brief cop: interface enable/disable junk filtration reply
1043 @param context - returned sender context, to match reply w/ request
1044 @param retval - return code
1047 define cop_whitelist_enable_disable_reply
1053 /** \brief get_node_graph - get a copy of the vpp node graph
1054 including the current set of graph arcs.
1056 @param client_index - opaque cookie to identify the sender
1057 @param context - sender context, to match reply w/ request
1060 define get_node_graph
1066 /** \brief get_node_graph_reply
1067 @param context - returned sender context, to match reply w/ request
1068 @param retval - return code
1069 @param reply_in_shmem - result from vlib_node_serialize, in shared
1070 memory. Process with vlib_node_unserialize, remember to switch
1071 heaps and free the result.
1074 define get_node_graph_reply
1081 /** \brief IOAM enable : Enable in-band OAM
1082 @param id - profile id
1083 @param seqno - To enable Seqno Processing
1084 @param analyse - Enabling analysis of iOAM at decap node
1085 @param pow_enable - Proof of Work enabled or not flag
1086 @param trace_enable - iOAM Trace enabled or not flag
1100 /** \brief iOAM Trace profile add / del response
1101 @param context - sender context, to match reply w/ request
1102 @param retval - return value for request
1104 define ioam_enable_reply
1110 /** \brief iOAM disable
1111 @param client_index - opaque cookie to identify the sender
1112 @param context - sender context, to match reply w/ request
1113 @param index - MAP Domain index
1122 /** \brief iOAM disable response
1123 @param context - sender context, to match reply w/ request
1124 @param retval - return value for request
1126 define ioam_disable_reply
1132 /** \brief Add/del policer
1133 @param client_index - opaque cookie to identify the sender
1134 @param context - sender context, to match reply w/ request
1135 @param is_add - add policer if non-zero, else delete
1136 @param name - policer name
1139 @param cb - Committed Burst
1140 @param eb - Excess or Peak Burst
1141 @param rate_type - rate type
1142 @param round_type - rounding type
1143 @param type - policer algorithm
1144 @param color_aware - 0=color-blind, 1=color-aware
1145 @param conform_action_type - conform action type
1146 @param conform_dscp - DSCP for conform mar-and-transmit action
1147 @param exceed_action_type - exceed action type
1148 @param exceed_dscp - DSCP for exceed mar-and-transmit action
1149 @param violate_action_type - violate action type
1150 @param violate_dscp - DSCP for violate mar-and-transmit action
1152 define policer_add_del
1167 u8 conform_action_type;
1169 u8 exceed_action_type;
1171 u8 violate_action_type;
1175 /** \brief Add/del policer response
1176 @param context - sender context, to match reply w/ request
1177 @param retval - return value for request
1178 @param policer_index - for add, returned index of the new policer
1180 define policer_add_del_reply
1187 /** \brief Get list of policers
1188 @param client_index - opaque cookie to identify the sender
1189 @param context - sender context, to match reply w/ request
1190 @param match_name_valid - if 0 request all policers otherwise use match_name
1191 @param match_name - policer name
1198 u8 match_name_valid;
1202 /** \brief Policer operational state response.
1203 @param context - sender context, to match reply w/ request
1204 @param name - policer name
1207 @param cb - Committed Burst
1208 @param eb - Excess or Peak Burst
1209 @param rate_type - rate type
1210 @param round_type - rounding type
1211 @param type - policer algorithm
1212 @param conform_action_type - conform action type
1213 @param conform_dscp - DSCP for conform mar-and-transmit action
1214 @param exceed_action_type - exceed action type
1215 @param exceed_dscp - DSCP for exceed mar-and-transmit action
1216 @param violate_action_type - violate action type
1217 @param violate_dscp - DSCP for violate mar-and-transmit action
1218 @param single_rate - 1 = single rate policer, 0 = two rate policer
1219 @param color_aware - for hierarchical policing
1220 @param scale - power-of-2 shift amount for lower rates
1221 @param cir_tokens_per_period - number of tokens for each period
1222 @param pir_tokens_per_period - number of tokens for each period for 2-rate policer
1223 @param current_limit - current limit
1224 @param current_bucket - current bucket
1225 @param extended_limit - extended limit
1226 @param extended_bucket - extended bucket
1227 @param last_update_time - last update time
1229 define policer_details
1241 u8 conform_action_type;
1243 u8 exceed_action_type;
1245 u8 violate_action_type;
1250 u32 cir_tokens_per_period;
1251 u32 pir_tokens_per_period;
1255 u32 extended_bucket;
1256 u64 last_update_time;
1259 /** \brief Query relative index via node names
1260 @param client_index - opaque cookie to identify the sender
1261 @param context - sender context, to match reply w/ request
1262 @param node_name - name of node to find relative index from
1263 @param next_name - next node from node_name to find relative index of
1265 define get_next_index
1273 /** \brief Reply for get next node index
1274 @param context - sender context which was passed in the request
1275 @param retval - return value
1276 @param next_index - index of the next_node
1278 define get_next_index_reply
1285 /** \brief PacketGenerator create interface request
1286 @param client_index - opaque cookie to identify the sender
1287 @param context - sender context, to match reply w/ request
1288 @param interface_id - interface index
1290 define pg_create_interface
1297 /** \brief PacketGenerator create interface response
1298 @param context - sender context, to match reply w/ request
1299 @param retval - return value for request
1301 define pg_create_interface_reply
1308 /** \brief PacketGenerator capture packets on given interface request
1309 @param client_index - opaque cookie to identify the sender
1310 @param context - sender context, to match reply w/ request
1311 @param interface_id - pg interface index
1312 @param is_enabled - 1 if enabling streams, 0 if disabling
1313 @param count - number of packets to be captured
1314 @param pcap_file - pacp file name to store captured packets
1323 u32 pcap_name_length;
1324 u8 pcap_file_name[pcap_name_length];
1327 /** \brief PacketGenerator capture packets response
1328 @param context - sender context, to match reply w/ request
1329 @param retval - return value for request
1331 define pg_capture_reply
1337 /** \brief Enable / disable packet generator request
1338 @param client_index - opaque cookie to identify the sender
1339 @param context - sender context, to match reply w/ request
1340 @param is_enabled - 1 if enabling streams, 0 if disabling
1341 @param stream - stream name to be enable/disabled, if not specified handle all streams
1343 define pg_enable_disable
1348 u32 stream_name_length;
1349 u8 stream_name[stream_name_length];
1352 /** \brief Reply for enable / disable packet generator
1353 @param context - returned sender context, to match reply w/ request
1354 @param retval - return code
1356 define pg_enable_disable_reply
1362 /** \brief Configure IP source and L4 port-range check
1363 @param client_index - opaque cookie to identify the sender
1364 @param context - sender context, to match reply w/ request
1365 @param is_ip6 - 1 if source address type is IPv6
1366 @param is_add - 1 if add, 0 if delete
1367 @param mask_length - mask length for address entry
1368 @param address - array of address bytes
1369 @param number_of_ranges - length of low_port and high_port arrays (must match)
1370 @param low_ports[32] - up to 32 low end of port range entries (must have corresponding high_ports entry)
1371 @param high_ports[32] - up to 32 high end of port range entries (must have corresponding low_ports entry)
1372 @param vrf_id - fib table/vrf id to associate the source and port-range check with
1373 @note To specify a single port set low_port and high_port entry the same
1375 define ip_source_and_port_range_check_add_del
1383 u8 number_of_ranges;
1389 /** \brief Configure IP source and L4 port-range check reply
1390 @param context - returned sender context, to match reply w/ request
1391 @param retval - return code
1393 define ip_source_and_port_range_check_add_del_reply
1399 /** \brief Set interface source and L4 port-range request
1400 @param client_index - opaque cookie to identify the sender
1401 @param context - sender context, to match reply w/ request
1402 @param interface_id - interface index
1403 @param tcp_vrf_id - VRF associated with source and TCP port-range check
1404 @param udp_vrf_id - VRF associated with source and TCP port-range check
1406 define ip_source_and_port_range_check_interface_add_del
1418 /** \brief Set interface source and L4 port-range response
1419 @param context - sender context, to match reply w/ request
1420 @param retval - return value for request
1422 define ip_source_and_port_range_check_interface_add_del_reply
1428 /** \brief Delete sub interface request
1429 @param client_index - opaque cookie to identify the sender
1430 @param context - sender context, to match reply w/ request
1431 @param sw_if_index - sw index of the interface that was created by create_subif
1433 define delete_subif {
1439 /** \brief Delete sub interface response
1440 @param context - sender context, to match reply w/ request
1441 @param retval - return code for the request
1443 define delete_subif_reply {
1448 /** \brief Punt traffic to the host
1449 @param client_index - opaque cookie to identify the sender
1450 @param context - sender context, to match reply w/ request
1451 @param is_add - add punt if non-zero, else delete
1452 @param ipv - L3 protocol 4 - IPv4, 6 - IPv6, ~0 - All
1453 @param l4_protocol - L4 protocol to be punted, only UDP (0x11) is supported
1454 @param l4_port - TCP/UDP port to be punted
1465 /** \brief Reply to the punt request
1466 @param context - sender context which was passed in the request
1467 @param retval - return code of punt request
1475 /** \brief Feature path enable/disable request
1476 @param client_index - opaque cookie to identify the sender
1477 @param context - sender context, to match reply w/ request
1478 @param sw_if_index - the interface
1479 @param enable - 1 = on, 0 = off
1481 define feature_enable_disable {
1487 u8 feature_name[64];
1490 /** \brief Reply to the eature path enable/disable request
1491 @param context - sender context which was passed in the request
1492 @param retval - return code for the request
1494 define feature_enable_disable_reply
1502 * eval: (c-set-style "gnu")