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}
47 * COP APIs: see ... /src/vnet/cop/{cop.api, cop_api.c}
50 /** \brief Create a new subinterface with the given vlan id
51 @param client_index - opaque cookie to identify the sender
52 @param context - sender context, to match reply w/ request
53 @param sw_if_index - software index of the new vlan's parent interface
54 @param vlan_id - vlan tag of the new interface
56 define create_vlan_subif
64 /** \brief Reply for the vlan subinterface create request
65 @param context - returned sender context, to match reply w/ request
66 @param retval - return code
67 @param sw_if_index - software index allocated for the new subinterface
69 define create_vlan_subif_reply
76 /** \brief Enable or Disable MPLS on and interface
77 @param client_index - opaque cookie to identify the sender
78 @param context - sender context, to match reply w/ request
79 @param sw_if_index - index of the interface
80 @param enable - if non-zero enable, else disable
82 define sw_interface_set_mpls_enable
90 /** \brief Reply for MPLS state on an interface
91 @param context - returned sender context, to match reply w/ request
92 @param retval - return code
94 define sw_interface_set_mpls_enable_reply
100 /** \brief Proxy ARP add / del request
101 @param client_index - opaque cookie to identify the sender
102 @param context - sender context, to match reply w/ request
103 @param vrf_id - VRF / Fib table ID
104 @param is_add - 1 if adding the Proxy ARP range, 0 if deleting
105 @param low_address[4] - Low address of the Proxy ARP range
106 @param hi_address[4] - High address of the Proxy ARP range
108 define proxy_arp_add_del
118 /** \brief Reply for proxy arp add / del request
119 @param context - returned sender context, to match reply w/ request
120 @param retval - return code
122 define proxy_arp_add_del_reply
128 /** \brief Proxy ARP add / del request
129 @param client_index - opaque cookie to identify the sender
130 @param context - sender context, to match reply w/ request
131 @param sw_if_index - Which interface to enable / disable Proxy Arp on
132 @param enable_disable - 1 to enable Proxy ARP on interface, 0 to disable
134 define proxy_arp_intfc_enable_disable
139 /* 1 = on, 0 = off */
143 /** \brief Reply for Proxy ARP interface enable / disable request
144 @param context - returned sender context, to match reply w/ request
145 @param retval - return code
147 define proxy_arp_intfc_enable_disable_reply
153 /** \brief Reset VRF (remove all routes etc) request
154 @param client_index - opaque cookie to identify the sender
155 @param context - sender context, to match reply w/ request
156 @param is_ipv6 - 1 for IPv6 neighbor, 0 for IPv4
157 @param vrf_id - ID of th FIB table / VRF to reset
167 /** \brief Reply for Reset VRF request
168 @param context - returned sender context, to match reply w/ request
169 @param retval - return code
171 define reset_vrf_reply
177 /** \brief Is Address Reachable request - DISABLED
178 @param client_index - opaque cookie to identify the sender
179 @param context - sender context, to match reply w/ request
180 @param next_hop_sw_if_index - index of interface used to get to next hop
181 @param is_ipv6 - 1 for IPv6, 0 for IPv4
182 @param is_error - address not found or does not match intf
183 @param address[] - Address in question
185 define is_address_reachable
187 u32 client_index; /* (api_main_t *) am->my_client_index */
189 u32 next_hop_sw_if_index;
190 u8 is_known; /* on reply, this is the answer */
192 u8 is_error; /* address not found or does not match intf */
196 /** \brief Want Stats, register for stats updates
197 @param client_index - opaque cookie to identify the sender
198 @param context - sender context, to match reply w/ request
199 @param enable_disable - 1 = enable stats, 0 = disable
200 @param pid - pid of process requesting stats updates
210 /** \brief Reply for Want Stats request
211 @param context - returned sender context, to match reply w/ request
212 @param retval - return code
214 define want_stats_reply
220 typeonly manual_print manual_endian define ip4_fib_counter
228 manual_print manual_endian define vnet_ip4_fib_counters
232 vl_api_ip4_fib_counter_t c[count];
235 typeonly manual_print manual_endian define ip4_nbr_counter
244 * @brief Per-neighbour (i.e. per-adjacency) coutners
245 * @param count The size of the array of counters
246 * @param sw_if_index The interface the adjacency is on
247 * @param begin Flag to indicate this is the first set of stats for this
248 * interface. If this flag is not set the it is a continuation of
249 * stats for this interface
252 manual_print manual_endian define vnet_ip4_nbr_counters
257 vl_api_ip4_nbr_counter_t c[count];
260 typeonly manual_print manual_endian define ip6_fib_counter
268 manual_print manual_endian define vnet_ip6_fib_counters
272 vl_api_ip6_fib_counter_t c[count];
275 typeonly manual_print manual_endian define ip6_nbr_counter
283 manual_print manual_endian define vnet_ip6_nbr_counters
288 vl_api_ip6_nbr_counter_t c[count];
291 /** \brief Request for a single block of summary stats
292 @param client_index - opaque cookie to identify the sender
293 @param context - sender context, to match reply w/ request
295 define vnet_get_summary_stats
301 /** \brief Reply for vnet_get_summary_stats request
302 @param context - sender context, to match reply w/ request
303 @param retval - return code for request
308 define vnet_summary_stats_reply
317 /** \brief OAM event structure
318 @param dst_address[] -
327 /** \brief Want OAM events request
328 @param client_index - opaque cookie to identify the sender
329 @param context - sender context, to match reply w/ request
330 @param enable_disable- enable if non-zero, else disable
331 @param pid - pid of the requesting process
333 define want_oam_events
341 /** \brief Want OAM events response
342 @param context - sender context, to match reply w/ request
343 @param retval - return code for the want oam stats request
345 define want_oam_events_reply
351 /** \brief OAM add / del target request
352 @param client_index - opaque cookie to identify the sender
353 @param context - sender context, to match reply w/ request
354 @param vrf_id - vrf_id of the target
355 @param src_address[] - source address to use for the updates
356 @param dst_address[] - destination address of the target
357 @param is_add - add target if non-zero, else delete
369 /** \brief OAM add / del target response
370 @param context - sender context, to match reply w/ request
371 @param retval - return code of the request
373 define oam_add_del_reply
379 /** \brief Reset fib table request
380 @param client_index - opaque cookie to identify the sender
381 @param context - sender context, to match reply w/ request
382 @param vrf_id - vrf/table id of the fib table to reset
383 @param is_ipv6 - an ipv6 fib to reset if non-zero, else ipv4
393 /** \brief Reset fib response
394 @param context - sender context, to match reply w/ request
395 @param retval - return code for the reset bfib request
397 define reset_fib_reply
403 /** \brief Create loopback interface request
404 @param client_index - opaque cookie to identify the sender
405 @param context - sender context, to match reply w/ request
406 @param mac_address - mac addr to assign to the interface if none-zero
408 define create_loopback
415 /** \brief Create loopback interface response
416 @param context - sender context, to match reply w/ request
417 @param sw_if_index - sw index of the interface that was created
418 @param retval - return code for the request
420 define create_loopback_reply
427 /** \brief Delete loopback interface request
428 @param client_index - opaque cookie to identify the sender
429 @param context - sender context, to match reply w/ request
430 @param sw_if_index - sw index of the interface that was created
432 define delete_loopback
439 /** \brief Delete loopback interface response
440 @param context - sender context, to match reply w/ request
441 @param retval - return code for the request
443 define delete_loopback_reply
449 /** \brief Control ping from client to api server request
450 @param client_index - opaque cookie to identify the sender
451 @param context - sender context, to match reply w/ request
459 /** \brief Control ping from the client to the server response
460 @param client_index - opaque cookie to identify the sender
461 @param context - sender context, to match reply w/ request
462 @param retval - return code for the request
463 @param vpe_pid - the pid of the vpe, returned by the server
465 define control_ping_reply
473 /** \brief Process a vpe parser cli string request
474 @param client_index - opaque cookie to identify the sender
475 @param context - sender context, to match reply w/ request
476 @param cmd_in_shmem - pointer to cli command string
492 /** \brief vpe parser cli string response
493 @param context - sender context, to match reply w/ request
494 @param retval - return code for request
495 @param reply_in_shmem - Reply string from cli processing if any
503 define cli_inband_reply
511 /** \brief Set max allowed ARP or ip6 neighbor entries request
512 @param client_index - opaque cookie to identify the sender
513 @param context - sender context, to match reply w/ request
514 @param is_ipv6 - neighbor limit if non-zero, else ARP limit
515 @param arp_neighbor_limit - the new limit, defaults are ~ 50k
517 define set_arp_neighbor_limit
522 u32 arp_neighbor_limit;
525 /** \brief Set max allowed ARP or ip6 neighbor entries response
526 @param context - sender context, to match reply w/ request
527 @param retval - return code for request
529 define set_arp_neighbor_limit_reply
535 /** \brief L2 interface patch add / del request
536 @param client_index - opaque cookie to identify the sender
537 @param context - sender context, to match reply w/ request
538 @param rx_sw_if_index - receive side interface
539 @param tx_sw_if_index - transmit side interface
540 @param is_add - if non-zero set up the interface patch, else remove it
542 define l2_patch_add_del
551 /** \brief L2 interface patch add / del response
552 @param context - sender context, to match reply w/ request
553 @param retval - return code for the request
555 define l2_patch_add_del_reply
561 /** \brief Interface set vpath request
562 @param client_index - opaque cookie to identify the sender
563 @param context - sender context, to match reply w/ request
564 @param sw_if_index - interface used to reach neighbor
565 @param enable - if non-zero enable, else disable
567 define sw_interface_set_vpath
575 /** \brief Interface set vpath response
576 @param context - sender context, to match reply w/ request
577 @param retval - return code for the request
579 define sw_interface_set_vpath_reply
585 /** \brief Set L2 XConnect between two interfaces request
586 @param client_index - opaque cookie to identify the sender
587 @param context - sender context, to match reply w/ request
588 @param rx_sw_if_index - Receive interface index
589 @param tx_sw_if_index - Transmit interface index
590 @param enable - enable xconnect if not 0, else set to L3 mode
592 define sw_interface_set_l2_xconnect
601 /** \brief Set L2 XConnect response
602 @param context - sender context, to match reply w/ request
603 @param retval - L2 XConnect request return code
605 define sw_interface_set_l2_xconnect_reply
611 /** \brief Interface bridge mode request
612 @param client_index - opaque cookie to identify the sender
613 @param context - sender context, to match reply w/ request
614 @param rx_sw_if_index - the interface
615 @param bd_id - bridge domain id
616 @param bvi - Setup interface as a bvi, bridge mode only
617 @param shg - Shared horizon group, for bridge mode only
618 @param enable - Enable beige mode if not 0, else set to L3 mode
620 define sw_interface_set_l2_bridge
631 /** \brief Interface bridge mode response
632 @param context - sender context, to match reply w/ request
633 @param retval - Bridge mode request return code
635 define sw_interface_set_l2_bridge_reply
641 /** \brief Set bridge domain ip to mac entry request
642 @param client_index - opaque cookie to identify the sender
643 @param context - sender context, to match reply w/ request
644 @param bd_id - the bridge domain to set the flags for
645 @param is_add - if non-zero, add the entry, else clear it
646 @param is_ipv6 - if non-zero, ipv6 address, else ipv4 address
647 @param mac_address - MAC address
650 define bd_ip_mac_add_del
661 /** \brief Set bridge domain ip to mac entry response
662 @param context - sender context, to match reply w/ request
663 @param retval - return code for the set bridge flags request
665 define bd_ip_mac_add_del_reply
671 /** \brief Set/unset the classification table for an interface request
672 @param client_index - opaque cookie to identify the sender
673 @param context - sender context, to match reply w/ request
674 @param is_ipv6 - ipv6 if non-zero, else ipv4
675 @param sw_if_index - interface to associate with the table
676 @param table_index - index of the table, if ~0 unset the table
678 define classify_set_interface_ip_table
684 u32 table_index; /* ~0 => off */
687 /** \brief Set/unset interface classification table response
688 @param context - sender context, to match reply w/ request
689 @param retval - return code
691 define classify_set_interface_ip_table_reply
697 /** \brief Set/unset l2 classification tables for an interface request
698 @param client_index - opaque cookie to identify the sender
699 @param context - sender context, to match reply w/ request
700 @param sw_if_index - interface to set/unset tables for
701 @param ip4_table_index - ip4 index, use ~0 for all 3 indexes to unset
702 @param ip6_table_index - ip6 index
703 @param other_table_index - other index
705 define classify_set_interface_l2_tables
713 u32 other_table_index;
717 /** \brief Set/unset l2 classification tables for an interface response
718 @param context - sender context, to match reply w/ request
719 @param retval - return code for the request
721 define classify_set_interface_l2_tables_reply
727 /** \brief Get node index using name request
728 @param client_index - opaque cookie to identify the sender
729 @param context - sender context, to match reply w/ request
730 @param node_name[] - name of the node
732 define get_node_index
739 /** \brief Get node index using name request
740 @param context - sender context, to match reply w/ request
741 @param retval - return code for the request
742 @param node_index - index of the desired node if found, else ~0
744 define get_node_index_reply
751 /** \brief Set the next node for a given node request
752 @param client_index - opaque cookie to identify the sender
753 @param context - sender context, to match reply w/ request
754 @param node_name[] - node to add the next node to
755 @param next_name[] - node to add as the next node
765 /** \brief IP Set the next node for a given node response
766 @param context - sender context, to match reply w/ request
767 @param retval - return code for the add next node request
768 @param next_index - the index of the next node if success, else ~0
770 define add_node_next_reply
777 /** \brief L2 interface ethernet flow point filtering enable/disable request
778 @param client_index - opaque cookie to identify the sender
779 @param context - sender context, to match reply w/ request
780 @param sw_if_index - interface to enable/disable filtering on
781 @param enable_disable - if non-zero enable filtering, else disable
783 define l2_interface_efp_filter
791 /** \brief L2 interface ethernet flow point filtering response
792 @param context - sender context, to match reply w/ request
793 @param retval - return code for the request
795 define l2_interface_efp_filter_reply
808 /* These fields map directly onto the subif template */
812 u8 dot1ad; // 0 = dot1q, 1=dot1ad
815 u8 outer_vlan_id_any;
816 u8 inner_vlan_id_any;
821 define create_subif_reply
828 /** \brief show version
829 @param client_index - opaque cookie to identify the sender
830 @param context - sender context, to match reply w/ request
838 /** \brief show version response
839 @param context - sender context, to match reply w/ request
840 @param retval - return code for the request
841 @param program - name of the program (vpe)
842 @param version - version of the program
843 @param build_directory - root of the workspace where the program was built
845 define show_version_reply
852 u8 build_directory[256];
855 /* Gross kludge, DGMS */
856 define interface_name_renumber
861 u32 new_show_dev_instance;
864 define interface_name_renumber_reply
870 /** \brief Register for ip4 arp resolution events
871 @param client_index - opaque cookie to identify the sender
872 @param context - sender context, to match reply w/ request
873 @param enable_disable - 1 => register for events, 0 => cancel registration
874 @param pid - sender's pid
875 @param address - the exact ip4 address of interest
877 define want_ip4_arp_events
886 /** \brief Reply for interface events registration
887 @param context - returned sender context, to match reply w/ request
888 @param retval - return code
890 define want_ip4_arp_events_reply
896 /** \brief Tell client about an ip4 arp resolution event
897 @param client_index - opaque cookie to identify the sender
898 @param context - sender context, to match reply w/ request
899 @param address - the exact ip4 address of interest
900 @param pid - client pid registered to receive notification
901 @param sw_if_index - interface which received ARP packet
902 @param new_mac - the new mac address
903 @param mac_ip - 0: resolution event, 1: mac/ip binding in bd
916 /** \brief Register for ip6 nd resolution events
917 @param client_index - opaque cookie to identify the sender
918 @param context - sender context, to match reply w/ request
919 @param enable_disable - 1 => register for events, 0 => cancel registration
920 @param pid - sender's pid
921 @param address - the exact ip6 address of interest
923 define want_ip6_nd_events
932 /** \brief Reply for ip6 nd resolution events registration
933 @param context - returned sender context, to match reply w/ request
934 @param retval - return code
936 define want_ip6_nd_events_reply
942 /** \brief Tell client about an ip6 nd resolution or mac/ip event
943 @param client_index - opaque cookie to identify the sender
944 @param context - sender context, to match reply w/ request
945 @param pid - client pid registered to receive notification
946 @param sw_if_index - interface which received ARP packet
947 @param address - the exact ip6 address of interest
948 @param new_mac - the new mac address
949 @param mac_ip - 0: resolution event, 1: mac/ip binding in bd
962 /** \brief Set/unset input ACL interface
963 @param client_index - opaque cookie to identify the sender
964 @param context - sender context, to match reply w/ request
965 @param sw_if_index - interface to set/unset input ACL
966 @param ip4_table_index - ip4 classify table index (~0 for skip)
967 @param ip6_table_index - ip6 classify table index (~0 for skip)
968 @param l2_table_index - l2 classify table index (~0 for skip)
969 @param is_add - Set input ACL if non-zero, else unset
970 Note: User is recommeneded to use just one valid table_index per call.
971 (ip4_table_index, ip6_table_index, or l2_table_index)
973 define input_acl_set_interface
984 /** \brief Set/unset input ACL interface response
985 @param context - sender context, to match reply w/ request
986 @param retval - return code for the request
988 define input_acl_set_interface_reply
994 define get_node_graph
1000 /** \brief get_node_graph_reply
1001 @param context - returned sender context, to match reply w/ request
1002 @param retval - return code
1003 @param reply_in_shmem - result from vlib_node_serialize, in shared
1004 memory. Process with vlib_node_unserialize, remember to switch
1005 heaps and free the result.
1008 define get_node_graph_reply
1015 /** \brief IOAM enable : Enable in-band OAM
1016 @param id - profile id
1017 @param seqno - To enable Seqno Processing
1018 @param analyse - Enabling analysis of iOAM at decap node
1019 @param pow_enable - Proof of Work enabled or not flag
1020 @param trace_enable - iOAM Trace enabled or not flag
1034 /** \brief iOAM Trace profile add / del response
1035 @param context - sender context, to match reply w/ request
1036 @param retval - return value for request
1038 define ioam_enable_reply
1044 /** \brief iOAM disable
1045 @param client_index - opaque cookie to identify the sender
1046 @param context - sender context, to match reply w/ request
1047 @param index - MAP Domain index
1056 /** \brief iOAM disable response
1057 @param context - sender context, to match reply w/ request
1058 @param retval - return value for request
1060 define ioam_disable_reply
1066 /** \brief Add/del policer
1067 @param client_index - opaque cookie to identify the sender
1068 @param context - sender context, to match reply w/ request
1069 @param is_add - add policer if non-zero, else delete
1070 @param name - policer name
1073 @param cb - Committed Burst
1074 @param eb - Excess or Peak Burst
1075 @param rate_type - rate type
1076 @param round_type - rounding type
1077 @param type - policer algorithm
1078 @param color_aware - 0=color-blind, 1=color-aware
1079 @param conform_action_type - conform action type
1080 @param conform_dscp - DSCP for conform mar-and-transmit action
1081 @param exceed_action_type - exceed action type
1082 @param exceed_dscp - DSCP for exceed mar-and-transmit action
1083 @param violate_action_type - violate action type
1084 @param violate_dscp - DSCP for violate mar-and-transmit action
1086 define policer_add_del
1101 u8 conform_action_type;
1103 u8 exceed_action_type;
1105 u8 violate_action_type;
1109 /** \brief Add/del policer response
1110 @param context - sender context, to match reply w/ request
1111 @param retval - return value for request
1112 @param policer_index - for add, returned index of the new policer
1114 define policer_add_del_reply
1121 /** \brief Get list of policers
1122 @param client_index - opaque cookie to identify the sender
1123 @param context - sender context, to match reply w/ request
1124 @param match_name_valid - if 0 request all policers otherwise use match_name
1125 @param match_name - policer name
1132 u8 match_name_valid;
1136 /** \brief Policer operational state response.
1137 @param context - sender context, to match reply w/ request
1138 @param name - policer name
1141 @param cb - Committed Burst
1142 @param eb - Excess or Peak Burst
1143 @param rate_type - rate type
1144 @param round_type - rounding type
1145 @param type - policer algorithm
1146 @param conform_action_type - conform action type
1147 @param conform_dscp - DSCP for conform mar-and-transmit action
1148 @param exceed_action_type - exceed action type
1149 @param exceed_dscp - DSCP for exceed mar-and-transmit action
1150 @param violate_action_type - violate action type
1151 @param violate_dscp - DSCP for violate mar-and-transmit action
1152 @param single_rate - 1 = single rate policer, 0 = two rate policer
1153 @param color_aware - for hierarchical policing
1154 @param scale - power-of-2 shift amount for lower rates
1155 @param cir_tokens_per_period - number of tokens for each period
1156 @param pir_tokens_per_period - number of tokens for each period for 2-rate policer
1157 @param current_limit - current limit
1158 @param current_bucket - current bucket
1159 @param extended_limit - extended limit
1160 @param extended_bucket - extended bucket
1161 @param last_update_time - last update time
1163 define policer_details
1175 u8 conform_action_type;
1177 u8 exceed_action_type;
1179 u8 violate_action_type;
1184 u32 cir_tokens_per_period;
1185 u32 pir_tokens_per_period;
1189 u32 extended_bucket;
1190 u64 last_update_time;
1193 /** \brief Query relative index via node names
1194 @param client_index - opaque cookie to identify the sender
1195 @param context - sender context, to match reply w/ request
1196 @param node_name - name of node to find relative index from
1197 @param next_name - next node from node_name to find relative index of
1199 define get_next_index
1207 /** \brief Reply for get next node index
1208 @param context - sender context which was passed in the request
1209 @param retval - return value
1210 @param next_index - index of the next_node
1212 define get_next_index_reply
1219 /** \brief PacketGenerator create interface request
1220 @param client_index - opaque cookie to identify the sender
1221 @param context - sender context, to match reply w/ request
1222 @param interface_id - interface index
1224 define pg_create_interface
1231 /** \brief PacketGenerator create interface response
1232 @param context - sender context, to match reply w/ request
1233 @param retval - return value for request
1235 define pg_create_interface_reply
1242 /** \brief PacketGenerator capture packets on given interface request
1243 @param client_index - opaque cookie to identify the sender
1244 @param context - sender context, to match reply w/ request
1245 @param interface_id - pg interface index
1246 @param is_enabled - 1 if enabling streams, 0 if disabling
1247 @param count - number of packets to be captured
1248 @param pcap_file - pacp file name to store captured packets
1257 u32 pcap_name_length;
1258 u8 pcap_file_name[pcap_name_length];
1261 /** \brief PacketGenerator capture packets response
1262 @param context - sender context, to match reply w/ request
1263 @param retval - return value for request
1265 define pg_capture_reply
1271 /** \brief Enable / disable packet generator request
1272 @param client_index - opaque cookie to identify the sender
1273 @param context - sender context, to match reply w/ request
1274 @param is_enabled - 1 if enabling streams, 0 if disabling
1275 @param stream - stream name to be enable/disabled, if not specified handle all streams
1277 define pg_enable_disable
1282 u32 stream_name_length;
1283 u8 stream_name[stream_name_length];
1286 /** \brief Reply for enable / disable packet generator
1287 @param context - returned sender context, to match reply w/ request
1288 @param retval - return code
1290 define pg_enable_disable_reply
1296 /** \brief Configure IP source and L4 port-range check
1297 @param client_index - opaque cookie to identify the sender
1298 @param context - sender context, to match reply w/ request
1299 @param is_ip6 - 1 if source address type is IPv6
1300 @param is_add - 1 if add, 0 if delete
1301 @param mask_length - mask length for address entry
1302 @param address - array of address bytes
1303 @param number_of_ranges - length of low_port and high_port arrays (must match)
1304 @param low_ports[32] - up to 32 low end of port range entries (must have corresponding high_ports entry)
1305 @param high_ports[32] - up to 32 high end of port range entries (must have corresponding low_ports entry)
1306 @param vrf_id - fib table/vrf id to associate the source and port-range check with
1307 @note To specify a single port set low_port and high_port entry the same
1309 define ip_source_and_port_range_check_add_del
1317 u8 number_of_ranges;
1323 /** \brief Configure IP source and L4 port-range check reply
1324 @param context - returned sender context, to match reply w/ request
1325 @param retval - return code
1327 define ip_source_and_port_range_check_add_del_reply
1333 /** \brief Set interface source and L4 port-range request
1334 @param client_index - opaque cookie to identify the sender
1335 @param context - sender context, to match reply w/ request
1336 @param interface_id - interface index
1337 @param tcp_vrf_id - VRF associated with source and TCP port-range check
1338 @param udp_vrf_id - VRF associated with source and TCP port-range check
1340 define ip_source_and_port_range_check_interface_add_del
1352 /** \brief Set interface source and L4 port-range response
1353 @param context - sender context, to match reply w/ request
1354 @param retval - return value for request
1356 define ip_source_and_port_range_check_interface_add_del_reply
1362 /** \brief Delete sub interface request
1363 @param client_index - opaque cookie to identify the sender
1364 @param context - sender context, to match reply w/ request
1365 @param sw_if_index - sw index of the interface that was created by create_subif
1367 define delete_subif {
1373 /** \brief Delete sub interface response
1374 @param context - sender context, to match reply w/ request
1375 @param retval - return code for the request
1377 define delete_subif_reply {
1382 /** \brief Punt traffic to the host
1383 @param client_index - opaque cookie to identify the sender
1384 @param context - sender context, to match reply w/ request
1385 @param is_add - add punt if non-zero, else delete
1386 @param ipv - L3 protocol 4 - IPv4, 6 - IPv6, ~0 - All
1387 @param l4_protocol - L4 protocol to be punted, only UDP (0x11) is supported
1388 @param l4_port - TCP/UDP port to be punted
1399 /** \brief Reply to the punt request
1400 @param context - sender context which was passed in the request
1401 @param retval - return code of punt request
1409 /** \brief Feature path enable/disable request
1410 @param client_index - opaque cookie to identify the sender
1411 @param context - sender context, to match reply w/ request
1412 @param sw_if_index - the interface
1413 @param enable - 1 = on, 0 = off
1415 define feature_enable_disable {
1421 u8 feature_name[64];
1424 /** \brief Reply to the eature path enable/disable request
1425 @param context - sender context which was passed in the request
1426 @param retval - return code for the request
1428 define feature_enable_disable_reply
1436 * eval: (c-set-style "gnu")