FD.io VPP  v16.09
Vector Packet Processing
vpe.api
Go to the documentation of this file.
1 /* Hey Emacs use -*- mode: C -*- */
2 /*
3  * Copyright (c) 2015 Cisco and/or its affiliates.
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at:
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 /** \file
18 
19  This file defines vpe control-plane API messages which are generally
20  called through a shared memory interface.
21 */
22 
23 
24 /** \brief Register for interface events
25  @param client_index - opaque cookie to identify the sender
26  @param context - sender context, to match reply w/ request
27  @param enable_disable - 1 => register for events, 0 => cancel registration
28  @param pid - sender's pid
29 */
30 define want_interface_events
31 {
36 };
37 
38 /** \brief Reply for interface events registration
39  @param context - returned sender context, to match reply w/ request
40  @param retval - return code
41 */
42 define want_interface_events_reply
43 {
46 };
47 
48 /** \brief Interface details structure (fix this)
49  @param sw_if_index - index of the interface
50  @param sup_sw_if_index - index of parent interface if any, else same as sw_if_index
51  @param l2_address_length - length of the interface's l2 address
52  @param pid - the interface's l2 address
53  @param interface_name - name of the interface
54  @param link_duplex - 1 if half duplex, 2 if full duplex
55  @param link_speed - 1 = 10M, 2 = 100M, 4 = 1G, 8 = 10G, 16 = 40G, 32 = 100G
56  @param link_MTU - max. transmittion unit
57  @param sub_if_id - A number 0-N to uniquely identify this subif on super if
58  @param sub_dot1ad - 0 = dot1q, 1=dot1ad
59  @param sub_number_of_tags - Number of tags (0 - 2)
60  @param sub_outer_vlan_id
61  @param sub_inner_vlan_id
62  @param sub_exact_match
63  @param sub_default
64  @param sub_outer_vlan_id_any
65  @param sub_inner_vlan_id_any
66  @param vtr_op - vlan tag rewrite operation
67  @param vtr_push_dot1q
68  @param vtr_tag1
69  @param vtr_tag2
70 */
71 define sw_interface_details
72 {
75 
76  /* index of sup interface (e.g. hw interface).
77  equal to sw_if_index for super hw interface. */
79 
80  /* Layer 2 address, if applicable */
82  u8 l2_address[8];
83 
84  /* Interface name */
85  u8 interface_name[64];
86 
87  /* 1 = up, 0 = down */
90 
91  /* 1 = half duplex, 2 = full duplex */
93 
94  /* 1 = 10M, 2 = 100M, 4 = 1G, 8 = 10G, 16 = 40G, 32 = 100G */
96 
97  /* MTU */
99 
100  /* Subinterface ID. A number 0-N to uniquely identify this subinterface under the super interface */
102 
103  /* 0 = dot1q, 1=dot1ad */
105 
106  /* Number of tags 0-2 */
114 
115  /* vlan tag rewrite state */
117  u32 vtr_push_dot1q; // ethertype of first pushed tag is dot1q/dot1ad
118  u32 vtr_tag1; // first pushed tag
119  u32 vtr_tag2; // second pushed tag
120 };
121 
122 /** \brief Set flags on the interface
123  @param client_index - opaque cookie to identify the sender
124  @param context - sender context, to match reply w/ request
125  @param sw_if_index - index of the interface to set flags on
126  @param admin_up_down - set the admin state, 1 = up, 0 = down
127  @param link_up_down - Oper state sent on change event, not used in config.
128  @param deleted - interface was deleted
129 */
130 define sw_interface_set_flags
131 {
135  /* 1 = up, 0 = down */
139 };
140 
141 /** \brief Reply to sw_interface_set_flags
142  @param context - sender context which was passed in the request
143  @param retval - return code of the set flags request
144 */
145 define sw_interface_set_flags_reply
146 {
149 };
150 
151 /* works */
152 define sw_interface_dump
153 {
157  u8 name_filter[49];
158 };
159 
160 /** \brief Set or delete one or all ip addresses on a specified interface
161  @param client_index - opaque cookie to identify the sender
162  @param context - sender context, to match reply w/ request
163  @param sw_if_index - index of the interface to add/del addresses
164  @param is_add - add address if non-zero, else delete
165  @param is_ipv6 - if non-zero the address is ipv6, else ipv4
166  @param del_all - if non-zero delete all addresses on the interface
167  @param address_length - address length in bytes, 4 for ip4, 16 for ip6
168  @param address - array of address bytes
169 */
170 define sw_interface_add_del_address
171 {
179  u8 address[16];
180 };
181 
182 /** \brief Reply for interface events registration
183  @param context - returned sender context, to match reply w/ request
184  @param retval - return code
185 */
186 define sw_interface_add_del_address_reply
187 {
190 };
191 
192 /** \brief Associate the specified interface with a fib table
193  @param client_index - opaque cookie to identify the sender
194  @param context - sender context, to match reply w/ request
195  @param sw_if_index - index of the interface
196  @param is_ipv6 - if non-zero ipv6, else ipv4
197  @param vrf_id - fib table/vrd id to associate the interface with
198 */
199 define sw_interface_set_table
200 {
206 };
207 
208 /** \brief Reply for interface events registration
209  @param context - returned sender context, to match reply w/ request
210  @param retval - return code
211 */
212 define sw_interface_set_table_reply
213 {
216 };
217 
218 /** \brief Initialize a new tap interface with the given paramters
219  @param client_index - opaque cookie to identify the sender
220  @param context - sender context, to match reply w/ request
221  @param use_random_mac - let the system generate a unique mac address
222  @param tap_name - name to associate with the new interface
223  @param mac_address - mac addr to assign to the interface if use_radom not set
224 */
225 define tap_connect
226 {
230  u8 tap_name[64];
231  u8 mac_address[6];
234 };
235 
236 /** \brief Reply for tap connect request
237  @param context - returned sender context, to match reply w/ request
238  @param retval - return code
239  @param sw_if_index - software index allocated for the new tap interface
240 */
241 define tap_connect_reply
242 {
246 };
247 
248 /** \brief Modify a tap interface with the given paramters
249  @param client_index - opaque cookie to identify the sender
250  @param context - sender context, to match reply w/ request
251  @param sw_if_index - interface index of existing tap interface
252  @param use_random_mac - let the system generate a unique mac address
253  @param tap_name - name to associate with the new interface
254  @param mac_address - mac addr to assign to the interface if use_radom not set
255 */
256 define tap_modify
257 {
262  u8 tap_name[64];
263  u8 mac_address[6];
266 };
267 
268 /** \brief Reply for tap modify request
269  @param context - returned sender context, to match reply w/ request
270  @param retval - return code
271  @param sw_if_index - software index if the modified tap interface
272 */
273 define tap_modify_reply
274 {
278 };
279 
280 /** \brief Delete tap interface
281  @param client_index - opaque cookie to identify the sender
282  @param context - sender context, to match reply w/ request
283  @param sw_if_index - interface index of existing tap interface
284 */
285 define tap_delete
286 {
290 };
291 
292 /** \brief Reply for tap delete request
293  @param context - returned sender context, to match reply w/ request
294  @param retval - return code
295 */
296 define tap_delete_reply
297 {
300 };
301 
302 /** \brief Dump tap interfaces request */
303 define sw_interface_tap_dump
304 {
307 };
308 
309 /** \brief Reply for tap dump request
310  @param sw_if_index - software index of tap interface
311  @param dev_name - Linux tap device name
312 */
313 define sw_interface_tap_details
314 {
317  u8 dev_name[64];
318 };
319 
320 /** \brief Create a new subinterface with the given vlan id
321  @param client_index - opaque cookie to identify the sender
322  @param context - sender context, to match reply w/ request
323  @param sw_if_index - software index of the new vlan's parent interface
324  @param vlan_id - vlan tag of the new interface
325 */
326 define create_vlan_subif
327 {
332 };
333 
334 /** \brief Reply for the vlan subinterface create request
335  @param context - returned sender context, to match reply w/ request
336  @param retval - return code
337  @param sw_if_index - software index allocated for the new subinterface
338 */
339 define create_vlan_subif_reply
340 {
344 };
345 
346 /** \brief Add / del route request
347  @param client_index - opaque cookie to identify the sender
348  @param context - sender context, to match reply w/ request
349  @param sw_if_index - software index of the new vlan's parent interface
350  @param vrf_id - fib table /vrf associated with the route
351  @param lookup_in_vrf -
352  @param resolve_attempts -
353  @param classify_table_index -
354  @param create_vrf_if_needed -
355  @param resolve_if_needed -
356  @param is_add - 1 if adding the route, 0 if deleting
357  @param is_drop -
358  @param is_ipv6 - 0 if an ip4 route, else ip6
359  @param is_local -
360  @param is_classify -
361  @param is_multipath - Set to 1 if this is a multipath route, else 0
362  @param not_last - Is last or not last msg in group of multiple add/del msgs
363  @param next_hop_weight -
364  @param dst_address_length -
365  @param dst_address[16] -
366  @param next_hop_address[16] -
367 */
368 define ip_add_del_route
369 {
384  /* Is last/not-last message in group of multiple add/del messages. */
389  u8 dst_address[16];
390  u8 next_hop_address[16];
391 };
392 
393 /** \brief Reply for add / del route request
394  @param context - returned sender context, to match reply w/ request
395  @param retval - return code
396 */
397 define ip_add_del_route_reply
398 {
401 };
402 
403 /* works */
404 /** \brief Add / del gre tunnel request
405  @param client_index - opaque cookie to identify the sender
406  @param context - sender context, to match reply w/ request
407  @param sw_if_index - software index of the new vlan's parent interface
408  @param inner_vrf_id -
409  @param outer_vrf_id -
410  @param is_add - 1 if adding the tunnel, 0 if deleting
411  @param src_address[4] - tunnel source address
412  @param dst_address[4] - tunnel destination address
413  @param intf_address -
414  @param intf_address_length -
415 */
416 define mpls_gre_add_del_tunnel
417 {
424  u8 src_address[4];
425  u8 dst_address[4];
426  u8 intfc_address[4];
428 };
429 
430 /** \brief Reply for add / del tunnel request
431  @param context - returned sender context, to match reply w/ request
432  @param retval - return code
433 */
434 define mpls_gre_add_del_tunnel_reply
435 {
439 };
440 
441 /** \brief Add / del MPLS encapsulation request
442  @param client_index - opaque cookie to identify the sender
443  @param context - sender context, to match reply w/ request
444  @param vrf_id - vrf id
445  @param dst_address[4] -
446  @param is_add - 1 if adding the encap, 0 if deleting
447  @param nlabels - number of labels
448  @param labels - array of labels
449 */
450 define mpls_add_del_encap
451 {
455  u8 dst_address[4];
456  /* 1 = add, 0 = delete */
459  u32 labels[0];
460 };
461 
462 /** \brief Reply for add / del encapsulation request
463  @param context - returned sender context, to match reply w/ request
464  @param retval - return code
465 */
466 define mpls_add_del_encap_reply
467 {
470 };
471 
472 /** \brief Add / del MPLS decapsulation request
473  @param client_index - opaque cookie to identify the sender
474  @param context - sender context, to match reply w/ request
475  @param rx_vrf_id - receive vrf
476  @param tx_vrf_id - transmit vrf
477  @param label -
478  @param next_index -
479  @param s_bit -
480  @param is_add - 1 if adding the encap, 0 if deleting
481 */
482 define mpls_add_del_decap
483 {
492 };
493 
494 /** \brief Reply for MPLS decap add / del request
495  @param context - returned sender context, to match reply w/ request
496  @param retval - return code
497 */
498 define mpls_add_del_decap_reply
499 {
502 };
503 
504 /** \brief Proxy ARP add / del request
505  @param client_index - opaque cookie to identify the sender
506  @param context - sender context, to match reply w/ request
507  @param vrf_id - VRF / Fib table ID
508  @param is_add - 1 if adding the Proxy ARP range, 0 if deleting
509  @param low_address[4] - Low address of the Proxy ARP range
510  @param hi_address[4] - High address of the Proxy ARP range
511 */
512 define proxy_arp_add_del
513 {
518  u8 low_address[4];
519  u8 hi_address[4];
520 };
521 
522 /** \brief Reply for proxy arp add / del request
523  @param context - returned sender context, to match reply w/ request
524  @param retval - return code
525 */
526 define proxy_arp_add_del_reply
527 {
530 };
531 
532 /** \brief Proxy ARP add / del request
533  @param client_index - opaque cookie to identify the sender
534  @param context - sender context, to match reply w/ request
535  @param sw_if_index - Which interface to enable / disable Proxy Arp on
536  @param enable_disable - 1 to enable Proxy ARP on interface, 0 to disable
537 */
538 define proxy_arp_intfc_enable_disable
539 {
543  /* 1 = on, 0 = off */
545 };
546 
547 /** \brief Reply for Proxy ARP interface enable / disable request
548  @param context - returned sender context, to match reply w/ request
549  @param retval - return code
550 */
551 define proxy_arp_intfc_enable_disable_reply
552 {
555 };
556 
557 /** \brief IP neighbor add / del request
558  @param client_index - opaque cookie to identify the sender
559  @param context - sender context, to match reply w/ request
560  @param vrf_id - vrf_id, only for IP4
561  @param sw_if_index - interface used to reach neighbor
562  @param is_add - 1 to add neighbor, 0 to delete
563  @param is_ipv6 - 1 for IPv6 neighbor, 0 for IPv4
564  @param is_static -
565  @param mac_address - l2 address of the neighbor
566  @param dst_address - ip4 or ip6 address of the neighbor
567 */
568 define ip_neighbor_add_del
569 {
572  u32 vrf_id; /* only makes sense for ip4 */
574  /* 1 = add, 0 = delete */
578  u8 mac_address[6];
579  u8 dst_address[16];
580 };
581 
582 /** \brief Reply for IP Neighbor add / delete request
583  @param context - returned sender context, to match reply w/ request
584  @param retval - return code
585 */
586 define ip_neighbor_add_del_reply
587 {
590 };
591 
592 /** \brief Reset VRF (remove all routes etc) request
593  @param client_index - opaque cookie to identify the sender
594  @param context - sender context, to match reply w/ request
595  @param is_ipv6 - 1 for IPv6 neighbor, 0 for IPv4
596  @param vrf_id - ID of th FIB table / VRF to reset
597 */
598 define reset_vrf
599 {
604 };
605 
606 /** \brief Reply for Reset VRF request
607  @param context - returned sender context, to match reply w/ request
608  @param retval - return code
609 */
610 define reset_vrf_reply
611 {
614 };
615 
616 /** \brief Is Address Reachable request - DISABLED
617  @param client_index - opaque cookie to identify the sender
618  @param context - sender context, to match reply w/ request
619  @param next_hop_sw_if_index - index of interface used to get to next hop
620  @param is_ipv6 - 1 for IPv6, 0 for IPv4
621  @param is_error - address not found or does not match intf
622  @param address[] - Address in question
623 */
624 define is_address_reachable
625 {
626  u32 client_index; /* (api_main_t *) am->my_client_index */
629  u8 is_known; /* on reply, this is the answer */
631  u8 is_error; /* address not found or does not match intf */
632  u8 address[16];
633 };
634 
635 /** \brief Want Stats, register for stats updates
636  @param client_index - opaque cookie to identify the sender
637  @param context - sender context, to match reply w/ request
638  @param enable_disable - 1 = enable stats, 0 = disable
639  @param pid - pid of process requesting stats updates
640 */
641 define want_stats
642 {
647 };
648 
649 /** \brief Reply for Want Stats request
650  @param context - returned sender context, to match reply w/ request
651  @param retval - return code
652 */
653 define want_stats_reply
654 {
657 };
658 
659 /** \brief Want stats counters structure
660  @param vnet_counter_type- such as ip4, ip6, punts, etc
661  @param is_combined - rx & tx total (all types) counts
662  @param first_sw_if_index - first sw index in block of index, counts
663  @param count - number of interfaces this stats block includes counters for
664  @param data - contiguous block of vlib_counter_t structures
665 */
666 define vnet_interface_counters
667 {
668  /* enums - plural - in vnet/interface.h */
673  u8 data[count];
674 };
675 
676 typeonly manual_print manual_endian define ip4_fib_counter
677 {
682 };
683 
684 manual_print manual_endian define vnet_ip4_fib_counters
685 {
689 };
690 
691 typeonly manual_print manual_endian define ip6_fib_counter
692 {
693  u64 address[2];
697 };
698 
699 manual_print manual_endian define vnet_ip6_fib_counters
700 {
704 };
705 
706 /** \brief Request for a single block of summary stats
707  @param client_index - opaque cookie to identify the sender
708  @param context - sender context, to match reply w/ request
709 */
710 define vnet_get_summary_stats
711 {
714 };
715 
716 /** \brief Reply for vnet_get_summary_stats request
717  @param context - sender context, to match reply w/ request
718  @param retval - return code for request
719  @param total_pkts -
720  @param total_bytes -
721  @param vector_rate -
722 */
723 define vnet_summary_stats_reply
724 {
727  u64 total_pkts[2];
728  u64 total_bytes[2];
730 };
731 
732 /** \brief OAM event structure
733  @param dst_address[] -
734  @param state
735 */
736 define oam_event
737 {
738  u8 dst_address[4];
740 };
741 
742 /** \brief Want OAM events request
743  @param client_index - opaque cookie to identify the sender
744  @param context - sender context, to match reply w/ request
745  @param enable_disable- enable if non-zero, else disable
746  @param pid - pid of the requesting process
747 */
748 define want_oam_events
749 {
754 };
755 
756 /** \brief Want OAM events response
757  @param context - sender context, to match reply w/ request
758  @param retval - return code for the want oam stats request
759 */
760 define want_oam_events_reply
761 {
764 };
765 
766 /** \brief OAM add / del target request
767  @param client_index - opaque cookie to identify the sender
768  @param context - sender context, to match reply w/ request
769  @param vrf_id - vrf_id of the target
770  @param src_address[] - source address to use for the updates
771  @param dst_address[] - destination address of the target
772  @param is_add - add target if non-zero, else delete
773 */
774 define oam_add_del
775 {
779  u8 src_address[4];
780  u8 dst_address[4];
782 };
783 
784 /** \brief OAM add / del target response
785  @param context - sender context, to match reply w/ request
786  @param retval - return code of the request
787 */
788 define oam_add_del_reply
789 {
792 };
793 
794 /** \brief Reset fib table request
795  @param client_index - opaque cookie to identify the sender
796  @param context - sender context, to match reply w/ request
797  @param vrf_id - vrf/table id of the fib table to reset
798  @param is_ipv6 - an ipv6 fib to reset if non-zero, else ipv4
799 */
800 define reset_fib
801 {
806 };
807 
808 /** \brief Reset fib response
809  @param context - sender context, to match reply w/ request
810  @param retval - return code for the reset bfib request
811 */
812 define reset_fib_reply
813 {
816 };
817 
818 /** \brief DHCP Proxy config add / del request
819  @param client_index - opaque cookie to identify the sender
820  @param context - sender context, to match reply w/ request
821  @param vrf_id - vrf id
822  @param if_ipv6 - ipv6 if non-zero, else ipv4
823  @param is_add - add the config if non-zero, else delete
824  @param insert_circuit_id - option82 suboption 1 fib number
825  @param dhcp_server[] - server address
826  @param dhcp_src_address[] - <fix this, need details>
827 */
828 define dhcp_proxy_config
829 {
836  u8 dhcp_server[16];
837  u8 dhcp_src_address[16];
838 };
839 
840 /** \brief DHCP Proxy config response
841  @param context - sender context, to match reply w/ request
842  @param retval - return code for the request
843 */
844 define dhcp_proxy_config_reply
845 {
848 };
849 
850 /** \brief DHCP Proxy set / unset vss request
851  @param client_index - opaque cookie to identify the sender
852  @param context - sender context, to match reply w/ request
853  @param tbl_id - table id
854  @param oui - first part of vpn id
855  @param fib_id - second part of vpn id
856  @param is_ipv6 - ip6 if non-zero, else ip4
857  @param is_add - set vss if non-zero, else delete
858 */
859 define dhcp_proxy_set_vss
860 {
868 };
869 
870 /** \brief DHCP proxy set / unset vss response
871  @param context - sender context, to match reply w/ request
872  @param retval - return code for the request
873 */
874 define dhcp_proxy_set_vss_reply
875 {
878 };
879 
880 /** \brief Set the ip flow hash config for a fib request
881  @param client_index - opaque cookie to identify the sender
882  @param context - sender context, to match reply w/ request
883  @param vrf_id - vrf/fib id
884  @param is_ipv6 - if non-zero the fib is ip6, else ip4
885  @param src - if non-zero include src in flow hash
886  @param dst - if non-zero include dst in flow hash
887  @param sport - if non-zero include sport in flow hash
888  @param dport - if non-zero include dport in flow hash
889  @param proto -if non-zero include proto in flow hash
890  @param reverse - if non-zero include reverse in flow hash
891 */
892 define set_ip_flow_hash
893 {
904 };
905 
906 /** \brief Set the ip flow hash config for a fib response
907  @param context - sender context, to match reply w/ request
908  @param retval - return code for the request
909 */
910 define set_ip_flow_hash_reply
911 {
914 };
915 
916 /** \brief IPv6 router advertisement config request
917  @param client_index - opaque cookie to identify the sender
918  @param context - sender context, to match reply w/ request
919  @param suppress -
920  @param managed -
921  @param other -
922  @param ll_option -
923  @param send_unicast -
924  @param cease -
925  @param is_no -
926  @param default_router -
927  @param max_interval -
928  @param min_interval -
929  @param lifetime -
930  @param initial_count -
931  @param initial_interval -
932 */
933 define sw_interface_ip6nd_ra_config
934 {
951 };
952 
953 /** \brief IPv6 router advertisement config response
954  @param context - sender context, to match reply w/ request
955  @param retval - return code for the request
956 */
957 define sw_interface_ip6nd_ra_config_reply
958 {
961 };
962 
963 /** \brief IPv6 router advertisement prefix config request
964  @param client_index - opaque cookie to identify the sender
965  @param context - sender context, to match reply w/ request
966  @param sw_if_index -
967  @param address[] -
968  @param address_length -
969  @param use_default -
970  @param no_advertise -
971  @param off_link -
972  @param no_autoconfig -
973  @param no_onlink -
974  @param is_no -
975  @param val_lifetime -
976  @param pref_lifetime -
977 */
978 define sw_interface_ip6nd_ra_prefix
979 {
983  u8 address[16];
993 };
994 
995 /** \brief IPv6 router advertisement prefix config response
996  @param context - sender context, to match reply w/ request
997  @param retval - return code for the request
998 */
999 define sw_interface_ip6nd_ra_prefix_reply
1000 {
1003 };
1004 
1005 /** \brief IPv6 interface enable / disable request
1006  @param client_index - opaque cookie to identify the sender
1007  @param context - sender context, to match reply w/ request
1008  @param sw_if_index - interface used to reach neighbor
1009  @param enable - if non-zero enable ip6 on interface, else disable
1010 */
1011 define sw_interface_ip6_enable_disable
1012 {
1016  u8 enable; /* set to true if enable */
1017 };
1018 
1019 /** \brief IPv6 interface enable / disable response
1020  @param context - sender context, to match reply w/ request
1021  @param retval - return code for the request
1022 */
1023 define sw_interface_ip6_enable_disable_reply
1024 {
1027 };
1028 
1029 /** \brief IPv6 set link local address on interface request
1030  @param client_index - opaque cookie to identify the sender
1031  @param context - sender context, to match reply w/ request
1032  @param sw_if_index - interface to set link local on
1033  @param address[] - the new link local address
1034  @param address_length - link local address length
1035 */
1036 define sw_interface_ip6_set_link_local_address
1037 {
1041  u8 address[16];
1043 };
1044 
1045 /** \brief IPv6 set link local address on interface response
1046  @param context - sender context, to match reply w/ request
1047  @param retval - error code for the request
1048 */
1049 define sw_interface_ip6_set_link_local_address_reply
1050 {
1053 };
1054 
1055 /** \brief Set unnumbered interface add / del request
1056  @param client_index - opaque cookie to identify the sender
1057  @param context - sender context, to match reply w/ request
1058  @param sw_if_index - interface with an IP address
1059  @param unnumbered_sw_if_index - interface which will use the address
1060  @param is_add - if non-zero set the association, else unset it
1061 */
1062 define sw_interface_set_unnumbered
1063 {
1066  u32 sw_if_index; /* use this intfc address */
1067  u32 unnumbered_sw_if_index; /* on this interface */
1069 };
1070 
1071 /** \brief Set unnumbered interface add / del response
1072  @param context - sender context, to match reply w/ request
1073  @param retval - return code for the request
1074 */
1075 define sw_interface_set_unnumbered_reply
1076 {
1079 };
1080 
1081 /** \brief Create loopback interface request
1082  @param client_index - opaque cookie to identify the sender
1083  @param context - sender context, to match reply w/ request
1084  @param mac_address - mac addr to assign to the interface if none-zero
1085 */
1086 define create_loopback
1087 {
1090  u8 mac_address[6];
1091 };
1092 
1093 /** \brief Create loopback interface response
1094  @param context - sender context, to match reply w/ request
1095  @param sw_if_index - sw index of the interface that was created
1096  @param retval - return code for the request
1097 */
1098 define create_loopback_reply
1099 {
1103 };
1104 
1105 /** \brief Delete loopback interface request
1106  @param client_index - opaque cookie to identify the sender
1107  @param context - sender context, to match reply w/ request
1108  @param sw_if_index - sw index of the interface that was created
1109 */
1110 define delete_loopback
1111 {
1115 };
1116 
1117 /** \brief Delete loopback interface response
1118  @param context - sender context, to match reply w/ request
1119  @param retval - return code for the request
1120 */
1121 define delete_loopback_reply
1122 {
1125 };
1126 
1127 /** \brief Control ping from client to api server request
1128  @param client_index - opaque cookie to identify the sender
1129  @param context - sender context, to match reply w/ request
1130 */
1131 define control_ping
1132 {
1135 };
1136 
1137 /** \brief Control ping from the client to the server response
1138  @param client_index - opaque cookie to identify the sender
1139  @param context - sender context, to match reply w/ request
1140  @param retval - return code for the request
1141  @param vpe_pid - the pid of the vpe, returned by the server
1142 */
1143 define control_ping_reply
1144 {
1149 };
1150 
1151 /** \brief Control ping from client to api server request, no print json output
1152  @param client_index - opaque cookie to identify the sender
1153  @param context - sender context, to match reply w/ request
1154 */
1155 define noprint_control_ping
1156 {
1159 };
1160 
1161 /** \brief Control ping from the client to the server response
1162  @param client_index - opaque cookie to identify the sender
1163  @param context - sender context, to match reply w/ request
1164  @param retval - return code for the request
1165  @param vpe_pid - the pid of the vpe, returned by the server
1166 */
1167 define noprint_control_ping_reply
1168 {
1173 };
1174 
1175 /** \brief Process a vpe parser cli string request
1176  @param client_index - opaque cookie to identify the sender
1177  @param context - sender context, to match reply w/ request
1178  @param cmd_in_shmem - pointer to cli command string
1179 */
1180 define cli_request
1181 {
1185 };
1186 
1187 /** \brief vpe parser cli string response
1188  @param context - sender context, to match reply w/ request
1189  @param retval - return code for request
1190  @param reply_in_shmem - Reply string from cli processing if any
1191 */
1192 define cli_reply
1193 {
1197 };
1198 
1199 /** \brief Set max allowed ARP or ip6 neighbor entries request
1200  @param client_index - opaque cookie to identify the sender
1201  @param context - sender context, to match reply w/ request
1202  @param is_ipv6 - neighbor limit if non-zero, else ARP limit
1203  @param arp_neighbor_limit - the new limit, defaults are ~ 50k
1204 */
1205 define set_arp_neighbor_limit
1206 {
1211 };
1212 
1213 /** \brief Set max allowed ARP or ip6 neighbor entries response
1214  @param context - sender context, to match reply w/ request
1215  @param retval - return code for request
1216 */
1217 define set_arp_neighbor_limit_reply
1218 {
1221 };
1222 
1223 /** \brief L2 interface patch add / del request
1224  @param client_index - opaque cookie to identify the sender
1225  @param context - sender context, to match reply w/ request
1226  @param rx_sw_if_index - receive side interface
1227  @param tx_sw_if_index - transmit side interface
1228  @param is_add - if non-zero set up the interface patch, else remove it
1229 */
1230 define l2_patch_add_del
1231 {
1237 };
1238 
1239 /** \brief L2 interface patch add / del response
1240  @param context - sender context, to match reply w/ request
1241  @param retval - return code for the request
1242 */
1243 define l2_patch_add_del_reply
1244 {
1247 };
1248 
1249 /** \brief IPv6 segment routing tunnel add / del request
1250  @param client_index - opaque cookie to identify the sender
1251  @param context - sender context, to match reply w/ request
1252  @param is_add - add the tunnel if non-zero, else delete it
1253  @param name[] - tunnel name (len. 64)
1254  @param src_address[] -
1255  @param dst_address[] -
1256  @param dst_mask_width -
1257  @param inner_vrf_id -
1258  @param outer_vrf_id -
1259  @param flags_net_byte_order -
1260  @param n_segments -
1261  @param n_tags -
1262  @param segs_and_tags[] -
1263  @param policy_name[] - name of policy to associate this tunnel to (len. 64)
1264 */
1265 define sr_tunnel_add_del
1266 {
1270  u8 name[64];
1271  u8 src_address[16];
1272  u8 dst_address[16];
1279  u8 segs_and_tags[0];
1280  u8 policy_name[64];
1281 };
1282 
1283 /** \brief IPv6 segment routing tunnel add / del response
1284  @param context - sender context, to match reply w/ request
1285  @param retval - return value for request
1286 */
1287 define sr_tunnel_add_del_reply
1288 {
1291 };
1292 
1293 /** \brief IPv6 segment routing policy add / del request
1294  @param client_index - opaque cookie to identify the sender
1295  @param context - sender context, to match reply w/ request
1296  @param is_add - add the tunnel if non-zero, else delete it
1297  @param name[] - policy name (len. 64)
1298  @param tunnel_names[] -
1299 */
1300 define sr_policy_add_del
1301 {
1305  u8 name[64];
1306  u8 tunnel_names[0];
1307 };
1308 
1309 /** \brief IPv6 segment routing policy add / del response
1310  @param context - sender context, to match reply w/ request
1311  @param retval - return value for request
1312 */
1313 define sr_policy_add_del_reply
1314 {
1317 };
1318 
1319 /** \brief IPv6 segment routing multicast map to policy add / del request
1320  @param client_index - opaque cookie to identify the sender
1321  @param context - sender context, to match reply w/ request
1322  @param is_add - add the tunnel if non-zero, else delete it
1323  @param multicast_address[] - IP6 multicast address
1324  @param policy_name[] = policy name (len.64)
1325 */
1326 define sr_multicast_map_add_del
1327 {
1331  u8 multicast_address[16];
1332  u8 policy_name[64];
1333 };
1334 
1335 /** \brief IPv6 segment routing multicast map to policy add / del response
1336  @param context - sender context, to match reply w/ request
1337  @param retval - return value for request
1338 */
1339 define sr_multicast_map_add_del_reply
1340 {
1343 };
1344 
1345 /** \brief Interface set vpath request
1346  @param client_index - opaque cookie to identify the sender
1347  @param context - sender context, to match reply w/ request
1348  @param sw_if_index - interface used to reach neighbor
1349  @param enable - if non-zero enable, else disable
1350 */
1351 define sw_interface_set_vpath
1352 {
1357 };
1358 
1359 /** \brief Interface set vpath response
1360  @param context - sender context, to match reply w/ request
1361  @param retval - return code for the request
1362 */
1363 define sw_interface_set_vpath_reply
1364 {
1367 };
1368 
1369 /** \brief MPLS Ethernet add / del tunnel request
1370  @param client_index - opaque cookie to identify the sender
1371  @param context - sender context, to match reply w/ request
1372  @param vrf_id - vrf_id, only for IP4
1373  @param sw_if_index - interface used to reach neighbor
1374  @param is_add - add if set, tunnel delete if 0
1375  @param dst_mac_address -
1376  @param adj_address -
1377  @param adj_address_length -
1378 */
1379 define mpls_ethernet_add_del_tunnel
1380 {
1387  u8 dst_mac_address[6];
1388  u8 adj_address[4];
1390 };
1391 
1392 /** \brief Reply for MPLS Ethernet add / delete tunnel request
1393  @param context - sender context, to match reply w/ request
1394  @param retval - return code for the request
1395 */
1396 define mpls_ethernet_add_del_tunnel_reply
1397 {
1401 };
1402 /** \brief MPLS Ethernet add/ del tunnel 2
1403  @param client_index - opaque cookie to identify the sender
1404  @param context - sender context, to match reply w/ request
1405  @param inner_vrf_id -
1406  @param outer_vrf_id -
1407  @param resolve_attempts -
1408  @param resolve_opaque -
1409  @param resolve_if_needed -
1410  @param is_add -
1411  @param adj_address -
1412  @param adj_address_length -
1413  @param next_hop_ip4_address_in_outer_vrf -
1414 */
1415 define mpls_ethernet_add_del_tunnel_2
1416 {
1422  u32 resolve_opaque; /* no need to set this */
1426  u8 adj_address[4];
1428  u8 next_hop_ip4_address_in_outer_vrf[4];
1429 };
1430 
1431 /** \brief MPLS Ethernet add/ del tunnel 2
1432  @param context - sender context, to match reply w/ request
1433  @param retval - return code for add /del request
1434 */
1435 define mpls_ethernet_add_del_tunnel_2_reply
1436 {
1439 };
1440 
1441 /** \brief Set L2 XConnect between two interfaces request
1442  @param client_index - opaque cookie to identify the sender
1443  @param context - sender context, to match reply w/ request
1444  @param rx_sw_if_index - Receive interface index
1445  @param tx_sw_if_index - Transmit interface index
1446  @param enable - enable xconnect if not 0, else set to L3 mode
1447 */
1448 define sw_interface_set_l2_xconnect
1449 {
1455 };
1456 
1457 /** \brief Set L2 XConnect response
1458  @param context - sender context, to match reply w/ request
1459  @param retval - L2 XConnect request return code
1460 */
1461 define sw_interface_set_l2_xconnect_reply
1462 {
1465 };
1466 
1467 /** \brief Interface bridge mode request
1468  @param client_index - opaque cookie to identify the sender
1469  @param context - sender context, to match reply w/ request
1470  @param rx_sw_if_index - the interface
1471  @param bd_id - bridge domain id
1472  @param bvi - Setup interface as a bvi, bridge mode only
1473  @param shg - Shared horizon group, for bridge mode only
1474  @param enable - Enable beige mode if not 0, else set to L3 mode
1475 */
1476 define sw_interface_set_l2_bridge
1477 {
1485 };
1486 
1487 /** \brief Interface bridge mode response
1488  @param context - sender context, to match reply w/ request
1489  @param retval - Bridge mode request return code
1490 */
1491 define sw_interface_set_l2_bridge_reply
1492 {
1495 };
1496 
1497 /** \brief L2 FIB add entry request
1498  @param client_index - opaque cookie to identify the sender
1499  @param context - sender context, to match reply w/ request
1500  @param mac - the entry's mac address
1501  @param bd_id - the entry's bridge domain id
1502  @param sw_if_index - the interface
1503  @param is_add - If non zero add the entry, else delete it
1504  @param static_mac -
1505  @param filter_mac -
1506 */
1507 define l2fib_add_del
1508 {
1518 };
1519 
1520 /** \brief L2 FIB add entry response
1521  @param context - sender context, to match reply w/ request
1522  @param retval - return code for the add l2fib entry request
1523 */
1524 define l2fib_add_del_reply
1525 {
1528 };
1529 
1530 /** \brief Set L2 flags request !!! TODO - need more info, feature bits in l2_input.h
1531  @param client_index - opaque cookie to identify the sender
1532  @param context - sender context, to match reply w/ request
1533  @param sw_if_index - interface
1534  @param is_set - if non-zero, set the bits, else clear them
1535  @param feature_bitmap - non-zero bits to set or clear
1536 */
1537 define l2_flags
1538 {
1544 };
1545 
1546 /** \brief Set L2 bits response
1547  @param context - sender context, to match reply w/ request
1548  @param retval - return code for the set l2 bits request
1549 */
1550 define l2_flags_reply
1551 {
1555 };
1556 
1557 /** \brief Set bridge flags (such as L2_LEARN, L2_FWD, L2_FLOOD,
1558  L2_UU_FLOOD, or L2_ARP_TERM) request
1559  @param client_index - opaque cookie to identify the sender
1560  @param context - sender context, to match reply w/ request
1561  @param bd_id - the bridge domain to set the flags for
1562  @param is_set - if non-zero, set the flags, else clear them
1563  @param feature_bitmap - bits that are non-zero to set or clear
1564 */
1565 define bridge_flags
1566 {
1572 };
1573 
1574 /** \brief Set bridge flags response
1575  @param context - sender context, to match reply w/ request
1576  @param retval - return code for the set bridge flags request
1577  @param resulting_feature_bitmap - the feature bitmap value after the request is implemented
1578 */
1579 define bridge_flags_reply
1580 {
1584 };
1585 
1586 /** \brief Set bridge domain ip to mac entry request
1587  @param client_index - opaque cookie to identify the sender
1588  @param context - sender context, to match reply w/ request
1589  @param bd_id - the bridge domain to set the flags for
1590  @param is_add - if non-zero, add the entry, else clear it
1591  @param is_ipv6 - if non-zero, ipv6 address, else ipv4 address
1592  @param mac_address - MAC address
1593  @param
1594 */
1595 define bd_ip_mac_add_del
1596 {
1602  u8 ip_address[16];
1603  u8 mac_address[6];
1604 };
1605 
1606 /** \brief Set bridge domain ip to mac entry response
1607  @param context - sender context, to match reply w/ request
1608  @param retval - return code for the set bridge flags request
1609 */
1610 define bd_ip_mac_add_del_reply
1611 {
1614 };
1615 
1616 /** \brief Add/Delete classification table request
1617  @param client_index - opaque cookie to identify the sender
1618  @param context - sender context, to match reply w/ request
1619  @param is_add- if non-zero add the table, else delete it
1620  @param table_index - if add, reuturns index of the created table, else specifies the table to delete
1621  @param nbuckets - number of buckets when adding a table
1622  @param memory_size - memory size when adding a table
1623  @param match_n_vectors - number of match vectors
1624  @param next_table_index - index of next table
1625  @param miss_next_index - index of miss table
1626  @param mask[] - match mask
1627 */
1628 define classify_add_del_table
1629 {
1640  u8 mask[0];
1641 };
1642 
1643 /** \brief Add/Delete classification table response
1644  @param context - sender context, to match reply w/ request
1645  @param retval - return code for the table add/del requst
1646  @param new_table_index - for add, returned index of the new table
1647  @param skip_n_vectors - for add, returned value of skip_n_vectors in table
1648  @param match_n_vectors -for add, returned value of match_n_vectors in table
1649 */
1650 define classify_add_del_table_reply
1651 {
1657 };
1658 
1659 /** \brief Classify add / del session request
1660  @param client_index - opaque cookie to identify the sender
1661  @param context - sender context, to match reply w/ request
1662  @param is_add - add session if non-zero, else delete
1663  @param table_index - index of the table to add/del the session, required
1664  @param hit_next_index - for add, hit_next_index of new session, required
1665  @param opaque_index - for add, opaque_index of new session
1666  @param advance -for add, advance value for session
1667  @param match[] - for add, match value for session, required
1668 */
1669 define classify_add_del_session
1670 {
1678  u8 match[0];
1679 };
1680 
1681 /** \brief Classify add / del session response
1682  @param context - sender context, to match reply w/ request
1683  @param retval - return code for the add/del session request
1684 */
1685 define classify_add_del_session_reply
1686 {
1689 };
1690 
1691 /** \brief Set/unset the classification table for an interface request
1692  @param client_index - opaque cookie to identify the sender
1693  @param context - sender context, to match reply w/ request
1694  @param is_ipv6 - ipv6 if non-zero, else ipv4
1695  @param sw_if_index - interface to associate with the table
1696  @param table_index - index of the table, if ~0 unset the table
1697 */
1698 define classify_set_interface_ip_table
1699 {
1704  u32 table_index; /* ~0 => off */
1705 };
1706 
1707 /** \brief Set/unset interface classification table response
1708  @param context - sender context, to match reply w/ request
1709  @param retval - return code
1710 */
1711 define classify_set_interface_ip_table_reply
1712 {
1715 };
1716 
1717 /** \brief Set/unset l2 classification tables for an interface request
1718  @param client_index - opaque cookie to identify the sender
1719  @param context - sender context, to match reply w/ request
1720  @param sw_if_index - interface to set/unset tables for
1721  @param ip4_table_index - ip4 index, use ~0 for all 3 indexes to unset
1722  @param ip6_table_index - ip6 index
1723  @param other_table_index - other index
1724 */
1725 define classify_set_interface_l2_tables
1726 {
1730  /* 3 x ~0 => off */
1734 };
1735 
1736 /** \brief Set/unset l2 classification tables for an interface response
1737  @param context - sender context, to match reply w/ request
1738  @param retval - return code for the request
1739 */
1740 define classify_set_interface_l2_tables_reply
1741 {
1744 };
1745 
1746 /** \brief Get node index using name request
1747  @param client_index - opaque cookie to identify the sender
1748  @param context - sender context, to match reply w/ request
1749  @param node_name[] - name of the node
1750 */
1751 define get_node_index
1752 {
1755  u8 node_name[64];
1756 };
1757 
1758 /** \brief Get node index using name request
1759  @param context - sender context, to match reply w/ request
1760  @param retval - return code for the request
1761  @param node_index - index of the desired node if found, else ~0
1762 */
1763 define get_node_index_reply
1764 {
1768 };
1769 
1770 /** \brief Set the next node for a given node request
1771  @param client_index - opaque cookie to identify the sender
1772  @param context - sender context, to match reply w/ request
1773  @param node_name[] - node to add the next node to
1774  @param next_name[] - node to add as the next node
1775 */
1776 define add_node_next
1777 {
1780  u8 node_name[64];
1781  u8 next_name[64];
1782 };
1783 
1784 /** \brief IP Set the next node for a given node response
1785  @param context - sender context, to match reply w/ request
1786  @param retval - return code for the add next node request
1787  @param next_index - the index of the next node if success, else ~0
1788 */
1789 define add_node_next_reply
1790 {
1794 };
1795 
1796 /** \brief DHCP Proxy config 2 add / del request
1797  @param client_index - opaque cookie to identify the sender
1798  @param context - sender context, to match reply w/ request
1799  @param rx_vrf_id - receive vrf id
1800  @param server_vrf_id - server vrf id
1801  @param if_ipv6 - ipv6 if non-zero, else ipv4
1802  @param is_add - add the config if non-zero, else delete
1803  @param insert_circuit_id - option82 suboption 1 fib number
1804  @param dhcp_server[] - server address
1805  @param dhcp_src_address[] - <fix this, need details>
1806 */
1807 define dhcp_proxy_config_2
1808 {
1816  u8 dhcp_server[16];
1817  u8 dhcp_src_address[16];
1818 };
1819 
1820 /** \brief DHCP Proxy config 2 add / del response
1821  @param context - sender context, to match reply w/ request
1822  @param retval - return code for request
1823 */
1824 define dhcp_proxy_config_2_reply
1825 {
1828 };
1829 
1830 /** \brief l2tpv3 tunnel interface create request
1831  @param client_index - opaque cookie to identify the sender
1832  @param context - sender context, to match reply w/ request
1833  @param client_address - remote client tunnel ip address
1834  @param client_address - local tunnel ip address
1835  @param is_ipv6 - ipv6 if non-zero, else ipv4
1836  @param local_session_id - local tunnel session id
1837  @param remote_session_id - remote tunnel session id
1838  @param local_cookie - local tunnel cookie
1839  @param l2_sublayer_present - l2 sublayer is present in packets if non-zero
1840  @param encap_vrf_id - fib identifier used for outgoing encapsulated packets
1841 */
1842 define l2tpv3_create_tunnel
1843 {
1846  u8 client_address[16];
1847  u8 our_address[16];
1855 };
1856 
1857 /** \brief l2tpv3 tunnel interface create response
1858  @param context - sender context, to match reply w/ request
1859  @param retval - return code for the request
1860  @param sw_if_index - index of the new tunnel interface
1861 */
1862 define l2tpv3_create_tunnel_reply
1863 {
1867 };
1868 
1870 {
1876 };
1877 
1878 /** \brief L2TP tunnel set cookies response
1879  @param context - sender context, to match reply w/ request
1880  @param retval - return code for the request
1881 */
1882 define l2tpv3_set_tunnel_cookies_reply
1883 {
1886 };
1887 
1888 define sw_if_l2tpv3_tunnel_details
1889 {
1892  u8 interface_name[64];
1893  u8 client_address[16];
1894  u8 our_address[16];
1897  u64 local_cookie[2];
1900 };
1901 
1902 define sw_if_l2tpv3_tunnel_dump
1903 {
1906 };
1907 
1908 /** \brief L2 fib clear table request, clear all mac entries in the l2 fib
1909  @param client_index - opaque cookie to identify the sender
1910  @param context - sender context, to match reply w/ request
1911 */
1912 define l2_fib_clear_table
1913 {
1916 };
1917 
1918 /** \brief L2 fib clear table response
1919  @param context - sender context, to match reply w/ request
1920  @param retval - return code for the request
1921 */
1922 define l2_fib_clear_table_reply
1923 {
1926 };
1927 
1928 /** \brief L2 interface ethernet flow point filtering enable/disable request
1929  @param client_index - opaque cookie to identify the sender
1930  @param context - sender context, to match reply w/ request
1931  @param sw_if_index - interface to enable/disable filtering on
1932  @param enable_disable - if non-zero enable filtering, else disable
1933 */
1934 define l2_interface_efp_filter
1935 {
1940 };
1941 
1942 /** \brief L2 interface ethernet flow point filtering response
1943  @param context - sender context, to match reply w/ request
1944  @param retval - return code for the request
1945 */
1946 define l2_interface_efp_filter_reply
1947 {
1950 };
1951 
1953 {
1958 };
1959 
1960 define l2tpv3_interface_enable_disable_reply
1961 {
1964 };
1965 
1966 define l2tpv3_set_lookup_key
1967 {
1970  /* 0 = ip6 src_address, 1 = ip6 dst_address, 2 = session_id */
1972 };
1973 
1974 define l2tpv3_set_lookup_key_reply
1975 {
1978 };
1979 
1980 define vxlan_add_del_tunnel
1981 {
1986  u8 src_address[16];
1987  u8 dst_address[16];
1991 };
1992 
1993 define vxlan_add_del_tunnel_reply
1994 {
1998 };
1999 
2000 define vxlan_tunnel_dump
2001 {
2005 };
2006 
2007 define vxlan_tunnel_details
2008 {
2011  u8 src_address[16];
2012  u8 dst_address[16];
2017 };
2018 
2019 define gre_add_del_tunnel
2020 {
2025  u8 src_address[16];
2026  u8 dst_address[16];
2028 };
2029 
2030 define gre_add_del_tunnel_reply
2031 {
2035 };
2036 
2037 define gre_tunnel_dump
2038 {
2042 };
2043 
2044 define gre_tunnel_details
2045 {
2049  u8 src_address[16];
2050  u8 dst_address[16];
2052 };
2053 
2054 /** \brief L2 interface vlan tag rewrite configure request
2055  @param client_index - opaque cookie to identify the sender
2056  @param context - sender context, to match reply w/ request
2057  @param sw_if_index - interface the operation is applied to
2058  @param vtr_op - Choose from l2_vtr_op_t enum values
2059  @param push_dot1q - first pushed flag dot1q id set, else dot1ad
2060  @param tag1 - Needed for any push or translate vtr op
2061  @param tag2 - Needed for any push 2 or translate x-2 vtr ops
2062 */
2063 define l2_interface_vlan_tag_rewrite
2064 {
2069  u32 push_dot1q; // ethertype of first pushed tag is dot1q/dot1ad
2070  u32 tag1; // first pushed tag
2071  u32 tag2; // second pushed tag
2072 };
2073 
2074 /** \brief L2 interface vlan tag rewrite response
2075  @param context - sender context, to match reply w/ request
2076  @param retval - return code for the request
2077 */
2078 define l2_interface_vlan_tag_rewrite_reply
2079 {
2082 };
2083 
2084 /** \brief vhost-user interface create request
2085  @param client_index - opaque cookie to identify the sender
2086  @param is_server - our side is socket server
2087  @param sock_filename - unix socket filename, used to speak with frontend
2088  @param use_custom_mac - enable or disable the use of the provided hardware address
2089  @param mac_address - hardware address to use if 'use_custom_mac' is set
2090 */
2091 define create_vhost_user_if
2092 {
2096  u8 sock_filename[256];
2100  u8 mac_address[6];
2101 };
2102 
2103 /** \brief vhost-user interface create response
2104  @param context - sender context, to match reply w/ request
2105  @param retval - return code for the request
2106  @param sw_if_index - interface the operation is applied to
2107 */
2108 define create_vhost_user_if_reply
2109 {
2113 };
2114 
2115 /** \brief vhost-user interface modify request
2116  @param client_index - opaque cookie to identify the sender
2117  @param is_server - our side is socket server
2118  @param sock_filename - unix socket filename, used to speak with frontend
2119 */
2120 define modify_vhost_user_if
2121 {
2126  u8 sock_filename[256];
2129 };
2130 
2131 /** \brief vhost-user interface modify response
2132  @param context - sender context, to match reply w/ request
2133  @param retval - return code for the request
2134 */
2135 define modify_vhost_user_if_reply
2136 {
2139 };
2140 
2141 /** \brief vhost-user interface delete request
2142  @param client_index - opaque cookie to identify the sender
2143 */
2144 define delete_vhost_user_if
2145 {
2149 };
2150 
2151 /** \brief vhost-user interface delete response
2152  @param context - sender context, to match reply w/ request
2153  @param retval - return code for the request
2154 */
2155 define delete_vhost_user_if_reply
2156 {
2159 };
2160 
2161 define create_subif
2162 {
2167 
2168  /* These fields map directly onto the subif template */
2172  u8 dot1ad; // 0 = dot1q, 1=dot1ad
2179 };
2180 
2181 define create_subif_reply
2182 {
2186 };
2187 
2188 /** \brief show version
2189  @param client_index - opaque cookie to identify the sender
2190  @param context - sender context, to match reply w/ request
2191 */
2192 define show_version
2193 {
2196 };
2197 
2198 /** \brief show version response
2199  @param context - sender context, to match reply w/ request
2200  @param retval - return code for the request
2201  @param program - name of the program (vpe)
2202  @param version - version of the program
2203  @param build_directory - root of the workspace where the program was built
2204 */
2205 define show_version_reply
2206 {
2209  u8 program[32];
2210  u8 version[32];
2211  u8 build_date[32];
2212  u8 build_directory[256];
2213 };
2214 
2215 /** \brief Vhost-user interface details structure (fix this)
2216  @param sw_if_index - index of the interface
2217  @param interface_name - name of interface
2218  @param virtio_net_hdr_sz - net header size
2219  @param features - interface features
2220  @param is_server - vhost-user server socket
2221  @param sock_filename - socket filename
2222  @param num_regions - number of used memory regions
2223 */
2224 define sw_interface_vhost_user_details
2225 {
2228  u8 interface_name[64];
2232  u8 sock_filename[256];
2235 };
2236 
2237 /* works */
2238 define sw_interface_vhost_user_dump
2239 {
2242 };
2243 
2244 define ip_address_details
2245 {
2248  u8 ip[16];
2250 };
2251 
2252 define ip_address_dump
2253 {
2258 };
2259 
2260 define ip_details
2261 {
2264 };
2265 
2266 define ip_dump
2267 {
2271 };
2272 
2273 /** \brief l2 fib table entry structure
2274  @param bd_id - the l2 fib / bridge domain table id
2275  @param mac - the entry's mac address
2276  @param sw_if_index - index of the interface
2277  @param static_mac - the entry is statically configured.
2278  @param filter_mac - the entry is a mac filter entry.
2279  @param bvi_mac - the mac address is a bridge virtual interface
2280 */
2281 define l2_fib_table_entry
2282 {
2290 };
2291 
2292 /** \brief Dump l2 fib (aka bridge domain) table
2293  @param client_index - opaque cookie to identify the sender
2294  @param bd_id - the l2 fib / bridge domain table identifier
2295 */
2296 define l2_fib_table_dump
2297 {
2301 };
2302 
2303 define vxlan_gpe_add_del_tunnel
2304 {
2308  u8 local[16];
2309  u8 remote[16];
2315 };
2316 
2317 define vxlan_gpe_add_del_tunnel_reply
2318 {
2322 };
2323 
2324 define vxlan_gpe_tunnel_dump
2325 {
2329 };
2330 
2331 define vxlan_gpe_tunnel_details
2332 {
2335  u8 local[16];
2336  u8 remote[16];
2342 };
2343 
2344 /** \brief add or delete locator_set
2345  @param client_index - opaque cookie to identify the sender
2346  @param context - sender context, to match reply w/ request
2347  @param is_add - add address if non-zero, else delete
2348  @param locator_set_name - locator name
2349  @param locator_num - number of locators
2350  @param locators - Lisp locator data
2351 */
2352 define lisp_add_del_locator_set
2353 {
2357  u8 locator_set_name[64];
2359  u8 locators[locator_num];
2360 };
2361 
2362 /** \brief Reply for locator_set add/del
2363  @param context - returned sender context, to match reply w/ request
2364  @param retval - return code
2365 */
2366 define lisp_add_del_locator_set_reply
2367 {
2370 };
2371 
2372 /** \brief add or delete locator for locator_set
2373  @param client_index - opaque cookie to identify the sender
2374  @param context - sender context, to match reply w/ request
2375  @param is_add - add address if non-zero, else delete
2376  @param locator_set_name - name of locator_set to add/del locator
2377  @param sw_if_index - index of the interface
2378  @param priority - priority of the lisp locator
2379  @param weight - weight of the lisp locator
2380 */
2381 define lisp_add_del_locator
2382 {
2386  u8 locator_set_name[64];
2390 };
2391 
2392 /** \brief Reply for locator add/del
2393  @param context - returned sender context, to match reply w/ request
2394  @param retval - return code
2395 */
2396 define lisp_add_del_locator_reply
2397 {
2400 };
2401 
2402 /** \brief add or delete lisp eid-table
2403  @param client_index - opaque cookie to identify the sender
2404  @param context - sender context, to match reply w/ request
2405  @param is_add - add address if non-zero, else delete
2406  @param eid_type:
2407  0 : ipv4
2408  1 : ipv6
2409  2 : mac
2410  @param eid - EID can be ip4, ip6 or mac
2411  @param prefix_len - prefix len
2412  @param locator_set_name - name of locator_set to add/del eid-table
2413  @param vni - virtual network instance
2414 */
2415 define lisp_add_del_local_eid
2416 {
2421  u8 eid[16];
2423  u8 locator_set_name[64];
2425 };
2426 
2427 /** \brief Reply for local_eid add/del
2428  @param context - returned sender context, to match reply w/ request
2429  @param retval - return code
2430 */
2431 define lisp_add_del_local_eid_reply
2432 {
2435 };
2436 
2437 /** \brief add or delete lisp gpe tunnel
2438  @param client_index - opaque cookie to identify the sender
2439  @param context - sender context, to match reply w/ request
2440  @param is_add - add address if non-zero, else delete
2441  @param eid_type -
2442  0 : ipv4
2443  1 : ipv6
2444  2 : mac
2445  @param rmt_eid - remote eid
2446  @param lcl_eid - local eid
2447  @param rmt_len - remote prefix len
2448  @param lcl_len - local prefix len
2449  @param vni - virtual network identifier
2450  @param dp_table - vrf/bridge domain id
2451  @param loc_num - number of locators
2452  @param lcl_locs - array of local locators
2453  @param rmt_locs - array of remote locators
2454  @param action - negative action when 0 locators configured
2455 */
2456 define lisp_gpe_add_del_fwd_entry
2457 {
2462  u8 rmt_eid[16];
2463  u8 lcl_eid[16];
2469  u8 lcl_locs[loc_num];
2470  u8 rmt_locs[loc_num];
2472 };
2473 
2474 /** \brief Reply for gpe_fwd_entry add/del
2475  @param context - returned sender context, to match reply w/ request
2476  @param retval - return code
2477 */
2478 define lisp_gpe_add_del_fwd_entry_reply
2479 {
2482 };
2483 
2484 /** \brief add or delete map-resolver
2485  @param client_index - opaque cookie to identify the sender
2486  @param context - sender context, to match reply w/ request
2487  @param is_add - add address if non-zero, else delete
2488  @param is_ipv6 - if non-zero the address is ipv6, else ipv4
2489  @param ip_address - array of address bytes
2490 */
2491 define lisp_add_del_map_resolver
2492 {
2497  u8 ip_address[16];
2498 };
2499 
2500 /** \brief Reply for map_resolver add/del
2501  @param context - returned sender context, to match reply w/ request
2502  @param retval - return code
2503 */
2504 define lisp_add_del_map_resolver_reply
2505 {
2508 };
2509 
2510 /** \brief enable or disable lisp-gpe protocol
2511  @param client_index - opaque cookie to identify the sender
2512  @param context - sender context, to match reply w/ request
2513  @param is_en - enable protocol if non-zero, else disable
2514 */
2515 define lisp_gpe_enable_disable
2516 {
2520 };
2521 
2522 /** \brief Reply for gpe enable/disable
2523  @param context - returned sender context, to match reply w/ request
2524  @param retval - return code
2525 */
2526 define lisp_gpe_enable_disable_reply
2527 {
2530 };
2531 
2532 /** \brief enable or disable LISP feature
2533  @param client_index - opaque cookie to identify the sender
2534  @param context - sender context, to match reply w/ request
2535  @param is_en - enable protocol if non-zero, else disable
2536 */
2537 define lisp_enable_disable
2538 {
2542 };
2543 
2544 /** \brief Reply for gpe enable/disable
2545  @param context - returned sender context, to match reply w/ request
2546  @param retval - return code
2547 */
2548 define lisp_enable_disable_reply
2549 {
2552 };
2553 
2554 /** \brief add or delete gpe_iface
2555  @param client_index - opaque cookie to identify the sender
2556  @param context - sender context, to match reply w/ request
2557  @param is_add - add address if non-zero, else delete
2558 */
2559 define lisp_gpe_add_del_iface
2560 {
2567 };
2568 
2569 /** \brief Reply for gpe_iface add/del
2570  @param context - returned sender context, to match reply w/ request
2571  @param retval - return code
2572 */
2573 define lisp_gpe_add_del_iface_reply
2574 {
2577 };
2578 
2579 /** \brief configure or disable LISP PITR node
2580  @param client_index - opaque cookie to identify the sender
2581  @param context - sender context, to match reply w/ request
2582  @param ls_name - locator set name
2583  @param is_add - add locator set if non-zero, else disable pitr
2584 */
2585 define lisp_pitr_set_locator_set
2586 {
2590  u8 ls_name[64];
2591 };
2592 
2593 /** \brief Reply for lisp_pitr_set_locator_set
2594  @param context - returned sender context, to match reply w/ request
2595  @param retval - return code
2596 */
2597 define lisp_pitr_set_locator_set_reply
2598 {
2601 };
2602 
2603 /** \brief add or delete remote static mapping
2604  @param client_index - opaque cookie to identify the sender
2605  @param context - sender context, to match reply w/ request
2606  @param is_add - add address if non-zero, else delete
2607  @param is_src_dst - flag indicating src/dst based routing policy
2608  @param del_all - if set, delete all remote mappings
2609  @param vni - virtual network instance
2610  @param action - negative map-reply action
2611  @param eid_type -
2612  0 : ipv4
2613  1 : ipv6
2614  2 : mac
2615  @param deid - dst EID
2616  @param seid - src EID, valid only if is_src_dst is enabled
2617  @param rloc_num - number of remote locators
2618  @param rlocs - remote locator data
2619 */
2620 define lisp_add_del_remote_mapping
2621 {
2630  u8 eid[16];
2632  u8 seid[16];
2635  u8 rlocs[rloc_num];
2636 };
2637 
2638 /** \brief Reply for lisp_add_del_remote_mapping
2639  @param context - returned sender context, to match reply w/ request
2640  @param retval - return code
2641 */
2642 define lisp_add_del_remote_mapping_reply
2643 {
2646 };
2647 
2648 /** \brief add or delete LISP adjacency adjacency
2649  @param client_index - opaque cookie to identify the sender
2650  @param context - sender context, to match reply w/ request
2651  @param is_add - add address if non-zero, else delete
2652  @param vni - virtual network instance
2653  @param eid_type -
2654  0 : ipv4
2655  1 : ipv6
2656  2 : mac
2657  @param deid - destination EID
2658  @param seid - source EID
2659 */
2661 {
2667  u8 deid[16];
2668  u8 seid[16];
2671 };
2672 
2673 /** \brief Reply for lisp_add_del_adjacency
2674  @param context - returned sender context, to match reply w/ request
2675  @param retval - return code
2676 */
2677 define lisp_add_del_adjacency_reply
2678 {
2681 };
2682 
2683 /** \brief add or delete map request itr rlocs
2684  @param client_index - opaque cookie to identify the sender
2685  @param context - sender context, to match reply w/ request
2686  @param is_add - add address if non-zero, else delete
2687  @param locator_set_name - locator set name
2688 */
2689 define lisp_add_del_map_request_itr_rlocs
2690 {
2694  u8 locator_set_name[64];
2695 };
2696 
2697 /** \brief Reply for lisp_add_del_map_request_itr_rlocs
2698  @param context - returned sender context, to match reply w/ request
2699  @param retval - return code
2700 */
2701 
2702 define lisp_add_del_map_request_itr_rlocs_reply
2703 {
2706 };
2707 
2708 /** \brief map/unmap vni/bd_index to vrf
2709  @param client_index - opaque cookie to identify the sender
2710  @param context - sender context, to match reply w/ request
2711  @param is_add - add or delete mapping
2712  @param dp_table - virtual network id/bridge domain index
2713  @param vrf - vrf
2714 */
2715 define lisp_eid_table_add_del_map
2716 {
2723 };
2724 
2725 /** \brief Reply for lisp_eid_table_add_del_map
2726  @param context - returned sender context, to match reply w/ request
2727  @param retval - return code
2728 */
2729 define lisp_eid_table_add_del_map_reply
2730 {
2733 };
2734 
2735 /** \brief Request for map lisp locator status
2736  @param client_index - opaque cookie to identify the sender
2737  @param context - sender context, to match reply w/ request
2738  @param locator_set_index - index of locator_set
2739  @param filter - filter type;
2740  Support value:
2741  0: all locator
2742  1: local locator
2743  2: remote locator
2744  */
2745 define lisp_locator_dump
2746 {
2751 };
2752 
2753 /** \brief LISP locator_set status
2754  @param local - if is set, then locator is local
2755  @param locator_set_name - name of the locator_set
2756  @param sw_if_index - sw_if_index of the locator
2757  @param priority - locator priority
2758  @param weight - locator weight
2759  */
2760 define lisp_locator_details
2761 {
2766  u8 ip_address[16];
2769 };
2770 
2771 /** \brief LISP locator_set status
2772  @param locator_set_name - name of the locator_set
2773  @param local - if is set, then locator_set is local
2774  @param locator_count - number of locator this stats block includes
2775  @param locator - locator data
2776  */
2777 define lisp_locator_set_details
2778 {
2782  u8 locator_set_name[64];
2783 };
2784 
2785 /** \brief Request for locator_set summary status
2786  @param client_index - opaque cookie to identify the sender
2787  @param context - sender context, to match reply w/ request
2788  @param filter - filter type;
2789  Support value:
2790  0: all locator_set
2791  1: local locator_set
2792  2: remote locator_set
2793  */
2794 define lisp_locator_set_dump
2795 {
2799 };
2800 
2801 /** \brief Dump lisp eid-table
2802  @param client_index - opaque cookie to identify the sender
2803  @param context - sender context, to match reply w/ request
2804  @param locator_set_index - index of locator_set
2805  @param is_local - local if non-zero, else remote
2806  @param eid_type:
2807  0 : ipv4
2808  1 : ipv6
2809  2 : mac
2810  @param eid - EID can be ip4, ip6 or mac
2811  @param prefix_len - prefix len
2812  @param vni - virtual network instance
2813  @param ttl - time to live
2814  @param authoritative - authoritative
2815 */
2816 
2817 define lisp_eid_table_details
2818 {
2824  u8 eid[16];
2828 };
2829 
2830 /** \brief Request for eid table summary status
2831  @param client_index - opaque cookie to identify the sender
2832  @param context - sender context, to match reply w/ request
2833  @param eid_set - if non-zero request info about specific mapping
2834  @param vni - virtual network instance; valid only if eid_set != 0
2835  @param prefix_length - prefix length if EID is IP address;
2836  valid only if eid_set != 0
2837  @param eid_type - EID type; valid only if eid_set != 0
2838  Supported values:
2839  0: EID is IPv4
2840  1: EID is IPv6
2841  2: EID is ethernet address
2842  @param eid - endpoint identifier
2843  @param filter - filter type;
2844  Support values:
2845  0: all eid
2846  1: local eid
2847  2: remote eid
2848  */
2849 define lisp_eid_table_dump
2850 {
2857  u8 eid[16];
2859 };
2860 
2861 /** \brief Shows relationship between vni and vrf
2862  @param vrf - VRF index
2863  @param vni - vitual network instance
2864  */
2865 define lisp_eid_table_map_details
2866 {
2870 };
2871 
2872 /** \brief Request for lisp_eid_table_map_details
2873  @param client_index - opaque cookie to identify the sender
2874  @param context - sender context, to match reply w/ request
2875  */
2876 define lisp_eid_table_map_dump
2877 {
2880 };
2881 
2882 define lisp_gpe_tunnel_details
2883 {
2887  u8 source_ip[16];
2888  u8 destination_ip[16];
2898 };
2899 
2900 /** \brief Request for gpe tunnel summary status
2901  @param client_index - opaque cookie to identify the sender
2902  @param context - sender context, to match reply w/ request
2903  */
2904 define lisp_gpe_tunnel_dump
2905 {
2908 };
2909 
2910 /** \brief LISP map resolver status
2911  @param locator_set_name - name of the locator_set
2912  @param is_ipv6 - if non-zero the address is ipv6, else ipv4
2913  @param ip_address - array of address bytes
2914  */
2915 define lisp_map_resolver_details
2916 {
2919  u8 ip_address[16];
2920 };
2921 
2922 /** \brief Request for map resolver summary status
2923  @param client_index - opaque cookie to identify the sender
2924  @param context - sender context, to match reply w/ request
2925  */
2926 define lisp_map_resolver_dump
2927 {
2930 };
2931 
2932 /** \brief Request for lisp-gpe protocol status
2933  @param client_index - opaque cookie to identify the sender
2934  @param context - sender context, to match reply w/ request
2935 */
2936 define show_lisp_status
2937 {
2940 };
2941 
2942 /** \brief Status of lisp, enable or disable
2943  @param context - sender context, to match reply w/ request
2944  @param feature_status - lisp enable if non-zero, else disable
2945  @param gpe_status - lisp enable if non-zero, else disable
2946 */
2947 define show_lisp_status_reply
2948 {
2953 };
2954 
2955 /** \brief Get LISP map request itr rlocs status
2956  @param context - sender context, to match reply w/ request
2957  @param locator_set_name - name of the locator_set
2958  */
2959 define lisp_get_map_request_itr_rlocs
2960 {
2963 };
2964 
2965 /** \brief Request for map request itr rlocs summary status
2966  */
2967 define lisp_get_map_request_itr_rlocs_reply
2968 {
2971  u8 locator_set_name[64];
2972 };
2973 
2974 /** \brief Request for lisp pitr status
2975  @param client_index - opaque cookie to identify the sender
2976  @param context - sender context, to match reply w/ request
2977 */
2978 define show_lisp_pitr
2979 {
2982 };
2983 
2984 /** \brief Status of lisp pitr, enable or disable
2985  @param context - sender context, to match reply w/ request
2986  @param status - lisp pitr enable if non-zero, else disable
2987  @param locator_set_name - name of the locator_set
2988 */
2989 define show_lisp_pitr_reply
2990 {
2994  u8 locator_set_name[64];
2995 };
2996 
2997 /* Gross kludge, DGMS */
2998 define interface_name_renumber
2999 {
3004 };
3005 
3006 define interface_name_renumber_reply
3007 {
3010 };
3011 
3012 /** \brief Register for ip4 arp resolution events
3013  @param client_index - opaque cookie to identify the sender
3014  @param context - sender context, to match reply w/ request
3015  @param enable_disable - 1 => register for events, 0 => cancel registration
3016  @param pid - sender's pid
3017  @param address - the exact ip4 address of interest
3018 */
3019 define want_ip4_arp_events
3020 {
3026 };
3027 
3028 /** \brief Reply for interface events registration
3029  @param context - returned sender context, to match reply w/ request
3030  @param retval - return code
3031 */
3032 define want_ip4_arp_events_reply
3033 {
3036 };
3037 
3038 /** \brief Tell client about an ip4 arp resolution event
3039  @param client_index - opaque cookie to identify the sender
3040  @param context - sender context, to match reply w/ request
3041  @param address - the exact ip4 address of interest
3042  @param pid - client pid registered to receive notification
3043  @param sw_if_index - interface which received ARP packet
3044  @param new_mac - the new mac address
3045 */
3046 define ip4_arp_event
3047 {
3053  u8 new_mac[6];
3054 };
3055 
3056 /** \brief L2 bridge domain add or delete request
3057  @param client_index - opaque cookie to identify the sender
3058  @param context - sender context, to match reply w/ request
3059  @param bd_id - the bridge domain to create
3060  @param flood - enable/disable bcast/mcast flooding in the bd
3061  @param uu_flood - enable/disable uknown unicast flood in the bd
3062  @param forward - enable/disable forwarding on all interfaces in the bd
3063  @param learn - enable/disable learning on all interfaces in the bd
3064  @param arp_term - enable/disable arp termination in the bd
3065  @param is_add - add or delete flag
3066 */
3067 define bridge_domain_add_del
3068 {
3078 };
3079 
3080 /** \brief L2 bridge domain add or delete response
3081  @param context - sender context, to match reply w/ request
3082  @param retval - return code for the set bridge flags request
3083 */
3084 define bridge_domain_add_del_reply
3085 {
3088 };
3089 
3090 /** \brief L2 bridge domain request operational state details
3091  @param client_index - opaque cookie to identify the sender
3092  @param context - sender context, to match reply w/ request
3093  @param bd_id - the bridge domain id desired or ~0 to request all bds
3094 */
3095 define bridge_domain_dump
3096 {
3100 };
3101 
3102 /** \brief L2 bridge domain operational state response
3103  @param bd_id - the bridge domain id
3104  @param flood - bcast/mcast flooding state on all interfaces in the bd
3105  @param uu_flood - uknown unicast flooding state on all interfaces in the bd
3106  @param forward - forwarding state on all interfaces in the bd
3107  @param learn - learning state on all interfaces in the bd
3108  @param arp_term - arp termination state on all interfaces in the bd
3109  @param n_sw_ifs - number of sw_if_index's in the domain
3110 */
3111 define bridge_domain_details
3112 {
3122 };
3123 
3124 /** \brief L2 bridge domain sw interface operational state response
3125  @param bd_id - the bridge domain id
3126  @param sw_if_index - sw_if_index in the domain
3127  @param shg - split horizon group for the interface
3128 */
3129 define bridge_domain_sw_if_details
3130 {
3135 };
3136 
3137 /** \brief DHCP Client config add / del request
3138  @param client_index - opaque cookie to identify the sender
3139  @param context - sender context, to match reply w/ request
3140  @param sw_if_index - index of the interface for DHCP client
3141  @param hostname - hostname
3142  @param is_add - add the config if non-zero, else delete
3143  @param want_dhcp_event - DHCP event sent to the sender
3144  via dhcp_compl_event API message if non-zero
3145  @param pid - sender's pid
3146 */
3148 {
3152  u8 hostname[64];
3156 };
3157 
3158 /** \brief DHCP Client config response
3159  @param context - sender context, to match reply w/ request
3160  @param retval - return code for the request
3161 */
3162 define dhcp_client_config_reply
3163 {
3166 };
3167 
3168 /** \brief Set/unset input ACL interface
3169  @param client_index - opaque cookie to identify the sender
3170  @param context - sender context, to match reply w/ request
3171  @param sw_if_index - interface to set/unset input ACL
3172  @param ip4_table_index - ip4 classify table index (~0 for skip)
3173  @param ip6_table_index - ip6 classify table index (~0 for skip)
3174  @param l2_table_index - l2 classify table index (~0 for skip)
3175  @param is_add - Set input ACL if non-zero, else unset
3176  Note: User is recommeneded to use just one valid table_index per call.
3177  (ip4_table_index, ip6_table_index, or l2_table_index)
3178 */
3179 define input_acl_set_interface
3180 {
3188 };
3189 
3190 /** \brief Set/unset input ACL interface response
3191  @param context - sender context, to match reply w/ request
3192  @param retval - return code for the request
3193 */
3194 define input_acl_set_interface_reply
3195 {
3198 };
3199 
3200 /** \brief IPsec: Add/delete Security Policy Database
3201  @param client_index - opaque cookie to identify the sender
3202  @param context - sender context, to match reply w/ request
3203  @param is_add - add SPD if non-zero, else delete
3204  @param spd_id - SPD instance id (control plane allocated)
3205 */
3206 
3207 define ipsec_spd_add_del
3208 {
3213 };
3214 
3215 /** \brief Reply for IPsec: Add/delete Security Policy Database entry
3216  @param context - returned sender context, to match reply w/ request
3217  @param retval - return code
3218 */
3219 
3220 define ipsec_spd_add_del_reply
3221 {
3224 };
3225 
3226 /** \brief IPsec: Add/delete SPD from interface
3227 
3228  @param client_index - opaque cookie to identify the sender
3229  @param context - sender context, to match reply w/ request
3230  @param is_add - add security mode if non-zero, else delete
3231  @param sw_if_index - index of the interface
3232  @param spd_id - SPD instance id to use for lookups
3233 */
3234 
3235 
3236 define ipsec_interface_add_del_spd
3237 {
3240 
3244 };
3245 
3246 /** \brief Reply for IPsec: Add/delete SPD from interface
3247  @param context - returned sender context, to match reply w/ request
3248  @param retval - return code
3249 */
3250 
3251 define ipsec_interface_add_del_spd_reply
3252 {
3255 };
3256 
3257 /** \brief IPsec: Add/delete Security Policy Database entry
3258 
3259  See RFC 4301, 4.4.1.1 on how to match packet to selectors
3260 
3261  @param client_index - opaque cookie to identify the sender
3262  @param context - sender context, to match reply w/ request
3263  @param is_add - add SPD if non-zero, else delete
3264  @param spd_id - SPD instance id (control plane allocated)
3265  @param priority - priority of SPD entry (non-unique value). Used to order SPD matching - higher priorities match before lower
3266  @param is_outbound - entry applies to outbound traffic if non-zero, otherwise applies to inbound traffic
3267  @param is_ipv6 - remote/local address are IPv6 if non-zero, else IPv4
3268  @param remote_address_start - start of remote address range to match
3269  @param remote_address_stop - end of remote address range to match
3270  @param local_address_start - start of local address range to match
3271  @param local_address_stop - end of local address range to match
3272  @param protocol - protocol type to match [0 means any]
3273  @param remote_port_start - start of remote port range to match ...
3274  @param remote_port_stop - end of remote port range to match [0 to 65535 means ANY, 65535 to 0 means OPAQUE]
3275  @param local_port_start - start of local port range to match ...
3276  @param local_port_stop - end of remote port range to match [0 to 65535 means ANY, 65535 to 0 means OPAQUE]
3277  @param policy - 0 = bypass (no IPsec processing), 1 = discard (discard packet with ICMP processing), 2 = resolve (send request to control plane for SA resolving, and discard without ICMP processing), 3 = protect (apply IPsec policy using following parameters)
3278  @param sa_id - SAD instance id (control plane allocated)
3279 
3280 */
3281 
3282 define ipsec_spd_add_del_entry
3283 {
3287 
3291 
3292  // Selector
3295  u8 remote_address_start[16];
3296  u8 remote_address_stop[16];
3297  u8 local_address_start[16];
3298  u8 local_address_stop[16];
3299 
3301 
3306 
3307  // Policy
3310 };
3311 
3312 /** \brief Reply for IPsec: Add/delete Security Policy Database entry
3313  @param context - returned sender context, to match reply w/ request
3314  @param retval - return code
3315 */
3316 
3317 define ipsec_spd_add_del_entry_reply
3318 {
3321 };
3322 
3323 /** \brief IPsec: Add/delete Security Association Database entry
3324  @param client_index - opaque cookie to identify the sender
3325  @param context - sender context, to match reply w/ request
3326  @param is_add - add SAD entry if non-zero, else delete
3327 
3328  @param sad_id - sad id
3329 
3330  @param spi - security parameter index
3331 
3332  @param protocol - 0 = AH, 1 = ESP
3333 
3334  @param crypto_algorithm - 0 = Null, 1 = AES-CBC-128, 2 = AES-CBC-192, 3 = AES-CBC-256, 4 = 3DES-CBC
3335  @param crypto_key_length - length of crypto_key in bytes
3336  @param crypto_key - crypto keying material
3337 
3338  @param integrity_algorithm - 0 = None, 1 = MD5-96, 2 = SHA1-96, 3 = SHA-256, 4 = SHA-384, 5=SHA-512
3339  @param integrity_key_length - length of integrity_key in bytes
3340  @param integrity_key - integrity keying material
3341 
3342  @param use_extended_sequence_number - use ESN when non-zero
3343 
3344  @param is_tunnel - IPsec tunnel mode if non-zero, else transport mode
3345  @param is_tunnel_ipv6 - IPsec tunnel mode is IPv6 if non-zero, else IPv4 tunnel only valid if is_tunnel is non-zero
3346  @param tunnel_src_address - IPsec tunnel source address IPv6 if is_tunnel_ipv6 is non-zero, else IPv4. Only valid if is_tunnel is non-zero
3347  @param tunnel_dst_address - IPsec tunnel destination address IPv6 if is_tunnel_ipv6 is non-zero, else IPv4. Only valid if is_tunnel is non-zero
3348 
3349  To be added:
3350  Anti-replay
3351  IPsec tunnel address copy mode (to support GDOI)
3352  */
3353 
3354 define ipsec_sad_add_del_entry
3355 {
3359 
3361 
3363 
3365 
3368  u8 crypto_key[128];
3369 
3372  u8 integrity_key[128];
3373 
3375 
3378  u8 tunnel_src_address[16];
3379  u8 tunnel_dst_address[16];
3380 };
3381 
3382 /** \brief Reply for IPsec: Add/delete Security Association Database entry
3383  @param context - returned sender context, to match reply w/ request
3384  @param retval - return code
3385 */
3386 
3387 define ipsec_sad_add_del_entry_reply
3388 {
3391 };
3392 
3393 /** \brief IPsec: Update Security Association keys
3394  @param client_index - opaque cookie to identify the sender
3395  @param context - sender context, to match reply w/ request
3396 
3397  @param sa_id - sa id
3398 
3399  @param crypto_key_length - length of crypto_key in bytes
3400  @param crypto_key - crypto keying material
3401 
3402  @param integrity_key_length - length of integrity_key in bytes
3403  @param integrity_key - integrity keying material
3404 */
3405 
3406 define ipsec_sa_set_key
3407 {
3410 
3412 
3414  u8 crypto_key[128];
3415 
3417  u8 integrity_key[128];
3418 };
3419 
3420 /** \brief Reply for IPsec: Update Security Association keys
3421  @param context - returned sender context, to match reply w/ request
3422  @param retval - return code
3423 */
3424 
3425 define ipsec_sa_set_key_reply
3426 {
3429 };
3430 
3431 /** \brief IKEv2: Add/delete profile
3432  @param client_index - opaque cookie to identify the sender
3433  @param context - sender context, to match reply w/ request
3434 
3435  @param name - IKEv2 profile name
3436  @param is_add - Add IKEv2 profile if non-zero, else delete
3437 */
3438 define ikev2_profile_add_del
3439 {
3442 
3443  u8 name[64];
3445 };
3446 
3447 /** \brief Reply for IKEv2: Add/delete profile
3448  @param context - returned sender context, to match reply w/ request
3449  @param retval - return code
3450 */
3451 define ikev2_profile_add_del_reply
3452 {
3455 };
3456 
3457 /** \brief IKEv2: Set IKEv2 profile authentication method
3458  @param client_index - opaque cookie to identify the sender
3459  @param context - sender context, to match reply w/ request
3460 
3461  @param name - IKEv2 profile name
3462  @param auth_method - IKEv2 authentication method (shared-key-mic/rsa-sig)
3463  @param is_hex - Authentication data in hex format if non-zero, else string
3464  @param data_len - Authentication data length
3465  @param data - Authentication data (for rsa-sig cert file path)
3466 */
3467 define ikev2_profile_set_auth
3468 {
3471 
3472  u8 name[64];
3476  u8 data[0];
3477 };
3478 
3479 /** \brief Reply for IKEv2: Set IKEv2 profile authentication method
3480  @param context - returned sender context, to match reply w/ request
3481  @param retval - return code
3482 */
3483 define ikev2_profile_set_auth_reply
3484 {
3487 };
3488 
3489 /** \brief IKEv2: Set IKEv2 profile local/remote identification
3490  @param client_index - opaque cookie to identify the sender
3491  @param context - sender context, to match reply w/ request
3492 
3493  @param name - IKEv2 profile name
3494  @param is_local - Identification is local if non-zero, else remote
3495  @param id_type - Identification type
3496  @param data_len - Identification data length
3497  @param data - Identification data
3498 */
3499 define ikev2_profile_set_id
3500 {
3503 
3504  u8 name[64];
3508  u8 data[0];
3509 };
3510 
3511 /** \brief Reply for IKEv2:
3512  @param context - returned sender context, to match reply w/ request
3513  @param retval - return code
3514 */
3515 define ikev2_profile_set_id_reply
3516 {
3519 };
3520 
3521 /** \brief IKEv2: Set IKEv2 profile traffic selector parameters
3522  @param client_index - opaque cookie to identify the sender
3523  @param context - sender context, to match reply w/ request
3524 
3525  @param name - IKEv2 profile name
3526  @param is_local - Traffic selector is local if non-zero, else remote
3527  @param proto - Traffic selector IP protocol (if zero not relevant)
3528  @param start_port - The smallest port number allowed by traffic selector
3529  @param end_port - The largest port number allowed by traffic selector
3530  @param start_addr - The smallest address included in traffic selector
3531  @param end_addr - The largest address included in traffic selector
3532 */
3533 define ikev2_profile_set_ts
3534 {
3537 
3538  u8 name[64];
3545 };
3546 
3547 /** \brief Reply for IKEv2: Set IKEv2 profile traffic selector parameters
3548  @param context - returned sender context, to match reply w/ request
3549  @param retval - return code
3550 */
3551 define ikev2_profile_set_ts_reply
3552 {
3555 };
3556 
3557 /** \brief IKEv2: Set IKEv2 local RSA private key
3558  @param client_index - opaque cookie to identify the sender
3559  @param context - sender context, to match reply w/ request
3560 
3561  @param key_file - Key file absolute path
3562 */
3564 {
3567 
3568  u8 key_file[256];
3569 };
3570 
3571 /** \brief Reply for IKEv2: Set IKEv2 local key
3572  @param context - returned sender context, to match reply w/ request
3573  @param retval - return code
3574 */
3575 define ikev2_set_local_key_reply
3576 {
3579 };
3580 
3581 /** \brief Tell client about a DHCP completion event
3582  @param client_index - opaque cookie to identify the sender
3583  @param pid - client pid registered to receive notification
3584  @param is_ipv6 - if non-zero the address is ipv6, else ipv4
3585  @param host_address - Host IP address
3586  @param router_address - Router IP address
3587  @param host_mac - Host MAC address
3588 */
3589 define dhcp_compl_event
3590 {
3593  u8 hostname[64];
3595  u8 host_address[16];
3596  u8 router_address[16];
3597  u8 host_mac[6];
3598 };
3599 
3600 /** \brief Add MAP domains
3601  @param client_index - opaque cookie to identify the sender
3602  @param context - sender context, to match reply w/ request
3603  @param ip6_prefix - Rule IPv6 prefix
3604  @param ip4_prefix - Rule IPv4 prefix
3605  @param ip6_src - MAP domain IPv6 BR address / Tunnel source
3606  @param ip6_prefix_len - Rule IPv6 prefix length
3607  @param ip4_prefix_len - Rule IPv4 prefix length
3608  @param ea_bits_len - Embedded Address bits length
3609  @param psid_offset - Port Set Identifider (PSID) offset
3610  @param psid_length - PSID length
3611  @param is_translation - MAP-E / MAP-T
3612  @param mtu - MTU
3613 */
3614 define map_add_domain
3615 {
3618  u8 ip6_prefix[16];
3619  u8 ip4_prefix[4];
3620  u8 ip6_src[16];
3629 };
3630 
3631 /** \brief Reply for MAP domain add
3632  @param context - returned sender context, to match reply w/ request
3633  @param index - MAP domain index
3634  @param retval - return code
3635 */
3636 define map_add_domain_reply
3637 {
3641 };
3642 
3643 /** \brief Delete MAP domain
3644  @param client_index - opaque cookie to identify the sender
3645  @param context - sender context, to match reply w/ request
3646  @param index - MAP Domain index
3647 */
3648 define map_del_domain
3649 {
3653 };
3654 
3655 /** \brief Reply for MAP domain del
3656  @param context - returned sender context, to match reply w/ request
3657  @param retval - return code
3658 */
3659 define map_del_domain_reply
3660 {
3663 };
3664 
3665 /** \brief Add or Delete MAP rule from a domain (Only used for shared IPv4 per subscriber)
3666  @param client_index - opaque cookie to identify the sender
3667  @param context - sender context, to match reply w/ request
3668  @param index - MAP Domain index
3669  @param is_add - If 1 add rule, if 0 delete rule
3670  @param ip6_dst - MAP CE IPv6 address
3671  @param psid - Rule PSID
3672 */
3673 define map_add_del_rule
3674 {
3679  u8 ip6_dst[16];
3681 };
3682 
3683 /** \brief Reply for MAP rule add/del
3684  @param context - returned sender context, to match reply w/ request
3685  @param retval - return code
3686 */
3687 define map_add_del_rule_reply
3688 {
3691 };
3692 
3693 /** \brief Get list of map domains
3694  @param client_index - opaque cookie to identify the sender
3695 */
3696 define map_domain_dump
3697 {
3700 };
3701 
3702 define map_domain_details
3703 {
3706  u8 ip6_prefix[16];
3707  u8 ip4_prefix[4];
3708  u8 ip6_src[16];
3718 };
3719 
3720 define map_rule_dump
3721 {
3725 };
3726 
3727 define map_rule_details
3728 {
3730  u8 ip6_dst[16];
3732 };
3733 
3734 /** \brief Request for a single block of summary stats
3735  @param client_index - opaque cookie to identify the sender
3736  @param context - sender context, to match reply w/ request
3737 */
3738 define map_summary_stats
3739 {
3742 };
3743 
3744 /** \brief Reply for map_summary_stats request
3745  @param context - sender context, to match reply w/ request
3746  @param retval - return code for request
3747  @param total_bindings -
3748  @param total_pkts -
3749  @param total_ip4_fragments -
3750  @param total_security_check -
3751 */
3752 define map_summary_stats_reply
3753 {
3757  u64 total_pkts[2];
3758  u64 total_bytes[2];
3760  u64 total_security_check[2];
3761 };
3762 
3763 /** \brief cop: enable/disable junk filtration features on an interface
3764  @param client_index - opaque cookie to identify the sender
3765  @param context - sender context, to match reply w/ request
3766  @param sw_if_inded - desired interface
3767  @param enable_disable - 1 => enable, 0 => disable
3768 */
3769 
3771 {
3776 };
3777 
3778 /** \brief cop: interface enable/disable junk filtration reply
3779  @param context - returned sender context, to match reply w/ request
3780  @param retval - return code
3781 */
3782 
3783 define cop_interface_enable_disable_reply
3784 {
3787 };
3788 
3789 /** \brief cop: enable/disable whitelist filtration features on an interface
3790  Note: the supplied fib_id must match in order to remove the feature!
3791 
3792  @param client_index - opaque cookie to identify the sender
3793  @param context - sender context, to match reply w/ request
3794  @param sw_if_index - interface handle, physical interfaces only
3795  @param fib_id - fib identifier for the whitelist / blacklist fib
3796  @param ip4 - 1 => enable ip4 filtration, 0=> disable ip4 filtration
3797  @param ip6 - 1 => enable ip6 filtration, 0=> disable ip6 filtration
3798  @param default_cop - 1 => enable non-ip4, non-ip6 filtration 0=> disable it
3799 */
3800 
3802 {
3810 };
3811 
3812 /** \brief cop: interface enable/disable junk filtration reply
3813  @param context - returned sender context, to match reply w/ request
3814  @param retval - return code
3815 */
3816 
3817 define cop_whitelist_enable_disable_reply
3818 {
3821 };
3822 
3823 /** \brief get_node_graph - get a copy of the vpp node graph
3824  including the current set of graph arcs.
3825 
3826  @param client_index - opaque cookie to identify the sender
3827  @param context - sender context, to match reply w/ request
3828 */
3829 
3830 define get_node_graph
3831 {
3834 };
3835 
3836 /** \brief get_node_graph_reply
3837  @param context - returned sender context, to match reply w/ request
3838  @param retval - return code
3839  @param reply_in_shmem - result from vlib_node_serialize, in shared
3840  memory. Process with vlib_node_unserialize, remember to switch
3841  heaps and free the result.
3842 */
3843 
3844 define get_node_graph_reply
3845 {
3849 };
3850 
3851 /** \brief Clear interface statistics
3852  @param client_index - opaque cookie to identify the sender
3853  @param context - sender context, to match reply w/ request
3854  @param sw_if_index - index of the interface to clear statistics
3855 */
3856 define sw_interface_clear_stats
3857 {
3861 };
3862 
3863 /** \brief Reply to sw_interface_clear_stats
3864  @param context - sender context which was passed in the request
3865  @param retval - return code of the set flags request
3866 */
3867 define sw_interface_clear_stats_reply
3868 {
3871 };
3872 
3873 /** \brief IOAM Trace : Set TRACE profile
3874  @param id - profile id
3875  @param trace_type - Trace type
3876  @param trace_num_elt - Number of nodes in trace path
3877  @param trace_ppc - Trace PPC (none/encap/decap)
3878  @param trace_tsp - Trace timestamp precision (0-sec,1-ms,2-us,3-ns)
3879  @param trace_app_data - Trace application data, can be any 4 bytes
3880  @param pow_enable - Proof of Work enabled or not flag
3881  @param node_id - Id of this node
3882 */
3883 define trace_profile_add
3884 {
3895 };
3896 
3897 /** \brief Trace profile add / del response
3898  @param context - sender context, to match reply w/ request
3899  @param retval - return value for request
3900 */
3901 define trace_profile_add_reply
3902 {
3905 };
3906 
3907 /** \brief IOAM Trace enable trace profile for a flow
3908  @param id - id of the trace profile to be applied
3909  @param dest_ipv6 - Destination IPv6 address
3910  @param prefix_length - prefix mask
3911  @param vrf_id - VRF ID
3912  @param trace_op - Trace operation (add/mod/del)
3913  @param enable - apply/remove the trace profile for the flow
3914 */
3915 define trace_profile_apply
3916 {
3920  u8 dest_ipv6[16];
3925 };
3926 
3927 /** \brief Trace profile apply response
3928  @param context - sender context, to match reply w/ request
3929  @param retval - return value for request
3930 */
3931 define trace_profile_apply_reply
3932 {
3935 };
3936 
3937 /** \brief Delete Trace Profile
3938  @param client_index - opaque cookie to identify the sender
3939  @param context - sender context, to match reply w/ request
3940  @param index - MAP Domain index
3941 */
3942 define trace_profile_del
3943 {
3947 };
3948 
3949 /** \brief Trace profile add / del response
3950  @param context - sender context, to match reply w/ request
3951  @param retval - return value for request
3952 */
3953 define trace_profile_del_reply
3954 {
3957 };
3958 
3959 /** \brief Create host-interface
3960  @param client_index - opaque cookie to identify the sender
3961  @param context - sender context, to match reply w/ request
3962  @param host_if_name - interface name
3963  @param hw_addr - interface MAC
3964  @param use_random_hw_addr - use random generated MAC
3965 */
3966 define af_packet_create
3967 {
3970 
3971  u8 host_if_name[64];
3972  u8 hw_addr[6];
3974 };
3975 
3976 /** \brief Create host-interface response
3977  @param context - sender context, to match reply w/ request
3978  @param retval - return value for request
3979 */
3980 define af_packet_create_reply
3981 {
3985 };
3986 
3987 /** \brief Delete host-interface
3988  @param client_index - opaque cookie to identify the sender
3989  @param context - sender context, to match reply w/ request
3990  @param host_if_name - interface name
3991 */
3992 define af_packet_delete
3993 {
3996 
3997  u8 host_if_name[64];
3998 };
3999 
4000 /** \brief Delete host-interface response
4001  @param context - sender context, to match reply w/ request
4002  @param retval - return value for request
4003 */
4004 define af_packet_delete_reply
4005 {
4008 };
4009 
4010 /** \brief Add/del policer
4011  @param client_index - opaque cookie to identify the sender
4012  @param context - sender context, to match reply w/ request
4013  @param is_add - add policer if non-zero, else delete
4014  @param name - policer name
4015  @param cir - CIR
4016  @param eir - EIR
4017  @param cb - Committed Burst
4018  @param eb - Excess or Peak Burst
4019  @param rate_type - rate type
4020  @param round_type - rounding type
4021  @param type - policer algorithm
4022  @param color_aware - 0=color-blind, 1=color-aware
4023  @param conform_action_type - conform action type
4024  @param conform_dscp - DSCP for conform mar-and-transmit action
4025  @param exceed_action_type - exceed action type
4026  @param exceed_dscp - DSCP for exceed mar-and-transmit action
4027  @param violate_action_type - violate action type
4028  @param violate_dscp - DSCP for violate mar-and-transmit action
4029 */
4031 {
4034 
4036  u8 name[64];
4051 };
4052 
4053 /** \brief Add/del policer response
4054  @param context - sender context, to match reply w/ request
4055  @param retval - return value for request
4056  @param policer_index - for add, returned index of the new policer
4057 */
4058 define policer_add_del_reply
4059 {
4063 };
4064 
4065 /** \brief Get list of policers
4066  @param client_index - opaque cookie to identify the sender
4067  @param context - sender context, to match reply w/ request
4068  @param match_name_valid - if 0 request all policers otherwise use match_name
4069  @param match_name - policer name
4070 */
4071 define policer_dump
4072 {
4075 
4077  u8 match_name[64];
4078 };
4079 
4080 /** \brief Policer operational state response.
4081  @param context - sender context, to match reply w/ request
4082  @param name - policer name
4083  @param cir - CIR
4084  @param eir - EIR
4085  @param cb - Committed Burst
4086  @param eb - Excess or Peak Burst
4087  @param rate_type - rate type
4088  @param round_type - rounding type
4089  @param type - policer algorithm
4090  @param conform_action_type - conform action type
4091  @param conform_dscp - DSCP for conform mar-and-transmit action
4092  @param exceed_action_type - exceed action type
4093  @param exceed_dscp - DSCP for exceed mar-and-transmit action
4094  @param violate_action_type - violate action type
4095  @param violate_dscp - DSCP for violate mar-and-transmit action
4096  @param single_rate - 1 = single rate policer, 0 = two rate policer
4097  @param color_aware - for hierarchical policing
4098  @param scale - power-of-2 shift amount for lower rates
4099  @param cir_tokens_per_period - number of tokens for each period
4100  @param pir_tokens_per_period - number of tokens for each period for 2-rate policer
4101  @param current_limit - current limit
4102  @param current_bucket - current bucket
4103  @param extended_limit - extended limit
4104  @param extended_bucket - extended bucket
4105  @param last_update_time - last update time
4106 */
4107 define policer_details
4108 {
4110 
4111  u8 name[64];
4135 };
4136 
4137 /** \brief Set/unset policer classify interface
4138  @param client_index - opaque cookie to identify the sender
4139  @param context - sender context, to match reply w/ request
4140  @param sw_if_index - interface to set/unset policer classify
4141  @param ip4_table_index - ip4 classify table index (~0 for skip)
4142  @param ip6_table_index - ip6 classify table index (~0 for skip)
4143  @param l2_table_index - l2 classify table index (~0 for skip)
4144  @param is_add - Set if non-zero, else unset
4145  Note: User is recommeneded to use just one valid table_index per call.
4146  (ip4_table_index, ip6_table_index, or l2_table_index)
4147 */
4148 define policer_classify_set_interface
4149 {
4157 };
4158 
4159 /** \brief Set/unset policer classify interface response
4160  @param context - sender context, to match reply w/ request
4161  @param retval - return value for request
4162 */
4163 define policer_classify_set_interface_reply
4164 {
4167 };
4168 
4169 /** \brief Get list of policer classify interfaces and tables
4170  @param client_index - opaque cookie to identify the sender
4171  @param context - sender context, to match reply w/ request
4172  @param type - classify table type
4173 */
4174 define policer_classify_dump
4175 {
4179 };
4180 
4181 /** \brief Policer iclassify operational state response.
4182  @param context - sender context, to match reply w/ request
4183  @param sw_if_index - software interface index
4184  @param table_index - classify table index
4185 */
4186 define policer_classify_details
4187 {
4191 };
4192 
4193 /** \brief Create netmap
4194  @param client_index - opaque cookie to identify the sender
4195  @param context - sender context, to match reply w/ request
4196  @param netmap_if_name - interface name
4197  @param hw_addr - interface MAC
4198  @param use_random_hw_addr - use random generated MAC
4199  @param is_pipe - is pipe
4200  @param is_master - 0=slave, 1=master
4201 */
4202 define netmap_create
4203 {
4206 
4207  u8 netmap_if_name[64];
4208  u8 hw_addr[6];
4212 };
4213 
4214 /** \brief Create netmap response
4215  @param context - sender context, to match reply w/ request
4216  @param retval - return value for request
4217 */
4218 define netmap_create_reply
4219 {
4222 };
4223 
4224 /** \brief Delete netmap
4225  @param client_index - opaque cookie to identify the sender
4226  @param context - sender context, to match reply w/ request
4227  @param netmap_if_name - interface name
4228 */
4229 define netmap_delete
4230 {
4233 
4234  u8 netmap_if_name[64];
4235 };
4236 
4237 /** \brief Delete netmap response
4238  @param context - sender context, to match reply w/ request
4239  @param retval - return value for request
4240 */
4241 define netmap_delete_reply
4242 {
4245 };
4246 
4247 /** \brief Dump mpls gre tunnel table
4248  @param client_index - opaque cookie to identify the sender
4249  @param tunnel_index - gre tunnel identifier or -1 in case of all tunnels
4250 */
4251 define mpls_gre_tunnel_dump
4252 {
4256 };
4257 
4258 /** \brief mpls gre tunnel operational state response
4259  @param tunnel_index - gre tunnel identifier
4260  @param intfc_address - interface ipv4 addr
4261  @param mask_width - interface ipv4 addr mask
4262  @param hw_if_index - interface id
4263  @param l2_only -
4264  @param tunnel_src - tunnel source ipv4 addr
4265  @param tunnel_dst - tunnel destination ipv4 addr
4266  @param outer_fib_index - gre tunnel identifier
4267  @param encap_index - reference to mpls label table
4268  @param nlabels - number of resolved labels
4269  @param labels - resolved labels
4270 */
4271 define mpls_gre_tunnel_details
4272 {
4275 
4286  u32 labels[nlabels];
4287 };
4288 
4289 /** \brief Dump mpls eth tunnel table
4290  @param client_index - opaque cookie to identify the sender
4291  @param tunnel_index - eth tunnel identifier or -1 in case of all tunnels
4292 */
4293 define mpls_eth_tunnel_dump
4294 {
4298 };
4299 
4300 /** \brief mpls eth tunnel operational state response
4301  @param tunnel_index - eth tunnel identifier
4302  @param intfc_address - interface ipv4 addr
4303  @param mask_width - interface ipv4 addr mask
4304  @param hw_if_index - interface id
4305  @param l2_only -
4306  @param tunnel_dst_mac -
4307  @param tx_sw_if_index -
4308  @param encap_index - reference to mpls label table
4309  @param nlabels - number of resolved labels
4310  @param labels - resolved labels
4311 */
4312 define mpls_eth_tunnel_details
4313 {
4316 
4323  u8 tunnel_dst_mac[6];
4326  u32 labels[nlabels];
4327 };
4328 
4329 /** \brief Dump mpls fib table
4330  @param client_index - opaque cookie to identify the sender
4331  @param fib_index - mpls fib entry identifier or -1 in case of all entries
4332 */
4333 define mpls_fib_encap_dump
4334 {
4337 };
4338 
4339 /** \brief mpls fib encap table response
4340  @param fib_index - fib table id
4341  @param dest - destination ipv4 addr
4342  @param s_bit -
4343  @param entry_index - reference to mpls label table
4344  @param nlabels - number of resolved labels
4345  @param labels - resolved labels
4346 */
4347 define mpls_fib_encap_details
4348 {
4350 
4356  u32 labels[nlabels];
4357 };
4358 
4359 /** \brief Dump mpls fib decap table
4360  @param client_index - opaque cookie to identify the sender
4361  @param fib_index - mpls fib entry identifier or -1 in case of all entries
4362 */
4363 define mpls_fib_decap_dump
4364 {
4367 };
4368 
4369 /** \brief mpls fib decap table response
4370  @param fib_index - fib table id
4371  @param entry_index - reference to mpls label table
4372  @param dest - destination ipv4 addr
4373  @param s_bit -
4374  @param label - mpls labels
4375  @param rx_table_id - rx fib id
4376  @param tx_table_id - tx fib id
4377  @param swif_tag -
4378 */
4379 define mpls_fib_decap_details
4380 {
4382 
4390  u8 swif_tag[8];
4391 };
4392 
4393 /** \brief Classify get table IDs request
4394  @param client_index - opaque cookie to identify the sender
4395  @param context - sender context, to match reply w/ request
4396 */
4397 define classify_table_ids
4398 {
4401 };
4402 
4403 /** \brief Reply for classify get table IDs request
4404  @param context - sender context which was passed in the request
4405  @param count - number of ids returned in response
4406  @param ids - array of classify table ids
4407 */
4408 define classify_table_ids_reply
4409 {
4413  u32 ids[count];
4414 };
4415 
4416 /** \brief Classify table ids by interface index request
4417  @param client_index - opaque cookie to identify the sender
4418  @param context - sender context, to match reply w/ request
4419  @param sw_if_index - index of the interface
4420 */
4421 define classify_table_by_interface
4422 {
4426 };
4427 
4428 /** \brief Reply for classify table id by interface index request
4429  @param context - sender context which was passed in the request
4430  @param count - number of ids returned in response
4431  @param sw_if_index - index of the interface
4432  @param l2_table_id - l2 classify table index
4433  @param ip4_table_id - ip4 classify table index
4434  @param ip6_table_id - ip6 classify table index
4435 */
4436 define classify_table_by_interface_reply
4437 {
4444 };
4445 
4446 /** \brief Classify table info
4447  @param client_index - opaque cookie to identify the sender
4448  @param context - sender context, to match reply w/ request
4449  @param table_id - classify table index
4450 */
4451 define classify_table_info
4452 {
4456 };
4457 
4458 /** \brief Reply for classify table info request
4459  @param context - sender context which was passed in the request
4460  @param count - number of ids returned in response
4461  @param table_id - classify table index
4462  @param nbuckets - number of buckets when adding a table
4463  @param match_n_vectors - number of match vectors
4464  @param skip_n_vectors - number of skip_n_vectors
4465  @param active_sessions - number of sessions (active entries)
4466  @param next_table_index - index of next table
4467  @param miss_next_index - index of miss table
4468  @param mask[] - match mask
4469 */
4470 define classify_table_info_reply
4471 {
4482  u8 mask[mask_length];
4483 };
4484 
4485 /** \brief Classify sessions dump request
4486  @param client_index - opaque cookie to identify the sender
4487  @param context - sender context, to match reply w/ request
4488  @param table_id - classify table index
4489 */
4490 define classify_session_dump
4491 {
4495 };
4496 
4497 /** \brief Reply for classify table session dump request
4498  @param context - sender context which was passed in the request
4499  @param count - number of ids returned in response
4500  @param table_id - classify table index
4501  @param hit_next_index - hit_next_index of session
4502  @param opaque_index - for add, opaque_index of session
4503  @param advance - advance value of session
4504  @param match[] - match value for session
4505 */
4506 define classify_session_details
4507 {
4515  u8 match[match_length];
4516 };
4517 
4518 /** \brief Enable and configure IPFIX exporter process request
4519  @param client_index - opaque cookie to identify the sender
4520  @param context - sender context, to match reply w/ request
4521  @param collector_address - address of IPFIX collector
4522  @param collector_port - port of IPFIX IPFIX collector
4523  @param src_address - address of IPFIX exporter
4524  @param vrf_id - VRF / fib table ID
4525  @param path_mtu - Path MTU between exporter and collector
4526  @param template_interval - number of seconds after which to resend template
4527 */
4528 define ipfix_enable
4529 {
4532  u8 collector_address[16];
4534  u8 src_address[16];
4538 };
4539 
4540 /** \brief Reply to IPFIX enable and configure request
4541  @param context - sender context which was passed in the request
4542 */
4543 define ipfix_enable_reply
4544 {
4547 };
4548 
4549 /** \brief IPFIX dump request
4550  @param client_index - opaque cookie to identify the sender
4551  @param context - sender context, to match reply w/ request
4552 */
4553 define ipfix_dump
4554 {
4557 };
4558 
4559 /** \brief Reply to IPFIX dump request
4560  @param context - sender context which was passed in the request
4561  @param collector_address - address of IPFIX collector
4562  @param collector_port - port of IPFIX IPFIX collector
4563  @param src_address - address of IPFIX exporter
4564  @param fib_index - fib table index
4565  @param path_mtu - Path MTU between exporter and collector
4566  @param template_interval - number of seconds after which to resend template
4567 */
4568 define ipfix_details
4569 {
4571  u8 collector_address[16];
4573  u8 src_address[16];
4577 };
4578 
4579 /** \brief Query relative index via node names
4580  @param client_index - opaque cookie to identify the sender
4581  @param context - sender context, to match reply w/ request
4582  @param node_name - name of node to find relative index from
4583  @param next_name - next node from node_name to find relative index of
4584 */
4585 define get_next_index
4586 {
4589  u8 node_name[64];
4590  u8 next_name[64];
4591 };
4592 
4593 /** \brief Reply for get next node index
4594  @param context - sender context which was passed in the request
4595  @param retval - return value
4596  @param next_index - index of the next_node
4597 */
4598 define get_next_index_reply
4599 {
4603 };
4604 
4605 /** \brief PacketGenerator create interface request
4606  @param client_index - opaque cookie to identify the sender
4607  @param context - sender context, to match reply w/ request
4608  @param interface_id - interface index
4609 */
4610 define pg_create_interface
4611 {
4615 };
4616 
4617 /** \brief PacketGenerator create interface response
4618  @param context - sender context, to match reply w/ request
4619  @param retval - return value for request
4620 */
4621 define pg_create_interface_reply
4622 {
4626 };
4627 
4628 /** \brief PacketGenerator capture packets on given interface request
4629  @param client_index - opaque cookie to identify the sender
4630  @param context - sender context, to match reply w/ request
4631  @param interface_id - pg interface index
4632  @param is_enabled - 1 if enabling streams, 0 if disabling
4633  @param count - number of packets to be captured
4634  @param pcap_file - pacp file name to store captured packets
4635 */
4637 {
4644  u8 pcap_file_name[pcap_name_length];
4645 };
4646 
4647 /** \brief PacketGenerator capture packets response
4648  @param context - sender context, to match reply w/ request
4649  @param retval - return value for request
4650 */
4651 define pg_capture_reply
4652 {
4655 };
4656 
4657 /** \brief Enable / disable packet generator request
4658  @param client_index - opaque cookie to identify the sender
4659  @param context - sender context, to match reply w/ request
4660  @param is_enabled - 1 if enabling streams, 0 if disabling
4661  @param stream - stream name to be enable/disabled, if not specified handle all streams
4662 */
4664 {
4669  u8 stream_name[stream_name_length];
4670 };
4671 
4672 /** \brief Reply for enable / disable packet generator
4673  @param context - returned sender context, to match reply w/ request
4674  @param retval - return code
4675 */
4676 define pg_enable_disable_reply
4677 {
4680 };
4681 
4682 /** \brief Configure IP source and L4 port-range check
4683  @param client_index - opaque cookie to identify the sender
4684  @param context - sender context, to match reply w/ request
4685  @param is_ip6 - 1 if source address type is IPv6
4686  @param is_add - 1 if add, 0 if delete
4687  @param mask_length - mask length for address entry
4688  @param address - array of address bytes
4689  @param number_of_ranges - length of low_port and high_port arrays (must match)
4690  @param low_ports[32] - up to 32 low end of port range entries (must have corresponding high_ports entry)
4691  @param high_ports[32] - up to 32 high end of port range entries (must have corresponding low_ports entry)
4692  @param vrf_id - fib table/vrf id to associate the source and port-range check with
4693  @note To specify a single port set low_port and high_port entry the same
4694 */
4695 define ip_source_and_port_range_check_add_del
4696 {
4702  u8 address[16];
4704  u16 low_ports[32];
4705  u16 high_ports[32];
4707 };
4708 
4709 /** \brief Configure IP source and L4 port-range check reply
4710  @param context - returned sender context, to match reply w/ request
4711  @param retval - return code
4712 */
4713 define ip_source_and_port_range_check_add_del_reply
4714 {
4717 };
4718 
4719 /** \brief Set interface source and L4 port-range request
4720  @param client_index - opaque cookie to identify the sender
4721  @param context - sender context, to match reply w/ request
4722  @param interface_id - interface index
4723  @param tcp_vrf_id - VRF associated with source and TCP port-range check
4724  @param udp_vrf_id - VRF associated with source and TCP port-range check
4725 */
4726 define ip_source_and_port_range_check_interface_add_del
4727 {
4736 };
4737 
4738 /** \brief Set interface source and L4 port-range response
4739  @param context - sender context, to match reply w/ request
4740  @param retval - return value for request
4741 */
4742 define ip_source_and_port_range_check_interface_add_del_reply
4743 {
4746 };
4747 
4748 /** \brief Add / del ipsec gre tunnel request
4749  @param client_index - opaque cookie to identify the sender
4750  @param context - sender context, to match reply w/ request
4751  @param local_sa_id - local SA id
4752  @param remote_sa_id - remote SA id
4753  @param is_add - 1 if adding the tunnel, 0 if deleting
4754  @param src_address - tunnel source address
4755  @param dst_address - tunnel destination address
4756 */
4757 define ipsec_gre_add_del_tunnel {
4763  u8 src_address[4];
4764  u8 dst_address[4];
4765 };
4766 
4767 /** \brief Reply for add / del ipsec gre tunnel request
4768  @param context - returned sender context, to match reply w/ request
4769  @param retval - return code
4770  @param sw_if_index - software index of the new ipsec gre tunnel
4771 */
4772 define ipsec_gre_add_del_tunnel_reply {
4776 };
4777 
4778 /** \brief Dump ipsec gre tunnel table
4779  @param client_index - opaque cookie to identify the sender
4780  @param context - sender context, to match reply w/ request
4781  @param tunnel_index - gre tunnel identifier or -1 in case of all tunnels
4782 */
4783 define ipsec_gre_tunnel_dump {
4787 };
4788 
4789 /** \brief mpls gre tunnel operational state response
4790  @param context - returned sender context, to match reply w/ request
4791  @param sw_if_index - software index of the ipsec gre tunnel
4792  @param local_sa_id - local SA id
4793  @param remote_sa_id - remote SA id
4794  @param src_address - tunnel source address
4795  @param dst_address - tunnel destination address
4796 */
4797 define ipsec_gre_tunnel_details {
4802  u8 src_address[4];
4803  u8 dst_address[4];
4804 };
void pg_enable_disable(u32 stream_index, int is_enable)
Definition: cli.c:55
u8 crypto_algorithm
Definition: vpe.api:3366
u8 use_extended_sequence_number
Definition: vpe.api:3374
u32 sa_id
Definition: vpe.api:3309
u8 integrity_key_length
Definition: vpe.api:3371
u16 local_port_start
Definition: vpe.api:3304
u8 is_add
Definition: vpe.api:3286
u32 vni
Definition: vpe.api:2466
i32 retval
Definition: vpe.api:2481
u32 context
Definition: vpe.api:2480
u32 loc_num
Definition: vpe.api:2468
u8 policy
Definition: vpe.api:3308
u32 context
Definition: vpe.api:3319
u16 remote_port_stop
Definition: vpe.api:3303
u32 custom_dev_instance
Definition: vpe.api:265
u8 protocol
Definition: vpe.api:3300
i32 retval
Definition: vpe.api:3320
u32 bd_id
Definition: vpe.api:2284
u32 spd_id
Definition: vpe.api:3288
u32 client_index
Definition: vpe.api:2458
u8 is_tunnel
Definition: vpe.api:3376
u8 crypto_key_length
Definition: vpe.api:3367
u32 context
Definition: vpe.api:2283
u32 sad_id
Definition: vpe.api:3360
int i32
Definition: types.h:81
u32 feature_bitmap
Definition: vpe.api:1543
unsigned long u64
Definition: types.h:89
u8 rmt_len
Definition: vpe.api:2464
int l2tpv3_interface_enable_disable(vnet_main_t *vnm, u32 sw_if_index, int enable_disable)
Definition: l2tp.c:614
u8 is_add
Definition: vpe.api:2460
i32 priority
Definition: vpe.api:3289
i32 retval
Definition: vpe.api:3390
u64 mac
Definition: vpe.api:2285
int cop_whitelist_enable_disable(cop_whitelist_enable_disable_args_t *a)
Definition: cop.c:229
u8 is_add
Definition: vpe.api:3358
u16 local_port_stop
Definition: vpe.api:3305
clib_error_t * ikev2_set_local_key(vlib_main_t *vm, u8 *file)
Definition: ikev2.c:1996
u8 bvi_mac
Definition: vpe.api:2289
u32 client_index
Definition: vpe.api:3356
u16 remote_port_start
Definition: vpe.api:3302
svmdb_client_t * c
int lisp_add_del_adjacency(lisp_cp_main_t *lcm, gid_address_t *local_eid, gid_address_t *remote_eid, u8 is_add)
Adds adjacency or removes forwarding entry associated to remote mapping.
Definition: control.c:940
int cop_interface_enable_disable(u32 sw_if_index, int enable_disable)
Definition: cop.c:151
u8 lcl_len
Definition: vpe.api:2465
u32 client_index
Definition: vpe.api:3284
u32 sw_if_index
Definition: vpe.api:2286
unsigned int u32
Definition: types.h:88
clib_error_t * policer_add_del(vlib_main_t *vm, u8 *name, sse2_qos_pol_cfg_params_st *cfg, u32 *policer_index, u8 is_add)
Definition: policer.c:20
u32 spi
Definition: vpe.api:3362
clib_error_t * pg_capture(pg_capture_args_t *a)
Definition: cli.c:74
int dhcp_client_config(vlib_main_t *vm, u32 sw_if_index, u8 *hostname, u32 is_add, u32 client_index, void *event_callback, u32 pid)
Definition: client.c:765
u32 context
Definition: vpe.api:3285
u8 action
Definition: vpe.api:2471
u8 static_mac
Definition: vpe.api:2287
unsigned short u16
Definition: types.h:57
u8 eid_type
Definition: vpe.api:2461
double f64
Definition: types.h:142
unsigned char u8
Definition: types.h:56
u8 integrity_algorithm
Definition: vpe.api:3370
u8 is_tunnel_ipv6
Definition: vpe.api:3377
u32 context
Definition: vpe.api:3357
u32 custom_dev_instance
Definition: vpe.api:233
u32 client_index
Definition: vpe.api:2268
u8 is_outbound
Definition: vpe.api:3290
u8 is_ipv6
Definition: vpe.api:3293
u32 context
Definition: vpe.api:2459
u8 filter_mac
Definition: vpe.api:2288
u32 context
Definition: vpe.api:3389
u8 protocol
Definition: vpe.api:3364
int l2tpv3_set_tunnel_cookies(l2t_main_t *lm, u32 sw_if_index, u64 new_local_cookie, u64 new_remote_cookie)
Definition: l2tp.c:531
u8 is_ip_any
Definition: vpe.api:3294
u32 dp_table
Definition: vpe.api:2467