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