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