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