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