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