Make table chain deletion optional in classifier API (VPP-206)
[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 del_chain - if non-zero delete the whole chain of tables
1215     @param table_index - if add, reuturns index of the created table, else specifies the table to delete  
1216     @param nbuckets - number of buckets when adding a table
1217     @param memory_size - memory size when adding a table
1218     @param match_n_vectors - number of match vectors
1219     @param next_table_index - index of next table
1220     @param miss_next_index - index of miss table
1221     @param current_data_flag - option to use current node's packet payload
1222             as the starting point from where packets are classified,
1223             This option is only valid for L2/L3 input ACL for now.
1224             0: by default, classify data from the buffer's start location
1225             1: classify packets from VPP node’s current data pointer
1226     @param current_data_offset - a signed value to shift the start location of
1227             the packet to be classified
1228             For example, if input IP ACL node is used, L2 header’s first byte
1229             can be accessible by configuring current_data_offset to -14
1230             if there is no vlan tag.
1231             This is valid only if current_data_flag is set to 1.
1232     @param mask[] - match mask
1233 */
1234 define classify_add_del_table
1235 {
1236   u32 client_index;
1237   u32 context;
1238   u8 is_add;
1239   u8 del_chain;
1240   u32 table_index;
1241   u32 nbuckets;
1242   u32 memory_size;
1243   u32 skip_n_vectors;
1244   u32 match_n_vectors;
1245   u32 next_table_index;
1246   u32 miss_next_index;
1247   u32 current_data_flag;
1248   i32 current_data_offset;
1249   u8 mask[0];
1250 };
1251
1252 /** \brief Add/Delete classification table response
1253     @param context - sender context, to match reply w/ request
1254     @param retval - return code for the table add/del requst
1255     @param new_table_index - for add, returned index of the new table
1256     @param skip_n_vectors - for add, returned value of skip_n_vectors in table
1257     @param match_n_vectors -for add, returned value of match_n_vectors in table
1258 */
1259 define classify_add_del_table_reply
1260 {
1261   u32 context;
1262   i32 retval;
1263   u32 new_table_index;
1264   u32 skip_n_vectors;
1265   u32 match_n_vectors;
1266 };
1267
1268 /** \brief Classify add / del session request
1269     @param client_index - opaque cookie to identify the sender
1270     @param context - sender context, to match reply w/ request
1271     @param is_add - add session if non-zero, else delete
1272     @param table_index - index of the table to add/del the session, required
1273     @param hit_next_index - for add, hit_next_index of new session, required
1274     @param opaque_index - for add, opaque_index of new session
1275     @param advance -for add, advance value for session
1276     @param action -
1277            0: no action (by default)
1278               metadata is not used.
1279            1: Classified IP packets will be looked up from the
1280               specified ipv4 fib table (configured by metadata as VRF id).
1281               Only valid for L3 input ACL node
1282            2: Classified IP packets will be looked up from the
1283               specified ipv6 fib table (configured by metadata as VRF id).
1284               Only valid for L3 input ACL node
1285     @param metadata - valid only if action != 0
1286            VRF id if action is 1 or 2.
1287     @param match[] - for add, match value for session, required
1288 */
1289 define classify_add_del_session
1290 {
1291   u32 client_index;
1292   u32 context;
1293   u8 is_add;
1294   u32 table_index;
1295   u32 hit_next_index;
1296   u32 opaque_index;
1297   i32 advance;
1298   u8 action;
1299   u32 metadata;
1300   u8 match[0];
1301 };
1302
1303 /** \brief Classify add / del session response
1304     @param context - sender context, to match reply w/ request
1305     @param retval - return code for the add/del session request
1306 */
1307 define classify_add_del_session_reply
1308 {
1309   u32 context;
1310   i32 retval;
1311 };
1312
1313 /** \brief Set/unset the classification table for an interface request 
1314     @param client_index - opaque cookie to identify the sender
1315     @param context - sender context, to match reply w/ request
1316     @param is_ipv6 - ipv6 if non-zero, else ipv4
1317     @param sw_if_index - interface to associate with the table
1318     @param table_index - index of the table, if ~0 unset the table
1319 */
1320 define classify_set_interface_ip_table
1321 {
1322   u32 client_index;
1323   u32 context;
1324   u8 is_ipv6;
1325   u32 sw_if_index;
1326   u32 table_index;              /* ~0 => off */
1327 };
1328
1329 /** \brief Set/unset interface classification table response 
1330     @param context - sender context, to match reply w/ request
1331     @param retval - return code
1332 */
1333 define classify_set_interface_ip_table_reply
1334 {
1335   u32 context;
1336   i32 retval;
1337 };
1338
1339 /** \brief Set/unset l2 classification tables for an interface request
1340     @param client_index - opaque cookie to identify the sender
1341     @param context - sender context, to match reply w/ request
1342     @param sw_if_index - interface to set/unset tables for
1343     @param ip4_table_index - ip4 index, use ~0 for all 3 indexes to unset
1344     @param ip6_table_index - ip6 index
1345     @param other_table_index - other index
1346 */
1347 define classify_set_interface_l2_tables
1348 {
1349   u32 client_index;
1350   u32 context;
1351   u32 sw_if_index;
1352   /* 3 x ~0 => off */
1353   u32 ip4_table_index;
1354   u32 ip6_table_index;
1355   u32 other_table_index;
1356   u8 is_input;
1357 };
1358
1359 /** \brief Set/unset l2 classification tables for an interface response
1360     @param context - sender context, to match reply w/ request
1361     @param retval - return code for the request
1362 */
1363 define classify_set_interface_l2_tables_reply
1364 {
1365   u32 context;
1366   i32 retval;
1367 };
1368
1369 /** \brief Get node index using name request
1370     @param client_index - opaque cookie to identify the sender
1371     @param context - sender context, to match reply w/ request
1372     @param node_name[] - name of the node
1373 */
1374 define get_node_index
1375 {
1376   u32 client_index;
1377   u32 context;
1378   u8 node_name[64];
1379 };
1380
1381 /** \brief Get node index using name request
1382     @param context - sender context, to match reply w/ request
1383     @param retval - return code for the request
1384     @param node_index - index of the desired node if found, else ~0
1385 */
1386 define get_node_index_reply
1387 {
1388   u32 context;
1389   i32 retval;
1390   u32 node_index;
1391 };
1392
1393 /** \brief Set the next node for a given node request
1394     @param client_index - opaque cookie to identify the sender
1395     @param context - sender context, to match reply w/ request
1396     @param node_name[] - node to add the next node to
1397     @param next_name[] - node to add as the next node
1398 */
1399 define add_node_next
1400 {
1401   u32 client_index;
1402   u32 context;
1403   u8 node_name[64];
1404   u8 next_name[64];
1405 };
1406
1407 /** \brief IP Set the next node for a given node response
1408     @param context - sender context, to match reply w/ request
1409     @param retval - return code for the add next node request
1410     @param next_index - the index of the next node if success, else ~0
1411 */
1412 define add_node_next_reply
1413 {
1414   u32 context;
1415   i32 retval;
1416   u32 next_index;
1417 };
1418
1419 /** \brief DHCP Proxy config 2 add / del request
1420     @param client_index - opaque cookie to identify the sender
1421     @param context - sender context, to match reply w/ request
1422     @param rx_vrf_id - receive vrf id
1423     @param server_vrf_id - server vrf id
1424     @param if_ipv6 - ipv6 if non-zero, else ipv4
1425     @param is_add - add the config if non-zero, else delete
1426     @param insert_circuit_id - option82 suboption 1 fib number
1427     @param dhcp_server[] - server address
1428     @param dhcp_src_address[] - <fix this, need details>
1429 */
1430 define dhcp_proxy_config_2
1431 {
1432   u32 client_index;
1433   u32 context;
1434   u32 rx_vrf_id;
1435   u32 server_vrf_id;
1436   u8 is_ipv6;
1437   u8 is_add;
1438   u8 insert_circuit_id;
1439   u8 dhcp_server[16];
1440   u8 dhcp_src_address[16];
1441 };
1442
1443 /** \brief DHCP Proxy config 2 add / del response
1444     @param context - sender context, to match reply w/ request
1445     @param retval - return code for request
1446 */
1447 define dhcp_proxy_config_2_reply
1448 {
1449   u32 context;
1450   i32 retval;
1451 };
1452
1453 /** \brief l2tpv3 tunnel interface create request
1454     @param client_index - opaque cookie to identify the sender
1455     @param context - sender context, to match reply w/ request
1456     @param client_address - remote client tunnel ip address
1457     @param client_address - local tunnel ip address
1458     @param is_ipv6 - ipv6 if non-zero, else ipv4
1459     @param local_session_id - local tunnel session id
1460     @param remote_session_id - remote tunnel session id
1461     @param local_cookie - local tunnel cookie
1462     @param l2_sublayer_present - l2 sublayer is present in packets if non-zero
1463     @param encap_vrf_id - fib identifier used for outgoing encapsulated packets
1464 */
1465 define l2tpv3_create_tunnel
1466 {
1467   u32 client_index;
1468   u32 context;
1469   u8 client_address[16];
1470   u8 our_address[16];
1471   u8 is_ipv6;
1472   u32 local_session_id;
1473   u32 remote_session_id;
1474   u64 local_cookie;
1475   u64 remote_cookie;
1476   u8 l2_sublayer_present;
1477   u32 encap_vrf_id;
1478 };
1479
1480 /** \brief l2tpv3 tunnel interface create response
1481     @param context - sender context, to match reply w/ request
1482     @param retval - return code for the request
1483     @param sw_if_index - index of the new tunnel interface
1484 */
1485 define l2tpv3_create_tunnel_reply
1486 {
1487   u32 context;
1488   i32 retval;
1489   u32 sw_if_index;
1490 };
1491
1492 define l2tpv3_set_tunnel_cookies
1493 {
1494   u32 client_index;
1495   u32 context;
1496   u32 sw_if_index;
1497   u64 new_local_cookie;
1498   u64 new_remote_cookie;
1499 };
1500
1501 /** \brief L2TP tunnel set cookies response
1502     @param context - sender context, to match reply w/ request
1503     @param retval - return code for the request
1504 */
1505 define l2tpv3_set_tunnel_cookies_reply
1506 {
1507   u32 context;
1508   i32 retval;
1509 };
1510
1511 define sw_if_l2tpv3_tunnel_details
1512 {
1513   u32 context;
1514   u32 sw_if_index;
1515   u8 interface_name[64];
1516   u8 client_address[16];
1517   u8 our_address[16];
1518   u32 local_session_id;
1519   u32 remote_session_id;
1520   u64 local_cookie[2];
1521   u64 remote_cookie;
1522   u8 l2_sublayer_present;
1523 };
1524
1525 define sw_if_l2tpv3_tunnel_dump
1526 {
1527   u32 client_index;
1528   u32 context;
1529 };
1530
1531 /** \brief L2 fib clear table request, clear all mac entries in the l2 fib
1532     @param client_index - opaque cookie to identify the sender
1533     @param context - sender context, to match reply w/ request
1534 */
1535 define l2_fib_clear_table
1536 {
1537   u32 client_index;
1538   u32 context;
1539 };
1540
1541 /** \brief L2 fib clear table response
1542     @param context - sender context, to match reply w/ request
1543     @param retval - return code for the request
1544 */
1545 define l2_fib_clear_table_reply
1546 {
1547   u32 context;
1548   i32 retval;
1549 };
1550
1551 /** \brief L2 interface ethernet flow point filtering enable/disable request
1552     @param client_index - opaque cookie to identify the sender
1553     @param context - sender context, to match reply w/ request
1554     @param sw_if_index - interface to enable/disable filtering on
1555     @param enable_disable - if non-zero enable filtering, else disable
1556 */
1557 define l2_interface_efp_filter
1558 {
1559   u32 client_index;
1560   u32 context;
1561   u32 sw_if_index;
1562   u32 enable_disable;
1563 };
1564
1565 /** \brief L2 interface ethernet flow point filtering response
1566     @param context - sender context, to match reply w/ request
1567     @param retval - return code for the request
1568 */
1569 define l2_interface_efp_filter_reply
1570 {
1571   u32 context;
1572   i32 retval;
1573 };
1574
1575 define l2tpv3_interface_enable_disable
1576 {
1577   u32 client_index;
1578   u32 context;
1579   u8 enable_disable;
1580   u32 sw_if_index;
1581 };
1582
1583 define l2tpv3_interface_enable_disable_reply
1584 {
1585   u32 context;
1586   i32 retval;
1587 };
1588
1589 define l2tpv3_set_lookup_key
1590 {
1591   u32 client_index;
1592   u32 context;
1593   /* 0 = ip6 src_address, 1 = ip6 dst_address, 2 = session_id */
1594   u8 key;
1595 };
1596
1597 define l2tpv3_set_lookup_key_reply
1598 {
1599   u32 context;
1600   i32 retval;
1601 };
1602
1603 define vxlan_add_del_tunnel
1604 {
1605   u32 client_index;
1606   u32 context;
1607   u8 is_add;
1608   u8 is_ipv6;
1609   u8 src_address[16];
1610   u8 dst_address[16];
1611   u32 mcast_sw_if_index;
1612   u32 encap_vrf_id;
1613   u32 decap_next_index;
1614   u32 vni;
1615 };
1616
1617 define vxlan_add_del_tunnel_reply
1618 {
1619   u32 context;
1620   i32 retval;
1621   u32 sw_if_index;
1622 };
1623
1624 define vxlan_tunnel_dump
1625 {
1626   u32 client_index;
1627   u32 context;
1628   u32 sw_if_index;
1629 };
1630
1631 define vxlan_tunnel_details
1632 {
1633   u32 context;
1634   u32 sw_if_index;
1635   u8 src_address[16];
1636   u8 dst_address[16];
1637   u32 mcast_sw_if_index;
1638   u32 encap_vrf_id;
1639   u32 decap_next_index;
1640   u32 vni;
1641   u8 is_ipv6;
1642 };
1643
1644 define gre_add_del_tunnel
1645 {
1646   u32 client_index;
1647   u32 context;
1648   u8 is_add;
1649   u8 is_ipv6;
1650   u8 teb;
1651   u8 src_address[16];
1652   u8 dst_address[16];
1653   u32 outer_fib_id;
1654 };
1655
1656 define gre_add_del_tunnel_reply
1657 {
1658   u32 context;
1659   i32 retval;
1660   u32 sw_if_index;
1661 };
1662
1663 define gre_tunnel_dump
1664 {
1665   u32 client_index;
1666   u32 context;
1667   u32 sw_if_index;
1668 };
1669
1670 define gre_tunnel_details
1671 {
1672   u32 context;
1673   u32 sw_if_index;
1674   u8 is_ipv6;
1675   u8 teb;
1676   u8 src_address[16];
1677   u8 dst_address[16];
1678   u32 outer_fib_id;
1679 };
1680
1681 /** \brief L2 interface vlan tag rewrite configure request
1682     @param client_index - opaque cookie to identify the sender
1683     @param context - sender context, to match reply w/ request
1684     @param sw_if_index - interface the operation is applied to
1685     @param vtr_op - Choose from l2_vtr_op_t enum values
1686     @param push_dot1q - first pushed flag dot1q id set, else dot1ad
1687     @param tag1 - Needed for any push or translate vtr op
1688     @param tag2 - Needed for any push 2 or translate x-2 vtr ops
1689 */
1690 define l2_interface_vlan_tag_rewrite
1691 {
1692   u32 client_index;
1693   u32 context;
1694   u32 sw_if_index;
1695   u32 vtr_op;
1696   u32 push_dot1q;               // ethertype of first pushed tag is dot1q/dot1ad
1697   u32 tag1;                     // first pushed tag
1698   u32 tag2;                     // second pushed tag
1699 };
1700
1701 /** \brief L2 interface vlan tag rewrite response
1702     @param context - sender context, to match reply w/ request
1703     @param retval - return code for the request
1704 */
1705 define l2_interface_vlan_tag_rewrite_reply
1706 {
1707   u32 context;
1708   i32 retval;
1709 };
1710
1711 /** \brief vhost-user interface create request
1712     @param client_index - opaque cookie to identify the sender
1713     @param is_server - our side is socket server
1714     @param sock_filename - unix socket filename, used to speak with frontend
1715     @param use_custom_mac - enable or disable the use of the provided hardware address
1716     @param mac_address - hardware address to use if 'use_custom_mac' is set
1717 */
1718 define create_vhost_user_if
1719 {
1720   u32 client_index;
1721   u32 context;
1722   u8 is_server;
1723   u8 sock_filename[256];
1724   u8 renumber;
1725   u32 custom_dev_instance;
1726   u8 use_custom_mac;
1727   u8 mac_address[6];
1728   u8 tag[64];
1729 };
1730
1731 /** \brief vhost-user interface create response
1732     @param context - sender context, to match reply w/ request
1733     @param retval - return code for the request
1734     @param sw_if_index - interface the operation is applied to
1735 */
1736 define create_vhost_user_if_reply
1737 {
1738   u32 context;
1739   i32 retval;
1740   u32 sw_if_index;
1741 };
1742
1743 /** \brief vhost-user interface modify request
1744     @param client_index - opaque cookie to identify the sender
1745     @param is_server - our side is socket server
1746     @param sock_filename - unix socket filename, used to speak with frontend
1747 */
1748 define modify_vhost_user_if
1749 {
1750   u32 client_index;
1751   u32 context;
1752   u32 sw_if_index;
1753   u8 is_server;
1754   u8 sock_filename[256];
1755   u8 renumber;
1756   u32 custom_dev_instance;
1757 };
1758
1759 /** \brief vhost-user interface modify response
1760     @param context - sender context, to match reply w/ request
1761     @param retval - return code for the request
1762 */
1763 define modify_vhost_user_if_reply
1764 {
1765   u32 context;
1766   i32 retval;
1767 };
1768
1769 /** \brief vhost-user interface delete request
1770     @param client_index - opaque cookie to identify the sender
1771 */
1772 define delete_vhost_user_if
1773 {
1774   u32 client_index;
1775   u32 context;
1776   u32 sw_if_index;
1777 };
1778
1779 /** \brief vhost-user interface delete response
1780     @param context - sender context, to match reply w/ request
1781     @param retval - return code for the request
1782 */
1783 define delete_vhost_user_if_reply
1784 {
1785   u32 context;
1786   i32 retval;
1787 };
1788
1789 define create_subif
1790 {
1791   u32 client_index;
1792   u32 context;
1793   u32 sw_if_index;
1794   u32 sub_id;
1795
1796   /* These fields map directly onto the subif template */
1797   u8 no_tags;
1798   u8 one_tag;
1799   u8 two_tags;
1800   u8 dot1ad;                    // 0 = dot1q, 1=dot1ad
1801   u8 exact_match;
1802   u8 default_sub;
1803   u8 outer_vlan_id_any;
1804   u8 inner_vlan_id_any;
1805   u16 outer_vlan_id;
1806   u16 inner_vlan_id;
1807 };
1808
1809 define create_subif_reply
1810 {
1811   u32 context;
1812   i32 retval;
1813   u32 sw_if_index;
1814 };
1815
1816 /** \brief show version
1817     @param client_index - opaque cookie to identify the sender
1818     @param context - sender context, to match reply w/ request
1819 */
1820 define show_version
1821 {
1822   u32 client_index;
1823   u32 context;
1824 };
1825
1826 /** \brief show version response
1827     @param context - sender context, to match reply w/ request
1828     @param retval - return code for the request
1829     @param program - name of the program (vpe)
1830     @param version  - version of the program
1831     @param build_directory - root of the workspace where the program was built
1832 */
1833 define show_version_reply
1834 {
1835   u32 context;
1836   i32 retval;
1837   u8 program[32];
1838   u8 version[32];
1839   u8 build_date[32];
1840   u8 build_directory[256];
1841 };
1842
1843 /** \brief Vhost-user interface details structure (fix this)
1844     @param sw_if_index - index of the interface
1845     @param interface_name - name of interface
1846     @param virtio_net_hdr_sz - net header size
1847     @param features - interface features
1848     @param is_server - vhost-user server socket
1849     @param sock_filename - socket filename
1850     @param num_regions - number of used memory regions
1851 */
1852 define sw_interface_vhost_user_details
1853 {
1854   u32 context;
1855   u32 sw_if_index;
1856   u8 interface_name[64];
1857   u32 virtio_net_hdr_sz;
1858   u64 features;
1859   u8 is_server;
1860   u8 sock_filename[256];
1861   u32 num_regions;
1862   i32 sock_errno;
1863 };
1864
1865 /* works */
1866 define sw_interface_vhost_user_dump
1867 {
1868   u32 client_index;
1869   u32 context;
1870 };
1871
1872 /** \brief l2 fib table entry structure
1873     @param bd_id - the l2 fib / bridge domain table id
1874     @param mac - the entry's mac address
1875     @param sw_if_index - index of the interface
1876     @param static_mac - the entry is statically configured.
1877     @param filter_mac - the entry is a mac filter entry.
1878     @param bvi_mac - the mac address is a bridge virtual interface
1879 */
1880 define l2_fib_table_entry
1881 {
1882   u32 context;
1883   u32 bd_id;
1884   u64 mac;
1885   u32 sw_if_index;
1886   u8 static_mac;
1887   u8 filter_mac;
1888   u8 bvi_mac;
1889 };
1890
1891 /** \brief Dump l2 fib (aka bridge domain) table
1892     @param client_index - opaque cookie to identify the sender
1893     @param bd_id - the l2 fib / bridge domain table identifier
1894 */
1895 define l2_fib_table_dump
1896 {
1897   u32 client_index;
1898   u32 context;
1899   u32 bd_id;
1900 };
1901
1902 define vxlan_gpe_add_del_tunnel
1903 {
1904   u32 client_index;
1905   u32 context;
1906   u8 is_ipv6;
1907   u8 local[16];
1908   u8 remote[16];
1909   u32 encap_vrf_id;
1910   u32 decap_vrf_id;
1911   u8 protocol;
1912   u32 vni;
1913   u8 is_add;
1914 };
1915
1916 define vxlan_gpe_add_del_tunnel_reply
1917 {
1918   u32 context;
1919   i32 retval;
1920   u32 sw_if_index;
1921 };
1922
1923 define vxlan_gpe_tunnel_dump
1924 {
1925   u32 client_index;
1926   u32 context;
1927   u32 sw_if_index;
1928 };
1929
1930 define vxlan_gpe_tunnel_details
1931 {
1932   u32 context;
1933   u32 sw_if_index;
1934   u8 local[16];
1935   u8 remote[16];
1936   u32 vni;
1937   u8 protocol;
1938   u32 encap_vrf_id;
1939   u32 decap_vrf_id;
1940   u8 is_ipv6;
1941 };
1942
1943 /** \brief add or delete locator_set
1944     @param client_index - opaque cookie to identify the sender
1945     @param context - sender context, to match reply w/ request
1946     @param is_add - add address if non-zero, else delete
1947     @param locator_set_name - locator name
1948     @param locator_num - number of locators
1949     @param locators - LISP locator records
1950         Structure of one locator record is as follows:
1951
1952         define locator_t {
1953           u32 sw_if_index;
1954           u8 priority;
1955           u8 weight;
1956         }
1957 */
1958 define lisp_add_del_locator_set
1959 {
1960   u32 client_index;
1961   u32 context;
1962   u8 is_add;
1963   u8 locator_set_name[64];
1964   u32 locator_num;
1965   u8 locators[0];
1966 };
1967
1968 /** \brief Reply for locator_set add/del
1969     @param context - returned sender context, to match reply w/ request
1970     @param retval - return code
1971     @param ls_index - locator set index
1972 */
1973 define lisp_add_del_locator_set_reply
1974 {
1975   u32 context;
1976   i32 retval;
1977   u32 ls_index;
1978 };
1979
1980 /** \brief add or delete locator for locator_set
1981     @param client_index - opaque cookie to identify the sender
1982     @param context - sender context, to match reply w/ request
1983     @param is_add - add address if non-zero, else delete
1984     @param locator_set_name - name of locator_set to add/del locator
1985     @param sw_if_index - index of the interface
1986     @param priority - priority of the lisp locator
1987     @param weight - weight of the lisp locator
1988 */
1989 define lisp_add_del_locator
1990 {
1991   u32 client_index;
1992   u32 context;
1993   u8 is_add;
1994   u8 locator_set_name[64];
1995   u32 sw_if_index;
1996   u8 priority;
1997   u8 weight;
1998 };
1999
2000 /** \brief Reply for locator add/del
2001     @param context - returned sender context, to match reply w/ request
2002     @param retval - return code
2003 */
2004 define lisp_add_del_locator_reply
2005 {
2006   u32 context;
2007   i32 retval;
2008 };
2009
2010 /** \brief add or delete lisp eid-table
2011     @param client_index - opaque cookie to identify the sender
2012     @param context - sender context, to match reply w/ request
2013     @param is_add - add address if non-zero, else delete
2014     @param eid_type:
2015       0 : ipv4
2016       1 : ipv6
2017       2 : mac
2018     @param eid - EID can be ip4, ip6 or mac
2019     @param prefix_len - prefix len
2020     @param locator_set_name - name of locator_set to add/del eid-table
2021     @param vni - virtual network instance
2022     @param key_id
2023       HMAC_NO_KEY           0
2024       HMAC_SHA_1_96         1
2025       HMAC_SHA_256_128      2
2026     @param key - secret key
2027 */
2028 define lisp_add_del_local_eid
2029 {
2030   u32 client_index;
2031   u32 context;
2032   u8 is_add;
2033   u8 eid_type;
2034   u8 eid[16];
2035   u8 prefix_len;
2036   u8 locator_set_name[64];
2037   u32 vni;
2038   u16 key_id;
2039   u8 key[64];
2040 };
2041
2042 /** \brief Reply for local_eid add/del
2043     @param context - returned sender context, to match reply w/ request
2044     @param retval - return code
2045 */
2046 define lisp_add_del_local_eid_reply
2047 {
2048   u32 context;
2049   i32 retval;
2050 };
2051
2052 /** \brief add or delete lisp gpe tunnel
2053     @param client_index - opaque cookie to identify the sender
2054     @param context - sender context, to match reply w/ request
2055     @param is_add - add address if non-zero, else delete
2056     @param eid_type -
2057       0 : ipv4
2058       1 : ipv6
2059       2 : mac
2060     @param rmt_eid - remote eid
2061     @param lcl_eid - local eid
2062     @param rmt_len - remote prefix len
2063     @param lcl_len - local prefix len
2064     @param vni - virtual network identifier
2065     @param dp_table - vrf/bridge domain id
2066     @param loc_num - number of locators
2067     @param lcl_locs - array of local locators
2068     @param rmt_locs - array of remote locators
2069     @param action - negative action when 0 locators configured
2070 */
2071 define lisp_gpe_add_del_fwd_entry
2072 {
2073   u32 client_index;
2074   u32 context;
2075   u8 is_add;
2076   u8 eid_type;
2077   u8 rmt_eid[16];
2078   u8 lcl_eid[16];
2079   u8 rmt_len;
2080   u8 lcl_len;
2081   u32 vni;
2082   u32 dp_table;
2083   u32 loc_num;
2084   u8 lcl_locs[loc_num];
2085   u8 rmt_locs[loc_num];
2086   u8 action;
2087 };
2088
2089 /** \brief Reply for gpe_fwd_entry add/del
2090     @param context - returned sender context, to match reply w/ request
2091     @param retval - return code
2092 */
2093 define lisp_gpe_add_del_fwd_entry_reply
2094 {
2095   u32 context;
2096   i32 retval;
2097 };
2098
2099 /** \brief Add/delete map server
2100     @param client_index - opaque cookie to identify the sender
2101     @param context - sender context, to match reply w/ request
2102     @param is_add - add address if non-zero; delete otherwise
2103     @param is_ipv6 - if non-zero the address is ipv6, else ipv4
2104     @param ip_address - map server IP address
2105 */
2106 define lisp_add_del_map_server
2107 {
2108   u32 client_index;
2109   u32 context;
2110   u8 is_add;
2111   u8 is_ipv6;
2112   u8 ip_address[16];
2113 };
2114
2115 /** \brief Reply for lisp_add_del_map_server
2116     @param context - returned sender context, to match reply w/ request
2117     @param retval - return code
2118 */
2119 define lisp_add_del_map_server_reply
2120 {
2121   u32 context;
2122   i32 retval;
2123 };
2124
2125 /** \brief add or delete map-resolver
2126     @param client_index - opaque cookie to identify the sender
2127     @param context - sender context, to match reply w/ request
2128     @param is_add - add address if non-zero, else delete
2129     @param is_ipv6 - if non-zero the address is ipv6, else ipv4
2130     @param ip_address - array of address bytes
2131 */
2132 define lisp_add_del_map_resolver
2133 {
2134   u32 client_index;
2135   u32 context;
2136   u8 is_add;
2137   u8 is_ipv6;
2138   u8 ip_address[16];
2139 };
2140
2141 /** \brief Reply for map_resolver add/del
2142     @param context - returned sender context, to match reply w/ request
2143     @param retval - return code
2144 */
2145 define lisp_add_del_map_resolver_reply
2146 {
2147   u32 context;
2148   i32 retval;
2149 };
2150
2151 /** \brief enable or disable lisp-gpe protocol
2152     @param client_index - opaque cookie to identify the sender
2153     @param context - sender context, to match reply w/ request
2154     @param is_en - enable protocol if non-zero, else disable
2155 */
2156 define lisp_gpe_enable_disable
2157 {
2158   u32 client_index;
2159   u32 context;
2160   u8 is_en;
2161 };
2162
2163 /** \brief Reply for gpe enable/disable
2164     @param context - returned sender context, to match reply w/ request
2165     @param retval - return code
2166 */
2167 define lisp_gpe_enable_disable_reply
2168 {
2169   u32 context;
2170   i32 retval;
2171 };
2172
2173 /** \brief enable or disable LISP feature
2174     @param client_index - opaque cookie to identify the sender
2175     @param context - sender context, to match reply w/ request
2176     @param is_en - enable protocol if non-zero, else disable
2177 */
2178 define lisp_enable_disable
2179 {
2180   u32 client_index;
2181   u32 context;
2182   u8 is_en;
2183 };
2184
2185 /** \brief Reply for gpe enable/disable
2186     @param context - returned sender context, to match reply w/ request
2187     @param retval - return code
2188 */
2189 define lisp_enable_disable_reply
2190 {
2191   u32 context;
2192   i32 retval;
2193 };
2194
2195 /** \brief add or delete gpe_iface
2196     @param client_index - opaque cookie to identify the sender
2197     @param context - sender context, to match reply w/ request
2198     @param is_add - add address if non-zero, else delete
2199 */
2200 define lisp_gpe_add_del_iface
2201 {
2202   u32 client_index;
2203   u32 context;
2204   u8 is_add;
2205   u8 is_l2;
2206   u32 dp_table;
2207   u32 vni;
2208 };
2209
2210 /** \brief Reply for gpe_iface add/del
2211     @param context - returned sender context, to match reply w/ request
2212     @param retval - return code
2213 */
2214 define lisp_gpe_add_del_iface_reply
2215 {
2216   u32 context;
2217   i32 retval;
2218 };
2219
2220 /** \brief configure or disable LISP PITR node
2221     @param client_index - opaque cookie to identify the sender
2222     @param context - sender context, to match reply w/ request
2223     @param ls_name - locator set name
2224     @param is_add - add locator set if non-zero, else disable pitr
2225 */
2226 define lisp_pitr_set_locator_set
2227 {
2228   u32 client_index;
2229   u32 context;
2230   u8 is_add;
2231   u8 ls_name[64];
2232 };
2233
2234 /** \brief Reply for lisp_pitr_set_locator_set
2235     @param context - returned sender context, to match reply w/ request
2236     @param retval - return code
2237 */
2238 define lisp_pitr_set_locator_set_reply
2239 {
2240   u32 context;
2241   i32 retval;
2242 };
2243
2244 /** \brief Get state of LISP RLOC probing
2245     @param client_index - opaque cookie to identify the sender
2246     @param context - sender context, to match reply w/ request
2247 */
2248 define show_lisp_rloc_probe_state
2249 {
2250   u32 client_index;
2251   u32 context;
2252 };
2253
2254 /** \brief Reply for show_lisp_rloc_probe_state
2255     @param context - returned sender context, to match reply w/ request
2256     @param retval - return code
2257     @param is_enabled - state of RLOC probing
2258 */
2259 define show_lisp_rloc_probe_state_reply
2260 {
2261   u32 context;
2262   i32 retval;
2263   u8 is_enabled;
2264 };
2265
2266 /** \brief enable/disable LISP RLOC probing
2267     @param client_index - opaque cookie to identify the sender
2268     @param context - sender context, to match reply w/ request
2269     @param is_enable - enable if non-zero; disable otherwise
2270 */
2271 define lisp_rloc_probe_enable_disable
2272 {
2273   u32 client_index;
2274   u32 context;
2275   u8 is_enabled;
2276 };
2277
2278 /** \brief Reply for lisp_rloc_probe_enable_disable
2279     @param context - returned sender context, to match reply w/ request
2280     @param retval - return code
2281 */
2282 define lisp_rloc_probe_enable_disable_reply
2283 {
2284   u32 context;
2285   i32 retval;
2286 };
2287
2288 /** \brief enable/disable LISP map-register
2289     @param client_index - opaque cookie to identify the sender
2290     @param context - sender context, to match reply w/ request
2291     @param is_enable - enable if non-zero; disable otherwise
2292 */
2293 define lisp_map_register_enable_disable
2294 {
2295   u32 client_index;
2296   u32 context;
2297   u8 is_enabled;
2298 };
2299
2300 /** \brief Reply for lisp_map_register_enable_disable
2301     @param context - returned sender context, to match reply w/ request
2302     @param retval - return code
2303 */
2304 define lisp_map_register_enable_disable_reply
2305 {
2306   u32 context;
2307   i32 retval;
2308 };
2309
2310 /** \brief Get state of LISP map-register
2311     @param client_index - opaque cookie to identify the sender
2312     @param context - sender context, to match reply w/ request
2313 */
2314 define show_lisp_map_register_state
2315 {
2316   u32 client_index;
2317   u32 context;
2318 };
2319
2320 /** \brief Reply for show_lisp_map_register_state
2321     @param context - returned sender context, to match reply w/ request
2322     @param retval - return code
2323 */
2324 define show_lisp_map_register_state_reply
2325 {
2326   u32 context;
2327   i32 retval;
2328   u8 is_enabled;
2329 };
2330
2331 /** \brief set LISP map-request mode. Based on configuration VPP will send
2332       src/dest or just normal destination map requests.
2333     @param client_index - opaque cookie to identify the sender
2334     @param context - sender context, to match reply w/ request
2335     @param mode - new map-request mode. Supported values are:
2336       0 - destination only
2337       1 - source/destaination
2338 */
2339 define lisp_map_request_mode
2340 {
2341   u32 client_index;
2342   u32 context;
2343   u8 mode;
2344 };
2345
2346 /** \brief Reply for lisp_map_request_mode
2347     @param context - returned sender context, to match reply w/ request
2348     @param retval - return code
2349 */
2350 define lisp_map_request_mode_reply
2351 {
2352   u32 context;
2353   i32 retval;
2354 };
2355
2356 /** \brief Request for LISP map-request mode
2357     @param client_index - opaque cookie to identify the sender
2358     @param context - sender context, to match reply w/ request
2359 */
2360 define show_lisp_map_request_mode
2361 {
2362   u32 client_index;
2363   u32 context;
2364 };
2365
2366 /** \brief Reply for show_lisp_map_request_mode
2367     @param context - returned sender context, to match reply w/ request
2368     @param retval - return code
2369     @param mode - map-request mode
2370 */
2371 define show_lisp_map_request_mode_reply
2372 {
2373   u32 context;
2374   i32 retval;
2375   u8 mode;
2376 };
2377
2378 /** \brief add or delete remote static mapping
2379     @param client_index - opaque cookie to identify the sender
2380     @param context - sender context, to match reply w/ request
2381     @param is_add - add address if non-zero, else delete
2382     @param is_src_dst - flag indicating src/dst based routing policy
2383     @param del_all - if set, delete all remote mappings
2384     @param vni - virtual network instance
2385     @param action - negative map-reply action
2386     @param eid_type -
2387       0 : ipv4
2388       1 : ipv6
2389       2 : mac
2390     @param deid - dst EID
2391     @param seid - src EID, valid only if is_src_dst is enabled
2392     @param rloc_num - number of remote locators
2393     @param rlocs - remote locator records
2394         Structure of remote locator:
2395
2396         define rloc_t {
2397           u8 is_ip4;
2398           u8 priority;
2399           u8 weight;
2400           u8 addr[16];
2401         }
2402 */
2403 define lisp_add_del_remote_mapping
2404 {
2405   u32 client_index;
2406   u32 context;
2407   u8 is_add;
2408   u8 is_src_dst;
2409   u8 del_all;
2410   u32 vni;
2411   u8 action;
2412   u8 eid_type;
2413   u8 eid[16];
2414   u8 eid_len;
2415   u8 seid[16];
2416   u8 seid_len;
2417   u32 rloc_num;
2418   u8 rlocs[0];
2419 };
2420
2421 /** \brief Reply for lisp_add_del_remote_mapping
2422     @param context - returned sender context, to match reply w/ request
2423     @param retval - return code
2424 */
2425 define lisp_add_del_remote_mapping_reply
2426 {
2427   u32 context;
2428   i32 retval;
2429 };
2430
2431 /** \brief add or delete LISP adjacency adjacency
2432     @param client_index - opaque cookie to identify the sender
2433     @param context - sender context, to match reply w/ request
2434     @param is_add - add address if non-zero, else delete
2435     @param vni - virtual network instance
2436     @param eid_type -
2437       0 : ipv4
2438       1 : ipv6
2439       2 : mac
2440     @param reid - remote EID
2441     @param leid - local EID
2442 */
2443 define lisp_add_del_adjacency
2444 {
2445   u32 client_index;
2446   u32 context;
2447   u8 is_add;
2448   u32 vni;
2449   u8 eid_type;
2450   u8 reid[16];
2451   u8 leid[16];
2452   u8 reid_len;
2453   u8 leid_len;
2454 };
2455
2456 /** \brief Reply for lisp_add_del_adjacency
2457     @param context - returned sender context, to match reply w/ request
2458     @param retval - return code
2459 */
2460 define lisp_add_del_adjacency_reply
2461 {
2462   u32 context;
2463   i32 retval;
2464 };
2465
2466 /** \brief add or delete map request itr rlocs
2467     @param client_index - opaque cookie to identify the sender
2468     @param context - sender context, to match reply w/ request
2469     @param is_add - add address if non-zero, else delete
2470     @param locator_set_name - locator set name
2471 */
2472 define lisp_add_del_map_request_itr_rlocs
2473 {
2474   u32 client_index;
2475   u32 context;
2476   u8 is_add;
2477   u8 locator_set_name[64];
2478 };
2479
2480 /** \brief Reply for lisp_add_del_map_request_itr_rlocs
2481     @param context - returned sender context, to match reply w/ request
2482     @param retval - return code
2483 */
2484
2485 define lisp_add_del_map_request_itr_rlocs_reply
2486 {
2487   u32 context;
2488   i32 retval;
2489 };
2490
2491 /** \brief map/unmap vni/bd_index to vrf
2492     @param client_index - opaque cookie to identify the sender
2493     @param context - sender context, to match reply w/ request
2494     @param is_add - add or delete mapping
2495     @param dp_table - virtual network id/bridge domain index
2496     @param vrf - vrf
2497 */
2498 define lisp_eid_table_add_del_map
2499 {
2500   u32 client_index;
2501   u32 context;
2502   u8 is_add;
2503   u32 vni;
2504   u32 dp_table;
2505   u8 is_l2;
2506 };
2507
2508 /** \brief Reply for lisp_eid_table_add_del_map
2509     @param context - returned sender context, to match reply w/ request
2510     @param retval - return code
2511 */
2512 define lisp_eid_table_add_del_map_reply
2513 {
2514   u32 context;
2515   i32 retval;
2516 };
2517
2518 /** \brief Request for map lisp locator status
2519     @param client_index - opaque cookie to identify the sender
2520     @param context - sender context, to match reply w/ request
2521     @param locator_set_index - index of locator_set
2522     @param ls_name - locator set name
2523     @param is_index_set - flag indicating whether ls_name or ls_index is set
2524  */
2525 define lisp_locator_dump
2526 {
2527   u32 client_index;
2528   u32 context;
2529   u32 ls_index;
2530   u8 ls_name[64];
2531   u8 is_index_set;
2532 };
2533
2534 /** \brief LISP locator_set status
2535     @param local - if is set, then locator is local
2536     @param locator_set_name - name of the locator_set
2537     @param sw_if_index - sw_if_index of the locator
2538     @param priority - locator priority
2539     @param weight - locator weight
2540   */
2541 define lisp_locator_details
2542 {
2543   u32 context;
2544   u8 local;
2545   u32 sw_if_index;
2546   u8 is_ipv6;
2547   u8 ip_address[16];
2548   u8 priority;
2549   u8 weight;
2550 };
2551
2552 /** \brief LISP locator_set status
2553     @param context - sender context, to match reply w/ request
2554     @param ls_index - locator set index
2555     @param ls_name - name of the locator set
2556  */
2557 define lisp_locator_set_details
2558 {
2559   u32 context;
2560   u32 ls_index;
2561   u8 ls_name[64];
2562 };
2563
2564 /** \brief Request for locator_set summary status
2565     @param client_index - opaque cookie to identify the sender
2566     @param context - sender context, to match reply w/ request
2567     @param filter - filter type
2568       Supported values:
2569         0: all locator sets
2570         1: local locator sets
2571         2: remote locator sets
2572  */
2573 define lisp_locator_set_dump
2574 {
2575   u32 client_index;
2576   u32 context;
2577   u8 filter;
2578 };
2579
2580 /** \brief Dump lisp eid-table
2581     @param client_index - opaque cookie to identify the sender
2582     @param context - sender context, to match reply w/ request
2583     @param locator_set_index - index of locator_set, if ~0 then the mapping
2584                                 is negative
2585     @param action - negative map request action
2586     @param is_local - local if non-zero, else remote
2587     @param eid_type:
2588       0 : ipv4
2589       1 : ipv6
2590       2 : mac
2591     @param is_src_dst - EID is type of source/destination
2592     @param eid - EID can be ip4, ip6 or mac
2593     @param eid_prefix_len - prefix length
2594     @param seid - source EID can be ip4, ip6 or mac
2595     @param seid_prefix_len - source prefix length
2596     @param vni - virtual network instance
2597     @param ttl - time to live
2598     @param authoritative - authoritative
2599     @param key_id
2600       HMAC_NO_KEY           0
2601       HMAC_SHA_1_96         1
2602       HMAC_SHA_256_128      2
2603     @param key - secret key
2604 */
2605
2606 define lisp_eid_table_details
2607 {
2608   u32 context;
2609   u32 locator_set_index;
2610   u8 action;
2611   u8 is_local;
2612   u8 eid_type;
2613   u8 is_src_dst;
2614   u32 vni;
2615   u8 eid[16];
2616   u8 eid_prefix_len;
2617   u8 seid[16];
2618   u8 seid_prefix_len;
2619   u32 ttl;
2620   u8 authoritative;
2621   u16 key_id;
2622   u8 key[64];
2623 };
2624
2625 /** \brief Request for eid table summary status
2626     @param client_index - opaque cookie to identify the sender
2627     @param context - sender context, to match reply w/ request
2628     @param eid_set - if non-zero request info about specific mapping
2629     @param vni - virtual network instance; valid only if eid_set != 0
2630     @param prefix_length - prefix length if EID is IP address;
2631       valid only if eid_set != 0
2632     @param eid_type - EID type; valid only if eid_set != 0
2633       Supported values:
2634         0: EID is IPv4
2635         1: EID is IPv6
2636         2: EID is ethernet address
2637     @param eid - endpoint identifier
2638     @param filter - filter type;
2639       Support values:
2640         0: all eid
2641         1: local eid
2642         2: remote eid
2643  */
2644 define lisp_eid_table_dump
2645 {
2646   u32 client_index;
2647   u32 context;
2648   u8 eid_set;
2649   u8 prefix_length;
2650   u32 vni;
2651   u8 eid_type;
2652   u8 eid[16];
2653   u8 filter;
2654 };
2655
2656 /** \brief LISP adjacency
2657     @param eid_type -
2658       0 : ipv4
2659       1 : ipv6
2660       2 : mac
2661     @param reid - remote EID
2662     @param leid - local EID
2663     @param reid_prefix_len - remote EID IP prefix length
2664     @param leid_prefix_len - local EID IP prefix length
2665   */
2666 typeonly manual_print manual_endian define lisp_adjacency
2667 {
2668   u8 eid_type;
2669   u8 reid[16];
2670   u8 leid[16];
2671   u8 reid_prefix_len;
2672   u8 leid_prefix_len;
2673 };
2674
2675 /** \brief LISP adjacency reply
2676     @param count - number of adjacencies
2677     @param adjacencies - array of adjacencies
2678   */
2679 manual_endian manual_print define lisp_adjacencies_get_reply
2680 {
2681   u32 context;
2682   i32 retval;
2683   u32 count;
2684   vl_api_lisp_adjacency_t adjacencies[count];
2685 };
2686
2687 /** \brief Request for LISP adjacencies
2688     @param client_index - opaque cookie to identify the sender
2689     @param context - sender context, to match reply w/ request
2690     @param vni - filter adjacencies by VNI
2691  */
2692 define lisp_adjacencies_get
2693 {
2694   u32 client_index;
2695   u32 context;
2696   u32 vni;
2697 };
2698
2699 /** \brief Shows relationship between vni and vrf/bd
2700     @param dp_table - VRF index or bridge domain index
2701     @param vni - vitual network instance
2702   */
2703 define lisp_eid_table_map_details
2704 {
2705   u32 context;
2706   u32 vni;
2707   u32 dp_table;
2708 };
2709
2710 /** \brief Request for lisp_eid_table_map_details
2711     @param client_index - opaque cookie to identify the sender
2712     @param context - sender context, to match reply w/ request
2713     @param is_l2 - if set dump vni/bd mappings else vni/vrf
2714  */
2715 define lisp_eid_table_map_dump
2716 {
2717   u32 client_index;
2718   u32 context;
2719   u8 is_l2;
2720 };
2721
2722 /** \brief Dumps all VNIs used in mappings
2723     @param client_index - opaque cookie to identify the sender
2724     @param context - sender context, to match reply w/ request
2725   */
2726 define lisp_eid_table_vni_dump
2727 {
2728   u32 client_index;
2729   u32 context;
2730 };
2731
2732 /** \brief reply to lisp_eid_table_vni_dump
2733     @param client_index - opaque cookie to identify the sender
2734     @param context - sender context, to match reply w/ request
2735     @param vni - virtual network instance
2736  */
2737 define lisp_eid_table_vni_details
2738 {
2739   u32 client_index;
2740   u32 context;
2741   u32 vni;
2742 };
2743
2744 define lisp_gpe_tunnel_details
2745 {
2746   u32 context;
2747   u32 tunnels;
2748   u8 is_ipv6;
2749   u8 source_ip[16];
2750   u8 destination_ip[16];
2751   u32 encap_fib_id;
2752   u32 decap_fib_id;
2753   u32 dcap_next;
2754   u8 lisp_ver;
2755   u8 next_protocol;
2756   u8 flags;
2757   u8 ver_res;
2758   u8 res;
2759   u32 iid;
2760 };
2761
2762 /** \brief Request for gpe tunnel summary status
2763     @param client_index - opaque cookie to identify the sender
2764     @param context - sender context, to match reply w/ request
2765  */
2766 define lisp_gpe_tunnel_dump
2767 {
2768   u32 client_index;
2769   u32 context;
2770 };
2771
2772 /** \brief LISP map resolver status
2773     @param is_ipv6 - if non-zero the address is ipv6, else ipv4
2774     @param ip_address - array of address bytes
2775  */
2776 define lisp_map_resolver_details
2777 {
2778   u32 context;
2779   u8 is_ipv6;
2780   u8 ip_address[16];
2781 };
2782
2783 /** \brief Request for map resolver summary status
2784     @param client_index - opaque cookie to identify the sender
2785     @param context - sender context, to match reply w/ request
2786  */
2787 define lisp_map_resolver_dump
2788 {
2789   u32 client_index;
2790   u32 context;
2791 };
2792
2793 /** \brief LISP map server details
2794     @param is_ipv6 - if non-zero the address is ipv6, else ipv4
2795     @param ip_address - array of address bytes
2796  */
2797 define lisp_map_server_details
2798 {
2799   u32 context;
2800   u8 is_ipv6;
2801   u8 ip_address[16];
2802 };
2803
2804 /** \brief Request for map server summary status
2805     @param client_index - opaque cookie to identify the sender
2806     @param context - sender context, to match reply w/ request
2807  */
2808 define lisp_map_server_dump
2809 {
2810   u32 client_index;
2811   u32 context;
2812 };
2813
2814 /** \brief Request for lisp-gpe protocol status
2815     @param client_index - opaque cookie to identify the sender
2816     @param context - sender context, to match reply w/ request
2817 */
2818 define show_lisp_status
2819 {
2820   u32 client_index;
2821   u32 context;
2822 };
2823
2824 /** \brief Status of lisp, enable or disable
2825     @param context - sender context, to match reply w/ request
2826     @param feature_status - lisp enable if non-zero, else disable
2827     @param gpe_status - lisp enable if non-zero, else disable
2828 */
2829 define show_lisp_status_reply
2830 {
2831   u32 context;
2832   i32 retval;
2833   u8 feature_status;
2834   u8 gpe_status;
2835 };
2836
2837 /** \brief Get LISP map request itr rlocs status
2838     @param context - sender context, to match reply w/ request
2839     @param locator_set_name - name of the locator_set
2840  */
2841 define lisp_get_map_request_itr_rlocs
2842 {
2843   u32 client_index;
2844   u32 context;
2845 };
2846
2847 /** \brief Request for map request itr rlocs summary status
2848  */
2849 define lisp_get_map_request_itr_rlocs_reply
2850 {
2851   u32 context;
2852   i32 retval;
2853   u8 locator_set_name[64];
2854 };
2855
2856 /** \brief Request for lisp pitr status
2857     @param client_index - opaque cookie to identify the sender
2858     @param context - sender context, to match reply w/ request
2859 */
2860 define show_lisp_pitr
2861 {
2862   u32 client_index;
2863   u32 context;
2864 };
2865
2866 /** \brief Status of lisp pitr, enable or disable
2867     @param context - sender context, to match reply w/ request
2868     @param status - lisp pitr enable if non-zero, else disable
2869     @param locator_set_name -  name of the locator_set
2870 */
2871 define show_lisp_pitr_reply
2872 {
2873   u32 context;
2874   i32 retval;
2875   u8 status;
2876   u8 locator_set_name[64];
2877 };
2878
2879 /* Gross kludge, DGMS */
2880 define interface_name_renumber
2881 {
2882   u32 client_index;
2883   u32 context;
2884   u32 sw_if_index;
2885   u32 new_show_dev_instance;
2886 };
2887
2888 define interface_name_renumber_reply
2889 {
2890   u32 context;
2891   i32 retval;
2892 };
2893
2894 /** \brief Register for ip4 arp resolution events
2895     @param client_index - opaque cookie to identify the sender
2896     @param context - sender context, to match reply w/ request
2897     @param enable_disable - 1 => register for events, 0 => cancel registration
2898     @param pid - sender's pid
2899     @param address - the exact ip4 address of interest
2900 */
2901 define want_ip4_arp_events
2902 {
2903   u32 client_index;
2904   u32 context;
2905   u8 enable_disable;
2906   u32 pid;
2907   u32 address;
2908 };
2909
2910 /** \brief Reply for interface events registration
2911     @param context - returned sender context, to match reply w/ request
2912     @param retval - return code
2913 */
2914 define want_ip4_arp_events_reply
2915 {
2916   u32 context;
2917   i32 retval;
2918 };
2919
2920 /** \brief Tell client about an ip4 arp resolution event
2921     @param client_index - opaque cookie to identify the sender
2922     @param context - sender context, to match reply w/ request
2923     @param address - the exact ip4 address of interest
2924     @param pid - client pid registered to receive notification
2925     @param sw_if_index - interface which received ARP packet
2926     @param new_mac - the new mac address 
2927     @param mac_ip - 0: resolution event, 1: mac/ip binding in bd
2928 */
2929 define ip4_arp_event
2930 {
2931   u32 client_index;
2932   u32 context;
2933   u32 address;
2934   u32 pid;
2935   u32 sw_if_index;
2936   u8 new_mac[6];
2937   u8 mac_ip;
2938 };
2939
2940 /** \brief Register for ip6 nd resolution events
2941     @param client_index - opaque cookie to identify the sender
2942     @param context - sender context, to match reply w/ request
2943     @param enable_disable - 1 => register for events, 0 => cancel registration
2944     @param pid - sender's pid
2945     @param address - the exact ip6 address of interest
2946 */
2947 define want_ip6_nd_events
2948 {
2949   u32 client_index;
2950   u32 context;
2951   u8 enable_disable;
2952   u32 pid;
2953   u8 address[16];
2954 };
2955
2956 /** \brief Reply for ip6 nd resolution events registration
2957     @param context - returned sender context, to match reply w/ request
2958     @param retval - return code
2959 */
2960 define want_ip6_nd_events_reply
2961 {
2962   u32 context;
2963   i32 retval;
2964 };
2965
2966 /** \brief Tell client about an ip6 nd resolution or mac/ip event
2967     @param client_index - opaque cookie to identify the sender
2968     @param context - sender context, to match reply w/ request
2969     @param pid - client pid registered to receive notification
2970     @param sw_if_index - interface which received ARP packet
2971     @param address - the exact ip6 address of interest
2972     @param new_mac - the new mac address 
2973     @param mac_ip - 0: resolution event, 1: mac/ip binding in bd
2974 */
2975 define ip6_nd_event
2976 {
2977   u32 client_index;
2978   u32 context;
2979   u32 pid;
2980   u32 sw_if_index;
2981   u8 address[16];
2982   u8 new_mac[6];
2983   u8 mac_ip;
2984 };
2985     
2986 /** \brief L2 bridge domain add or delete request
2987     @param client_index - opaque cookie to identify the sender
2988     @param context - sender context, to match reply w/ request
2989     @param bd_id - the bridge domain to create
2990     @param flood - enable/disable bcast/mcast flooding in the bd
2991     @param uu_flood - enable/disable uknown unicast flood in the bd
2992     @param forward - enable/disable forwarding on all interfaces in the bd
2993     @param learn - enable/disable learning on all interfaces in the bd
2994     @param arp_term - enable/disable arp termination in the bd
2995     @param is_add - add or delete flag
2996 */
2997 define bridge_domain_add_del
2998 {
2999   u32 client_index;
3000   u32 context;
3001   u32 bd_id;
3002   u8 flood;
3003   u8 uu_flood;
3004   u8 forward;
3005   u8 learn;
3006   u8 arp_term;
3007   u8 is_add;
3008 };
3009
3010 /** \brief L2 bridge domain add or delete response
3011     @param context - sender context, to match reply w/ request
3012     @param retval - return code for the set bridge flags request
3013 */
3014 define bridge_domain_add_del_reply
3015 {
3016   u32 context;
3017   i32 retval;
3018 };
3019
3020 /** \brief L2 bridge domain request operational state details
3021     @param client_index - opaque cookie to identify the sender
3022     @param context - sender context, to match reply w/ request
3023     @param bd_id - the bridge domain id desired or ~0 to request all bds
3024 */
3025 define bridge_domain_dump
3026 {
3027   u32 client_index;
3028   u32 context;
3029   u32 bd_id;
3030 };
3031
3032 /** \brief L2 bridge domain operational state response
3033     @param bd_id - the bridge domain id
3034     @param flood - bcast/mcast flooding state on all interfaces in the bd
3035     @param uu_flood - uknown unicast flooding state on all interfaces in the bd
3036     @param forward - forwarding state on all interfaces in the bd
3037     @param learn - learning state on all interfaces in the bd
3038     @param arp_term - arp termination state on all interfaces in the bd
3039     @param n_sw_ifs - number of sw_if_index's in the domain
3040 */
3041 define bridge_domain_details
3042 {
3043   u32 context;
3044   u32 bd_id;
3045   u8 flood;
3046   u8 uu_flood;
3047   u8 forward;
3048   u8 learn;
3049   u8 arp_term;
3050   u32 bvi_sw_if_index;
3051   u32 n_sw_ifs;
3052 };
3053
3054 /** \brief L2 bridge domain sw interface operational state response
3055     @param bd_id - the bridge domain id
3056     @param sw_if_index - sw_if_index in the domain
3057     @param shg - split horizon group for the interface
3058 */
3059 define bridge_domain_sw_if_details
3060 {
3061   u32 context;
3062   u32 bd_id;
3063   u32 sw_if_index;
3064   u8 shg;
3065 };
3066
3067 /** \brief DHCP Client config add / del request
3068     @param client_index - opaque cookie to identify the sender
3069     @param context - sender context, to match reply w/ request
3070     @param sw_if_index - index of the interface for DHCP client
3071     @param hostname - hostname
3072     @param is_add - add the config if non-zero, else delete
3073     @param want_dhcp_event - DHCP event sent to the sender
3074            via dhcp_compl_event API message if non-zero
3075     @param pid - sender's pid
3076 */
3077 define dhcp_client_config
3078 {
3079   u32 client_index;
3080   u32 context;
3081   u32 sw_if_index;
3082   u8 hostname[64];
3083   u8 is_add;
3084   u8 want_dhcp_event;
3085   u32 pid;
3086 };
3087
3088 /** \brief DHCP Client config response
3089     @param context - sender context, to match reply w/ request
3090     @param retval - return code for the request
3091 */
3092 define dhcp_client_config_reply
3093 {
3094   u32 context;
3095   i32 retval;
3096 };
3097
3098 /** \brief Set/unset input ACL interface
3099     @param client_index - opaque cookie to identify the sender
3100     @param context - sender context, to match reply w/ request
3101     @param sw_if_index - interface to set/unset input ACL
3102     @param ip4_table_index - ip4 classify table index (~0 for skip)
3103     @param ip6_table_index - ip6 classify table index (~0 for skip)
3104     @param l2_table_index  -  l2 classify table index (~0 for skip)
3105     @param is_add - Set input ACL if non-zero, else unset
3106     Note: User is recommeneded to use just one valid table_index per call.
3107           (ip4_table_index, ip6_table_index, or l2_table_index)
3108 */
3109 define input_acl_set_interface
3110 {
3111   u32 client_index;
3112   u32 context;
3113   u32 sw_if_index;
3114   u32 ip4_table_index;
3115   u32 ip6_table_index;
3116   u32 l2_table_index;
3117   u8 is_add;
3118 };
3119
3120 /** \brief Set/unset input ACL interface response
3121     @param context - sender context, to match reply w/ request
3122     @param retval - return code for the request
3123 */
3124 define input_acl_set_interface_reply
3125 {
3126   u32 context;
3127   i32 retval;
3128 };
3129
3130 /** \brief IPsec: Add/delete Security Policy Database
3131     @param client_index - opaque cookie to identify the sender
3132     @param context - sender context, to match reply w/ request
3133     @param is_add - add SPD if non-zero, else delete
3134     @param spd_id - SPD instance id (control plane allocated)
3135 */
3136
3137 define ipsec_spd_add_del
3138 {
3139   u32 client_index;
3140   u32 context;
3141   u8 is_add;
3142   u32 spd_id;
3143 };
3144
3145 /** \brief Reply for IPsec: Add/delete Security Policy Database entry
3146     @param context - returned sender context, to match reply w/ request
3147     @param retval - return code
3148 */
3149
3150 define ipsec_spd_add_del_reply
3151 {
3152   u32 context;
3153   i32 retval;
3154 };
3155
3156 /** \brief IPsec: Add/delete SPD from interface
3157
3158     @param client_index - opaque cookie to identify the sender
3159     @param context - sender context, to match reply w/ request
3160     @param is_add - add security mode if non-zero, else delete
3161     @param sw_if_index - index of the interface
3162     @param spd_id - SPD instance id to use for lookups
3163 */
3164
3165
3166 define ipsec_interface_add_del_spd
3167 {
3168   u32 client_index;
3169   u32 context;
3170
3171   u8 is_add;
3172   u32 sw_if_index;
3173   u32 spd_id;
3174 };
3175
3176 /** \brief Reply for IPsec: Add/delete SPD from interface
3177     @param context - returned sender context, to match reply w/ request
3178     @param retval - return code
3179 */
3180
3181 define ipsec_interface_add_del_spd_reply
3182 {
3183   u32 context;
3184   i32 retval;
3185 };
3186
3187 /** \brief IPsec: Add/delete Security Policy Database entry
3188
3189     See RFC 4301, 4.4.1.1 on how to match packet to selectors
3190
3191     @param client_index - opaque cookie to identify the sender
3192     @param context - sender context, to match reply w/ request
3193     @param is_add - add SPD if non-zero, else delete
3194     @param spd_id - SPD instance id (control plane allocated)
3195     @param priority - priority of SPD entry (non-unique value).  Used to order SPD matching - higher priorities match before lower
3196     @param is_outbound - entry applies to outbound traffic if non-zero, otherwise applies to inbound traffic
3197     @param is_ipv6 - remote/local address are IPv6 if non-zero, else IPv4
3198     @param remote_address_start - start of remote address range to match
3199     @param remote_address_stop - end of remote address range to match
3200     @param local_address_start - start of local address range to match
3201     @param local_address_stop - end of local address range to match
3202     @param protocol - protocol type to match [0 means any]
3203     @param remote_port_start - start of remote port range to match ...
3204     @param remote_port_stop - end of remote port range to match [0 to 65535 means ANY, 65535 to 0 means OPAQUE]
3205     @param local_port_start - start of local port range to match ...
3206     @param local_port_stop - end of remote port range to match [0 to 65535 means ANY, 65535 to 0 means OPAQUE]
3207     @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)
3208     @param sa_id - SAD instance id (control plane allocated)
3209
3210 */
3211
3212 define ipsec_spd_add_del_entry
3213 {
3214   u32 client_index;
3215   u32 context;
3216   u8 is_add;
3217
3218   u32 spd_id;
3219   i32 priority;
3220   u8 is_outbound;
3221
3222   // Selector
3223   u8 is_ipv6;
3224   u8 is_ip_any;
3225   u8 remote_address_start[16];
3226   u8 remote_address_stop[16];
3227   u8 local_address_start[16];
3228   u8 local_address_stop[16];
3229
3230   u8 protocol;
3231
3232   u16 remote_port_start;
3233   u16 remote_port_stop;
3234   u16 local_port_start;
3235   u16 local_port_stop;
3236
3237   // Policy
3238   u8 policy;
3239   u32 sa_id;
3240 };
3241
3242 /** \brief Reply for IPsec: Add/delete Security Policy Database entry
3243     @param context - returned sender context, to match reply w/ request
3244     @param retval - return code
3245 */
3246
3247 define ipsec_spd_add_del_entry_reply
3248 {
3249   u32 context;
3250   i32 retval;
3251 };
3252
3253 /** \brief IPsec: Add/delete Security Association Database entry
3254     @param client_index - opaque cookie to identify the sender
3255     @param context - sender context, to match reply w/ request
3256     @param is_add - add SAD entry if non-zero, else delete
3257
3258     @param sad_id - sad id
3259
3260     @param spi - security parameter index
3261
3262     @param protocol - 0 = AH, 1 = ESP
3263
3264     @param crypto_algorithm - 0 = Null, 1 = AES-CBC-128, 2 = AES-CBC-192, 3 = AES-CBC-256, 4 = 3DES-CBC
3265     @param crypto_key_length - length of crypto_key in bytes
3266     @param crypto_key - crypto keying material
3267
3268     @param integrity_algorithm - 0 = None, 1 = MD5-96, 2 = SHA1-96, 3 = SHA-256, 4 = SHA-384, 5=SHA-512
3269     @param integrity_key_length - length of integrity_key in bytes
3270     @param integrity_key - integrity keying material
3271
3272     @param use_extended_sequence_number - use ESN when non-zero
3273
3274     @param is_tunnel - IPsec tunnel mode if non-zero, else transport mode
3275     @param is_tunnel_ipv6 - IPsec tunnel mode is IPv6 if non-zero, else IPv4 tunnel only valid if is_tunnel is non-zero
3276     @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
3277     @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
3278
3279     To be added:
3280      Anti-replay
3281      IPsec tunnel address copy mode (to support GDOI)
3282  */
3283
3284 define ipsec_sad_add_del_entry
3285 {
3286   u32 client_index;
3287   u32 context;
3288   u8 is_add;
3289
3290   u32 sad_id;
3291
3292   u32 spi;
3293
3294   u8 protocol;
3295
3296   u8 crypto_algorithm;
3297   u8 crypto_key_length;
3298   u8 crypto_key[128];
3299
3300   u8 integrity_algorithm;
3301   u8 integrity_key_length;
3302   u8 integrity_key[128];
3303
3304   u8 use_extended_sequence_number;
3305
3306   u8 is_tunnel;
3307   u8 is_tunnel_ipv6;
3308   u8 tunnel_src_address[16];
3309   u8 tunnel_dst_address[16];
3310 };
3311
3312 /** \brief Reply for IPsec: Add/delete Security Association Database entry
3313     @param context - returned sender context, to match reply w/ request
3314     @param retval - return code
3315 */
3316
3317 define ipsec_sad_add_del_entry_reply
3318 {
3319   u32 context;
3320   i32 retval;
3321 };
3322
3323 /** \brief IPsec: Update Security Association keys
3324     @param client_index - opaque cookie to identify the sender
3325     @param context - sender context, to match reply w/ request
3326
3327     @param sa_id - sa id
3328
3329     @param crypto_key_length - length of crypto_key in bytes
3330     @param crypto_key - crypto keying material
3331
3332     @param integrity_key_length - length of integrity_key in bytes
3333     @param integrity_key - integrity keying material
3334 */
3335
3336 define ipsec_sa_set_key
3337 {
3338   u32 client_index;
3339   u32 context;
3340
3341   u32 sa_id;
3342
3343   u8 crypto_key_length;
3344   u8 crypto_key[128];
3345
3346   u8 integrity_key_length;
3347   u8 integrity_key[128];
3348 };
3349
3350 /** \brief Reply for IPsec: Update Security Association keys
3351     @param context - returned sender context, to match reply w/ request
3352     @param retval - return code
3353 */
3354
3355 define ipsec_sa_set_key_reply
3356 {
3357   u32 context;
3358   i32 retval;
3359 };
3360
3361 /** \brief IKEv2: Add/delete profile
3362     @param client_index - opaque cookie to identify the sender
3363     @param context - sender context, to match reply w/ request
3364
3365     @param name - IKEv2 profile name
3366     @param is_add - Add IKEv2 profile if non-zero, else delete
3367 */
3368 define ikev2_profile_add_del
3369 {
3370   u32 client_index;
3371   u32 context;
3372
3373   u8 name[64];
3374   u8 is_add;
3375 };
3376
3377 /** \brief Reply for IKEv2: Add/delete profile
3378     @param context - returned sender context, to match reply w/ request
3379     @param retval - return code
3380 */
3381 define ikev2_profile_add_del_reply
3382 {
3383   u32 context;
3384   i32 retval;
3385 };
3386
3387 /** \brief IKEv2: Set IKEv2 profile authentication method
3388     @param client_index - opaque cookie to identify the sender
3389     @param context - sender context, to match reply w/ request
3390
3391     @param name - IKEv2 profile name
3392     @param auth_method - IKEv2 authentication method (shared-key-mic/rsa-sig)
3393     @param is_hex - Authentication data in hex format if non-zero, else string
3394     @param data_len - Authentication data length
3395     @param data - Authentication data (for rsa-sig cert file path)
3396 */
3397 define ikev2_profile_set_auth
3398 {
3399   u32 client_index;
3400   u32 context;
3401
3402   u8 name[64];
3403   u8 auth_method;
3404   u8 is_hex;
3405   u32 data_len;
3406   u8 data[0];
3407 };
3408
3409 /** \brief Reply for IKEv2: Set IKEv2 profile authentication method
3410     @param context - returned sender context, to match reply w/ request
3411     @param retval - return code
3412 */
3413 define ikev2_profile_set_auth_reply
3414 {
3415   u32 context;
3416   i32 retval;
3417 };
3418
3419 /** \brief IKEv2: Set IKEv2 profile local/remote identification
3420     @param client_index - opaque cookie to identify the sender
3421     @param context - sender context, to match reply w/ request
3422
3423     @param name - IKEv2 profile name
3424     @param is_local - Identification is local if non-zero, else remote
3425     @param id_type - Identification type
3426     @param data_len - Identification data length
3427     @param data - Identification data
3428 */
3429 define ikev2_profile_set_id
3430 {
3431   u32 client_index;
3432   u32 context;
3433
3434   u8 name[64];
3435   u8 is_local;
3436   u8 id_type;
3437   u32 data_len;
3438   u8 data[0];
3439 };
3440
3441 /** \brief Reply for IKEv2:
3442     @param context - returned sender context, to match reply w/ request
3443     @param retval - return code
3444 */
3445 define ikev2_profile_set_id_reply
3446 {
3447   u32 context;
3448   i32 retval;
3449 };
3450
3451 /** \brief IKEv2: Set IKEv2 profile traffic selector parameters
3452     @param client_index - opaque cookie to identify the sender
3453     @param context - sender context, to match reply w/ request
3454
3455     @param name - IKEv2 profile name
3456     @param is_local - Traffic selector is local if non-zero, else remote
3457     @param proto - Traffic selector IP protocol (if zero not relevant)
3458     @param start_port - The smallest port number allowed by traffic selector
3459     @param end_port - The largest port number allowed by traffic selector
3460     @param start_addr - The smallest address included in traffic selector
3461     @param end_addr - The largest address included in traffic selector
3462 */
3463 define ikev2_profile_set_ts
3464 {
3465   u32 client_index;
3466   u32 context;
3467
3468   u8 name[64];
3469   u8 is_local;
3470   u8 proto;
3471   u16 start_port;
3472   u16 end_port;
3473   u32 start_addr;
3474   u32 end_addr;
3475 };
3476
3477 /** \brief Reply for IKEv2: Set IKEv2 profile traffic selector parameters
3478     @param context - returned sender context, to match reply w/ request
3479     @param retval - return code
3480 */
3481 define ikev2_profile_set_ts_reply
3482 {
3483   u32 context;
3484   i32 retval;
3485 };
3486
3487 /** \brief IKEv2: Set IKEv2 local RSA private key
3488     @param client_index - opaque cookie to identify the sender
3489     @param context - sender context, to match reply w/ request
3490
3491     @param key_file - Key file absolute path
3492 */
3493 define ikev2_set_local_key
3494 {
3495   u32 client_index;
3496   u32 context;
3497
3498   u8 key_file[256];
3499 };
3500
3501 /** \brief Reply for IKEv2: Set IKEv2 local key
3502     @param context - returned sender context, to match reply w/ request
3503     @param retval - return code
3504 */
3505 define ikev2_set_local_key_reply
3506 {
3507   u32 context;
3508   i32 retval;
3509 };
3510
3511 /** \brief Tell client about a DHCP completion event
3512     @param client_index - opaque cookie to identify the sender
3513     @param pid - client pid registered to receive notification
3514     @param is_ipv6 - if non-zero the address is ipv6, else ipv4
3515     @param host_address - Host IP address
3516     @param router_address - Router IP address
3517     @param host_mac - Host MAC address
3518 */
3519 define dhcp_compl_event
3520 {
3521   u32 client_index;
3522   u32 pid;
3523   u8 hostname[64];
3524   u8 is_ipv6;
3525   u8 host_address[16];
3526   u8 router_address[16];
3527   u8 host_mac[6];
3528 };
3529
3530 /** \brief cop: enable/disable junk filtration features on an interface
3531     @param client_index - opaque cookie to identify the sender
3532     @param context - sender context, to match reply w/ request
3533     @param sw_if_inded - desired interface
3534     @param enable_disable - 1 => enable, 0 => disable
3535 */
3536
3537 define cop_interface_enable_disable
3538 {
3539   u32 client_index;
3540   u32 context;
3541   u32 sw_if_index;
3542   u8 enable_disable;
3543 };
3544
3545 /** \brief cop: interface enable/disable junk filtration reply
3546     @param context - returned sender context, to match reply w/ request
3547     @param retval - return code
3548 */
3549
3550 define cop_interface_enable_disable_reply
3551 {
3552   u32 context;
3553   i32 retval;
3554 };
3555
3556 /** \brief cop: enable/disable whitelist filtration features on an interface
3557     Note: the supplied fib_id must match in order to remove the feature!
3558     
3559     @param client_index - opaque cookie to identify the sender
3560     @param context - sender context, to match reply w/ request
3561     @param sw_if_index - interface handle, physical interfaces only
3562     @param fib_id - fib identifier for the whitelist / blacklist fib
3563     @param ip4 - 1 => enable ip4 filtration, 0=> disable ip4 filtration
3564     @param ip6 - 1 => enable ip6 filtration, 0=> disable ip6 filtration
3565     @param default_cop -  1 => enable non-ip4, non-ip6 filtration 0=> disable it
3566 */
3567
3568 define cop_whitelist_enable_disable
3569 {
3570   u32 client_index;
3571   u32 context;
3572   u32 sw_if_index;
3573   u32 fib_id;
3574   u8 ip4;
3575   u8 ip6;
3576   u8 default_cop;
3577 };
3578
3579 /** \brief cop: interface enable/disable junk filtration reply
3580     @param context - returned sender context, to match reply w/ request
3581     @param retval - return code
3582 */
3583
3584 define cop_whitelist_enable_disable_reply
3585 {
3586   u32 context;
3587   i32 retval;
3588 };
3589
3590 /** \brief get_node_graph - get a copy of the vpp node graph
3591     including the current set of graph arcs.
3592
3593     @param client_index - opaque cookie to identify the sender
3594     @param context - sender context, to match reply w/ request
3595 */
3596
3597 define get_node_graph
3598 {
3599   u32 client_index;
3600   u32 context;
3601 };
3602
3603 /** \brief get_node_graph_reply
3604     @param context - returned sender context, to match reply w/ request
3605     @param retval - return code
3606     @param reply_in_shmem - result from vlib_node_serialize, in shared
3607     memory. Process with vlib_node_unserialize, remember to switch
3608     heaps and free the result.
3609 */
3610
3611 define get_node_graph_reply
3612 {
3613   u32 context;
3614   i32 retval;
3615   u64 reply_in_shmem;
3616 };
3617
3618 /** \brief IOAM enable : Enable in-band OAM
3619     @param id - profile id
3620     @param seqno - To enable Seqno Processing
3621     @param analyse - Enabling analysis of iOAM at decap node 
3622     @param pow_enable - Proof of Work enabled or not flag
3623     @param trace_enable - iOAM Trace enabled or not flag
3624 */
3625 define ioam_enable
3626 {
3627   u32 client_index;
3628   u32 context;
3629   u16 id;
3630   u8 seqno;
3631   u8 analyse;
3632   u8 pot_enable;
3633   u8 trace_enable;
3634   u32 node_id;
3635 };
3636
3637 /** \brief iOAM Trace profile add / del response
3638     @param context - sender context, to match reply w/ request
3639     @param retval - return value for request
3640 */
3641 define ioam_enable_reply
3642 {
3643   u32 context;
3644   i32 retval;
3645 };
3646
3647 /** \brief iOAM disable
3648     @param client_index - opaque cookie to identify the sender
3649     @param context - sender context, to match reply w/ request
3650     @param index - MAP Domain index
3651 */
3652 define ioam_disable
3653 {
3654   u32 client_index;
3655   u32 context;
3656   u16 id;
3657 };
3658
3659 /** \brief iOAM disable response
3660     @param context - sender context, to match reply w/ request
3661     @param retval - return value for request
3662 */
3663 define ioam_disable_reply
3664 {
3665   u32 context;
3666   i32 retval;
3667 };
3668
3669 /** \brief Create host-interface
3670     @param client_index - opaque cookie to identify the sender
3671     @param context - sender context, to match reply w/ request
3672     @param host_if_name - interface name
3673     @param hw_addr - interface MAC
3674     @param use_random_hw_addr - use random generated MAC
3675 */
3676 define af_packet_create
3677 {
3678   u32 client_index;
3679   u32 context;
3680
3681   u8 host_if_name[64];
3682   u8 hw_addr[6];
3683   u8 use_random_hw_addr;
3684 };
3685
3686 /** \brief Create host-interface response
3687     @param context - sender context, to match reply w/ request
3688     @param retval - return value for request
3689 */
3690 define af_packet_create_reply
3691 {
3692   u32 context;
3693   i32 retval;
3694   u32 sw_if_index;
3695 };
3696
3697 /** \brief Delete host-interface
3698     @param client_index - opaque cookie to identify the sender
3699     @param context - sender context, to match reply w/ request
3700     @param host_if_name - interface name
3701 */
3702 define af_packet_delete
3703 {
3704   u32 client_index;
3705   u32 context;
3706
3707   u8 host_if_name[64];
3708 };
3709
3710 /** \brief Delete host-interface response
3711     @param context - sender context, to match reply w/ request
3712     @param retval - return value for request
3713 */
3714 define af_packet_delete_reply
3715 {
3716   u32 context;
3717   i32 retval;
3718 };
3719
3720 /** \brief Add/del policer
3721     @param client_index - opaque cookie to identify the sender
3722     @param context - sender context, to match reply w/ request
3723     @param is_add - add policer if non-zero, else delete
3724     @param name - policer name
3725     @param cir - CIR
3726     @param eir - EIR
3727     @param cb - Committed Burst
3728     @param eb - Excess or Peak Burst
3729     @param rate_type - rate type
3730     @param round_type - rounding type
3731     @param type - policer algorithm
3732     @param color_aware - 0=color-blind, 1=color-aware
3733     @param conform_action_type - conform action type
3734     @param conform_dscp - DSCP for conform mar-and-transmit action
3735     @param exceed_action_type - exceed action type
3736     @param exceed_dscp - DSCP for exceed mar-and-transmit action
3737     @param violate_action_type - violate action type
3738     @param violate_dscp - DSCP for violate mar-and-transmit action
3739 */
3740 define policer_add_del
3741 {
3742   u32 client_index;
3743   u32 context;
3744
3745   u8 is_add;
3746   u8 name[64];
3747   u32 cir;
3748   u32 eir;
3749   u64 cb;
3750   u64 eb;
3751   u8 rate_type;
3752   u8 round_type;
3753   u8 type;
3754   u8 color_aware;
3755   u8 conform_action_type;
3756   u8 conform_dscp;
3757   u8 exceed_action_type;
3758   u8 exceed_dscp;
3759   u8 violate_action_type;
3760   u8 violate_dscp;
3761 };
3762
3763 /** \brief Add/del policer response
3764     @param context - sender context, to match reply w/ request
3765     @param retval - return value for request
3766     @param policer_index - for add, returned index of the new policer
3767 */
3768 define policer_add_del_reply
3769 {
3770   u32 context;
3771   i32 retval;
3772   u32 policer_index;
3773 };
3774
3775 /** \brief Get list of policers
3776     @param client_index - opaque cookie to identify the sender
3777     @param context - sender context, to match reply w/ request
3778     @param match_name_valid - if 0 request all policers otherwise use match_name
3779     @param match_name - policer name
3780 */
3781 define policer_dump
3782 {
3783   u32 client_index;
3784   u32 context;
3785
3786   u8 match_name_valid;
3787   u8 match_name[64];
3788 };
3789
3790 /** \brief Policer operational state response.
3791     @param context - sender context, to match reply w/ request
3792     @param name - policer name
3793     @param cir - CIR
3794     @param eir - EIR
3795     @param cb - Committed Burst
3796     @param eb - Excess or Peak Burst
3797     @param rate_type - rate type
3798     @param round_type - rounding type
3799     @param type - policer algorithm
3800     @param conform_action_type - conform action type
3801     @param conform_dscp - DSCP for conform mar-and-transmit action
3802     @param exceed_action_type - exceed action type
3803     @param exceed_dscp - DSCP for exceed mar-and-transmit action
3804     @param violate_action_type - violate action type
3805     @param violate_dscp - DSCP for violate mar-and-transmit action
3806     @param single_rate - 1 = single rate policer, 0 = two rate policer
3807     @param color_aware - for hierarchical policing
3808     @param scale - power-of-2 shift amount for lower rates
3809     @param cir_tokens_per_period - number of tokens for each period
3810     @param pir_tokens_per_period - number of tokens for each period for 2-rate policer
3811     @param current_limit - current limit
3812     @param current_bucket - current bucket
3813     @param extended_limit - extended limit
3814     @param extended_bucket - extended bucket
3815     @param last_update_time - last update time
3816 */
3817 define policer_details
3818 {
3819   u32 context;
3820
3821   u8 name[64];
3822   u32 cir;
3823   u32 eir;
3824   u64 cb;
3825   u64 eb;
3826   u8 rate_type;
3827   u8 round_type;
3828   u8 type;
3829   u8 conform_action_type;
3830   u8 conform_dscp;
3831   u8 exceed_action_type;
3832   u8 exceed_dscp;
3833   u8 violate_action_type;
3834   u8 violate_dscp;
3835   u8 single_rate;
3836   u8 color_aware;
3837   u32 scale;
3838   u32 cir_tokens_per_period;
3839   u32 pir_tokens_per_period;
3840   u32 current_limit;
3841   u32 current_bucket;
3842   u32 extended_limit;
3843   u32 extended_bucket;
3844   u64 last_update_time;
3845 };
3846
3847 /** \brief Set/unset policer classify interface
3848     @param client_index - opaque cookie to identify the sender
3849     @param context - sender context, to match reply w/ request
3850     @param sw_if_index - interface to set/unset policer classify
3851     @param ip4_table_index - ip4 classify table index (~0 for skip)
3852     @param ip6_table_index - ip6 classify table index (~0 for skip)
3853     @param l2_table_index  -  l2 classify table index (~0 for skip)
3854     @param is_add - Set if non-zero, else unset
3855     Note: User is recommeneded to use just one valid table_index per call.
3856           (ip4_table_index, ip6_table_index, or l2_table_index)
3857 */
3858 define policer_classify_set_interface
3859 {
3860   u32 client_index;
3861   u32 context;
3862   u32 sw_if_index;
3863   u32 ip4_table_index;
3864   u32 ip6_table_index;
3865   u32 l2_table_index;
3866   u8 is_add;
3867 };
3868
3869 /** \brief Set/unset policer classify interface response
3870     @param context - sender context, to match reply w/ request
3871     @param retval - return value for request
3872 */
3873 define policer_classify_set_interface_reply
3874 {
3875   u32 context;
3876   i32 retval;
3877 };
3878
3879 /** \brief Get list of policer classify interfaces and tables
3880     @param client_index - opaque cookie to identify the sender
3881     @param context - sender context, to match reply w/ request
3882     @param type - classify table type
3883 */
3884 define policer_classify_dump
3885 {
3886   u32 client_index;
3887   u32 context;
3888   u8 type;
3889 };
3890
3891 /** \brief Policer iclassify operational state response.
3892     @param context - sender context, to match reply w/ request
3893     @param sw_if_index - software interface index
3894     @param table_index - classify table index
3895 */
3896 define policer_classify_details
3897 {
3898   u32 context;
3899   u32 sw_if_index;
3900   u32 table_index;
3901 };
3902
3903 /** \brief Create netmap
3904     @param client_index - opaque cookie to identify the sender
3905     @param context - sender context, to match reply w/ request
3906     @param netmap_if_name - interface name
3907     @param hw_addr - interface MAC
3908     @param use_random_hw_addr - use random generated MAC
3909     @param is_pipe - is pipe
3910     @param is_master - 0=slave, 1=master
3911 */
3912 define netmap_create
3913 {
3914   u32 client_index;
3915   u32 context;
3916
3917   u8 netmap_if_name[64];
3918   u8 hw_addr[6];
3919   u8 use_random_hw_addr;
3920   u8 is_pipe;
3921   u8 is_master;
3922 };
3923
3924 /** \brief Create netmap response
3925     @param context - sender context, to match reply w/ request
3926     @param retval - return value for request
3927 */
3928 define netmap_create_reply
3929 {
3930   u32 context;
3931   i32 retval;
3932 };
3933
3934 /** \brief Delete netmap
3935     @param client_index - opaque cookie to identify the sender
3936     @param context - sender context, to match reply w/ request
3937     @param netmap_if_name - interface name
3938 */
3939 define netmap_delete
3940 {
3941   u32 client_index;
3942   u32 context;
3943
3944   u8 netmap_if_name[64];
3945 };
3946
3947 /** \brief Delete netmap response
3948     @param context - sender context, to match reply w/ request
3949     @param retval - return value for request
3950 */
3951 define netmap_delete_reply
3952 {
3953   u32 context;
3954   i32 retval;
3955 };
3956
3957 /** \brief Classify get table IDs request
3958     @param client_index - opaque cookie to identify the sender
3959     @param context - sender context, to match reply w/ request
3960 */
3961 define classify_table_ids
3962 {
3963   u32 client_index;
3964   u32 context;
3965 };
3966
3967 /** \brief Reply for classify get table IDs request
3968     @param context - sender context which was passed in the request
3969     @param count - number of ids returned in response
3970     @param ids - array of classify table ids
3971 */
3972 define classify_table_ids_reply
3973 {
3974   u32 context;
3975   i32 retval;
3976   u32 count;
3977   u32 ids[count];
3978 };
3979
3980 /** \brief Classify table ids by interface index request
3981     @param client_index - opaque cookie to identify the sender
3982     @param context - sender context, to match reply w/ request
3983     @param sw_if_index - index of the interface
3984 */
3985 define classify_table_by_interface
3986 {
3987   u32 client_index;
3988   u32 context;
3989   u32 sw_if_index;
3990 };
3991
3992 /** \brief Reply for classify table id by interface index request
3993     @param context - sender context which was passed in the request
3994     @param count - number of ids returned in response
3995     @param sw_if_index - index of the interface
3996     @param l2_table_id - l2 classify table index
3997     @param ip4_table_id - ip4 classify table index
3998     @param ip6_table_id - ip6 classify table index
3999 */
4000 define classify_table_by_interface_reply
4001 {
4002   u32 context;
4003   i32 retval;
4004   u32 sw_if_index;
4005   u32 l2_table_id;
4006   u32 ip4_table_id;
4007   u32 ip6_table_id;
4008 };
4009
4010 /** \brief Classify table info
4011     @param client_index - opaque cookie to identify the sender
4012     @param context - sender context, to match reply w/ request
4013     @param table_id - classify table index
4014 */
4015 define classify_table_info
4016 {
4017   u32 client_index;
4018   u32 context;
4019   u32 table_id;
4020 };
4021
4022 /** \brief Reply for classify table info request
4023     @param context - sender context which was passed in the request
4024     @param count - number of ids returned in response
4025     @param table_id - classify table index
4026     @param nbuckets - number of buckets when adding a table
4027     @param match_n_vectors - number of match vectors
4028     @param skip_n_vectors - number of skip_n_vectors
4029     @param active_sessions - number of sessions (active entries)
4030     @param next_table_index - index of next table
4031     @param miss_next_index - index of miss table
4032     @param mask[] - match mask
4033 */
4034 define classify_table_info_reply
4035 {
4036   u32 context;
4037   i32 retval;
4038   u32 table_id;
4039   u32 nbuckets;
4040   u32 match_n_vectors;
4041   u32 skip_n_vectors;
4042   u32 active_sessions;
4043   u32 next_table_index;
4044   u32 miss_next_index;
4045   u32 mask_length;
4046   u8 mask[mask_length];
4047 };
4048
4049 /** \brief Classify sessions dump request
4050     @param client_index - opaque cookie to identify the sender
4051     @param context - sender context, to match reply w/ request
4052     @param table_id - classify table index
4053 */
4054 define classify_session_dump
4055 {
4056   u32 client_index;
4057   u32 context;
4058   u32 table_id;
4059 };
4060
4061 /** \brief Reply for classify table session dump request
4062     @param context - sender context which was passed in the request
4063     @param count - number of ids returned in response
4064     @param table_id - classify table index
4065     @param hit_next_index - hit_next_index of session
4066     @param opaque_index - for add, opaque_index of session
4067     @param advance - advance value of session
4068     @param match[] - match value for session
4069 */
4070 define classify_session_details
4071 {
4072   u32 context;
4073   i32 retval;
4074   u32 table_id;
4075   u32 hit_next_index;
4076   i32 advance;
4077   u32 opaque_index;
4078   u32 match_length;
4079   u8 match[match_length];
4080 };
4081
4082 /** \brief Configure IPFIX exporter process request
4083     @param client_index - opaque cookie to identify the sender
4084     @param context - sender context, to match reply w/ request
4085     @param collector_address - address of IPFIX collector
4086     @param collector_port - port of IPFIX collector
4087     @param src_address - address of IPFIX exporter
4088     @param vrf_id - VRF / fib table ID
4089     @param path_mtu - Path MTU between exporter and collector
4090     @param template_interval - number of seconds after which to resend template
4091     @param udp_checksum - UDP checksum calculation enable flag
4092 */
4093 define set_ipfix_exporter
4094 {
4095   u32 client_index;
4096   u32 context;
4097   u8 collector_address[16];
4098   u16 collector_port;
4099   u8 src_address[16];
4100   u32 vrf_id;
4101   u32 path_mtu;
4102   u32 template_interval;
4103   u8 udp_checksum;
4104 };
4105
4106 /** \brief Reply to IPFIX exporter configure request
4107     @param context - sender context which was passed in the request
4108 */
4109 define set_ipfix_exporter_reply
4110 {
4111   u32 context;
4112   i32 retval;
4113 };
4114
4115 /** \brief IPFIX exporter dump request
4116     @param client_index - opaque cookie to identify the sender
4117     @param context - sender context, to match reply w/ request
4118 */
4119 define ipfix_exporter_dump
4120 {
4121   u32 client_index;
4122   u32 context;
4123 };
4124
4125 /** \brief Reply to IPFIX exporter dump request
4126     @param context - sender context which was passed in the request
4127     @param collector_address - address of IPFIX collector
4128     @param collector_port - port of IPFIX collector
4129     @param src_address - address of IPFIX exporter
4130     @param fib_index - fib table index
4131     @param path_mtu - Path MTU between exporter and collector
4132     @param template_interval - number of seconds after which to resend template
4133     @param udp_checksum - UDP checksum calculation enable flag
4134 */
4135 define ipfix_exporter_details
4136 {
4137   u32 context;
4138   u8 collector_address[16];
4139   u16 collector_port;
4140   u8 src_address[16];
4141   u32 vrf_id;
4142   u32 path_mtu;
4143   u32 template_interval;
4144   u8 udp_checksum;
4145 };
4146
4147 /** \brief IPFIX classify stream configure request
4148     @param client_index - opaque cookie to identify the sender
4149     @param context - sender context, to match reply w/ request
4150     @param domain_id - domain ID reported in IPFIX messages for classify stream
4151     @param src_port - source port of UDP session for classify stream
4152 */
4153 define set_ipfix_classify_stream {
4154     u32 client_index;
4155     u32 context;
4156     u32 domain_id;
4157     u16 src_port;
4158 };
4159
4160 /** \brief IPFIX classify stream configure response
4161     @param context - sender context, to match reply w/ request
4162     @param retval - return value for request
4163 */
4164 define set_ipfix_classify_stream_reply {
4165     u32 context;
4166     i32 retval;
4167 };
4168
4169 /** \brief IPFIX classify stream dump request
4170     @param client_index - opaque cookie to identify the sender
4171     @param context - sender context, to match reply w/ request
4172 */
4173 define ipfix_classify_stream_dump {
4174     u32 client_index;
4175     u32 context;
4176 };
4177
4178 /** \brief Reply to IPFIX classify stream dump request
4179     @param context - sender context, to match reply w/ request
4180     @param domain_id - domain ID reported in IPFIX messages for classify stream
4181     @param src_port - source port of UDP session for classify stream
4182 */
4183 define ipfix_classify_stream_details {
4184     u32 context;
4185     u32 domain_id;
4186     u16 src_port;
4187 };
4188
4189 /** \brief IPFIX add or delete classifier table request
4190     @param client_index - opaque cookie to identify the sender
4191     @param context - sender context, to match reply w/ request
4192     @param table_id - classifier table ID
4193     @param ip_version - version of IP used in the classifier table
4194     @param transport_protocol - transport protocol used in the classifier table or 255 for unspecified
4195 */
4196 define ipfix_classify_table_add_del {
4197     u32 client_index;
4198     u32 context;
4199     u32 table_id;
4200     u8 ip_version;
4201     u8 transport_protocol;
4202     u8 is_add;
4203 };
4204
4205 /** \brief IPFIX add classifier table response
4206     @param context - sender context which was passed in the request
4207 */
4208 define ipfix_classify_table_add_del_reply {
4209     u32 context;
4210     i32 retval;
4211 };
4212
4213 /** \brief IPFIX classify tables dump request
4214     @param client_index - opaque cookie to identify the sender
4215     @param context - sender context, to match reply w/ request
4216 */
4217 define ipfix_classify_table_dump {
4218     u32 client_index;
4219     u32 context;
4220 };
4221
4222 /** \brief Reply to IPFIX classify tables dump request
4223     @param context - sender context, to match reply w/ request
4224     @param table_id - classifier table ID
4225     @param ip_version - version of IP used in the classifier table
4226     @param transport_protocol - transport protocol used in the classifier table or 255 for unspecified
4227 */
4228 define ipfix_classify_table_details {
4229     u32 context;
4230     u32 table_id;
4231     u8 ip_version;
4232     u8 transport_protocol;
4233 };
4234
4235 /** \brief Set/unset flow classify interface
4236     @param client_index - opaque cookie to identify the sender
4237     @param context - sender context, to match reply w/ request
4238     @param sw_if_index - interface to set/unset flow classify
4239     @param ip4_table_index - ip4 classify table index (~0 for skip)
4240     @param ip6_table_index - ip6 classify table index (~0 for skip)
4241     @param l2_table_index  -  l2 classify table index (~0 for skip)
4242     @param is_add - Set if non-zero, else unset
4243     Note: User is recommeneded to use just one valid table_index per call.
4244           (ip4_table_index, ip6_table_index, or l2_table_index)
4245 */
4246 define flow_classify_set_interface {
4247     u32 client_index;
4248     u32 context;
4249     u32 sw_if_index;
4250     u32 ip4_table_index;
4251     u32 ip6_table_index;
4252     u8  is_add;
4253 };
4254
4255 /** \brief Set/unset flow classify interface response
4256     @param context - sender context, to match reply w/ request
4257     @param retval - return value for request
4258 */
4259 define flow_classify_set_interface_reply {
4260     u32 context;
4261     i32 retval;
4262 };
4263
4264 /** \brief Get list of flow classify interfaces and tables
4265     @param client_index - opaque cookie to identify the sender
4266     @param context - sender context, to match reply w/ request
4267     @param type - classify table type
4268 */
4269 define flow_classify_dump {
4270     u32 client_index;
4271     u32 context;
4272     u8 type;
4273 };
4274
4275 /** \brief Flow classify operational state response.
4276     @param context - sender context, to match reply w/ request
4277     @param sw_if_index - software interface index
4278     @param table_index - classify table index
4279 */
4280 define flow_classify_details {
4281     u32 context;
4282     u32 sw_if_index;
4283     u32 table_index;
4284 };
4285
4286 /** \brief Query relative index via node names
4287     @param client_index - opaque cookie to identify the sender
4288     @param context - sender context, to match reply w/ request
4289     @param node_name - name of node to find relative index from
4290     @param next_name - next node from node_name to find relative index of
4291 */
4292 define get_next_index
4293 {
4294   u32 client_index;
4295   u32 context;
4296   u8 node_name[64];
4297   u8 next_name[64];
4298 };
4299
4300 /** \brief Reply for get next node index
4301     @param context - sender context which was passed in the request
4302     @param retval - return value
4303     @param next_index - index of the next_node
4304 */
4305 define get_next_index_reply
4306 {
4307   u32 context;
4308   i32 retval;
4309   u32 next_index;
4310 };
4311
4312 /** \brief PacketGenerator create interface request
4313     @param client_index - opaque cookie to identify the sender
4314     @param context - sender context, to match reply w/ request
4315     @param interface_id - interface index
4316 */
4317 define pg_create_interface
4318 {
4319   u32 client_index;
4320   u32 context;
4321   u32 interface_id;
4322 };
4323
4324 /** \brief PacketGenerator create interface response
4325     @param context - sender context, to match reply w/ request
4326     @param retval - return value for request
4327 */
4328 define pg_create_interface_reply
4329 {
4330   u32 context;
4331   i32 retval;
4332   u32 sw_if_index;
4333 };
4334
4335 /** \brief PacketGenerator capture packets on given interface request
4336     @param client_index - opaque cookie to identify the sender
4337     @param context - sender context, to match reply w/ request
4338     @param interface_id - pg interface index
4339     @param is_enabled - 1 if enabling streams, 0 if disabling
4340     @param count - number of packets to be captured
4341     @param pcap_file - pacp file name to store captured packets
4342 */
4343 define pg_capture
4344 {
4345   u32 client_index;
4346   u32 context;
4347   u32 interface_id;
4348   u8 is_enabled;
4349   u32 count;
4350   u32 pcap_name_length;
4351   u8 pcap_file_name[pcap_name_length];
4352 };
4353
4354 /** \brief PacketGenerator capture packets response
4355     @param context - sender context, to match reply w/ request
4356     @param retval - return value for request
4357 */
4358 define pg_capture_reply
4359 {
4360   u32 context;
4361   i32 retval;
4362 };
4363
4364 /** \brief Enable / disable packet generator request
4365     @param client_index - opaque cookie to identify the sender
4366     @param context - sender context, to match reply w/ request
4367     @param is_enabled - 1 if enabling streams, 0 if disabling
4368     @param stream - stream name to be enable/disabled, if not specified handle all streams
4369 */
4370 define pg_enable_disable
4371 {
4372   u32 client_index;
4373   u32 context;
4374   u8 is_enabled;
4375   u32 stream_name_length;
4376   u8 stream_name[stream_name_length];
4377 };
4378
4379 /** \brief Reply for enable / disable packet generator
4380     @param context - returned sender context, to match reply w/ request
4381     @param retval - return code
4382 */
4383 define pg_enable_disable_reply
4384 {
4385   u32 context;
4386   i32 retval;
4387 };
4388
4389 /** \brief Configure IP source and L4 port-range check
4390     @param client_index - opaque cookie to identify the sender
4391     @param context - sender context, to match reply w/ request
4392     @param is_ip6 - 1 if source address type is IPv6
4393     @param is_add - 1 if add, 0 if delete
4394     @param mask_length - mask length for address entry
4395     @param address - array of address bytes
4396     @param number_of_ranges - length of low_port and high_port arrays (must match)
4397     @param low_ports[32] - up to 32 low end of port range entries (must have corresponding high_ports entry)
4398     @param high_ports[32] - up to 32 high end of port range entries (must have corresponding low_ports entry)
4399     @param vrf_id - fib table/vrf id to associate the source and port-range check with
4400     @note To specify a single port set low_port and high_port entry the same
4401 */
4402 define ip_source_and_port_range_check_add_del
4403 {
4404   u32 client_index;
4405   u32 context;
4406   u8 is_ipv6;
4407   u8 is_add;
4408   u8 mask_length;
4409   u8 address[16];
4410   u8 number_of_ranges;
4411   u16 low_ports[32];
4412   u16 high_ports[32];
4413   u32 vrf_id;
4414 };
4415
4416 /** \brief Configure IP source and L4 port-range check reply
4417     @param context - returned sender context, to match reply w/ request
4418     @param retval - return code
4419 */
4420 define ip_source_and_port_range_check_add_del_reply
4421 {
4422   u32 context;
4423   i32 retval;
4424 };
4425
4426 /** \brief Set interface source and L4 port-range request
4427     @param client_index - opaque cookie to identify the sender
4428     @param context - sender context, to match reply w/ request
4429     @param interface_id - interface index
4430     @param tcp_vrf_id - VRF associated with source and TCP port-range check
4431     @param udp_vrf_id - VRF associated with source and TCP port-range check
4432 */
4433 define ip_source_and_port_range_check_interface_add_del
4434 {
4435   u32 client_index;
4436   u32 context;
4437   u8 is_add;
4438   u32 sw_if_index;
4439   u32 tcp_in_vrf_id;
4440   u32 tcp_out_vrf_id;
4441   u32 udp_in_vrf_id;
4442   u32 udp_out_vrf_id;
4443 };
4444
4445 /** \brief Set interface source and L4 port-range response
4446     @param context - sender context, to match reply w/ request
4447     @param retval - return value for request
4448 */
4449 define ip_source_and_port_range_check_interface_add_del_reply
4450 {
4451   u32 context;
4452   i32 retval;
4453 };
4454
4455 /** \brief Add / del ipsec gre tunnel request
4456     @param client_index - opaque cookie to identify the sender
4457     @param context - sender context, to match reply w/ request
4458     @param local_sa_id - local SA id
4459     @param remote_sa_id - remote SA id
4460     @param is_add - 1 if adding the tunnel, 0 if deleting
4461     @param src_address - tunnel source address
4462     @param dst_address - tunnel destination address
4463 */
4464 define ipsec_gre_add_del_tunnel {
4465     u32 client_index;
4466     u32 context;
4467     u32 local_sa_id;
4468     u32 remote_sa_id;
4469     u8 is_add;
4470     u8 src_address[4];
4471     u8 dst_address[4];
4472 };
4473
4474 /** \brief Reply for add / del ipsec gre tunnel request
4475     @param context - returned sender context, to match reply w/ request
4476     @param retval - return code
4477     @param sw_if_index - software index of the new ipsec gre tunnel
4478 */
4479 define ipsec_gre_add_del_tunnel_reply {
4480     u32 context;
4481     i32 retval;
4482     u32 sw_if_index;
4483 };
4484
4485 /** \brief Dump ipsec gre tunnel table
4486     @param client_index - opaque cookie to identify the sender
4487     @param context - sender context, to match reply w/ request
4488     @param tunnel_index - gre tunnel identifier or -1 in case of all tunnels
4489 */
4490 define ipsec_gre_tunnel_dump {
4491     u32 client_index;
4492     u32 context;
4493     u32 sw_if_index;
4494 };
4495
4496 /** \brief mpls gre tunnel operational state response
4497     @param context - returned sender context, to match reply w/ request
4498     @param sw_if_index - software index of the ipsec gre tunnel
4499     @param local_sa_id - local SA id
4500     @param remote_sa_id - remote SA id
4501     @param src_address - tunnel source address
4502     @param dst_address - tunnel destination address
4503 */
4504 define ipsec_gre_tunnel_details {
4505     u32 context;
4506     u32 sw_if_index;
4507     u32 local_sa_id;
4508     u32 remote_sa_id;
4509     u8 src_address[4];
4510     u8 dst_address[4];
4511 };
4512
4513 /** \brief Delete sub interface request
4514     @param client_index - opaque cookie to identify the sender
4515     @param context - sender context, to match reply w/ request
4516     @param sw_if_index - sw index of the interface that was created by create_subif
4517 */
4518 define delete_subif {
4519   u32 client_index;
4520   u32 context;
4521   u32 sw_if_index;
4522 };
4523
4524 /** \brief Delete sub interface response
4525     @param context - sender context, to match reply w/ request
4526     @param retval - return code for the request
4527 */
4528 define delete_subif_reply {
4529   u32 context;
4530   i32 retval;
4531 };
4532
4533 /** \brief DPDK interface HQoS pipe profile set request
4534     @param client_index - opaque cookie to identify the sender
4535     @param context - sender context, to match reply w/ request
4536     @param sw_if_index - the interface
4537     @param subport - subport ID
4538     @param pipe - pipe ID within its subport
4539     @param profile - pipe profile ID
4540 */
4541 define sw_interface_set_dpdk_hqos_pipe {
4542     u32 client_index;
4543     u32 context;
4544     u32 sw_if_index;
4545     u32 subport;
4546     u32 pipe;
4547     u32 profile;
4548 };
4549
4550 /** \brief DPDK interface HQoS pipe profile set reply
4551     @param context - sender context, to match reply w/ request
4552     @param retval - request return code
4553 */
4554 define sw_interface_set_dpdk_hqos_pipe_reply {
4555     u32 context;
4556     i32 retval;
4557 };
4558
4559 /** \brief DPDK interface HQoS subport parameters set request
4560     @param client_index - opaque cookie to identify the sender
4561     @param context - sender context, to match reply w/ request
4562     @param sw_if_index - the interface
4563     @param subport - subport ID
4564     @param tb_rate - subport token bucket rate (measured in bytes/second)
4565     @param tb_size - subport token bucket size (measured in credits)
4566     @param tc_rate - subport traffic class 0 .. 3 rates (measured in bytes/second)
4567     @param tc_period - enforcement period for rates (measured in milliseconds)
4568 */
4569 define sw_interface_set_dpdk_hqos_subport {
4570     u32 client_index;
4571     u32 context;
4572     u32 sw_if_index;
4573     u32 subport;
4574     u32 tb_rate;
4575     u32 tb_size;
4576     u32 tc_rate[4];
4577     u32 tc_period;
4578 };
4579
4580 /** \brief DPDK interface HQoS subport parameters set reply
4581     @param context - sender context, to match reply w/ request
4582     @param retval - request return code
4583 */
4584 define sw_interface_set_dpdk_hqos_subport_reply {
4585     u32 context;
4586     i32 retval;
4587 };
4588
4589 /** \brief DPDK interface HQoS tctbl entry set request
4590     @param client_index - opaque cookie to identify the sender
4591     @param context - sender context, to match reply w/ request
4592     @param sw_if_index - the interface
4593     @param entry - entry index ID
4594     @param tc - traffic class (0 .. 3)
4595     @param queue - traffic class queue (0 .. 3)
4596 */
4597 define sw_interface_set_dpdk_hqos_tctbl {
4598     u32 client_index;
4599     u32 context;
4600     u32 sw_if_index;
4601     u32 entry;
4602     u32 tc;
4603     u32 queue;
4604 };
4605
4606 /** \brief DPDK interface HQoS tctbl entry set reply
4607     @param context - sender context, to match reply w/ request
4608     @param retval - request return code
4609 */
4610 define sw_interface_set_dpdk_hqos_tctbl_reply {
4611     u32 context;
4612     i32 retval;
4613 };
4614
4615 /** \brief L2 interface pbb tag rewrite configure request
4616     @param client_index - opaque cookie to identify the sender
4617     @param context - sender context, to match reply w/ request
4618     @param sw_if_index - interface the operation is applied to
4619     @param vtr_op - Choose from l2_vtr_op_t enum values
4620     @param inner_tag - needed for translate_qinq vtr op only
4621     @param outer_tag - needed for translate_qinq vtr op only 
4622     @param b_dmac - B-tag remote mac address, needed for any push or translate_qinq vtr op
4623     @param b_smac - B-tag local mac address, needed for any push or translate qinq vtr op
4624     @param b_vlanid - B-tag vlanid, needed for any push or translate qinq vtr op
4625     @param i_sid - I-tag service id, needed for any push or translate qinq vtr op
4626 */
4627 define l2_interface_pbb_tag_rewrite
4628 {
4629   u32 client_index;
4630   u32 context;
4631   u32 sw_if_index;
4632   u32 vtr_op;
4633   u16 outer_tag;
4634   u8  b_dmac[6];
4635   u8  b_smac[6];
4636   u16 b_vlanid;
4637   u32 i_sid;
4638 };
4639
4640 /** \brief L2 interface pbb tag rewrite response
4641     @param context - sender context, to match reply w/ request
4642     @param retval - return code for the request
4643 */
4644 define l2_interface_pbb_tag_rewrite_reply
4645 {
4646   u32 context;
4647   i32 retval;
4648 };
4649
4650 /** \brief Punt traffic to the host
4651     @param client_index - opaque cookie to identify the sender
4652     @param context - sender context, to match reply w/ request
4653     @param is_add - add punt if non-zero, else delete
4654     @param ipv - L3 protocol 4 - IPv4, 6 - IPv6, ~0 - All
4655     @param l4_protocol - L4 protocol to be punted, only UDP (0x11) is supported
4656     @param l4_port - TCP/UDP port to be punted
4657 */
4658 define punt {
4659     u32 client_index;
4660     u32 context;
4661     u8 is_add;
4662     u8 ipv;
4663     u8 l4_protocol;
4664     u16 l4_port;
4665 };
4666
4667 /** \brief Reply to the punt request
4668     @param context - sender context which was passed in the request
4669     @param retval - return code of punt request
4670 */
4671 define punt_reply
4672 {
4673     u32 context;
4674     i32 retval;
4675 };
4676
4677 /** \brief Dump ipsec policy database data
4678     @param client_index - opaque cookie to identify the sender
4679     @param context - sender context, to match reply w/ request
4680     @param spd_id - SPD instance id
4681     @param sa_id - SA id, optional, set to ~0 to see all policies in SPD
4682 */
4683 define ipsec_spd_dump {
4684     u32 client_index;
4685     u32 context;
4686     u32 spd_id;
4687     u32 sa_id;
4688 };
4689
4690 /** \brief IPsec policy database response
4691     @param context - sender context which was passed in the request
4692     @param spd_id - SPD instance id
4693     @param priority - numeric value to control policy evaluation order
4694     @param is_outbound - [1|0] to indicate if direction is [out|in]bound
4695     @param is_ipv6 - [1|0] to indicate if address family is ipv[6|4]
4696     @param local_start_addr - first address in local traffic selector range
4697     @param local_stop_addr - last address in local traffic selector range
4698     @param local_start_port - first port in local traffic selector range
4699     @param local_stop_port - last port in local traffic selector range
4700     @param remote_start_addr - first address in remote traffic selector range
4701     @param remote_stop_addr - last address in remote traffic selector range
4702     @param remote_start_port - first port in remote traffic selector range
4703     @param remote_stop_port - last port in remote traffic selector range
4704     @param protocol - traffic selector protocol
4705     @param policy - policy action
4706     @param sa_id - SA id
4707     @param bytes - byte count of packets matching this policy
4708     @param packets - count of packets matching this policy
4709 */
4710
4711 define ipsec_spd_details {
4712     u32 context;
4713     u32 spd_id;
4714     i32 priority;
4715     u8 is_outbound;
4716     u8 is_ipv6;
4717     u8 local_start_addr[16];
4718     u8 local_stop_addr[16];
4719     u16 local_start_port;
4720     u16 local_stop_port;
4721     u8 remote_start_addr[16];
4722     u8 remote_stop_addr[16];
4723     u16 remote_start_port;
4724     u16 remote_stop_port;
4725     u8 protocol;
4726     u8 policy;
4727     u32 sa_id;
4728     u64 bytes;
4729     u64 packets;
4730 };
4731
4732 /** \brief Feature path enable/disable request
4733     @param client_index - opaque cookie to identify the sender
4734     @param context - sender context, to match reply w/ request
4735     @param sw_if_index - the interface
4736     @param enable - 1 = on, 0 = off
4737 */
4738 define feature_enable_disable {
4739     u32 client_index;
4740     u32 context;
4741     u32 sw_if_index;
4742     u8 enable;
4743     u8 arc_name[64];
4744     u8 feature_name[64];
4745 };
4746
4747 /** \brief Reply to the eature path enable/disable request
4748     @param context - sender context which was passed in the request
4749     @param retval - return code for the request
4750 */
4751 define feature_enable_disable_reply
4752 {
4753     u32 context;
4754     i32 retval;
4755 };
4756
4757 /*
4758  * Local Variables:
4759  * eval: (c-set-style "gnu")
4760  * End:
4761  */