Remove historical netconf message switch APIs
[vpp.git] / vpp / api / vpe.api
1 /* Hey Emacs use -*- mode: C -*- */
2 /*
3  * Copyright (c) 2015 Cisco and/or its affiliates.
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at:
7  *
8  *     http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 /** \file
18
19     This file defines vpe control-plane API messages which are generally
20     called through a shared memory interface. 
21 */
22
23
24 /** \brief Register for interface events
25     @param client_index - opaque cookie to identify the sender
26     @param context - sender context, to match reply w/ request
27     @param enable_disable - 1 => register for events, 0 => cancel registration
28     @param pid - sender's pid
29 */
30 define want_interface_events {
31     u32 client_index;
32     u32 context;
33     u32 enable_disable;
34     u32 pid;
35 };
36
37 /** \brief Reply for interface events registration
38     @param context - returned sender context, to match reply w/ request
39     @param retval - return code
40 */
41 define want_interface_events_reply {
42     u32 context;
43     i32 retval;
44 };
45
46 /** \brief Interface details structure (fix this) 
47     @param sw_if_index - index of the interface
48     @param sup_sw_if_index - index of parent interface if any, else same as sw_if_index  
49     @param l2_address_length - length of the interface's l2 address
50     @param pid - the interface's l2 address
51     @param interface_name - name of the interface
52     @param link_duplex - 1 if half duplex, 2 if full duplex
53     @param link_speed - 1 = 10M, 2 = 100M, 4 = 1G, 8 = 10G, 16 = 40G, 32 = 100G
54     @param link_MTU - max. transmittion unit 
55     @param sub_if_id - A number 0-N to uniquely identify this subif on super if
56     @param sub_dot1ad -  0 = dot1q, 1=dot1ad
57     @param sub_number_of_tags - Number of tags (0 - 2)
58     @param sub_outer_vlan_id
59     @param sub_inner_vlan_id
60     @param sub_exact_match
61     @param sub_default
62     @param sub_outer_vlan_id_any
63     @param sub_inner_vlan_id_any
64     @param vtr_op - vlan tag rewrite operation
65     @param vtr_push_dot1q
66     @param vtr_tag1
67     @param vtr_tag2
68 */
69 manual_java define sw_interface_details {
70     u32 sw_if_index;
71
72     /* index of sup interface (e.g. hw interface).
73        equal to sw_if_index for super hw interface. */
74     u32 sup_sw_if_index;
75
76     /* Layer 2 address, if applicable */
77     u32 l2_address_length;
78     u8 l2_address[8];
79     
80     /* Interface name */
81     u8 interface_name[64];
82
83     /* 1 = up, 0 = down */
84     u8 admin_up_down;
85     u8 link_up_down;
86
87     /* 1 = half duplex, 2 = full duplex */
88     u8 link_duplex;
89
90     /* 1 = 10M, 2 = 100M, 4 = 1G, 8 = 10G, 16 = 40G, 32 = 100G */
91     u8 link_speed;
92     
93     /* MTU */
94     u16 link_mtu;
95
96     /* Subinterface ID. A number 0-N to uniquely identify this subinterface under the super interface*/
97     u32 sub_id;
98
99     /* 0 = dot1q, 1=dot1ad */
100     u8 sub_dot1ad;
101
102     /* Number of tags 0-2 */
103     u8 sub_number_of_tags;
104     u16 sub_outer_vlan_id;
105     u16 sub_inner_vlan_id;
106     u8 sub_exact_match;
107     u8 sub_default;
108     u8 sub_outer_vlan_id_any;
109     u8 sub_inner_vlan_id_any;
110
111     /* vlan tag rewrite state */
112     u32 vtr_op;
113     u32 vtr_push_dot1q; // ethertype of first pushed tag is dot1q/dot1ad
114     u32 vtr_tag1;       // first pushed tag
115     u32 vtr_tag2;       // second pushed tag
116 };
117
118 /** \brief Set flags on the interface
119     @param client_index - opaque cookie to identify the sender
120     @param context - sender context, to match reply w/ request
121     @param sw_if_index - index of the interface to set flags on
122     @param admin_up_down - set the admin state, 1 = up, 0 = down
123     @param link_up_down - Oper state sent on change event, not used in config.
124     @param deleted - interface was deleted
125 */
126 define sw_interface_set_flags {
127     u32 client_index;
128     u32 context;
129     u32 sw_if_index;
130     /* 1 = up, 0 = down */
131     u8 admin_up_down;
132     u8 link_up_down;
133     u8 deleted;
134 };
135
136 /** \brief Reply to sw_interface_set_flags 
137     @param context - sender context which was passed in the request
138     @param retval - return code of the set flags request
139 */
140 define sw_interface_set_flags_reply {
141     u32 context;
142     i32 retval;
143 };
144
145 /* works */
146 manual_java define sw_interface_dump {
147     u32 client_index;
148     u32 context;
149     u8 name_filter_valid;
150     u8 name_filter[49];
151 };
152
153 /** \brief Set or delete one or all ip addresses on a specified interface
154     @param client_index - opaque cookie to identify the sender
155     @param context - sender context, to match reply w/ request
156     @param sw_if_index - index of the interface to add/del addresses 
157     @param is_add - add address if non-zero, else delete
158     @param is_ipv6 - if non-zero the address is ipv6, else ipv4
159     @param del_all - if non-zero delete all addresses on the interface
160     @param address_length - address length in bytes, 4 for ip4, 16 for ip6
161     @param address - array of address bytes
162 */
163 define sw_interface_add_del_address {
164     u32 client_index;
165     u32 context;
166     u32 sw_if_index;
167     u8 is_add;
168     u8 is_ipv6;
169     u8 del_all;
170     u8 address_length;
171     u8 address[16];
172 };
173
174 /** \brief Reply for interface events registration
175     @param context - returned sender context, to match reply w/ request
176     @param retval - return code
177 */
178 define sw_interface_add_del_address_reply {
179     u32 context;
180     i32 retval;
181 };
182
183 /** \brief Associate the specified interface with a fib table
184     @param client_index - opaque cookie to identify the sender
185     @param context - sender context, to match reply w/ request
186     @param sw_if_index - index of the interface
187     @param is_ipv6 - if non-zero ipv6, else ipv4
188     @param vrf_id - fib table/vrd id to associate the interface with
189 */
190 define sw_interface_set_table {
191     u32 client_index;
192     u32 context;
193     u32 sw_if_index;
194     u8 is_ipv6;
195     u32 vrf_id;
196 };
197
198 /** \brief Reply for interface events registration
199     @param context - returned sender context, to match reply w/ request
200     @param retval - return code
201 */
202 define sw_interface_set_table_reply {
203     u32 context;
204     i32 retval;
205 };
206
207 /** \brief Initialize a new tap interface with the given paramters 
208     @param client_index - opaque cookie to identify the sender
209     @param context - sender context, to match reply w/ request
210     @param use_random_mac - let the system generate a unique mac address
211     @param tap_name - name to associate with the new interface
212     @param mac_address - mac addr to assign to the interface if use_radom not set
213 */
214 define tap_connect {
215     u32 client_index;
216     u32 context;
217     u8 use_random_mac;
218     u8 tap_name [64];
219     u8 mac_address[6];
220     u8 renumber;
221     u32 custom_dev_instance;
222 };
223
224 /** \brief Reply for tap connect request
225     @param context - returned sender context, to match reply w/ request
226     @param retval - return code
227     @param sw_if_index - software index allocated for the new tap interface
228 */
229 define tap_connect_reply {
230     u32 context;
231     i32 retval;
232     u32 sw_if_index;
233 };
234
235 /** \brief Modify a tap interface with the given paramters 
236     @param client_index - opaque cookie to identify the sender
237     @param context - sender context, to match reply w/ request
238     @param sw_if_index - interface index of existing tap interface
239     @param use_random_mac - let the system generate a unique mac address
240     @param tap_name - name to associate with the new interface
241     @param mac_address - mac addr to assign to the interface if use_radom not set
242 */
243 define tap_modify {
244     u32 client_index;
245     u32 context;
246     u32 sw_if_index;
247     u8 use_random_mac;
248     u8 tap_name [64];
249     u8 mac_address[6];
250     u8 renumber;
251     u32 custom_dev_instance;
252 };
253
254 /** \brief Reply for tap modify request
255     @param context - returned sender context, to match reply w/ request
256     @param retval - return code
257     @param sw_if_index - software index if the modified tap interface
258 */
259 define tap_modify_reply {
260     u32 context;
261     i32 retval;
262     u32 sw_if_index;
263 };
264
265 /** \brief Delete tap interface
266     @param client_index - opaque cookie to identify the sender
267     @param context - sender context, to match reply w/ request
268     @param sw_if_index - interface index of existing tap interface
269 */
270 define tap_delete {
271     u32 client_index;
272     u32 context;
273     u32 sw_if_index;
274 };
275
276 /** \brief Reply for tap delete request
277     @param context - returned sender context, to match reply w/ request
278     @param retval - return code
279 */
280 define tap_delete_reply {
281     u32 context;
282     i32 retval;
283 };
284
285 /** \brief Dump tap interfaces request */
286 define sw_interface_tap_dump {
287     u32 client_index;
288     u32 context;
289 };
290
291 /** \brief Reply for tap dump request
292     @param sw_if_index - software index of tap interface
293     @param dev_name - Linux tap device name
294 */
295 manual_java define sw_interface_tap_details {
296     u32 context;
297     u32 sw_if_index;
298     u8 dev_name[64];
299 };
300
301 /** \brief Create a new subinterface with the given vlan id
302     @param client_index - opaque cookie to identify the sender
303     @param context - sender context, to match reply w/ request
304     @param sw_if_index - software index of the new vlan's parent interface
305     @param vlan_id - vlan tag of the new interface
306 */
307 define create_vlan_subif {
308     u32 client_index;
309     u32 context;
310     u32 sw_if_index;
311     u32 vlan_id;
312 };
313
314 /** \brief Reply for the vlan subinterface create request
315     @param context - returned sender context, to match reply w/ request
316     @param retval - return code
317     @param sw_if_index - software index allocated for the new subinterface
318 */
319 define create_vlan_subif_reply {
320     u32 context;
321     i32 retval;
322     u32 sw_if_index;
323 };
324
325 /** \brief Add / del route request
326     @param client_index - opaque cookie to identify the sender
327     @param context - sender context, to match reply w/ request
328     @param sw_if_index - software index of the new vlan's parent interface
329     @param vrf_id - fib table /vrf associated with the route
330     @param lookup_in_vrf - 
331     @param resolve_attempts - 
332     @param classify_table_index - 
333     @param create_vrf_if_needed - 
334     @param resolve_if_needed - 
335     @param is_add - 1 if adding the route, 0 if deleting
336     @param is_drop - 
337     @param is_ipv6 - 0 if an ip4 route, else ip6
338     @param is_local - 
339     @param is_classify - 
340     @param is_multipath - Set to 1 if this is a multipath route, else 0
341     @param not_last - Is last or not last msg in group of multiple add/del msgs
342     @param next_hop_weight - 
343     @param dst_address_length - 
344     @param dst_address[16] - 
345     @param next_hop_address[16] - 
346 */
347 define ip_add_del_route {
348     u32 client_index;
349     u32 context;
350     u32 next_hop_sw_if_index;
351     u32 vrf_id;
352     u32 lookup_in_vrf;
353     u32 resolve_attempts;
354     u32 classify_table_index;
355     u8 create_vrf_if_needed;
356     u8 resolve_if_needed;
357     u8 is_add;
358     u8 is_drop;
359     u8 is_ipv6;
360     u8 is_local;
361     u8 is_classify;
362     /* Is last/not-last message in group of multiple add/del messages. */
363     u8 is_multipath;
364     u8 not_last;
365     u8 next_hop_weight;
366     u8 dst_address_length;
367     u8 dst_address[16];
368     u8 next_hop_address[16];
369 };
370
371 /** \brief Reply for add / del route request
372     @param context - returned sender context, to match reply w/ request
373     @param retval - return code
374 */
375 define ip_add_del_route_reply {
376     u32 context;
377     i32 retval;
378 };
379
380 /* works */
381 /** \brief Add / del gre tunnel request
382     @param client_index - opaque cookie to identify the sender
383     @param context - sender context, to match reply w/ request
384     @param sw_if_index - software index of the new vlan's parent interface
385     @param inner_vrf_id -
386     @param outer_vrf_id - 
387     @param is_add - 1 if adding the tunnel, 0 if deleting
388     @param src_address[4] - tunnel source address
389     @param dst_address[4] - tunnel destination address
390     @param intf_address - 
391     @param intf_address_length - 
392 */
393 define mpls_gre_add_del_tunnel {
394     u32 client_index;
395     u32 context;
396     u32 inner_vrf_id;
397     u32 outer_vrf_id;
398     u8 is_add;
399     u8 l2_only;
400     u8 src_address[4];
401     u8 dst_address[4];
402     u8 intfc_address[4];
403     u8 intfc_address_length;
404 };
405
406 /** \brief Reply for add / del tunnel request
407     @param context - returned sender context, to match reply w/ request
408     @param retval - return code
409 */
410 define mpls_gre_add_del_tunnel_reply {
411     u32 context;
412     i32 retval;
413     u32 tunnel_sw_if_index;
414 };
415
416 /** \brief Add / del MPLS encapsulation request
417     @param client_index - opaque cookie to identify the sender
418     @param context - sender context, to match reply w/ request
419     @param vrf_id - vrf id
420     @param dst_address[4] - 
421     @param is_add - 1 if adding the encap, 0 if deleting
422     @param nlabels - number of labels 
423     @param labels - array of labels
424 */
425 define mpls_add_del_encap {
426     u32 client_index;
427     u32 context;
428     u32 vrf_id;
429     u8 dst_address[4];
430     /* 1 = add, 0 = delete */
431     u8 is_add;
432     u8 nlabels;
433     u32 labels[0];
434 }; 
435
436 /** \brief Reply for add / del encapsulation request
437     @param context - returned sender context, to match reply w/ request
438     @param retval - return code
439 */
440 define mpls_add_del_encap_reply {
441     u32 context;
442     i32 retval;
443 };
444
445 /** \brief Add / del MPLS decapsulation request
446     @param client_index - opaque cookie to identify the sender
447     @param context - sender context, to match reply w/ request
448     @param rx_vrf_id - receive vrf
449     @param tx_vrf_id - transmit vrf
450     @param label - 
451     @param next_index - 
452     @param s_bit - 
453     @param is_add - 1 if adding the encap, 0 if deleting
454 */
455 define mpls_add_del_decap {
456     u32 client_index;
457     u32 context;
458     u32 rx_vrf_id;
459     u32 tx_vrf_id;
460     u32 label;
461     u32 next_index;
462     u8 s_bit;
463     u8 is_add;
464 }; 
465
466 /** \brief Reply for MPLS decap add / del request
467     @param context - returned sender context, to match reply w/ request
468     @param retval - return code
469 */
470 define mpls_add_del_decap_reply {
471     u32 context;
472     i32 retval;
473 };
474
475 /** \brief Proxy ARP add / del request
476     @param client_index - opaque cookie to identify the sender
477     @param context - sender context, to match reply w/ request
478     @param vrf_id - VRF / Fib table ID
479     @param is_add - 1 if adding the Proxy ARP range, 0 if deleting
480     @param low_address[4] - Low address of the Proxy ARP range
481     @param hi_address[4] - High address of the Proxy ARP range
482 */
483 define proxy_arp_add_del {
484     u32 client_index;
485     u32 context;
486     u32 vrf_id;
487     u8 is_add;
488     u8 low_address[4];
489     u8 hi_address[4];
490 };
491
492 /** \brief Reply for proxy arp add / del request
493     @param context - returned sender context, to match reply w/ request
494     @param retval - return code
495 */
496 define proxy_arp_add_del_reply {
497     u32 context;
498     i32 retval;
499 };
500
501 /** \brief Proxy ARP add / del request
502     @param client_index - opaque cookie to identify the sender
503     @param context - sender context, to match reply w/ request
504     @param sw_if_index - Which interface to enable / disable Proxy Arp on
505     @param enable_disable - 1 to enable Proxy ARP on interface, 0 to disable
506 */
507 define proxy_arp_intfc_enable_disable {
508     u32 client_index;
509     u32 context;
510     u32 sw_if_index;
511     /* 1 = on, 0 = off */
512     u8 enable_disable;
513 };
514
515 /** \brief Reply for Proxy ARP interface enable / disable request
516     @param context - returned sender context, to match reply w/ request
517     @param retval - return code
518 */
519 define proxy_arp_intfc_enable_disable_reply {
520     u32 context;
521     i32 retval;
522 };
523
524 /** \brief IP neighbor add / del request
525     @param client_index - opaque cookie to identify the sender
526     @param context - sender context, to match reply w/ request
527     @param vrf_id - vrf_id, only for IP4
528     @param sw_if_index - interface used to reach neighbor
529     @param is_add - 1 to add neighbor, 0 to delete
530     @param is_ipv6 - 1 for IPv6 neighbor, 0 for IPv4
531     @param is_static - 
532     @param mac_address - l2 address of the neighbor
533     @param dst_address - ip4 or ip6 address of the neighbor
534 */
535 define ip_neighbor_add_del {
536     u32 client_index;
537     u32 context;
538     u32 vrf_id;                 /* only makes sense for ip4 */
539     u32 sw_if_index;
540     /* 1 = add, 0 = delete */
541     u8 is_add;
542     u8 is_ipv6;
543     u8 is_static;
544     u8 mac_address[6];
545     u8 dst_address[16];
546 };
547
548 /** \brief Reply for IP Neighbor add / delete request
549     @param context - returned sender context, to match reply w/ request
550     @param retval - return code
551 */
552 define ip_neighbor_add_del_reply {
553     u32 context;
554     i32 retval;
555 };
556
557 /** \brief Reset VRF (remove all routes etc) request
558     @param client_index - opaque cookie to identify the sender
559     @param context - sender context, to match reply w/ request
560     @param is_ipv6 - 1 for IPv6 neighbor, 0 for IPv4
561     @param vrf_id - ID of th FIB table / VRF to reset
562 */
563 define reset_vrf {
564     u32 client_index;
565     u32 context;
566     u8 is_ipv6;
567     u32 vrf_id;
568 }; 
569
570 /** \brief Reply for Reset VRF request
571     @param context - returned sender context, to match reply w/ request
572     @param retval - return code
573 */
574 define reset_vrf_reply {
575     u32 context;
576     i32 retval;
577 };
578
579 /** \brief Is Address Reachable request - DISABLED
580     @param client_index - opaque cookie to identify the sender
581     @param context - sender context, to match reply w/ request
582     @param next_hop_sw_if_index - index of interface used to get to next hop
583     @param is_ipv6 - 1 for IPv6, 0 for IPv4
584     @param is_error - address not found or does not match intf
585     @param address[] - Address in question 
586 */
587 define is_address_reachable {
588     u32 client_index;           /* (api_main_t *) am->my_client_index */
589     u32 context;
590     u32 next_hop_sw_if_index;
591     u8 is_known;                /* on reply, this is the answer */
592     u8 is_ipv6;
593     u8 is_error;                /* address not found or does not match intf */
594     u8 address[16];
595 };
596
597 /** \brief Want Stats, register for stats updates
598     @param client_index - opaque cookie to identify the sender
599     @param context - sender context, to match reply w/ request
600     @param enable_disable - 1 = enable stats, 0 = disable
601     @param pid - pid of process requesting stats updates
602 */
603 define want_stats {
604     u32 client_index;
605     u32 context;
606     u32 enable_disable;
607     u32 pid;
608 };
609
610 /** \brief Reply for Want Stats request
611     @param context - returned sender context, to match reply w/ request
612     @param retval - return code
613 */
614 manual_java define want_stats_reply {
615     u32 context;
616     i32 retval;
617 };
618
619 /** \brief Want stats counters structure 
620     @param vnet_counter_type- such as ip4, ip6, punts, etc
621     @param is_combined - rx & tx total (all types) counts   
622     @param first_sw_if_index - first sw index in block of index, counts
623     @param count - number of interfaces this stats block includes counters for
624     @param data - contiguous block of vlib_counter_t structures 
625 */
626 manual_java define vnet_interface_counters {
627     /* enums - plural - in vnet/interface.h */
628     u8 vnet_counter_type;
629     u8 is_combined;
630     u32 first_sw_if_index;
631     u32 count;
632     u8 data[0];
633 };
634
635 typeonly manual_print manual_endian define ip4_fib_counter {
636     u32 address;
637     u8 address_length;
638     u64 packets;
639     u64 bytes;
640 };
641
642 manual_java manual_print manual_endian define vnet_ip4_fib_counters {
643     u32 vrf_id;
644     u32 count;
645     vl_api_ip4_fib_counter_t c[0];
646 };
647
648 typeonly manual_print manual_endian define ip6_fib_counter {
649     u64 address[2];
650     u8 address_length;
651     u64 packets;
652     u64 bytes;
653 };
654
655 manual_java manual_print manual_endian define vnet_ip6_fib_counters {
656     u32 vrf_id;
657     u32 count;
658     vl_api_ip6_fib_counter_t c[0];
659 };
660
661 /** \brief Request for a single block of summary stats
662     @param client_index - opaque cookie to identify the sender
663     @param context - sender context, to match reply w/ request
664 */
665 define vnet_get_summary_stats {
666     u32 client_index;
667     u32 context;
668 };
669
670 /** \brief Reply for vnet_get_summary_stats request
671     @param context - sender context, to match reply w/ request
672     @param retval - return code for request
673     @param total_pkts -  
674     @param total_bytes -
675     @param vector_rate - 
676 */
677 define vnet_summary_stats_reply {
678     u32 context;
679     i32 retval;
680     u64 total_pkts[2];
681     u64 total_bytes[2];
682     f64 vector_rate; 
683 };
684
685 /** \brief OAM event structure
686     @param dst_address[] - 
687     @param state
688 */
689 manual_java define oam_event {
690     u8 dst_address[4];
691     u8 state;
692 };
693
694 /** \brief Want OAM events request
695     @param client_index - opaque cookie to identify the sender
696     @param context - sender context, to match reply w/ request
697     @param enable_disable- enable if non-zero, else disable
698     @param pid - pid of the requesting process
699 */
700 define want_oam_events {
701     u32 client_index;
702     u32 context;
703     u32 enable_disable;
704     u32 pid;
705 };
706
707 /** \brief Want OAM events response
708     @param context - sender context, to match reply w/ request
709     @param retval - return code for the want oam stats request
710 */
711 define want_oam_events_reply {
712     u32 context;
713     i32 retval;
714 };
715
716 /** \brief OAM add / del target request
717     @param client_index - opaque cookie to identify the sender
718     @param context - sender context, to match reply w/ request
719     @param vrf_id - vrf_id of the target
720     @param src_address[] - source address to use for the updates 
721     @param dst_address[] - destination address of the target
722     @param is_add - add target if non-zero, else delete
723 */
724 define oam_add_del {
725     u32 client_index;
726     u32 context;
727     u32 vrf_id;
728     u8 src_address[4];
729     u8 dst_address[4];
730     u8 is_add;
731 };
732
733 /** \brief OAM add / del target response
734     @param context - sender context, to match reply w/ request
735     @param retval - return code of the request
736 */
737 define oam_add_del_reply {
738     u32 context;
739     i32 retval;
740 };
741
742 /** \brief Reset fib table request
743     @param client_index - opaque cookie to identify the sender
744     @param context - sender context, to match reply w/ request
745     @param vrf_id - vrf/table id of the fib table to reset
746     @param is_ipv6 - an ipv6 fib to reset if non-zero, else ipv4
747 */
748 define reset_fib {
749     u32 client_index;
750     u32 context;
751     u32 vrf_id;
752     u8 is_ipv6;
753 };
754
755 /** \brief Reset fib response
756     @param context - sender context, to match reply w/ request
757     @param retval - return code for the reset bfib request
758 */
759 define reset_fib_reply {
760     u32 context;
761     i32 retval;
762 };
763
764 /** \brief DHCP Proxy config 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 vrf_id - vrf id
768     @param if_ipv6 - ipv6 if non-zero, else ipv4
769     @param is_add - add the config if non-zero, else delete
770     @param insert_circuit_id - option82 suboption 1 fib number
771     @param dhcp_server[] - server address
772     @param dhcp_src_address[] - <fix this, need details>
773 */
774 define dhcp_proxy_config {
775     u32 client_index;
776     u32 context;
777     u32 vrf_id;
778     u8 is_ipv6;
779     u8 is_add;
780     u8 insert_circuit_id;
781     u8 dhcp_server[16];
782     u8 dhcp_src_address[16];
783 };
784
785 /** \brief DHCP Proxy config response
786     @param context - sender context, to match reply w/ request
787     @param retval - return code for the request
788 */
789 define dhcp_proxy_config_reply {
790     u32 context;
791     i32 retval;
792 };
793
794 /** \brief DHCP Proxy set / unset vss request
795     @param client_index - opaque cookie to identify the sender
796     @param context - sender context, to match reply w/ request
797     @param tbl_id - table id
798     @param oui - first part of vpn id
799     @param fib_id - second part of vpn id
800     @param is_ipv6 - ip6 if non-zero, else ip4
801     @param is_add - set vss if non-zero, else delete
802 */
803 define dhcp_proxy_set_vss {
804     u32 client_index;
805     u32 context;
806     u32 tbl_id;
807     u32 oui;
808     u32 fib_id;
809     u8 is_ipv6;
810     u8 is_add;
811 };
812
813 /** \brief DHCP proxy set / unset vss response
814     @param context - sender context, to match reply w/ request
815     @param retval - return code for the request
816 */
817 define dhcp_proxy_set_vss_reply {
818     u32 context;
819     i32 retval;
820 };
821
822 /** \brief Set the ip flow hash config for a fib request
823     @param client_index - opaque cookie to identify the sender
824     @param context - sender context, to match reply w/ request
825     @param vrf_id - vrf/fib id
826     @param is_ipv6 - if non-zero the fib is ip6, else ip4
827     @param src - if non-zero include src in flow hash
828     @param dst - if non-zero include dst in flow hash
829     @param sport - if non-zero include sport in flow hash
830     @param dport - if non-zero include dport in flow hash
831     @param proto -if non-zero include proto in flow hash
832     @param reverse - if non-zero include reverse in flow hash
833 */
834 define set_ip_flow_hash {
835     u32 client_index;
836     u32 context;
837     u32 vrf_id;
838     u8 is_ipv6;
839     u8 src;
840     u8 dst;
841     u8 sport;
842     u8 dport;
843     u8 proto;
844     u8 reverse;
845 };
846
847 /** \brief Set the ip flow hash config for a fib response
848     @param context - sender context, to match reply w/ request
849     @param retval - return code for the request
850 */
851 define set_ip_flow_hash_reply {
852     u32 context;
853     i32 retval;
854 };
855
856 /** \brief IPv6 router advertisement config request
857     @param client_index - opaque cookie to identify the sender
858     @param context - sender context, to match reply w/ request
859     @param surpress -
860     @param managed -
861     @param other -
862     @param ll_option -
863     @param send_unicast -
864     @param cease -
865     @param is_no -
866     @param default_router -
867     @param max_interval -
868     @param min_interval -
869     @param lifetime -
870     @param initial_count -
871     @param initial_interval -
872 */
873 define sw_interface_ip6nd_ra_config {
874     u32 client_index;
875     u32 context;
876     u32 sw_if_index;
877     u8 surpress;
878     u8  managed;
879     u8 other;
880     u8 ll_option;
881     u8 send_unicast;
882     u8 cease;
883     u8 is_no;
884     u8 default_router;
885     u32 max_interval;
886     u32 min_interval;
887     u32 lifetime;
888     u32 initial_count;
889     u32 initial_interval;
890 };
891
892 /** \brief IPv6 router advertisement config response
893     @param context - sender context, to match reply w/ request
894     @param retval - return code for the request
895 */
896 define sw_interface_ip6nd_ra_config_reply {
897     u32 context;
898     i32 retval;
899 };
900
901 /** \brief IPv6 router advertisement prefix config request
902     @param client_index - opaque cookie to identify the sender
903     @param context - sender context, to match reply w/ request
904     @param sw_if_index - 
905     @param address[] -
906     @param address_length -
907     @param use_default -
908     @param no_advertise -
909     @param off_link -
910     @param no_autoconfig -
911     @param no_onlink -
912     @param is_no -
913     @param val_lifetime -
914     @param pref_lifetime -
915 */
916 define sw_interface_ip6nd_ra_prefix {
917     u32 client_index;
918     u32 context;
919     u32 sw_if_index;
920     u8 address[16];
921     u8 address_length;
922     u8 use_default;
923     u8 no_advertise;
924     u8 off_link;
925     u8 no_autoconfig;
926     u8 no_onlink;
927     u8 is_no;
928     u32 val_lifetime;
929     u32 pref_lifetime;
930 };
931
932 /** \brief IPv6 router advertisement prefix config response
933     @param context - sender context, to match reply w/ request
934     @param retval - return code for the request
935 */
936 define sw_interface_ip6nd_ra_prefix_reply {
937     u32 context;
938     i32 retval;
939 };
940
941 /** \brief IPv6 interface enable / disable request
942     @param client_index - opaque cookie to identify the sender
943     @param context - sender context, to match reply w/ request
944     @param sw_if_index - interface used to reach neighbor
945     @param enable - if non-zero enable ip6 on interface, else disable
946 */
947 define sw_interface_ip6_enable_disable  {
948     u32 client_index;
949     u32 context;
950     u32 sw_if_index;
951     u8 enable;                        /* set to true if enable*/
952 };
953
954 /** \brief IPv6 interface enable / disable response
955     @param context - sender context, to match reply w/ request
956     @param retval - return code for the request
957 */
958 define  sw_interface_ip6_enable_disable_reply {
959     u32 context;
960     i32 retval;
961 };
962
963 /** \brief IPv6 set link local address on interface request
964     @param client_index - opaque cookie to identify the sender
965     @param context - sender context, to match reply w/ request
966     @param sw_if_index - interface to set link local on
967     @param address[] - the new link local address
968     @param address_length - link local address length
969 */
970 define sw_interface_ip6_set_link_local_address  {
971     u32 client_index;
972     u32 context;
973     u32 sw_if_index;
974     u8 address[16];
975     u8 address_length;
976 };
977
978 /** \brief IPv6 set link local address on interface response
979     @param context - sender context, to match reply w/ request
980     @param retval - error code for the request
981 */
982 define  sw_interface_ip6_set_link_local_address_reply {
983     u32 context;
984     i32 retval;
985 };
986
987 /** \brief Set unnumbered interface add / del request
988     @param client_index - opaque cookie to identify the sender
989     @param context - sender context, to match reply w/ request
990     @param sw_if_index - interface with an IP address
991     @param unnumbered_sw_if_index - interface which will use the address
992     @param is_add - if non-zero set the association, else unset it
993 */
994 define sw_interface_set_unnumbered {
995     u32 client_index;
996     u32 context;
997     u32 sw_if_index;            /* use this intfc address */
998     u32 unnumbered_sw_if_index; /* on this interface */
999     u8 is_add;
1000 };
1001
1002 /** \brief Set unnumbered interface add / del response
1003     @param context - sender context, to match reply w/ request
1004     @param retval - return code for the request
1005 */
1006 define  sw_interface_set_unnumbered_reply {
1007     u32 context;
1008     i32 retval;
1009 };
1010
1011 /** \brief Create loopback interface request
1012     @param client_index - opaque cookie to identify the sender
1013     @param context - sender context, to match reply w/ request
1014     @param mac_address - mac addr to assign to the interface if none-zero
1015 */
1016 define create_loopback {
1017     u32 client_index;
1018     u32 context;
1019     u8  mac_address[6];
1020 };
1021
1022 /** \brief Create loopback interface response
1023     @param context - sender context, to match reply w/ request
1024     @param sw_if_index - sw index of the interface that was created
1025     @param retval - return code for the request
1026 */
1027 define create_loopback_reply {
1028     u32 context;
1029     i32 retval;
1030     u32 sw_if_index;
1031 };
1032
1033 /** \brief Delete loopback interface request
1034     @param client_index - opaque cookie to identify the sender
1035     @param context - sender context, to match reply w/ request
1036     @param sw_if_index - sw index of the interface that was created
1037 */
1038 define delete_loopback {
1039     u32 client_index;
1040     u32 context;
1041     u32 sw_if_index;
1042 };
1043
1044 /** \brief Delete loopback interface response
1045     @param context - sender context, to match reply w/ request
1046     @param retval - return code for the request
1047 */
1048 define delete_loopback_reply {
1049     u32 context;
1050     i32 retval;
1051 };
1052
1053 /** \brief Control ping from client to api server request
1054     @param client_index - opaque cookie to identify the sender
1055     @param context - sender context, to match reply w/ request
1056 */
1057 manual_java define control_ping {
1058     u32 client_index;
1059     u32 context;
1060 };
1061
1062 /** \brief Control ping from the client to the server response
1063     @param client_index - opaque cookie to identify the sender
1064     @param context - sender context, to match reply w/ request
1065     @param retval - return code for the request
1066     @param vpe_pid - the pid of the vpe, returned by the server
1067 */
1068 manual_java define control_ping_reply {
1069     u32 context;
1070     i32 retval;
1071     u32 client_index;
1072     u32 vpe_pid;
1073 };
1074
1075 /** \brief Process a vpe parser cli string request
1076     @param client_index - opaque cookie to identify the sender
1077     @param context - sender context, to match reply w/ request
1078     @param cmd_in_shmem - pointer to cli command string
1079 */
1080 define cli_request {
1081     u32 client_index;
1082     u32 context;
1083     u64 cmd_in_shmem;
1084 };
1085
1086 /** \brief vpe parser cli string response
1087     @param context - sender context, to match reply w/ request
1088     @param retval - return code for request
1089     @param reply_in_shmem - Reply string from cli processing if any
1090 */
1091 define cli_reply {
1092     u32 context;
1093     u32 retval;
1094     u64 reply_in_shmem;
1095 };
1096
1097 /** \brief Set max allowed ARP or ip6 neighbor entries request
1098     @param client_index - opaque cookie to identify the sender
1099     @param context - sender context, to match reply w/ request
1100     @param is_ipv6 - neighbor limit if non-zero, else ARP limit
1101     @param arp_neighbor_limit - the new limit, defaults are ~ 50k
1102 */
1103 define set_arp_neighbor_limit {
1104     u32 client_index;
1105     u32 context;
1106     u8  is_ipv6;
1107     u32 arp_neighbor_limit;
1108 }; 
1109
1110 /** \brief Set max allowed ARP or ip6 neighbor entries response
1111     @param context - sender context, to match reply w/ request
1112     @param retval - return code for request
1113 */
1114 define set_arp_neighbor_limit_reply {
1115     u32 context;
1116     i32 retval;
1117 };
1118
1119 /** \brief L2 interface patch add / del request
1120     @param client_index - opaque cookie to identify the sender
1121     @param context - sender context, to match reply w/ request
1122     @param rx_sw_if_index - receive side interface 
1123     @param tx_sw_if_index - transmit side interface
1124     @param is_add - if non-zero set up the interface patch, else remove it
1125 */
1126 define l2_patch_add_del {
1127     u32 client_index;
1128     u32 context;
1129     u32 rx_sw_if_index;
1130     u32 tx_sw_if_index;
1131     u8 is_add;
1132 };
1133
1134 /** \brief L2 interface patch add / del response
1135     @param context - sender context, to match reply w/ request
1136     @param retval - return code for the request
1137 */
1138 define l2_patch_add_del_reply {
1139     u32 context;
1140     i32 retval;
1141 };
1142
1143 /** \brief IPv6 segment routing tunnel add / del 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 the tunnel if non-zero, else delete it
1147     @param src_address[] -
1148     @param dst_address[] -
1149     @param dst_mask_width -
1150     @param inner_vrf_id -
1151     @param outer_vrf_id -
1152     @param flags_net_byte_order -
1153     @param n_segments -
1154     @param n_tags -
1155     @param segs_and_tags[] -
1156 */
1157 define sr_tunnel_add_del {
1158     u32 client_index;
1159     u32 context;
1160     u8 is_add;
1161     u8 src_address[16];
1162     u8 dst_address[16];
1163     u8 dst_mask_width;
1164     u32 inner_vrf_id;
1165     u32 outer_vrf_id;
1166     u16 flags_net_byte_order;
1167     u8 n_segments;
1168     u8 n_tags;
1169     u8 segs_and_tags[0];
1170 };
1171
1172 /** \brief IPv6 segment routing tunnel add / del response
1173     @param context - sender context, to match reply w/ request
1174     @param retval - return value for request
1175 */
1176 define sr_tunnel_add_del_reply {
1177     u32 context;
1178     i32 retval;
1179 };
1180
1181 /** \brief Interface set vpath request
1182     @param client_index - opaque cookie to identify the sender
1183     @param context - sender context, to match reply w/ request
1184     @param sw_if_index - interface used to reach neighbor
1185     @param enable - if non-zero enable, else disable
1186 */
1187 define sw_interface_set_vpath {
1188     u32 client_index;
1189     u32 context;
1190     u32 sw_if_index;
1191     u8  enable;
1192 };
1193
1194 /** \brief Interface set vpath response
1195     @param context - sender context, to match reply w/ request
1196     @param retval - return code for the request
1197 */
1198 define sw_interface_set_vpath_reply {
1199     u32 context;
1200     i32 retval;
1201 };
1202
1203 /** \brief MPLS Ethernet add / del tunnel request
1204     @param client_index - opaque cookie to identify the sender
1205     @param context - sender context, to match reply w/ request
1206     @param vrf_id - vrf_id, only for IP4
1207     @param sw_if_index - interface used to reach neighbor
1208     @param is_add - add if set, tunnel delete if 0
1209     @param dst_mac_address - 
1210     @param adj_address - 
1211     @param adj_address_length -
1212 */
1213 define mpls_ethernet_add_del_tunnel {
1214     u32 client_index;
1215     u32 context;
1216     u32 vrf_id;
1217     u32 tx_sw_if_index;
1218     u8 is_add;
1219     u8 l2_only;
1220     u8 dst_mac_address[6];
1221     u8 adj_address[4];
1222     u8 adj_address_length;
1223 };
1224
1225 /** \brief Reply for MPLS Ethernet add / delete tunnel request
1226     @param context - sender context, to match reply w/ request
1227     @param retval - return code for the request
1228 */
1229 define mpls_ethernet_add_del_tunnel_reply {
1230     u32 context;
1231     i32 retval;
1232     u32 tunnel_sw_if_index;
1233 };
1234 /** \brief MPLS Ethernet add/ del tunnel 2
1235     @param client_index - opaque cookie to identify the sender
1236     @param context - sender context, to match reply w/ request
1237     @param inner_vrf_id - 
1238     @param outer_vrf_id - 
1239     @param resolve_attempts - 
1240     @param resolve_opaque - 
1241     @param resolve_if_needed -
1242     @param is_add -
1243     @param adj_address -
1244     @param adj_address_length -
1245     @param next_hop_ip4_address_in_outer_vrf -
1246 */
1247 define mpls_ethernet_add_del_tunnel_2 {
1248    u32 client_index;
1249    u32 context;
1250    u32 inner_vrf_id;
1251    u32 outer_vrf_id;
1252    u32 resolve_attempts;
1253    u32 resolve_opaque;          /* no need to set this */
1254    u8 resolve_if_needed;
1255    u8 is_add;
1256    u8 l2_only;
1257    u8 adj_address[4];
1258    u8 adj_address_length;
1259    u8 next_hop_ip4_address_in_outer_vrf [4];
1260 };
1261
1262 /** \brief MPLS Ethernet add/ del tunnel 2
1263     @param context - sender context, to match reply w/ request
1264     @param retval - return code for add /del request
1265 */
1266 define mpls_ethernet_add_del_tunnel_2_reply {
1267     u32 context;
1268     i32 retval;
1269 };
1270
1271 /** \brief Set L2 XConnect between two interfaces request
1272     @param client_index - opaque cookie to identify the sender
1273     @param context - sender context, to match reply w/ request
1274     @param rx_sw_if_index - Receive interface index
1275     @param tx_sw_if_index - Transmit interface index
1276     @param enable - enable xconnect if not 0, else set to L3 mode
1277 */
1278 define sw_interface_set_l2_xconnect {
1279     u32 client_index;
1280     u32 context;
1281     u32 rx_sw_if_index;
1282     u32 tx_sw_if_index;
1283     u8 enable;
1284 };
1285
1286 /** \brief Set L2 XConnect response
1287     @param context - sender context, to match reply w/ request
1288     @param retval - L2 XConnect request return code
1289 */
1290 define sw_interface_set_l2_xconnect_reply {
1291     u32 context;
1292     i32 retval;
1293 };
1294
1295 /** \brief Interface bridge mode request
1296     @param client_index - opaque cookie to identify the sender
1297     @param context - sender context, to match reply w/ request
1298     @param rx_sw_if_index - the interface
1299     @param bd_id - bridge domain id
1300     @param bvi - Setup interface as a bvi, bridge mode only
1301     @param shg - Shared horizon group, for bridge mode only
1302     @param enable - Enable beige mode if not 0, else set to L3 mode
1303 */
1304 define sw_interface_set_l2_bridge {
1305     u32 client_index;
1306     u32 context;
1307     u32 rx_sw_if_index;
1308     u32 bd_id;
1309     u8 shg;
1310     u8 bvi;
1311     u8 enable;
1312 };
1313
1314 /** \brief Interface bridge mode response
1315     @param context - sender context, to match reply w/ request
1316     @param retval - Bridge mode request return code
1317 */
1318 define sw_interface_set_l2_bridge_reply {
1319     u32 context;
1320     i32 retval;
1321 };
1322
1323 /** \brief L2 FIB add entry request
1324     @param client_index - opaque cookie to identify the sender
1325     @param context - sender context, to match reply w/ request
1326     @param mac - the entry's mac address
1327     @param bd_id - the entry's bridge domain id
1328     @param sw_if_index - the interface
1329     @param is_add - If non zero add the entry, else delete it
1330     @param static_mac - 
1331     @param filter_mac -
1332 */
1333 define l2fib_add_del {
1334     u32 client_index;
1335     u32 context;
1336     u64 mac;
1337     u32 bd_id;
1338     u32 sw_if_index;
1339     u8 is_add;
1340     u8 static_mac;
1341     u8 filter_mac;
1342 };
1343
1344 /** \brief L2 FIB add entry response
1345     @param context - sender context, to match reply w/ request
1346     @param retval - return code for the add l2fib entry request
1347 */
1348 define l2fib_add_del_reply {
1349     u32 context;
1350     i32 retval;
1351 };
1352
1353 /** \brief Set L2 flags request !!! TODO - need more info, feature bits in l2_input.h
1354     @param client_index - opaque cookie to identify the sender
1355     @param context - sender context, to match reply w/ request
1356     @param sw_if_index - interface 
1357     @param is_set - if non-zero, set the bits, else clear them
1358     @param feature_bitmap - non-zero bits to set or clear
1359 */
1360 define l2_flags {
1361     u32 client_index;
1362     u32 context;
1363     u32 sw_if_index;
1364     u8 is_set;
1365     u32 feature_bitmap;
1366 };
1367
1368 /** \brief Set L2 bits response
1369     @param context - sender context, to match reply w/ request
1370     @param retval - return code for the set l2 bits request
1371 */
1372 define l2_flags_reply {
1373     u32 context;
1374     u32 retval;
1375     u32 resulting_feature_bitmap;
1376 };
1377
1378 /** \brief Set bridge flags (such as L2_LEARN, L2_FWD, L2_FLOOD, 
1379     L2_UU_FLOOD, or L2_ARP_TERM) request
1380     @param client_index - opaque cookie to identify the sender
1381     @param context - sender context, to match reply w/ request
1382     @param bd_id - the bridge domain to set the flags for
1383     @param is_set - if non-zero, set the flags, else clear them
1384     @param feature_bitmap - bits that are non-zero to set or clear
1385 */
1386 define bridge_flags {
1387     u32 client_index;
1388     u32 context;
1389     u32 bd_id;
1390     u8 is_set;
1391     u32 feature_bitmap;
1392 };
1393
1394 /** \brief Set bridge flags response
1395     @param context - sender context, to match reply w/ request
1396     @param retval - return code for the set bridge flags request
1397     @param resulting_feature_bitmap - the feature bitmap value after the request is implemented
1398 */
1399 define bridge_flags_reply {
1400     u32 context;
1401     u32 retval;
1402     u32 resulting_feature_bitmap;
1403 };
1404
1405 /** \brief Set bridge domain ip to mac entry request
1406     @param client_index - opaque cookie to identify the sender
1407     @param context - sender context, to match reply w/ request
1408     @param bd_id - the bridge domain to set the flags for
1409     @param is_add - if non-zero, add the entry, else clear it
1410     @param is_ipv6 - if non-zero, ipv6 address, else ipv4 address
1411     @param mac_address - MAC address
1412     @param 
1413 */
1414 define bd_ip_mac_add_del {
1415     u32 client_index;
1416     u32 context;
1417     u32 bd_id;
1418     u8 is_add;
1419     u8 is_ipv6;
1420     u8 ip_address[16];
1421     u8 mac_address[6];
1422 };
1423
1424 /** \brief Set bridge domain ip to mac entry response
1425     @param context - sender context, to match reply w/ request
1426     @param retval - return code for the set bridge flags request
1427 */
1428 define bd_ip_mac_add_del_reply {
1429     u32 context;
1430     u32 retval;
1431 };
1432
1433 /** \brief Add/Delete classification table request
1434     @param client_index - opaque cookie to identify the sender
1435     @param context - sender context, to match reply w/ request
1436     @param is_add- if non-zero add the table, else delete it
1437     @param table_index - if add, reuturns index of the created table, else specifies the table to delete  
1438     @param nbuckets - number of buckets when adding a table
1439     @param memory_size - memory size when adding a table
1440     @param match_n_vectors - number of match vectors
1441     @param next_table_index - index of next table
1442     @param miss_next_index - index of miss table
1443     @param mask[] - match mask
1444 */
1445 define classify_add_del_table {
1446     u32 client_index;
1447     u32 context;
1448     u8  is_add;
1449     u32 table_index;
1450     u32 nbuckets;
1451     u32 memory_size;
1452     u32 skip_n_vectors;
1453     u32 match_n_vectors;
1454     u32 next_table_index;
1455     u32 miss_next_index;
1456     u8 mask[0];
1457 };
1458
1459 /** \brief Add/Delete classification table response
1460     @param context - sender context, to match reply w/ request
1461     @param retval - return code for the table add/del requst
1462     @param new_table_index - for add, returned index of the new table
1463     @param skip_n_vectors - for add, returned value of skip_n_vectors in table
1464     @param match_n_vectors -for add, returned value of match_n_vectors in table
1465 */
1466 define classify_add_del_table_reply {
1467     u32 context;
1468     i32 retval;
1469     u32 new_table_index;
1470     u32 skip_n_vectors;
1471     u32 match_n_vectors;
1472 };
1473
1474 /** \brief Classify add / del session request
1475     @param client_index - opaque cookie to identify the sender
1476     @param context - sender context, to match reply w/ request
1477     @param is_add - add session if non-zero, else delete
1478     @param table_index - index of the table to add/del the session, required
1479     @param hit_next_index - for add, hit_next_index of new session, required
1480     @param opaque_index - for add, opaque_index of new session
1481     @param advance -for add, advance value for session
1482     @param match[] - for add, match value for session, required
1483 */
1484 define classify_add_del_session {
1485     u32 client_index;
1486     u32 context;
1487     u8  is_add;
1488     u32 table_index;
1489     u32 hit_next_index;
1490     u32 opaque_index;
1491     i32 advance;
1492     u8 match[0];
1493 };
1494
1495 /** \brief Classify add / del session response
1496     @param context - sender context, to match reply w/ request
1497     @param retval - return code for the add/del session request
1498 */
1499 define classify_add_del_session_reply {
1500     u32 context;
1501     i32 retval;
1502 };
1503
1504 /** \brief Set/unset the classification table for an interface request 
1505     @param client_index - opaque cookie to identify the sender
1506     @param context - sender context, to match reply w/ request
1507     @param is_ipv6 - ipv6 if non-zero, else ipv4
1508     @param sw_if_index - interface to associate with the table
1509     @param table_index - index of the table, if ~0 unset the table
1510 */
1511 define classify_set_interface_ip_table {
1512     u32 client_index;
1513     u32 context;
1514     u8 is_ipv6;
1515     u32 sw_if_index;
1516     u32 table_index;            /* ~0 => off */
1517 };
1518
1519 /** \brief Set/unset interface classification table response 
1520     @param context - sender context, to match reply w/ request
1521     @param retval - return code
1522 */
1523 define classify_set_interface_ip_table_reply {
1524     u32 context;
1525     i32 retval;
1526 };
1527
1528 /** \brief Set/unset l2 classification tables for an interface request
1529     @param client_index - opaque cookie to identify the sender
1530     @param context - sender context, to match reply w/ request
1531     @param sw_if_index - interface to set/unset tables for
1532     @param ip4_table_index - ip4 index, use ~0 for all 3 indexes to unset
1533     @param ip6_table_index - ip6 index
1534     @param other_table_index - other index
1535 */
1536 define classify_set_interface_l2_tables {
1537     u32 client_index;
1538     u32 context;
1539     u32 sw_if_index;
1540     /* 3 x ~0 => off */
1541     u32 ip4_table_index;
1542     u32 ip6_table_index;
1543     u32 other_table_index;
1544 };
1545
1546 /** \brief Set/unset l2 classification tables for an interface response
1547     @param context - sender context, to match reply w/ request
1548     @param retval - return code for the request
1549 */
1550 define classify_set_interface_l2_tables_reply {
1551     u32 context;
1552     i32 retval;
1553 };
1554
1555 /** \brief Get node index using name request
1556     @param client_index - opaque cookie to identify the sender
1557     @param context - sender context, to match reply w/ request
1558     @param node_name[] - name of the node
1559 */
1560 define get_node_index {
1561     u32 client_index;
1562     u32 context;
1563     u8 node_name[64];
1564 };
1565
1566 /** \brief Get node index using name request
1567     @param context - sender context, to match reply w/ request
1568     @param retval - return code for the request
1569     @param node_index - index of the desired node if found, else ~0
1570 */
1571 define get_node_index_reply {
1572     u32 context;
1573     i32 retval;
1574     u32 node_index;
1575 };
1576
1577 /** \brief Set the next node for a given node request
1578     @param client_index - opaque cookie to identify the sender
1579     @param context - sender context, to match reply w/ request
1580     @param node_name[] - node to add the next node to
1581     @param next_name[] - node to add as the next node
1582 */
1583 define add_node_next {
1584     u32 client_index;
1585     u32 context;
1586     u8 node_name[64];
1587     u8 next_name[64];
1588 };
1589
1590 /** \brief IP Set the next node for a given node response
1591     @param context - sender context, to match reply w/ request
1592     @param retval - return code for the add next node request
1593     @param next_index - the index of the next node if success, else ~0
1594 */
1595 define add_node_next_reply {
1596     u32 context;
1597     i32 retval;
1598     u32 next_index;
1599 };
1600
1601 /** \brief DHCP Proxy config 2 add / del request
1602     @param client_index - opaque cookie to identify the sender
1603     @param context - sender context, to match reply w/ request
1604     @param rx_vrf_id - receive vrf id
1605     @param server_vrf_id - server vrf id
1606     @param if_ipv6 - ipv6 if non-zero, else ipv4
1607     @param is_add - add the config if non-zero, else delete
1608     @param insert_circuit_id - option82 suboption 1 fib number
1609     @param dhcp_server[] - server address
1610     @param dhcp_src_address[] - <fix this, need details>
1611 */
1612 define dhcp_proxy_config_2 {
1613     u32 client_index;
1614     u32 context;
1615     u32 rx_vrf_id;
1616     u32 server_vrf_id;
1617     u8 is_ipv6;
1618     u8 is_add;
1619     u8 insert_circuit_id;
1620     u8 dhcp_server[16];
1621     u8 dhcp_src_address[16];
1622 };
1623
1624 /** \brief DHCP Proxy config 2 add / del response
1625     @param context - sender context, to match reply w/ request
1626     @param retval - return code for request
1627 */
1628 define dhcp_proxy_config_2_reply {
1629     u32 context;
1630     i32 retval;
1631 };
1632
1633 /** \brief l2tpv3 tunnel interface create request
1634     @param client_index - opaque cookie to identify the sender
1635     @param context - sender context, to match reply w/ request
1636     @param client_address - remote client tunnel ip address
1637     @param client_address - local tunnel ip address
1638     @param is_ipv6 - ipv6 if non-zero, else ipv4
1639     @param local_session_id - local tunnel session id
1640     @param remote_session_id - remote tunnel session id
1641     @param local_cookie - local tunnel cookie
1642     @param l2_sublayer_present - l2 sublayer is present in packets if non-zero
1643 */
1644 define l2tpv3_create_tunnel {
1645     u32 client_index;
1646     u32 context;
1647     u8 client_address [16];
1648     u8 our_address [16];
1649     u8 is_ipv6;
1650     u32 local_session_id;
1651     u32 remote_session_id;
1652     u64 local_cookie;
1653     u64 remote_cookie;
1654     u8 l2_sublayer_present;
1655 };
1656
1657 /** \brief l2tpv3 tunnel interface create response
1658     @param context - sender context, to match reply w/ request
1659     @param retval - return code for the request
1660     @param sw_if_index - index of the new tunnel interface
1661 */
1662 define l2tpv3_create_tunnel_reply {
1663     u32 context;
1664     i32 retval;
1665     u32 sw_if_index;
1666 };
1667
1668 define l2tpv3_set_tunnel_cookies {
1669     u32 client_index;
1670     u32 context;
1671     u32 sw_if_index;
1672     u64 new_local_cookie;
1673     u64 new_remote_cookie;
1674 };
1675
1676 /** \brief L2TP tunnel set cookies response
1677     @param context - sender context, to match reply w/ request
1678     @param retval - return code for the request
1679 */
1680 define l2tpv3_set_tunnel_cookies_reply {
1681     u32 context;
1682     i32 retval;
1683 };
1684
1685 manual_java define sw_if_l2tpv3_tunnel_details {
1686     u32 sw_if_index;
1687     u8 interface_name[64];
1688     u8 client_address [16];
1689     u8 our_address [16];
1690     u32 local_session_id;
1691     u32 remote_session_id;
1692     u64 local_cookie[2];
1693     u64 remote_cookie;
1694     u8 l2_sublayer_present;
1695 };
1696
1697 define sw_if_l2tpv3_tunnel_dump {
1698     u32 client_index;
1699     u32 context;
1700 };
1701
1702 /** \brief L2 fib clear table request, clear all mac entries in the l2 fib
1703     @param client_index - opaque cookie to identify the sender
1704     @param context - sender context, to match reply w/ request
1705 */
1706 define l2_fib_clear_table {
1707     u32 client_index;
1708     u32 context;
1709 };
1710
1711 /** \brief L2 fib clear table response
1712     @param context - sender context, to match reply w/ request
1713     @param retval - return code for the request
1714 */
1715 define l2_fib_clear_table_reply {
1716     u32 context;
1717     i32 retval;
1718 };
1719
1720 /** \brief L2 interface ethernet flow point filtering enable/disable request
1721     @param client_index - opaque cookie to identify the sender
1722     @param context - sender context, to match reply w/ request
1723     @param sw_if_index - interface to enable/disable filtering on
1724     @param enable_disable - if non-zero enable filtering, else disable
1725 */
1726 define l2_interface_efp_filter {
1727     u32 client_index;
1728     u32 context;
1729     u32 sw_if_index;
1730     u32 enable_disable;
1731 };
1732
1733 /** \brief L2 interface ethernet flow point filtering response
1734     @param context - sender context, to match reply w/ request
1735     @param retval - return code for the request
1736 */
1737 define l2_interface_efp_filter_reply {
1738     u32 context;
1739     i32 retval;
1740 };
1741
1742 define l2tpv3_interface_enable_disable {
1743     u32 client_index;
1744     u32 context;
1745     u8 enable_disable;
1746     u32 sw_if_index;
1747 }; 
1748
1749 define l2tpv3_interface_enable_disable_reply {
1750     u32 context;
1751     i32 retval;
1752 };
1753
1754 define l2tpv3_set_lookup_key {
1755     u32 client_index;
1756     u32 context;
1757     /* 0 = ip6 src_address, 1 = ip6 dst_address, 2 = session_id */
1758     u8 key;
1759 }; 
1760
1761 define l2tpv3_set_lookup_key_reply {
1762     u32 context;
1763     i32 retval;
1764 };
1765
1766 define vxlan_add_del_tunnel {
1767     u32 client_index;
1768     u32 context;
1769     u8 is_add;
1770     u32 src_address;
1771     u32 dst_address;
1772     u32 encap_vrf_id;
1773     u32 decap_next_index;
1774     u32 vni;
1775 };
1776
1777 define vxlan_add_del_tunnel_reply {
1778     u32 context;
1779     i32 retval;
1780     u32 sw_if_index;
1781 };
1782
1783 manual_java define vxlan_tunnel_dump {
1784     u32 client_index;
1785     u32 context;
1786     u32 sw_if_index;
1787 };
1788
1789 manual_java define vxlan_tunnel_details {
1790     u32 context;
1791     u32 sw_if_index;
1792     u32 src_address;
1793     u32 dst_address;
1794     u32 encap_vrf_id;
1795     u32 decap_next_index;
1796     u32 vni;
1797 };
1798   
1799 /** \brief L2 interface vlan tag rewrite configure request
1800     @param client_index - opaque cookie to identify the sender
1801     @param context - sender context, to match reply w/ request
1802     @param sw_if_index - interface the operation is applied to
1803     @param vtr_op - Choose from l2_vtr_op_t enum values
1804     @param push_dot1q - first pushed flag dot1q id set, else dot1ad
1805     @param tag1 - Needed for any push or translate vtr op
1806     @param tag2 - Needed for any push 2 or translate x-2 vtr ops
1807 */
1808 define l2_interface_vlan_tag_rewrite {
1809     u32 client_index;
1810     u32 context;
1811     u32 sw_if_index;
1812     u32 vtr_op;
1813     u32 push_dot1q; // ethertype of first pushed tag is dot1q/dot1ad
1814     u32 tag1;  // first pushed tag
1815     u32 tag2;  // second pushed tag
1816 };
1817
1818 /** \brief L2 interface vlan tag rewrite response
1819     @param context - sender context, to match reply w/ request
1820     @param retval - return code for the request
1821 */
1822 define l2_interface_vlan_tag_rewrite_reply {
1823     u32 context;
1824     i32 retval;
1825 };
1826
1827 /** \brief vhost-user interface create request
1828     @param client_index - opaque cookie to identify the sender
1829     @param is_server - our side is socket server
1830     @param sock_filename - unix socket filename, used to speak with frontend
1831     @param use_custom_mac - enable or disable the use of the provided hardware address
1832     @param mac_address - hardware address to use if 'use_custom_mac' is set
1833 */
1834 define create_vhost_user_if {
1835    u32 client_index;
1836    u32 context;
1837    u8 is_server;
1838    u8 sock_filename[256];
1839    u8 renumber;
1840    u32 custom_dev_instance;
1841    u8 use_custom_mac;
1842    u8 mac_address[6];
1843 };
1844
1845 /** \brief vhost-user interface create response
1846     @param context - sender context, to match reply w/ request
1847     @param retval - return code for the request
1848     @param sw_if_index - interface the operation is applied to
1849 */
1850 define create_vhost_user_if_reply {
1851    u32 context;
1852    i32 retval;
1853    u32 sw_if_index;
1854 };
1855
1856 /** \brief vhost-user interface modify request
1857     @param client_index - opaque cookie to identify the sender
1858     @param is_server - our side is socket server
1859     @param sock_filename - unix socket filename, used to speak with frontend
1860 */
1861 define modify_vhost_user_if {
1862    u32 client_index;
1863    u32 context;
1864    u32 sw_if_index;
1865    u8 is_server;
1866    u8 sock_filename[256];
1867    u8 renumber;
1868    u32 custom_dev_instance;
1869 };
1870
1871 /** \brief vhost-user interface modify response
1872     @param context - sender context, to match reply w/ request
1873     @param retval - return code for the request
1874 */
1875 define modify_vhost_user_if_reply {
1876    u32 context;
1877    i32 retval;
1878 };
1879
1880 /** \brief vhost-user interface delete request
1881     @param client_index - opaque cookie to identify the sender
1882 */
1883 define delete_vhost_user_if {
1884    u32 client_index;
1885    u32 context;
1886    u32 sw_if_index;
1887 };
1888
1889 /** \brief vhost-user interface delete response
1890     @param context - sender context, to match reply w/ request
1891     @param retval - return code for the request
1892 */
1893 define delete_vhost_user_if_reply {
1894    u32 context;
1895    i32 retval;
1896 };
1897
1898 define create_subif {
1899     u32 client_index;
1900     u32 context;
1901     u32 sw_if_index;
1902     u32 sub_id;
1903
1904     /* These fields map directly onto the subif template */
1905     u8 no_tags;
1906     u8 one_tag;
1907     u8 two_tags;
1908     u8 dot1ad;   // 0 = dot1q, 1=dot1ad
1909     u8 exact_match;
1910     u8 default_sub;
1911     u8 outer_vlan_id_any;
1912     u8 inner_vlan_id_any;
1913     u16 outer_vlan_id;
1914     u16 inner_vlan_id;
1915 };
1916
1917 define create_subif_reply {
1918     u32 context;
1919     i32 retval;
1920     u32 sw_if_index;
1921 };
1922
1923 /** \brief show version
1924     @param client_index - opaque cookie to identify the sender
1925     @param context - sender context, to match reply w/ request
1926 */
1927 define show_version {
1928    u32 client_index;
1929    u32 context;
1930 };
1931
1932 /** \brief show version response
1933     @param context - sender context, to match reply w/ request
1934     @param retval - return code for the request
1935     @param program - name of the program (vpe)
1936     @param version  - version of the program
1937     @param build_directory - root of the workspace where the program was built
1938 */
1939 manual_java define show_version_reply {
1940    u32 context;
1941    i32 retval;
1942    u8 program[32];
1943    u8 version[32];
1944    u8 build_date[32];
1945    u8 build_directory[256];
1946 };
1947
1948 define nsh_gre_add_del_tunnel {
1949     u32 client_index;
1950     u32 context;
1951     u32 src;
1952     u32 dst;
1953     u32 encap_vrf_id;
1954     u32 decap_vrf_id;
1955     u32 decap_next_index;
1956     u8 tlv_len_in_words;
1957     u8 is_add;
1958     u8 ver_o_c;
1959     u8 length;
1960     u8 md_type;
1961     u8 next_protocol;
1962     /* in network byte order */
1963     u32 spi_si;
1964     u32 c1;
1965     u32 c2;
1966     u32 c3;
1967     u32 c4;
1968     u32 tlvs[0];
1969 };
1970
1971 define nsh_gre_add_del_tunnel_reply {
1972     u32 context;
1973     i32 retval;
1974     u32 sw_if_index;
1975 };
1976
1977 /** \brief Vhost-user interface details structure (fix this)
1978     @param sw_if_index - index of the interface
1979     @param interface_name - name of interface
1980     @param virtio_net_hdr_sz - net header size
1981     @param features - interface features
1982     @param is_server - vhost-user server socket
1983     @param sock_filename - socket filename
1984     @param num_regions - number of used memory regions
1985 */
1986 manual_java define sw_interface_vhost_user_details {
1987     u32 sw_if_index;
1988     u8 interface_name[64];
1989     u32 virtio_net_hdr_sz;
1990     u64 features;
1991     u8 is_server;
1992     u8 sock_filename[256];
1993     u32 num_regions;
1994     i32 sock_errno;
1995 };
1996
1997 /* works */
1998 define sw_interface_vhost_user_dump {
1999     u32 client_index;
2000     u32 context;
2001 };
2002
2003 manual_java define ip_address_details {
2004     u32 client_index;
2005     u32 context;
2006     u8 ip[16];
2007     u8 prefix_length;
2008 };
2009
2010 manual_java define ip_address_dump {
2011     u32 client_index;
2012     u32 context;
2013     u32 sw_if_index;
2014     u8 is_ipv6;
2015 };
2016
2017 manual_java define ip_details {
2018     u32 sw_if_index;
2019     u32 context;
2020 };
2021
2022 define ip_dump {
2023     u32 client_index;
2024     u32 context;
2025     u8 is_ipv6;
2026 };
2027
2028 /** \brief l2 fib table entry structure
2029     @param bd_id - the l2 fib / bridge domain table id
2030     @param mac - the entry's mac address
2031     @param sw_if_index - index of the interface
2032     @param static_mac - the entry is statically configured.
2033     @param filter_mac - the entry is a mac filter entry.
2034     @param bvi_mac - the mac address is a bridge virtual interface
2035 */
2036 manual_java define l2_fib_table_entry {
2037     u32 bd_id;
2038     u64 mac;
2039     u32 sw_if_index;
2040     u8 static_mac;
2041     u8 filter_mac;
2042     u8 bvi_mac;
2043 };
2044
2045 /** \brief Dump l2 fib (aka bridge domain) table
2046     @param client_index - opaque cookie to identify the sender
2047     @param bd_id - the l2 fib / bridge domain table identifier
2048 */
2049 manual_java define l2_fib_table_dump {
2050     u32 client_index;
2051     u32 context;
2052     u32 bd_id;
2053 };
2054
2055 define nsh_vxlan_gpe_add_del_tunnel {
2056     u32 client_index;
2057     u32 context;
2058     u32 src;
2059     u32 dst;
2060     u32 encap_vrf_id;
2061     u32 decap_vrf_id;
2062     u32 decap_next_index;
2063     u32 vni;
2064     u8 tlv_len_in_words;
2065     u8 is_add;
2066     u8 ver_o_c;
2067     u8 length;
2068     u8 md_type;
2069     u8 next_protocol;
2070     /* in network byte order */
2071     u32 spi_si;
2072     u32 c1;
2073     u32 c2;
2074     u32 c3;
2075     u32 c4;
2076     u32 tlvs[0];
2077 };
2078
2079 define nsh_vxlan_gpe_add_del_tunnel_reply {
2080     u32 context;
2081     i32 retval;
2082     u32 sw_if_index;
2083 };
2084
2085 define lisp_gpe_add_del_tunnel {
2086     u32 client_index;
2087     u32 context;
2088     u32 src;
2089     u32 dst;
2090     u32 encap_vrf_id;
2091     u32 decap_vrf_id;
2092     u32 decap_next_index;
2093     u8 is_add;
2094     u8 flags;
2095     u8 ver_res;
2096     u8 res;
2097     u8 next_protocol;
2098     /* in network byte order */
2099     u32 iid;
2100 };
2101
2102 define lisp_gpe_add_del_tunnel_reply {
2103     u32 context;
2104     i32 retval;
2105     u32 sw_if_index;
2106 };
2107
2108 /** \brief add or delete locator_set
2109     @param client_index - opaque cookie to identify the sender
2110     @param context - sender context, to match reply w/ request
2111     @param is_add - add address if non-zero, else delete
2112     @param locator_set_name - locator name
2113 */
2114 define lisp_add_del_locator_set {
2115     u32 client_index;
2116     u32 context;
2117     u8  is_add;
2118     u8  locator_set_name[64];
2119 };
2120
2121 /** \brief Reply for locator_set add/del
2122     @param context - returned sender context, to match reply w/ request
2123     @param retval - return code
2124 */
2125 define lisp_add_del_locator_set_reply {
2126     u32 context;
2127     i32 retval;
2128 };
2129
2130 /** \brief add or delete locator for locator_set
2131     @param client_index - opaque cookie to identify the sender
2132     @param context - sender context, to match reply w/ request
2133     @param is_add - add address if non-zero, else delete
2134     @param locator_set_name - name of locator_set to add/del locator
2135     @param sw_if_index - index of the interface
2136     @param priority - priority of the lisp locator
2137     @param weight - weight of the lisp locator
2138 */
2139 define lisp_add_del_locator {
2140     u32 client_index;
2141     u32 context;
2142     u8  is_add;
2143     u8  locator_set_name[64];
2144     u32 sw_if_index;
2145     u8  priority;
2146     u8  weight;
2147 };
2148
2149 /** \brief Reply for locator add/del
2150     @param context - returned sender context, to match reply w/ request
2151     @param retval - return code
2152 */
2153 define lisp_add_del_locator_reply {
2154     u32 context;
2155     i32 retval;
2156 };
2157
2158 /** \brief add or delete lisp eid-table
2159     @param client_index - opaque cookie to identify the sender
2160     @param context - sender context, to match reply w/ request
2161     @param is_add - add address if non-zero, else delete
2162     @param is_ipv6 - if non-zero the address is ipv6, else ipv4
2163     @param ip_address - array of address bytes
2164     @param prefix_len - prefix len
2165     @param locator_set_name - name of locator_set to add/del eid-table
2166 */
2167 define lisp_add_del_local_eid {
2168     u32 client_index;
2169     u32 context;
2170     u8  is_add;
2171     u8  is_ipv6;
2172     u8  ip_address[16];
2173     u8  prefix_len;
2174     u8  locator_set_name[64];
2175 };
2176
2177 /** \brief Reply for local_eid add/del
2178     @param context - returned sender context, to match reply w/ request
2179     @param retval - return code
2180 */
2181 define lisp_add_del_local_eid_reply {
2182     u32 context;
2183     i32 retval;
2184 };
2185
2186 /** \brief add or delete lisp gpe maptunel
2187     @param client_index - opaque cookie to identify the sender
2188     @param context - sender context, to match reply w/ request
2189     @param is_add - add address if non-zero, else delete
2190     @param eid_is_ipv6 - if non-zero the address is ipv6, else ipv4
2191     @param eid_ip_address - array of address bytes
2192     @param eid_prefix_len - prefix len
2193     @param address_is_ipv6 - if non-zero the address is ipv6, else ipv4
2194     @param source_ip_address - array of address bytes
2195     @param destination_ip_address - array of address bytes
2196 */
2197 define lisp_gpe_add_del_fwd_entry {
2198     u32 client_index;
2199     u32 context;
2200     u8  is_add;
2201     u8  eid_is_ipv6;
2202     u8  eid_ip_address[16];
2203     u8  eid_prefix_len;
2204     u8  address_is_ipv6;
2205     u8  source_ip_address[16];
2206     u8  destination_ip_address[16];
2207 };
2208
2209 /** \brief Reply for gpe_fwd_entry add/del
2210     @param context - returned sender context, to match reply w/ request
2211     @param retval - return code
2212 */
2213 define lisp_gpe_add_del_fwd_entry_reply {
2214     u32 context;
2215     i32 retval;
2216 };
2217
2218 /** \brief add or delete map-resolver
2219     @param client_index - opaque cookie to identify the sender
2220     @param context - sender context, to match reply w/ request
2221     @param is_add - add address if non-zero, else delete
2222     @param is_ipv6 - if non-zero the address is ipv6, else ipv4
2223     @param ip_address - array of address bytes
2224 */
2225 define lisp_add_del_map_resolver {
2226     u32 client_index;
2227     u32 context;
2228     u8  is_add;
2229     u8  is_ipv6;
2230     u8  ip_address[16];
2231 };
2232
2233 /** \brief Reply for map_resolver add/del
2234     @param context - returned sender context, to match reply w/ request
2235     @param retval - return code
2236 */
2237 define lisp_add_del_map_resolver_reply {
2238     u32 context;
2239     i32 retval;
2240 };
2241
2242 /** \brief add or delete gpe_iface
2243     @param client_index - opaque cookie to identify the sender
2244     @param context - sender context, to match reply w/ request
2245     @param is_add - add address if non-zero, else delete
2246 */
2247 define lisp_gpe_add_del_iface {
2248     u32 client_index;
2249     u32 context;
2250     u8  is_add;
2251 };
2252
2253 /** \brief Reply for gpe_iface add/del
2254     @param context - returned sender context, to match reply w/ request
2255     @param retval - return code
2256 */
2257 define lisp_gpe_add_del_iface_reply {
2258     u32 context;
2259     i32 retval;
2260 };
2261
2262 /** \brief LISP locator_set status
2263     @param locator_set_name - name of the locator_set
2264     @param sw_if_index - sw_if_index of the locator
2265     @param priority - locator priority
2266     @param weight - locator weight
2267  */
2268 manual_java define lisp_locator_set_details {
2269     u32 context;
2270     u8  locator_set_name[64];
2271     u32 sw_if_index;
2272     u8  priority;
2273     u8  weight;
2274 };
2275
2276 /** \brief Request for locator_set summary status
2277     @param client_index - opaque cookie to identify the sender
2278     @param context - sender context, to match reply w/ request
2279  */
2280 define lisp_locator_set_dump {
2281     u32 client_index;
2282     u32 context;
2283 };
2284
2285 /** \brief LISP local eid table status
2286     @param locator_set_name - name of the locator_set
2287     @param eid_is_ipv6 - if non-zero the address is ipv6, else ipv4
2288     @param eid_ip_address - array of address bytes
2289     @param eid_prefix_len - prefix len
2290  */
2291 manual_java define lisp_local_eid_table_details {
2292     u32 context;
2293     u8  locator_set_name[64];
2294     u8  eid_is_ipv6;
2295     u8  eid_ip_address[16];
2296     u8  eid_prefix_len;
2297 };
2298
2299 /** \brief Request for local eid table summary status
2300     @param client_index - opaque cookie to identify the sender
2301     @param context - sender context, to match reply w/ request
2302  */
2303 define lisp_local_eid_table_dump {
2304     u32 client_index;
2305     u32 context;
2306 };
2307
2308 manual_java define lisp_gpe_tunnel_details {
2309     u32 context;
2310     u32 tunnels;
2311     u8  is_ipv6;
2312     u8  source_ip[16];
2313     u8  destination_ip[16];
2314     u32 encap_fib_id;
2315     u32 decap_fib_id;
2316     u32 dcap_next;
2317     u8  lisp_ver;
2318     u8  next_protocol;
2319     u8  flags;
2320     u8  ver_res;
2321     u8  res;
2322     u32 iid;
2323 };
2324
2325 /** \brief Request for gpe tunnel summary status
2326     @param client_index - opaque cookie to identify the sender
2327     @param context - sender context, to match reply w/ request
2328  */
2329 define lisp_gpe_tunnel_dump {
2330     u32 client_index;
2331     u32 context;
2332 };
2333
2334 /** \brief LISP map resolver status
2335     @param locator_set_name - name of the locator_set
2336     @param is_ipv6 - if non-zero the address is ipv6, else ipv4
2337     @param ip_address - array of address bytes
2338  */
2339 manual_java define lisp_map_resolver_details {
2340     u32 context;
2341     u8  is_ipv6;
2342     u8  ip_address[16];
2343 };
2344
2345 /** \brief Request for map resolver summary status
2346     @param client_index - opaque cookie to identify the sender
2347     @param context - sender context, to match reply w/ request
2348  */
2349 define lisp_map_resolver_dump {
2350     u32 client_index;
2351     u32 context;
2352 };
2353
2354 /* Gross kludge, DGMS */
2355 define interface_name_renumber {
2356     u32 client_index;
2357     u32 context;
2358     u32 sw_if_index;
2359     u32 new_show_dev_instance;
2360 };
2361
2362 define interface_name_renumber_reply {
2363     u32 context;
2364     i32 retval;
2365 };
2366
2367 /** \brief Register for ip4 arp resolution events
2368     @param client_index - opaque cookie to identify the sender
2369     @param context - sender context, to match reply w/ request
2370     @param enable_disable - 1 => register for events, 0 => cancel registration
2371     @param pid - sender's pid
2372     @param address - the exact ip4 address of interest
2373 */
2374 define want_ip4_arp_events {
2375     u32 client_index;
2376     u32 context;
2377     u8 enable_disable;
2378     u32 pid;
2379     u32 address;
2380 };
2381
2382 /** \brief Reply for interface events registration
2383     @param context - returned sender context, to match reply w/ request
2384     @param retval - return code
2385 */
2386 define want_ip4_arp_events_reply {
2387     u32 context;
2388     i32 retval;
2389 };
2390
2391 /** \brief Tell client about an ip4 arp resolution event
2392     @param client_index - opaque cookie to identify the sender
2393     @param context - sender context, to match reply w/ request
2394     @param address - the exact ip4 address of interest
2395     @param pid - client pid registered to receive notification
2396     @param sw_if_index - interface which received ARP packet
2397     @param new_mac - the new mac address 
2398 */
2399 define ip4_arp_event {
2400     u32 client_index;
2401     u32 context;
2402     u32 address;
2403     u32 pid;
2404     u32 sw_if_index;
2405     u8 new_mac[6];
2406 };
2407     
2408 /** \brief L2 bridge domain add or delete request
2409     @param client_index - opaque cookie to identify the sender
2410     @param context - sender context, to match reply w/ request
2411     @param bd_id - the bridge domain to create
2412     @param flood - enable/disable bcast/mcast flooding in the bd
2413     @param uu_flood - enable/disable uknown unicast flood in the bd
2414     @param forward - enable/disable forwarding on all interfaces in the bd
2415     @param learn - enable/disable learning on all interfaces in the bd
2416     @param arp_term - enable/disable arp termination in the bd
2417     @param is_add - add or delete flag
2418 */
2419 define bridge_domain_add_del {
2420     u32 client_index;
2421     u32 context;
2422     u32 bd_id;
2423     u8 flood;
2424     u8 uu_flood;
2425     u8 forward;
2426     u8 learn;
2427     u8 arp_term;
2428     u8 is_add;
2429 };
2430
2431 /** \brief L2 bridge domain add or delete response
2432     @param context - sender context, to match reply w/ request
2433     @param retval - return code for the set bridge flags request
2434 */
2435 define bridge_domain_add_del_reply {
2436     u32 context;
2437     u32 retval;
2438 };
2439
2440 /** \brief L2 bridge domain request operational state details
2441     @param client_index - opaque cookie to identify the sender
2442     @param context - sender context, to match reply w/ request
2443     @param bd_id - the bridge domain id desired or ~0 to request all bds
2444 */
2445 manual_java define bridge_domain_dump {
2446     u32 client_index;
2447     u32 context;
2448     u32 bd_id;
2449 };
2450
2451 /** \brief L2 bridge domain operational state response
2452     @param bd_id - the bridge domain id
2453     @param flood - bcast/mcast flooding state on all interfaces in the bd
2454     @param uu_flood - uknown unicast flooding state on all interfaces in the bd
2455     @param forward - forwarding state on all interfaces in the bd
2456     @param learn - learning state on all interfaces in the bd
2457     @param arp_term - arp termination state on all interfaces in the bd
2458     @param n_sw_ifs - number of sw_if_index's in the domain
2459 */
2460 manual_java define bridge_domain_details {
2461     u32 context;
2462     u32 bd_id;
2463     u8 flood;
2464     u8 uu_flood;
2465     u8 forward;
2466     u8 learn;
2467     u8 arp_term;
2468     u32 bvi_sw_if_index;
2469     u32 n_sw_ifs;
2470 };
2471
2472 /** \brief L2 bridge domain sw interface operational state response
2473     @param bd_id - the bridge domain id
2474     @param sw_if_index - sw_if_index in the domain
2475     @param shg - split horizon group for the interface
2476 */
2477 manual_java define bridge_domain_sw_if_details {
2478     u32 context;
2479     u32 bd_id;
2480     u32 sw_if_index;
2481     u8 shg;
2482 };
2483
2484 /** \brief DHCP Client config add / del request
2485     @param client_index - opaque cookie to identify the sender
2486     @param context - sender context, to match reply w/ request
2487     @param sw_if_index - index of the interface for DHCP client
2488     @param hostname - hostname
2489     @param is_add - add the config if non-zero, else delete
2490     @param want_dhcp_event - DHCP event sent to the sender
2491            via dhcp_compl_event API message if non-zero
2492     @param pid - sender's pid
2493 */
2494 define dhcp_client_config {
2495     u32 client_index;
2496     u32 context;
2497     u32 sw_if_index;
2498     u8 hostname[64];
2499     u8 is_add;
2500     u8 want_dhcp_event;
2501     u32 pid;
2502 };
2503
2504 /** \brief DHCP Client config response
2505     @param context - sender context, to match reply w/ request
2506     @param retval - return code for the request
2507 */
2508 define dhcp_client_config_reply {
2509     u32 context;
2510     i32 retval;
2511 };
2512
2513 /** \brief Set/unset input ACL interface
2514     @param client_index - opaque cookie to identify the sender
2515     @param context - sender context, to match reply w/ request
2516     @param sw_if_index - interface to set/unset input ACL
2517     @param ip4_table_index - ip4 classify table index (~0 for skip)
2518     @param ip6_table_index - ip6 classify table index (~0 for skip)
2519     @param l2_table_index  -  l2 classify table index (~0 for skip)
2520     @param is_add - Set input ACL if non-zero, else unset
2521     Note: User is recommeneded to use just one valid table_index per call.
2522           (ip4_table_index, ip6_table_index, or l2_table_index)
2523 */
2524 define input_acl_set_interface {
2525     u32 client_index;
2526     u32 context;
2527     u32 sw_if_index;
2528     u32 ip4_table_index;
2529     u32 ip6_table_index;
2530     u32 l2_table_index;
2531     u8  is_add;
2532 };
2533
2534 /** \brief Set/unset input ACL interface response
2535     @param context - sender context, to match reply w/ request
2536     @param retval - return code for the request
2537 */
2538 define input_acl_set_interface_reply {
2539     u32 context;
2540     i32 retval;
2541 };
2542
2543 /** \brief IPsec: Add/delete Security Policy Database
2544     @param client_index - opaque cookie to identify the sender
2545     @param context - sender context, to match reply w/ request
2546     @param is_add - add SPD if non-zero, else delete
2547     @param spd_id - SPD instance id (control plane allocated)
2548 */
2549
2550 define ipsec_spd_add_del {
2551     u32 client_index;
2552     u32 context;
2553     u8 is_add;
2554     u32 spd_id;
2555 };
2556
2557 /** \brief Reply for IPsec: Add/delete Security Policy Database entry
2558     @param context - returned sender context, to match reply w/ request
2559     @param retval - return code
2560 */
2561
2562 define ipsec_spd_add_del_reply {
2563     u32 context;
2564     i32 retval;
2565 };
2566
2567 /** \brief IPsec: Add/delete SPD from interface
2568
2569     @param client_index - opaque cookie to identify the sender
2570     @param context - sender context, to match reply w/ request
2571     @param is_add - add security mode if non-zero, else delete
2572     @param sw_if_index - index of the interface
2573     @param spd_id - SPD instance id to use for lookups
2574 */
2575
2576
2577 define ipsec_interface_add_del_spd {
2578     u32 client_index;
2579     u32 context;
2580
2581     u8 is_add;
2582     u32 sw_if_index;
2583     u32 spd_id;
2584 };
2585
2586 /** \brief Reply for IPsec: Add/delete SPD from interface
2587     @param context - returned sender context, to match reply w/ request
2588     @param retval - return code
2589 */
2590
2591 define ipsec_interface_add_del_spd_reply {
2592     u32 context;
2593     i32 retval;
2594 };
2595
2596 /** \brief IPsec: Add/delete Security Policy Database entry
2597
2598     See RFC 4301, 4.4.1.1 on how to match packet to selectors
2599
2600     @param client_index - opaque cookie to identify the sender
2601     @param context - sender context, to match reply w/ request
2602     @param is_add - add SPD if non-zero, else delete
2603     @param spd_id - SPD instance id (control plane allocated)
2604     @param priority - priority of SPD entry (non-unique value).  Used to order SPD matching - higher priorities match before lower
2605     @param is_outbound - entry applies to outbound traffic if non-zero, otherwise applies to inbound traffic
2606     @param is_ipv6 - remote/local address are IPv6 if non-zero, else IPv4
2607     @param remote_address_start - start of remote address range to match
2608     @param remote_address_stop - end of remote address range to match
2609     @param local_address_start - start of local address range to match
2610     @param local_address_stop - end of local address range to match
2611     @param protocol - protocol type to match [0 means any]
2612     @param remote_port_start - start of remote port range to match ...
2613     @param remote_port_stop - end of remote port range to match [0 to 65535 means ANY, 65535 to 0 means OPAQUE]
2614     @param local_port_start - start of local port range to match ...
2615     @param local_port_stop - end of remote port range to match [0 to 65535 means ANY, 65535 to 0 means OPAQUE]
2616     @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)
2617     @param sa_id - SAD instance id (control plane allocated)
2618
2619 */
2620
2621 define ipsec_spd_add_del_entry {
2622     u32 client_index;
2623     u32 context;
2624     u8 is_add;
2625
2626     u32 spd_id;
2627     i32 priority;
2628     u8 is_outbound;
2629
2630     // Selector
2631     u8 is_ipv6;
2632     u8 is_ip_any;
2633     u8 remote_address_start[16];
2634     u8 remote_address_stop[16];
2635     u8 local_address_start[16];
2636     u8 local_address_stop[16];
2637
2638     u8 protocol;
2639
2640     u16 remote_port_start;
2641     u16 remote_port_stop;
2642     u16 local_port_start;
2643     u16 local_port_stop;
2644
2645     // Policy
2646     u8 policy;
2647     u32 sa_id;
2648 };
2649
2650 /** \brief Reply for IPsec: Add/delete Security Policy Database entry
2651     @param context - returned sender context, to match reply w/ request
2652     @param retval - return code
2653 */
2654
2655 define ipsec_spd_add_del_entry_reply {
2656     u32 context;
2657     i32 retval;
2658 };
2659
2660 /** \brief IPsec: Add/delete Security Association Database entry
2661     @param client_index - opaque cookie to identify the sender
2662     @param context - sender context, to match reply w/ request
2663     @param is_add - add SAD entry if non-zero, else delete
2664
2665     @param sad_id - sad id
2666
2667     @param spi - security parameter index
2668
2669     @param protocol - 0 = AH, 1 = ESP
2670
2671     @param crypto_algorithm - 0 = Null, 1 = AES-CBC-128, 2 = AES-CBC-192, 3 = AES-CBC-256, 4 = 3DES-CBC
2672     @param crypto_key_length - length of crypto_key in bytes
2673     @param crypto_key - crypto keying material
2674
2675     @param integrity_algorithm - 0 = None, 1 = MD5-96, 2 = SHA1-96, 3 = SHA-256, 4 = SHA-384, 5=SHA-512
2676     @param integrity_key_length - length of integrity_key in bytes
2677     @param integrity_key - integrity keying material
2678
2679     @param use_extended_sequence_number - use ESN when non-zero
2680
2681     @param is_tunnel - IPsec tunnel mode if non-zero, else transport mode
2682     @param is_tunnel_ipv6 - IPsec tunnel mode is IPv6 if non-zero, else IPv4 tunnel only valid if is_tunnel is non-zero
2683     @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
2684     @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
2685
2686     To be added:
2687      Anti-replay
2688      IPsec tunnel address copy mode (to support GDOI)
2689  */
2690
2691 define ipsec_sad_add_del_entry {
2692     u32 client_index;
2693     u32 context;
2694     u8 is_add;
2695
2696     u32 sad_id;
2697
2698     u32 spi;
2699
2700     u8 protocol;
2701
2702     u8 crypto_algorithm;
2703     u8 crypto_key_length;
2704     u8 crypto_key[128];
2705
2706     u8 integrity_algorithm;
2707     u8 integrity_key_length;
2708     u8 integrity_key[128];
2709
2710     u8 use_extended_sequence_number;
2711
2712     u8 is_tunnel;
2713     u8 is_tunnel_ipv6;
2714     u8 tunnel_src_address[16];
2715     u8 tunnel_dst_address[16];
2716 };
2717
2718 /** \brief Reply for IPsec: Add/delete Security Association Database entry
2719     @param context - returned sender context, to match reply w/ request
2720     @param retval - return code
2721 */
2722
2723 define ipsec_sad_add_del_entry_reply {
2724     u32 context;
2725     i32 retval;
2726 };
2727
2728 /** \brief IPsec: Update Security Association keys
2729     @param client_index - opaque cookie to identify the sender
2730     @param context - sender context, to match reply w/ request
2731
2732     @param sa_id - sa id
2733
2734     @param crypto_key_length - length of crypto_key in bytes
2735     @param crypto_key - crypto keying material
2736
2737     @param integrity_key_length - length of integrity_key in bytes
2738     @param integrity_key - integrity keying material
2739 */
2740
2741 define ipsec_sa_set_key {
2742     u32 client_index;
2743     u32 context;
2744
2745     u32 sa_id;
2746
2747     u8 crypto_key_length;
2748     u8 crypto_key[128];
2749
2750     u8 integrity_key_length;
2751     u8 integrity_key[128];
2752 };
2753
2754 /** \brief Reply for IPsec: Update Security Association keys
2755     @param context - returned sender context, to match reply w/ request
2756     @param retval - return code
2757 */
2758
2759 define ipsec_sa_set_key_reply {
2760     u32 context;
2761     i32 retval;
2762 };
2763
2764 /** \brief IKEv2: Add/delete profile
2765     @param client_index - opaque cookie to identify the sender
2766     @param context - sender context, to match reply w/ request
2767
2768     @param name - IKEv2 profile name
2769     @param is_add - Add IKEv2 profile if non-zero, else delete
2770 */
2771 define ikev2_profile_add_del {
2772     u32 client_index;
2773     u32 context;
2774
2775     u8 name[64];
2776     u8 is_add;
2777 };
2778
2779 /** \brief Reply for IKEv2: Add/delete profile
2780     @param context - returned sender context, to match reply w/ request
2781     @param retval - return code
2782 */
2783 define ikev2_profile_add_del_reply {
2784     u32 context;
2785     i32 retval;
2786 };
2787
2788 /** \brief IKEv2: Set IKEv2 profile authentication method
2789     @param client_index - opaque cookie to identify the sender
2790     @param context - sender context, to match reply w/ request
2791
2792     @param name - IKEv2 profile name
2793     @param auth_method - IKEv2 authentication method (shared-key-mic/rsa-sig)
2794     @param is_hex - Authentication data in hex format if non-zero, else string
2795     @param data_len - Authentication data length
2796     @param data - Authentication data (for rsa-sig cert file path)
2797 */
2798 define ikev2_profile_set_auth {
2799     u32 client_index;
2800     u32 context;
2801
2802     u8 name[64];
2803     u8 auth_method;
2804     u8 is_hex;
2805     u32 data_len;
2806     u8 data[0];
2807 };
2808
2809 /** \brief Reply for IKEv2: Set IKEv2 profile authentication method
2810     @param context - returned sender context, to match reply w/ request
2811     @param retval - return code
2812 */
2813 define ikev2_profile_set_auth_reply {
2814     u32 context;
2815     i32 retval;
2816 };
2817
2818 /** \brief IKEv2: Set IKEv2 profile local/remote identification
2819     @param client_index - opaque cookie to identify the sender
2820     @param context - sender context, to match reply w/ request
2821
2822     @param name - IKEv2 profile name
2823     @param is_local - Identification is local if non-zero, else remote
2824     @param id_type - Identification type
2825     @param data_len - Identification data length
2826     @param data - Identification data
2827 */
2828 define ikev2_profile_set_id {
2829     u32 client_index;
2830     u32 context;
2831
2832     u8 name[64];
2833     u8 is_local;
2834     u8 id_type;
2835     u32 data_len;
2836     u8 data[0];
2837 };
2838
2839 /** \brief Reply for IKEv2:
2840     @param context - returned sender context, to match reply w/ request
2841     @param retval - return code
2842 */
2843 define ikev2_profile_set_id_reply {
2844     u32 context;
2845     i32 retval;
2846 };
2847
2848 /** \brief IKEv2: Set IKEv2 profile traffic selector parameters
2849     @param client_index - opaque cookie to identify the sender
2850     @param context - sender context, to match reply w/ request
2851
2852     @param name - IKEv2 profile name
2853     @param is_local - Traffic selector is local if non-zero, else remote
2854     @param proto - Traffic selector IP protocol (if zero not relevant)
2855     @param start_port - The smallest port number allowed by traffic selector
2856     @param end_port - The largest port number allowed by traffic selector
2857     @param start_addr - The smallest address included in traffic selector
2858     @param end_addr - The largest address included in traffic selector
2859 */
2860 define ikev2_profile_set_ts {
2861     u32 client_index;
2862     u32 context;
2863
2864     u8 name[64];
2865     u8 is_local;
2866     u8 proto;
2867     u16 start_port;
2868     u16 end_port;
2869     u32 start_addr;
2870     u32 end_addr;
2871 };
2872
2873 /** \brief Reply for IKEv2: Set IKEv2 profile traffic selector parameters
2874     @param context - returned sender context, to match reply w/ request
2875     @param retval - return code
2876 */
2877 define ikev2_profile_set_ts_reply {
2878     u32 context;
2879     i32 retval;
2880 };
2881
2882 /** \brief IKEv2: Set IKEv2 local RSA private key
2883     @param client_index - opaque cookie to identify the sender
2884     @param context - sender context, to match reply w/ request
2885
2886     @param key_file - Key file absolute path
2887 */
2888 define ikev2_set_local_key {
2889     u32 client_index;
2890     u32 context;
2891
2892     u8 key_file[256];
2893 };
2894
2895 /** \brief Reply for IKEv2: Set IKEv2 local key
2896     @param context - returned sender context, to match reply w/ request
2897     @param retval - return code
2898 */
2899 define ikev2_set_local_key_reply {
2900     u32 context;
2901     i32 retval;
2902 };
2903
2904 /** \brief Tell client about a DHCP completion event
2905     @param client_index - opaque cookie to identify the sender
2906     @param pid - client pid registered to receive notification
2907     @param is_ipv6 - if non-zero the address is ipv6, else ipv4
2908     @param host_address - Host IP address
2909     @param router_address - Router IP address
2910     @param host_mac - Host MAC address
2911 */
2912 manual_java define dhcp_compl_event {
2913     u32 client_index;
2914     u32 pid;
2915     u8 hostname[64];
2916     u8 is_ipv6;
2917     u8 host_address[16];
2918     u8 router_address[16];
2919     u8 host_mac[6];
2920 };
2921
2922 /** \brief Add MAP domains
2923     @param client_index - opaque cookie to identify the sender
2924     @param context - sender context, to match reply w/ request
2925     @param ip6_prefix - Rule IPv6 prefix
2926     @param ip4_prefix - Rule IPv4 prefix
2927     @param ip6_src - MAP domain IPv6 BR address / Tunnel source
2928     @param ip6_prefix_len - Rule IPv6 prefix length
2929     @param ip4_prefix_len - Rule IPv4 prefix length
2930     @param ea_bits_len - Embedded Address bits length
2931     @param psid_offset - Port Set Identifider (PSID) offset
2932     @param psid_length - PSID length
2933     @param is_translation - MAP-E / MAP-T
2934     @param mtu - MTU
2935 */
2936 define map_add_domain {
2937   u32 client_index;
2938   u32 context;
2939   u8 ip6_prefix[16];
2940   u8 ip4_prefix[4];
2941   u8 ip6_src[16];
2942   u8 ip6_prefix_len;
2943   u8 ip4_prefix_len;
2944   u8 ip6_src_prefix_len;
2945   u8 ea_bits_len;
2946   u8 psid_offset;
2947   u8 psid_length;
2948   u8 is_translation;
2949   u16 mtu;
2950 };
2951
2952 /** \brief Reply for MAP domain add
2953     @param context - returned sender context, to match reply w/ request
2954     @param index - MAP domain index
2955     @param retval - return code
2956 */
2957 define map_add_domain_reply {
2958   u32 context;
2959   u32 index;
2960   i32 retval;
2961 };
2962
2963 /** \brief Delete MAP domain
2964     @param client_index - opaque cookie to identify the sender
2965     @param context - sender context, to match reply w/ request
2966     @param index - MAP Domain index
2967 */
2968 define map_del_domain {
2969   u32 client_index;
2970   u32 context;
2971   u32 index;
2972 };
2973
2974 /** \brief Reply for MAP domain del
2975     @param context - returned sender context, to match reply w/ request
2976     @param retval - return code
2977 */
2978 define map_del_domain_reply {
2979   u32 context;
2980   i32 retval;
2981 };
2982
2983 /** \brief Add or Delete MAP rule from a domain (Only used for shared IPv4 per subscriber)
2984     @param client_index - opaque cookie to identify the sender
2985     @param context - sender context, to match reply w/ request
2986     @param index - MAP Domain index
2987     @param is_add - If 1 add rule, if 0 delete rule
2988     @param ip6_dst - MAP CE IPv6 address
2989     @param psid - Rule PSID
2990 */
2991 define map_add_del_rule {
2992   u32 client_index;
2993   u32 context;
2994   u32 index;
2995   u32 is_add;
2996   u8 ip6_dst[16];
2997   u16 psid;
2998 };
2999
3000 /** \brief Reply for MAP rule add/del
3001     @param context - returned sender context, to match reply w/ request
3002     @param retval - return code
3003 */
3004 define map_add_del_rule_reply {
3005   u32 context;
3006   i32 retval;
3007 };
3008
3009 /** \brief Get list of map domains
3010     @param client_index - opaque cookie to identify the sender
3011 */
3012 define map_domain_dump {
3013   u32 client_index;
3014   u32 context;
3015 };
3016
3017 manual_java define map_domain_details {
3018   u32 domain_index;
3019   u8 ip6_prefix[16];
3020   u8 ip4_prefix[4];
3021   u8 ip6_src[16];
3022   u8 ip6_prefix_len;
3023   u8 ip4_prefix_len;
3024   u8 ip6_src_len;
3025   u8 ea_bits_len;
3026   u8 psid_offset;
3027   u8 psid_length;
3028   u8 flags;
3029   u16 mtu;
3030   u8 is_translation;
3031 };
3032
3033 define map_rule_dump {
3034   u32 client_index;
3035   u32 context;
3036   u32 domain_index;
3037 };
3038
3039 manual_java define map_rule_details {
3040   u8 ip6_dst[16];
3041   u16 psid;
3042 };
3043
3044 /** \brief Request for a single block of summary stats
3045     @param client_index - opaque cookie to identify the sender
3046     @param context - sender context, to match reply w/ request
3047 */
3048 define map_summary_stats {
3049     u32 client_index;
3050     u32 context;
3051 };
3052
3053 /** \brief Reply for map_summary_stats request
3054     @param context - sender context, to match reply w/ request
3055     @param retval - return code for request
3056     @param total_bindings -  
3057     @param total_pkts -  
3058     @param total_ip4_fragments -
3059     @param total_security_check - 
3060 */
3061 define map_summary_stats_reply {
3062     u32 context;
3063     i32 retval;
3064     u64 total_bindings;
3065     u64 total_pkts[2];
3066     u64 total_bytes[2];
3067     u64 total_ip4_fragments;
3068     u64 total_security_check[2];
3069 };
3070
3071 /** \brief cop: enable/disable junk filtration features on an interface
3072     @param client_index - opaque cookie to identify the sender
3073     @param context - sender context, to match reply w/ request
3074     @param sw_if_inded - desired interface
3075     @param enable_disable - 1 => enable, 0 => disable
3076 */
3077
3078 define cop_interface_enable_disable {
3079     u32 client_index;
3080     u32 context;
3081     u32 sw_if_index;
3082     u8 enable_disable;
3083 };
3084
3085 /** \brief cop: interface enable/disable junk filtration reply
3086     @param context - returned sender context, to match reply w/ request
3087     @param retval - return code
3088 */
3089
3090 define cop_interface_enable_disable_reply {
3091     u32 context;
3092     i32 retval;
3093 };
3094
3095 /** \brief cop: enable/disable whitelist filtration features on an interface
3096     Note: the supplied fib_id must match in order to remove the feature!
3097     
3098     @param client_index - opaque cookie to identify the sender
3099     @param context - sender context, to match reply w/ request
3100     @param sw_if_index - interface handle, physical interfaces only
3101     @param fib_id - fib identifier for the whitelist / blacklist fib
3102     @param ip4 - 1 => enable ip4 filtration, 0=> disable ip4 filtration
3103     @param ip6 - 1 => enable ip6 filtration, 0=> disable ip6 filtration
3104     @param default_cop -  1 => enable non-ip4, non-ip6 filtration 0=> disable it
3105 */
3106
3107 define cop_whitelist_enable_disable {
3108     u32 client_index;
3109     u32 context;
3110     u32 sw_if_index;
3111     u32 fib_id;
3112     u8 ip4;
3113     u8 ip6;
3114     u8 default_cop;
3115 };
3116
3117 /** \brief cop: interface enable/disable junk filtration reply
3118     @param context - returned sender context, to match reply w/ request
3119     @param retval - return code
3120 */
3121
3122 define cop_whitelist_enable_disable_reply {
3123     u32 context;
3124     i32 retval;
3125 };
3126
3127 /** \brief get_node_graph - get a copy of the vpp node graph
3128     including the current set of graph arcs.
3129
3130     @param client_index - opaque cookie to identify the sender
3131     @param context - sender context, to match reply w/ request
3132 */
3133
3134 define get_node_graph {
3135     u32 client_index;
3136     u32 context;
3137 };
3138
3139 /** \brief get_node_graph_reply
3140     @param context - returned sender context, to match reply w/ request
3141     @param retval - return code
3142     @param reply_in_shmem - result from vlib_node_serialize, in shared
3143     memory. Process with vlib_node_unserialize, remember to switch
3144     heaps and free the result.
3145 */
3146
3147 define get_node_graph_reply {
3148     u32 context;
3149     i32 retval;
3150     u64 reply_in_shmem;
3151 };
3152
3153 /** \brief Clear interface statistics
3154     @param client_index - opaque cookie to identify the sender
3155     @param context - sender context, to match reply w/ request
3156     @param sw_if_index - index of the interface to clear statistics
3157 */
3158 define sw_interface_clear_stats {
3159     u32 client_index;
3160     u32 context;
3161     u32 sw_if_index;
3162 };
3163
3164 /** \brief Reply to sw_interface_clear_stats 
3165     @param context - sender context which was passed in the request
3166     @param retval - return code of the set flags request
3167 */
3168 define sw_interface_clear_stats_reply {
3169     u32 context;
3170     i32 retval;
3171 };
3172
3173 /** \brief IOAM Trace : Set TRACE profile
3174     @param id - profile id
3175     @param trace_type - Trace type
3176     @param trace_num_elt - Number of nodes in trace path
3177     @param trace_ppc - Trace PPC (none/encap/decap)
3178     @param trace_tsp - Trace timestamp precision (0-sec,1-ms,2-us,3-ns)
3179     @param trace_app_data - Trace application data, can be any 4 bytes
3180     @param pow_enable - Proof of Work enabled or not flag
3181     @param node_id - Id of this node
3182 */
3183 define trace_profile_add {
3184   u32 client_index;
3185   u32 context;
3186   u16 id;
3187   u8  trace_type;
3188   u8  trace_num_elt;
3189   u8  trace_ppc;
3190   u8  trace_tsp;
3191   u32 trace_app_data;
3192   u8  pow_enable;
3193   u32 node_id;
3194 };
3195
3196 /** \brief Trace profile add / del response
3197     @param context - sender context, to match reply w/ request
3198     @param retval - return value for request
3199 */
3200 define trace_profile_add_reply {
3201     u32 context;
3202     i32 retval;
3203 };
3204
3205 /** \brief IOAM Trace enable trace profile for a flow
3206     @param id - id of the trace profile to be applied
3207     @param dest_ipv6 - Destination IPv6 address
3208     @param prefix_length - prefix mask
3209     @param vrf_id - VRF ID
3210     @param trace_op - Trace operation (add/mod/del)
3211     @param enable - apply/remove the trace profile for the flow
3212 */
3213 define trace_profile_apply {
3214   u32 client_index;
3215   u32 context;
3216   u16 id;
3217   u8 dest_ipv6[16];
3218   u32 prefix_length;
3219   u32 vrf_id;
3220   u8 trace_op;
3221   u8 enable;
3222 };
3223
3224 /** \brief Trace profile apply response
3225     @param context - sender context, to match reply w/ request   
3226     @param retval - return value for request
3227 */
3228 define trace_profile_apply_reply {
3229   u32 context;
3230   i32 retval;
3231 };
3232
3233 /** \brief Delete Trace Profile 
3234     @param client_index - opaque cookie to identify the sender
3235     @param context - sender context, to match reply w/ request
3236     @param index - MAP Domain index
3237 */
3238 define trace_profile_del {
3239   u32 client_index;
3240   u32 context;
3241   u16 id;
3242 };
3243
3244 /** \brief Trace profile add / del response
3245     @param context - sender context, to match reply w/ request
3246     @param retval - return value for request
3247 */
3248 define trace_profile_del_reply {
3249     u32 context;
3250     i32 retval;
3251 };