span: add tx functionality and support for multiple mirror ports
[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     @param key_id
2373       HMAC_NO_KEY           0
2374       HMAC_SHA_1_96         1
2375       HMAC_SHA_256_128      2
2376     @param key - secret key
2377 */
2378 define lisp_add_del_local_eid
2379 {
2380   u32 client_index;
2381   u32 context;
2382   u8 is_add;
2383   u8 eid_type;
2384   u8 eid[16];
2385   u8 prefix_len;
2386   u8 locator_set_name[64];
2387   u32 vni;
2388   u16 key_id;
2389   u8 key[64];
2390 };
2391
2392 /** \brief Reply for local_eid add/del
2393     @param context - returned sender context, to match reply w/ request
2394     @param retval - return code
2395 */
2396 define lisp_add_del_local_eid_reply
2397 {
2398   u32 context;
2399   i32 retval;
2400 };
2401
2402 /** \brief add or delete lisp gpe tunnel
2403     @param client_index - opaque cookie to identify the sender
2404     @param context - sender context, to match reply w/ request
2405     @param is_add - add address if non-zero, else delete
2406     @param eid_type -
2407       0 : ipv4
2408       1 : ipv6
2409       2 : mac
2410     @param rmt_eid - remote eid
2411     @param lcl_eid - local eid
2412     @param rmt_len - remote prefix len
2413     @param lcl_len - local prefix len
2414     @param vni - virtual network identifier
2415     @param dp_table - vrf/bridge domain id
2416     @param loc_num - number of locators
2417     @param lcl_locs - array of local locators
2418     @param rmt_locs - array of remote locators
2419     @param action - negative action when 0 locators configured
2420 */
2421 define lisp_gpe_add_del_fwd_entry
2422 {
2423   u32 client_index;
2424   u32 context;
2425   u8 is_add;
2426   u8 eid_type;
2427   u8 rmt_eid[16];
2428   u8 lcl_eid[16];
2429   u8 rmt_len;
2430   u8 lcl_len;
2431   u32 vni;
2432   u32 dp_table;
2433   u32 loc_num;
2434   u8 lcl_locs[loc_num];
2435   u8 rmt_locs[loc_num];
2436   u8 action;
2437 };
2438
2439 /** \brief Reply for gpe_fwd_entry add/del
2440     @param context - returned sender context, to match reply w/ request
2441     @param retval - return code
2442 */
2443 define lisp_gpe_add_del_fwd_entry_reply
2444 {
2445   u32 context;
2446   i32 retval;
2447 };
2448
2449 /** \brief Add/delete map server
2450     @param client_index - opaque cookie to identify the sender
2451     @param context - sender context, to match reply w/ request
2452     @param is_add - add address if non-zero; delete otherwise
2453     @param is_ipv6 - if non-zero the address is ipv6, else ipv4
2454     @param ip_address - map server IP address
2455 */
2456 define lisp_add_del_map_server
2457 {
2458   u32 client_index;
2459   u32 context;
2460   u8 is_add;
2461   u8 is_ipv6;
2462   u8 ip_address[16];
2463 };
2464
2465 /** \brief Reply for lisp_add_del_map_server
2466     @param context - returned sender context, to match reply w/ request
2467     @param retval - return code
2468 */
2469 define lisp_add_del_map_server_reply
2470 {
2471   u32 context;
2472   i32 retval;
2473 };
2474
2475 /** \brief add or delete map-resolver
2476     @param client_index - opaque cookie to identify the sender
2477     @param context - sender context, to match reply w/ request
2478     @param is_add - add address if non-zero, else delete
2479     @param is_ipv6 - if non-zero the address is ipv6, else ipv4
2480     @param ip_address - array of address bytes
2481 */
2482 define lisp_add_del_map_resolver
2483 {
2484   u32 client_index;
2485   u32 context;
2486   u8 is_add;
2487   u8 is_ipv6;
2488   u8 ip_address[16];
2489 };
2490
2491 /** \brief Reply for map_resolver add/del
2492     @param context - returned sender context, to match reply w/ request
2493     @param retval - return code
2494 */
2495 define lisp_add_del_map_resolver_reply
2496 {
2497   u32 context;
2498   i32 retval;
2499 };
2500
2501 /** \brief enable or disable lisp-gpe protocol
2502     @param client_index - opaque cookie to identify the sender
2503     @param context - sender context, to match reply w/ request
2504     @param is_en - enable protocol if non-zero, else disable
2505 */
2506 define lisp_gpe_enable_disable
2507 {
2508   u32 client_index;
2509   u32 context;
2510   u8 is_en;
2511 };
2512
2513 /** \brief Reply for gpe enable/disable
2514     @param context - returned sender context, to match reply w/ request
2515     @param retval - return code
2516 */
2517 define lisp_gpe_enable_disable_reply
2518 {
2519   u32 context;
2520   i32 retval;
2521 };
2522
2523 /** \brief enable or disable LISP feature
2524     @param client_index - opaque cookie to identify the sender
2525     @param context - sender context, to match reply w/ request
2526     @param is_en - enable protocol if non-zero, else disable
2527 */
2528 define lisp_enable_disable
2529 {
2530   u32 client_index;
2531   u32 context;
2532   u8 is_en;
2533 };
2534
2535 /** \brief Reply for gpe enable/disable
2536     @param context - returned sender context, to match reply w/ request
2537     @param retval - return code
2538 */
2539 define lisp_enable_disable_reply
2540 {
2541   u32 context;
2542   i32 retval;
2543 };
2544
2545 /** \brief add or delete gpe_iface
2546     @param client_index - opaque cookie to identify the sender
2547     @param context - sender context, to match reply w/ request
2548     @param is_add - add address if non-zero, else delete
2549 */
2550 define lisp_gpe_add_del_iface
2551 {
2552   u32 client_index;
2553   u32 context;
2554   u8 is_add;
2555   u8 is_l2;
2556   u32 dp_table;
2557   u32 vni;
2558 };
2559
2560 /** \brief Reply for gpe_iface add/del
2561     @param context - returned sender context, to match reply w/ request
2562     @param retval - return code
2563 */
2564 define lisp_gpe_add_del_iface_reply
2565 {
2566   u32 context;
2567   i32 retval;
2568 };
2569
2570 /** \brief configure or disable LISP PITR node
2571     @param client_index - opaque cookie to identify the sender
2572     @param context - sender context, to match reply w/ request
2573     @param ls_name - locator set name
2574     @param is_add - add locator set if non-zero, else disable pitr
2575 */
2576 define lisp_pitr_set_locator_set
2577 {
2578   u32 client_index;
2579   u32 context;
2580   u8 is_add;
2581   u8 ls_name[64];
2582 };
2583
2584 /** \brief Reply for lisp_pitr_set_locator_set
2585     @param context - returned sender context, to match reply w/ request
2586     @param retval - return code
2587 */
2588 define lisp_pitr_set_locator_set_reply
2589 {
2590   u32 context;
2591   i32 retval;
2592 };
2593
2594 /** \brief Get state of LISP RLOC probing
2595     @param client_index - opaque cookie to identify the sender
2596     @param context - sender context, to match reply w/ request
2597 */
2598 define show_lisp_rloc_probe_state
2599 {
2600   u32 client_index;
2601   u32 context;
2602 };
2603
2604 /** \brief Reply for show_lisp_rloc_probe_state
2605     @param context - returned sender context, to match reply w/ request
2606     @param retval - return code
2607     @param is_enabled - state of RLOC probing
2608 */
2609 define show_lisp_rloc_probe_state_reply
2610 {
2611   u32 context;
2612   i32 retval;
2613   u8 is_enabled;
2614 };
2615
2616 /** \brief enable/disable LISP RLOC probing
2617     @param client_index - opaque cookie to identify the sender
2618     @param context - sender context, to match reply w/ request
2619     @param is_enable - enable if non-zero; disable otherwise
2620 */
2621 define lisp_rloc_probe_enable_disable
2622 {
2623   u32 client_index;
2624   u32 context;
2625   u8 is_enabled;
2626 };
2627
2628 /** \brief Reply for lisp_rloc_probe_enable_disable
2629     @param context - returned sender context, to match reply w/ request
2630     @param retval - return code
2631 */
2632 define lisp_rloc_probe_enable_disable_reply
2633 {
2634   u32 context;
2635   i32 retval;
2636 };
2637
2638 /** \brief enable/disable LISP map-register
2639     @param client_index - opaque cookie to identify the sender
2640     @param context - sender context, to match reply w/ request
2641     @param is_enable - enable if non-zero; disable otherwise
2642 */
2643 define lisp_map_register_enable_disable
2644 {
2645   u32 client_index;
2646   u32 context;
2647   u8 is_enabled;
2648 };
2649
2650 /** \brief Reply for lisp_map_register_enable_disable
2651     @param context - returned sender context, to match reply w/ request
2652     @param retval - return code
2653 */
2654 define lisp_map_register_enable_disable_reply
2655 {
2656   u32 context;
2657   i32 retval;
2658 };
2659
2660 /** \brief Get state of LISP map-register
2661     @param client_index - opaque cookie to identify the sender
2662     @param context - sender context, to match reply w/ request
2663 */
2664 define show_lisp_map_register_state
2665 {
2666   u32 client_index;
2667   u32 context;
2668 };
2669
2670 /** \brief Reply for show_lisp_map_register_state
2671     @param context - returned sender context, to match reply w/ request
2672     @param retval - return code
2673 */
2674 define show_lisp_map_register_state_reply
2675 {
2676   u32 context;
2677   i32 retval;
2678   u8 is_enabled;
2679 };
2680
2681 /** \brief set LISP map-request mode. Based on configuration VPP will send
2682       src/dest or just normal destination map requests.
2683     @param client_index - opaque cookie to identify the sender
2684     @param context - sender context, to match reply w/ request
2685     @param mode - new map-request mode. Supported values are:
2686       0 - destination only
2687       1 - source/destaination
2688 */
2689 define lisp_map_request_mode
2690 {
2691   u32 client_index;
2692   u32 context;
2693   u8 mode;
2694 };
2695
2696 /** \brief Reply for lisp_map_request_mode
2697     @param context - returned sender context, to match reply w/ request
2698     @param retval - return code
2699 */
2700 define lisp_map_request_mode_reply
2701 {
2702   u32 context;
2703   i32 retval;
2704 };
2705
2706 /** \brief Request for LISP map-request mode
2707     @param client_index - opaque cookie to identify the sender
2708     @param context - sender context, to match reply w/ request
2709 */
2710 define show_lisp_map_request_mode
2711 {
2712   u32 client_index;
2713   u32 context;
2714 };
2715
2716 /** \brief Reply for show_lisp_map_request_mode
2717     @param context - returned sender context, to match reply w/ request
2718     @param retval - return code
2719     @param mode - map-request mode
2720 */
2721 define show_lisp_map_request_mode_reply
2722 {
2723   u32 context;
2724   i32 retval;
2725   u8 mode;
2726 };
2727
2728 /** \brief add or delete remote static mapping
2729     @param client_index - opaque cookie to identify the sender
2730     @param context - sender context, to match reply w/ request
2731     @param is_add - add address if non-zero, else delete
2732     @param is_src_dst - flag indicating src/dst based routing policy
2733     @param del_all - if set, delete all remote mappings
2734     @param vni - virtual network instance
2735     @param action - negative map-reply action
2736     @param eid_type -
2737       0 : ipv4
2738       1 : ipv6
2739       2 : mac
2740     @param deid - dst EID
2741     @param seid - src EID, valid only if is_src_dst is enabled
2742     @param rloc_num - number of remote locators
2743     @param rlocs - remote locator records
2744         Structure of remote locator:
2745
2746         define rloc_t {
2747           u8 is_ip4;
2748           u8 priority;
2749           u8 weight;
2750           u8 addr[16];
2751         }
2752 */
2753 define lisp_add_del_remote_mapping
2754 {
2755   u32 client_index;
2756   u32 context;
2757   u8 is_add;
2758   u8 is_src_dst;
2759   u8 del_all;
2760   u32 vni;
2761   u8 action;
2762   u8 eid_type;
2763   u8 eid[16];
2764   u8 eid_len;
2765   u8 seid[16];
2766   u8 seid_len;
2767   u32 rloc_num;
2768   u8 rlocs[0];
2769 };
2770
2771 /** \brief Reply for lisp_add_del_remote_mapping
2772     @param context - returned sender context, to match reply w/ request
2773     @param retval - return code
2774 */
2775 define lisp_add_del_remote_mapping_reply
2776 {
2777   u32 context;
2778   i32 retval;
2779 };
2780
2781 /** \brief add or delete LISP adjacency adjacency
2782     @param client_index - opaque cookie to identify the sender
2783     @param context - sender context, to match reply w/ request
2784     @param is_add - add address if non-zero, else delete
2785     @param vni - virtual network instance
2786     @param eid_type -
2787       0 : ipv4
2788       1 : ipv6
2789       2 : mac
2790     @param reid - remote EID
2791     @param leid - local EID
2792 */
2793 define lisp_add_del_adjacency
2794 {
2795   u32 client_index;
2796   u32 context;
2797   u8 is_add;
2798   u32 vni;
2799   u8 eid_type;
2800   u8 reid[16];
2801   u8 leid[16];
2802   u8 reid_len;
2803   u8 leid_len;
2804 };
2805
2806 /** \brief Reply for lisp_add_del_adjacency
2807     @param context - returned sender context, to match reply w/ request
2808     @param retval - return code
2809 */
2810 define lisp_add_del_adjacency_reply
2811 {
2812   u32 context;
2813   i32 retval;
2814 };
2815
2816 /** \brief add or delete map request itr rlocs
2817     @param client_index - opaque cookie to identify the sender
2818     @param context - sender context, to match reply w/ request
2819     @param is_add - add address if non-zero, else delete
2820     @param locator_set_name - locator set name
2821 */
2822 define lisp_add_del_map_request_itr_rlocs
2823 {
2824   u32 client_index;
2825   u32 context;
2826   u8 is_add;
2827   u8 locator_set_name[64];
2828 };
2829
2830 /** \brief Reply for lisp_add_del_map_request_itr_rlocs
2831     @param context - returned sender context, to match reply w/ request
2832     @param retval - return code
2833 */
2834
2835 define lisp_add_del_map_request_itr_rlocs_reply
2836 {
2837   u32 context;
2838   i32 retval;
2839 };
2840
2841 /** \brief map/unmap vni/bd_index to vrf
2842     @param client_index - opaque cookie to identify the sender
2843     @param context - sender context, to match reply w/ request
2844     @param is_add - add or delete mapping
2845     @param dp_table - virtual network id/bridge domain index
2846     @param vrf - vrf
2847 */
2848 define lisp_eid_table_add_del_map
2849 {
2850   u32 client_index;
2851   u32 context;
2852   u8 is_add;
2853   u32 vni;
2854   u32 dp_table;
2855   u8 is_l2;
2856 };
2857
2858 /** \brief Reply for lisp_eid_table_add_del_map
2859     @param context - returned sender context, to match reply w/ request
2860     @param retval - return code
2861 */
2862 define lisp_eid_table_add_del_map_reply
2863 {
2864   u32 context;
2865   i32 retval;
2866 };
2867
2868 /** \brief Request for map lisp locator status
2869     @param client_index - opaque cookie to identify the sender
2870     @param context - sender context, to match reply w/ request
2871     @param locator_set_index - index of locator_set
2872     @param ls_name - locator set name
2873     @param is_index_set - flag indicating whether ls_name or ls_index is set
2874  */
2875 define lisp_locator_dump
2876 {
2877   u32 client_index;
2878   u32 context;
2879   u32 ls_index;
2880   u8 ls_name[64];
2881   u8 is_index_set;
2882 };
2883
2884 /** \brief LISP locator_set status
2885     @param local - if is set, then locator is local
2886     @param locator_set_name - name of the locator_set
2887     @param sw_if_index - sw_if_index of the locator
2888     @param priority - locator priority
2889     @param weight - locator weight
2890   */
2891 define lisp_locator_details
2892 {
2893   u32 context;
2894   u8 local;
2895   u32 sw_if_index;
2896   u8 is_ipv6;
2897   u8 ip_address[16];
2898   u8 priority;
2899   u8 weight;
2900 };
2901
2902 /** \brief LISP locator_set status
2903     @param context - sender context, to match reply w/ request
2904     @param ls_index - locator set index
2905     @param ls_name - name of the locator set
2906  */
2907 define lisp_locator_set_details
2908 {
2909   u32 context;
2910   u32 ls_index;
2911   u8 ls_name[64];
2912 };
2913
2914 /** \brief Request for locator_set summary status
2915     @param client_index - opaque cookie to identify the sender
2916     @param context - sender context, to match reply w/ request
2917     @param filter - filter type
2918       Supported values:
2919         0: all locator sets
2920         1: local locator sets
2921         2: remote locator sets
2922  */
2923 define lisp_locator_set_dump
2924 {
2925   u32 client_index;
2926   u32 context;
2927   u8 filter;
2928 };
2929
2930 /** \brief Dump lisp eid-table
2931     @param client_index - opaque cookie to identify the sender
2932     @param context - sender context, to match reply w/ request
2933     @param locator_set_index - index of locator_set, if ~0 then the mapping
2934                                 is negative
2935     @param action - negative map request action
2936     @param is_local - local if non-zero, else remote
2937     @param eid_type:
2938       0 : ipv4
2939       1 : ipv6
2940       2 : mac
2941     @param is_src_dst - EID is type of source/destination
2942     @param eid - EID can be ip4, ip6 or mac
2943     @param eid_prefix_len - prefix length
2944     @param seid - source EID can be ip4, ip6 or mac
2945     @param seid_prefix_len - source prefix length
2946     @param vni - virtual network instance
2947     @param ttl - time to live
2948     @param authoritative - authoritative
2949     @param key_id
2950       HMAC_NO_KEY           0
2951       HMAC_SHA_1_96         1
2952       HMAC_SHA_256_128      2
2953     @param key - secret key
2954 */
2955
2956 define lisp_eid_table_details
2957 {
2958   u32 context;
2959   u32 locator_set_index;
2960   u8 action;
2961   u8 is_local;
2962   u8 eid_type;
2963   u8 is_src_dst;
2964   u32 vni;
2965   u8 eid[16];
2966   u8 eid_prefix_len;
2967   u8 seid[16];
2968   u8 seid_prefix_len;
2969   u32 ttl;
2970   u8 authoritative;
2971   u16 key_id;
2972   u8 key[64];
2973 };
2974
2975 /** \brief Request for eid table summary status
2976     @param client_index - opaque cookie to identify the sender
2977     @param context - sender context, to match reply w/ request
2978     @param eid_set - if non-zero request info about specific mapping
2979     @param vni - virtual network instance; valid only if eid_set != 0
2980     @param prefix_length - prefix length if EID is IP address;
2981       valid only if eid_set != 0
2982     @param eid_type - EID type; valid only if eid_set != 0
2983       Supported values:
2984         0: EID is IPv4
2985         1: EID is IPv6
2986         2: EID is ethernet address
2987     @param eid - endpoint identifier
2988     @param filter - filter type;
2989       Support values:
2990         0: all eid
2991         1: local eid
2992         2: remote eid
2993  */
2994 define lisp_eid_table_dump
2995 {
2996   u32 client_index;
2997   u32 context;
2998   u8 eid_set;
2999   u8 prefix_length;
3000   u32 vni;
3001   u8 eid_type;
3002   u8 eid[16];
3003   u8 filter;
3004 };
3005
3006 /** \brief LISP adjacency
3007     @param eid_type -
3008       0 : ipv4
3009       1 : ipv6
3010       2 : mac
3011     @param reid - remote EID
3012     @param leid - local EID
3013     @param reid_prefix_len - remote EID IP prefix length
3014     @param leid_prefix_len - local EID IP prefix length
3015   */
3016 typeonly manual_print manual_endian define lisp_adjacency
3017 {
3018   u8 eid_type;
3019   u8 reid[16];
3020   u8 leid[16];
3021   u8 reid_prefix_len;
3022   u8 leid_prefix_len;
3023 };
3024
3025 /** \brief LISP adjacency reply
3026     @param count - number of adjacencies
3027     @param adjacencies - array of adjacencies
3028   */
3029 manual_endian manual_print define lisp_adjacencies_get_reply
3030 {
3031   u32 context;
3032   i32 retval;
3033   u32 count;
3034   vl_api_lisp_adjacency_t adjacencies[count];
3035 };
3036
3037 /** \brief Request for LISP adjacencies
3038     @param client_index - opaque cookie to identify the sender
3039     @param context - sender context, to match reply w/ request
3040     @param vni - filter adjacencies by VNI
3041  */
3042 define lisp_adjacencies_get
3043 {
3044   u32 client_index;
3045   u32 context;
3046   u32 vni;
3047 };
3048
3049 /** \brief Shows relationship between vni and vrf/bd
3050     @param dp_table - VRF index or bridge domain index
3051     @param vni - vitual network instance
3052   */
3053 define lisp_eid_table_map_details
3054 {
3055   u32 context;
3056   u32 vni;
3057   u32 dp_table;
3058 };
3059
3060 /** \brief Request for lisp_eid_table_map_details
3061     @param client_index - opaque cookie to identify the sender
3062     @param context - sender context, to match reply w/ request
3063     @param is_l2 - if set dump vni/bd mappings else vni/vrf
3064  */
3065 define lisp_eid_table_map_dump
3066 {
3067   u32 client_index;
3068   u32 context;
3069   u8 is_l2;
3070 };
3071
3072 /** \brief Dumps all VNIs used in mappings
3073     @param client_index - opaque cookie to identify the sender
3074     @param context - sender context, to match reply w/ request
3075   */
3076 define lisp_eid_table_vni_dump
3077 {
3078   u32 client_index;
3079   u32 context;
3080 };
3081
3082 /** \brief reply to lisp_eid_table_vni_dump
3083     @param client_index - opaque cookie to identify the sender
3084     @param context - sender context, to match reply w/ request
3085     @param vni - virtual network instance
3086  */
3087 define lisp_eid_table_vni_details
3088 {
3089   u32 client_index;
3090   u32 context;
3091   u32 vni;
3092 };
3093
3094 define lisp_gpe_tunnel_details
3095 {
3096   u32 context;
3097   u32 tunnels;
3098   u8 is_ipv6;
3099   u8 source_ip[16];
3100   u8 destination_ip[16];
3101   u32 encap_fib_id;
3102   u32 decap_fib_id;
3103   u32 dcap_next;
3104   u8 lisp_ver;
3105   u8 next_protocol;
3106   u8 flags;
3107   u8 ver_res;
3108   u8 res;
3109   u32 iid;
3110 };
3111
3112 /** \brief Request for gpe tunnel summary status
3113     @param client_index - opaque cookie to identify the sender
3114     @param context - sender context, to match reply w/ request
3115  */
3116 define lisp_gpe_tunnel_dump
3117 {
3118   u32 client_index;
3119   u32 context;
3120 };
3121
3122 /** \brief LISP map resolver status
3123     @param is_ipv6 - if non-zero the address is ipv6, else ipv4
3124     @param ip_address - array of address bytes
3125  */
3126 define lisp_map_resolver_details
3127 {
3128   u32 context;
3129   u8 is_ipv6;
3130   u8 ip_address[16];
3131 };
3132
3133 /** \brief Request for map resolver summary status
3134     @param client_index - opaque cookie to identify the sender
3135     @param context - sender context, to match reply w/ request
3136  */
3137 define lisp_map_resolver_dump
3138 {
3139   u32 client_index;
3140   u32 context;
3141 };
3142
3143 /** \brief LISP map server details
3144     @param is_ipv6 - if non-zero the address is ipv6, else ipv4
3145     @param ip_address - array of address bytes
3146  */
3147 define lisp_map_server_details
3148 {
3149   u32 context;
3150   u8 is_ipv6;
3151   u8 ip_address[16];
3152 };
3153
3154 /** \brief Request for map server summary status
3155     @param client_index - opaque cookie to identify the sender
3156     @param context - sender context, to match reply w/ request
3157  */
3158 define lisp_map_server_dump
3159 {
3160   u32 client_index;
3161   u32 context;
3162 };
3163
3164 /** \brief Request for lisp-gpe protocol status
3165     @param client_index - opaque cookie to identify the sender
3166     @param context - sender context, to match reply w/ request
3167 */
3168 define show_lisp_status
3169 {
3170   u32 client_index;
3171   u32 context;
3172 };
3173
3174 /** \brief Status of lisp, enable or disable
3175     @param context - sender context, to match reply w/ request
3176     @param feature_status - lisp enable if non-zero, else disable
3177     @param gpe_status - lisp enable if non-zero, else disable
3178 */
3179 define show_lisp_status_reply
3180 {
3181   u32 context;
3182   i32 retval;
3183   u8 feature_status;
3184   u8 gpe_status;
3185 };
3186
3187 /** \brief Get LISP map request itr rlocs status
3188     @param context - sender context, to match reply w/ request
3189     @param locator_set_name - name of the locator_set
3190  */
3191 define lisp_get_map_request_itr_rlocs
3192 {
3193   u32 client_index;
3194   u32 context;
3195 };
3196
3197 /** \brief Request for map request itr rlocs summary status
3198  */
3199 define lisp_get_map_request_itr_rlocs_reply
3200 {
3201   u32 context;
3202   i32 retval;
3203   u8 locator_set_name[64];
3204 };
3205
3206 /** \brief Request for lisp pitr status
3207     @param client_index - opaque cookie to identify the sender
3208     @param context - sender context, to match reply w/ request
3209 */
3210 define show_lisp_pitr
3211 {
3212   u32 client_index;
3213   u32 context;
3214 };
3215
3216 /** \brief Status of lisp pitr, enable or disable
3217     @param context - sender context, to match reply w/ request
3218     @param status - lisp pitr enable if non-zero, else disable
3219     @param locator_set_name -  name of the locator_set
3220 */
3221 define show_lisp_pitr_reply
3222 {
3223   u32 context;
3224   i32 retval;
3225   u8 status;
3226   u8 locator_set_name[64];
3227 };
3228
3229 /* Gross kludge, DGMS */
3230 define interface_name_renumber
3231 {
3232   u32 client_index;
3233   u32 context;
3234   u32 sw_if_index;
3235   u32 new_show_dev_instance;
3236 };
3237
3238 define interface_name_renumber_reply
3239 {
3240   u32 context;
3241   i32 retval;
3242 };
3243
3244 /** \brief Register for ip4 arp resolution events
3245     @param client_index - opaque cookie to identify the sender
3246     @param context - sender context, to match reply w/ request
3247     @param enable_disable - 1 => register for events, 0 => cancel registration
3248     @param pid - sender's pid
3249     @param address - the exact ip4 address of interest
3250 */
3251 define want_ip4_arp_events
3252 {
3253   u32 client_index;
3254   u32 context;
3255   u8 enable_disable;
3256   u32 pid;
3257   u32 address;
3258 };
3259
3260 /** \brief Reply for interface events registration
3261     @param context - returned sender context, to match reply w/ request
3262     @param retval - return code
3263 */
3264 define want_ip4_arp_events_reply
3265 {
3266   u32 context;
3267   i32 retval;
3268 };
3269
3270 /** \brief Tell client about an ip4 arp resolution event
3271     @param client_index - opaque cookie to identify the sender
3272     @param context - sender context, to match reply w/ request
3273     @param address - the exact ip4 address of interest
3274     @param pid - client pid registered to receive notification
3275     @param sw_if_index - interface which received ARP packet
3276     @param new_mac - the new mac address 
3277     @param mac_ip - 0: resolution event, 1: mac/ip binding in bd
3278 */
3279 define ip4_arp_event
3280 {
3281   u32 client_index;
3282   u32 context;
3283   u32 address;
3284   u32 pid;
3285   u32 sw_if_index;
3286   u8 new_mac[6];
3287   u8 mac_ip;
3288 };
3289
3290 /** \brief Register for ip6 nd resolution events
3291     @param client_index - opaque cookie to identify the sender
3292     @param context - sender context, to match reply w/ request
3293     @param enable_disable - 1 => register for events, 0 => cancel registration
3294     @param pid - sender's pid
3295     @param address - the exact ip6 address of interest
3296 */
3297 define want_ip6_nd_events
3298 {
3299   u32 client_index;
3300   u32 context;
3301   u8 enable_disable;
3302   u32 pid;
3303   u8 address[16];
3304 };
3305
3306 /** \brief Reply for ip6 nd resolution events registration
3307     @param context - returned sender context, to match reply w/ request
3308     @param retval - return code
3309 */
3310 define want_ip6_nd_events_reply
3311 {
3312   u32 context;
3313   i32 retval;
3314 };
3315
3316 /** \brief Tell client about an ip6 nd resolution or mac/ip event
3317     @param client_index - opaque cookie to identify the sender
3318     @param context - sender context, to match reply w/ request
3319     @param pid - client pid registered to receive notification
3320     @param sw_if_index - interface which received ARP packet
3321     @param address - the exact ip6 address of interest
3322     @param new_mac - the new mac address 
3323     @param mac_ip - 0: resolution event, 1: mac/ip binding in bd
3324 */
3325 define ip6_nd_event
3326 {
3327   u32 client_index;
3328   u32 context;
3329   u32 pid;
3330   u32 sw_if_index;
3331   u8 address[16];
3332   u8 new_mac[6];
3333   u8 mac_ip;
3334 };
3335     
3336 /** \brief L2 bridge domain add or delete request
3337     @param client_index - opaque cookie to identify the sender
3338     @param context - sender context, to match reply w/ request
3339     @param bd_id - the bridge domain to create
3340     @param flood - enable/disable bcast/mcast flooding in the bd
3341     @param uu_flood - enable/disable uknown unicast flood in the bd
3342     @param forward - enable/disable forwarding on all interfaces in the bd
3343     @param learn - enable/disable learning on all interfaces in the bd
3344     @param arp_term - enable/disable arp termination in the bd
3345     @param is_add - add or delete flag
3346 */
3347 define bridge_domain_add_del
3348 {
3349   u32 client_index;
3350   u32 context;
3351   u32 bd_id;
3352   u8 flood;
3353   u8 uu_flood;
3354   u8 forward;
3355   u8 learn;
3356   u8 arp_term;
3357   u8 is_add;
3358 };
3359
3360 /** \brief L2 bridge domain add or delete response
3361     @param context - sender context, to match reply w/ request
3362     @param retval - return code for the set bridge flags request
3363 */
3364 define bridge_domain_add_del_reply
3365 {
3366   u32 context;
3367   i32 retval;
3368 };
3369
3370 /** \brief L2 bridge domain request operational state details
3371     @param client_index - opaque cookie to identify the sender
3372     @param context - sender context, to match reply w/ request
3373     @param bd_id - the bridge domain id desired or ~0 to request all bds
3374 */
3375 define bridge_domain_dump
3376 {
3377   u32 client_index;
3378   u32 context;
3379   u32 bd_id;
3380 };
3381
3382 /** \brief L2 bridge domain operational state response
3383     @param bd_id - the bridge domain id
3384     @param flood - bcast/mcast flooding state on all interfaces in the bd
3385     @param uu_flood - uknown unicast flooding state on all interfaces in the bd
3386     @param forward - forwarding state on all interfaces in the bd
3387     @param learn - learning state on all interfaces in the bd
3388     @param arp_term - arp termination state on all interfaces in the bd
3389     @param n_sw_ifs - number of sw_if_index's in the domain
3390 */
3391 define bridge_domain_details
3392 {
3393   u32 context;
3394   u32 bd_id;
3395   u8 flood;
3396   u8 uu_flood;
3397   u8 forward;
3398   u8 learn;
3399   u8 arp_term;
3400   u32 bvi_sw_if_index;
3401   u32 n_sw_ifs;
3402 };
3403
3404 /** \brief L2 bridge domain sw interface operational state response
3405     @param bd_id - the bridge domain id
3406     @param sw_if_index - sw_if_index in the domain
3407     @param shg - split horizon group for the interface
3408 */
3409 define bridge_domain_sw_if_details
3410 {
3411   u32 context;
3412   u32 bd_id;
3413   u32 sw_if_index;
3414   u8 shg;
3415 };
3416
3417 /** \brief DHCP Client config add / del request
3418     @param client_index - opaque cookie to identify the sender
3419     @param context - sender context, to match reply w/ request
3420     @param sw_if_index - index of the interface for DHCP client
3421     @param hostname - hostname
3422     @param is_add - add the config if non-zero, else delete
3423     @param want_dhcp_event - DHCP event sent to the sender
3424            via dhcp_compl_event API message if non-zero
3425     @param pid - sender's pid
3426 */
3427 define dhcp_client_config
3428 {
3429   u32 client_index;
3430   u32 context;
3431   u32 sw_if_index;
3432   u8 hostname[64];
3433   u8 is_add;
3434   u8 want_dhcp_event;
3435   u32 pid;
3436 };
3437
3438 /** \brief DHCP Client config response
3439     @param context - sender context, to match reply w/ request
3440     @param retval - return code for the request
3441 */
3442 define dhcp_client_config_reply
3443 {
3444   u32 context;
3445   i32 retval;
3446 };
3447
3448 /** \brief Set/unset input ACL interface
3449     @param client_index - opaque cookie to identify the sender
3450     @param context - sender context, to match reply w/ request
3451     @param sw_if_index - interface to set/unset input ACL
3452     @param ip4_table_index - ip4 classify table index (~0 for skip)
3453     @param ip6_table_index - ip6 classify table index (~0 for skip)
3454     @param l2_table_index  -  l2 classify table index (~0 for skip)
3455     @param is_add - Set input ACL if non-zero, else unset
3456     Note: User is recommeneded to use just one valid table_index per call.
3457           (ip4_table_index, ip6_table_index, or l2_table_index)
3458 */
3459 define input_acl_set_interface
3460 {
3461   u32 client_index;
3462   u32 context;
3463   u32 sw_if_index;
3464   u32 ip4_table_index;
3465   u32 ip6_table_index;
3466   u32 l2_table_index;
3467   u8 is_add;
3468 };
3469
3470 /** \brief Set/unset input ACL interface response
3471     @param context - sender context, to match reply w/ request
3472     @param retval - return code for the request
3473 */
3474 define input_acl_set_interface_reply
3475 {
3476   u32 context;
3477   i32 retval;
3478 };
3479
3480 /** \brief IPsec: Add/delete Security Policy Database
3481     @param client_index - opaque cookie to identify the sender
3482     @param context - sender context, to match reply w/ request
3483     @param is_add - add SPD if non-zero, else delete
3484     @param spd_id - SPD instance id (control plane allocated)
3485 */
3486
3487 define ipsec_spd_add_del
3488 {
3489   u32 client_index;
3490   u32 context;
3491   u8 is_add;
3492   u32 spd_id;
3493 };
3494
3495 /** \brief Reply for IPsec: Add/delete Security Policy Database entry
3496     @param context - returned sender context, to match reply w/ request
3497     @param retval - return code
3498 */
3499
3500 define ipsec_spd_add_del_reply
3501 {
3502   u32 context;
3503   i32 retval;
3504 };
3505
3506 /** \brief IPsec: Add/delete SPD from interface
3507
3508     @param client_index - opaque cookie to identify the sender
3509     @param context - sender context, to match reply w/ request
3510     @param is_add - add security mode if non-zero, else delete
3511     @param sw_if_index - index of the interface
3512     @param spd_id - SPD instance id to use for lookups
3513 */
3514
3515
3516 define ipsec_interface_add_del_spd
3517 {
3518   u32 client_index;
3519   u32 context;
3520
3521   u8 is_add;
3522   u32 sw_if_index;
3523   u32 spd_id;
3524 };
3525
3526 /** \brief Reply for IPsec: Add/delete SPD from interface
3527     @param context - returned sender context, to match reply w/ request
3528     @param retval - return code
3529 */
3530
3531 define ipsec_interface_add_del_spd_reply
3532 {
3533   u32 context;
3534   i32 retval;
3535 };
3536
3537 /** \brief IPsec: Add/delete Security Policy Database entry
3538
3539     See RFC 4301, 4.4.1.1 on how to match packet to selectors
3540
3541     @param client_index - opaque cookie to identify the sender
3542     @param context - sender context, to match reply w/ request
3543     @param is_add - add SPD if non-zero, else delete
3544     @param spd_id - SPD instance id (control plane allocated)
3545     @param priority - priority of SPD entry (non-unique value).  Used to order SPD matching - higher priorities match before lower
3546     @param is_outbound - entry applies to outbound traffic if non-zero, otherwise applies to inbound traffic
3547     @param is_ipv6 - remote/local address are IPv6 if non-zero, else IPv4
3548     @param remote_address_start - start of remote address range to match
3549     @param remote_address_stop - end of remote address range to match
3550     @param local_address_start - start of local address range to match
3551     @param local_address_stop - end of local address range to match
3552     @param protocol - protocol type to match [0 means any]
3553     @param remote_port_start - start of remote port range to match ...
3554     @param remote_port_stop - end of remote port range to match [0 to 65535 means ANY, 65535 to 0 means OPAQUE]
3555     @param local_port_start - start of local port range to match ...
3556     @param local_port_stop - end of remote port range to match [0 to 65535 means ANY, 65535 to 0 means OPAQUE]
3557     @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)
3558     @param sa_id - SAD instance id (control plane allocated)
3559
3560 */
3561
3562 define ipsec_spd_add_del_entry
3563 {
3564   u32 client_index;
3565   u32 context;
3566   u8 is_add;
3567
3568   u32 spd_id;
3569   i32 priority;
3570   u8 is_outbound;
3571
3572   // Selector
3573   u8 is_ipv6;
3574   u8 is_ip_any;
3575   u8 remote_address_start[16];
3576   u8 remote_address_stop[16];
3577   u8 local_address_start[16];
3578   u8 local_address_stop[16];
3579
3580   u8 protocol;
3581
3582   u16 remote_port_start;
3583   u16 remote_port_stop;
3584   u16 local_port_start;
3585   u16 local_port_stop;
3586
3587   // Policy
3588   u8 policy;
3589   u32 sa_id;
3590 };
3591
3592 /** \brief Reply for IPsec: Add/delete Security Policy Database entry
3593     @param context - returned sender context, to match reply w/ request
3594     @param retval - return code
3595 */
3596
3597 define ipsec_spd_add_del_entry_reply
3598 {
3599   u32 context;
3600   i32 retval;
3601 };
3602
3603 /** \brief IPsec: Add/delete Security Association Database entry
3604     @param client_index - opaque cookie to identify the sender
3605     @param context - sender context, to match reply w/ request
3606     @param is_add - add SAD entry if non-zero, else delete
3607
3608     @param sad_id - sad id
3609
3610     @param spi - security parameter index
3611
3612     @param protocol - 0 = AH, 1 = ESP
3613
3614     @param crypto_algorithm - 0 = Null, 1 = AES-CBC-128, 2 = AES-CBC-192, 3 = AES-CBC-256, 4 = 3DES-CBC
3615     @param crypto_key_length - length of crypto_key in bytes
3616     @param crypto_key - crypto keying material
3617
3618     @param integrity_algorithm - 0 = None, 1 = MD5-96, 2 = SHA1-96, 3 = SHA-256, 4 = SHA-384, 5=SHA-512
3619     @param integrity_key_length - length of integrity_key in bytes
3620     @param integrity_key - integrity keying material
3621
3622     @param use_extended_sequence_number - use ESN when non-zero
3623
3624     @param is_tunnel - IPsec tunnel mode if non-zero, else transport mode
3625     @param is_tunnel_ipv6 - IPsec tunnel mode is IPv6 if non-zero, else IPv4 tunnel only valid if is_tunnel is non-zero
3626     @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
3627     @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
3628
3629     To be added:
3630      Anti-replay
3631      IPsec tunnel address copy mode (to support GDOI)
3632  */
3633
3634 define ipsec_sad_add_del_entry
3635 {
3636   u32 client_index;
3637   u32 context;
3638   u8 is_add;
3639
3640   u32 sad_id;
3641
3642   u32 spi;
3643
3644   u8 protocol;
3645
3646   u8 crypto_algorithm;
3647   u8 crypto_key_length;
3648   u8 crypto_key[128];
3649
3650   u8 integrity_algorithm;
3651   u8 integrity_key_length;
3652   u8 integrity_key[128];
3653
3654   u8 use_extended_sequence_number;
3655
3656   u8 is_tunnel;
3657   u8 is_tunnel_ipv6;
3658   u8 tunnel_src_address[16];
3659   u8 tunnel_dst_address[16];
3660 };
3661
3662 /** \brief Reply for IPsec: Add/delete Security Association Database entry
3663     @param context - returned sender context, to match reply w/ request
3664     @param retval - return code
3665 */
3666
3667 define ipsec_sad_add_del_entry_reply
3668 {
3669   u32 context;
3670   i32 retval;
3671 };
3672
3673 /** \brief IPsec: Update Security Association keys
3674     @param client_index - opaque cookie to identify the sender
3675     @param context - sender context, to match reply w/ request
3676
3677     @param sa_id - sa id
3678
3679     @param crypto_key_length - length of crypto_key in bytes
3680     @param crypto_key - crypto keying material
3681
3682     @param integrity_key_length - length of integrity_key in bytes
3683     @param integrity_key - integrity keying material
3684 */
3685
3686 define ipsec_sa_set_key
3687 {
3688   u32 client_index;
3689   u32 context;
3690
3691   u32 sa_id;
3692
3693   u8 crypto_key_length;
3694   u8 crypto_key[128];
3695
3696   u8 integrity_key_length;
3697   u8 integrity_key[128];
3698 };
3699
3700 /** \brief Reply for IPsec: Update Security Association keys
3701     @param context - returned sender context, to match reply w/ request
3702     @param retval - return code
3703 */
3704
3705 define ipsec_sa_set_key_reply
3706 {
3707   u32 context;
3708   i32 retval;
3709 };
3710
3711 /** \brief IKEv2: Add/delete profile
3712     @param client_index - opaque cookie to identify the sender
3713     @param context - sender context, to match reply w/ request
3714
3715     @param name - IKEv2 profile name
3716     @param is_add - Add IKEv2 profile if non-zero, else delete
3717 */
3718 define ikev2_profile_add_del
3719 {
3720   u32 client_index;
3721   u32 context;
3722
3723   u8 name[64];
3724   u8 is_add;
3725 };
3726
3727 /** \brief Reply for IKEv2: Add/delete profile
3728     @param context - returned sender context, to match reply w/ request
3729     @param retval - return code
3730 */
3731 define ikev2_profile_add_del_reply
3732 {
3733   u32 context;
3734   i32 retval;
3735 };
3736
3737 /** \brief IKEv2: Set IKEv2 profile authentication method
3738     @param client_index - opaque cookie to identify the sender
3739     @param context - sender context, to match reply w/ request
3740
3741     @param name - IKEv2 profile name
3742     @param auth_method - IKEv2 authentication method (shared-key-mic/rsa-sig)
3743     @param is_hex - Authentication data in hex format if non-zero, else string
3744     @param data_len - Authentication data length
3745     @param data - Authentication data (for rsa-sig cert file path)
3746 */
3747 define ikev2_profile_set_auth
3748 {
3749   u32 client_index;
3750   u32 context;
3751
3752   u8 name[64];
3753   u8 auth_method;
3754   u8 is_hex;
3755   u32 data_len;
3756   u8 data[0];
3757 };
3758
3759 /** \brief Reply for IKEv2: Set IKEv2 profile authentication method
3760     @param context - returned sender context, to match reply w/ request
3761     @param retval - return code
3762 */
3763 define ikev2_profile_set_auth_reply
3764 {
3765   u32 context;
3766   i32 retval;
3767 };
3768
3769 /** \brief IKEv2: Set IKEv2 profile local/remote identification
3770     @param client_index - opaque cookie to identify the sender
3771     @param context - sender context, to match reply w/ request
3772
3773     @param name - IKEv2 profile name
3774     @param is_local - Identification is local if non-zero, else remote
3775     @param id_type - Identification type
3776     @param data_len - Identification data length
3777     @param data - Identification data
3778 */
3779 define ikev2_profile_set_id
3780 {
3781   u32 client_index;
3782   u32 context;
3783
3784   u8 name[64];
3785   u8 is_local;
3786   u8 id_type;
3787   u32 data_len;
3788   u8 data[0];
3789 };
3790
3791 /** \brief Reply for IKEv2:
3792     @param context - returned sender context, to match reply w/ request
3793     @param retval - return code
3794 */
3795 define ikev2_profile_set_id_reply
3796 {
3797   u32 context;
3798   i32 retval;
3799 };
3800
3801 /** \brief IKEv2: Set IKEv2 profile traffic selector parameters
3802     @param client_index - opaque cookie to identify the sender
3803     @param context - sender context, to match reply w/ request
3804
3805     @param name - IKEv2 profile name
3806     @param is_local - Traffic selector is local if non-zero, else remote
3807     @param proto - Traffic selector IP protocol (if zero not relevant)
3808     @param start_port - The smallest port number allowed by traffic selector
3809     @param end_port - The largest port number allowed by traffic selector
3810     @param start_addr - The smallest address included in traffic selector
3811     @param end_addr - The largest address included in traffic selector
3812 */
3813 define ikev2_profile_set_ts
3814 {
3815   u32 client_index;
3816   u32 context;
3817
3818   u8 name[64];
3819   u8 is_local;
3820   u8 proto;
3821   u16 start_port;
3822   u16 end_port;
3823   u32 start_addr;
3824   u32 end_addr;
3825 };
3826
3827 /** \brief Reply for IKEv2: Set IKEv2 profile traffic selector parameters
3828     @param context - returned sender context, to match reply w/ request
3829     @param retval - return code
3830 */
3831 define ikev2_profile_set_ts_reply
3832 {
3833   u32 context;
3834   i32 retval;
3835 };
3836
3837 /** \brief IKEv2: Set IKEv2 local RSA private key
3838     @param client_index - opaque cookie to identify the sender
3839     @param context - sender context, to match reply w/ request
3840
3841     @param key_file - Key file absolute path
3842 */
3843 define ikev2_set_local_key
3844 {
3845   u32 client_index;
3846   u32 context;
3847
3848   u8 key_file[256];
3849 };
3850
3851 /** \brief Reply for IKEv2: Set IKEv2 local key
3852     @param context - returned sender context, to match reply w/ request
3853     @param retval - return code
3854 */
3855 define ikev2_set_local_key_reply
3856 {
3857   u32 context;
3858   i32 retval;
3859 };
3860
3861 /** \brief Tell client about a DHCP completion event
3862     @param client_index - opaque cookie to identify the sender
3863     @param pid - client pid registered to receive notification
3864     @param is_ipv6 - if non-zero the address is ipv6, else ipv4
3865     @param host_address - Host IP address
3866     @param router_address - Router IP address
3867     @param host_mac - Host MAC address
3868 */
3869 define dhcp_compl_event
3870 {
3871   u32 client_index;
3872   u32 pid;
3873   u8 hostname[64];
3874   u8 is_ipv6;
3875   u8 host_address[16];
3876   u8 router_address[16];
3877   u8 host_mac[6];
3878 };
3879
3880 /** \brief cop: enable/disable junk filtration features on an interface
3881     @param client_index - opaque cookie to identify the sender
3882     @param context - sender context, to match reply w/ request
3883     @param sw_if_inded - desired interface
3884     @param enable_disable - 1 => enable, 0 => disable
3885 */
3886
3887 define cop_interface_enable_disable
3888 {
3889   u32 client_index;
3890   u32 context;
3891   u32 sw_if_index;
3892   u8 enable_disable;
3893 };
3894
3895 /** \brief cop: interface enable/disable junk filtration reply
3896     @param context - returned sender context, to match reply w/ request
3897     @param retval - return code
3898 */
3899
3900 define cop_interface_enable_disable_reply
3901 {
3902   u32 context;
3903   i32 retval;
3904 };
3905
3906 /** \brief cop: enable/disable whitelist filtration features on an interface
3907     Note: the supplied fib_id must match in order to remove the feature!
3908     
3909     @param client_index - opaque cookie to identify the sender
3910     @param context - sender context, to match reply w/ request
3911     @param sw_if_index - interface handle, physical interfaces only
3912     @param fib_id - fib identifier for the whitelist / blacklist fib
3913     @param ip4 - 1 => enable ip4 filtration, 0=> disable ip4 filtration
3914     @param ip6 - 1 => enable ip6 filtration, 0=> disable ip6 filtration
3915     @param default_cop -  1 => enable non-ip4, non-ip6 filtration 0=> disable it
3916 */
3917
3918 define cop_whitelist_enable_disable
3919 {
3920   u32 client_index;
3921   u32 context;
3922   u32 sw_if_index;
3923   u32 fib_id;
3924   u8 ip4;
3925   u8 ip6;
3926   u8 default_cop;
3927 };
3928
3929 /** \brief cop: interface enable/disable junk filtration reply
3930     @param context - returned sender context, to match reply w/ request
3931     @param retval - return code
3932 */
3933
3934 define cop_whitelist_enable_disable_reply
3935 {
3936   u32 context;
3937   i32 retval;
3938 };
3939
3940 /** \brief get_node_graph - get a copy of the vpp node graph
3941     including the current set of graph arcs.
3942
3943     @param client_index - opaque cookie to identify the sender
3944     @param context - sender context, to match reply w/ request
3945 */
3946
3947 define get_node_graph
3948 {
3949   u32 client_index;
3950   u32 context;
3951 };
3952
3953 /** \brief get_node_graph_reply
3954     @param context - returned sender context, to match reply w/ request
3955     @param retval - return code
3956     @param reply_in_shmem - result from vlib_node_serialize, in shared
3957     memory. Process with vlib_node_unserialize, remember to switch
3958     heaps and free the result.
3959 */
3960
3961 define get_node_graph_reply
3962 {
3963   u32 context;
3964   i32 retval;
3965   u64 reply_in_shmem;
3966 };
3967
3968 /** \brief IOAM enable : Enable in-band OAM
3969     @param id - profile id
3970     @param seqno - To enable Seqno Processing
3971     @param analyse - Enabling analysis of iOAM at decap node 
3972     @param pow_enable - Proof of Work enabled or not flag
3973     @param trace_enable - iOAM Trace enabled or not flag
3974 */
3975 define ioam_enable
3976 {
3977   u32 client_index;
3978   u32 context;
3979   u16 id;
3980   u8 seqno;
3981   u8 analyse;
3982   u8 pot_enable;
3983   u8 trace_enable;
3984   u32 node_id;
3985 };
3986
3987 /** \brief iOAM Trace profile add / del response
3988     @param context - sender context, to match reply w/ request
3989     @param retval - return value for request
3990 */
3991 define ioam_enable_reply
3992 {
3993   u32 context;
3994   i32 retval;
3995 };
3996
3997 /** \brief iOAM disable
3998     @param client_index - opaque cookie to identify the sender
3999     @param context - sender context, to match reply w/ request
4000     @param index - MAP Domain index
4001 */
4002 define ioam_disable
4003 {
4004   u32 client_index;
4005   u32 context;
4006   u16 id;
4007 };
4008
4009 /** \brief iOAM disable response
4010     @param context - sender context, to match reply w/ request
4011     @param retval - return value for request
4012 */
4013 define ioam_disable_reply
4014 {
4015   u32 context;
4016   i32 retval;
4017 };
4018
4019 /** \brief Create host-interface
4020     @param client_index - opaque cookie to identify the sender
4021     @param context - sender context, to match reply w/ request
4022     @param host_if_name - interface name
4023     @param hw_addr - interface MAC
4024     @param use_random_hw_addr - use random generated MAC
4025 */
4026 define af_packet_create
4027 {
4028   u32 client_index;
4029   u32 context;
4030
4031   u8 host_if_name[64];
4032   u8 hw_addr[6];
4033   u8 use_random_hw_addr;
4034 };
4035
4036 /** \brief Create host-interface response
4037     @param context - sender context, to match reply w/ request
4038     @param retval - return value for request
4039 */
4040 define af_packet_create_reply
4041 {
4042   u32 context;
4043   i32 retval;
4044   u32 sw_if_index;
4045 };
4046
4047 /** \brief Delete host-interface
4048     @param client_index - opaque cookie to identify the sender
4049     @param context - sender context, to match reply w/ request
4050     @param host_if_name - interface name
4051 */
4052 define af_packet_delete
4053 {
4054   u32 client_index;
4055   u32 context;
4056
4057   u8 host_if_name[64];
4058 };
4059
4060 /** \brief Delete host-interface response
4061     @param context - sender context, to match reply w/ request
4062     @param retval - return value for request
4063 */
4064 define af_packet_delete_reply
4065 {
4066   u32 context;
4067   i32 retval;
4068 };
4069
4070 /** \brief Add/del policer
4071     @param client_index - opaque cookie to identify the sender
4072     @param context - sender context, to match reply w/ request
4073     @param is_add - add policer if non-zero, else delete
4074     @param name - policer name
4075     @param cir - CIR
4076     @param eir - EIR
4077     @param cb - Committed Burst
4078     @param eb - Excess or Peak Burst
4079     @param rate_type - rate type
4080     @param round_type - rounding type
4081     @param type - policer algorithm
4082     @param color_aware - 0=color-blind, 1=color-aware
4083     @param conform_action_type - conform action type
4084     @param conform_dscp - DSCP for conform mar-and-transmit action
4085     @param exceed_action_type - exceed action type
4086     @param exceed_dscp - DSCP for exceed mar-and-transmit action
4087     @param violate_action_type - violate action type
4088     @param violate_dscp - DSCP for violate mar-and-transmit action
4089 */
4090 define policer_add_del
4091 {
4092   u32 client_index;
4093   u32 context;
4094
4095   u8 is_add;
4096   u8 name[64];
4097   u32 cir;
4098   u32 eir;
4099   u64 cb;
4100   u64 eb;
4101   u8 rate_type;
4102   u8 round_type;
4103   u8 type;
4104   u8 color_aware;
4105   u8 conform_action_type;
4106   u8 conform_dscp;
4107   u8 exceed_action_type;
4108   u8 exceed_dscp;
4109   u8 violate_action_type;
4110   u8 violate_dscp;
4111 };
4112
4113 /** \brief Add/del policer response
4114     @param context - sender context, to match reply w/ request
4115     @param retval - return value for request
4116     @param policer_index - for add, returned index of the new policer
4117 */
4118 define policer_add_del_reply
4119 {
4120   u32 context;
4121   i32 retval;
4122   u32 policer_index;
4123 };
4124
4125 /** \brief Get list of policers
4126     @param client_index - opaque cookie to identify the sender
4127     @param context - sender context, to match reply w/ request
4128     @param match_name_valid - if 0 request all policers otherwise use match_name
4129     @param match_name - policer name
4130 */
4131 define policer_dump
4132 {
4133   u32 client_index;
4134   u32 context;
4135
4136   u8 match_name_valid;
4137   u8 match_name[64];
4138 };
4139
4140 /** \brief Policer operational state response.
4141     @param context - sender context, to match reply w/ request
4142     @param name - policer name
4143     @param cir - CIR
4144     @param eir - EIR
4145     @param cb - Committed Burst
4146     @param eb - Excess or Peak Burst
4147     @param rate_type - rate type
4148     @param round_type - rounding type
4149     @param type - policer algorithm
4150     @param conform_action_type - conform action type
4151     @param conform_dscp - DSCP for conform mar-and-transmit action
4152     @param exceed_action_type - exceed action type
4153     @param exceed_dscp - DSCP for exceed mar-and-transmit action
4154     @param violate_action_type - violate action type
4155     @param violate_dscp - DSCP for violate mar-and-transmit action
4156     @param single_rate - 1 = single rate policer, 0 = two rate policer
4157     @param color_aware - for hierarchical policing
4158     @param scale - power-of-2 shift amount for lower rates
4159     @param cir_tokens_per_period - number of tokens for each period
4160     @param pir_tokens_per_period - number of tokens for each period for 2-rate policer
4161     @param current_limit - current limit
4162     @param current_bucket - current bucket
4163     @param extended_limit - extended limit
4164     @param extended_bucket - extended bucket
4165     @param last_update_time - last update time
4166 */
4167 define policer_details
4168 {
4169   u32 context;
4170
4171   u8 name[64];
4172   u32 cir;
4173   u32 eir;
4174   u64 cb;
4175   u64 eb;
4176   u8 rate_type;
4177   u8 round_type;
4178   u8 type;
4179   u8 conform_action_type;
4180   u8 conform_dscp;
4181   u8 exceed_action_type;
4182   u8 exceed_dscp;
4183   u8 violate_action_type;
4184   u8 violate_dscp;
4185   u8 single_rate;
4186   u8 color_aware;
4187   u32 scale;
4188   u32 cir_tokens_per_period;
4189   u32 pir_tokens_per_period;
4190   u32 current_limit;
4191   u32 current_bucket;
4192   u32 extended_limit;
4193   u32 extended_bucket;
4194   u64 last_update_time;
4195 };
4196
4197 /** \brief Set/unset policer classify interface
4198     @param client_index - opaque cookie to identify the sender
4199     @param context - sender context, to match reply w/ request
4200     @param sw_if_index - interface to set/unset policer classify
4201     @param ip4_table_index - ip4 classify table index (~0 for skip)
4202     @param ip6_table_index - ip6 classify table index (~0 for skip)
4203     @param l2_table_index  -  l2 classify table index (~0 for skip)
4204     @param is_add - Set if non-zero, else unset
4205     Note: User is recommeneded to use just one valid table_index per call.
4206           (ip4_table_index, ip6_table_index, or l2_table_index)
4207 */
4208 define policer_classify_set_interface
4209 {
4210   u32 client_index;
4211   u32 context;
4212   u32 sw_if_index;
4213   u32 ip4_table_index;
4214   u32 ip6_table_index;
4215   u32 l2_table_index;
4216   u8 is_add;
4217 };
4218
4219 /** \brief Set/unset policer classify interface response
4220     @param context - sender context, to match reply w/ request
4221     @param retval - return value for request
4222 */
4223 define policer_classify_set_interface_reply
4224 {
4225   u32 context;
4226   i32 retval;
4227 };
4228
4229 /** \brief Get list of policer classify interfaces and tables
4230     @param client_index - opaque cookie to identify the sender
4231     @param context - sender context, to match reply w/ request
4232     @param type - classify table type
4233 */
4234 define policer_classify_dump
4235 {
4236   u32 client_index;
4237   u32 context;
4238   u8 type;
4239 };
4240
4241 /** \brief Policer iclassify operational state response.
4242     @param context - sender context, to match reply w/ request
4243     @param sw_if_index - software interface index
4244     @param table_index - classify table index
4245 */
4246 define policer_classify_details
4247 {
4248   u32 context;
4249   u32 sw_if_index;
4250   u32 table_index;
4251 };
4252
4253 /** \brief Create netmap
4254     @param client_index - opaque cookie to identify the sender
4255     @param context - sender context, to match reply w/ request
4256     @param netmap_if_name - interface name
4257     @param hw_addr - interface MAC
4258     @param use_random_hw_addr - use random generated MAC
4259     @param is_pipe - is pipe
4260     @param is_master - 0=slave, 1=master
4261 */
4262 define netmap_create
4263 {
4264   u32 client_index;
4265   u32 context;
4266
4267   u8 netmap_if_name[64];
4268   u8 hw_addr[6];
4269   u8 use_random_hw_addr;
4270   u8 is_pipe;
4271   u8 is_master;
4272 };
4273
4274 /** \brief Create netmap response
4275     @param context - sender context, to match reply w/ request
4276     @param retval - return value for request
4277 */
4278 define netmap_create_reply
4279 {
4280   u32 context;
4281   i32 retval;
4282 };
4283
4284 /** \brief Delete netmap
4285     @param client_index - opaque cookie to identify the sender
4286     @param context - sender context, to match reply w/ request
4287     @param netmap_if_name - interface name
4288 */
4289 define netmap_delete
4290 {
4291   u32 client_index;
4292   u32 context;
4293
4294   u8 netmap_if_name[64];
4295 };
4296
4297 /** \brief Delete netmap response
4298     @param context - sender context, to match reply w/ request
4299     @param retval - return value for request
4300 */
4301 define netmap_delete_reply
4302 {
4303   u32 context;
4304   i32 retval;
4305 };
4306
4307 /** \brief Classify get table IDs request
4308     @param client_index - opaque cookie to identify the sender
4309     @param context - sender context, to match reply w/ request
4310 */
4311 define classify_table_ids
4312 {
4313   u32 client_index;
4314   u32 context;
4315 };
4316
4317 /** \brief Reply for classify get table IDs request
4318     @param context - sender context which was passed in the request
4319     @param count - number of ids returned in response
4320     @param ids - array of classify table ids
4321 */
4322 define classify_table_ids_reply
4323 {
4324   u32 context;
4325   i32 retval;
4326   u32 count;
4327   u32 ids[count];
4328 };
4329
4330 /** \brief Classify table ids by interface index request
4331     @param client_index - opaque cookie to identify the sender
4332     @param context - sender context, to match reply w/ request
4333     @param sw_if_index - index of the interface
4334 */
4335 define classify_table_by_interface
4336 {
4337   u32 client_index;
4338   u32 context;
4339   u32 sw_if_index;
4340 };
4341
4342 /** \brief Reply for classify table id by interface index request
4343     @param context - sender context which was passed in the request
4344     @param count - number of ids returned in response
4345     @param sw_if_index - index of the interface
4346     @param l2_table_id - l2 classify table index
4347     @param ip4_table_id - ip4 classify table index
4348     @param ip6_table_id - ip6 classify table index
4349 */
4350 define classify_table_by_interface_reply
4351 {
4352   u32 context;
4353   i32 retval;
4354   u32 sw_if_index;
4355   u32 l2_table_id;
4356   u32 ip4_table_id;
4357   u32 ip6_table_id;
4358 };
4359
4360 /** \brief Classify table info
4361     @param client_index - opaque cookie to identify the sender
4362     @param context - sender context, to match reply w/ request
4363     @param table_id - classify table index
4364 */
4365 define classify_table_info
4366 {
4367   u32 client_index;
4368   u32 context;
4369   u32 table_id;
4370 };
4371
4372 /** \brief Reply for classify table info request
4373     @param context - sender context which was passed in the request
4374     @param count - number of ids returned in response
4375     @param table_id - classify table index
4376     @param nbuckets - number of buckets when adding a table
4377     @param match_n_vectors - number of match vectors
4378     @param skip_n_vectors - number of skip_n_vectors
4379     @param active_sessions - number of sessions (active entries)
4380     @param next_table_index - index of next table
4381     @param miss_next_index - index of miss table
4382     @param mask[] - match mask
4383 */
4384 define classify_table_info_reply
4385 {
4386   u32 context;
4387   i32 retval;
4388   u32 table_id;
4389   u32 nbuckets;
4390   u32 match_n_vectors;
4391   u32 skip_n_vectors;
4392   u32 active_sessions;
4393   u32 next_table_index;
4394   u32 miss_next_index;
4395   u32 mask_length;
4396   u8 mask[mask_length];
4397 };
4398
4399 /** \brief Classify sessions dump request
4400     @param client_index - opaque cookie to identify the sender
4401     @param context - sender context, to match reply w/ request
4402     @param table_id - classify table index
4403 */
4404 define classify_session_dump
4405 {
4406   u32 client_index;
4407   u32 context;
4408   u32 table_id;
4409 };
4410
4411 /** \brief Reply for classify table session dump request
4412     @param context - sender context which was passed in the request
4413     @param count - number of ids returned in response
4414     @param table_id - classify table index
4415     @param hit_next_index - hit_next_index of session
4416     @param opaque_index - for add, opaque_index of session
4417     @param advance - advance value of session
4418     @param match[] - match value for session
4419 */
4420 define classify_session_details
4421 {
4422   u32 context;
4423   i32 retval;
4424   u32 table_id;
4425   u32 hit_next_index;
4426   i32 advance;
4427   u32 opaque_index;
4428   u32 match_length;
4429   u8 match[match_length];
4430 };
4431
4432 /** \brief Configure IPFIX exporter process request
4433     @param client_index - opaque cookie to identify the sender
4434     @param context - sender context, to match reply w/ request
4435     @param collector_address - address of IPFIX collector
4436     @param collector_port - port of IPFIX collector
4437     @param src_address - address of IPFIX exporter
4438     @param vrf_id - VRF / fib table ID
4439     @param path_mtu - Path MTU between exporter and collector
4440     @param template_interval - number of seconds after which to resend template
4441     @param udp_checksum - UDP checksum calculation enable flag
4442 */
4443 define set_ipfix_exporter
4444 {
4445   u32 client_index;
4446   u32 context;
4447   u8 collector_address[16];
4448   u16 collector_port;
4449   u8 src_address[16];
4450   u32 vrf_id;
4451   u32 path_mtu;
4452   u32 template_interval;
4453   u8 udp_checksum;
4454 };
4455
4456 /** \brief Reply to IPFIX exporter configure request
4457     @param context - sender context which was passed in the request
4458 */
4459 define set_ipfix_exporter_reply
4460 {
4461   u32 context;
4462   i32 retval;
4463 };
4464
4465 /** \brief IPFIX exporter dump request
4466     @param client_index - opaque cookie to identify the sender
4467     @param context - sender context, to match reply w/ request
4468 */
4469 define ipfix_exporter_dump
4470 {
4471   u32 client_index;
4472   u32 context;
4473 };
4474
4475 /** \brief Reply to IPFIX exporter dump request
4476     @param context - sender context which was passed in the request
4477     @param collector_address - address of IPFIX collector
4478     @param collector_port - port of IPFIX collector
4479     @param src_address - address of IPFIX exporter
4480     @param fib_index - fib table index
4481     @param path_mtu - Path MTU between exporter and collector
4482     @param template_interval - number of seconds after which to resend template
4483     @param udp_checksum - UDP checksum calculation enable flag
4484 */
4485 define ipfix_exporter_details
4486 {
4487   u32 context;
4488   u8 collector_address[16];
4489   u16 collector_port;
4490   u8 src_address[16];
4491   u32 vrf_id;
4492   u32 path_mtu;
4493   u32 template_interval;
4494   u8 udp_checksum;
4495 };
4496
4497 /** \brief IPFIX classify stream configure request
4498     @param client_index - opaque cookie to identify the sender
4499     @param context - sender context, to match reply w/ request
4500     @param domain_id - domain ID reported in IPFIX messages for classify stream
4501     @param src_port - source port of UDP session for classify stream
4502 */
4503 define set_ipfix_classify_stream {
4504     u32 client_index;
4505     u32 context;
4506     u32 domain_id;
4507     u16 src_port;
4508 };
4509
4510 /** \brief IPFIX classify stream configure response
4511     @param context - sender context, to match reply w/ request
4512     @param retval - return value for request
4513 */
4514 define set_ipfix_classify_stream_reply {
4515     u32 context;
4516     i32 retval;
4517 };
4518
4519 /** \brief IPFIX classify stream dump request
4520     @param client_index - opaque cookie to identify the sender
4521     @param context - sender context, to match reply w/ request
4522 */
4523 define ipfix_classify_stream_dump {
4524     u32 client_index;
4525     u32 context;
4526 };
4527
4528 /** \brief Reply to IPFIX classify stream dump request
4529     @param context - sender context, to match reply w/ request
4530     @param domain_id - domain ID reported in IPFIX messages for classify stream
4531     @param src_port - source port of UDP session for classify stream
4532 */
4533 define ipfix_classify_stream_details {
4534     u32 context;
4535     u32 domain_id;
4536     u16 src_port;
4537 };
4538
4539 /** \brief IPFIX add or delete classifier table request
4540     @param client_index - opaque cookie to identify the sender
4541     @param context - sender context, to match reply w/ request
4542     @param table_id - classifier table ID
4543     @param ip_version - version of IP used in the classifier table
4544     @param transport_protocol - transport protocol used in the classifier table or 255 for unspecified
4545 */
4546 define ipfix_classify_table_add_del {
4547     u32 client_index;
4548     u32 context;
4549     u32 table_id;
4550     u8 ip_version;
4551     u8 transport_protocol;
4552     u8 is_add;
4553 };
4554
4555 /** \brief IPFIX add classifier table response
4556     @param context - sender context which was passed in the request
4557 */
4558 define ipfix_classify_table_add_del_reply {
4559     u32 context;
4560     i32 retval;
4561 };
4562
4563 /** \brief IPFIX classify tables dump request
4564     @param client_index - opaque cookie to identify the sender
4565     @param context - sender context, to match reply w/ request
4566 */
4567 define ipfix_classify_table_dump {
4568     u32 client_index;
4569     u32 context;
4570 };
4571
4572 /** \brief Reply to IPFIX classify tables dump request
4573     @param context - sender context, to match reply w/ request
4574     @param table_id - classifier table ID
4575     @param ip_version - version of IP used in the classifier table
4576     @param transport_protocol - transport protocol used in the classifier table or 255 for unspecified
4577 */
4578 define ipfix_classify_table_details {
4579     u32 context;
4580     u32 table_id;
4581     u8 ip_version;
4582     u8 transport_protocol;
4583 };
4584
4585 /** \brief Set/unset flow classify interface
4586     @param client_index - opaque cookie to identify the sender
4587     @param context - sender context, to match reply w/ request
4588     @param sw_if_index - interface to set/unset flow classify
4589     @param ip4_table_index - ip4 classify table index (~0 for skip)
4590     @param ip6_table_index - ip6 classify table index (~0 for skip)
4591     @param l2_table_index  -  l2 classify table index (~0 for skip)
4592     @param is_add - Set if non-zero, else unset
4593     Note: User is recommeneded to use just one valid table_index per call.
4594           (ip4_table_index, ip6_table_index, or l2_table_index)
4595 */
4596 define flow_classify_set_interface {
4597     u32 client_index;
4598     u32 context;
4599     u32 sw_if_index;
4600     u32 ip4_table_index;
4601     u32 ip6_table_index;
4602     u8  is_add;
4603 };
4604
4605 /** \brief Set/unset flow classify interface response
4606     @param context - sender context, to match reply w/ request
4607     @param retval - return value for request
4608 */
4609 define flow_classify_set_interface_reply {
4610     u32 context;
4611     i32 retval;
4612 };
4613
4614 /** \brief Get list of flow classify interfaces and tables
4615     @param client_index - opaque cookie to identify the sender
4616     @param context - sender context, to match reply w/ request
4617     @param type - classify table type
4618 */
4619 define flow_classify_dump {
4620     u32 client_index;
4621     u32 context;
4622     u8 type;
4623 };
4624
4625 /** \brief Flow classify operational state response.
4626     @param context - sender context, to match reply w/ request
4627     @param sw_if_index - software interface index
4628     @param table_index - classify table index
4629 */
4630 define flow_classify_details {
4631     u32 context;
4632     u32 sw_if_index;
4633     u32 table_index;
4634 };
4635
4636 /** \brief Query relative index via node names
4637     @param client_index - opaque cookie to identify the sender
4638     @param context - sender context, to match reply w/ request
4639     @param node_name - name of node to find relative index from
4640     @param next_name - next node from node_name to find relative index of
4641 */
4642 define get_next_index
4643 {
4644   u32 client_index;
4645   u32 context;
4646   u8 node_name[64];
4647   u8 next_name[64];
4648 };
4649
4650 /** \brief Reply for get next node index
4651     @param context - sender context which was passed in the request
4652     @param retval - return value
4653     @param next_index - index of the next_node
4654 */
4655 define get_next_index_reply
4656 {
4657   u32 context;
4658   i32 retval;
4659   u32 next_index;
4660 };
4661
4662 /** \brief PacketGenerator create interface request
4663     @param client_index - opaque cookie to identify the sender
4664     @param context - sender context, to match reply w/ request
4665     @param interface_id - interface index
4666 */
4667 define pg_create_interface
4668 {
4669   u32 client_index;
4670   u32 context;
4671   u32 interface_id;
4672 };
4673
4674 /** \brief PacketGenerator create interface response
4675     @param context - sender context, to match reply w/ request
4676     @param retval - return value for request
4677 */
4678 define pg_create_interface_reply
4679 {
4680   u32 context;
4681   i32 retval;
4682   u32 sw_if_index;
4683 };
4684
4685 /** \brief PacketGenerator capture packets on given interface request
4686     @param client_index - opaque cookie to identify the sender
4687     @param context - sender context, to match reply w/ request
4688     @param interface_id - pg interface index
4689     @param is_enabled - 1 if enabling streams, 0 if disabling
4690     @param count - number of packets to be captured
4691     @param pcap_file - pacp file name to store captured packets
4692 */
4693 define pg_capture
4694 {
4695   u32 client_index;
4696   u32 context;
4697   u32 interface_id;
4698   u8 is_enabled;
4699   u32 count;
4700   u32 pcap_name_length;
4701   u8 pcap_file_name[pcap_name_length];
4702 };
4703
4704 /** \brief PacketGenerator capture packets response
4705     @param context - sender context, to match reply w/ request
4706     @param retval - return value for request
4707 */
4708 define pg_capture_reply
4709 {
4710   u32 context;
4711   i32 retval;
4712 };
4713
4714 /** \brief Enable / disable packet generator request
4715     @param client_index - opaque cookie to identify the sender
4716     @param context - sender context, to match reply w/ request
4717     @param is_enabled - 1 if enabling streams, 0 if disabling
4718     @param stream - stream name to be enable/disabled, if not specified handle all streams
4719 */
4720 define pg_enable_disable
4721 {
4722   u32 client_index;
4723   u32 context;
4724   u8 is_enabled;
4725   u32 stream_name_length;
4726   u8 stream_name[stream_name_length];
4727 };
4728
4729 /** \brief Reply for enable / disable packet generator
4730     @param context - returned sender context, to match reply w/ request
4731     @param retval - return code
4732 */
4733 define pg_enable_disable_reply
4734 {
4735   u32 context;
4736   i32 retval;
4737 };
4738
4739 /** \brief Configure IP source and L4 port-range check
4740     @param client_index - opaque cookie to identify the sender
4741     @param context - sender context, to match reply w/ request
4742     @param is_ip6 - 1 if source address type is IPv6
4743     @param is_add - 1 if add, 0 if delete
4744     @param mask_length - mask length for address entry
4745     @param address - array of address bytes
4746     @param number_of_ranges - length of low_port and high_port arrays (must match)
4747     @param low_ports[32] - up to 32 low end of port range entries (must have corresponding high_ports entry)
4748     @param high_ports[32] - up to 32 high end of port range entries (must have corresponding low_ports entry)
4749     @param vrf_id - fib table/vrf id to associate the source and port-range check with
4750     @note To specify a single port set low_port and high_port entry the same
4751 */
4752 define ip_source_and_port_range_check_add_del
4753 {
4754   u32 client_index;
4755   u32 context;
4756   u8 is_ipv6;
4757   u8 is_add;
4758   u8 mask_length;
4759   u8 address[16];
4760   u8 number_of_ranges;
4761   u16 low_ports[32];
4762   u16 high_ports[32];
4763   u32 vrf_id;
4764 };
4765
4766 /** \brief Configure IP source and L4 port-range check reply
4767     @param context - returned sender context, to match reply w/ request
4768     @param retval - return code
4769 */
4770 define ip_source_and_port_range_check_add_del_reply
4771 {
4772   u32 context;
4773   i32 retval;
4774 };
4775
4776 /** \brief Set interface source and L4 port-range request
4777     @param client_index - opaque cookie to identify the sender
4778     @param context - sender context, to match reply w/ request
4779     @param interface_id - interface index
4780     @param tcp_vrf_id - VRF associated with source and TCP port-range check
4781     @param udp_vrf_id - VRF associated with source and TCP port-range check
4782 */
4783 define ip_source_and_port_range_check_interface_add_del
4784 {
4785   u32 client_index;
4786   u32 context;
4787   u8 is_add;
4788   u32 sw_if_index;
4789   u32 tcp_in_vrf_id;
4790   u32 tcp_out_vrf_id;
4791   u32 udp_in_vrf_id;
4792   u32 udp_out_vrf_id;
4793 };
4794
4795 /** \brief Set interface source and L4 port-range response
4796     @param context - sender context, to match reply w/ request
4797     @param retval - return value for request
4798 */
4799 define ip_source_and_port_range_check_interface_add_del_reply
4800 {
4801   u32 context;
4802   i32 retval;
4803 };
4804
4805 /** \brief Add / del ipsec gre tunnel request
4806     @param client_index - opaque cookie to identify the sender
4807     @param context - sender context, to match reply w/ request
4808     @param local_sa_id - local SA id
4809     @param remote_sa_id - remote SA id
4810     @param is_add - 1 if adding the tunnel, 0 if deleting
4811     @param src_address - tunnel source address
4812     @param dst_address - tunnel destination address
4813 */
4814 define ipsec_gre_add_del_tunnel {
4815     u32 client_index;
4816     u32 context;
4817     u32 local_sa_id;
4818     u32 remote_sa_id;
4819     u8 is_add;
4820     u8 src_address[4];
4821     u8 dst_address[4];
4822 };
4823
4824 /** \brief Reply for add / del ipsec gre tunnel request
4825     @param context - returned sender context, to match reply w/ request
4826     @param retval - return code
4827     @param sw_if_index - software index of the new ipsec gre tunnel
4828 */
4829 define ipsec_gre_add_del_tunnel_reply {
4830     u32 context;
4831     i32 retval;
4832     u32 sw_if_index;
4833 };
4834
4835 /** \brief Dump ipsec gre tunnel table
4836     @param client_index - opaque cookie to identify the sender
4837     @param context - sender context, to match reply w/ request
4838     @param tunnel_index - gre tunnel identifier or -1 in case of all tunnels
4839 */
4840 define ipsec_gre_tunnel_dump {
4841     u32 client_index;
4842     u32 context;
4843     u32 sw_if_index;
4844 };
4845
4846 /** \brief mpls gre tunnel operational state response
4847     @param context - returned sender context, to match reply w/ request
4848     @param sw_if_index - software index of the ipsec gre tunnel
4849     @param local_sa_id - local SA id
4850     @param remote_sa_id - remote SA id
4851     @param src_address - tunnel source address
4852     @param dst_address - tunnel destination address
4853 */
4854 define ipsec_gre_tunnel_details {
4855     u32 context;
4856     u32 sw_if_index;
4857     u32 local_sa_id;
4858     u32 remote_sa_id;
4859     u8 src_address[4];
4860     u8 dst_address[4];
4861 };
4862
4863 /** \brief Delete sub interface request
4864     @param client_index - opaque cookie to identify the sender
4865     @param context - sender context, to match reply w/ request
4866     @param sw_if_index - sw index of the interface that was created by create_subif
4867 */
4868 define delete_subif {
4869   u32 client_index;
4870   u32 context;
4871   u32 sw_if_index;
4872 };
4873
4874 /** \brief Delete sub interface response
4875     @param context - sender context, to match reply w/ request
4876     @param retval - return code for the request
4877 */
4878 define delete_subif_reply {
4879   u32 context;
4880   i32 retval;
4881 };
4882
4883 /** \brief DPDK interface HQoS pipe profile set request
4884     @param client_index - opaque cookie to identify the sender
4885     @param context - sender context, to match reply w/ request
4886     @param sw_if_index - the interface
4887     @param subport - subport ID
4888     @param pipe - pipe ID within its subport
4889     @param profile - pipe profile ID
4890 */
4891 define sw_interface_set_dpdk_hqos_pipe {
4892     u32 client_index;
4893     u32 context;
4894     u32 sw_if_index;
4895     u32 subport;
4896     u32 pipe;
4897     u32 profile;
4898 };
4899
4900 /** \brief DPDK interface HQoS pipe profile set reply
4901     @param context - sender context, to match reply w/ request
4902     @param retval - request return code
4903 */
4904 define sw_interface_set_dpdk_hqos_pipe_reply {
4905     u32 context;
4906     i32 retval;
4907 };
4908
4909 /** \brief DPDK interface HQoS subport parameters set request
4910     @param client_index - opaque cookie to identify the sender
4911     @param context - sender context, to match reply w/ request
4912     @param sw_if_index - the interface
4913     @param subport - subport ID
4914     @param tb_rate - subport token bucket rate (measured in bytes/second)
4915     @param tb_size - subport token bucket size (measured in credits)
4916     @param tc_rate - subport traffic class 0 .. 3 rates (measured in bytes/second)
4917     @param tc_period - enforcement period for rates (measured in milliseconds)
4918 */
4919 define sw_interface_set_dpdk_hqos_subport {
4920     u32 client_index;
4921     u32 context;
4922     u32 sw_if_index;
4923     u32 subport;
4924     u32 tb_rate;
4925     u32 tb_size;
4926     u32 tc_rate[4];
4927     u32 tc_period;
4928 };
4929
4930 /** \brief DPDK interface HQoS subport parameters set reply
4931     @param context - sender context, to match reply w/ request
4932     @param retval - request return code
4933 */
4934 define sw_interface_set_dpdk_hqos_subport_reply {
4935     u32 context;
4936     i32 retval;
4937 };
4938
4939 /** \brief DPDK interface HQoS tctbl entry set request
4940     @param client_index - opaque cookie to identify the sender
4941     @param context - sender context, to match reply w/ request
4942     @param sw_if_index - the interface
4943     @param entry - entry index ID
4944     @param tc - traffic class (0 .. 3)
4945     @param queue - traffic class queue (0 .. 3)
4946 */
4947 define sw_interface_set_dpdk_hqos_tctbl {
4948     u32 client_index;
4949     u32 context;
4950     u32 sw_if_index;
4951     u32 entry;
4952     u32 tc;
4953     u32 queue;
4954 };
4955
4956 /** \brief DPDK interface HQoS tctbl entry set reply
4957     @param context - sender context, to match reply w/ request
4958     @param retval - request return code
4959 */
4960 define sw_interface_set_dpdk_hqos_tctbl_reply {
4961     u32 context;
4962     i32 retval;
4963 };
4964
4965 /** \brief L2 interface pbb tag rewrite configure request
4966     @param client_index - opaque cookie to identify the sender
4967     @param context - sender context, to match reply w/ request
4968     @param sw_if_index - interface the operation is applied to
4969     @param vtr_op - Choose from l2_vtr_op_t enum values
4970     @param inner_tag - needed for translate_qinq vtr op only
4971     @param outer_tag - needed for translate_qinq vtr op only 
4972     @param b_dmac - B-tag remote mac address, needed for any push or translate_qinq vtr op
4973     @param b_smac - B-tag local mac address, needed for any push or translate qinq vtr op
4974     @param b_vlanid - B-tag vlanid, needed for any push or translate qinq vtr op
4975     @param i_sid - I-tag service id, needed for any push or translate qinq vtr op
4976 */
4977 define l2_interface_pbb_tag_rewrite
4978 {
4979   u32 client_index;
4980   u32 context;
4981   u32 sw_if_index;
4982   u32 vtr_op;
4983   u16 outer_tag;
4984   u8  b_dmac[6];
4985   u8  b_smac[6];
4986   u16 b_vlanid;
4987   u32 i_sid;
4988 };
4989
4990 /** \brief L2 interface pbb tag rewrite response
4991     @param context - sender context, to match reply w/ request
4992     @param retval - return code for the request
4993 */
4994 define l2_interface_pbb_tag_rewrite_reply
4995 {
4996   u32 context;
4997   i32 retval;
4998 };
4999
5000 /** \brief Punt traffic to the host
5001     @param client_index - opaque cookie to identify the sender
5002     @param context - sender context, to match reply w/ request
5003     @param is_add - add punt if non-zero, else delete
5004     @param ipv - L3 protocol 4 - IPv4, 6 - IPv6, ~0 - All
5005     @param l4_protocol - L4 protocol to be punted, only UDP (0x11) is supported
5006     @param l4_port - TCP/UDP port to be punted
5007 */
5008 define punt {
5009     u32 client_index;
5010     u32 context;
5011     u8 is_add;
5012     u8 ipv;
5013     u8 l4_protocol;
5014     u16 l4_port;
5015 };
5016
5017 /** \brief Reply to the punt request
5018     @param context - sender context which was passed in the request
5019     @param retval - return code of punt request
5020 */
5021 define punt_reply
5022 {
5023     u32 context;
5024     i32 retval;
5025 };
5026
5027 /** \brief Dump ipsec policy database data
5028     @param client_index - opaque cookie to identify the sender
5029     @param context - sender context, to match reply w/ request
5030     @param spd_id - SPD instance id
5031     @param sa_id - SA id, optional, set to ~0 to see all policies in SPD
5032 */
5033 define ipsec_spd_dump {
5034     u32 client_index;
5035     u32 context;
5036     u32 spd_id;
5037     u32 sa_id;
5038 };
5039
5040 /** \brief IPsec policy database response
5041     @param context - sender context which was passed in the request
5042     @param spd_id - SPD instance id
5043     @param priority - numeric value to control policy evaluation order
5044     @param is_outbound - [1|0] to indicate if direction is [out|in]bound
5045     @param is_ipv6 - [1|0] to indicate if address family is ipv[6|4]
5046     @param local_start_addr - first address in local traffic selector range
5047     @param local_stop_addr - last address in local traffic selector range
5048     @param local_start_port - first port in local traffic selector range
5049     @param local_stop_port - last port in local traffic selector range
5050     @param remote_start_addr - first address in remote traffic selector range
5051     @param remote_stop_addr - last address in remote traffic selector range
5052     @param remote_start_port - first port in remote traffic selector range
5053     @param remote_stop_port - last port in remote traffic selector range
5054     @param protocol - traffic selector protocol
5055     @param policy - policy action
5056     @param sa_id - SA id
5057     @param bytes - byte count of packets matching this policy
5058     @param packets - count of packets matching this policy
5059 */
5060
5061 define ipsec_spd_details {
5062     u32 context;
5063     u32 spd_id;
5064     i32 priority;
5065     u8 is_outbound;
5066     u8 is_ipv6;
5067     u8 local_start_addr[16];
5068     u8 local_stop_addr[16];
5069     u16 local_start_port;
5070     u16 local_stop_port;
5071     u8 remote_start_addr[16];
5072     u8 remote_stop_addr[16];
5073     u16 remote_start_port;
5074     u16 remote_stop_port;
5075     u8 protocol;
5076     u8 policy;
5077     u32 sa_id;
5078     u64 bytes;
5079     u64 packets;
5080 };
5081
5082 /** \brief Feature path enable/disable request
5083     @param client_index - opaque cookie to identify the sender
5084     @param context - sender context, to match reply w/ request
5085     @param sw_if_index - the interface
5086     @param enable - 1 = on, 0 = off
5087 */
5088 define feature_enable_disable {
5089     u32 client_index;
5090     u32 context;
5091     u32 sw_if_index;
5092     u8 enable;
5093     u8 arc_name[64];
5094     u8 feature_name[64];
5095 };
5096
5097 /** \brief Reply to the eature path enable/disable request
5098     @param context - sender context which was passed in the request
5099     @param retval - return code for the request
5100 */
5101 define feature_enable_disable_reply
5102 {
5103     u32 context;
5104     i32 retval;
5105 };
5106
5107 /** \brief Dump IP neighboors
5108     @param client_index - opaque cookie to identify the sender
5109     @param context - sender context, to match reply w/ request
5110     @param sw_if_index - the interface to dump neighboors
5111     @param is_ipv6 - [1|0] to indicate if address family is ipv[6|4]
5112 */
5113 define ip_neighbor_dump
5114 {
5115     u32 client_index;
5116     u32 context;
5117     u32 sw_if_index;
5118     u8  is_ipv6;
5119 };
5120
5121 /** \brief IP neighboors dump response
5122     @param context - sender context which was passed in the request
5123     @param is_static - [1|0] to indicate if neighbor is statically configured
5124     @param is_ipv6 - [1|0] to indicate if address family is ipv[6|4]
5125 */
5126 define ip_neighbor_details {
5127     u32 context;
5128     u32 is_static;
5129     u8  is_ipv6;
5130     u8  mac_address[6];
5131     u8  ip_address[16];
5132 };
5133
5134 /*
5135  * Local Variables:
5136  * eval: (c-set-style "gnu")
5137  * End:
5138  */