bcc3f4ec1b3d9affe3fe15c4cf13bfaf1b08a749
[vpp.git] / vpp / vpp-api / vpe.api
1 /* Hey Emacs use -*- mode: C -*- */
2 /*
3  * Copyright (c) 2015-2016 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 {
32   u32 client_index;
33   u32 context;
34   u32 enable_disable;
35   u32 pid;
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 {
44   u32 context;
45   i32 retval;
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 {
73   u32 context;
74   u32 sw_if_index;
75
76   /* index of sup interface (e.g. hw interface).
77      equal to sw_if_index for super hw interface. */
78   u32 sup_sw_if_index;
79
80   /* Layer 2 address, if applicable */
81   u32 l2_address_length;
82   u8 l2_address[8];
83
84   /* Interface name */
85   u8 interface_name[64];
86
87   /* 1 = up, 0 = down */
88   u8 admin_up_down;
89   u8 link_up_down;
90
91   /* 1 = half duplex, 2 = full duplex */
92   u8 link_duplex;
93
94   /* 1 = 10M, 2 = 100M, 4 = 1G, 8 = 10G, 16 = 40G, 32 = 100G */
95   u8 link_speed;
96
97   /* MTU */
98   u16 link_mtu;
99
100   /* Subinterface ID. A number 0-N to uniquely identify this subinterface under the super interface */
101   u32 sub_id;
102
103   /* 0 = dot1q, 1=dot1ad */
104   u8 sub_dot1ad;
105
106   /* Number of tags 0-2 */
107   u8 sub_number_of_tags;
108   u16 sub_outer_vlan_id;
109   u16 sub_inner_vlan_id;
110   u8 sub_exact_match;
111   u8 sub_default;
112   u8 sub_outer_vlan_id_any;
113   u8 sub_inner_vlan_id_any;
114
115   /* vlan tag rewrite state */
116   u32 vtr_op;
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   u8 tag[64];
121 };
122
123 /* works */
124 define sw_interface_dump
125 {
126   u32 client_index;
127   u32 context;
128   u8 name_filter_valid;
129   u8 name_filter[49];
130 };
131
132 /** \brief Set or delete one or all ip addresses on a specified interface
133     @param client_index - opaque cookie to identify the sender
134     @param context - sender context, to match reply w/ request
135     @param sw_if_index - index of the interface to add/del addresses 
136     @param is_add - add address if non-zero, else delete
137     @param is_ipv6 - if non-zero the address is ipv6, else ipv4
138     @param del_all - if non-zero delete all addresses on the interface
139     @param address_length - address length in bytes, 4 for ip4, 16 for ip6
140     @param address - array of address bytes
141 */
142 define sw_interface_add_del_address
143 {
144   u32 client_index;
145   u32 context;
146   u32 sw_if_index;
147   u8 is_add;
148   u8 is_ipv6;
149   u8 del_all;
150   u8 address_length;
151   u8 address[16];
152 };
153
154 /** \brief Reply for interface events registration
155     @param context - returned sender context, to match reply w/ request
156     @param retval - return code
157 */
158 define sw_interface_add_del_address_reply
159 {
160   u32 context;
161   i32 retval;
162 };
163
164 /** \brief Associate the specified interface with a fib table
165     @param client_index - opaque cookie to identify the sender
166     @param context - sender context, to match reply w/ request
167     @param sw_if_index - index of the interface
168     @param is_ipv6 - if non-zero ipv6, else ipv4
169     @param vrf_id - fib table/vrd id to associate the interface with
170 */
171 define sw_interface_set_table
172 {
173   u32 client_index;
174   u32 context;
175   u32 sw_if_index;
176   u8 is_ipv6;
177   u32 vrf_id;
178 };
179
180 /** \brief Reply for interface events registration
181     @param context - returned sender context, to match reply w/ request
182     @param retval - return code
183 */
184 define sw_interface_set_table_reply
185 {
186   u32 context;
187   i32 retval;
188 };
189
190 /** \brief Enable or Disable MPLS on and interface
191     @param client_index - opaque cookie to identify the sender
192     @param context - sender context, to match reply w/ request
193     @param sw_if_index - index of the interface
194     @param enable - if non-zero enable, else disable
195 */
196 define sw_interface_set_mpls_enable
197 {
198   u32 client_index;
199   u32 context;
200   u32 sw_if_index;
201   u8 enable;
202 };
203
204 /** \brief Reply for MPLS state on an interface
205     @param context - returned sender context, to match reply w/ request
206     @param retval - return code
207 */
208 define sw_interface_set_mpls_enable_reply
209 {
210   u32 context;
211   i32 retval;
212 };
213
214 /** \brief Initialize a new tap interface with the given paramters 
215     @param client_index - opaque cookie to identify the sender
216     @param context - sender context, to match reply w/ request
217     @param use_random_mac - let the system generate a unique mac address
218     @param tap_name - name to associate with the new interface
219     @param mac_address - mac addr to assign to the interface if use_radom not set
220 */
221 define tap_connect
222 {
223   u32 client_index;
224   u32 context;
225   u8 use_random_mac;
226   u8 tap_name[64];
227   u8 mac_address[6];
228   u8 renumber;
229   u32 custom_dev_instance;
230   u8 tag[64];
231 };
232
233 /** \brief Reply for tap connect request
234     @param context - returned sender context, to match reply w/ request
235     @param retval - return code
236     @param sw_if_index - software index allocated for the new tap interface
237 */
238 define tap_connect_reply
239 {
240   u32 context;
241   i32 retval;
242   u32 sw_if_index;
243 };
244
245 /** \brief Modify a tap interface with the given paramters 
246     @param client_index - opaque cookie to identify the sender
247     @param context - sender context, to match reply w/ request
248     @param sw_if_index - interface index of existing tap interface
249     @param use_random_mac - let the system generate a unique mac address
250     @param tap_name - name to associate with the new interface
251     @param mac_address - mac addr to assign to the interface if use_radom not set
252 */
253 define tap_modify
254 {
255   u32 client_index;
256   u32 context;
257   u32 sw_if_index;
258   u8 use_random_mac;
259   u8 tap_name[64];
260   u8 mac_address[6];
261   u8 renumber;
262   u32 custom_dev_instance;
263 };
264
265 /** \brief Reply for tap modify request
266     @param context - returned sender context, to match reply w/ request
267     @param retval - return code
268     @param sw_if_index - software index if the modified tap interface
269 */
270 define tap_modify_reply
271 {
272   u32 context;
273   i32 retval;
274   u32 sw_if_index;
275 };
276
277 /** \brief Delete tap interface
278     @param client_index - opaque cookie to identify the sender
279     @param context - sender context, to match reply w/ request
280     @param sw_if_index - interface index of existing tap interface
281 */
282 define tap_delete
283 {
284   u32 client_index;
285   u32 context;
286   u32 sw_if_index;
287 };
288
289 /** \brief Reply for tap delete request
290     @param context - returned sender context, to match reply w/ request
291     @param retval - return code
292 */
293 define tap_delete_reply
294 {
295   u32 context;
296   i32 retval;
297 };
298
299 /** \brief Dump tap interfaces request */
300 define sw_interface_tap_dump
301 {
302   u32 client_index;
303   u32 context;
304 };
305
306 /** \brief Reply for tap dump request
307     @param sw_if_index - software index of tap interface
308     @param dev_name - Linux tap device name
309 */
310 define sw_interface_tap_details
311 {
312   u32 context;
313   u32 sw_if_index;
314   u8 dev_name[64];
315 };
316
317 /** \brief Create a new subinterface with the given vlan id
318     @param client_index - opaque cookie to identify the sender
319     @param context - sender context, to match reply w/ request
320     @param sw_if_index - software index of the new vlan's parent interface
321     @param vlan_id - vlan tag of the new interface
322 */
323 define create_vlan_subif
324 {
325   u32 client_index;
326   u32 context;
327   u32 sw_if_index;
328   u32 vlan_id;
329 };
330
331 /** \brief Reply for the vlan subinterface create request
332     @param context - returned sender context, to match reply w/ request
333     @param retval - return code
334     @param sw_if_index - software index allocated for the new subinterface
335 */
336 define create_vlan_subif_reply
337 {
338   u32 context;
339   i32 retval;
340   u32 sw_if_index;
341 };
342
343 /** \brief MPLS Route Add / del route
344     @param client_index - opaque cookie to identify the sender
345     @param context - sender context, to match reply w/ request
346     @param mr_label - The MPLS label value
347     @param mr_eos - The End of stack bit
348     @param mr_table_id - The MPLS table-id the route is added in
349     @param mr_classify_table_index - If this is a classify route, 
350                                      this is the classify table index
351     @param  mr_create_table_if_needed - If the MPLS or IP tables do not exist,
352                                         create them
353     @param mr_is_add - Is this a route add or delete
354     @param mr_is_classify - Is this route result a classify
355     @param mr_is_multipath - Is this route update a multipath - i.e. is this
356                              a path addition to an existing route
357     @param mr_is_resolve_host - Recurse resolution constraint via a host prefix
358     @param mr_is_resolve_attached - Recurse resolution constraint via attached prefix
359     @param mr_next_hop_proto_is_ip4 - The next-hop is IPV4
360     @param mr_next_hop_weight - The weight, for UCMP
361     @param mr_next_hop[16] - the nextop address
362     @param mr_next_hop_sw_if_index - the next-hop SW interface
363     @param mr_next_hop_table_id - the next-hop table-id (if appropriate)
364     @param mr_next_hop_out_label - the next-hop output label
365 */
366 define mpls_route_add_del
367 {
368   u32 client_index;
369   u32 context;
370   u32 mr_label;
371   u8 mr_eos;
372   u32 mr_table_id;
373   u32 mr_classify_table_index;
374   u8 mr_create_table_if_needed;
375   u8 mr_is_add;
376   u8 mr_is_classify;
377   u8 mr_is_multipath;
378   u8 mr_is_resolve_host;
379   u8 mr_is_resolve_attached;
380   u8 mr_next_hop_proto_is_ip4;
381   u8 mr_next_hop_weight;
382   u8 mr_next_hop[16];
383   u32 mr_next_hop_sw_if_index;
384   u32 mr_next_hop_table_id;
385   u32 mr_next_hop_out_label;
386 };
387
388 /** \brief Reply for MPLS route add / del request
389     @param context - returned sender context, to match reply w/ request
390     @param retval - return code
391 */
392 define mpls_route_add_del_reply
393 {
394   u32 context;
395   i32 retval;
396 };
397
398 /** \brief Dump MPLS fib table
399     @param client_index - opaque cookie to identify the sender
400 */
401 define mpls_fib_dump
402 {
403   u32 client_index;
404   u32 context;
405 };
406
407 /** \brief FIB path
408     @param sw_if_index - index of the interface
409     @param weight - The weight, for UCMP
410     @param is_local - local if non-zero, else remote
411     @param is_drop - Drop the packet
412     @param is_unreach - Drop the packet and rate limit send ICMP unreachable
413     @param is_prohibit - Drop the packet and rate limit send ICMP prohibited
414     @param afi - the afi of the next hop, IP46_TYPE_IP4=1, IP46_TYPE_IP6=2
415     @param next_hop[16] - the next hop address
416 */
417 typeonly manual_print manual_endian define fib_path
418 {
419   u32 sw_if_index;
420   u32 weight;
421   u8 is_local;
422   u8 is_drop;
423   u8 is_unreach;
424   u8 is_prohibit;
425   u8 afi;
426   u8 next_hop[16];
427 };
428
429 /** \brief mpls FIB table response
430     @param table_id - MPLS fib table id
431     @param s_bit - End-of-stack bit
432     @param label - MPLS label value
433     @param count - the number of fib_path in path
434     @param path  - array of of fib_path structures
435 */
436 manual_endian manual_print define mpls_fib_details
437 {
438   u32 context;
439   u32 table_id;
440   u8  eos_bit;
441   u32 label;
442   u32 count;
443   vl_api_fib_path_t path[count];
444 };
445
446 /** \brief Dump IP6 fib table
447     @param client_index - opaque cookie to identify the sender
448 */
449 define ip6_fib_dump
450 {
451   u32 client_index;
452   u32 context;
453 };
454
455 /** \brief IP6 FIB table response
456     @param table_id - IP6 fib table id
457     @address_length - mask length
458     @address - ip6 prefix
459     @param count - the number of fib_path in path
460     @param path  - array of of fib_path structures
461 */
462 manual_endian manual_print define ip6_fib_details
463 {
464   u32 context;
465   u32 table_id;
466   u8  address_length;
467   u8  address[16];
468   u32 count;
469   vl_api_fib_path_t path[count];
470 };
471
472 /** \brief Dump IP fib table
473     @param client_index - opaque cookie to identify the sender
474 */
475 define ip_fib_dump
476 {
477   u32 client_index;
478   u32 context;
479 };
480
481 /** \brief IP FIB table response
482     @param table_id - IP fib table id
483     @address_length - mask length
484     @address - ip4 prefix
485     @param count - the number of fib_path in path
486     @param path  - array of of fib_path structures
487 */
488 manual_endian manual_print define ip_fib_details
489 {
490   u32 context;
491   u32 table_id;
492   u8  address_length;
493   u8  address[4];
494   u32 count;
495   vl_api_fib_path_t path[count];
496 };
497
498 /** \brief Bind/Unbind an MPLS local label to an IP prefix. i.e. create
499            a per-prefix label entry.
500     @param client_index - opaque cookie to identify the sender
501     @param context - sender context, to match reply w/ request
502     @param mb_mpls_table_id - The MPLS table-id the MPLS entry will be added in
503     @param mb_label - The MPLS label value to bind
504     @param mb_ip_table_id - The IP table-id of the IP prefix to bind to.
505     @param mb_create_table_if_needed - Create either/both tables if required.
506     @param mb_is_bind - Bind or unbind
507     @param mb_is_ip4 - The prefix to bind to is IPv4
508     @param mb_address_length - Length of IP prefix
509     @param mb_address[16] - IP prefix/
510 */
511 define mpls_ip_bind_unbind
512 {
513   u32 client_index;
514   u32 context;
515   u32 mb_mpls_table_id;
516   u32 mb_label;
517   u32 mb_ip_table_id;
518   u8 mb_create_table_if_needed;
519   u8 mb_is_bind;
520   u8 mb_is_ip4;
521   u8 mb_address_length;
522   u8 mb_address[16];
523 };
524
525 /** \brief Reply for MPLS IP bind/unbind request
526     @param context - returned sender context, to match reply w/ request
527     @param retval - return code
528 */
529 define mpls_ip_bind_unbind_reply
530 {
531   u32 context;
532   i32 retval;
533 };
534
535 /** \brief Add / del route request
536     @param client_index - opaque cookie to identify the sender
537     @param context - sender context, to match reply w/ request
538     @param sw_if_index - software index of the new vlan's parent interface
539     @param vrf_id - fib table /vrf associated with the route
540     @param lookup_in_vrf - 
541     @param resolve_attempts - 
542     @param classify_table_index - 
543     @param create_vrf_if_needed - 
544     @param resolve_if_needed - 
545     @param is_add - 1 if adding the route, 0 if deleting
546     @param is_drop - Drop the packet
547     @param is_unreach - Drop the packet and rate limit send ICMP unreachable
548     @param is_prohibit - Drop the packet and rate limit send ICMP prohibited
549     @param is_ipv6 - 0 if an ip4 route, else ip6
550     @param is_local - 
551     @param is_classify - 
552     @param is_multipath - Set to 1 if this is a multipath route, else 0
553     @param not_last - Is last or not last msg in group of multiple add/del msgs
554     @param next_hop_weight - 
555     @param dst_address_length - 
556     @param dst_address[16] - 
557     @param next_hop_address[16] - 
558 */
559 define ip_add_del_route
560 {
561   u32 client_index;
562   u32 context;
563   u32 next_hop_sw_if_index;
564   u32 table_id;
565   u32 resolve_attempts;
566   u32 classify_table_index;
567   u32 next_hop_out_label;
568   u32 next_hop_table_id;
569   u8 create_vrf_if_needed;
570   u8 resolve_if_needed;
571   u8 is_add;
572   u8 is_drop;
573   u8 is_unreach;
574   u8 is_prohibit;
575   u8 is_ipv6;
576   u8 is_local;
577   u8 is_classify;
578   u8 is_multipath;
579   u8 is_resolve_host;
580   u8 is_resolve_attached;
581   /* Is last/not-last message in group of multiple add/del messages. */
582   u8 not_last;
583   u8 next_hop_weight;
584   u8 dst_address_length;
585   u8 dst_address[16];
586   u8 next_hop_address[16];
587 };
588
589 /** \brief Reply for add / del route request
590     @param context - returned sender context, to match reply w/ request
591     @param retval - return code
592 */
593 define ip_add_del_route_reply
594 {
595   u32 context;
596   i32 retval;
597 };
598
599 /** \brief Add / del MPLS encapsulation request
600     @param client_index - opaque cookie to identify the sender
601     @param context - sender context, to match reply w/ request
602     @param vrf_id - vrf id
603     @param dst_address[4] - 
604     @param is_add - 1 if adding the encap, 0 if deleting
605     @param nlabels - number of labels 
606     @param labels - array of labels
607 */
608 define mpls_add_del_encap
609 {
610   u32 client_index;
611   u32 context;
612   u32 vrf_id;
613   u8 dst_address[4];
614   /* 1 = add, 0 = delete */
615   u8 is_add;
616   u8 nlabels;
617   u32 labels[0];
618 };
619
620 /** \brief Reply for add / del encapsulation request
621     @param context - returned sender context, to match reply w/ request
622     @param retval - return code
623 */
624 define mpls_add_del_encap_reply
625 {
626   u32 context;
627   i32 retval;
628 };
629
630 /** \brief Proxy ARP add / del request
631     @param client_index - opaque cookie to identify the sender
632     @param context - sender context, to match reply w/ request
633     @param vrf_id - VRF / Fib table ID
634     @param is_add - 1 if adding the Proxy ARP range, 0 if deleting
635     @param low_address[4] - Low address of the Proxy ARP range
636     @param hi_address[4] - High address of the Proxy ARP range
637 */
638 define proxy_arp_add_del
639 {
640   u32 client_index;
641   u32 context;
642   u32 vrf_id;
643   u8 is_add;
644   u8 low_address[4];
645   u8 hi_address[4];
646 };
647
648 /** \brief Reply for proxy arp add / del request
649     @param context - returned sender context, to match reply w/ request
650     @param retval - return code
651 */
652 define proxy_arp_add_del_reply
653 {
654   u32 context;
655   i32 retval;
656 };
657
658 /** \brief Proxy ARP add / del request
659     @param client_index - opaque cookie to identify the sender
660     @param context - sender context, to match reply w/ request
661     @param sw_if_index - Which interface to enable / disable Proxy Arp on
662     @param enable_disable - 1 to enable Proxy ARP on interface, 0 to disable
663 */
664 define proxy_arp_intfc_enable_disable
665 {
666   u32 client_index;
667   u32 context;
668   u32 sw_if_index;
669   /* 1 = on, 0 = off */
670   u8 enable_disable;
671 };
672
673 /** \brief Reply for Proxy ARP interface enable / disable request
674     @param context - returned sender context, to match reply w/ request
675     @param retval - return code
676 */
677 define proxy_arp_intfc_enable_disable_reply
678 {
679   u32 context;
680   i32 retval;
681 };
682
683 /** \brief IP neighbor add / del request
684     @param client_index - opaque cookie to identify the sender
685     @param context - sender context, to match reply w/ request
686     @param vrf_id - vrf_id, only for IP4
687     @param sw_if_index - interface used to reach neighbor
688     @param is_add - 1 to add neighbor, 0 to delete
689     @param is_ipv6 - 1 for IPv6 neighbor, 0 for IPv4
690     @param is_static - 
691     @param mac_address - l2 address of the neighbor
692     @param dst_address - ip4 or ip6 address of the neighbor
693 */
694 define ip_neighbor_add_del
695 {
696   u32 client_index;
697   u32 context;
698   u32 vrf_id;                   /* only makes sense for ip4 */
699   u32 sw_if_index;
700   /* 1 = add, 0 = delete */
701   u8 is_add;
702   u8 is_ipv6;
703   u8 is_static;
704   u8 mac_address[6];
705   u8 dst_address[16];
706 };
707
708 /** \brief Reply for IP Neighbor add / delete request
709     @param context - returned sender context, to match reply w/ request
710     @param retval - return code
711 */
712 define ip_neighbor_add_del_reply
713 {
714   u32 context;
715   i32 retval;
716 };
717
718 /** \brief Reset VRF (remove all routes etc) request
719     @param client_index - opaque cookie to identify the sender
720     @param context - sender context, to match reply w/ request
721     @param is_ipv6 - 1 for IPv6 neighbor, 0 for IPv4
722     @param vrf_id - ID of th FIB table / VRF to reset
723 */
724 define reset_vrf
725 {
726   u32 client_index;
727   u32 context;
728   u8 is_ipv6;
729   u32 vrf_id;
730 };
731
732 /** \brief Reply for Reset VRF request
733     @param context - returned sender context, to match reply w/ request
734     @param retval - return code
735 */
736 define reset_vrf_reply
737 {
738   u32 context;
739   i32 retval;
740 };
741
742 /** \brief Is Address Reachable request - DISABLED
743     @param client_index - opaque cookie to identify the sender
744     @param context - sender context, to match reply w/ request
745     @param next_hop_sw_if_index - index of interface used to get to next hop
746     @param is_ipv6 - 1 for IPv6, 0 for IPv4
747     @param is_error - address not found or does not match intf
748     @param address[] - Address in question 
749 */
750 define is_address_reachable
751 {
752   u32 client_index;             /* (api_main_t *) am->my_client_index */
753   u32 context;
754   u32 next_hop_sw_if_index;
755   u8 is_known;                  /* on reply, this is the answer */
756   u8 is_ipv6;
757   u8 is_error;                  /* address not found or does not match intf */
758   u8 address[16];
759 };
760
761 /** \brief Want Stats, register for stats updates
762     @param client_index - opaque cookie to identify the sender
763     @param context - sender context, to match reply w/ request
764     @param enable_disable - 1 = enable stats, 0 = disable
765     @param pid - pid of process requesting stats updates
766 */
767 define want_stats
768 {
769   u32 client_index;
770   u32 context;
771   u32 enable_disable;
772   u32 pid;
773 };
774
775 /** \brief Reply for Want Stats request
776     @param context - returned sender context, to match reply w/ request
777     @param retval - return code
778 */
779 define want_stats_reply
780 {
781   u32 context;
782   i32 retval;
783 };
784
785 /** \brief Want stats counters structure 
786     @param vnet_counter_type- such as ip4, ip6, punts, etc
787     @param is_combined - rx & tx total (all types) counts   
788     @param first_sw_if_index - first sw index in block of index, counts
789     @param count - number of interfaces this stats block includes counters for
790     @param data - contiguous block of vlib_counter_t structures 
791 */
792 define vnet_interface_counters
793 {
794   /* enums - plural - in vnet/interface.h */
795   u8 vnet_counter_type;
796   u8 is_combined;
797   u32 first_sw_if_index;
798   u32 count;
799   u8 data[count];
800 };
801
802 typeonly manual_print manual_endian define ip4_fib_counter
803 {
804   u32 address;
805   u8 address_length;
806   u64 packets;
807   u64 bytes;
808 };
809
810 manual_print manual_endian define vnet_ip4_fib_counters
811 {
812   u32 vrf_id;
813   u32 count;
814   vl_api_ip4_fib_counter_t c[count];
815 };
816
817 typeonly manual_print manual_endian define ip6_fib_counter
818 {
819   u64 address[2];
820   u8 address_length;
821   u64 packets;
822   u64 bytes;
823 };
824
825 manual_print manual_endian define vnet_ip6_fib_counters
826 {
827   u32 vrf_id;
828   u32 count;
829   vl_api_ip6_fib_counter_t c[count];
830 };
831
832 /** \brief Request for a single block of summary stats
833     @param client_index - opaque cookie to identify the sender
834     @param context - sender context, to match reply w/ request
835 */
836 define vnet_get_summary_stats
837 {
838   u32 client_index;
839   u32 context;
840 };
841
842 /** \brief Reply for vnet_get_summary_stats request
843     @param context - sender context, to match reply w/ request
844     @param retval - return code for request
845     @param total_pkts -  
846     @param total_bytes -
847     @param vector_rate - 
848 */
849 define vnet_summary_stats_reply
850 {
851   u32 context;
852   i32 retval;
853   u64 total_pkts[2];
854   u64 total_bytes[2];
855   f64 vector_rate;
856 };
857
858 /** \brief OAM event structure
859     @param dst_address[] - 
860     @param state
861 */
862 define oam_event
863 {
864   u8 dst_address[4];
865   u8 state;
866 };
867
868 /** \brief Want OAM events request
869     @param client_index - opaque cookie to identify the sender
870     @param context - sender context, to match reply w/ request
871     @param enable_disable- enable if non-zero, else disable
872     @param pid - pid of the requesting process
873 */
874 define want_oam_events
875 {
876   u32 client_index;
877   u32 context;
878   u32 enable_disable;
879   u32 pid;
880 };
881
882 /** \brief Want OAM events response
883     @param context - sender context, to match reply w/ request
884     @param retval - return code for the want oam stats request
885 */
886 define want_oam_events_reply
887 {
888   u32 context;
889   i32 retval;
890 };
891
892 /** \brief OAM add / del target request
893     @param client_index - opaque cookie to identify the sender
894     @param context - sender context, to match reply w/ request
895     @param vrf_id - vrf_id of the target
896     @param src_address[] - source address to use for the updates 
897     @param dst_address[] - destination address of the target
898     @param is_add - add target if non-zero, else delete
899 */
900 define oam_add_del
901 {
902   u32 client_index;
903   u32 context;
904   u32 vrf_id;
905   u8 src_address[4];
906   u8 dst_address[4];
907   u8 is_add;
908 };
909
910 /** \brief OAM add / del target response
911     @param context - sender context, to match reply w/ request
912     @param retval - return code of the request
913 */
914 define oam_add_del_reply
915 {
916   u32 context;
917   i32 retval;
918 };
919
920 /** \brief Reset fib table request
921     @param client_index - opaque cookie to identify the sender
922     @param context - sender context, to match reply w/ request
923     @param vrf_id - vrf/table id of the fib table to reset
924     @param is_ipv6 - an ipv6 fib to reset if non-zero, else ipv4
925 */
926 define reset_fib
927 {
928   u32 client_index;
929   u32 context;
930   u32 vrf_id;
931   u8 is_ipv6;
932 };
933
934 /** \brief Reset fib response
935     @param context - sender context, to match reply w/ request
936     @param retval - return code for the reset bfib request
937 */
938 define reset_fib_reply
939 {
940   u32 context;
941   i32 retval;
942 };
943
944 /** \brief DHCP Proxy config add / del request
945     @param client_index - opaque cookie to identify the sender
946     @param context - sender context, to match reply w/ request
947     @param vrf_id - vrf id
948     @param if_ipv6 - ipv6 if non-zero, else ipv4
949     @param is_add - add the config if non-zero, else delete
950     @param insert_circuit_id - option82 suboption 1 fib number
951     @param dhcp_server[] - server address
952     @param dhcp_src_address[] - <fix this, need details>
953 */
954 define dhcp_proxy_config
955 {
956   u32 client_index;
957   u32 context;
958   u32 vrf_id;
959   u8 is_ipv6;
960   u8 is_add;
961   u8 insert_circuit_id;
962   u8 dhcp_server[16];
963   u8 dhcp_src_address[16];
964 };
965
966 /** \brief DHCP Proxy config response
967     @param context - sender context, to match reply w/ request
968     @param retval - return code for the request
969 */
970 define dhcp_proxy_config_reply
971 {
972   u32 context;
973   i32 retval;
974 };
975
976 /** \brief DHCP Proxy set / unset vss request
977     @param client_index - opaque cookie to identify the sender
978     @param context - sender context, to match reply w/ request
979     @param tbl_id - table id
980     @param oui - first part of vpn id
981     @param fib_id - second part of vpn id
982     @param is_ipv6 - ip6 if non-zero, else ip4
983     @param is_add - set vss if non-zero, else delete
984 */
985 define dhcp_proxy_set_vss
986 {
987   u32 client_index;
988   u32 context;
989   u32 tbl_id;
990   u32 oui;
991   u32 fib_id;
992   u8 is_ipv6;
993   u8 is_add;
994 };
995
996 /** \brief DHCP proxy set / unset vss response
997     @param context - sender context, to match reply w/ request
998     @param retval - return code for the request
999 */
1000 define dhcp_proxy_set_vss_reply
1001 {
1002   u32 context;
1003   i32 retval;
1004 };
1005
1006 /** \brief Set the ip flow hash config for a fib request
1007     @param client_index - opaque cookie to identify the sender
1008     @param context - sender context, to match reply w/ request
1009     @param vrf_id - vrf/fib id
1010     @param is_ipv6 - if non-zero the fib is ip6, else ip4
1011     @param src - if non-zero include src in flow hash
1012     @param dst - if non-zero include dst in flow hash
1013     @param sport - if non-zero include sport in flow hash
1014     @param dport - if non-zero include dport in flow hash
1015     @param proto -if non-zero include proto in flow hash
1016     @param reverse - if non-zero include reverse in flow hash
1017 */
1018 define set_ip_flow_hash
1019 {
1020   u32 client_index;
1021   u32 context;
1022   u32 vrf_id;
1023   u8 is_ipv6;
1024   u8 src;
1025   u8 dst;
1026   u8 sport;
1027   u8 dport;
1028   u8 proto;
1029   u8 reverse;
1030 };
1031
1032 /** \brief Set the ip flow hash config for a fib response
1033     @param context - sender context, to match reply w/ request
1034     @param retval - return code for the request
1035 */
1036 define set_ip_flow_hash_reply
1037 {
1038   u32 context;
1039   i32 retval;
1040 };
1041
1042 /** \brief IPv6 router advertisement config request
1043     @param client_index - opaque cookie to identify the sender
1044     @param context - sender context, to match reply w/ request
1045     @param suppress -
1046     @param managed -
1047     @param other -
1048     @param ll_option -
1049     @param send_unicast -
1050     @param cease -
1051     @param is_no -
1052     @param default_router -
1053     @param max_interval -
1054     @param min_interval -
1055     @param lifetime -
1056     @param initial_count -
1057     @param initial_interval -
1058 */
1059 define sw_interface_ip6nd_ra_config
1060 {
1061   u32 client_index;
1062   u32 context;
1063   u32 sw_if_index;
1064   u8 suppress;
1065   u8 managed;
1066   u8 other;
1067   u8 ll_option;
1068   u8 send_unicast;
1069   u8 cease;
1070   u8 is_no;
1071   u8 default_router;
1072   u32 max_interval;
1073   u32 min_interval;
1074   u32 lifetime;
1075   u32 initial_count;
1076   u32 initial_interval;
1077 };
1078
1079 /** \brief IPv6 router advertisement config response
1080     @param context - sender context, to match reply w/ request
1081     @param retval - return code for the request
1082 */
1083 define sw_interface_ip6nd_ra_config_reply
1084 {
1085   u32 context;
1086   i32 retval;
1087 };
1088
1089 /** \brief IPv6 router advertisement prefix config request
1090     @param client_index - opaque cookie to identify the sender
1091     @param context - sender context, to match reply w/ request
1092     @param sw_if_index - 
1093     @param address[] -
1094     @param address_length -
1095     @param use_default -
1096     @param no_advertise -
1097     @param off_link -
1098     @param no_autoconfig -
1099     @param no_onlink -
1100     @param is_no -
1101     @param val_lifetime -
1102     @param pref_lifetime -
1103 */
1104 define sw_interface_ip6nd_ra_prefix
1105 {
1106   u32 client_index;
1107   u32 context;
1108   u32 sw_if_index;
1109   u8 address[16];
1110   u8 address_length;
1111   u8 use_default;
1112   u8 no_advertise;
1113   u8 off_link;
1114   u8 no_autoconfig;
1115   u8 no_onlink;
1116   u8 is_no;
1117   u32 val_lifetime;
1118   u32 pref_lifetime;
1119 };
1120
1121 /** \brief IPv6 router advertisement prefix config response
1122     @param context - sender context, to match reply w/ request
1123     @param retval - return code for the request
1124 */
1125 define sw_interface_ip6nd_ra_prefix_reply
1126 {
1127   u32 context;
1128   i32 retval;
1129 };
1130
1131 /** \brief IPv6 interface enable / disable request
1132     @param client_index - opaque cookie to identify the sender
1133     @param context - sender context, to match reply w/ request
1134     @param sw_if_index - interface used to reach neighbor
1135     @param enable - if non-zero enable ip6 on interface, else disable
1136 */
1137 define sw_interface_ip6_enable_disable
1138 {
1139   u32 client_index;
1140   u32 context;
1141   u32 sw_if_index;
1142   u8 enable;                    /* set to true if enable */
1143 };
1144
1145 /** \brief IPv6 interface enable / disable response
1146     @param context - sender context, to match reply w/ request
1147     @param retval - return code for the request
1148 */
1149 define sw_interface_ip6_enable_disable_reply
1150 {
1151   u32 context;
1152   i32 retval;
1153 };
1154
1155 /** \brief IPv6 set link local address on interface request
1156     @param client_index - opaque cookie to identify the sender
1157     @param context - sender context, to match reply w/ request
1158     @param sw_if_index - interface to set link local on
1159     @param address[] - the new link local address
1160     @param address_length - link local address length
1161 */
1162 define sw_interface_ip6_set_link_local_address
1163 {
1164   u32 client_index;
1165   u32 context;
1166   u32 sw_if_index;
1167   u8 address[16];
1168   u8 address_length;
1169 };
1170
1171 /** \brief IPv6 set link local address on interface response
1172     @param context - sender context, to match reply w/ request
1173     @param retval - error code for the request
1174 */
1175 define sw_interface_ip6_set_link_local_address_reply
1176 {
1177   u32 context;
1178   i32 retval;
1179 };
1180
1181 /** \brief Set unnumbered interface add / del request
1182     @param client_index - opaque cookie to identify the sender
1183     @param context - sender context, to match reply w/ request
1184     @param sw_if_index - interface with an IP address
1185     @param unnumbered_sw_if_index - interface which will use the address
1186     @param is_add - if non-zero set the association, else unset it
1187 */
1188 define sw_interface_set_unnumbered
1189 {
1190   u32 client_index;
1191   u32 context;
1192   u32 sw_if_index;              /* use this intfc address */
1193   u32 unnumbered_sw_if_index;   /* on this interface */
1194   u8 is_add;
1195 };
1196
1197 /** \brief Set unnumbered interface add / del response
1198     @param context - sender context, to match reply w/ request
1199     @param retval - return code for the request
1200 */
1201 define sw_interface_set_unnumbered_reply
1202 {
1203   u32 context;
1204   i32 retval;
1205 };
1206
1207 /** \brief Create loopback interface request
1208     @param client_index - opaque cookie to identify the sender
1209     @param context - sender context, to match reply w/ request
1210     @param mac_address - mac addr to assign to the interface if none-zero
1211 */
1212 define create_loopback
1213 {
1214   u32 client_index;
1215   u32 context;
1216   u8 mac_address[6];
1217 };
1218
1219 /** \brief Create loopback interface response
1220     @param context - sender context, to match reply w/ request
1221     @param sw_if_index - sw index of the interface that was created
1222     @param retval - return code for the request
1223 */
1224 define create_loopback_reply
1225 {
1226   u32 context;
1227   i32 retval;
1228   u32 sw_if_index;
1229 };
1230
1231 /** \brief Delete loopback interface request
1232     @param client_index - opaque cookie to identify the sender
1233     @param context - sender context, to match reply w/ request
1234     @param sw_if_index - sw index of the interface that was created
1235 */
1236 define delete_loopback
1237 {
1238   u32 client_index;
1239   u32 context;
1240   u32 sw_if_index;
1241 };
1242
1243 /** \brief Delete loopback interface response
1244     @param context - sender context, to match reply w/ request
1245     @param retval - return code for the request
1246 */
1247 define delete_loopback_reply
1248 {
1249   u32 context;
1250   i32 retval;
1251 };
1252
1253 /** \brief Control ping from client to api server request
1254     @param client_index - opaque cookie to identify the sender
1255     @param context - sender context, to match reply w/ request
1256 */
1257 define control_ping
1258 {
1259   u32 client_index;
1260   u32 context;
1261 };
1262
1263 /** \brief Control ping from the client to the server response
1264     @param client_index - opaque cookie to identify the sender
1265     @param context - sender context, to match reply w/ request
1266     @param retval - return code for the request
1267     @param vpe_pid - the pid of the vpe, returned by the server
1268 */
1269 define control_ping_reply
1270 {
1271   u32 context;
1272   i32 retval;
1273   u32 client_index;
1274   u32 vpe_pid;
1275 };
1276
1277 /** \brief Process a vpe parser cli string request
1278     @param client_index - opaque cookie to identify the sender
1279     @param context - sender context, to match reply w/ request
1280     @param cmd_in_shmem - pointer to cli command string
1281 */
1282 define cli_request
1283 {
1284   u32 client_index;
1285   u32 context;
1286   u64 cmd_in_shmem;
1287 };
1288 define cli_inband
1289 {
1290   u32 client_index;
1291   u32 context;
1292   u32 length;
1293   u8 cmd[length];
1294 };
1295
1296 /** \brief vpe parser cli string response
1297     @param context - sender context, to match reply w/ request
1298     @param retval - return code for request
1299     @param reply_in_shmem - Reply string from cli processing if any
1300 */
1301 define cli_reply
1302 {
1303   u32 context;
1304   i32 retval;
1305   u64 reply_in_shmem;
1306 };
1307 define cli_inband_reply
1308 {
1309   u32 context;
1310   i32 retval;
1311   u32 length;
1312   u8 reply[length];
1313 };
1314
1315 /** \brief Set max allowed ARP or ip6 neighbor entries request
1316     @param client_index - opaque cookie to identify the sender
1317     @param context - sender context, to match reply w/ request
1318     @param is_ipv6 - neighbor limit if non-zero, else ARP limit
1319     @param arp_neighbor_limit - the new limit, defaults are ~ 50k
1320 */
1321 define set_arp_neighbor_limit
1322 {
1323   u32 client_index;
1324   u32 context;
1325   u8 is_ipv6;
1326   u32 arp_neighbor_limit;
1327 };
1328
1329 /** \brief Set max allowed ARP or ip6 neighbor entries response
1330     @param context - sender context, to match reply w/ request
1331     @param retval - return code for request
1332 */
1333 define set_arp_neighbor_limit_reply
1334 {
1335   u32 context;
1336   i32 retval;
1337 };
1338
1339 /** \brief L2 interface patch add / del request
1340     @param client_index - opaque cookie to identify the sender
1341     @param context - sender context, to match reply w/ request
1342     @param rx_sw_if_index - receive side interface 
1343     @param tx_sw_if_index - transmit side interface
1344     @param is_add - if non-zero set up the interface patch, else remove it
1345 */
1346 define l2_patch_add_del
1347 {
1348   u32 client_index;
1349   u32 context;
1350   u32 rx_sw_if_index;
1351   u32 tx_sw_if_index;
1352   u8 is_add;
1353 };
1354
1355 /** \brief L2 interface patch add / del response
1356     @param context - sender context, to match reply w/ request
1357     @param retval - return code for the request
1358 */
1359 define l2_patch_add_del_reply
1360 {
1361   u32 context;
1362   i32 retval;
1363 };
1364
1365 /** \brief IPv6 segment routing tunnel add / del request
1366     @param client_index - opaque cookie to identify the sender
1367     @param context - sender context, to match reply w/ request
1368     @param is_add - add the tunnel if non-zero, else delete it
1369     @param name[] - tunnel name (len. 64)
1370     @param src_address[] -
1371     @param dst_address[] -
1372     @param dst_mask_width -
1373     @param inner_vrf_id -
1374     @param outer_vrf_id -
1375     @param flags_net_byte_order -
1376     @param n_segments -
1377     @param n_tags -
1378     @param segs_and_tags[] -
1379     @param policy_name[] - name of policy to associate this tunnel to (len. 64)
1380 */
1381 define sr_tunnel_add_del
1382 {
1383   u32 client_index;
1384   u32 context;
1385   u8 is_add;
1386   u8 name[64];
1387   u8 src_address[16];
1388   u8 dst_address[16];
1389   u8 dst_mask_width;
1390   u32 inner_vrf_id;
1391   u32 outer_vrf_id;
1392   u16 flags_net_byte_order;
1393   u8 n_segments;
1394   u8 n_tags;
1395   u8 segs_and_tags[0];
1396   u8 policy_name[64];
1397 };
1398
1399 /** \brief IPv6 segment routing tunnel add / del response
1400     @param context - sender context, to match reply w/ request
1401     @param retval - return value for request
1402 */
1403 define sr_tunnel_add_del_reply
1404 {
1405   u32 context;
1406   i32 retval;
1407 };
1408
1409 /** \brief IPv6 segment routing policy add / del request
1410     @param client_index - opaque cookie to identify the sender
1411     @param context - sender context, to match reply w/ request
1412     @param is_add - add the tunnel if non-zero, else delete it
1413     @param name[] - policy name (len. 64)
1414     @param tunnel_names[] -
1415 */
1416 define sr_policy_add_del
1417 {
1418   u32 client_index;
1419   u32 context;
1420   u8 is_add;
1421   u8 name[64];
1422   u8 tunnel_names[0];
1423 };
1424
1425 /** \brief IPv6 segment routing policy add / del response
1426     @param context - sender context, to match reply w/ request
1427     @param retval - return value for request
1428 */
1429 define sr_policy_add_del_reply
1430 {
1431   u32 context;
1432   i32 retval;
1433 };
1434
1435 /** \brief IPv6 segment routing multicast map to policy add / del request
1436     @param client_index - opaque cookie to identify the sender
1437     @param context - sender context, to match reply w/ request
1438     @param is_add - add the tunnel if non-zero, else delete it
1439     @param multicast_address[] - IP6 multicast address
1440     @param policy_name[] = policy name (len.64)
1441 */
1442 define sr_multicast_map_add_del
1443 {
1444   u32 client_index;
1445   u32 context;
1446   u8 is_add;
1447   u8 multicast_address[16];
1448   u8 policy_name[64];
1449 };
1450
1451 /** \brief IPv6 segment routing multicast map to policy add / del response
1452     @param context - sender context, to match reply w/ request
1453     @param retval - return value for request
1454 */
1455 define sr_multicast_map_add_del_reply
1456 {
1457   u32 context;
1458   i32 retval;
1459 };
1460
1461 /** \brief Interface set vpath request
1462     @param client_index - opaque cookie to identify the sender
1463     @param context - sender context, to match reply w/ request
1464     @param sw_if_index - interface used to reach neighbor
1465     @param enable - if non-zero enable, else disable
1466 */
1467 define sw_interface_set_vpath
1468 {
1469   u32 client_index;
1470   u32 context;
1471   u32 sw_if_index;
1472   u8 enable;
1473 };
1474
1475 /** \brief Interface set vpath response
1476     @param context - sender context, to match reply w/ request
1477     @param retval - return code for the request
1478 */
1479 define sw_interface_set_vpath_reply
1480 {
1481   u32 context;
1482   i32 retval;
1483 };
1484
1485 /** \brief Interface set vxlan-bypass request
1486     @param client_index - opaque cookie to identify the sender
1487     @param context - sender context, to match reply w/ request
1488     @param sw_if_index - interface used to reach neighbor
1489     @param is_ipv6 - if non-zero, enable ipv6-vxlan-bypass, else ipv4-vxlan-bypass
1490     @param enable - if non-zero enable, else disable
1491 */
1492 define sw_interface_set_vxlan_bypass
1493 {
1494   u32 client_index;
1495   u32 context;
1496   u32 sw_if_index;
1497   u8 is_ipv6;
1498   u8 enable;
1499 };
1500
1501 /** \brief Interface set vxlan-bypass response
1502     @param context - sender context, to match reply w/ request
1503     @param retval - return code for the request
1504 */
1505 define sw_interface_set_vxlan_bypass_reply
1506 {
1507   u32 context;
1508   i32 retval;
1509 };
1510
1511 /** \brief MPLS Ethernet add / del tunnel request
1512     @param client_index - opaque cookie to identify the sender
1513     @param context - sender context, to match reply w/ request
1514     @param vrf_id - vrf_id, only for IP4
1515     @param sw_if_index - interface used to reach neighbor
1516     @param is_add - add if set, tunnel delete if 0
1517     @param dst_mac_address - 
1518     @param adj_address - 
1519     @param adj_address_length -
1520 */
1521 define mpls_ethernet_add_del_tunnel
1522 {
1523   u32 client_index;
1524   u32 context;
1525   u32 vrf_id;
1526   u32 tx_sw_if_index;
1527   u8 is_add;
1528   u8 l2_only;
1529   u8 dst_mac_address[6];
1530   u8 adj_address[4];
1531   u8 adj_address_length;
1532 };
1533
1534 /** \brief Reply for MPLS Ethernet add / delete tunnel request
1535     @param context - sender context, to match reply w/ request
1536     @param retval - return code for the request
1537 */
1538 define mpls_ethernet_add_del_tunnel_reply
1539 {
1540   u32 context;
1541   i32 retval;
1542   u32 tunnel_sw_if_index;
1543 };
1544 /** \brief MPLS Ethernet add/ del tunnel 2
1545     @param client_index - opaque cookie to identify the sender
1546     @param context - sender context, to match reply w/ request
1547     @param inner_vrf_id - 
1548     @param outer_vrf_id - 
1549     @param resolve_attempts - 
1550     @param resolve_opaque - 
1551     @param resolve_if_needed -
1552     @param is_add -
1553     @param adj_address -
1554     @param adj_address_length -
1555     @param next_hop_ip4_address_in_outer_vrf -
1556 */
1557 define mpls_ethernet_add_del_tunnel_2
1558 {
1559   u32 client_index;
1560   u32 context;
1561   u32 inner_vrf_id;
1562   u32 outer_vrf_id;
1563   u32 resolve_attempts;
1564   u32 resolve_opaque;           /* no need to set this */
1565   u8 resolve_if_needed;
1566   u8 is_add;
1567   u8 l2_only;
1568   u8 adj_address[4];
1569   u8 adj_address_length;
1570   u8 next_hop_ip4_address_in_outer_vrf[4];
1571 };
1572
1573 /** \brief MPLS Ethernet add/ del tunnel 2
1574     @param context - sender context, to match reply w/ request
1575     @param retval - return code for add /del request
1576 */
1577 define mpls_ethernet_add_del_tunnel_2_reply
1578 {
1579   u32 context;
1580   i32 retval;
1581 };
1582
1583 /** \brief Set L2 XConnect between two interfaces request
1584     @param client_index - opaque cookie to identify the sender
1585     @param context - sender context, to match reply w/ request
1586     @param rx_sw_if_index - Receive interface index
1587     @param tx_sw_if_index - Transmit interface index
1588     @param enable - enable xconnect if not 0, else set to L3 mode
1589 */
1590 define sw_interface_set_l2_xconnect
1591 {
1592   u32 client_index;
1593   u32 context;
1594   u32 rx_sw_if_index;
1595   u32 tx_sw_if_index;
1596   u8 enable;
1597 };
1598
1599 /** \brief Set L2 XConnect response
1600     @param context - sender context, to match reply w/ request
1601     @param retval - L2 XConnect request return code
1602 */
1603 define sw_interface_set_l2_xconnect_reply
1604 {
1605   u32 context;
1606   i32 retval;
1607 };
1608
1609 /** \brief Interface bridge mode request
1610     @param client_index - opaque cookie to identify the sender
1611     @param context - sender context, to match reply w/ request
1612     @param rx_sw_if_index - the interface
1613     @param bd_id - bridge domain id
1614     @param bvi - Setup interface as a bvi, bridge mode only
1615     @param shg - Shared horizon group, for bridge mode only
1616     @param enable - Enable beige mode if not 0, else set to L3 mode
1617 */
1618 define sw_interface_set_l2_bridge
1619 {
1620   u32 client_index;
1621   u32 context;
1622   u32 rx_sw_if_index;
1623   u32 bd_id;
1624   u8 shg;
1625   u8 bvi;
1626   u8 enable;
1627 };
1628
1629 /** \brief Interface bridge mode response
1630     @param context - sender context, to match reply w/ request
1631     @param retval - Bridge mode request return code
1632 */
1633 define sw_interface_set_l2_bridge_reply
1634 {
1635   u32 context;
1636   i32 retval;
1637 };
1638
1639 /** \brief L2 FIB add entry request
1640     @param client_index - opaque cookie to identify the sender
1641     @param context - sender context, to match reply w/ request
1642     @param mac - the entry's mac address
1643     @param bd_id - the entry's bridge domain id
1644     @param sw_if_index - the interface
1645     @param is_add - If non zero add the entry, else delete it
1646     @param static_mac - 
1647     @param filter_mac -
1648 */
1649 define l2fib_add_del
1650 {
1651   u32 client_index;
1652   u32 context;
1653   u64 mac;
1654   u32 bd_id;
1655   u32 sw_if_index;
1656   u8 is_add;
1657   u8 static_mac;
1658   u8 filter_mac;
1659   u8 bvi_mac;
1660 };
1661
1662 /** \brief L2 FIB add entry response
1663     @param context - sender context, to match reply w/ request
1664     @param retval - return code for the add l2fib entry request
1665 */
1666 define l2fib_add_del_reply
1667 {
1668   u32 context;
1669   i32 retval;
1670 };
1671
1672 /** \brief Set L2 flags request !!! TODO - need more info, feature bits in l2_input.h
1673     @param client_index - opaque cookie to identify the sender
1674     @param context - sender context, to match reply w/ request
1675     @param sw_if_index - interface 
1676     @param is_set - if non-zero, set the bits, else clear them
1677     @param feature_bitmap - non-zero bits to set or clear
1678 */
1679 define l2_flags
1680 {
1681   u32 client_index;
1682   u32 context;
1683   u32 sw_if_index;
1684   u8 is_set;
1685   u32 feature_bitmap;
1686 };
1687
1688 /** \brief Set L2 bits response
1689     @param context - sender context, to match reply w/ request
1690     @param retval - return code for the set l2 bits request
1691 */
1692 define l2_flags_reply
1693 {
1694   u32 context;
1695   i32 retval;
1696   u32 resulting_feature_bitmap;
1697 };
1698
1699 /** \brief Set bridge flags (such as L2_LEARN, L2_FWD, L2_FLOOD, 
1700     L2_UU_FLOOD, or L2_ARP_TERM) request
1701     @param client_index - opaque cookie to identify the sender
1702     @param context - sender context, to match reply w/ request
1703     @param bd_id - the bridge domain to set the flags for
1704     @param is_set - if non-zero, set the flags, else clear them
1705     @param feature_bitmap - bits that are non-zero to set or clear
1706 */
1707 define bridge_flags
1708 {
1709   u32 client_index;
1710   u32 context;
1711   u32 bd_id;
1712   u8 is_set;
1713   u32 feature_bitmap;
1714 };
1715
1716 /** \brief Set bridge flags response
1717     @param context - sender context, to match reply w/ request
1718     @param retval - return code for the set bridge flags request
1719     @param resulting_feature_bitmap - the feature bitmap value after the request is implemented
1720 */
1721 define bridge_flags_reply
1722 {
1723   u32 context;
1724   i32 retval;
1725   u32 resulting_feature_bitmap;
1726 };
1727
1728 /** \brief Set bridge domain ip to mac entry request
1729     @param client_index - opaque cookie to identify the sender
1730     @param context - sender context, to match reply w/ request
1731     @param bd_id - the bridge domain to set the flags for
1732     @param is_add - if non-zero, add the entry, else clear it
1733     @param is_ipv6 - if non-zero, ipv6 address, else ipv4 address
1734     @param mac_address - MAC address
1735     @param 
1736 */
1737 define bd_ip_mac_add_del
1738 {
1739   u32 client_index;
1740   u32 context;
1741   u32 bd_id;
1742   u8 is_add;
1743   u8 is_ipv6;
1744   u8 ip_address[16];
1745   u8 mac_address[6];
1746 };
1747
1748 /** \brief Set bridge domain ip to mac entry response
1749     @param context - sender context, to match reply w/ request
1750     @param retval - return code for the set bridge flags request
1751 */
1752 define bd_ip_mac_add_del_reply
1753 {
1754   u32 context;
1755   i32 retval;
1756 };
1757
1758 /** \brief Add/Delete classification table request
1759     @param client_index - opaque cookie to identify the sender
1760     @param context - sender context, to match reply w/ request
1761     @param is_add- if non-zero add the table, else delete it
1762     @param table_index - if add, reuturns index of the created table, else specifies the table to delete  
1763     @param nbuckets - number of buckets when adding a table
1764     @param memory_size - memory size when adding a table
1765     @param match_n_vectors - number of match vectors
1766     @param next_table_index - index of next table
1767     @param miss_next_index - index of miss table
1768     @param current_data_flag - option to use current node's packet payload
1769             as the starting point from where packets are classified,
1770             This option is only valid for L2/L3 input ACL for now.
1771             0: by default, classify data from the buffer's start location
1772             1: classify packets from VPP node’s current data pointer
1773     @param current_data_offset - a signed value to shift the start location of
1774             the packet to be classified
1775             For example, if input IP ACL node is used, L2 header’s first byte
1776             can be accessible by configuring current_data_offset to -14
1777             if there is no vlan tag.
1778             This is valid only if current_data_flag is set to 1.
1779     @param mask[] - match mask
1780 */
1781 define classify_add_del_table
1782 {
1783   u32 client_index;
1784   u32 context;
1785   u8 is_add;
1786   u32 table_index;
1787   u32 nbuckets;
1788   u32 memory_size;
1789   u32 skip_n_vectors;
1790   u32 match_n_vectors;
1791   u32 next_table_index;
1792   u32 miss_next_index;
1793   u32 current_data_flag;
1794   i32 current_data_offset;
1795   u8 mask[0];
1796 };
1797
1798 /** \brief Add/Delete classification table response
1799     @param context - sender context, to match reply w/ request
1800     @param retval - return code for the table add/del requst
1801     @param new_table_index - for add, returned index of the new table
1802     @param skip_n_vectors - for add, returned value of skip_n_vectors in table
1803     @param match_n_vectors -for add, returned value of match_n_vectors in table
1804 */
1805 define classify_add_del_table_reply
1806 {
1807   u32 context;
1808   i32 retval;
1809   u32 new_table_index;
1810   u32 skip_n_vectors;
1811   u32 match_n_vectors;
1812 };
1813
1814 /** \brief Classify add / del session request
1815     @param client_index - opaque cookie to identify the sender
1816     @param context - sender context, to match reply w/ request
1817     @param is_add - add session if non-zero, else delete
1818     @param table_index - index of the table to add/del the session, required
1819     @param hit_next_index - for add, hit_next_index of new session, required
1820     @param opaque_index - for add, opaque_index of new session
1821     @param advance -for add, advance value for session
1822     @param action -
1823            0: no action (by default)
1824               metadata is not used.
1825            1: Classified IP packets will be looked up from the
1826               specified ipv4 fib table (configured by metadata as VRF id).
1827               Only valid for L3 input ACL node
1828            2: Classified IP packets will be looked up from the
1829               specified ipv6 fib table (configured by metadata as VRF id).
1830               Only valid for L3 input ACL node
1831     @param metadata - valid only if action != 0
1832            VRF id if action is 1 or 2.
1833     @param match[] - for add, match value for session, required
1834 */
1835 define classify_add_del_session
1836 {
1837   u32 client_index;
1838   u32 context;
1839   u8 is_add;
1840   u32 table_index;
1841   u32 hit_next_index;
1842   u32 opaque_index;
1843   i32 advance;
1844   u8 action;
1845   u32 metadata;
1846   u8 match[0];
1847 };
1848
1849 /** \brief Classify add / del session response
1850     @param context - sender context, to match reply w/ request
1851     @param retval - return code for the add/del session request
1852 */
1853 define classify_add_del_session_reply
1854 {
1855   u32 context;
1856   i32 retval;
1857 };
1858
1859 /** \brief Set/unset the classification table for an interface request 
1860     @param client_index - opaque cookie to identify the sender
1861     @param context - sender context, to match reply w/ request
1862     @param is_ipv6 - ipv6 if non-zero, else ipv4
1863     @param sw_if_index - interface to associate with the table
1864     @param table_index - index of the table, if ~0 unset the table
1865 */
1866 define classify_set_interface_ip_table
1867 {
1868   u32 client_index;
1869   u32 context;
1870   u8 is_ipv6;
1871   u32 sw_if_index;
1872   u32 table_index;              /* ~0 => off */
1873 };
1874
1875 /** \brief Set/unset interface classification table response 
1876     @param context - sender context, to match reply w/ request
1877     @param retval - return code
1878 */
1879 define classify_set_interface_ip_table_reply
1880 {
1881   u32 context;
1882   i32 retval;
1883 };
1884
1885 /** \brief Set/unset l2 classification tables for an interface request
1886     @param client_index - opaque cookie to identify the sender
1887     @param context - sender context, to match reply w/ request
1888     @param sw_if_index - interface to set/unset tables for
1889     @param ip4_table_index - ip4 index, use ~0 for all 3 indexes to unset
1890     @param ip6_table_index - ip6 index
1891     @param other_table_index - other index
1892 */
1893 define classify_set_interface_l2_tables
1894 {
1895   u32 client_index;
1896   u32 context;
1897   u32 sw_if_index;
1898   /* 3 x ~0 => off */
1899   u32 ip4_table_index;
1900   u32 ip6_table_index;
1901   u32 other_table_index;
1902   u8 is_input;
1903 };
1904
1905 /** \brief Set/unset l2 classification tables for an interface response
1906     @param context - sender context, to match reply w/ request
1907     @param retval - return code for the request
1908 */
1909 define classify_set_interface_l2_tables_reply
1910 {
1911   u32 context;
1912   i32 retval;
1913 };
1914
1915 /** \brief Get node index using name request
1916     @param client_index - opaque cookie to identify the sender
1917     @param context - sender context, to match reply w/ request
1918     @param node_name[] - name of the node
1919 */
1920 define get_node_index
1921 {
1922   u32 client_index;
1923   u32 context;
1924   u8 node_name[64];
1925 };
1926
1927 /** \brief Get node index using name request
1928     @param context - sender context, to match reply w/ request
1929     @param retval - return code for the request
1930     @param node_index - index of the desired node if found, else ~0
1931 */
1932 define get_node_index_reply
1933 {
1934   u32 context;
1935   i32 retval;
1936   u32 node_index;
1937 };
1938
1939 /** \brief Set the next node for a given node request
1940     @param client_index - opaque cookie to identify the sender
1941     @param context - sender context, to match reply w/ request
1942     @param node_name[] - node to add the next node to
1943     @param next_name[] - node to add as the next node
1944 */
1945 define add_node_next
1946 {
1947   u32 client_index;
1948   u32 context;
1949   u8 node_name[64];
1950   u8 next_name[64];
1951 };
1952
1953 /** \brief IP Set the next node for a given node response
1954     @param context - sender context, to match reply w/ request
1955     @param retval - return code for the add next node request
1956     @param next_index - the index of the next node if success, else ~0
1957 */
1958 define add_node_next_reply
1959 {
1960   u32 context;
1961   i32 retval;
1962   u32 next_index;
1963 };
1964
1965 /** \brief DHCP Proxy config 2 add / del request
1966     @param client_index - opaque cookie to identify the sender
1967     @param context - sender context, to match reply w/ request
1968     @param rx_vrf_id - receive vrf id
1969     @param server_vrf_id - server vrf id
1970     @param if_ipv6 - ipv6 if non-zero, else ipv4
1971     @param is_add - add the config if non-zero, else delete
1972     @param insert_circuit_id - option82 suboption 1 fib number
1973     @param dhcp_server[] - server address
1974     @param dhcp_src_address[] - <fix this, need details>
1975 */
1976 define dhcp_proxy_config_2
1977 {
1978   u32 client_index;
1979   u32 context;
1980   u32 rx_vrf_id;
1981   u32 server_vrf_id;
1982   u8 is_ipv6;
1983   u8 is_add;
1984   u8 insert_circuit_id;
1985   u8 dhcp_server[16];
1986   u8 dhcp_src_address[16];
1987 };
1988
1989 /** \brief DHCP Proxy config 2 add / del response
1990     @param context - sender context, to match reply w/ request
1991     @param retval - return code for request
1992 */
1993 define dhcp_proxy_config_2_reply
1994 {
1995   u32 context;
1996   i32 retval;
1997 };
1998
1999 /** \brief l2tpv3 tunnel interface create request
2000     @param client_index - opaque cookie to identify the sender
2001     @param context - sender context, to match reply w/ request
2002     @param client_address - remote client tunnel ip address
2003     @param client_address - local tunnel ip address
2004     @param is_ipv6 - ipv6 if non-zero, else ipv4
2005     @param local_session_id - local tunnel session id
2006     @param remote_session_id - remote tunnel session id
2007     @param local_cookie - local tunnel cookie
2008     @param l2_sublayer_present - l2 sublayer is present in packets if non-zero
2009     @param encap_vrf_id - fib identifier used for outgoing encapsulated packets
2010 */
2011 define l2tpv3_create_tunnel
2012 {
2013   u32 client_index;
2014   u32 context;
2015   u8 client_address[16];
2016   u8 our_address[16];
2017   u8 is_ipv6;
2018   u32 local_session_id;
2019   u32 remote_session_id;
2020   u64 local_cookie;
2021   u64 remote_cookie;
2022   u8 l2_sublayer_present;
2023   u32 encap_vrf_id;
2024 };
2025
2026 /** \brief l2tpv3 tunnel interface create response
2027     @param context - sender context, to match reply w/ request
2028     @param retval - return code for the request
2029     @param sw_if_index - index of the new tunnel interface
2030 */
2031 define l2tpv3_create_tunnel_reply
2032 {
2033   u32 context;
2034   i32 retval;
2035   u32 sw_if_index;
2036 };
2037
2038 define l2tpv3_set_tunnel_cookies
2039 {
2040   u32 client_index;
2041   u32 context;
2042   u32 sw_if_index;
2043   u64 new_local_cookie;
2044   u64 new_remote_cookie;
2045 };
2046
2047 /** \brief L2TP tunnel set cookies response
2048     @param context - sender context, to match reply w/ request
2049     @param retval - return code for the request
2050 */
2051 define l2tpv3_set_tunnel_cookies_reply
2052 {
2053   u32 context;
2054   i32 retval;
2055 };
2056
2057 define sw_if_l2tpv3_tunnel_details
2058 {
2059   u32 context;
2060   u32 sw_if_index;
2061   u8 interface_name[64];
2062   u8 client_address[16];
2063   u8 our_address[16];
2064   u32 local_session_id;
2065   u32 remote_session_id;
2066   u64 local_cookie[2];
2067   u64 remote_cookie;
2068   u8 l2_sublayer_present;
2069 };
2070
2071 define sw_if_l2tpv3_tunnel_dump
2072 {
2073   u32 client_index;
2074   u32 context;
2075 };
2076
2077 /** \brief L2 fib clear table request, clear all mac entries in the l2 fib
2078     @param client_index - opaque cookie to identify the sender
2079     @param context - sender context, to match reply w/ request
2080 */
2081 define l2_fib_clear_table
2082 {
2083   u32 client_index;
2084   u32 context;
2085 };
2086
2087 /** \brief L2 fib clear table response
2088     @param context - sender context, to match reply w/ request
2089     @param retval - return code for the request
2090 */
2091 define l2_fib_clear_table_reply
2092 {
2093   u32 context;
2094   i32 retval;
2095 };
2096
2097 /** \brief L2 interface ethernet flow point filtering enable/disable request
2098     @param client_index - opaque cookie to identify the sender
2099     @param context - sender context, to match reply w/ request
2100     @param sw_if_index - interface to enable/disable filtering on
2101     @param enable_disable - if non-zero enable filtering, else disable
2102 */
2103 define l2_interface_efp_filter
2104 {
2105   u32 client_index;
2106   u32 context;
2107   u32 sw_if_index;
2108   u32 enable_disable;
2109 };
2110
2111 /** \brief L2 interface ethernet flow point filtering response
2112     @param context - sender context, to match reply w/ request
2113     @param retval - return code for the request
2114 */
2115 define l2_interface_efp_filter_reply
2116 {
2117   u32 context;
2118   i32 retval;
2119 };
2120
2121 define l2tpv3_interface_enable_disable
2122 {
2123   u32 client_index;
2124   u32 context;
2125   u8 enable_disable;
2126   u32 sw_if_index;
2127 };
2128
2129 define l2tpv3_interface_enable_disable_reply
2130 {
2131   u32 context;
2132   i32 retval;
2133 };
2134
2135 define l2tpv3_set_lookup_key
2136 {
2137   u32 client_index;
2138   u32 context;
2139   /* 0 = ip6 src_address, 1 = ip6 dst_address, 2 = session_id */
2140   u8 key;
2141 };
2142
2143 define l2tpv3_set_lookup_key_reply
2144 {
2145   u32 context;
2146   i32 retval;
2147 };
2148
2149 define vxlan_add_del_tunnel
2150 {
2151   u32 client_index;
2152   u32 context;
2153   u8 is_add;
2154   u8 is_ipv6;
2155   u8 src_address[16];
2156   u8 dst_address[16];
2157   u32 mcast_sw_if_index;
2158   u32 encap_vrf_id;
2159   u32 decap_next_index;
2160   u32 vni;
2161 };
2162
2163 define vxlan_add_del_tunnel_reply
2164 {
2165   u32 context;
2166   i32 retval;
2167   u32 sw_if_index;
2168 };
2169
2170 define vxlan_tunnel_dump
2171 {
2172   u32 client_index;
2173   u32 context;
2174   u32 sw_if_index;
2175 };
2176
2177 define vxlan_tunnel_details
2178 {
2179   u32 context;
2180   u32 sw_if_index;
2181   u8 src_address[16];
2182   u8 dst_address[16];
2183   u32 mcast_sw_if_index;
2184   u32 encap_vrf_id;
2185   u32 decap_next_index;
2186   u32 vni;
2187   u8 is_ipv6;
2188 };
2189
2190 define gre_add_del_tunnel
2191 {
2192   u32 client_index;
2193   u32 context;
2194   u8 is_add;
2195   u8 is_ipv6;
2196   u8 teb;
2197   u8 src_address[16];
2198   u8 dst_address[16];
2199   u32 outer_fib_id;
2200 };
2201
2202 define gre_add_del_tunnel_reply
2203 {
2204   u32 context;
2205   i32 retval;
2206   u32 sw_if_index;
2207 };
2208
2209 define gre_tunnel_dump
2210 {
2211   u32 client_index;
2212   u32 context;
2213   u32 sw_if_index;
2214 };
2215
2216 define gre_tunnel_details
2217 {
2218   u32 context;
2219   u32 sw_if_index;
2220   u8 is_ipv6;
2221   u8 teb;
2222   u8 src_address[16];
2223   u8 dst_address[16];
2224   u32 outer_fib_id;
2225 };
2226
2227 /** \brief L2 interface vlan tag rewrite configure request
2228     @param client_index - opaque cookie to identify the sender
2229     @param context - sender context, to match reply w/ request
2230     @param sw_if_index - interface the operation is applied to
2231     @param vtr_op - Choose from l2_vtr_op_t enum values
2232     @param push_dot1q - first pushed flag dot1q id set, else dot1ad
2233     @param tag1 - Needed for any push or translate vtr op
2234     @param tag2 - Needed for any push 2 or translate x-2 vtr ops
2235 */
2236 define l2_interface_vlan_tag_rewrite
2237 {
2238   u32 client_index;
2239   u32 context;
2240   u32 sw_if_index;
2241   u32 vtr_op;
2242   u32 push_dot1q;               // ethertype of first pushed tag is dot1q/dot1ad
2243   u32 tag1;                     // first pushed tag
2244   u32 tag2;                     // second pushed tag
2245 };
2246
2247 /** \brief L2 interface vlan tag rewrite response
2248     @param context - sender context, to match reply w/ request
2249     @param retval - return code for the request
2250 */
2251 define l2_interface_vlan_tag_rewrite_reply
2252 {
2253   u32 context;
2254   i32 retval;
2255 };
2256
2257 /** \brief vhost-user interface create request
2258     @param client_index - opaque cookie to identify the sender
2259     @param is_server - our side is socket server
2260     @param sock_filename - unix socket filename, used to speak with frontend
2261     @param use_custom_mac - enable or disable the use of the provided hardware address
2262     @param mac_address - hardware address to use if 'use_custom_mac' is set
2263 */
2264 define create_vhost_user_if
2265 {
2266   u32 client_index;
2267   u32 context;
2268   u8 is_server;
2269   u8 sock_filename[256];
2270   u8 renumber;
2271   u32 custom_dev_instance;
2272   u8 use_custom_mac;
2273   u8 mac_address[6];
2274   u8 tag[64];
2275 };
2276
2277 /** \brief vhost-user interface create response
2278     @param context - sender context, to match reply w/ request
2279     @param retval - return code for the request
2280     @param sw_if_index - interface the operation is applied to
2281 */
2282 define create_vhost_user_if_reply
2283 {
2284   u32 context;
2285   i32 retval;
2286   u32 sw_if_index;
2287 };
2288
2289 /** \brief vhost-user interface modify request
2290     @param client_index - opaque cookie to identify the sender
2291     @param is_server - our side is socket server
2292     @param sock_filename - unix socket filename, used to speak with frontend
2293 */
2294 define modify_vhost_user_if
2295 {
2296   u32 client_index;
2297   u32 context;
2298   u32 sw_if_index;
2299   u8 is_server;
2300   u8 sock_filename[256];
2301   u8 renumber;
2302   u32 custom_dev_instance;
2303 };
2304
2305 /** \brief vhost-user interface modify response
2306     @param context - sender context, to match reply w/ request
2307     @param retval - return code for the request
2308 */
2309 define modify_vhost_user_if_reply
2310 {
2311   u32 context;
2312   i32 retval;
2313 };
2314
2315 /** \brief vhost-user interface delete request
2316     @param client_index - opaque cookie to identify the sender
2317 */
2318 define delete_vhost_user_if
2319 {
2320   u32 client_index;
2321   u32 context;
2322   u32 sw_if_index;
2323 };
2324
2325 /** \brief vhost-user interface delete response
2326     @param context - sender context, to match reply w/ request
2327     @param retval - return code for the request
2328 */
2329 define delete_vhost_user_if_reply
2330 {
2331   u32 context;
2332   i32 retval;
2333 };
2334
2335 define create_subif
2336 {
2337   u32 client_index;
2338   u32 context;
2339   u32 sw_if_index;
2340   u32 sub_id;
2341
2342   /* These fields map directly onto the subif template */
2343   u8 no_tags;
2344   u8 one_tag;
2345   u8 two_tags;
2346   u8 dot1ad;                    // 0 = dot1q, 1=dot1ad
2347   u8 exact_match;
2348   u8 default_sub;
2349   u8 outer_vlan_id_any;
2350   u8 inner_vlan_id_any;
2351   u16 outer_vlan_id;
2352   u16 inner_vlan_id;
2353 };
2354
2355 define create_subif_reply
2356 {
2357   u32 context;
2358   i32 retval;
2359   u32 sw_if_index;
2360 };
2361
2362 /** \brief show version
2363     @param client_index - opaque cookie to identify the sender
2364     @param context - sender context, to match reply w/ request
2365 */
2366 define show_version
2367 {
2368   u32 client_index;
2369   u32 context;
2370 };
2371
2372 /** \brief show version response
2373     @param context - sender context, to match reply w/ request
2374     @param retval - return code for the request
2375     @param program - name of the program (vpe)
2376     @param version  - version of the program
2377     @param build_directory - root of the workspace where the program was built
2378 */
2379 define show_version_reply
2380 {
2381   u32 context;
2382   i32 retval;
2383   u8 program[32];
2384   u8 version[32];
2385   u8 build_date[32];
2386   u8 build_directory[256];
2387 };
2388
2389 /** \brief Vhost-user interface details structure (fix this)
2390     @param sw_if_index - index of the interface
2391     @param interface_name - name of interface
2392     @param virtio_net_hdr_sz - net header size
2393     @param features - interface features
2394     @param is_server - vhost-user server socket
2395     @param sock_filename - socket filename
2396     @param num_regions - number of used memory regions
2397 */
2398 define sw_interface_vhost_user_details
2399 {
2400   u32 context;
2401   u32 sw_if_index;
2402   u8 interface_name[64];
2403   u32 virtio_net_hdr_sz;
2404   u64 features;
2405   u8 is_server;
2406   u8 sock_filename[256];
2407   u32 num_regions;
2408   i32 sock_errno;
2409 };
2410
2411 /* works */
2412 define sw_interface_vhost_user_dump
2413 {
2414   u32 client_index;
2415   u32 context;
2416 };
2417
2418 define ip_address_details
2419 {
2420   u32 client_index;
2421   u32 context;
2422   u8 ip[16];
2423   u8 prefix_length;
2424 };
2425
2426 define ip_address_dump
2427 {
2428   u32 client_index;
2429   u32 context;
2430   u32 sw_if_index;
2431   u8 is_ipv6;
2432 };
2433
2434 define ip_details
2435 {
2436   u32 sw_if_index;
2437   u32 context;
2438 };
2439
2440 define ip_dump
2441 {
2442   u32 client_index;
2443   u32 context;
2444   u8 is_ipv6;
2445 };
2446
2447 /** \brief l2 fib table entry structure
2448     @param bd_id - the l2 fib / bridge domain table id
2449     @param mac - the entry's mac address
2450     @param sw_if_index - index of the interface
2451     @param static_mac - the entry is statically configured.
2452     @param filter_mac - the entry is a mac filter entry.
2453     @param bvi_mac - the mac address is a bridge virtual interface
2454 */
2455 define l2_fib_table_entry
2456 {
2457   u32 context;
2458   u32 bd_id;
2459   u64 mac;
2460   u32 sw_if_index;
2461   u8 static_mac;
2462   u8 filter_mac;
2463   u8 bvi_mac;
2464 };
2465
2466 /** \brief Dump l2 fib (aka bridge domain) table
2467     @param client_index - opaque cookie to identify the sender
2468     @param bd_id - the l2 fib / bridge domain table identifier
2469 */
2470 define l2_fib_table_dump
2471 {
2472   u32 client_index;
2473   u32 context;
2474   u32 bd_id;
2475 };
2476
2477 define vxlan_gpe_add_del_tunnel
2478 {
2479   u32 client_index;
2480   u32 context;
2481   u8 is_ipv6;
2482   u8 local[16];
2483   u8 remote[16];
2484   u32 encap_vrf_id;
2485   u32 decap_vrf_id;
2486   u8 protocol;
2487   u32 vni;
2488   u8 is_add;
2489 };
2490
2491 define vxlan_gpe_add_del_tunnel_reply
2492 {
2493   u32 context;
2494   i32 retval;
2495   u32 sw_if_index;
2496 };
2497
2498 define vxlan_gpe_tunnel_dump
2499 {
2500   u32 client_index;
2501   u32 context;
2502   u32 sw_if_index;
2503 };
2504
2505 define vxlan_gpe_tunnel_details
2506 {
2507   u32 context;
2508   u32 sw_if_index;
2509   u8 local[16];
2510   u8 remote[16];
2511   u32 vni;
2512   u8 protocol;
2513   u32 encap_vrf_id;
2514   u32 decap_vrf_id;
2515   u8 is_ipv6;
2516 };
2517
2518 /** \brief add or delete locator_set
2519     @param client_index - opaque cookie to identify the sender
2520     @param context - sender context, to match reply w/ request
2521     @param is_add - add address if non-zero, else delete
2522     @param locator_set_name - locator name
2523     @param locator_num - number of locators
2524     @param locators - LISP locator records
2525         Structure of one locator record is as follows:
2526
2527         define locator_t {
2528           u32 sw_if_index;
2529           u8 priority;
2530           u8 weight;
2531         }
2532 */
2533 define lisp_add_del_locator_set
2534 {
2535   u32 client_index;
2536   u32 context;
2537   u8 is_add;
2538   u8 locator_set_name[64];
2539   u32 locator_num;
2540   u8 locators[0];
2541 };
2542
2543 /** \brief Reply for locator_set add/del
2544     @param context - returned sender context, to match reply w/ request
2545     @param retval - return code
2546     @param ls_index - locator set index
2547 */
2548 define lisp_add_del_locator_set_reply
2549 {
2550   u32 context;
2551   i32 retval;
2552   u32 ls_index;
2553 };
2554
2555 /** \brief add or delete locator for locator_set
2556     @param client_index - opaque cookie to identify the sender
2557     @param context - sender context, to match reply w/ request
2558     @param is_add - add address if non-zero, else delete
2559     @param locator_set_name - name of locator_set to add/del locator
2560     @param sw_if_index - index of the interface
2561     @param priority - priority of the lisp locator
2562     @param weight - weight of the lisp locator
2563 */
2564 define lisp_add_del_locator
2565 {
2566   u32 client_index;
2567   u32 context;
2568   u8 is_add;
2569   u8 locator_set_name[64];
2570   u32 sw_if_index;
2571   u8 priority;
2572   u8 weight;
2573 };
2574
2575 /** \brief Reply for locator add/del
2576     @param context - returned sender context, to match reply w/ request
2577     @param retval - return code
2578 */
2579 define lisp_add_del_locator_reply
2580 {
2581   u32 context;
2582   i32 retval;
2583 };
2584
2585 /** \brief add or delete lisp eid-table
2586     @param client_index - opaque cookie to identify the sender
2587     @param context - sender context, to match reply w/ request
2588     @param is_add - add address if non-zero, else delete
2589     @param eid_type:
2590       0 : ipv4
2591       1 : ipv6
2592       2 : mac
2593     @param eid - EID can be ip4, ip6 or mac
2594     @param prefix_len - prefix len
2595     @param locator_set_name - name of locator_set to add/del eid-table
2596     @param vni - virtual network instance
2597 */
2598 define lisp_add_del_local_eid
2599 {
2600   u32 client_index;
2601   u32 context;
2602   u8 is_add;
2603   u8 eid_type;
2604   u8 eid[16];
2605   u8 prefix_len;
2606   u8 locator_set_name[64];
2607   u32 vni;
2608 };
2609
2610 /** \brief Reply for local_eid add/del
2611     @param context - returned sender context, to match reply w/ request
2612     @param retval - return code
2613 */
2614 define lisp_add_del_local_eid_reply
2615 {
2616   u32 context;
2617   i32 retval;
2618 };
2619
2620 /** \brief add or delete lisp gpe tunnel
2621     @param client_index - opaque cookie to identify the sender
2622     @param context - sender context, to match reply w/ request
2623     @param is_add - add address if non-zero, else delete
2624     @param eid_type -
2625       0 : ipv4
2626       1 : ipv6
2627       2 : mac
2628     @param rmt_eid - remote eid
2629     @param lcl_eid - local eid
2630     @param rmt_len - remote prefix len
2631     @param lcl_len - local prefix len
2632     @param vni - virtual network identifier
2633     @param dp_table - vrf/bridge domain id
2634     @param loc_num - number of locators
2635     @param lcl_locs - array of local locators
2636     @param rmt_locs - array of remote locators
2637     @param action - negative action when 0 locators configured
2638 */
2639 define lisp_gpe_add_del_fwd_entry
2640 {
2641   u32 client_index;
2642   u32 context;
2643   u8 is_add;
2644   u8 eid_type;
2645   u8 rmt_eid[16];
2646   u8 lcl_eid[16];
2647   u8 rmt_len;
2648   u8 lcl_len;
2649   u32 vni;
2650   u32 dp_table;
2651   u32 loc_num;
2652   u8 lcl_locs[loc_num];
2653   u8 rmt_locs[loc_num];
2654   u8 action;
2655 };
2656
2657 /** \brief Reply for gpe_fwd_entry add/del
2658     @param context - returned sender context, to match reply w/ request
2659     @param retval - return code
2660 */
2661 define lisp_gpe_add_del_fwd_entry_reply
2662 {
2663   u32 context;
2664   i32 retval;
2665 };
2666
2667 /** \brief add or delete map-resolver
2668     @param client_index - opaque cookie to identify the sender
2669     @param context - sender context, to match reply w/ request
2670     @param is_add - add address if non-zero, else delete
2671     @param is_ipv6 - if non-zero the address is ipv6, else ipv4
2672     @param ip_address - array of address bytes
2673 */
2674 define lisp_add_del_map_resolver
2675 {
2676   u32 client_index;
2677   u32 context;
2678   u8 is_add;
2679   u8 is_ipv6;
2680   u8 ip_address[16];
2681 };
2682
2683 /** \brief Reply for map_resolver add/del
2684     @param context - returned sender context, to match reply w/ request
2685     @param retval - return code
2686 */
2687 define lisp_add_del_map_resolver_reply
2688 {
2689   u32 context;
2690   i32 retval;
2691 };
2692
2693 /** \brief enable or disable lisp-gpe protocol
2694     @param client_index - opaque cookie to identify the sender
2695     @param context - sender context, to match reply w/ request
2696     @param is_en - enable protocol if non-zero, else disable
2697 */
2698 define lisp_gpe_enable_disable
2699 {
2700   u32 client_index;
2701   u32 context;
2702   u8 is_en;
2703 };
2704
2705 /** \brief Reply for gpe enable/disable
2706     @param context - returned sender context, to match reply w/ request
2707     @param retval - return code
2708 */
2709 define lisp_gpe_enable_disable_reply
2710 {
2711   u32 context;
2712   i32 retval;
2713 };
2714
2715 /** \brief enable or disable LISP feature
2716     @param client_index - opaque cookie to identify the sender
2717     @param context - sender context, to match reply w/ request
2718     @param is_en - enable protocol if non-zero, else disable
2719 */
2720 define lisp_enable_disable
2721 {
2722   u32 client_index;
2723   u32 context;
2724   u8 is_en;
2725 };
2726
2727 /** \brief Reply for gpe enable/disable
2728     @param context - returned sender context, to match reply w/ request
2729     @param retval - return code
2730 */
2731 define lisp_enable_disable_reply
2732 {
2733   u32 context;
2734   i32 retval;
2735 };
2736
2737 /** \brief add or delete gpe_iface
2738     @param client_index - opaque cookie to identify the sender
2739     @param context - sender context, to match reply w/ request
2740     @param is_add - add address if non-zero, else delete
2741 */
2742 define lisp_gpe_add_del_iface
2743 {
2744   u32 client_index;
2745   u32 context;
2746   u8 is_add;
2747   u8 is_l2;
2748   u32 dp_table;
2749   u32 vni;
2750 };
2751
2752 /** \brief Reply for gpe_iface add/del
2753     @param context - returned sender context, to match reply w/ request
2754     @param retval - return code
2755 */
2756 define lisp_gpe_add_del_iface_reply
2757 {
2758   u32 context;
2759   i32 retval;
2760 };
2761
2762 /** \brief configure or disable LISP PITR node
2763     @param client_index - opaque cookie to identify the sender
2764     @param context - sender context, to match reply w/ request
2765     @param ls_name - locator set name
2766     @param is_add - add locator set if non-zero, else disable pitr
2767 */
2768 define lisp_pitr_set_locator_set
2769 {
2770   u32 client_index;
2771   u32 context;
2772   u8 is_add;
2773   u8 ls_name[64];
2774 };
2775
2776 /** \brief Reply for lisp_pitr_set_locator_set
2777     @param context - returned sender context, to match reply w/ request
2778     @param retval - return code
2779 */
2780 define lisp_pitr_set_locator_set_reply
2781 {
2782   u32 context;
2783   i32 retval;
2784 };
2785
2786 /** \brief set LISP map-request mode. Based on configuration VPP will send
2787       src/dest or just normal destination map requests.
2788     @param client_index - opaque cookie to identify the sender
2789     @param context - sender context, to match reply w/ request
2790     @param mode - new map-request mode. Supported values are:
2791       0 - destination only
2792       1 - source/destaination
2793 */
2794 define lisp_map_request_mode
2795 {
2796   u32 client_index;
2797   u32 context;
2798   u8 mode;
2799 };
2800
2801 /** \brief Reply for lisp_map_request_mode
2802     @param context - returned sender context, to match reply w/ request
2803     @param retval - return code
2804 */
2805 define lisp_map_request_mode_reply
2806 {
2807   u32 context;
2808   i32 retval;
2809 };
2810
2811 /** \brief Request for LISP map-request mode
2812     @param client_index - opaque cookie to identify the sender
2813     @param context - sender context, to match reply w/ request
2814 */
2815 define show_lisp_map_request_mode
2816 {
2817   u32 client_index;
2818   u32 context;
2819 };
2820
2821 /** \brief Reply for show_lisp_map_request_mode
2822     @param context - returned sender context, to match reply w/ request
2823     @param retval - return code
2824     @param mode - map-request mode
2825 */
2826 define show_lisp_map_request_mode_reply
2827 {
2828   u32 context;
2829   i32 retval;
2830   u8 mode;
2831 };
2832
2833 /** \brief add or delete remote static mapping
2834     @param client_index - opaque cookie to identify the sender
2835     @param context - sender context, to match reply w/ request
2836     @param is_add - add address if non-zero, else delete
2837     @param is_src_dst - flag indicating src/dst based routing policy
2838     @param del_all - if set, delete all remote mappings
2839     @param vni - virtual network instance
2840     @param action - negative map-reply action
2841     @param eid_type -
2842       0 : ipv4
2843       1 : ipv6
2844       2 : mac
2845     @param deid - dst EID
2846     @param seid - src EID, valid only if is_src_dst is enabled
2847     @param rloc_num - number of remote locators
2848     @param rlocs - remote locator records
2849         Structure of remote locator:
2850
2851         define rloc_t {
2852           u8 is_ip4;
2853           u8 priority;
2854           u8 weight;
2855           u8 addr[16];
2856         }
2857 */
2858 define lisp_add_del_remote_mapping
2859 {
2860   u32 client_index;
2861   u32 context;
2862   u8 is_add;
2863   u8 is_src_dst;
2864   u8 del_all;
2865   u32 vni;
2866   u8 action;
2867   u8 eid_type;
2868   u8 eid[16];
2869   u8 eid_len;
2870   u8 seid[16];
2871   u8 seid_len;
2872   u32 rloc_num;
2873   u8 rlocs[0];
2874 };
2875
2876 /** \brief Reply for lisp_add_del_remote_mapping
2877     @param context - returned sender context, to match reply w/ request
2878     @param retval - return code
2879 */
2880 define lisp_add_del_remote_mapping_reply
2881 {
2882   u32 context;
2883   i32 retval;
2884 };
2885
2886 /** \brief add or delete LISP adjacency adjacency
2887     @param client_index - opaque cookie to identify the sender
2888     @param context - sender context, to match reply w/ request
2889     @param is_add - add address if non-zero, else delete
2890     @param vni - virtual network instance
2891     @param eid_type -
2892       0 : ipv4
2893       1 : ipv6
2894       2 : mac
2895     @param reid - remote EID
2896     @param leid - local EID
2897 */
2898 define lisp_add_del_adjacency
2899 {
2900   u32 client_index;
2901   u32 context;
2902   u8 is_add;
2903   u32 vni;
2904   u8 eid_type;
2905   u8 reid[16];
2906   u8 leid[16];
2907   u8 reid_len;
2908   u8 leid_len;
2909 };
2910
2911 /** \brief Reply for lisp_add_del_adjacency
2912     @param context - returned sender context, to match reply w/ request
2913     @param retval - return code
2914 */
2915 define lisp_add_del_adjacency_reply
2916 {
2917   u32 context;
2918   i32 retval;
2919 };
2920
2921 /** \brief add or delete map request itr rlocs
2922     @param client_index - opaque cookie to identify the sender
2923     @param context - sender context, to match reply w/ request
2924     @param is_add - add address if non-zero, else delete
2925     @param locator_set_name - locator set name
2926 */
2927 define lisp_add_del_map_request_itr_rlocs
2928 {
2929   u32 client_index;
2930   u32 context;
2931   u8 is_add;
2932   u8 locator_set_name[64];
2933 };
2934
2935 /** \brief Reply for lisp_add_del_map_request_itr_rlocs
2936     @param context - returned sender context, to match reply w/ request
2937     @param retval - return code
2938 */
2939
2940 define lisp_add_del_map_request_itr_rlocs_reply
2941 {
2942   u32 context;
2943   i32 retval;
2944 };
2945
2946 /** \brief map/unmap vni/bd_index to vrf
2947     @param client_index - opaque cookie to identify the sender
2948     @param context - sender context, to match reply w/ request
2949     @param is_add - add or delete mapping
2950     @param dp_table - virtual network id/bridge domain index
2951     @param vrf - vrf
2952 */
2953 define lisp_eid_table_add_del_map
2954 {
2955   u32 client_index;
2956   u32 context;
2957   u8 is_add;
2958   u32 vni;
2959   u32 dp_table;
2960   u8 is_l2;
2961 };
2962
2963 /** \brief Reply for lisp_eid_table_add_del_map
2964     @param context - returned sender context, to match reply w/ request
2965     @param retval - return code
2966 */
2967 define lisp_eid_table_add_del_map_reply
2968 {
2969   u32 context;
2970   i32 retval;
2971 };
2972
2973 /** \brief Request for map lisp locator status
2974     @param client_index - opaque cookie to identify the sender
2975     @param context - sender context, to match reply w/ request
2976     @param locator_set_index - index of locator_set
2977     @param ls_name - locator set name
2978     @param is_index_set - flag indicating whether ls_name or ls_index is set
2979  */
2980 define lisp_locator_dump
2981 {
2982   u32 client_index;
2983   u32 context;
2984   u32 ls_index;
2985   u8 ls_name[64];
2986   u8 is_index_set;
2987 };
2988
2989 /** \brief LISP locator_set status
2990     @param local - if is set, then locator is local
2991     @param locator_set_name - name of the locator_set
2992     @param sw_if_index - sw_if_index of the locator
2993     @param priority - locator priority
2994     @param weight - locator weight
2995   */
2996 define lisp_locator_details
2997 {
2998   u32 context;
2999   u8 local;
3000   u32 sw_if_index;
3001   u8 is_ipv6;
3002   u8 ip_address[16];
3003   u8 priority;
3004   u8 weight;
3005 };
3006
3007 /** \brief LISP locator_set status
3008     @param context - sender context, to match reply w/ request
3009     @param ls_index - locator set index
3010     @param ls_name - name of the locator set
3011  */
3012 define lisp_locator_set_details
3013 {
3014   u32 context;
3015   u32 ls_index;
3016   u8 ls_name[64];
3017 };
3018
3019 /** \brief Request for locator_set summary status
3020     @param client_index - opaque cookie to identify the sender
3021     @param context - sender context, to match reply w/ request
3022     @param filter - filter type
3023       Supported values:
3024         0: all locator sets
3025         1: local locator sets
3026         2: remote locator sets
3027  */
3028 define lisp_locator_set_dump
3029 {
3030   u32 client_index;
3031   u32 context;
3032   u8 filter;
3033 };
3034
3035 /** \brief Dump lisp eid-table
3036     @param client_index - opaque cookie to identify the sender
3037     @param context - sender context, to match reply w/ request
3038     @param locator_set_index - index of locator_set, if ~0 then the mapping
3039                                 is negative
3040     @param action - negative map request action
3041     @param is_local - local if non-zero, else remote
3042     @param eid_type:
3043       0 : ipv4
3044       1 : ipv6
3045       2 : mac
3046     @param is_src_dst - EID is type of source/destination
3047     @param eid - EID can be ip4, ip6 or mac
3048     @param eid_prefix_len - prefix length
3049     @param seid - source EID can be ip4, ip6 or mac
3050     @param seid_prefix_len - source prefix length
3051     @param vni - virtual network instance
3052     @param ttl - time to live
3053     @param authoritative - authoritative
3054 */
3055
3056 define lisp_eid_table_details
3057 {
3058   u32 context;
3059   u32 locator_set_index;
3060   u8 action;
3061   u8 is_local;
3062   u8 eid_type;
3063   u8 is_src_dst;
3064   u32 vni;
3065   u8 eid[16];
3066   u8 eid_prefix_len;
3067   u8 seid[16];
3068   u8 seid_prefix_len;
3069   u32 ttl;
3070   u8 authoritative;
3071 };
3072
3073 /** \brief Request for eid table summary status
3074     @param client_index - opaque cookie to identify the sender
3075     @param context - sender context, to match reply w/ request
3076     @param eid_set - if non-zero request info about specific mapping
3077     @param vni - virtual network instance; valid only if eid_set != 0
3078     @param prefix_length - prefix length if EID is IP address;
3079       valid only if eid_set != 0
3080     @param eid_type - EID type; valid only if eid_set != 0
3081       Supported values:
3082         0: EID is IPv4
3083         1: EID is IPv6
3084         2: EID is ethernet address
3085     @param eid - endpoint identifier
3086     @param filter - filter type;
3087       Support values:
3088         0: all eid
3089         1: local eid
3090         2: remote eid
3091  */
3092 define lisp_eid_table_dump
3093 {
3094   u32 client_index;
3095   u32 context;
3096   u8 eid_set;
3097   u8 prefix_length;
3098   u32 vni;
3099   u8 eid_type;
3100   u8 eid[16];
3101   u8 filter;
3102 };
3103
3104 /** \brief LISP adjacency
3105     @param eid_type -
3106       0 : ipv4
3107       1 : ipv6
3108       2 : mac
3109     @param reid - remote EID
3110     @param leid - local EID
3111     @param reid_prefix_len - remote EID IP prefix length
3112     @param leid_prefix_len - local EID IP prefix length
3113   */
3114 typeonly manual_print manual_endian define lisp_adjacency
3115 {
3116   u8 eid_type;
3117   u8 reid[16];
3118   u8 leid[16];
3119   u8 reid_prefix_len;
3120   u8 leid_prefix_len;
3121 };
3122
3123 /** \brief LISP adjacency reply
3124     @param count - number of adjacencies
3125     @param adjacencies - array of adjacencies
3126   */
3127 manual_endian manual_print define lisp_adjacencies_get_reply
3128 {
3129   u32 context;
3130   i32 retval;
3131   u32 count;
3132   vl_api_lisp_adjacency_t adjacencies[count];
3133 };
3134
3135 /** \brief Request for LISP adjacencies
3136     @param client_index - opaque cookie to identify the sender
3137     @param context - sender context, to match reply w/ request
3138     @param vni - filter adjacencies by VNI
3139  */
3140 define lisp_adjacencies_get
3141 {
3142   u32 client_index;
3143   u32 context;
3144   u32 vni;
3145 };
3146
3147 /** \brief Shows relationship between vni and vrf/bd
3148     @param dp_table - VRF index or bridge domain index
3149     @param vni - vitual network instance
3150   */
3151 define lisp_eid_table_map_details
3152 {
3153   u32 context;
3154   u32 vni;
3155   u32 dp_table;
3156 };
3157
3158 /** \brief Request for lisp_eid_table_map_details
3159     @param client_index - opaque cookie to identify the sender
3160     @param context - sender context, to match reply w/ request
3161     @param is_l2 - if set dump vni/bd mappings else vni/vrf
3162  */
3163 define lisp_eid_table_map_dump
3164 {
3165   u32 client_index;
3166   u32 context;
3167   u8 is_l2;
3168 };
3169
3170 /** \brief Dumps all VNIs used in mappings
3171     @param client_index - opaque cookie to identify the sender
3172     @param context - sender context, to match reply w/ request
3173   */
3174 define lisp_eid_table_vni_dump
3175 {
3176   u32 client_index;
3177   u32 context;
3178 };
3179
3180 /** \brief reply to lisp_eid_table_vni_dump
3181     @param client_index - opaque cookie to identify the sender
3182     @param context - sender context, to match reply w/ request
3183     @param vni - virtual network instance
3184  */
3185 define lisp_eid_table_vni_details
3186 {
3187   u32 client_index;
3188   u32 context;
3189   u32 vni;
3190 };
3191
3192 define lisp_gpe_tunnel_details
3193 {
3194   u32 context;
3195   u32 tunnels;
3196   u8 is_ipv6;
3197   u8 source_ip[16];
3198   u8 destination_ip[16];
3199   u32 encap_fib_id;
3200   u32 decap_fib_id;
3201   u32 dcap_next;
3202   u8 lisp_ver;
3203   u8 next_protocol;
3204   u8 flags;
3205   u8 ver_res;
3206   u8 res;
3207   u32 iid;
3208 };
3209
3210 /** \brief Request for gpe tunnel summary status
3211     @param client_index - opaque cookie to identify the sender
3212     @param context - sender context, to match reply w/ request
3213  */
3214 define lisp_gpe_tunnel_dump
3215 {
3216   u32 client_index;
3217   u32 context;
3218 };
3219
3220 /** \brief LISP map resolver status
3221     @param locator_set_name - name of the locator_set
3222     @param is_ipv6 - if non-zero the address is ipv6, else ipv4
3223     @param ip_address - array of address bytes
3224  */
3225 define lisp_map_resolver_details
3226 {
3227   u32 context;
3228   u8 is_ipv6;
3229   u8 ip_address[16];
3230 };
3231
3232 /** \brief Request for map resolver summary status
3233     @param client_index - opaque cookie to identify the sender
3234     @param context - sender context, to match reply w/ request
3235  */
3236 define lisp_map_resolver_dump
3237 {
3238   u32 client_index;
3239   u32 context;
3240 };
3241
3242 /** \brief Request for lisp-gpe protocol status
3243     @param client_index - opaque cookie to identify the sender
3244     @param context - sender context, to match reply w/ request
3245 */
3246 define show_lisp_status
3247 {
3248   u32 client_index;
3249   u32 context;
3250 };
3251
3252 /** \brief Status of lisp, enable or disable
3253     @param context - sender context, to match reply w/ request
3254     @param feature_status - lisp enable if non-zero, else disable
3255     @param gpe_status - lisp enable if non-zero, else disable
3256 */
3257 define show_lisp_status_reply
3258 {
3259   u32 context;
3260   i32 retval;
3261   u8 feature_status;
3262   u8 gpe_status;
3263 };
3264
3265 /** \brief Get LISP map request itr rlocs status
3266     @param context - sender context, to match reply w/ request
3267     @param locator_set_name - name of the locator_set
3268  */
3269 define lisp_get_map_request_itr_rlocs
3270 {
3271   u32 client_index;
3272   u32 context;
3273 };
3274
3275 /** \brief Request for map request itr rlocs summary status
3276  */
3277 define lisp_get_map_request_itr_rlocs_reply
3278 {
3279   u32 context;
3280   i32 retval;
3281   u8 locator_set_name[64];
3282 };
3283
3284 /** \brief Request for lisp pitr status
3285     @param client_index - opaque cookie to identify the sender
3286     @param context - sender context, to match reply w/ request
3287 */
3288 define show_lisp_pitr
3289 {
3290   u32 client_index;
3291   u32 context;
3292 };
3293
3294 /** \brief Status of lisp pitr, enable or disable
3295     @param context - sender context, to match reply w/ request
3296     @param status - lisp pitr enable if non-zero, else disable
3297     @param locator_set_name -  name of the locator_set
3298 */
3299 define show_lisp_pitr_reply
3300 {
3301   u32 context;
3302   i32 retval;
3303   u8 status;
3304   u8 locator_set_name[64];
3305 };
3306
3307 /* Gross kludge, DGMS */
3308 define interface_name_renumber
3309 {
3310   u32 client_index;
3311   u32 context;
3312   u32 sw_if_index;
3313   u32 new_show_dev_instance;
3314 };
3315
3316 define interface_name_renumber_reply
3317 {
3318   u32 context;
3319   i32 retval;
3320 };
3321
3322 /** \brief Register for ip4 arp resolution events
3323     @param client_index - opaque cookie to identify the sender
3324     @param context - sender context, to match reply w/ request
3325     @param enable_disable - 1 => register for events, 0 => cancel registration
3326     @param pid - sender's pid
3327     @param address - the exact ip4 address of interest
3328 */
3329 define want_ip4_arp_events
3330 {
3331   u32 client_index;
3332   u32 context;
3333   u8 enable_disable;
3334   u32 pid;
3335   u32 address;
3336 };
3337
3338 /** \brief Reply for interface events registration
3339     @param context - returned sender context, to match reply w/ request
3340     @param retval - return code
3341 */
3342 define want_ip4_arp_events_reply
3343 {
3344   u32 context;
3345   i32 retval;
3346 };
3347
3348 /** \brief Tell client about an ip4 arp resolution event
3349     @param client_index - opaque cookie to identify the sender
3350     @param context - sender context, to match reply w/ request
3351     @param address - the exact ip4 address of interest
3352     @param pid - client pid registered to receive notification
3353     @param sw_if_index - interface which received ARP packet
3354     @param new_mac - the new mac address 
3355     @param mac_ip - 0: resolution event, 1: mac/ip binding in bd
3356 */
3357 define ip4_arp_event
3358 {
3359   u32 client_index;
3360   u32 context;
3361   u32 address;
3362   u32 pid;
3363   u32 sw_if_index;
3364   u8 new_mac[6];
3365   u8 mac_ip;
3366 };
3367
3368 /** \brief Register for ip6 nd resolution events
3369     @param client_index - opaque cookie to identify the sender
3370     @param context - sender context, to match reply w/ request
3371     @param enable_disable - 1 => register for events, 0 => cancel registration
3372     @param pid - sender's pid
3373     @param address - the exact ip6 address of interest
3374 */
3375 define want_ip6_nd_events
3376 {
3377   u32 client_index;
3378   u32 context;
3379   u8 enable_disable;
3380   u32 pid;
3381   u8 address[16];
3382 };
3383
3384 /** \brief Reply for ip6 nd resolution events registration
3385     @param context - returned sender context, to match reply w/ request
3386     @param retval - return code
3387 */
3388 define want_ip6_nd_events_reply
3389 {
3390   u32 context;
3391   i32 retval;
3392 };
3393
3394 /** \brief Tell client about an ip6 nd resolution or mac/ip event
3395     @param client_index - opaque cookie to identify the sender
3396     @param context - sender context, to match reply w/ request
3397     @param pid - client pid registered to receive notification
3398     @param sw_if_index - interface which received ARP packet
3399     @param address - the exact ip6 address of interest
3400     @param new_mac - the new mac address 
3401     @param mac_ip - 0: resolution event, 1: mac/ip binding in bd
3402 */
3403 define ip6_nd_event
3404 {
3405   u32 client_index;
3406   u32 context;
3407   u32 pid;
3408   u32 sw_if_index;
3409   u8 address[16];
3410   u8 new_mac[6];
3411   u8 mac_ip;
3412 };
3413     
3414 /** \brief L2 bridge domain add or delete request
3415     @param client_index - opaque cookie to identify the sender
3416     @param context - sender context, to match reply w/ request
3417     @param bd_id - the bridge domain to create
3418     @param flood - enable/disable bcast/mcast flooding in the bd
3419     @param uu_flood - enable/disable uknown unicast flood in the bd
3420     @param forward - enable/disable forwarding on all interfaces in the bd
3421     @param learn - enable/disable learning on all interfaces in the bd
3422     @param arp_term - enable/disable arp termination in the bd
3423     @param is_add - add or delete flag
3424 */
3425 define bridge_domain_add_del
3426 {
3427   u32 client_index;
3428   u32 context;
3429   u32 bd_id;
3430   u8 flood;
3431   u8 uu_flood;
3432   u8 forward;
3433   u8 learn;
3434   u8 arp_term;
3435   u8 is_add;
3436 };
3437
3438 /** \brief L2 bridge domain add or delete response
3439     @param context - sender context, to match reply w/ request
3440     @param retval - return code for the set bridge flags request
3441 */
3442 define bridge_domain_add_del_reply
3443 {
3444   u32 context;
3445   i32 retval;
3446 };
3447
3448 /** \brief L2 bridge domain request operational state details
3449     @param client_index - opaque cookie to identify the sender
3450     @param context - sender context, to match reply w/ request
3451     @param bd_id - the bridge domain id desired or ~0 to request all bds
3452 */
3453 define bridge_domain_dump
3454 {
3455   u32 client_index;
3456   u32 context;
3457   u32 bd_id;
3458 };
3459
3460 /** \brief L2 bridge domain operational state response
3461     @param bd_id - the bridge domain id
3462     @param flood - bcast/mcast flooding state on all interfaces in the bd
3463     @param uu_flood - uknown unicast flooding state on all interfaces in the bd
3464     @param forward - forwarding state on all interfaces in the bd
3465     @param learn - learning state on all interfaces in the bd
3466     @param arp_term - arp termination state on all interfaces in the bd
3467     @param n_sw_ifs - number of sw_if_index's in the domain
3468 */
3469 define bridge_domain_details
3470 {
3471   u32 context;
3472   u32 bd_id;
3473   u8 flood;
3474   u8 uu_flood;
3475   u8 forward;
3476   u8 learn;
3477   u8 arp_term;
3478   u32 bvi_sw_if_index;
3479   u32 n_sw_ifs;
3480 };
3481
3482 /** \brief L2 bridge domain sw interface operational state response
3483     @param bd_id - the bridge domain id
3484     @param sw_if_index - sw_if_index in the domain
3485     @param shg - split horizon group for the interface
3486 */
3487 define bridge_domain_sw_if_details
3488 {
3489   u32 context;
3490   u32 bd_id;
3491   u32 sw_if_index;
3492   u8 shg;
3493 };
3494
3495 /** \brief DHCP Client config add / del request
3496     @param client_index - opaque cookie to identify the sender
3497     @param context - sender context, to match reply w/ request
3498     @param sw_if_index - index of the interface for DHCP client
3499     @param hostname - hostname
3500     @param is_add - add the config if non-zero, else delete
3501     @param want_dhcp_event - DHCP event sent to the sender
3502            via dhcp_compl_event API message if non-zero
3503     @param pid - sender's pid
3504 */
3505 define dhcp_client_config
3506 {
3507   u32 client_index;
3508   u32 context;
3509   u32 sw_if_index;
3510   u8 hostname[64];
3511   u8 is_add;
3512   u8 want_dhcp_event;
3513   u32 pid;
3514 };
3515
3516 /** \brief DHCP Client config response
3517     @param context - sender context, to match reply w/ request
3518     @param retval - return code for the request
3519 */
3520 define dhcp_client_config_reply
3521 {
3522   u32 context;
3523   i32 retval;
3524 };
3525
3526 /** \brief Set/unset input ACL interface
3527     @param client_index - opaque cookie to identify the sender
3528     @param context - sender context, to match reply w/ request
3529     @param sw_if_index - interface to set/unset input ACL
3530     @param ip4_table_index - ip4 classify table index (~0 for skip)
3531     @param ip6_table_index - ip6 classify table index (~0 for skip)
3532     @param l2_table_index  -  l2 classify table index (~0 for skip)
3533     @param is_add - Set input ACL if non-zero, else unset
3534     Note: User is recommeneded to use just one valid table_index per call.
3535           (ip4_table_index, ip6_table_index, or l2_table_index)
3536 */
3537 define input_acl_set_interface
3538 {
3539   u32 client_index;
3540   u32 context;
3541   u32 sw_if_index;
3542   u32 ip4_table_index;
3543   u32 ip6_table_index;
3544   u32 l2_table_index;
3545   u8 is_add;
3546 };
3547
3548 /** \brief Set/unset input ACL interface response
3549     @param context - sender context, to match reply w/ request
3550     @param retval - return code for the request
3551 */
3552 define input_acl_set_interface_reply
3553 {
3554   u32 context;
3555   i32 retval;
3556 };
3557
3558 /** \brief IPsec: Add/delete Security Policy Database
3559     @param client_index - opaque cookie to identify the sender
3560     @param context - sender context, to match reply w/ request
3561     @param is_add - add SPD if non-zero, else delete
3562     @param spd_id - SPD instance id (control plane allocated)
3563 */
3564
3565 define ipsec_spd_add_del
3566 {
3567   u32 client_index;
3568   u32 context;
3569   u8 is_add;
3570   u32 spd_id;
3571 };
3572
3573 /** \brief Reply for IPsec: Add/delete Security Policy Database entry
3574     @param context - returned sender context, to match reply w/ request
3575     @param retval - return code
3576 */
3577
3578 define ipsec_spd_add_del_reply
3579 {
3580   u32 context;
3581   i32 retval;
3582 };
3583
3584 /** \brief IPsec: Add/delete SPD from interface
3585
3586     @param client_index - opaque cookie to identify the sender
3587     @param context - sender context, to match reply w/ request
3588     @param is_add - add security mode if non-zero, else delete
3589     @param sw_if_index - index of the interface
3590     @param spd_id - SPD instance id to use for lookups
3591 */
3592
3593
3594 define ipsec_interface_add_del_spd
3595 {
3596   u32 client_index;
3597   u32 context;
3598
3599   u8 is_add;
3600   u32 sw_if_index;
3601   u32 spd_id;
3602 };
3603
3604 /** \brief Reply for IPsec: Add/delete SPD from interface
3605     @param context - returned sender context, to match reply w/ request
3606     @param retval - return code
3607 */
3608
3609 define ipsec_interface_add_del_spd_reply
3610 {
3611   u32 context;
3612   i32 retval;
3613 };
3614
3615 /** \brief IPsec: Add/delete Security Policy Database entry
3616
3617     See RFC 4301, 4.4.1.1 on how to match packet to selectors
3618
3619     @param client_index - opaque cookie to identify the sender
3620     @param context - sender context, to match reply w/ request
3621     @param is_add - add SPD if non-zero, else delete
3622     @param spd_id - SPD instance id (control plane allocated)
3623     @param priority - priority of SPD entry (non-unique value).  Used to order SPD matching - higher priorities match before lower
3624     @param is_outbound - entry applies to outbound traffic if non-zero, otherwise applies to inbound traffic
3625     @param is_ipv6 - remote/local address are IPv6 if non-zero, else IPv4
3626     @param remote_address_start - start of remote address range to match
3627     @param remote_address_stop - end of remote address range to match
3628     @param local_address_start - start of local address range to match
3629     @param local_address_stop - end of local address range to match
3630     @param protocol - protocol type to match [0 means any]
3631     @param remote_port_start - start of remote port range to match ...
3632     @param remote_port_stop - end of remote port range to match [0 to 65535 means ANY, 65535 to 0 means OPAQUE]
3633     @param local_port_start - start of local port range to match ...
3634     @param local_port_stop - end of remote port range to match [0 to 65535 means ANY, 65535 to 0 means OPAQUE]
3635     @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)
3636     @param sa_id - SAD instance id (control plane allocated)
3637
3638 */
3639
3640 define ipsec_spd_add_del_entry
3641 {
3642   u32 client_index;
3643   u32 context;
3644   u8 is_add;
3645
3646   u32 spd_id;
3647   i32 priority;
3648   u8 is_outbound;
3649
3650   // Selector
3651   u8 is_ipv6;
3652   u8 is_ip_any;
3653   u8 remote_address_start[16];
3654   u8 remote_address_stop[16];
3655   u8 local_address_start[16];
3656   u8 local_address_stop[16];
3657
3658   u8 protocol;
3659
3660   u16 remote_port_start;
3661   u16 remote_port_stop;
3662   u16 local_port_start;
3663   u16 local_port_stop;
3664
3665   // Policy
3666   u8 policy;
3667   u32 sa_id;
3668 };
3669
3670 /** \brief Reply for IPsec: Add/delete Security Policy Database entry
3671     @param context - returned sender context, to match reply w/ request
3672     @param retval - return code
3673 */
3674
3675 define ipsec_spd_add_del_entry_reply
3676 {
3677   u32 context;
3678   i32 retval;
3679 };
3680
3681 /** \brief IPsec: Add/delete Security Association Database entry
3682     @param client_index - opaque cookie to identify the sender
3683     @param context - sender context, to match reply w/ request
3684     @param is_add - add SAD entry if non-zero, else delete
3685
3686     @param sad_id - sad id
3687
3688     @param spi - security parameter index
3689
3690     @param protocol - 0 = AH, 1 = ESP
3691
3692     @param crypto_algorithm - 0 = Null, 1 = AES-CBC-128, 2 = AES-CBC-192, 3 = AES-CBC-256, 4 = 3DES-CBC
3693     @param crypto_key_length - length of crypto_key in bytes
3694     @param crypto_key - crypto keying material
3695
3696     @param integrity_algorithm - 0 = None, 1 = MD5-96, 2 = SHA1-96, 3 = SHA-256, 4 = SHA-384, 5=SHA-512
3697     @param integrity_key_length - length of integrity_key in bytes
3698     @param integrity_key - integrity keying material
3699
3700     @param use_extended_sequence_number - use ESN when non-zero
3701
3702     @param is_tunnel - IPsec tunnel mode if non-zero, else transport mode
3703     @param is_tunnel_ipv6 - IPsec tunnel mode is IPv6 if non-zero, else IPv4 tunnel only valid if is_tunnel is non-zero
3704     @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
3705     @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
3706
3707     To be added:
3708      Anti-replay
3709      IPsec tunnel address copy mode (to support GDOI)
3710  */
3711
3712 define ipsec_sad_add_del_entry
3713 {
3714   u32 client_index;
3715   u32 context;
3716   u8 is_add;
3717
3718   u32 sad_id;
3719
3720   u32 spi;
3721
3722   u8 protocol;
3723
3724   u8 crypto_algorithm;
3725   u8 crypto_key_length;
3726   u8 crypto_key[128];
3727
3728   u8 integrity_algorithm;
3729   u8 integrity_key_length;
3730   u8 integrity_key[128];
3731
3732   u8 use_extended_sequence_number;
3733
3734   u8 is_tunnel;
3735   u8 is_tunnel_ipv6;
3736   u8 tunnel_src_address[16];
3737   u8 tunnel_dst_address[16];
3738 };
3739
3740 /** \brief Reply for IPsec: Add/delete Security Association Database entry
3741     @param context - returned sender context, to match reply w/ request
3742     @param retval - return code
3743 */
3744
3745 define ipsec_sad_add_del_entry_reply
3746 {
3747   u32 context;
3748   i32 retval;
3749 };
3750
3751 /** \brief IPsec: Update Security Association keys
3752     @param client_index - opaque cookie to identify the sender
3753     @param context - sender context, to match reply w/ request
3754
3755     @param sa_id - sa id
3756
3757     @param crypto_key_length - length of crypto_key in bytes
3758     @param crypto_key - crypto keying material
3759
3760     @param integrity_key_length - length of integrity_key in bytes
3761     @param integrity_key - integrity keying material
3762 */
3763
3764 define ipsec_sa_set_key
3765 {
3766   u32 client_index;
3767   u32 context;
3768
3769   u32 sa_id;
3770
3771   u8 crypto_key_length;
3772   u8 crypto_key[128];
3773
3774   u8 integrity_key_length;
3775   u8 integrity_key[128];
3776 };
3777
3778 /** \brief Reply for IPsec: Update Security Association keys
3779     @param context - returned sender context, to match reply w/ request
3780     @param retval - return code
3781 */
3782
3783 define ipsec_sa_set_key_reply
3784 {
3785   u32 context;
3786   i32 retval;
3787 };
3788
3789 /** \brief IKEv2: Add/delete profile
3790     @param client_index - opaque cookie to identify the sender
3791     @param context - sender context, to match reply w/ request
3792
3793     @param name - IKEv2 profile name
3794     @param is_add - Add IKEv2 profile if non-zero, else delete
3795 */
3796 define ikev2_profile_add_del
3797 {
3798   u32 client_index;
3799   u32 context;
3800
3801   u8 name[64];
3802   u8 is_add;
3803 };
3804
3805 /** \brief Reply for IKEv2: Add/delete profile
3806     @param context - returned sender context, to match reply w/ request
3807     @param retval - return code
3808 */
3809 define ikev2_profile_add_del_reply
3810 {
3811   u32 context;
3812   i32 retval;
3813 };
3814
3815 /** \brief IKEv2: Set IKEv2 profile authentication method
3816     @param client_index - opaque cookie to identify the sender
3817     @param context - sender context, to match reply w/ request
3818
3819     @param name - IKEv2 profile name
3820     @param auth_method - IKEv2 authentication method (shared-key-mic/rsa-sig)
3821     @param is_hex - Authentication data in hex format if non-zero, else string
3822     @param data_len - Authentication data length
3823     @param data - Authentication data (for rsa-sig cert file path)
3824 */
3825 define ikev2_profile_set_auth
3826 {
3827   u32 client_index;
3828   u32 context;
3829
3830   u8 name[64];
3831   u8 auth_method;
3832   u8 is_hex;
3833   u32 data_len;
3834   u8 data[0];
3835 };
3836
3837 /** \brief Reply for IKEv2: Set IKEv2 profile authentication method
3838     @param context - returned sender context, to match reply w/ request
3839     @param retval - return code
3840 */
3841 define ikev2_profile_set_auth_reply
3842 {
3843   u32 context;
3844   i32 retval;
3845 };
3846
3847 /** \brief IKEv2: Set IKEv2 profile local/remote identification
3848     @param client_index - opaque cookie to identify the sender
3849     @param context - sender context, to match reply w/ request
3850
3851     @param name - IKEv2 profile name
3852     @param is_local - Identification is local if non-zero, else remote
3853     @param id_type - Identification type
3854     @param data_len - Identification data length
3855     @param data - Identification data
3856 */
3857 define ikev2_profile_set_id
3858 {
3859   u32 client_index;
3860   u32 context;
3861
3862   u8 name[64];
3863   u8 is_local;
3864   u8 id_type;
3865   u32 data_len;
3866   u8 data[0];
3867 };
3868
3869 /** \brief Reply for IKEv2:
3870     @param context - returned sender context, to match reply w/ request
3871     @param retval - return code
3872 */
3873 define ikev2_profile_set_id_reply
3874 {
3875   u32 context;
3876   i32 retval;
3877 };
3878
3879 /** \brief IKEv2: Set IKEv2 profile traffic selector parameters
3880     @param client_index - opaque cookie to identify the sender
3881     @param context - sender context, to match reply w/ request
3882
3883     @param name - IKEv2 profile name
3884     @param is_local - Traffic selector is local if non-zero, else remote
3885     @param proto - Traffic selector IP protocol (if zero not relevant)
3886     @param start_port - The smallest port number allowed by traffic selector
3887     @param end_port - The largest port number allowed by traffic selector
3888     @param start_addr - The smallest address included in traffic selector
3889     @param end_addr - The largest address included in traffic selector
3890 */
3891 define ikev2_profile_set_ts
3892 {
3893   u32 client_index;
3894   u32 context;
3895
3896   u8 name[64];
3897   u8 is_local;
3898   u8 proto;
3899   u16 start_port;
3900   u16 end_port;
3901   u32 start_addr;
3902   u32 end_addr;
3903 };
3904
3905 /** \brief Reply for IKEv2: Set IKEv2 profile traffic selector parameters
3906     @param context - returned sender context, to match reply w/ request
3907     @param retval - return code
3908 */
3909 define ikev2_profile_set_ts_reply
3910 {
3911   u32 context;
3912   i32 retval;
3913 };
3914
3915 /** \brief IKEv2: Set IKEv2 local RSA private key
3916     @param client_index - opaque cookie to identify the sender
3917     @param context - sender context, to match reply w/ request
3918
3919     @param key_file - Key file absolute path
3920 */
3921 define ikev2_set_local_key
3922 {
3923   u32 client_index;
3924   u32 context;
3925
3926   u8 key_file[256];
3927 };
3928
3929 /** \brief Reply for IKEv2: Set IKEv2 local key
3930     @param context - returned sender context, to match reply w/ request
3931     @param retval - return code
3932 */
3933 define ikev2_set_local_key_reply
3934 {
3935   u32 context;
3936   i32 retval;
3937 };
3938
3939 /** \brief Tell client about a DHCP completion event
3940     @param client_index - opaque cookie to identify the sender
3941     @param pid - client pid registered to receive notification
3942     @param is_ipv6 - if non-zero the address is ipv6, else ipv4
3943     @param host_address - Host IP address
3944     @param router_address - Router IP address
3945     @param host_mac - Host MAC address
3946 */
3947 define dhcp_compl_event
3948 {
3949   u32 client_index;
3950   u32 pid;
3951   u8 hostname[64];
3952   u8 is_ipv6;
3953   u8 host_address[16];
3954   u8 router_address[16];
3955   u8 host_mac[6];
3956 };
3957
3958 /** \brief Add MAP domains
3959     @param client_index - opaque cookie to identify the sender
3960     @param context - sender context, to match reply w/ request
3961     @param ip6_prefix - Rule IPv6 prefix
3962     @param ip4_prefix - Rule IPv4 prefix
3963     @param ip6_src - MAP domain IPv6 BR address / Tunnel source
3964     @param ip6_prefix_len - Rule IPv6 prefix length
3965     @param ip4_prefix_len - Rule IPv4 prefix length
3966     @param ea_bits_len - Embedded Address bits length
3967     @param psid_offset - Port Set Identifider (PSID) offset
3968     @param psid_length - PSID length
3969     @param is_translation - MAP-E / MAP-T
3970     @param mtu - MTU
3971 */
3972 define map_add_domain
3973 {
3974   u32 client_index;
3975   u32 context;
3976   u8 ip6_prefix[16];
3977   u8 ip4_prefix[4];
3978   u8 ip6_src[16];
3979   u8 ip6_prefix_len;
3980   u8 ip4_prefix_len;
3981   u8 ip6_src_prefix_len;
3982   u8 ea_bits_len;
3983   u8 psid_offset;
3984   u8 psid_length;
3985   u8 is_translation;
3986   u16 mtu;
3987 };
3988
3989 /** \brief Reply for MAP domain add
3990     @param context - returned sender context, to match reply w/ request
3991     @param index - MAP domain index
3992     @param retval - return code
3993 */
3994 define map_add_domain_reply
3995 {
3996   u32 context;
3997   u32 index;
3998   i32 retval;
3999 };
4000
4001 /** \brief Delete MAP domain
4002     @param client_index - opaque cookie to identify the sender
4003     @param context - sender context, to match reply w/ request
4004     @param index - MAP Domain index
4005 */
4006 define map_del_domain
4007 {
4008   u32 client_index;
4009   u32 context;
4010   u32 index;
4011 };
4012
4013 /** \brief Reply for MAP domain del
4014     @param context - returned sender context, to match reply w/ request
4015     @param retval - return code
4016 */
4017 define map_del_domain_reply
4018 {
4019   u32 context;
4020   i32 retval;
4021 };
4022
4023 /** \brief Add or Delete MAP rule from a domain (Only used for shared IPv4 per subscriber)
4024     @param client_index - opaque cookie to identify the sender
4025     @param context - sender context, to match reply w/ request
4026     @param index - MAP Domain index
4027     @param is_add - If 1 add rule, if 0 delete rule
4028     @param ip6_dst - MAP CE IPv6 address
4029     @param psid - Rule PSID
4030 */
4031 define map_add_del_rule
4032 {
4033   u32 client_index;
4034   u32 context;
4035   u32 index;
4036   u32 is_add;
4037   u8 ip6_dst[16];
4038   u16 psid;
4039 };
4040
4041 /** \brief Reply for MAP rule add/del
4042     @param context - returned sender context, to match reply w/ request
4043     @param retval - return code
4044 */
4045 define map_add_del_rule_reply
4046 {
4047   u32 context;
4048   i32 retval;
4049 };
4050
4051 /** \brief Get list of map domains
4052     @param client_index - opaque cookie to identify the sender
4053 */
4054 define map_domain_dump
4055 {
4056   u32 client_index;
4057   u32 context;
4058 };
4059
4060 define map_domain_details
4061 {
4062   u32 context;
4063   u32 domain_index;
4064   u8 ip6_prefix[16];
4065   u8 ip4_prefix[4];
4066   u8 ip6_src[16];
4067   u8 ip6_prefix_len;
4068   u8 ip4_prefix_len;
4069   u8 ip6_src_len;
4070   u8 ea_bits_len;
4071   u8 psid_offset;
4072   u8 psid_length;
4073   u8 flags;
4074   u16 mtu;
4075   u8 is_translation;
4076 };
4077
4078 define map_rule_dump
4079 {
4080   u32 client_index;
4081   u32 context;
4082   u32 domain_index;
4083 };
4084
4085 define map_rule_details
4086 {
4087   u32 context;
4088   u8 ip6_dst[16];
4089   u16 psid;
4090 };
4091
4092 /** \brief Request for a single block of summary stats
4093     @param client_index - opaque cookie to identify the sender
4094     @param context - sender context, to match reply w/ request
4095 */
4096 define map_summary_stats
4097 {
4098   u32 client_index;
4099   u32 context;
4100 };
4101
4102 /** \brief Reply for map_summary_stats request
4103     @param context - sender context, to match reply w/ request
4104     @param retval - return code for request
4105     @param total_bindings -  
4106     @param total_pkts -  
4107     @param total_ip4_fragments -
4108     @param total_security_check - 
4109 */
4110 define map_summary_stats_reply
4111 {
4112   u32 context;
4113   i32 retval;
4114   u64 total_bindings;
4115   u64 total_pkts[2];
4116   u64 total_bytes[2];
4117   u64 total_ip4_fragments;
4118   u64 total_security_check[2];
4119 };
4120
4121 /** \brief cop: enable/disable junk filtration features on an interface
4122     @param client_index - opaque cookie to identify the sender
4123     @param context - sender context, to match reply w/ request
4124     @param sw_if_inded - desired interface
4125     @param enable_disable - 1 => enable, 0 => disable
4126 */
4127
4128 define cop_interface_enable_disable
4129 {
4130   u32 client_index;
4131   u32 context;
4132   u32 sw_if_index;
4133   u8 enable_disable;
4134 };
4135
4136 /** \brief cop: interface enable/disable junk filtration reply
4137     @param context - returned sender context, to match reply w/ request
4138     @param retval - return code
4139 */
4140
4141 define cop_interface_enable_disable_reply
4142 {
4143   u32 context;
4144   i32 retval;
4145 };
4146
4147 /** \brief cop: enable/disable whitelist filtration features on an interface
4148     Note: the supplied fib_id must match in order to remove the feature!
4149     
4150     @param client_index - opaque cookie to identify the sender
4151     @param context - sender context, to match reply w/ request
4152     @param sw_if_index - interface handle, physical interfaces only
4153     @param fib_id - fib identifier for the whitelist / blacklist fib
4154     @param ip4 - 1 => enable ip4 filtration, 0=> disable ip4 filtration
4155     @param ip6 - 1 => enable ip6 filtration, 0=> disable ip6 filtration
4156     @param default_cop -  1 => enable non-ip4, non-ip6 filtration 0=> disable it
4157 */
4158
4159 define cop_whitelist_enable_disable
4160 {
4161   u32 client_index;
4162   u32 context;
4163   u32 sw_if_index;
4164   u32 fib_id;
4165   u8 ip4;
4166   u8 ip6;
4167   u8 default_cop;
4168 };
4169
4170 /** \brief cop: interface enable/disable junk filtration reply
4171     @param context - returned sender context, to match reply w/ request
4172     @param retval - return code
4173 */
4174
4175 define cop_whitelist_enable_disable_reply
4176 {
4177   u32 context;
4178   i32 retval;
4179 };
4180
4181 /** \brief get_node_graph - get a copy of the vpp node graph
4182     including the current set of graph arcs.
4183
4184     @param client_index - opaque cookie to identify the sender
4185     @param context - sender context, to match reply w/ request
4186 */
4187
4188 define get_node_graph
4189 {
4190   u32 client_index;
4191   u32 context;
4192 };
4193
4194 /** \brief get_node_graph_reply
4195     @param context - returned sender context, to match reply w/ request
4196     @param retval - return code
4197     @param reply_in_shmem - result from vlib_node_serialize, in shared
4198     memory. Process with vlib_node_unserialize, remember to switch
4199     heaps and free the result.
4200 */
4201
4202 define get_node_graph_reply
4203 {
4204   u32 context;
4205   i32 retval;
4206   u64 reply_in_shmem;
4207 };
4208
4209 /** \brief Clear interface statistics
4210     @param client_index - opaque cookie to identify the sender
4211     @param context - sender context, to match reply w/ request
4212     @param sw_if_index - index of the interface to clear statistics
4213 */
4214 define sw_interface_clear_stats
4215 {
4216   u32 client_index;
4217   u32 context;
4218   u32 sw_if_index;
4219 };
4220
4221 /** \brief Reply to sw_interface_clear_stats 
4222     @param context - sender context which was passed in the request
4223     @param retval - return code of the set flags request
4224 */
4225 define sw_interface_clear_stats_reply
4226 {
4227   u32 context;
4228   i32 retval;
4229 };
4230
4231 /** \brief IOAM enable : Enable in-band OAM
4232     @param id - profile id
4233     @param seqno - To enable Seqno Processing
4234     @param analyse - Enabling analysis of iOAM at decap node 
4235     @param pow_enable - Proof of Work enabled or not flag
4236     @param trace_enable - iOAM Trace enabled or not flag
4237 */
4238 define ioam_enable
4239 {
4240   u32 client_index;
4241   u32 context;
4242   u16 id;
4243   u8 seqno;
4244   u8 analyse;
4245   u8 pot_enable;
4246   u8 trace_enable;
4247   u32 node_id;
4248 };
4249
4250 /** \brief iOAM Trace profile add / del response
4251     @param context - sender context, to match reply w/ request
4252     @param retval - return value for request
4253 */
4254 define ioam_enable_reply
4255 {
4256   u32 context;
4257   i32 retval;
4258 };
4259
4260 /** \brief iOAM disable
4261     @param client_index - opaque cookie to identify the sender
4262     @param context - sender context, to match reply w/ request
4263     @param index - MAP Domain index
4264 */
4265 define ioam_disable
4266 {
4267   u32 client_index;
4268   u32 context;
4269   u16 id;
4270 };
4271
4272 /** \brief iOAM disable response
4273     @param context - sender context, to match reply w/ request
4274     @param retval - return value for request
4275 */
4276 define ioam_disable_reply
4277 {
4278   u32 context;
4279   i32 retval;
4280 };
4281
4282 /** \brief Create host-interface
4283     @param client_index - opaque cookie to identify the sender
4284     @param context - sender context, to match reply w/ request
4285     @param host_if_name - interface name
4286     @param hw_addr - interface MAC
4287     @param use_random_hw_addr - use random generated MAC
4288 */
4289 define af_packet_create
4290 {
4291   u32 client_index;
4292   u32 context;
4293
4294   u8 host_if_name[64];
4295   u8 hw_addr[6];
4296   u8 use_random_hw_addr;
4297 };
4298
4299 /** \brief Create host-interface response
4300     @param context - sender context, to match reply w/ request
4301     @param retval - return value for request
4302 */
4303 define af_packet_create_reply
4304 {
4305   u32 context;
4306   i32 retval;
4307   u32 sw_if_index;
4308 };
4309
4310 /** \brief Delete host-interface
4311     @param client_index - opaque cookie to identify the sender
4312     @param context - sender context, to match reply w/ request
4313     @param host_if_name - interface name
4314 */
4315 define af_packet_delete
4316 {
4317   u32 client_index;
4318   u32 context;
4319
4320   u8 host_if_name[64];
4321 };
4322
4323 /** \brief Delete host-interface response
4324     @param context - sender context, to match reply w/ request
4325     @param retval - return value for request
4326 */
4327 define af_packet_delete_reply
4328 {
4329   u32 context;
4330   i32 retval;
4331 };
4332
4333 /** \brief Add/del policer
4334     @param client_index - opaque cookie to identify the sender
4335     @param context - sender context, to match reply w/ request
4336     @param is_add - add policer if non-zero, else delete
4337     @param name - policer name
4338     @param cir - CIR
4339     @param eir - EIR
4340     @param cb - Committed Burst
4341     @param eb - Excess or Peak Burst
4342     @param rate_type - rate type
4343     @param round_type - rounding type
4344     @param type - policer algorithm
4345     @param color_aware - 0=color-blind, 1=color-aware
4346     @param conform_action_type - conform action type
4347     @param conform_dscp - DSCP for conform mar-and-transmit action
4348     @param exceed_action_type - exceed action type
4349     @param exceed_dscp - DSCP for exceed mar-and-transmit action
4350     @param violate_action_type - violate action type
4351     @param violate_dscp - DSCP for violate mar-and-transmit action
4352 */
4353 define policer_add_del
4354 {
4355   u32 client_index;
4356   u32 context;
4357
4358   u8 is_add;
4359   u8 name[64];
4360   u32 cir;
4361   u32 eir;
4362   u64 cb;
4363   u64 eb;
4364   u8 rate_type;
4365   u8 round_type;
4366   u8 type;
4367   u8 color_aware;
4368   u8 conform_action_type;
4369   u8 conform_dscp;
4370   u8 exceed_action_type;
4371   u8 exceed_dscp;
4372   u8 violate_action_type;
4373   u8 violate_dscp;
4374 };
4375
4376 /** \brief Add/del policer response
4377     @param context - sender context, to match reply w/ request
4378     @param retval - return value for request
4379     @param policer_index - for add, returned index of the new policer
4380 */
4381 define policer_add_del_reply
4382 {
4383   u32 context;
4384   i32 retval;
4385   u32 policer_index;
4386 };
4387
4388 /** \brief Get list of policers
4389     @param client_index - opaque cookie to identify the sender
4390     @param context - sender context, to match reply w/ request
4391     @param match_name_valid - if 0 request all policers otherwise use match_name
4392     @param match_name - policer name
4393 */
4394 define policer_dump
4395 {
4396   u32 client_index;
4397   u32 context;
4398
4399   u8 match_name_valid;
4400   u8 match_name[64];
4401 };
4402
4403 /** \brief Policer operational state response.
4404     @param context - sender context, to match reply w/ request
4405     @param name - policer name
4406     @param cir - CIR
4407     @param eir - EIR
4408     @param cb - Committed Burst
4409     @param eb - Excess or Peak Burst
4410     @param rate_type - rate type
4411     @param round_type - rounding type
4412     @param type - policer algorithm
4413     @param conform_action_type - conform action type
4414     @param conform_dscp - DSCP for conform mar-and-transmit action
4415     @param exceed_action_type - exceed action type
4416     @param exceed_dscp - DSCP for exceed mar-and-transmit action
4417     @param violate_action_type - violate action type
4418     @param violate_dscp - DSCP for violate mar-and-transmit action
4419     @param single_rate - 1 = single rate policer, 0 = two rate policer
4420     @param color_aware - for hierarchical policing
4421     @param scale - power-of-2 shift amount for lower rates
4422     @param cir_tokens_per_period - number of tokens for each period
4423     @param pir_tokens_per_period - number of tokens for each period for 2-rate policer
4424     @param current_limit - current limit
4425     @param current_bucket - current bucket
4426     @param extended_limit - extended limit
4427     @param extended_bucket - extended bucket
4428     @param last_update_time - last update time
4429 */
4430 define policer_details
4431 {
4432   u32 context;
4433
4434   u8 name[64];
4435   u32 cir;
4436   u32 eir;
4437   u64 cb;
4438   u64 eb;
4439   u8 rate_type;
4440   u8 round_type;
4441   u8 type;
4442   u8 conform_action_type;
4443   u8 conform_dscp;
4444   u8 exceed_action_type;
4445   u8 exceed_dscp;
4446   u8 violate_action_type;
4447   u8 violate_dscp;
4448   u8 single_rate;
4449   u8 color_aware;
4450   u32 scale;
4451   u32 cir_tokens_per_period;
4452   u32 pir_tokens_per_period;
4453   u32 current_limit;
4454   u32 current_bucket;
4455   u32 extended_limit;
4456   u32 extended_bucket;
4457   u64 last_update_time;
4458 };
4459
4460 /** \brief Set/unset policer classify interface
4461     @param client_index - opaque cookie to identify the sender
4462     @param context - sender context, to match reply w/ request
4463     @param sw_if_index - interface to set/unset policer classify
4464     @param ip4_table_index - ip4 classify table index (~0 for skip)
4465     @param ip6_table_index - ip6 classify table index (~0 for skip)
4466     @param l2_table_index  -  l2 classify table index (~0 for skip)
4467     @param is_add - Set if non-zero, else unset
4468     Note: User is recommeneded to use just one valid table_index per call.
4469           (ip4_table_index, ip6_table_index, or l2_table_index)
4470 */
4471 define policer_classify_set_interface
4472 {
4473   u32 client_index;
4474   u32 context;
4475   u32 sw_if_index;
4476   u32 ip4_table_index;
4477   u32 ip6_table_index;
4478   u32 l2_table_index;
4479   u8 is_add;
4480 };
4481
4482 /** \brief Set/unset policer classify interface response
4483     @param context - sender context, to match reply w/ request
4484     @param retval - return value for request
4485 */
4486 define policer_classify_set_interface_reply
4487 {
4488   u32 context;
4489   i32 retval;
4490 };
4491
4492 /** \brief Get list of policer classify interfaces and tables
4493     @param client_index - opaque cookie to identify the sender
4494     @param context - sender context, to match reply w/ request
4495     @param type - classify table type
4496 */
4497 define policer_classify_dump
4498 {
4499   u32 client_index;
4500   u32 context;
4501   u8 type;
4502 };
4503
4504 /** \brief Policer iclassify operational state response.
4505     @param context - sender context, to match reply w/ request
4506     @param sw_if_index - software interface index
4507     @param table_index - classify table index
4508 */
4509 define policer_classify_details
4510 {
4511   u32 context;
4512   u32 sw_if_index;
4513   u32 table_index;
4514 };
4515
4516 /** \brief Create netmap
4517     @param client_index - opaque cookie to identify the sender
4518     @param context - sender context, to match reply w/ request
4519     @param netmap_if_name - interface name
4520     @param hw_addr - interface MAC
4521     @param use_random_hw_addr - use random generated MAC
4522     @param is_pipe - is pipe
4523     @param is_master - 0=slave, 1=master
4524 */
4525 define netmap_create
4526 {
4527   u32 client_index;
4528   u32 context;
4529
4530   u8 netmap_if_name[64];
4531   u8 hw_addr[6];
4532   u8 use_random_hw_addr;
4533   u8 is_pipe;
4534   u8 is_master;
4535 };
4536
4537 /** \brief Create netmap response
4538     @param context - sender context, to match reply w/ request
4539     @param retval - return value for request
4540 */
4541 define netmap_create_reply
4542 {
4543   u32 context;
4544   i32 retval;
4545 };
4546
4547 /** \brief Delete netmap
4548     @param client_index - opaque cookie to identify the sender
4549     @param context - sender context, to match reply w/ request
4550     @param netmap_if_name - interface name
4551 */
4552 define netmap_delete
4553 {
4554   u32 client_index;
4555   u32 context;
4556
4557   u8 netmap_if_name[64];
4558 };
4559
4560 /** \brief Delete netmap response
4561     @param context - sender context, to match reply w/ request
4562     @param retval - return value for request
4563 */
4564 define netmap_delete_reply
4565 {
4566   u32 context;
4567   i32 retval;
4568 };
4569
4570 /** \brief Dump mpls gre tunnel table
4571     @param client_index - opaque cookie to identify the sender
4572     @param tunnel_index - gre tunnel identifier or -1 in case of all tunnels
4573 */
4574 define mpls_gre_tunnel_dump
4575 {
4576   u32 client_index;
4577   u32 context;
4578   i32 tunnel_index;
4579 };
4580
4581 /** \brief mpls gre tunnel operational state response
4582     @param tunnel_index - gre tunnel identifier
4583     @param intfc_address - interface ipv4 addr
4584     @param mask_width - interface ipv4 addr mask
4585     @param hw_if_index - interface id
4586     @param l2_only -
4587     @param tunnel_src - tunnel source ipv4 addr
4588     @param tunnel_dst - tunnel destination ipv4 addr
4589     @param outer_fib_index - gre tunnel identifier
4590     @param encap_index - reference to mpls label table
4591     @param nlabels - number of resolved labels
4592     @param labels - resolved labels
4593 */
4594 define mpls_gre_tunnel_details
4595 {
4596   u32 context;
4597   u32 tunnel_index;
4598
4599   u32 intfc_address;
4600   u32 inner_fib_index;
4601   u32 mask_width;
4602   u32 encap_index;
4603   u32 hw_if_index;
4604   u8 l2_only;
4605   u32 tunnel_src;
4606   u32 tunnel_dst;
4607   u32 outer_fib_index;
4608   u32 nlabels;
4609   u32 labels[nlabels];
4610 };
4611
4612 /** \brief Dump mpls eth tunnel table
4613     @param client_index - opaque cookie to identify the sender
4614     @param tunnel_index - eth tunnel identifier or -1 in case of all tunnels
4615 */
4616 define mpls_eth_tunnel_dump
4617 {
4618   u32 client_index;
4619   u32 context;
4620   i32 tunnel_index;
4621 };
4622
4623 /** \brief mpls eth tunnel operational state response
4624     @param tunnel_index - eth tunnel identifier
4625     @param intfc_address - interface ipv4 addr
4626     @param mask_width - interface ipv4 addr mask
4627     @param hw_if_index - interface id
4628     @param l2_only -
4629     @param tunnel_dst_mac -
4630     @param tx_sw_if_index -
4631     @param encap_index - reference to mpls label table
4632     @param nlabels - number of resolved labels
4633     @param labels - resolved labels
4634 */
4635 define mpls_eth_tunnel_details
4636 {
4637   u32 context;
4638   u32 tunnel_index;
4639
4640   u32 intfc_address;
4641   u32 inner_fib_index;
4642   u32 mask_width;
4643   u32 encap_index;
4644   u32 hw_if_index;
4645   u8 l2_only;
4646   u8 tunnel_dst_mac[6];
4647   u32 tx_sw_if_index;
4648   u32 nlabels;
4649   u32 labels[nlabels];
4650 };
4651
4652 /** \brief Dump mpls fib table
4653     @param client_index - opaque cookie to identify the sender
4654     @param fib_index    - mpls fib entry identifier or -1 in case of all entries
4655 */
4656 define mpls_fib_encap_dump
4657 {
4658   u32 client_index;
4659   u32 context;
4660 };
4661
4662 /** \brief mpls fib encap table response
4663     @param fib_index - fib table id
4664     @param dest - destination ipv4 addr
4665     @param s_bit -
4666     @param entry_index - reference to mpls label table
4667     @param nlabels - number of resolved labels
4668     @param labels - resolved labels
4669 */
4670 define mpls_fib_encap_details
4671 {
4672   u32 context;
4673
4674   u32 fib_index;
4675   u32 entry_index;
4676   u32 dest;
4677   u32 s_bit;
4678   u32 nlabels;
4679   u32 labels[nlabels];
4680 };
4681
4682 /** \brief Classify get table IDs request
4683     @param client_index - opaque cookie to identify the sender
4684     @param context - sender context, to match reply w/ request
4685 */
4686 define classify_table_ids
4687 {
4688   u32 client_index;
4689   u32 context;
4690 };
4691
4692 /** \brief Reply for classify get table IDs request
4693     @param context - sender context which was passed in the request
4694     @param count - number of ids returned in response
4695     @param ids - array of classify table ids
4696 */
4697 define classify_table_ids_reply
4698 {
4699   u32 context;
4700   i32 retval;
4701   u32 count;
4702   u32 ids[count];
4703 };
4704
4705 /** \brief Classify table ids by interface index request
4706     @param client_index - opaque cookie to identify the sender
4707     @param context - sender context, to match reply w/ request
4708     @param sw_if_index - index of the interface
4709 */
4710 define classify_table_by_interface
4711 {
4712   u32 client_index;
4713   u32 context;
4714   u32 sw_if_index;
4715 };
4716
4717 /** \brief Reply for classify table id by interface index request
4718     @param context - sender context which was passed in the request
4719     @param count - number of ids returned in response
4720     @param sw_if_index - index of the interface
4721     @param l2_table_id - l2 classify table index
4722     @param ip4_table_id - ip4 classify table index
4723     @param ip6_table_id - ip6 classify table index
4724 */
4725 define classify_table_by_interface_reply
4726 {
4727   u32 context;
4728   i32 retval;
4729   u32 sw_if_index;
4730   u32 l2_table_id;
4731   u32 ip4_table_id;
4732   u32 ip6_table_id;
4733 };
4734
4735 /** \brief Classify table info
4736     @param client_index - opaque cookie to identify the sender
4737     @param context - sender context, to match reply w/ request
4738     @param table_id - classify table index
4739 */
4740 define classify_table_info
4741 {
4742   u32 client_index;
4743   u32 context;
4744   u32 table_id;
4745 };
4746
4747 /** \brief Reply for classify table info request
4748     @param context - sender context which was passed in the request
4749     @param count - number of ids returned in response
4750     @param table_id - classify table index
4751     @param nbuckets - number of buckets when adding a table
4752     @param match_n_vectors - number of match vectors
4753     @param skip_n_vectors - number of skip_n_vectors
4754     @param active_sessions - number of sessions (active entries)
4755     @param next_table_index - index of next table
4756     @param miss_next_index - index of miss table
4757     @param mask[] - match mask
4758 */
4759 define classify_table_info_reply
4760 {
4761   u32 context;
4762   i32 retval;
4763   u32 table_id;
4764   u32 nbuckets;
4765   u32 match_n_vectors;
4766   u32 skip_n_vectors;
4767   u32 active_sessions;
4768   u32 next_table_index;
4769   u32 miss_next_index;
4770   u32 mask_length;
4771   u8 mask[mask_length];
4772 };
4773
4774 /** \brief Classify sessions dump request
4775     @param client_index - opaque cookie to identify the sender
4776     @param context - sender context, to match reply w/ request
4777     @param table_id - classify table index
4778 */
4779 define classify_session_dump
4780 {
4781   u32 client_index;
4782   u32 context;
4783   u32 table_id;
4784 };
4785
4786 /** \brief Reply for classify table session dump request
4787     @param context - sender context which was passed in the request
4788     @param count - number of ids returned in response
4789     @param table_id - classify table index
4790     @param hit_next_index - hit_next_index of session
4791     @param opaque_index - for add, opaque_index of session
4792     @param advance - advance value of session
4793     @param match[] - match value for session
4794 */
4795 define classify_session_details
4796 {
4797   u32 context;
4798   i32 retval;
4799   u32 table_id;
4800   u32 hit_next_index;
4801   i32 advance;
4802   u32 opaque_index;
4803   u32 match_length;
4804   u8 match[match_length];
4805 };
4806
4807 /** \brief Configure IPFIX exporter process request
4808     @param client_index - opaque cookie to identify the sender
4809     @param context - sender context, to match reply w/ request
4810     @param collector_address - address of IPFIX collector
4811     @param collector_port - port of IPFIX collector
4812     @param src_address - address of IPFIX exporter
4813     @param vrf_id - VRF / fib table ID
4814     @param path_mtu - Path MTU between exporter and collector
4815     @param template_interval - number of seconds after which to resend template
4816     @param udp_checksum - UDP checksum calculation enable flag
4817 */
4818 define set_ipfix_exporter
4819 {
4820   u32 client_index;
4821   u32 context;
4822   u8 collector_address[16];
4823   u16 collector_port;
4824   u8 src_address[16];
4825   u32 vrf_id;
4826   u32 path_mtu;
4827   u32 template_interval;
4828   u8 udp_checksum;
4829 };
4830
4831 /** \brief Reply to IPFIX exporter configure request
4832     @param context - sender context which was passed in the request
4833 */
4834 define set_ipfix_exporter_reply
4835 {
4836   u32 context;
4837   i32 retval;
4838 };
4839
4840 /** \brief IPFIX exporter dump request
4841     @param client_index - opaque cookie to identify the sender
4842     @param context - sender context, to match reply w/ request
4843 */
4844 define ipfix_exporter_dump
4845 {
4846   u32 client_index;
4847   u32 context;
4848 };
4849
4850 /** \brief Reply to IPFIX exporter dump request
4851     @param context - sender context which was passed in the request
4852     @param collector_address - address of IPFIX collector
4853     @param collector_port - port of IPFIX collector
4854     @param src_address - address of IPFIX exporter
4855     @param fib_index - fib table index
4856     @param path_mtu - Path MTU between exporter and collector
4857     @param template_interval - number of seconds after which to resend template
4858     @param udp_checksum - UDP checksum calculation enable flag
4859 */
4860 define ipfix_exporter_details
4861 {
4862   u32 context;
4863   u8 collector_address[16];
4864   u16 collector_port;
4865   u8 src_address[16];
4866   u32 vrf_id;
4867   u32 path_mtu;
4868   u32 template_interval;
4869   u8 udp_checksum;
4870 };
4871
4872 /** \brief IPFIX classify stream configure request
4873     @param client_index - opaque cookie to identify the sender
4874     @param context - sender context, to match reply w/ request
4875     @param domain_id - domain ID reported in IPFIX messages for classify stream
4876     @param src_port - source port of UDP session for classify stream
4877 */
4878 define set_ipfix_classify_stream {
4879     u32 client_index;
4880     u32 context;
4881     u32 domain_id;
4882     u16 src_port;
4883 };
4884
4885 /** \brief IPFIX classify stream configure response
4886     @param context - sender context, to match reply w/ request
4887     @param retval - return value for request
4888 */
4889 define set_ipfix_classify_stream_reply {
4890     u32 context;
4891     i32 retval;
4892 };
4893
4894 /** \brief IPFIX classify stream dump request
4895     @param client_index - opaque cookie to identify the sender
4896     @param context - sender context, to match reply w/ request
4897 */
4898 define ipfix_classify_stream_dump {
4899     u32 client_index;
4900     u32 context;
4901 };
4902
4903 /** \brief Reply to IPFIX classify stream dump request
4904     @param context - sender context, to match reply w/ request
4905     @param domain_id - domain ID reported in IPFIX messages for classify stream
4906     @param src_port - source port of UDP session for classify stream
4907 */
4908 define ipfix_classify_stream_details {
4909     u32 context;
4910     u32 domain_id;
4911     u16 src_port;
4912 };
4913
4914 /** \brief IPFIX add or delete classifier table request
4915     @param client_index - opaque cookie to identify the sender
4916     @param context - sender context, to match reply w/ request
4917     @param table_id - classifier table ID
4918     @param ip_version - version of IP used in the classifier table
4919     @param transport_protocol - transport protocol used in the classifier table or 255 for unspecified
4920 */
4921 define ipfix_classify_table_add_del {
4922     u32 client_index;
4923     u32 context;
4924     u32 table_id;
4925     u8 ip_version;
4926     u8 transport_protocol;
4927     u8 is_add;
4928 };
4929
4930 /** \brief IPFIX add classifier table response
4931     @param context - sender context which was passed in the request
4932 */
4933 define ipfix_classify_table_add_del_reply {
4934     u32 context;
4935     i32 retval;
4936 };
4937
4938 /** \brief IPFIX classify tables dump request
4939     @param client_index - opaque cookie to identify the sender
4940     @param context - sender context, to match reply w/ request
4941 */
4942 define ipfix_classify_table_dump {
4943     u32 client_index;
4944     u32 context;
4945 };
4946
4947 /** \brief Reply to IPFIX classify tables dump request
4948     @param context - sender context, to match reply w/ request
4949     @param table_id - classifier table ID
4950     @param ip_version - version of IP used in the classifier table
4951     @param transport_protocol - transport protocol used in the classifier table or 255 for unspecified
4952 */
4953 define ipfix_classify_table_details {
4954     u32 context;
4955     u32 table_id;
4956     u8 ip_version;
4957     u8 transport_protocol;
4958 };
4959
4960 /** \brief Set/unset flow classify interface
4961     @param client_index - opaque cookie to identify the sender
4962     @param context - sender context, to match reply w/ request
4963     @param sw_if_index - interface to set/unset flow classify
4964     @param ip4_table_index - ip4 classify table index (~0 for skip)
4965     @param ip6_table_index - ip6 classify table index (~0 for skip)
4966     @param l2_table_index  -  l2 classify table index (~0 for skip)
4967     @param is_add - Set if non-zero, else unset
4968     Note: User is recommeneded to use just one valid table_index per call.
4969           (ip4_table_index, ip6_table_index, or l2_table_index)
4970 */
4971 define flow_classify_set_interface {
4972     u32 client_index;
4973     u32 context;
4974     u32 sw_if_index;
4975     u32 ip4_table_index;
4976     u32 ip6_table_index;
4977     u8  is_add;
4978 };
4979
4980 /** \brief Set/unset flow classify interface response
4981     @param context - sender context, to match reply w/ request
4982     @param retval - return value for request
4983 */
4984 define flow_classify_set_interface_reply {
4985     u32 context;
4986     i32 retval;
4987 };
4988
4989 /** \brief Get list of flow classify interfaces and tables
4990     @param client_index - opaque cookie to identify the sender
4991     @param context - sender context, to match reply w/ request
4992     @param type - classify table type
4993 */
4994 define flow_classify_dump {
4995     u32 client_index;
4996     u32 context;
4997     u8 type;
4998 };
4999
5000 /** \brief Flow classify operational state response.
5001     @param context - sender context, to match reply w/ request
5002     @param sw_if_index - software interface index
5003     @param table_index - classify table index
5004 */
5005 define flow_classify_details {
5006     u32 context;
5007     u32 sw_if_index;
5008     u32 table_index;
5009 };
5010
5011 /** \brief Enable/Disable span to mirror traffic from one interface to another
5012     @param client_index - opaque cookie to identify the sender
5013     @param context - sender context which was passed in the request
5014     @param sw_if_index_from - interface to be mirorred
5015     @param sw_if_index_to - interface where the traffic is mirrored
5016     @param enable - 1 enable SPAN, 0 SPAN on given interface
5017 */
5018 define sw_interface_span_enable_disable{
5019     u32 client_index;
5020     u32 context;
5021     u32 sw_if_index_from;
5022     u32 sw_if_index_to;
5023     u8  enable;
5024 };
5025
5026 /** \brief Reply to SPAN enable/disable request
5027     @param context - sender context which was passed in the request
5028 */
5029 define sw_interface_span_enable_disable_reply {
5030     u32 context;
5031     i32 retval;
5032 };
5033
5034 /** \brief SPAN dump request
5035     @param client_index - opaque cookie to identify the sender
5036     @param context - sender context, to match reply w/ request
5037 */
5038 define sw_interface_span_dump {
5039     u32 client_index;
5040     u32 context;
5041 };
5042
5043 /** \brief Reply to SPAN dump request
5044     @param context - sender context which was passed in the request
5045     @param sw_if_index_from - mirorred interface
5046     @param sw_if_index_to - interface where the traffic is mirrored
5047 */
5048 define sw_interface_span_details {
5049     u32 context;
5050     u32 sw_if_index_from;
5051     u32 sw_if_index_to;
5052 };
5053
5054 /** \brief Query relative index via node names
5055     @param client_index - opaque cookie to identify the sender
5056     @param context - sender context, to match reply w/ request
5057     @param node_name - name of node to find relative index from
5058     @param next_name - next node from node_name to find relative index of
5059 */
5060 define get_next_index
5061 {
5062   u32 client_index;
5063   u32 context;
5064   u8 node_name[64];
5065   u8 next_name[64];
5066 };
5067
5068 /** \brief Reply for get next node index
5069     @param context - sender context which was passed in the request
5070     @param retval - return value
5071     @param next_index - index of the next_node
5072 */
5073 define get_next_index_reply
5074 {
5075   u32 context;
5076   i32 retval;
5077   u32 next_index;
5078 };
5079
5080 /** \brief PacketGenerator create interface request
5081     @param client_index - opaque cookie to identify the sender
5082     @param context - sender context, to match reply w/ request
5083     @param interface_id - interface index
5084 */
5085 define pg_create_interface
5086 {
5087   u32 client_index;
5088   u32 context;
5089   u32 interface_id;
5090 };
5091
5092 /** \brief PacketGenerator create interface response
5093     @param context - sender context, to match reply w/ request
5094     @param retval - return value for request
5095 */
5096 define pg_create_interface_reply
5097 {
5098   u32 context;
5099   i32 retval;
5100   u32 sw_if_index;
5101 };
5102
5103 /** \brief PacketGenerator capture packets on given interface request
5104     @param client_index - opaque cookie to identify the sender
5105     @param context - sender context, to match reply w/ request
5106     @param interface_id - pg interface index
5107     @param is_enabled - 1 if enabling streams, 0 if disabling
5108     @param count - number of packets to be captured
5109     @param pcap_file - pacp file name to store captured packets
5110 */
5111 define pg_capture
5112 {
5113   u32 client_index;
5114   u32 context;
5115   u32 interface_id;
5116   u8 is_enabled;
5117   u32 count;
5118   u32 pcap_name_length;
5119   u8 pcap_file_name[pcap_name_length];
5120 };
5121
5122 /** \brief PacketGenerator capture packets response
5123     @param context - sender context, to match reply w/ request
5124     @param retval - return value for request
5125 */
5126 define pg_capture_reply
5127 {
5128   u32 context;
5129   i32 retval;
5130 };
5131
5132 /** \brief Enable / disable packet generator request
5133     @param client_index - opaque cookie to identify the sender
5134     @param context - sender context, to match reply w/ request
5135     @param is_enabled - 1 if enabling streams, 0 if disabling
5136     @param stream - stream name to be enable/disabled, if not specified handle all streams
5137 */
5138 define pg_enable_disable
5139 {
5140   u32 client_index;
5141   u32 context;
5142   u8 is_enabled;
5143   u32 stream_name_length;
5144   u8 stream_name[stream_name_length];
5145 };
5146
5147 /** \brief Reply for enable / disable packet generator
5148     @param context - returned sender context, to match reply w/ request
5149     @param retval - return code
5150 */
5151 define pg_enable_disable_reply
5152 {
5153   u32 context;
5154   i32 retval;
5155 };
5156
5157 /** \brief Configure IP source and L4 port-range check
5158     @param client_index - opaque cookie to identify the sender
5159     @param context - sender context, to match reply w/ request
5160     @param is_ip6 - 1 if source address type is IPv6
5161     @param is_add - 1 if add, 0 if delete
5162     @param mask_length - mask length for address entry
5163     @param address - array of address bytes
5164     @param number_of_ranges - length of low_port and high_port arrays (must match)
5165     @param low_ports[32] - up to 32 low end of port range entries (must have corresponding high_ports entry)
5166     @param high_ports[32] - up to 32 high end of port range entries (must have corresponding low_ports entry)
5167     @param vrf_id - fib table/vrf id to associate the source and port-range check with
5168     @note To specify a single port set low_port and high_port entry the same
5169 */
5170 define ip_source_and_port_range_check_add_del
5171 {
5172   u32 client_index;
5173   u32 context;
5174   u8 is_ipv6;
5175   u8 is_add;
5176   u8 mask_length;
5177   u8 address[16];
5178   u8 number_of_ranges;
5179   u16 low_ports[32];
5180   u16 high_ports[32];
5181   u32 vrf_id;
5182 };
5183
5184 /** \brief Configure IP source and L4 port-range check reply
5185     @param context - returned sender context, to match reply w/ request
5186     @param retval - return code
5187 */
5188 define ip_source_and_port_range_check_add_del_reply
5189 {
5190   u32 context;
5191   i32 retval;
5192 };
5193
5194 /** \brief Set interface source and L4 port-range request
5195     @param client_index - opaque cookie to identify the sender
5196     @param context - sender context, to match reply w/ request
5197     @param interface_id - interface index
5198     @param tcp_vrf_id - VRF associated with source and TCP port-range check
5199     @param udp_vrf_id - VRF associated with source and TCP port-range check
5200 */
5201 define ip_source_and_port_range_check_interface_add_del
5202 {
5203   u32 client_index;
5204   u32 context;
5205   u8 is_add;
5206   u32 sw_if_index;
5207   u32 tcp_in_vrf_id;
5208   u32 tcp_out_vrf_id;
5209   u32 udp_in_vrf_id;
5210   u32 udp_out_vrf_id;
5211 };
5212
5213 /** \brief Set interface source and L4 port-range response
5214     @param context - sender context, to match reply w/ request
5215     @param retval - return value for request
5216 */
5217 define ip_source_and_port_range_check_interface_add_del_reply
5218 {
5219   u32 context;
5220   i32 retval;
5221 };
5222
5223 /** \brief Add / del ipsec gre tunnel request
5224     @param client_index - opaque cookie to identify the sender
5225     @param context - sender context, to match reply w/ request
5226     @param local_sa_id - local SA id
5227     @param remote_sa_id - remote SA id
5228     @param is_add - 1 if adding the tunnel, 0 if deleting
5229     @param src_address - tunnel source address
5230     @param dst_address - tunnel destination address
5231 */
5232 define ipsec_gre_add_del_tunnel {
5233     u32 client_index;
5234     u32 context;
5235     u32 local_sa_id;
5236     u32 remote_sa_id;
5237     u8 is_add;
5238     u8 src_address[4];
5239     u8 dst_address[4];
5240 };
5241
5242 /** \brief Reply for add / del ipsec gre tunnel request
5243     @param context - returned sender context, to match reply w/ request
5244     @param retval - return code
5245     @param sw_if_index - software index of the new ipsec gre tunnel
5246 */
5247 define ipsec_gre_add_del_tunnel_reply {
5248     u32 context;
5249     i32 retval;
5250     u32 sw_if_index;
5251 };
5252
5253 /** \brief Dump ipsec gre tunnel table
5254     @param client_index - opaque cookie to identify the sender
5255     @param context - sender context, to match reply w/ request
5256     @param tunnel_index - gre tunnel identifier or -1 in case of all tunnels
5257 */
5258 define ipsec_gre_tunnel_dump {
5259     u32 client_index;
5260     u32 context;
5261     u32 sw_if_index;
5262 };
5263
5264 /** \brief mpls gre tunnel operational state response
5265     @param context - returned sender context, to match reply w/ request
5266     @param sw_if_index - software index of the ipsec gre tunnel
5267     @param local_sa_id - local SA id
5268     @param remote_sa_id - remote SA id
5269     @param src_address - tunnel source address
5270     @param dst_address - tunnel destination address
5271 */
5272 define ipsec_gre_tunnel_details {
5273     u32 context;
5274     u32 sw_if_index;
5275     u32 local_sa_id;
5276     u32 remote_sa_id;
5277     u8 src_address[4];
5278     u8 dst_address[4];
5279 };
5280
5281 /** \brief Delete sub interface request
5282     @param client_index - opaque cookie to identify the sender
5283     @param context - sender context, to match reply w/ request
5284     @param sw_if_index - sw index of the interface that was created by create_subif
5285 */
5286 define delete_subif {
5287   u32 client_index;
5288   u32 context;
5289   u32 sw_if_index;
5290 };
5291
5292 /** \brief Delete sub interface response
5293     @param context - sender context, to match reply w/ request
5294     @param retval - return code for the request
5295 */
5296 define delete_subif_reply {
5297   u32 context;
5298   i32 retval;
5299 };
5300
5301 /** \brief DPDK interface HQoS pipe profile set request
5302     @param client_index - opaque cookie to identify the sender
5303     @param context - sender context, to match reply w/ request
5304     @param sw_if_index - the interface
5305     @param subport - subport ID
5306     @param pipe - pipe ID within its subport
5307     @param profile - pipe profile ID
5308 */
5309 define sw_interface_set_dpdk_hqos_pipe {
5310     u32 client_index;
5311     u32 context;
5312     u32 sw_if_index;
5313     u32 subport;
5314     u32 pipe;
5315     u32 profile;
5316 };
5317
5318 /** \brief DPDK interface HQoS pipe profile set reply
5319     @param context - sender context, to match reply w/ request
5320     @param retval - request return code
5321 */
5322 define sw_interface_set_dpdk_hqos_pipe_reply {
5323     u32 context;
5324     i32 retval;
5325 };
5326
5327 /** \brief DPDK interface HQoS subport parameters set request
5328     @param client_index - opaque cookie to identify the sender
5329     @param context - sender context, to match reply w/ request
5330     @param sw_if_index - the interface
5331     @param subport - subport ID
5332     @param tb_rate - subport token bucket rate (measured in bytes/second)
5333     @param tb_size - subport token bucket size (measured in credits)
5334     @param tc_rate - subport traffic class 0 .. 3 rates (measured in bytes/second)
5335     @param tc_period - enforcement period for rates (measured in milliseconds)
5336 */
5337 define sw_interface_set_dpdk_hqos_subport {
5338     u32 client_index;
5339     u32 context;
5340     u32 sw_if_index;
5341     u32 subport;
5342     u32 tb_rate;
5343     u32 tb_size;
5344     u32 tc_rate[4];
5345     u32 tc_period;
5346 };
5347
5348 /** \brief DPDK interface HQoS subport parameters set reply
5349     @param context - sender context, to match reply w/ request
5350     @param retval - request return code
5351 */
5352 define sw_interface_set_dpdk_hqos_subport_reply {
5353     u32 context;
5354     i32 retval;
5355 };
5356
5357 /** \brief DPDK interface HQoS tctbl entry set request
5358     @param client_index - opaque cookie to identify the sender
5359     @param context - sender context, to match reply w/ request
5360     @param sw_if_index - the interface
5361     @param entry - entry index ID
5362     @param tc - traffic class (0 .. 3)
5363     @param queue - traffic class queue (0 .. 3)
5364 */
5365 define sw_interface_set_dpdk_hqos_tctbl {
5366     u32 client_index;
5367     u32 context;
5368     u32 sw_if_index;
5369     u32 entry;
5370     u32 tc;
5371     u32 queue;
5372 };
5373
5374 /** \brief DPDK interface HQoS tctbl entry set reply
5375     @param context - sender context, to match reply w/ request
5376     @param retval - request return code
5377 */
5378 define sw_interface_set_dpdk_hqos_tctbl_reply {
5379     u32 context;
5380     i32 retval;
5381 };
5382
5383 /** \brief L2 interface pbb tag rewrite configure request
5384     @param client_index - opaque cookie to identify the sender
5385     @param context - sender context, to match reply w/ request
5386     @param sw_if_index - interface the operation is applied to
5387     @param vtr_op - Choose from l2_vtr_op_t enum values
5388     @param inner_tag - needed for translate_qinq vtr op only
5389     @param outer_tag - needed for translate_qinq vtr op only 
5390     @param b_dmac - B-tag remote mac address, needed for any push or translate_qinq vtr op
5391     @param b_smac - B-tag local mac address, needed for any push or translate qinq vtr op
5392     @param b_vlanid - B-tag vlanid, needed for any push or translate qinq vtr op
5393     @param i_sid - I-tag service id, needed for any push or translate qinq vtr op
5394 */
5395 define l2_interface_pbb_tag_rewrite
5396 {
5397   u32 client_index;
5398   u32 context;
5399   u32 sw_if_index;
5400   u32 vtr_op;
5401   u16 outer_tag;
5402   u8  b_dmac[6];
5403   u8  b_smac[6];
5404   u16 b_vlanid;
5405   u32 i_sid;
5406 };
5407
5408 /** \brief L2 interface pbb tag rewrite response
5409     @param context - sender context, to match reply w/ request
5410     @param retval - return code for the request
5411 */
5412 define l2_interface_pbb_tag_rewrite_reply
5413 {
5414   u32 context;
5415   i32 retval;
5416 };
5417
5418 /** \brief Punt traffic to the host
5419     @param client_index - opaque cookie to identify the sender
5420     @param context - sender context, to match reply w/ request
5421     @param is_add - add punt if non-zero, else delete
5422     @param ipv - L3 protocol 4 - IPv4, 6 - IPv6, ~0 - All
5423     @param l4_protocol - L4 protocol to be punted, only UDP (0x11) is supported
5424     @param l4_port - TCP/UDP port to be punted
5425 */
5426 define punt {
5427     u32 client_index;
5428     u32 context;
5429     u8 is_add;
5430     u8 ipv;
5431     u8 l4_protocol;
5432     u16 l4_port;
5433 };
5434
5435 /** \brief Reply to the punt request
5436     @param context - sender context which was passed in the request
5437     @param retval - return code of punt request
5438 */
5439 define punt_reply
5440 {
5441     u32 context;
5442     i32 retval;
5443 };
5444
5445 /** \brief Dump ipsec policy database data
5446     @param client_index - opaque cookie to identify the sender
5447     @param context - sender context, to match reply w/ request
5448     @param spd_id - SPD instance id
5449     @param sa_id - SA id, optional, set to ~0 to see all policies in SPD
5450 */
5451 define ipsec_spd_dump {
5452     u32 client_index;
5453     u32 context;
5454     u32 spd_id;
5455     u32 sa_id;
5456 };
5457
5458 /** \brief IPsec policy database response
5459     @param context - sender context which was passed in the request
5460     @param spd_id - SPD instance id
5461     @param priority - numeric value to control policy evaluation order
5462     @param is_outbound - [1|0] to indicate if direction is [out|in]bound
5463     @param is_ipv6 - [1|0] to indicate if address family is ipv[6|4]
5464     @param local_start_addr - first address in local traffic selector range
5465     @param local_stop_addr - last address in local traffic selector range
5466     @param local_start_port - first port in local traffic selector range
5467     @param local_stop_port - last port in local traffic selector range
5468     @param remote_start_addr - first address in remote traffic selector range
5469     @param remote_stop_addr - last address in remote traffic selector range
5470     @param remote_start_port - first port in remote traffic selector range
5471     @param remote_stop_port - last port in remote traffic selector range
5472     @param protocol - traffic selector protocol
5473     @param policy - policy action
5474     @param sa_id - SA id
5475     @param bytes - byte count of packets matching this policy
5476     @param packets - count of packets matching this policy
5477 */
5478
5479 define ipsec_spd_details {
5480     u32 context;
5481     u32 spd_id;
5482     i32 priority;
5483     u8 is_outbound;
5484     u8 is_ipv6;
5485     u8 local_start_addr[16];
5486     u8 local_stop_addr[16];
5487     u16 local_start_port;
5488     u16 local_stop_port;
5489     u8 remote_start_addr[16];
5490     u8 remote_stop_addr[16];
5491     u16 remote_start_port;
5492     u16 remote_stop_port;
5493     u8 protocol;
5494     u8 policy;
5495     u32 sa_id;
5496     u64 bytes;
5497     u64 packets;
5498 };
5499
5500 /** \brief Feature path enable/disable request
5501     @param client_index - opaque cookie to identify the sender
5502     @param context - sender context, to match reply w/ request
5503     @param sw_if_index - the interface
5504     @param enable - 1 = on, 0 = off
5505 */
5506 define feature_enable_disable {
5507     u32 client_index;
5508     u32 context;
5509     u32 sw_if_index;
5510     u8 enable;
5511     u8 arc_name[64];
5512     u8 feature_name[64];
5513 };
5514
5515 /** \brief Reply to the eature path enable/disable request
5516     @param context - sender context which was passed in the request
5517     @param retval - return code for the request
5518 */
5519 define feature_enable_disable_reply
5520 {
5521     u32 context;
5522     i32 retval;
5523 };
5524
5525 /** \brief Set / clear software interface tag
5526     @param client_index - opaque cookie to identify the sender
5527     @param context - sender context, to match reply w/ request
5528     @param sw_if_index - the interface
5529     @param add_del - 1 = add, 0 = delete
5530     @param tag - an ascii tag
5531 */
5532 define sw_interface_tag_add_del {
5533     u32 client_index;
5534     u32 context;
5535     u8 is_add;
5536     u32 sw_if_index;
5537     u8 tag[64];
5538 };
5539
5540 /** \brief Reply to set / clear software interface tag
5541     @param context - sender context which was passed in the request
5542     @param retval - return code for the request
5543 */
5544 define sw_interface_tag_add_del_reply
5545 {
5546     u32 context;
5547     i32 retval;
5548 };