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