FD.io VPP  v17.04-9-g99c0734
Vector Packet Processing
vpe.api
Go to the documentation of this file.
1 /*
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:
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
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.
14  */
15 
16 /** \file
17 
18  This file defines vpe control-plane API messages which are generally
19  called through a shared memory interface.
20 */
21 
22 /*
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  * SESSION APIs: .../vnet/session/{session.api session_api.c}
42  * MPLS APIs: see .../src/vnet/mpls/{mpls.api, mpls_api.c}
43  * SR APIs: see .../src/vnet/sr/{sr.api, sr_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}
48  * POLICER APIs: see ... /src/vnet/policer/{policer.api, policer_api.c}
49  */
50 
51 /** \brief Create a new subinterface with the given vlan id
52  @param client_index - opaque cookie to identify the sender
53  @param context - sender context, to match reply w/ request
54  @param sw_if_index - software index of the new vlan's parent interface
55  @param vlan_id - vlan tag of the new interface
56 */
57 define create_vlan_subif
58 {
63 };
64 
65 /** \brief Reply for the vlan subinterface create request
66  @param context - returned sender context, to match reply w/ request
67  @param retval - return code
68  @param sw_if_index - software index allocated for the new subinterface
69 */
70 define create_vlan_subif_reply
71 {
75 };
76 
77 /** \brief Enable or Disable MPLS on and interface
78  @param client_index - opaque cookie to identify the sender
79  @param context - sender context, to match reply w/ request
80  @param sw_if_index - index of the interface
81  @param enable - if non-zero enable, else disable
82 */
83 define sw_interface_set_mpls_enable
84 {
89 };
90 
91 /** \brief Reply for MPLS state on an interface
92  @param context - returned sender context, to match reply w/ request
93  @param retval - return code
94 */
95 define sw_interface_set_mpls_enable_reply
96 {
99 };
100 
101 /** \brief Proxy ARP add / del request
102  @param client_index - opaque cookie to identify the sender
103  @param context - sender context, to match reply w/ request
104  @param vrf_id - VRF / Fib table ID
105  @param is_add - 1 if adding the Proxy ARP range, 0 if deleting
106  @param low_address[4] - Low address of the Proxy ARP range
107  @param hi_address[4] - High address of the Proxy ARP range
108 */
109 define proxy_arp_add_del
110 {
115  u8 low_address[4];
116  u8 hi_address[4];
117 };
118 
119 /** \brief Reply for proxy arp add / del request
120  @param context - returned sender context, to match reply w/ request
121  @param retval - return code
122 */
123 define proxy_arp_add_del_reply
124 {
127 };
128 
129 /** \brief Proxy ARP add / del request
130  @param client_index - opaque cookie to identify the sender
131  @param context - sender context, to match reply w/ request
132  @param sw_if_index - Which interface to enable / disable Proxy Arp on
133  @param enable_disable - 1 to enable Proxy ARP on interface, 0 to disable
134 */
135 define proxy_arp_intfc_enable_disable
136 {
140  /* 1 = on, 0 = off */
142 };
143 
144 /** \brief Reply for Proxy ARP interface enable / disable request
145  @param context - returned sender context, to match reply w/ request
146  @param retval - return code
147 */
148 define proxy_arp_intfc_enable_disable_reply
149 {
152 };
153 
154 /** \brief Reset VRF (remove all routes etc) request
155  @param client_index - opaque cookie to identify the sender
156  @param context - sender context, to match reply w/ request
157  @param is_ipv6 - 1 for IPv6 neighbor, 0 for IPv4
158  @param vrf_id - ID of th FIB table / VRF to reset
159 */
160 define reset_vrf
161 {
166 };
167 
168 /** \brief Reply for Reset VRF request
169  @param context - returned sender context, to match reply w/ request
170  @param retval - return code
171 */
172 define reset_vrf_reply
173 {
176 };
177 
178 /** \brief Is Address Reachable request - DISABLED
179  @param client_index - opaque cookie to identify the sender
180  @param context - sender context, to match reply w/ request
181  @param next_hop_sw_if_index - index of interface used to get to next hop
182  @param is_ipv6 - 1 for IPv6, 0 for IPv4
183  @param is_error - address not found or does not match intf
184  @param address[] - Address in question
185 */
186 define is_address_reachable
187 {
188  u32 client_index; /* (api_main_t *) am->my_client_index */
191  u8 is_known; /* on reply, this is the answer */
193  u8 is_error; /* address not found or does not match intf */
194  u8 address[16];
195 };
196 
197 /** \brief Want Stats, register for stats updates
198  @param client_index - opaque cookie to identify the sender
199  @param context - sender context, to match reply w/ request
200  @param enable_disable - 1 = enable stats, 0 = disable
201  @param pid - pid of process requesting stats updates
202 */
203 define want_stats
204 {
209 };
210 
211 /** \brief Reply for Want Stats request
212  @param context - returned sender context, to match reply w/ request
213  @param retval - return code
214 */
215 define want_stats_reply
216 {
219 };
220 
221 typeonly manual_print manual_endian define ip4_fib_counter
222 {
227 };
228 
229 manual_print manual_endian define vnet_ip4_fib_counters
230 {
234 };
235 
236 typeonly manual_print manual_endian define ip4_nbr_counter
237 {
242 };
243 
244 /**
245  * @brief Per-neighbour (i.e. per-adjacency) coutners
246  * @param count The size of the array of counters
247  * @param sw_if_index The interface the adjacency is on
248  * @param begin Flag to indicate this is the first set of stats for this
249  * interface. If this flag is not set the it is a continuation of
250  * stats for this interface
251  * @param c counters
252  */
253 manual_print manual_endian define vnet_ip4_nbr_counters
254 {
259 };
260 
261 typeonly manual_print manual_endian define ip6_fib_counter
262 {
263  u64 address[2];
267 };
268 
269 manual_print manual_endian define vnet_ip6_fib_counters
270 {
274 };
275 
276 typeonly manual_print manual_endian define ip6_nbr_counter
277 {
278  u64 address[2];
282 };
283 
284 manual_print manual_endian define vnet_ip6_nbr_counters
285 {
290 };
291 
292 /** \brief Request for a single block of summary stats
293  @param client_index - opaque cookie to identify the sender
294  @param context - sender context, to match reply w/ request
295 */
296 define vnet_get_summary_stats
297 {
300 };
301 
302 /** \brief Reply for vnet_get_summary_stats request
303  @param context - sender context, to match reply w/ request
304  @param retval - return code for request
305  @param total_pkts -
306  @param total_bytes -
307  @param vector_rate -
308 */
309 define vnet_summary_stats_reply
310 {
313  u64 total_pkts[2];
314  u64 total_bytes[2];
316 };
317 
318 /** \brief OAM event structure
319  @param dst_address[] -
320  @param state
321 */
322 define oam_event
323 {
324  u8 dst_address[4];
326 };
327 
328 /** \brief Want OAM events request
329  @param client_index - opaque cookie to identify the sender
330  @param context - sender context, to match reply w/ request
331  @param enable_disable- enable if non-zero, else disable
332  @param pid - pid of the requesting process
333 */
334 define want_oam_events
335 {
340 };
341 
342 /** \brief Want OAM events response
343  @param context - sender context, to match reply w/ request
344  @param retval - return code for the want oam stats request
345 */
346 define want_oam_events_reply
347 {
350 };
351 
352 /** \brief OAM add / del target request
353  @param client_index - opaque cookie to identify the sender
354  @param context - sender context, to match reply w/ request
355  @param vrf_id - vrf_id of the target
356  @param src_address[] - source address to use for the updates
357  @param dst_address[] - destination address of the target
358  @param is_add - add target if non-zero, else delete
359 */
360 define oam_add_del
361 {
365  u8 src_address[4];
366  u8 dst_address[4];
368 };
369 
370 /** \brief OAM add / del target response
371  @param context - sender context, to match reply w/ request
372  @param retval - return code of the request
373 */
374 define oam_add_del_reply
375 {
378 };
379 
380 /** \brief Reset fib table request
381  @param client_index - opaque cookie to identify the sender
382  @param context - sender context, to match reply w/ request
383  @param vrf_id - vrf/table id of the fib table to reset
384  @param is_ipv6 - an ipv6 fib to reset if non-zero, else ipv4
385 */
386 define reset_fib
387 {
392 };
393 
394 /** \brief Reset fib response
395  @param context - sender context, to match reply w/ request
396  @param retval - return code for the reset bfib request
397 */
398 define reset_fib_reply
399 {
402 };
403 
404 /** \brief Create loopback interface request
405  @param client_index - opaque cookie to identify the sender
406  @param context - sender context, to match reply w/ request
407  @param mac_address - mac addr to assign to the interface if none-zero
408 */
409 define create_loopback
410 {
413  u8 mac_address[6];
414 };
415 
416 /** \brief Create loopback interface response
417  @param context - sender context, to match reply w/ request
418  @param sw_if_index - sw index of the interface that was created
419  @param retval - return code for the request
420 */
421 define create_loopback_reply
422 {
426 };
427 
428 /** \brief Create loopback interface instance request
429  @param client_index - opaque cookie to identify the sender
430  @param context - sender context, to match reply w/ request
431  @param mac_address - mac addr to assign to the interface if none-zero
432  @param is_specified - if non-0, a specific user_instance is being requested
433  @param user_instance - requested instance, ~0 => dynamically allocate
434 */
435 define create_loopback_instance
436 {
439  u8 mac_address[6];
442 };
443 
444 /** \brief Create loopback interface instance response
445  @param context - sender context, to match reply w/ request
446  @param sw_if_index - sw index of the interface that was created
447  @param retval - return code for the request
448 */
449 define create_loopback_instance_reply
450 {
454 };
455 
456 /** \brief Delete loopback interface request
457  @param client_index - opaque cookie to identify the sender
458  @param context - sender context, to match reply w/ request
459  @param sw_if_index - sw index of the interface that was created
460 */
461 define delete_loopback
462 {
466 };
467 
468 /** \brief Delete loopback interface response
469  @param context - sender context, to match reply w/ request
470  @param retval - return code for the request
471 */
472 define delete_loopback_reply
473 {
476 };
477 
478 /** \brief Control ping from client to api server request
479  @param client_index - opaque cookie to identify the sender
480  @param context - sender context, to match reply w/ request
481 */
482 define control_ping
483 {
486 };
487 
488 /** \brief Control ping from the client to the server response
489  @param client_index - opaque cookie to identify the sender
490  @param context - sender context, to match reply w/ request
491  @param retval - return code for the request
492  @param vpe_pid - the pid of the vpe, returned by the server
493 */
494 define control_ping_reply
495 {
500 };
501 
502 /** \brief Process a vpe parser cli string request
503  @param client_index - opaque cookie to identify the sender
504  @param context - sender context, to match reply w/ request
505  @param cmd_in_shmem - pointer to cli command string
506 */
507 define cli_request
508 {
512 };
513 define cli_inband
514 {
518  u8 cmd[length];
519 };
520 
521 /** \brief vpe parser cli string response
522  @param context - sender context, to match reply w/ request
523  @param retval - return code for request
524  @param reply_in_shmem - Reply string from cli processing if any
525 */
526 define cli_reply
527 {
531 };
532 define cli_inband_reply
533 {
537  u8 reply[length];
538 };
539 
540 /** \brief Set max allowed ARP or ip6 neighbor entries request
541  @param client_index - opaque cookie to identify the sender
542  @param context - sender context, to match reply w/ request
543  @param is_ipv6 - neighbor limit if non-zero, else ARP limit
544  @param arp_neighbor_limit - the new limit, defaults are ~ 50k
545 */
546 define set_arp_neighbor_limit
547 {
552 };
553 
554 /** \brief Set max allowed ARP or ip6 neighbor entries response
555  @param context - sender context, to match reply w/ request
556  @param retval - return code for request
557 */
558 define set_arp_neighbor_limit_reply
559 {
562 };
563 
564 /** \brief L2 interface patch add / del request
565  @param client_index - opaque cookie to identify the sender
566  @param context - sender context, to match reply w/ request
567  @param rx_sw_if_index - receive side interface
568  @param tx_sw_if_index - transmit side interface
569  @param is_add - if non-zero set up the interface patch, else remove it
570 */
571 define l2_patch_add_del
572 {
578 };
579 
580 /** \brief L2 interface patch add / del response
581  @param context - sender context, to match reply w/ request
582  @param retval - return code for the request
583 */
584 define l2_patch_add_del_reply
585 {
588 };
589 
590 /** \brief Interface set vpath request
591  @param client_index - opaque cookie to identify the sender
592  @param context - sender context, to match reply w/ request
593  @param sw_if_index - interface used to reach neighbor
594  @param enable - if non-zero enable, else disable
595 */
596 define sw_interface_set_vpath
597 {
602 };
603 
604 /** \brief Interface set vpath response
605  @param context - sender context, to match reply w/ request
606  @param retval - return code for the request
607 */
608 define sw_interface_set_vpath_reply
609 {
612 };
613 
614 /** \brief Set L2 XConnect between two interfaces request
615  @param client_index - opaque cookie to identify the sender
616  @param context - sender context, to match reply w/ request
617  @param rx_sw_if_index - Receive interface index
618  @param tx_sw_if_index - Transmit interface index
619  @param enable - enable xconnect if not 0, else set to L3 mode
620 */
621 define sw_interface_set_l2_xconnect
622 {
628 };
629 
630 /** \brief Set L2 XConnect response
631  @param context - sender context, to match reply w/ request
632  @param retval - L2 XConnect request return code
633 */
634 define sw_interface_set_l2_xconnect_reply
635 {
638 };
639 
640 /** \brief Interface bridge mode request
641  @param client_index - opaque cookie to identify the sender
642  @param context - sender context, to match reply w/ request
643  @param rx_sw_if_index - the interface
644  @param bd_id - bridge domain id
645  @param bvi - Setup interface as a bvi, bridge mode only
646  @param shg - Shared horizon group, for bridge mode only
647  @param enable - Enable beige mode if not 0, else set to L3 mode
648 */
649 define sw_interface_set_l2_bridge
650 {
658 };
659 
660 /** \brief Interface bridge mode response
661  @param context - sender context, to match reply w/ request
662  @param retval - Bridge mode request return code
663 */
664 define sw_interface_set_l2_bridge_reply
665 {
668 };
669 
670 /** \brief Set bridge domain ip to mac entry request
671  @param client_index - opaque cookie to identify the sender
672  @param context - sender context, to match reply w/ request
673  @param bd_id - the bridge domain to set the flags for
674  @param is_add - if non-zero, add the entry, else clear it
675  @param is_ipv6 - if non-zero, ipv6 address, else ipv4 address
676  @param mac_address - MAC address
677  @param
678 */
679 define bd_ip_mac_add_del
680 {
686  u8 ip_address[16];
687  u8 mac_address[6];
688 };
689 
690 /** \brief Set bridge domain ip to mac entry response
691  @param context - sender context, to match reply w/ request
692  @param retval - return code for the set bridge flags request
693 */
694 define bd_ip_mac_add_del_reply
695 {
698 };
699 
700 /** \brief Set/unset the classification table for an interface request
701  @param client_index - opaque cookie to identify the sender
702  @param context - sender context, to match reply w/ request
703  @param is_ipv6 - ipv6 if non-zero, else ipv4
704  @param sw_if_index - interface to associate with the table
705  @param table_index - index of the table, if ~0 unset the table
706 */
707 define classify_set_interface_ip_table
708 {
713  u32 table_index; /* ~0 => off */
714 };
715 
716 /** \brief Set/unset interface classification table response
717  @param context - sender context, to match reply w/ request
718  @param retval - return code
719 */
720 define classify_set_interface_ip_table_reply
721 {
724 };
725 
726 /** \brief Set/unset l2 classification tables for an interface request
727  @param client_index - opaque cookie to identify the sender
728  @param context - sender context, to match reply w/ request
729  @param sw_if_index - interface to set/unset tables for
730  @param ip4_table_index - ip4 index, use ~0 for all 3 indexes to unset
731  @param ip6_table_index - ip6 index
732  @param other_table_index - other index
733 */
734 define classify_set_interface_l2_tables
735 {
739  /* 3 x ~0 => off */
744 };
745 
746 /** \brief Set/unset l2 classification tables for an interface response
747  @param context - sender context, to match reply w/ request
748  @param retval - return code for the request
749 */
750 define classify_set_interface_l2_tables_reply
751 {
754 };
755 
756 /** \brief Get node index using name request
757  @param client_index - opaque cookie to identify the sender
758  @param context - sender context, to match reply w/ request
759  @param node_name[] - name of the node
760 */
761 define get_node_index
762 {
765  u8 node_name[64];
766 };
767 
768 /** \brief Get node index using name request
769  @param context - sender context, to match reply w/ request
770  @param retval - return code for the request
771  @param node_index - index of the desired node if found, else ~0
772 */
773 define get_node_index_reply
774 {
778 };
779 
780 /** \brief Set the next node for a given node request
781  @param client_index - opaque cookie to identify the sender
782  @param context - sender context, to match reply w/ request
783  @param node_name[] - node to add the next node to
784  @param next_name[] - node to add as the next node
785 */
786 define add_node_next
787 {
790  u8 node_name[64];
791  u8 next_name[64];
792 };
793 
794 /** \brief IP Set the next node for a given node response
795  @param context - sender context, to match reply w/ request
796  @param retval - return code for the add next node request
797  @param next_index - the index of the next node if success, else ~0
798 */
799 define add_node_next_reply
800 {
804 };
805 
806 /** \brief L2 interface ethernet flow point filtering enable/disable request
807  @param client_index - opaque cookie to identify the sender
808  @param context - sender context, to match reply w/ request
809  @param sw_if_index - interface to enable/disable filtering on
810  @param enable_disable - if non-zero enable filtering, else disable
811 */
812 define l2_interface_efp_filter
813 {
818 };
819 
820 /** \brief L2 interface ethernet flow point filtering response
821  @param context - sender context, to match reply w/ request
822  @param retval - return code for the request
823 */
824 define l2_interface_efp_filter_reply
825 {
828 };
829 
830 define create_subif
831 {
836 
837  /* These fields map directly onto the subif template */
841  u8 dot1ad; // 0 = dot1q, 1=dot1ad
848 };
849 
850 define create_subif_reply
851 {
855 };
856 
857 /** \brief show version
858  @param client_index - opaque cookie to identify the sender
859  @param context - sender context, to match reply w/ request
860 */
861 define show_version
862 {
865 };
866 
867 /** \brief show version response
868  @param context - sender context, to match reply w/ request
869  @param retval - return code for the request
870  @param program - name of the program (vpe)
871  @param version - version of the program
872  @param build_directory - root of the workspace where the program was built
873 */
874 define show_version_reply
875 {
878  u8 program[32];
879  u8 version[32];
880  u8 build_date[32];
881  u8 build_directory[256];
882 };
883 
884 /* Gross kludge, DGMS */
885 define interface_name_renumber
886 {
891 };
892 
893 define interface_name_renumber_reply
894 {
897 };
898 
899 /** \brief Register for ip4 arp resolution events
900  @param client_index - opaque cookie to identify the sender
901  @param context - sender context, to match reply w/ request
902  @param enable_disable - 1 => register for events, 0 => cancel registration
903  @param pid - sender's pid
904  @param address - the exact ip4 address of interest
905 */
906 define want_ip4_arp_events
907 {
913 };
914 
915 /** \brief Reply for interface events registration
916  @param context - returned sender context, to match reply w/ request
917  @param retval - return code
918 */
919 define want_ip4_arp_events_reply
920 {
923 };
924 
925 /** \brief Tell client about an ip4 arp resolution event
926  @param client_index - opaque cookie to identify the sender
927  @param context - sender context, to match reply w/ request
928  @param address - the exact ip4 address of interest
929  @param pid - client pid registered to receive notification
930  @param sw_if_index - interface which received ARP packet
931  @param new_mac - the new mac address
932  @param mac_ip - 0: resolution event, 1: mac/ip binding in bd
933 */
934 define ip4_arp_event
935 {
941  u8 new_mac[6];
943 };
944 
945 /** \brief Register for ip6 nd resolution events
946  @param client_index - opaque cookie to identify the sender
947  @param context - sender context, to match reply w/ request
948  @param enable_disable - 1 => register for events, 0 => cancel registration
949  @param pid - sender's pid
950  @param address - the exact ip6 address of interest
951 */
952 define want_ip6_nd_events
953 {
958  u8 address[16];
959 };
960 
961 /** \brief Reply for ip6 nd resolution events registration
962  @param context - returned sender context, to match reply w/ request
963  @param retval - return code
964 */
965 define want_ip6_nd_events_reply
966 {
969 };
970 
971 /** \brief Tell client about an ip6 nd resolution or mac/ip event
972  @param client_index - opaque cookie to identify the sender
973  @param context - sender context, to match reply w/ request
974  @param pid - client pid registered to receive notification
975  @param sw_if_index - interface which received ARP packet
976  @param address - the exact ip6 address of interest
977  @param new_mac - the new mac address
978  @param mac_ip - 0: resolution event, 1: mac/ip binding in bd
979 */
980 define ip6_nd_event
981 {
986  u8 address[16];
987  u8 new_mac[6];
989 };
990 
991 /** \brief Set/unset input ACL interface
992  @param client_index - opaque cookie to identify the sender
993  @param context - sender context, to match reply w/ request
994  @param sw_if_index - interface to set/unset input ACL
995  @param ip4_table_index - ip4 classify table index (~0 for skip)
996  @param ip6_table_index - ip6 classify table index (~0 for skip)
997  @param l2_table_index - l2 classify table index (~0 for skip)
998  @param is_add - Set input ACL if non-zero, else unset
999  Note: User is recommeneded to use just one valid table_index per call.
1000  (ip4_table_index, ip6_table_index, or l2_table_index)
1001 */
1002 define input_acl_set_interface
1003 {
1011 };
1012 
1013 /** \brief Set/unset input ACL interface response
1014  @param context - sender context, to match reply w/ request
1015  @param retval - return code for the request
1016 */
1017 define input_acl_set_interface_reply
1018 {
1021 };
1022 
1023 define get_node_graph
1024 {
1027 };
1028 
1029 /** \brief get_node_graph_reply
1030  @param context - returned sender context, to match reply w/ request
1031  @param retval - return code
1032  @param reply_in_shmem - result from vlib_node_serialize, in shared
1033  memory. Process with vlib_node_unserialize, remember to switch
1034  heaps and free the result.
1035 */
1036 
1037 define get_node_graph_reply
1038 {
1042 };
1043 
1044 /** \brief IOAM enable : Enable in-band OAM
1045  @param id - profile id
1046  @param seqno - To enable Seqno Processing
1047  @param analyse - Enabling analysis of iOAM at decap node
1048  @param pow_enable - Proof of Work enabled or not flag
1049  @param trace_enable - iOAM Trace enabled or not flag
1050 */
1051 define ioam_enable
1052 {
1061 };
1062 
1063 /** \brief iOAM Trace profile add / del response
1064  @param context - sender context, to match reply w/ request
1065  @param retval - return value for request
1066 */
1067 define ioam_enable_reply
1068 {
1071 };
1072 
1073 /** \brief iOAM disable
1074  @param client_index - opaque cookie to identify the sender
1075  @param context - sender context, to match reply w/ request
1076  @param index - MAP Domain index
1077 */
1078 define ioam_disable
1079 {
1083 };
1084 
1085 /** \brief iOAM disable response
1086  @param context - sender context, to match reply w/ request
1087  @param retval - return value for request
1088 */
1089 define ioam_disable_reply
1090 {
1093 };
1094 
1095 /** \brief Query relative index via node names
1096  @param client_index - opaque cookie to identify the sender
1097  @param context - sender context, to match reply w/ request
1098  @param node_name - name of node to find relative index from
1099  @param next_name - next node from node_name to find relative index of
1100 */
1101 define get_next_index
1102 {
1105  u8 node_name[64];
1106  u8 next_name[64];
1107 };
1108 
1109 /** \brief Reply for get next node index
1110  @param context - sender context which was passed in the request
1111  @param retval - return value
1112  @param next_index - index of the next_node
1113 */
1114 define get_next_index_reply
1115 {
1119 };
1120 
1121 /** \brief PacketGenerator create interface request
1122  @param client_index - opaque cookie to identify the sender
1123  @param context - sender context, to match reply w/ request
1124  @param interface_id - interface index
1125 */
1126 define pg_create_interface
1127 {
1131 };
1132 
1133 /** \brief PacketGenerator create interface response
1134  @param context - sender context, to match reply w/ request
1135  @param retval - return value for request
1136 */
1137 define pg_create_interface_reply
1138 {
1142 };
1143 
1144 /** \brief PacketGenerator capture packets on given interface request
1145  @param client_index - opaque cookie to identify the sender
1146  @param context - sender context, to match reply w/ request
1147  @param interface_id - pg interface index
1148  @param is_enabled - 1 if enabling streams, 0 if disabling
1149  @param count - number of packets to be captured
1150  @param pcap_file - pacp file name to store captured packets
1151 */
1153 {
1160  u8 pcap_file_name[pcap_name_length];
1161 };
1162 
1163 /** \brief PacketGenerator capture packets response
1164  @param context - sender context, to match reply w/ request
1165  @param retval - return value for request
1166 */
1167 define pg_capture_reply
1168 {
1171 };
1172 
1173 /** \brief Enable / disable packet generator request
1174  @param client_index - opaque cookie to identify the sender
1175  @param context - sender context, to match reply w/ request
1176  @param is_enabled - 1 if enabling streams, 0 if disabling
1177  @param stream - stream name to be enable/disabled, if not specified handle all streams
1178 */
1180 {
1185  u8 stream_name[stream_name_length];
1186 };
1187 
1188 /** \brief Reply for enable / disable packet generator
1189  @param context - returned sender context, to match reply w/ request
1190  @param retval - return code
1191 */
1192 define pg_enable_disable_reply
1193 {
1196 };
1197 
1198 /** \brief Configure IP source and L4 port-range check
1199  @param client_index - opaque cookie to identify the sender
1200  @param context - sender context, to match reply w/ request
1201  @param is_ip6 - 1 if source address type is IPv6
1202  @param is_add - 1 if add, 0 if delete
1203  @param mask_length - mask length for address entry
1204  @param address - array of address bytes
1205  @param number_of_ranges - length of low_port and high_port arrays (must match)
1206  @param low_ports[32] - up to 32 low end of port range entries (must have corresponding high_ports entry)
1207  @param high_ports[32] - up to 32 high end of port range entries (must have corresponding low_ports entry)
1208  @param vrf_id - fib table/vrf id to associate the source and port-range check with
1209  @note To specify a single port set low_port and high_port entry the same
1210 */
1211 define ip_source_and_port_range_check_add_del
1212 {
1218  u8 address[16];
1220  u16 low_ports[32];
1221  u16 high_ports[32];
1223 };
1224 
1225 /** \brief Configure IP source and L4 port-range check reply
1226  @param context - returned sender context, to match reply w/ request
1227  @param retval - return code
1228 */
1229 define ip_source_and_port_range_check_add_del_reply
1230 {
1233 };
1234 
1235 /** \brief Set interface source and L4 port-range request
1236  @param client_index - opaque cookie to identify the sender
1237  @param context - sender context, to match reply w/ request
1238  @param interface_id - interface index
1239  @param tcp_vrf_id - VRF associated with source and TCP port-range check
1240  @param udp_vrf_id - VRF associated with source and TCP port-range check
1241 */
1242 define ip_source_and_port_range_check_interface_add_del
1243 {
1252 };
1253 
1254 /** \brief Set interface source and L4 port-range response
1255  @param context - sender context, to match reply w/ request
1256  @param retval - return value for request
1257 */
1258 define ip_source_and_port_range_check_interface_add_del_reply
1259 {
1262 };
1263 
1264 /** \brief Delete sub interface request
1265  @param client_index - opaque cookie to identify the sender
1266  @param context - sender context, to match reply w/ request
1267  @param sw_if_index - sw index of the interface that was created by create_subif
1268 */
1269 define delete_subif {
1273 };
1274 
1275 /** \brief Delete sub interface response
1276  @param context - sender context, to match reply w/ request
1277  @param retval - return code for the request
1278 */
1279 define delete_subif_reply {
1282 };
1283 
1284 /** \brief Punt traffic to the host
1285  @param client_index - opaque cookie to identify the sender
1286  @param context - sender context, to match reply w/ request
1287  @param is_add - add punt if non-zero, else delete
1288  @param ipv - L3 protocol 4 - IPv4, 6 - IPv6, ~0 - All
1289  @param l4_protocol - L4 protocol to be punted, only UDP (0x11) is supported
1290  @param l4_port - TCP/UDP port to be punted
1291 */
1292 define punt {
1299 };
1300 
1301 /** \brief Reply to the punt request
1302  @param context - sender context which was passed in the request
1303  @param retval - return code of punt request
1304 */
1305 define punt_reply
1306 {
1309 };
1310 
1311 /** \brief Feature path enable/disable request
1312  @param client_index - opaque cookie to identify the sender
1313  @param context - sender context, to match reply w/ request
1314  @param sw_if_index - the interface
1315  @param enable - 1 = on, 0 = off
1316 */
1317 define feature_enable_disable {
1322  u8 arc_name[64];
1323  u8 feature_name[64];
1324 };
1325 
1326 /** \brief Reply to the eature path enable/disable request
1327  @param context - sender context which was passed in the request
1328  @param retval - return code for the request
1329 */
1330 define feature_enable_disable_reply
1331 {
1334 };
1335 
1336 /*
1337  * Local Variables:
1338  * eval: (c-set-style "gnu")
1339  * End:
1340  */
clib_error_t * pg_capture(pg_capture_args_t *a)
Definition: cli.c:81
u32 context
Definition: vpe.api:1294
u32 client_index
Definition: vpe.api:1293
int i32
Definition: types.h:81
unsigned long u64
Definition: types.h:89
u8 l4_protocol
Definition: vpe.api:1297
svmdb_client_t * c
unsigned int u32
Definition: types.h:88
void pg_enable_disable(u32 stream_index, int is_enable)
Definition: cli.c:58
u16 l4_port
Definition: vpe.api:1298
unsigned short u16
Definition: types.h:57
u64 reply_in_shmem
Definition: vpe.api:530
double f64
Definition: types.h:142
unsigned char u8
Definition: types.h:56