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