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