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