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