api: missing support for dumping of neighbours (VPP-333)
[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 Add MAP domains
3881     @param client_index - opaque cookie to identify the sender
3882     @param context - sender context, to match reply w/ request
3883     @param ip6_prefix - Rule IPv6 prefix
3884     @param ip4_prefix - Rule IPv4 prefix
3885     @param ip6_src - MAP domain IPv6 BR address / Tunnel source
3886     @param ip6_prefix_len - Rule IPv6 prefix length
3887     @param ip4_prefix_len - Rule IPv4 prefix length
3888     @param ea_bits_len - Embedded Address bits length
3889     @param psid_offset - Port Set Identifider (PSID) offset
3890     @param psid_length - PSID length
3891     @param is_translation - MAP-E / MAP-T
3892     @param mtu - MTU
3893 */
3894 define map_add_domain
3895 {
3896   u32 client_index;
3897   u32 context;
3898   u8 ip6_prefix[16];
3899   u8 ip4_prefix[4];
3900   u8 ip6_src[16];
3901   u8 ip6_prefix_len;
3902   u8 ip4_prefix_len;
3903   u8 ip6_src_prefix_len;
3904   u8 ea_bits_len;
3905   u8 psid_offset;
3906   u8 psid_length;
3907   u8 is_translation;
3908   u16 mtu;
3909 };
3910
3911 /** \brief Reply for MAP domain add
3912     @param context - returned sender context, to match reply w/ request
3913     @param index - MAP domain index
3914     @param retval - return code
3915 */
3916 define map_add_domain_reply
3917 {
3918   u32 context;
3919   u32 index;
3920   i32 retval;
3921 };
3922
3923 /** \brief Delete MAP domain
3924     @param client_index - opaque cookie to identify the sender
3925     @param context - sender context, to match reply w/ request
3926     @param index - MAP Domain index
3927 */
3928 define map_del_domain
3929 {
3930   u32 client_index;
3931   u32 context;
3932   u32 index;
3933 };
3934
3935 /** \brief Reply for MAP domain del
3936     @param context - returned sender context, to match reply w/ request
3937     @param retval - return code
3938 */
3939 define map_del_domain_reply
3940 {
3941   u32 context;
3942   i32 retval;
3943 };
3944
3945 /** \brief Add or Delete MAP rule from a domain (Only used for shared IPv4 per subscriber)
3946     @param client_index - opaque cookie to identify the sender
3947     @param context - sender context, to match reply w/ request
3948     @param index - MAP Domain index
3949     @param is_add - If 1 add rule, if 0 delete rule
3950     @param ip6_dst - MAP CE IPv6 address
3951     @param psid - Rule PSID
3952 */
3953 define map_add_del_rule
3954 {
3955   u32 client_index;
3956   u32 context;
3957   u32 index;
3958   u32 is_add;
3959   u8 ip6_dst[16];
3960   u16 psid;
3961 };
3962
3963 /** \brief Reply for MAP rule add/del
3964     @param context - returned sender context, to match reply w/ request
3965     @param retval - return code
3966 */
3967 define map_add_del_rule_reply
3968 {
3969   u32 context;
3970   i32 retval;
3971 };
3972
3973 /** \brief Get list of map domains
3974     @param client_index - opaque cookie to identify the sender
3975 */
3976 define map_domain_dump
3977 {
3978   u32 client_index;
3979   u32 context;
3980 };
3981
3982 define map_domain_details
3983 {
3984   u32 context;
3985   u32 domain_index;
3986   u8 ip6_prefix[16];
3987   u8 ip4_prefix[4];
3988   u8 ip6_src[16];
3989   u8 ip6_prefix_len;
3990   u8 ip4_prefix_len;
3991   u8 ip6_src_len;
3992   u8 ea_bits_len;
3993   u8 psid_offset;
3994   u8 psid_length;
3995   u8 flags;
3996   u16 mtu;
3997   u8 is_translation;
3998 };
3999
4000 define map_rule_dump
4001 {
4002   u32 client_index;
4003   u32 context;
4004   u32 domain_index;
4005 };
4006
4007 define map_rule_details
4008 {
4009   u32 context;
4010   u8 ip6_dst[16];
4011   u16 psid;
4012 };
4013
4014 /** \brief Request for a single block of summary stats
4015     @param client_index - opaque cookie to identify the sender
4016     @param context - sender context, to match reply w/ request
4017 */
4018 define map_summary_stats
4019 {
4020   u32 client_index;
4021   u32 context;
4022 };
4023
4024 /** \brief Reply for map_summary_stats request
4025     @param context - sender context, to match reply w/ request
4026     @param retval - return code for request
4027     @param total_bindings -  
4028     @param total_pkts -  
4029     @param total_ip4_fragments -
4030     @param total_security_check - 
4031 */
4032 define map_summary_stats_reply
4033 {
4034   u32 context;
4035   i32 retval;
4036   u64 total_bindings;
4037   u64 total_pkts[2];
4038   u64 total_bytes[2];
4039   u64 total_ip4_fragments;
4040   u64 total_security_check[2];
4041 };
4042
4043 /** \brief cop: enable/disable junk filtration features on an interface
4044     @param client_index - opaque cookie to identify the sender
4045     @param context - sender context, to match reply w/ request
4046     @param sw_if_inded - desired interface
4047     @param enable_disable - 1 => enable, 0 => disable
4048 */
4049
4050 define cop_interface_enable_disable
4051 {
4052   u32 client_index;
4053   u32 context;
4054   u32 sw_if_index;
4055   u8 enable_disable;
4056 };
4057
4058 /** \brief cop: interface enable/disable junk filtration reply
4059     @param context - returned sender context, to match reply w/ request
4060     @param retval - return code
4061 */
4062
4063 define cop_interface_enable_disable_reply
4064 {
4065   u32 context;
4066   i32 retval;
4067 };
4068
4069 /** \brief cop: enable/disable whitelist filtration features on an interface
4070     Note: the supplied fib_id must match in order to remove the feature!
4071     
4072     @param client_index - opaque cookie to identify the sender
4073     @param context - sender context, to match reply w/ request
4074     @param sw_if_index - interface handle, physical interfaces only
4075     @param fib_id - fib identifier for the whitelist / blacklist fib
4076     @param ip4 - 1 => enable ip4 filtration, 0=> disable ip4 filtration
4077     @param ip6 - 1 => enable ip6 filtration, 0=> disable ip6 filtration
4078     @param default_cop -  1 => enable non-ip4, non-ip6 filtration 0=> disable it
4079 */
4080
4081 define cop_whitelist_enable_disable
4082 {
4083   u32 client_index;
4084   u32 context;
4085   u32 sw_if_index;
4086   u32 fib_id;
4087   u8 ip4;
4088   u8 ip6;
4089   u8 default_cop;
4090 };
4091
4092 /** \brief cop: interface enable/disable junk filtration reply
4093     @param context - returned sender context, to match reply w/ request
4094     @param retval - return code
4095 */
4096
4097 define cop_whitelist_enable_disable_reply
4098 {
4099   u32 context;
4100   i32 retval;
4101 };
4102
4103 /** \brief get_node_graph - get a copy of the vpp node graph
4104     including the current set of graph arcs.
4105
4106     @param client_index - opaque cookie to identify the sender
4107     @param context - sender context, to match reply w/ request
4108 */
4109
4110 define get_node_graph
4111 {
4112   u32 client_index;
4113   u32 context;
4114 };
4115
4116 /** \brief get_node_graph_reply
4117     @param context - returned sender context, to match reply w/ request
4118     @param retval - return code
4119     @param reply_in_shmem - result from vlib_node_serialize, in shared
4120     memory. Process with vlib_node_unserialize, remember to switch
4121     heaps and free the result.
4122 */
4123
4124 define get_node_graph_reply
4125 {
4126   u32 context;
4127   i32 retval;
4128   u64 reply_in_shmem;
4129 };
4130
4131 /** \brief IOAM enable : Enable in-band OAM
4132     @param id - profile id
4133     @param seqno - To enable Seqno Processing
4134     @param analyse - Enabling analysis of iOAM at decap node 
4135     @param pow_enable - Proof of Work enabled or not flag
4136     @param trace_enable - iOAM Trace enabled or not flag
4137 */
4138 define ioam_enable
4139 {
4140   u32 client_index;
4141   u32 context;
4142   u16 id;
4143   u8 seqno;
4144   u8 analyse;
4145   u8 pot_enable;
4146   u8 trace_enable;
4147   u32 node_id;
4148 };
4149
4150 /** \brief iOAM Trace profile add / del response
4151     @param context - sender context, to match reply w/ request
4152     @param retval - return value for request
4153 */
4154 define ioam_enable_reply
4155 {
4156   u32 context;
4157   i32 retval;
4158 };
4159
4160 /** \brief iOAM disable
4161     @param client_index - opaque cookie to identify the sender
4162     @param context - sender context, to match reply w/ request
4163     @param index - MAP Domain index
4164 */
4165 define ioam_disable
4166 {
4167   u32 client_index;
4168   u32 context;
4169   u16 id;
4170 };
4171
4172 /** \brief iOAM disable response
4173     @param context - sender context, to match reply w/ request
4174     @param retval - return value for request
4175 */
4176 define ioam_disable_reply
4177 {
4178   u32 context;
4179   i32 retval;
4180 };
4181
4182 /** \brief Create host-interface
4183     @param client_index - opaque cookie to identify the sender
4184     @param context - sender context, to match reply w/ request
4185     @param host_if_name - interface name
4186     @param hw_addr - interface MAC
4187     @param use_random_hw_addr - use random generated MAC
4188 */
4189 define af_packet_create
4190 {
4191   u32 client_index;
4192   u32 context;
4193
4194   u8 host_if_name[64];
4195   u8 hw_addr[6];
4196   u8 use_random_hw_addr;
4197 };
4198
4199 /** \brief Create host-interface response
4200     @param context - sender context, to match reply w/ request
4201     @param retval - return value for request
4202 */
4203 define af_packet_create_reply
4204 {
4205   u32 context;
4206   i32 retval;
4207   u32 sw_if_index;
4208 };
4209
4210 /** \brief Delete host-interface
4211     @param client_index - opaque cookie to identify the sender
4212     @param context - sender context, to match reply w/ request
4213     @param host_if_name - interface name
4214 */
4215 define af_packet_delete
4216 {
4217   u32 client_index;
4218   u32 context;
4219
4220   u8 host_if_name[64];
4221 };
4222
4223 /** \brief Delete host-interface response
4224     @param context - sender context, to match reply w/ request
4225     @param retval - return value for request
4226 */
4227 define af_packet_delete_reply
4228 {
4229   u32 context;
4230   i32 retval;
4231 };
4232
4233 /** \brief Add/del policer
4234     @param client_index - opaque cookie to identify the sender
4235     @param context - sender context, to match reply w/ request
4236     @param is_add - add policer if non-zero, else delete
4237     @param name - policer name
4238     @param cir - CIR
4239     @param eir - EIR
4240     @param cb - Committed Burst
4241     @param eb - Excess or Peak Burst
4242     @param rate_type - rate type
4243     @param round_type - rounding type
4244     @param type - policer algorithm
4245     @param color_aware - 0=color-blind, 1=color-aware
4246     @param conform_action_type - conform action type
4247     @param conform_dscp - DSCP for conform mar-and-transmit action
4248     @param exceed_action_type - exceed action type
4249     @param exceed_dscp - DSCP for exceed mar-and-transmit action
4250     @param violate_action_type - violate action type
4251     @param violate_dscp - DSCP for violate mar-and-transmit action
4252 */
4253 define policer_add_del
4254 {
4255   u32 client_index;
4256   u32 context;
4257
4258   u8 is_add;
4259   u8 name[64];
4260   u32 cir;
4261   u32 eir;
4262   u64 cb;
4263   u64 eb;
4264   u8 rate_type;
4265   u8 round_type;
4266   u8 type;
4267   u8 color_aware;
4268   u8 conform_action_type;
4269   u8 conform_dscp;
4270   u8 exceed_action_type;
4271   u8 exceed_dscp;
4272   u8 violate_action_type;
4273   u8 violate_dscp;
4274 };
4275
4276 /** \brief Add/del policer response
4277     @param context - sender context, to match reply w/ request
4278     @param retval - return value for request
4279     @param policer_index - for add, returned index of the new policer
4280 */
4281 define policer_add_del_reply
4282 {
4283   u32 context;
4284   i32 retval;
4285   u32 policer_index;
4286 };
4287
4288 /** \brief Get list of policers
4289     @param client_index - opaque cookie to identify the sender
4290     @param context - sender context, to match reply w/ request
4291     @param match_name_valid - if 0 request all policers otherwise use match_name
4292     @param match_name - policer name
4293 */
4294 define policer_dump
4295 {
4296   u32 client_index;
4297   u32 context;
4298
4299   u8 match_name_valid;
4300   u8 match_name[64];
4301 };
4302
4303 /** \brief Policer operational state response.
4304     @param context - sender context, to match reply w/ request
4305     @param name - policer name
4306     @param cir - CIR
4307     @param eir - EIR
4308     @param cb - Committed Burst
4309     @param eb - Excess or Peak Burst
4310     @param rate_type - rate type
4311     @param round_type - rounding type
4312     @param type - policer algorithm
4313     @param conform_action_type - conform action type
4314     @param conform_dscp - DSCP for conform mar-and-transmit action
4315     @param exceed_action_type - exceed action type
4316     @param exceed_dscp - DSCP for exceed mar-and-transmit action
4317     @param violate_action_type - violate action type
4318     @param violate_dscp - DSCP for violate mar-and-transmit action
4319     @param single_rate - 1 = single rate policer, 0 = two rate policer
4320     @param color_aware - for hierarchical policing
4321     @param scale - power-of-2 shift amount for lower rates
4322     @param cir_tokens_per_period - number of tokens for each period
4323     @param pir_tokens_per_period - number of tokens for each period for 2-rate policer
4324     @param current_limit - current limit
4325     @param current_bucket - current bucket
4326     @param extended_limit - extended limit
4327     @param extended_bucket - extended bucket
4328     @param last_update_time - last update time
4329 */
4330 define policer_details
4331 {
4332   u32 context;
4333
4334   u8 name[64];
4335   u32 cir;
4336   u32 eir;
4337   u64 cb;
4338   u64 eb;
4339   u8 rate_type;
4340   u8 round_type;
4341   u8 type;
4342   u8 conform_action_type;
4343   u8 conform_dscp;
4344   u8 exceed_action_type;
4345   u8 exceed_dscp;
4346   u8 violate_action_type;
4347   u8 violate_dscp;
4348   u8 single_rate;
4349   u8 color_aware;
4350   u32 scale;
4351   u32 cir_tokens_per_period;
4352   u32 pir_tokens_per_period;
4353   u32 current_limit;
4354   u32 current_bucket;
4355   u32 extended_limit;
4356   u32 extended_bucket;
4357   u64 last_update_time;
4358 };
4359
4360 /** \brief Set/unset policer classify interface
4361     @param client_index - opaque cookie to identify the sender
4362     @param context - sender context, to match reply w/ request
4363     @param sw_if_index - interface to set/unset policer classify
4364     @param ip4_table_index - ip4 classify table index (~0 for skip)
4365     @param ip6_table_index - ip6 classify table index (~0 for skip)
4366     @param l2_table_index  -  l2 classify table index (~0 for skip)
4367     @param is_add - Set if non-zero, else unset
4368     Note: User is recommeneded to use just one valid table_index per call.
4369           (ip4_table_index, ip6_table_index, or l2_table_index)
4370 */
4371 define policer_classify_set_interface
4372 {
4373   u32 client_index;
4374   u32 context;
4375   u32 sw_if_index;
4376   u32 ip4_table_index;
4377   u32 ip6_table_index;
4378   u32 l2_table_index;
4379   u8 is_add;
4380 };
4381
4382 /** \brief Set/unset policer classify interface response
4383     @param context - sender context, to match reply w/ request
4384     @param retval - return value for request
4385 */
4386 define policer_classify_set_interface_reply
4387 {
4388   u32 context;
4389   i32 retval;
4390 };
4391
4392 /** \brief Get list of policer classify interfaces and tables
4393     @param client_index - opaque cookie to identify the sender
4394     @param context - sender context, to match reply w/ request
4395     @param type - classify table type
4396 */
4397 define policer_classify_dump
4398 {
4399   u32 client_index;
4400   u32 context;
4401   u8 type;
4402 };
4403
4404 /** \brief Policer iclassify operational state response.
4405     @param context - sender context, to match reply w/ request
4406     @param sw_if_index - software interface index
4407     @param table_index - classify table index
4408 */
4409 define policer_classify_details
4410 {
4411   u32 context;
4412   u32 sw_if_index;
4413   u32 table_index;
4414 };
4415
4416 /** \brief Create netmap
4417     @param client_index - opaque cookie to identify the sender
4418     @param context - sender context, to match reply w/ request
4419     @param netmap_if_name - interface name
4420     @param hw_addr - interface MAC
4421     @param use_random_hw_addr - use random generated MAC
4422     @param is_pipe - is pipe
4423     @param is_master - 0=slave, 1=master
4424 */
4425 define netmap_create
4426 {
4427   u32 client_index;
4428   u32 context;
4429
4430   u8 netmap_if_name[64];
4431   u8 hw_addr[6];
4432   u8 use_random_hw_addr;
4433   u8 is_pipe;
4434   u8 is_master;
4435 };
4436
4437 /** \brief Create netmap response
4438     @param context - sender context, to match reply w/ request
4439     @param retval - return value for request
4440 */
4441 define netmap_create_reply
4442 {
4443   u32 context;
4444   i32 retval;
4445 };
4446
4447 /** \brief Delete netmap
4448     @param client_index - opaque cookie to identify the sender
4449     @param context - sender context, to match reply w/ request
4450     @param netmap_if_name - interface name
4451 */
4452 define netmap_delete
4453 {
4454   u32 client_index;
4455   u32 context;
4456
4457   u8 netmap_if_name[64];
4458 };
4459
4460 /** \brief Delete netmap response
4461     @param context - sender context, to match reply w/ request
4462     @param retval - return value for request
4463 */
4464 define netmap_delete_reply
4465 {
4466   u32 context;
4467   i32 retval;
4468 };
4469
4470 /** \brief Classify get table IDs request
4471     @param client_index - opaque cookie to identify the sender
4472     @param context - sender context, to match reply w/ request
4473 */
4474 define classify_table_ids
4475 {
4476   u32 client_index;
4477   u32 context;
4478 };
4479
4480 /** \brief Reply for classify get table IDs request
4481     @param context - sender context which was passed in the request
4482     @param count - number of ids returned in response
4483     @param ids - array of classify table ids
4484 */
4485 define classify_table_ids_reply
4486 {
4487   u32 context;
4488   i32 retval;
4489   u32 count;
4490   u32 ids[count];
4491 };
4492
4493 /** \brief Classify table ids by interface index request
4494     @param client_index - opaque cookie to identify the sender
4495     @param context - sender context, to match reply w/ request
4496     @param sw_if_index - index of the interface
4497 */
4498 define classify_table_by_interface
4499 {
4500   u32 client_index;
4501   u32 context;
4502   u32 sw_if_index;
4503 };
4504
4505 /** \brief Reply for classify table id by interface index request
4506     @param context - sender context which was passed in the request
4507     @param count - number of ids returned in response
4508     @param sw_if_index - index of the interface
4509     @param l2_table_id - l2 classify table index
4510     @param ip4_table_id - ip4 classify table index
4511     @param ip6_table_id - ip6 classify table index
4512 */
4513 define classify_table_by_interface_reply
4514 {
4515   u32 context;
4516   i32 retval;
4517   u32 sw_if_index;
4518   u32 l2_table_id;
4519   u32 ip4_table_id;
4520   u32 ip6_table_id;
4521 };
4522
4523 /** \brief Classify table info
4524     @param client_index - opaque cookie to identify the sender
4525     @param context - sender context, to match reply w/ request
4526     @param table_id - classify table index
4527 */
4528 define classify_table_info
4529 {
4530   u32 client_index;
4531   u32 context;
4532   u32 table_id;
4533 };
4534
4535 /** \brief Reply for classify table info request
4536     @param context - sender context which was passed in the request
4537     @param count - number of ids returned in response
4538     @param table_id - classify table index
4539     @param nbuckets - number of buckets when adding a table
4540     @param match_n_vectors - number of match vectors
4541     @param skip_n_vectors - number of skip_n_vectors
4542     @param active_sessions - number of sessions (active entries)
4543     @param next_table_index - index of next table
4544     @param miss_next_index - index of miss table
4545     @param mask[] - match mask
4546 */
4547 define classify_table_info_reply
4548 {
4549   u32 context;
4550   i32 retval;
4551   u32 table_id;
4552   u32 nbuckets;
4553   u32 match_n_vectors;
4554   u32 skip_n_vectors;
4555   u32 active_sessions;
4556   u32 next_table_index;
4557   u32 miss_next_index;
4558   u32 mask_length;
4559   u8 mask[mask_length];
4560 };
4561
4562 /** \brief Classify sessions dump request
4563     @param client_index - opaque cookie to identify the sender
4564     @param context - sender context, to match reply w/ request
4565     @param table_id - classify table index
4566 */
4567 define classify_session_dump
4568 {
4569   u32 client_index;
4570   u32 context;
4571   u32 table_id;
4572 };
4573
4574 /** \brief Reply for classify table session dump request
4575     @param context - sender context which was passed in the request
4576     @param count - number of ids returned in response
4577     @param table_id - classify table index
4578     @param hit_next_index - hit_next_index of session
4579     @param opaque_index - for add, opaque_index of session
4580     @param advance - advance value of session
4581     @param match[] - match value for session
4582 */
4583 define classify_session_details
4584 {
4585   u32 context;
4586   i32 retval;
4587   u32 table_id;
4588   u32 hit_next_index;
4589   i32 advance;
4590   u32 opaque_index;
4591   u32 match_length;
4592   u8 match[match_length];
4593 };
4594
4595 /** \brief Configure IPFIX exporter process request
4596     @param client_index - opaque cookie to identify the sender
4597     @param context - sender context, to match reply w/ request
4598     @param collector_address - address of IPFIX collector
4599     @param collector_port - port of IPFIX collector
4600     @param src_address - address of IPFIX exporter
4601     @param vrf_id - VRF / fib table ID
4602     @param path_mtu - Path MTU between exporter and collector
4603     @param template_interval - number of seconds after which to resend template
4604     @param udp_checksum - UDP checksum calculation enable flag
4605 */
4606 define set_ipfix_exporter
4607 {
4608   u32 client_index;
4609   u32 context;
4610   u8 collector_address[16];
4611   u16 collector_port;
4612   u8 src_address[16];
4613   u32 vrf_id;
4614   u32 path_mtu;
4615   u32 template_interval;
4616   u8 udp_checksum;
4617 };
4618
4619 /** \brief Reply to IPFIX exporter configure request
4620     @param context - sender context which was passed in the request
4621 */
4622 define set_ipfix_exporter_reply
4623 {
4624   u32 context;
4625   i32 retval;
4626 };
4627
4628 /** \brief IPFIX exporter dump request
4629     @param client_index - opaque cookie to identify the sender
4630     @param context - sender context, to match reply w/ request
4631 */
4632 define ipfix_exporter_dump
4633 {
4634   u32 client_index;
4635   u32 context;
4636 };
4637
4638 /** \brief Reply to IPFIX exporter dump request
4639     @param context - sender context which was passed in the request
4640     @param collector_address - address of IPFIX collector
4641     @param collector_port - port of IPFIX collector
4642     @param src_address - address of IPFIX exporter
4643     @param fib_index - fib table index
4644     @param path_mtu - Path MTU between exporter and collector
4645     @param template_interval - number of seconds after which to resend template
4646     @param udp_checksum - UDP checksum calculation enable flag
4647 */
4648 define ipfix_exporter_details
4649 {
4650   u32 context;
4651   u8 collector_address[16];
4652   u16 collector_port;
4653   u8 src_address[16];
4654   u32 vrf_id;
4655   u32 path_mtu;
4656   u32 template_interval;
4657   u8 udp_checksum;
4658 };
4659
4660 /** \brief IPFIX classify stream configure request
4661     @param client_index - opaque cookie to identify the sender
4662     @param context - sender context, to match reply w/ request
4663     @param domain_id - domain ID reported in IPFIX messages for classify stream
4664     @param src_port - source port of UDP session for classify stream
4665 */
4666 define set_ipfix_classify_stream {
4667     u32 client_index;
4668     u32 context;
4669     u32 domain_id;
4670     u16 src_port;
4671 };
4672
4673 /** \brief IPFIX classify stream configure response
4674     @param context - sender context, to match reply w/ request
4675     @param retval - return value for request
4676 */
4677 define set_ipfix_classify_stream_reply {
4678     u32 context;
4679     i32 retval;
4680 };
4681
4682 /** \brief IPFIX classify stream dump request
4683     @param client_index - opaque cookie to identify the sender
4684     @param context - sender context, to match reply w/ request
4685 */
4686 define ipfix_classify_stream_dump {
4687     u32 client_index;
4688     u32 context;
4689 };
4690
4691 /** \brief Reply to IPFIX classify stream dump request
4692     @param context - sender context, to match reply w/ request
4693     @param domain_id - domain ID reported in IPFIX messages for classify stream
4694     @param src_port - source port of UDP session for classify stream
4695 */
4696 define ipfix_classify_stream_details {
4697     u32 context;
4698     u32 domain_id;
4699     u16 src_port;
4700 };
4701
4702 /** \brief IPFIX add or delete classifier table request
4703     @param client_index - opaque cookie to identify the sender
4704     @param context - sender context, to match reply w/ request
4705     @param table_id - classifier table ID
4706     @param ip_version - version of IP used in the classifier table
4707     @param transport_protocol - transport protocol used in the classifier table or 255 for unspecified
4708 */
4709 define ipfix_classify_table_add_del {
4710     u32 client_index;
4711     u32 context;
4712     u32 table_id;
4713     u8 ip_version;
4714     u8 transport_protocol;
4715     u8 is_add;
4716 };
4717
4718 /** \brief IPFIX add classifier table response
4719     @param context - sender context which was passed in the request
4720 */
4721 define ipfix_classify_table_add_del_reply {
4722     u32 context;
4723     i32 retval;
4724 };
4725
4726 /** \brief IPFIX classify tables dump request
4727     @param client_index - opaque cookie to identify the sender
4728     @param context - sender context, to match reply w/ request
4729 */
4730 define ipfix_classify_table_dump {
4731     u32 client_index;
4732     u32 context;
4733 };
4734
4735 /** \brief Reply to IPFIX classify tables dump request
4736     @param context - sender context, to match reply w/ request
4737     @param table_id - classifier table ID
4738     @param ip_version - version of IP used in the classifier table
4739     @param transport_protocol - transport protocol used in the classifier table or 255 for unspecified
4740 */
4741 define ipfix_classify_table_details {
4742     u32 context;
4743     u32 table_id;
4744     u8 ip_version;
4745     u8 transport_protocol;
4746 };
4747
4748 /** \brief Set/unset flow classify interface
4749     @param client_index - opaque cookie to identify the sender
4750     @param context - sender context, to match reply w/ request
4751     @param sw_if_index - interface to set/unset flow classify
4752     @param ip4_table_index - ip4 classify table index (~0 for skip)
4753     @param ip6_table_index - ip6 classify table index (~0 for skip)
4754     @param l2_table_index  -  l2 classify table index (~0 for skip)
4755     @param is_add - Set if non-zero, else unset
4756     Note: User is recommeneded to use just one valid table_index per call.
4757           (ip4_table_index, ip6_table_index, or l2_table_index)
4758 */
4759 define flow_classify_set_interface {
4760     u32 client_index;
4761     u32 context;
4762     u32 sw_if_index;
4763     u32 ip4_table_index;
4764     u32 ip6_table_index;
4765     u8  is_add;
4766 };
4767
4768 /** \brief Set/unset flow classify interface response
4769     @param context - sender context, to match reply w/ request
4770     @param retval - return value for request
4771 */
4772 define flow_classify_set_interface_reply {
4773     u32 context;
4774     i32 retval;
4775 };
4776
4777 /** \brief Get list of flow classify interfaces and tables
4778     @param client_index - opaque cookie to identify the sender
4779     @param context - sender context, to match reply w/ request
4780     @param type - classify table type
4781 */
4782 define flow_classify_dump {
4783     u32 client_index;
4784     u32 context;
4785     u8 type;
4786 };
4787
4788 /** \brief Flow classify operational state response.
4789     @param context - sender context, to match reply w/ request
4790     @param sw_if_index - software interface index
4791     @param table_index - classify table index
4792 */
4793 define flow_classify_details {
4794     u32 context;
4795     u32 sw_if_index;
4796     u32 table_index;
4797 };
4798
4799 /** \brief Enable/Disable span to mirror traffic from one interface to another
4800     @param client_index - opaque cookie to identify the sender
4801     @param context - sender context which was passed in the request
4802     @param sw_if_index_from - interface to be mirorred
4803     @param sw_if_index_to - interface where the traffic is mirrored
4804     @param enable - 1 enable SPAN, 0 SPAN on given interface
4805 */
4806 define sw_interface_span_enable_disable{
4807     u32 client_index;
4808     u32 context;
4809     u32 sw_if_index_from;
4810     u32 sw_if_index_to;
4811     u8  enable;
4812 };
4813
4814 /** \brief Reply to SPAN enable/disable request
4815     @param context - sender context which was passed in the request
4816 */
4817 define sw_interface_span_enable_disable_reply {
4818     u32 context;
4819     i32 retval;
4820 };
4821
4822 /** \brief SPAN dump request
4823     @param client_index - opaque cookie to identify the sender
4824     @param context - sender context, to match reply w/ request
4825 */
4826 define sw_interface_span_dump {
4827     u32 client_index;
4828     u32 context;
4829 };
4830
4831 /** \brief Reply to SPAN dump request
4832     @param context - sender context which was passed in the request
4833     @param sw_if_index_from - mirorred interface
4834     @param sw_if_index_to - interface where the traffic is mirrored
4835 */
4836 define sw_interface_span_details {
4837     u32 context;
4838     u32 sw_if_index_from;
4839     u32 sw_if_index_to;
4840 };
4841
4842 /** \brief Query relative index via node names
4843     @param client_index - opaque cookie to identify the sender
4844     @param context - sender context, to match reply w/ request
4845     @param node_name - name of node to find relative index from
4846     @param next_name - next node from node_name to find relative index of
4847 */
4848 define get_next_index
4849 {
4850   u32 client_index;
4851   u32 context;
4852   u8 node_name[64];
4853   u8 next_name[64];
4854 };
4855
4856 /** \brief Reply for get next node index
4857     @param context - sender context which was passed in the request
4858     @param retval - return value
4859     @param next_index - index of the next_node
4860 */
4861 define get_next_index_reply
4862 {
4863   u32 context;
4864   i32 retval;
4865   u32 next_index;
4866 };
4867
4868 /** \brief PacketGenerator create interface request
4869     @param client_index - opaque cookie to identify the sender
4870     @param context - sender context, to match reply w/ request
4871     @param interface_id - interface index
4872 */
4873 define pg_create_interface
4874 {
4875   u32 client_index;
4876   u32 context;
4877   u32 interface_id;
4878 };
4879
4880 /** \brief PacketGenerator create interface response
4881     @param context - sender context, to match reply w/ request
4882     @param retval - return value for request
4883 */
4884 define pg_create_interface_reply
4885 {
4886   u32 context;
4887   i32 retval;
4888   u32 sw_if_index;
4889 };
4890
4891 /** \brief PacketGenerator capture packets on given interface request
4892     @param client_index - opaque cookie to identify the sender
4893     @param context - sender context, to match reply w/ request
4894     @param interface_id - pg interface index
4895     @param is_enabled - 1 if enabling streams, 0 if disabling
4896     @param count - number of packets to be captured
4897     @param pcap_file - pacp file name to store captured packets
4898 */
4899 define pg_capture
4900 {
4901   u32 client_index;
4902   u32 context;
4903   u32 interface_id;
4904   u8 is_enabled;
4905   u32 count;
4906   u32 pcap_name_length;
4907   u8 pcap_file_name[pcap_name_length];
4908 };
4909
4910 /** \brief PacketGenerator capture packets response
4911     @param context - sender context, to match reply w/ request
4912     @param retval - return value for request
4913 */
4914 define pg_capture_reply
4915 {
4916   u32 context;
4917   i32 retval;
4918 };
4919
4920 /** \brief Enable / disable packet generator request
4921     @param client_index - opaque cookie to identify the sender
4922     @param context - sender context, to match reply w/ request
4923     @param is_enabled - 1 if enabling streams, 0 if disabling
4924     @param stream - stream name to be enable/disabled, if not specified handle all streams
4925 */
4926 define pg_enable_disable
4927 {
4928   u32 client_index;
4929   u32 context;
4930   u8 is_enabled;
4931   u32 stream_name_length;
4932   u8 stream_name[stream_name_length];
4933 };
4934
4935 /** \brief Reply for enable / disable packet generator
4936     @param context - returned sender context, to match reply w/ request
4937     @param retval - return code
4938 */
4939 define pg_enable_disable_reply
4940 {
4941   u32 context;
4942   i32 retval;
4943 };
4944
4945 /** \brief Configure IP source and L4 port-range check
4946     @param client_index - opaque cookie to identify the sender
4947     @param context - sender context, to match reply w/ request
4948     @param is_ip6 - 1 if source address type is IPv6
4949     @param is_add - 1 if add, 0 if delete
4950     @param mask_length - mask length for address entry
4951     @param address - array of address bytes
4952     @param number_of_ranges - length of low_port and high_port arrays (must match)
4953     @param low_ports[32] - up to 32 low end of port range entries (must have corresponding high_ports entry)
4954     @param high_ports[32] - up to 32 high end of port range entries (must have corresponding low_ports entry)
4955     @param vrf_id - fib table/vrf id to associate the source and port-range check with
4956     @note To specify a single port set low_port and high_port entry the same
4957 */
4958 define ip_source_and_port_range_check_add_del
4959 {
4960   u32 client_index;
4961   u32 context;
4962   u8 is_ipv6;
4963   u8 is_add;
4964   u8 mask_length;
4965   u8 address[16];
4966   u8 number_of_ranges;
4967   u16 low_ports[32];
4968   u16 high_ports[32];
4969   u32 vrf_id;
4970 };
4971
4972 /** \brief Configure IP source and L4 port-range check reply
4973     @param context - returned sender context, to match reply w/ request
4974     @param retval - return code
4975 */
4976 define ip_source_and_port_range_check_add_del_reply
4977 {
4978   u32 context;
4979   i32 retval;
4980 };
4981
4982 /** \brief Set interface source and L4 port-range request
4983     @param client_index - opaque cookie to identify the sender
4984     @param context - sender context, to match reply w/ request
4985     @param interface_id - interface index
4986     @param tcp_vrf_id - VRF associated with source and TCP port-range check
4987     @param udp_vrf_id - VRF associated with source and TCP port-range check
4988 */
4989 define ip_source_and_port_range_check_interface_add_del
4990 {
4991   u32 client_index;
4992   u32 context;
4993   u8 is_add;
4994   u32 sw_if_index;
4995   u32 tcp_in_vrf_id;
4996   u32 tcp_out_vrf_id;
4997   u32 udp_in_vrf_id;
4998   u32 udp_out_vrf_id;
4999 };
5000
5001 /** \brief Set interface source and L4 port-range response
5002     @param context - sender context, to match reply w/ request
5003     @param retval - return value for request
5004 */
5005 define ip_source_and_port_range_check_interface_add_del_reply
5006 {
5007   u32 context;
5008   i32 retval;
5009 };
5010
5011 /** \brief Add / del ipsec gre tunnel request
5012     @param client_index - opaque cookie to identify the sender
5013     @param context - sender context, to match reply w/ request
5014     @param local_sa_id - local SA id
5015     @param remote_sa_id - remote SA id
5016     @param is_add - 1 if adding the tunnel, 0 if deleting
5017     @param src_address - tunnel source address
5018     @param dst_address - tunnel destination address
5019 */
5020 define ipsec_gre_add_del_tunnel {
5021     u32 client_index;
5022     u32 context;
5023     u32 local_sa_id;
5024     u32 remote_sa_id;
5025     u8 is_add;
5026     u8 src_address[4];
5027     u8 dst_address[4];
5028 };
5029
5030 /** \brief Reply for add / del ipsec gre tunnel request
5031     @param context - returned sender context, to match reply w/ request
5032     @param retval - return code
5033     @param sw_if_index - software index of the new ipsec gre tunnel
5034 */
5035 define ipsec_gre_add_del_tunnel_reply {
5036     u32 context;
5037     i32 retval;
5038     u32 sw_if_index;
5039 };
5040
5041 /** \brief Dump ipsec gre tunnel table
5042     @param client_index - opaque cookie to identify the sender
5043     @param context - sender context, to match reply w/ request
5044     @param tunnel_index - gre tunnel identifier or -1 in case of all tunnels
5045 */
5046 define ipsec_gre_tunnel_dump {
5047     u32 client_index;
5048     u32 context;
5049     u32 sw_if_index;
5050 };
5051
5052 /** \brief mpls gre tunnel operational state response
5053     @param context - returned sender context, to match reply w/ request
5054     @param sw_if_index - software index of the ipsec gre tunnel
5055     @param local_sa_id - local SA id
5056     @param remote_sa_id - remote SA id
5057     @param src_address - tunnel source address
5058     @param dst_address - tunnel destination address
5059 */
5060 define ipsec_gre_tunnel_details {
5061     u32 context;
5062     u32 sw_if_index;
5063     u32 local_sa_id;
5064     u32 remote_sa_id;
5065     u8 src_address[4];
5066     u8 dst_address[4];
5067 };
5068
5069 /** \brief Delete sub interface request
5070     @param client_index - opaque cookie to identify the sender
5071     @param context - sender context, to match reply w/ request
5072     @param sw_if_index - sw index of the interface that was created by create_subif
5073 */
5074 define delete_subif {
5075   u32 client_index;
5076   u32 context;
5077   u32 sw_if_index;
5078 };
5079
5080 /** \brief Delete sub interface response
5081     @param context - sender context, to match reply w/ request
5082     @param retval - return code for the request
5083 */
5084 define delete_subif_reply {
5085   u32 context;
5086   i32 retval;
5087 };
5088
5089 /** \brief DPDK interface HQoS pipe profile set request
5090     @param client_index - opaque cookie to identify the sender
5091     @param context - sender context, to match reply w/ request
5092     @param sw_if_index - the interface
5093     @param subport - subport ID
5094     @param pipe - pipe ID within its subport
5095     @param profile - pipe profile ID
5096 */
5097 define sw_interface_set_dpdk_hqos_pipe {
5098     u32 client_index;
5099     u32 context;
5100     u32 sw_if_index;
5101     u32 subport;
5102     u32 pipe;
5103     u32 profile;
5104 };
5105
5106 /** \brief DPDK interface HQoS pipe profile set reply
5107     @param context - sender context, to match reply w/ request
5108     @param retval - request return code
5109 */
5110 define sw_interface_set_dpdk_hqos_pipe_reply {
5111     u32 context;
5112     i32 retval;
5113 };
5114
5115 /** \brief DPDK interface HQoS subport parameters set request
5116     @param client_index - opaque cookie to identify the sender
5117     @param context - sender context, to match reply w/ request
5118     @param sw_if_index - the interface
5119     @param subport - subport ID
5120     @param tb_rate - subport token bucket rate (measured in bytes/second)
5121     @param tb_size - subport token bucket size (measured in credits)
5122     @param tc_rate - subport traffic class 0 .. 3 rates (measured in bytes/second)
5123     @param tc_period - enforcement period for rates (measured in milliseconds)
5124 */
5125 define sw_interface_set_dpdk_hqos_subport {
5126     u32 client_index;
5127     u32 context;
5128     u32 sw_if_index;
5129     u32 subport;
5130     u32 tb_rate;
5131     u32 tb_size;
5132     u32 tc_rate[4];
5133     u32 tc_period;
5134 };
5135
5136 /** \brief DPDK interface HQoS subport parameters set reply
5137     @param context - sender context, to match reply w/ request
5138     @param retval - request return code
5139 */
5140 define sw_interface_set_dpdk_hqos_subport_reply {
5141     u32 context;
5142     i32 retval;
5143 };
5144
5145 /** \brief DPDK interface HQoS tctbl entry set request
5146     @param client_index - opaque cookie to identify the sender
5147     @param context - sender context, to match reply w/ request
5148     @param sw_if_index - the interface
5149     @param entry - entry index ID
5150     @param tc - traffic class (0 .. 3)
5151     @param queue - traffic class queue (0 .. 3)
5152 */
5153 define sw_interface_set_dpdk_hqos_tctbl {
5154     u32 client_index;
5155     u32 context;
5156     u32 sw_if_index;
5157     u32 entry;
5158     u32 tc;
5159     u32 queue;
5160 };
5161
5162 /** \brief DPDK interface HQoS tctbl entry set reply
5163     @param context - sender context, to match reply w/ request
5164     @param retval - request return code
5165 */
5166 define sw_interface_set_dpdk_hqos_tctbl_reply {
5167     u32 context;
5168     i32 retval;
5169 };
5170
5171 /** \brief L2 interface pbb tag rewrite configure request
5172     @param client_index - opaque cookie to identify the sender
5173     @param context - sender context, to match reply w/ request
5174     @param sw_if_index - interface the operation is applied to
5175     @param vtr_op - Choose from l2_vtr_op_t enum values
5176     @param inner_tag - needed for translate_qinq vtr op only
5177     @param outer_tag - needed for translate_qinq vtr op only 
5178     @param b_dmac - B-tag remote mac address, needed for any push or translate_qinq vtr op
5179     @param b_smac - B-tag local mac address, needed for any push or translate qinq vtr op
5180     @param b_vlanid - B-tag vlanid, needed for any push or translate qinq vtr op
5181     @param i_sid - I-tag service id, needed for any push or translate qinq vtr op
5182 */
5183 define l2_interface_pbb_tag_rewrite
5184 {
5185   u32 client_index;
5186   u32 context;
5187   u32 sw_if_index;
5188   u32 vtr_op;
5189   u16 outer_tag;
5190   u8  b_dmac[6];
5191   u8  b_smac[6];
5192   u16 b_vlanid;
5193   u32 i_sid;
5194 };
5195
5196 /** \brief L2 interface pbb tag rewrite response
5197     @param context - sender context, to match reply w/ request
5198     @param retval - return code for the request
5199 */
5200 define l2_interface_pbb_tag_rewrite_reply
5201 {
5202   u32 context;
5203   i32 retval;
5204 };
5205
5206 /** \brief Punt traffic to the host
5207     @param client_index - opaque cookie to identify the sender
5208     @param context - sender context, to match reply w/ request
5209     @param is_add - add punt if non-zero, else delete
5210     @param ipv - L3 protocol 4 - IPv4, 6 - IPv6, ~0 - All
5211     @param l4_protocol - L4 protocol to be punted, only UDP (0x11) is supported
5212     @param l4_port - TCP/UDP port to be punted
5213 */
5214 define punt {
5215     u32 client_index;
5216     u32 context;
5217     u8 is_add;
5218     u8 ipv;
5219     u8 l4_protocol;
5220     u16 l4_port;
5221 };
5222
5223 /** \brief Reply to the punt request
5224     @param context - sender context which was passed in the request
5225     @param retval - return code of punt request
5226 */
5227 define punt_reply
5228 {
5229     u32 context;
5230     i32 retval;
5231 };
5232
5233 /** \brief Dump ipsec policy database data
5234     @param client_index - opaque cookie to identify the sender
5235     @param context - sender context, to match reply w/ request
5236     @param spd_id - SPD instance id
5237     @param sa_id - SA id, optional, set to ~0 to see all policies in SPD
5238 */
5239 define ipsec_spd_dump {
5240     u32 client_index;
5241     u32 context;
5242     u32 spd_id;
5243     u32 sa_id;
5244 };
5245
5246 /** \brief IPsec policy database response
5247     @param context - sender context which was passed in the request
5248     @param spd_id - SPD instance id
5249     @param priority - numeric value to control policy evaluation order
5250     @param is_outbound - [1|0] to indicate if direction is [out|in]bound
5251     @param is_ipv6 - [1|0] to indicate if address family is ipv[6|4]
5252     @param local_start_addr - first address in local traffic selector range
5253     @param local_stop_addr - last address in local traffic selector range
5254     @param local_start_port - first port in local traffic selector range
5255     @param local_stop_port - last port in local traffic selector range
5256     @param remote_start_addr - first address in remote traffic selector range
5257     @param remote_stop_addr - last address in remote traffic selector range
5258     @param remote_start_port - first port in remote traffic selector range
5259     @param remote_stop_port - last port in remote traffic selector range
5260     @param protocol - traffic selector protocol
5261     @param policy - policy action
5262     @param sa_id - SA id
5263     @param bytes - byte count of packets matching this policy
5264     @param packets - count of packets matching this policy
5265 */
5266
5267 define ipsec_spd_details {
5268     u32 context;
5269     u32 spd_id;
5270     i32 priority;
5271     u8 is_outbound;
5272     u8 is_ipv6;
5273     u8 local_start_addr[16];
5274     u8 local_stop_addr[16];
5275     u16 local_start_port;
5276     u16 local_stop_port;
5277     u8 remote_start_addr[16];
5278     u8 remote_stop_addr[16];
5279     u16 remote_start_port;
5280     u16 remote_stop_port;
5281     u8 protocol;
5282     u8 policy;
5283     u32 sa_id;
5284     u64 bytes;
5285     u64 packets;
5286 };
5287
5288 /** \brief Feature path enable/disable request
5289     @param client_index - opaque cookie to identify the sender
5290     @param context - sender context, to match reply w/ request
5291     @param sw_if_index - the interface
5292     @param enable - 1 = on, 0 = off
5293 */
5294 define feature_enable_disable {
5295     u32 client_index;
5296     u32 context;
5297     u32 sw_if_index;
5298     u8 enable;
5299     u8 arc_name[64];
5300     u8 feature_name[64];
5301 };
5302
5303 /** \brief Reply to the eature path enable/disable request
5304     @param context - sender context which was passed in the request
5305     @param retval - return code for the request
5306 */
5307 define feature_enable_disable_reply
5308 {
5309     u32 context;
5310     i32 retval;
5311 };
5312
5313 /** \brief Dump IP neighboors
5314     @param client_index - opaque cookie to identify the sender
5315     @param context - sender context, to match reply w/ request
5316     @param sw_if_index - the interface to dump neighboors
5317     @param is_ipv6 - [1|0] to indicate if address family is ipv[6|4]
5318 */
5319 define ip_neighbor_dump
5320 {
5321     u32 client_index;
5322     u32 context;
5323     u32 sw_if_index;
5324     u8  is_ipv6;
5325 };
5326
5327 /** \brief IP neighboors dump response
5328     @param context - sender context which was passed in the request
5329     @param is_static - [1|0] to indicate if neighbor is statically configured
5330     @param is_ipv6 - [1|0] to indicate if address family is ipv[6|4]
5331 */
5332 define ip_neighbor_details {
5333     u32 context;
5334     u32 is_static;
5335     u8  is_ipv6;
5336     u8  mac_address[6];
5337     u8  ip_address[16];
5338 };
5339
5340 /*
5341  * Local Variables:
5342  * eval: (c-set-style "gnu")
5343  * End:
5344  */