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