2434517e8cca40f59bf882938c678d1e8d9e7ad7
[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 teb;
2017   u8 src_address[16];
2018   u8 dst_address[16];
2019   u32 outer_fib_id;
2020 };
2021
2022 define gre_add_del_tunnel_reply
2023 {
2024   u32 context;
2025   i32 retval;
2026   u32 sw_if_index;
2027 };
2028
2029 define gre_tunnel_dump
2030 {
2031   u32 client_index;
2032   u32 context;
2033   u32 sw_if_index;
2034 };
2035
2036 define gre_tunnel_details
2037 {
2038   u32 context;
2039   u32 sw_if_index;
2040   u8 is_ipv6;
2041   u8 teb;
2042   u8 src_address[16];
2043   u8 dst_address[16];
2044   u32 outer_fib_id;
2045 };
2046
2047 /** \brief L2 interface vlan tag rewrite configure request
2048     @param client_index - opaque cookie to identify the sender
2049     @param context - sender context, to match reply w/ request
2050     @param sw_if_index - interface the operation is applied to
2051     @param vtr_op - Choose from l2_vtr_op_t enum values
2052     @param push_dot1q - first pushed flag dot1q id set, else dot1ad
2053     @param tag1 - Needed for any push or translate vtr op
2054     @param tag2 - Needed for any push 2 or translate x-2 vtr ops
2055 */
2056 define l2_interface_vlan_tag_rewrite
2057 {
2058   u32 client_index;
2059   u32 context;
2060   u32 sw_if_index;
2061   u32 vtr_op;
2062   u32 push_dot1q;               // ethertype of first pushed tag is dot1q/dot1ad
2063   u32 tag1;                     // first pushed tag
2064   u32 tag2;                     // second pushed tag
2065 };
2066
2067 /** \brief L2 interface vlan tag rewrite response
2068     @param context - sender context, to match reply w/ request
2069     @param retval - return code for the request
2070 */
2071 define l2_interface_vlan_tag_rewrite_reply
2072 {
2073   u32 context;
2074   i32 retval;
2075 };
2076
2077 /** \brief vhost-user interface create request
2078     @param client_index - opaque cookie to identify the sender
2079     @param is_server - our side is socket server
2080     @param sock_filename - unix socket filename, used to speak with frontend
2081     @param use_custom_mac - enable or disable the use of the provided hardware address
2082     @param mac_address - hardware address to use if 'use_custom_mac' is set
2083 */
2084 define create_vhost_user_if
2085 {
2086   u32 client_index;
2087   u32 context;
2088   u8 is_server;
2089   u8 sock_filename[256];
2090   u8 renumber;
2091   u32 custom_dev_instance;
2092   u8 use_custom_mac;
2093   u8 mac_address[6];
2094 };
2095
2096 /** \brief vhost-user interface create response
2097     @param context - sender context, to match reply w/ request
2098     @param retval - return code for the request
2099     @param sw_if_index - interface the operation is applied to
2100 */
2101 define create_vhost_user_if_reply
2102 {
2103   u32 context;
2104   i32 retval;
2105   u32 sw_if_index;
2106 };
2107
2108 /** \brief vhost-user interface modify request
2109     @param client_index - opaque cookie to identify the sender
2110     @param is_server - our side is socket server
2111     @param sock_filename - unix socket filename, used to speak with frontend
2112 */
2113 define modify_vhost_user_if
2114 {
2115   u32 client_index;
2116   u32 context;
2117   u32 sw_if_index;
2118   u8 is_server;
2119   u8 sock_filename[256];
2120   u8 renumber;
2121   u32 custom_dev_instance;
2122 };
2123
2124 /** \brief vhost-user interface modify response
2125     @param context - sender context, to match reply w/ request
2126     @param retval - return code for the request
2127 */
2128 define modify_vhost_user_if_reply
2129 {
2130   u32 context;
2131   i32 retval;
2132 };
2133
2134 /** \brief vhost-user interface delete request
2135     @param client_index - opaque cookie to identify the sender
2136 */
2137 define delete_vhost_user_if
2138 {
2139   u32 client_index;
2140   u32 context;
2141   u32 sw_if_index;
2142 };
2143
2144 /** \brief vhost-user interface delete response
2145     @param context - sender context, to match reply w/ request
2146     @param retval - return code for the request
2147 */
2148 define delete_vhost_user_if_reply
2149 {
2150   u32 context;
2151   i32 retval;
2152 };
2153
2154 define create_subif
2155 {
2156   u32 client_index;
2157   u32 context;
2158   u32 sw_if_index;
2159   u32 sub_id;
2160
2161   /* These fields map directly onto the subif template */
2162   u8 no_tags;
2163   u8 one_tag;
2164   u8 two_tags;
2165   u8 dot1ad;                    // 0 = dot1q, 1=dot1ad
2166   u8 exact_match;
2167   u8 default_sub;
2168   u8 outer_vlan_id_any;
2169   u8 inner_vlan_id_any;
2170   u16 outer_vlan_id;
2171   u16 inner_vlan_id;
2172 };
2173
2174 define create_subif_reply
2175 {
2176   u32 context;
2177   i32 retval;
2178   u32 sw_if_index;
2179 };
2180
2181 /** \brief show version
2182     @param client_index - opaque cookie to identify the sender
2183     @param context - sender context, to match reply w/ request
2184 */
2185 define show_version
2186 {
2187   u32 client_index;
2188   u32 context;
2189 };
2190
2191 /** \brief show version response
2192     @param context - sender context, to match reply w/ request
2193     @param retval - return code for the request
2194     @param program - name of the program (vpe)
2195     @param version  - version of the program
2196     @param build_directory - root of the workspace where the program was built
2197 */
2198 define show_version_reply
2199 {
2200   u32 context;
2201   i32 retval;
2202   u8 program[32];
2203   u8 version[32];
2204   u8 build_date[32];
2205   u8 build_directory[256];
2206 };
2207
2208 /** \brief Vhost-user interface details structure (fix this)
2209     @param sw_if_index - index of the interface
2210     @param interface_name - name of interface
2211     @param virtio_net_hdr_sz - net header size
2212     @param features - interface features
2213     @param is_server - vhost-user server socket
2214     @param sock_filename - socket filename
2215     @param num_regions - number of used memory regions
2216 */
2217 define sw_interface_vhost_user_details
2218 {
2219   u32 context;
2220   u32 sw_if_index;
2221   u8 interface_name[64];
2222   u32 virtio_net_hdr_sz;
2223   u64 features;
2224   u8 is_server;
2225   u8 sock_filename[256];
2226   u32 num_regions;
2227   i32 sock_errno;
2228 };
2229
2230 /* works */
2231 define sw_interface_vhost_user_dump
2232 {
2233   u32 client_index;
2234   u32 context;
2235 };
2236
2237 define ip_address_details
2238 {
2239   u32 client_index;
2240   u32 context;
2241   u8 ip[16];
2242   u8 prefix_length;
2243 };
2244
2245 define ip_address_dump
2246 {
2247   u32 client_index;
2248   u32 context;
2249   u32 sw_if_index;
2250   u8 is_ipv6;
2251 };
2252
2253 define ip_details
2254 {
2255   u32 sw_if_index;
2256   u32 context;
2257 };
2258
2259 define ip_dump
2260 {
2261   u32 client_index;
2262   u32 context;
2263   u8 is_ipv6;
2264 };
2265
2266 /** \brief l2 fib table entry structure
2267     @param bd_id - the l2 fib / bridge domain table id
2268     @param mac - the entry's mac address
2269     @param sw_if_index - index of the interface
2270     @param static_mac - the entry is statically configured.
2271     @param filter_mac - the entry is a mac filter entry.
2272     @param bvi_mac - the mac address is a bridge virtual interface
2273 */
2274 define l2_fib_table_entry
2275 {
2276   u32 context;
2277   u32 bd_id;
2278   u64 mac;
2279   u32 sw_if_index;
2280   u8 static_mac;
2281   u8 filter_mac;
2282   u8 bvi_mac;
2283 };
2284
2285 /** \brief Dump l2 fib (aka bridge domain) table
2286     @param client_index - opaque cookie to identify the sender
2287     @param bd_id - the l2 fib / bridge domain table identifier
2288 */
2289 define l2_fib_table_dump
2290 {
2291   u32 client_index;
2292   u32 context;
2293   u32 bd_id;
2294 };
2295
2296 define vxlan_gpe_add_del_tunnel
2297 {
2298   u32 client_index;
2299   u32 context;
2300   u8 is_ipv6;
2301   u8 local[16];
2302   u8 remote[16];
2303   u32 encap_vrf_id;
2304   u32 decap_vrf_id;
2305   u8 protocol;
2306   u32 vni;
2307   u8 is_add;
2308 };
2309
2310 define vxlan_gpe_add_del_tunnel_reply
2311 {
2312   u32 context;
2313   i32 retval;
2314   u32 sw_if_index;
2315 };
2316
2317 define vxlan_gpe_tunnel_dump
2318 {
2319   u32 client_index;
2320   u32 context;
2321   u32 sw_if_index;
2322 };
2323
2324 define vxlan_gpe_tunnel_details
2325 {
2326   u32 context;
2327   u32 sw_if_index;
2328   u8 local[16];
2329   u8 remote[16];
2330   u32 vni;
2331   u8 protocol;
2332   u32 encap_vrf_id;
2333   u32 decap_vrf_id;
2334   u8 is_ipv6;
2335 };
2336
2337 /** \brief add or delete locator_set
2338     @param client_index - opaque cookie to identify the sender
2339     @param context - sender context, to match reply w/ request
2340     @param is_add - add address if non-zero, else delete
2341     @param locator_set_name - locator name
2342     @param locator_num - number of locators
2343     @param locators - Lisp locator data
2344 */
2345 define lisp_add_del_locator_set
2346 {
2347   u32 client_index;
2348   u32 context;
2349   u8 is_add;
2350   u8 locator_set_name[64];
2351   u32 locator_num;
2352   u8 locators[locator_num];
2353 };
2354
2355 /** \brief Reply for locator_set add/del
2356     @param context - returned sender context, to match reply w/ request
2357     @param retval - return code
2358     @param ls_index - locator set index
2359 */
2360 define lisp_add_del_locator_set_reply
2361 {
2362   u32 context;
2363   i32 retval;
2364   u32 ls_index;
2365 };
2366
2367 /** \brief add or delete locator for locator_set
2368     @param client_index - opaque cookie to identify the sender
2369     @param context - sender context, to match reply w/ request
2370     @param is_add - add address if non-zero, else delete
2371     @param locator_set_name - name of locator_set to add/del locator
2372     @param sw_if_index - index of the interface
2373     @param priority - priority of the lisp locator
2374     @param weight - weight of the lisp locator
2375 */
2376 define lisp_add_del_locator
2377 {
2378   u32 client_index;
2379   u32 context;
2380   u8 is_add;
2381   u8 locator_set_name[64];
2382   u32 sw_if_index;
2383   u8 priority;
2384   u8 weight;
2385 };
2386
2387 /** \brief Reply for locator add/del
2388     @param context - returned sender context, to match reply w/ request
2389     @param retval - return code
2390 */
2391 define lisp_add_del_locator_reply
2392 {
2393   u32 context;
2394   i32 retval;
2395 };
2396
2397 /** \brief add or delete lisp eid-table
2398     @param client_index - opaque cookie to identify the sender
2399     @param context - sender context, to match reply w/ request
2400     @param is_add - add address if non-zero, else delete
2401     @param eid_type:
2402       0 : ipv4
2403       1 : ipv6
2404       2 : mac
2405     @param eid - EID can be ip4, ip6 or mac
2406     @param prefix_len - prefix len
2407     @param locator_set_name - name of locator_set to add/del eid-table
2408     @param vni - virtual network instance
2409 */
2410 define lisp_add_del_local_eid
2411 {
2412   u32 client_index;
2413   u32 context;
2414   u8 is_add;
2415   u8 eid_type;
2416   u8 eid[16];
2417   u8 prefix_len;
2418   u8 locator_set_name[64];
2419   u32 vni;
2420 };
2421
2422 /** \brief Reply for local_eid add/del
2423     @param context - returned sender context, to match reply w/ request
2424     @param retval - return code
2425 */
2426 define lisp_add_del_local_eid_reply
2427 {
2428   u32 context;
2429   i32 retval;
2430 };
2431
2432 /** \brief add or delete lisp gpe tunnel
2433     @param client_index - opaque cookie to identify the sender
2434     @param context - sender context, to match reply w/ request
2435     @param is_add - add address if non-zero, else delete
2436     @param eid_type -
2437       0 : ipv4
2438       1 : ipv6
2439       2 : mac
2440     @param rmt_eid - remote eid
2441     @param lcl_eid - local eid
2442     @param rmt_len - remote prefix len
2443     @param lcl_len - local prefix len
2444     @param vni - virtual network identifier
2445     @param dp_table - vrf/bridge domain id
2446     @param loc_num - number of locators
2447     @param lcl_locs - array of local locators
2448     @param rmt_locs - array of remote locators
2449     @param action - negative action when 0 locators configured
2450 */
2451 define lisp_gpe_add_del_fwd_entry
2452 {
2453   u32 client_index;
2454   u32 context;
2455   u8 is_add;
2456   u8 eid_type;
2457   u8 rmt_eid[16];
2458   u8 lcl_eid[16];
2459   u8 rmt_len;
2460   u8 lcl_len;
2461   u32 vni;
2462   u32 dp_table;
2463   u32 loc_num;
2464   u8 lcl_locs[loc_num];
2465   u8 rmt_locs[loc_num];
2466   u8 action;
2467 };
2468
2469 /** \brief Reply for gpe_fwd_entry add/del
2470     @param context - returned sender context, to match reply w/ request
2471     @param retval - return code
2472 */
2473 define lisp_gpe_add_del_fwd_entry_reply
2474 {
2475   u32 context;
2476   i32 retval;
2477 };
2478
2479 /** \brief add or delete map-resolver
2480     @param client_index - opaque cookie to identify the sender
2481     @param context - sender context, to match reply w/ request
2482     @param is_add - add address if non-zero, else delete
2483     @param is_ipv6 - if non-zero the address is ipv6, else ipv4
2484     @param ip_address - array of address bytes
2485 */
2486 define lisp_add_del_map_resolver
2487 {
2488   u32 client_index;
2489   u32 context;
2490   u8 is_add;
2491   u8 is_ipv6;
2492   u8 ip_address[16];
2493 };
2494
2495 /** \brief Reply for map_resolver add/del
2496     @param context - returned sender context, to match reply w/ request
2497     @param retval - return code
2498 */
2499 define lisp_add_del_map_resolver_reply
2500 {
2501   u32 context;
2502   i32 retval;
2503 };
2504
2505 /** \brief enable or disable lisp-gpe protocol
2506     @param client_index - opaque cookie to identify the sender
2507     @param context - sender context, to match reply w/ request
2508     @param is_en - enable protocol if non-zero, else disable
2509 */
2510 define lisp_gpe_enable_disable
2511 {
2512   u32 client_index;
2513   u32 context;
2514   u8 is_en;
2515 };
2516
2517 /** \brief Reply for gpe enable/disable
2518     @param context - returned sender context, to match reply w/ request
2519     @param retval - return code
2520 */
2521 define lisp_gpe_enable_disable_reply
2522 {
2523   u32 context;
2524   i32 retval;
2525 };
2526
2527 /** \brief enable or disable LISP feature
2528     @param client_index - opaque cookie to identify the sender
2529     @param context - sender context, to match reply w/ request
2530     @param is_en - enable protocol if non-zero, else disable
2531 */
2532 define lisp_enable_disable
2533 {
2534   u32 client_index;
2535   u32 context;
2536   u8 is_en;
2537 };
2538
2539 /** \brief Reply for gpe enable/disable
2540     @param context - returned sender context, to match reply w/ request
2541     @param retval - return code
2542 */
2543 define lisp_enable_disable_reply
2544 {
2545   u32 context;
2546   i32 retval;
2547 };
2548
2549 /** \brief add or delete gpe_iface
2550     @param client_index - opaque cookie to identify the sender
2551     @param context - sender context, to match reply w/ request
2552     @param is_add - add address if non-zero, else delete
2553 */
2554 define lisp_gpe_add_del_iface
2555 {
2556   u32 client_index;
2557   u32 context;
2558   u8 is_add;
2559   u8 is_l2;
2560   u32 dp_table;
2561   u32 vni;
2562 };
2563
2564 /** \brief Reply for gpe_iface add/del
2565     @param context - returned sender context, to match reply w/ request
2566     @param retval - return code
2567 */
2568 define lisp_gpe_add_del_iface_reply
2569 {
2570   u32 context;
2571   i32 retval;
2572 };
2573
2574 /** \brief configure or disable LISP PITR node
2575     @param client_index - opaque cookie to identify the sender
2576     @param context - sender context, to match reply w/ request
2577     @param ls_name - locator set name
2578     @param is_add - add locator set if non-zero, else disable pitr
2579 */
2580 define lisp_pitr_set_locator_set
2581 {
2582   u32 client_index;
2583   u32 context;
2584   u8 is_add;
2585   u8 ls_name[64];
2586 };
2587
2588 /** \brief Reply for lisp_pitr_set_locator_set
2589     @param context - returned sender context, to match reply w/ request
2590     @param retval - return code
2591 */
2592 define lisp_pitr_set_locator_set_reply
2593 {
2594   u32 context;
2595   i32 retval;
2596 };
2597
2598 /** \brief add or delete remote static mapping
2599     @param client_index - opaque cookie to identify the sender
2600     @param context - sender context, to match reply w/ request
2601     @param is_add - add address if non-zero, else delete
2602     @param is_src_dst - flag indicating src/dst based routing policy
2603     @param del_all - if set, delete all remote mappings
2604     @param vni - virtual network instance
2605     @param action - negative map-reply action
2606     @param eid_type -
2607       0 : ipv4
2608       1 : ipv6
2609       2 : mac
2610     @param deid - dst EID
2611     @param seid - src EID, valid only if is_src_dst is enabled
2612     @param rloc_num - number of remote locators
2613     @param rlocs - remote locator data
2614 */
2615 define lisp_add_del_remote_mapping
2616 {
2617   u32 client_index;
2618   u32 context;
2619   u8 is_add;
2620   u8 is_src_dst;
2621   u8 del_all;
2622   u32 vni;
2623   u8 action;
2624   u8 eid_type;
2625   u8 eid[16];
2626   u8 eid_len;
2627   u8 seid[16];
2628   u8 seid_len;
2629   u32 rloc_num;
2630   u8 rlocs[rloc_num];
2631 };
2632
2633 /** \brief Reply for lisp_add_del_remote_mapping
2634     @param context - returned sender context, to match reply w/ request
2635     @param retval - return code
2636 */
2637 define lisp_add_del_remote_mapping_reply
2638 {
2639   u32 context;
2640   i32 retval;
2641 };
2642
2643 /** \brief add or delete LISP adjacency adjacency
2644     @param client_index - opaque cookie to identify the sender
2645     @param context - sender context, to match reply w/ request
2646     @param is_add - add address if non-zero, else delete
2647     @param vni - virtual network instance
2648     @param eid_type -
2649       0 : ipv4
2650       1 : ipv6
2651       2 : mac
2652     @param deid - destination EID
2653     @param seid - source EID
2654 */
2655 define lisp_add_del_adjacency
2656 {
2657   u32 client_index;
2658   u32 context;
2659   u8 is_add;
2660   u32 vni;
2661   u8 eid_type;
2662   u8 deid[16];
2663   u8 seid[16];
2664   u8 deid_len;
2665   u8 seid_len;
2666 };
2667
2668 /** \brief Reply for lisp_add_del_adjacency
2669     @param context - returned sender context, to match reply w/ request
2670     @param retval - return code
2671 */
2672 define lisp_add_del_adjacency_reply
2673 {
2674   u32 context;
2675   i32 retval;
2676 };
2677
2678 /** \brief add or delete map request itr rlocs
2679     @param client_index - opaque cookie to identify the sender
2680     @param context - sender context, to match reply w/ request
2681     @param is_add - add address if non-zero, else delete
2682     @param locator_set_name - locator set name
2683 */
2684 define lisp_add_del_map_request_itr_rlocs
2685 {
2686   u32 client_index;
2687   u32 context;
2688   u8 is_add;
2689   u8 locator_set_name[64];
2690 };
2691
2692 /** \brief Reply for lisp_add_del_map_request_itr_rlocs
2693     @param context - returned sender context, to match reply w/ request
2694     @param retval - return code
2695 */
2696
2697 define lisp_add_del_map_request_itr_rlocs_reply
2698 {
2699   u32 context;
2700   i32 retval;
2701 };
2702
2703 /** \brief map/unmap vni/bd_index to vrf
2704     @param client_index - opaque cookie to identify the sender
2705     @param context - sender context, to match reply w/ request
2706     @param is_add - add or delete mapping
2707     @param dp_table - virtual network id/bridge domain index
2708     @param vrf - vrf
2709 */
2710 define lisp_eid_table_add_del_map
2711 {
2712   u32 client_index;
2713   u32 context;
2714   u8 is_add;
2715   u32 vni;
2716   u32 dp_table;
2717   u8 is_l2;
2718 };
2719
2720 /** \brief Reply for lisp_eid_table_add_del_map
2721     @param context - returned sender context, to match reply w/ request
2722     @param retval - return code
2723 */
2724 define lisp_eid_table_add_del_map_reply
2725 {
2726   u32 context;
2727   i32 retval;
2728 };
2729
2730 /** \brief Request for map lisp locator status
2731     @param client_index - opaque cookie to identify the sender
2732     @param context - sender context, to match reply w/ request
2733     @param locator_set_index - index of locator_set
2734     @param ls_name - locator set name
2735     @param is_index_set - flag indicating whether ls_name or ls_index is set
2736  */
2737 define lisp_locator_dump
2738 {
2739   u32 client_index;
2740   u32 context;
2741   u32 ls_index;
2742   u8 ls_name[64];
2743   u8 is_index_set;
2744 };
2745
2746 /** \brief LISP locator_set status
2747     @param local - if is set, then locator is local
2748     @param locator_set_name - name of the locator_set
2749     @param sw_if_index - sw_if_index of the locator
2750     @param priority - locator priority
2751     @param weight - locator weight
2752   */
2753 define lisp_locator_details
2754 {
2755   u32 context;
2756   u8 local;
2757   u32 sw_if_index;
2758   u8 is_ipv6;
2759   u8 ip_address[16];
2760   u8 priority;
2761   u8 weight;
2762 };
2763
2764 /** \brief LISP locator_set status
2765     @param context - sender context, to match reply w/ request
2766     @param ls_index - locator set index
2767     @param ls_name - name of the locator set
2768  */
2769 define lisp_locator_set_details
2770 {
2771   u32 context;
2772   u32 ls_index;
2773   u8 ls_name[64];
2774 };
2775
2776 /** \brief Request for locator_set summary status
2777     @param client_index - opaque cookie to identify the sender
2778     @param context - sender context, to match reply w/ request
2779     @param filter - filter type
2780       Supported values:
2781         0: all locator sets
2782         1: local locator sets
2783         2: remote locator sets
2784  */
2785 define lisp_locator_set_dump
2786 {
2787   u32 client_index;
2788   u32 context;
2789   u8 filter;
2790 };
2791
2792 /** \brief Dump lisp eid-table
2793     @param client_index - opaque cookie to identify the sender
2794     @param context - sender context, to match reply w/ request
2795     @param locator_set_index - index of locator_set, if ~0 then the mapping
2796                                 is negative
2797     @param action - negative map request action
2798     @param is_local - local if non-zero, else remote
2799     @param eid_type:
2800       0 : ipv4
2801       1 : ipv6
2802       2 : mac
2803     @param is_src_dst - EID is type of source/destination
2804     @param eid - EID can be ip4, ip6 or mac
2805     @param eid_prefix_len - prefix length
2806     @param seid - source EID can be ip4, ip6 or mac
2807     @param seid_prefix_len - source prefix length
2808     @param vni - virtual network instance
2809     @param ttl - time to live
2810     @param authoritative - authoritative
2811 */
2812
2813 define lisp_eid_table_details
2814 {
2815   u32 context;
2816   u32 locator_set_index;
2817   u8 action;
2818   u8 is_local;
2819   u8 eid_type;
2820   u8 is_src_dst;
2821   u32 vni;
2822   u8 eid[16];
2823   u8 eid_prefix_len;
2824   u8 seid[16];
2825   u8 seid_prefix_len;
2826   u32 ttl;
2827   u8 authoritative;
2828 };
2829
2830 /** \brief Request for eid table summary status
2831     @param client_index - opaque cookie to identify the sender
2832     @param context - sender context, to match reply w/ request
2833     @param eid_set - if non-zero request info about specific mapping
2834     @param vni - virtual network instance; valid only if eid_set != 0
2835     @param prefix_length - prefix length if EID is IP address;
2836       valid only if eid_set != 0
2837     @param eid_type - EID type; valid only if eid_set != 0
2838       Supported values:
2839         0: EID is IPv4
2840         1: EID is IPv6
2841         2: EID is ethernet address
2842     @param eid - endpoint identifier
2843     @param filter - filter type;
2844       Support values:
2845         0: all eid
2846         1: local eid
2847         2: remote eid
2848  */
2849 define lisp_eid_table_dump
2850 {
2851   u32 client_index;
2852   u32 context;
2853   u8 eid_set;
2854   u8 prefix_length;
2855   u32 vni;
2856   u8 eid_type;
2857   u8 eid[16];
2858   u8 filter;
2859 };
2860
2861 /** \brief Shows relationship between vni and vrf/bd
2862     @param dp_table - VRF index or bridge domain index
2863     @param vni - vitual network instance
2864   */
2865 define lisp_eid_table_map_details
2866 {
2867   u32 context;
2868   u32 vni;
2869   u32 dp_table;
2870 };
2871
2872 /** \brief Request for lisp_eid_table_map_details
2873     @param client_index - opaque cookie to identify the sender
2874     @param context - sender context, to match reply w/ request
2875     @param is_l2 - if set dump vni/bd mappings else vni/vrf
2876  */
2877 define lisp_eid_table_map_dump
2878 {
2879   u32 client_index;
2880   u32 context;
2881   u8 is_l2;
2882 };
2883
2884 /** \brief Dumps all VNIs used in mappings
2885     @param client_index - opaque cookie to identify the sender
2886     @param context - sender context, to match reply w/ request
2887   */
2888 define lisp_eid_table_vni_dump
2889 {
2890   u32 client_index;
2891   u32 context;
2892 };
2893
2894 /** \brief reply to lisp_eid_table_vni_dump
2895     @param client_index - opaque cookie to identify the sender
2896     @param context - sender context, to match reply w/ request
2897     @param vni - virtual network instance
2898  */
2899 define lisp_eid_table_vni_details
2900 {
2901   u32 client_index;
2902   u32 context;
2903   u32 vni;
2904 };
2905
2906 define lisp_gpe_tunnel_details
2907 {
2908   u32 context;
2909   u32 tunnels;
2910   u8 is_ipv6;
2911   u8 source_ip[16];
2912   u8 destination_ip[16];
2913   u32 encap_fib_id;
2914   u32 decap_fib_id;
2915   u32 dcap_next;
2916   u8 lisp_ver;
2917   u8 next_protocol;
2918   u8 flags;
2919   u8 ver_res;
2920   u8 res;
2921   u32 iid;
2922 };
2923
2924 /** \brief Request for gpe tunnel summary status
2925     @param client_index - opaque cookie to identify the sender
2926     @param context - sender context, to match reply w/ request
2927  */
2928 define lisp_gpe_tunnel_dump
2929 {
2930   u32 client_index;
2931   u32 context;
2932 };
2933
2934 /** \brief LISP map resolver status
2935     @param locator_set_name - name of the locator_set
2936     @param is_ipv6 - if non-zero the address is ipv6, else ipv4
2937     @param ip_address - array of address bytes
2938  */
2939 define lisp_map_resolver_details
2940 {
2941   u32 context;
2942   u8 is_ipv6;
2943   u8 ip_address[16];
2944 };
2945
2946 /** \brief Request for map resolver summary status
2947     @param client_index - opaque cookie to identify the sender
2948     @param context - sender context, to match reply w/ request
2949  */
2950 define lisp_map_resolver_dump
2951 {
2952   u32 client_index;
2953   u32 context;
2954 };
2955
2956 /** \brief Request for lisp-gpe protocol status
2957     @param client_index - opaque cookie to identify the sender
2958     @param context - sender context, to match reply w/ request
2959 */
2960 define show_lisp_status
2961 {
2962   u32 client_index;
2963   u32 context;
2964 };
2965
2966 /** \brief Status of lisp, enable or disable
2967     @param context - sender context, to match reply w/ request
2968     @param feature_status - lisp enable if non-zero, else disable
2969     @param gpe_status - lisp enable if non-zero, else disable
2970 */
2971 define show_lisp_status_reply
2972 {
2973   u32 context;
2974   i32 retval;
2975   u8 feature_status;
2976   u8 gpe_status;
2977 };
2978
2979 /** \brief Get LISP map request itr rlocs status
2980     @param context - sender context, to match reply w/ request
2981     @param locator_set_name - name of the locator_set
2982  */
2983 define lisp_get_map_request_itr_rlocs
2984 {
2985   u32 client_index;
2986   u32 context;
2987 };
2988
2989 /** \brief Request for map request itr rlocs summary status
2990  */
2991 define lisp_get_map_request_itr_rlocs_reply
2992 {
2993   u32 context;
2994   i32 retval;
2995   u8 locator_set_name[64];
2996 };
2997
2998 /** \brief Request for lisp pitr status
2999     @param client_index - opaque cookie to identify the sender
3000     @param context - sender context, to match reply w/ request
3001 */
3002 define show_lisp_pitr
3003 {
3004   u32 client_index;
3005   u32 context;
3006 };
3007
3008 /** \brief Status of lisp pitr, enable or disable
3009     @param context - sender context, to match reply w/ request
3010     @param status - lisp pitr enable if non-zero, else disable
3011     @param locator_set_name -  name of the locator_set
3012 */
3013 define show_lisp_pitr_reply
3014 {
3015   u32 context;
3016   i32 retval;
3017   u8 status;
3018   u8 locator_set_name[64];
3019 };
3020
3021 /* Gross kludge, DGMS */
3022 define interface_name_renumber
3023 {
3024   u32 client_index;
3025   u32 context;
3026   u32 sw_if_index;
3027   u32 new_show_dev_instance;
3028 };
3029
3030 define interface_name_renumber_reply
3031 {
3032   u32 context;
3033   i32 retval;
3034 };
3035
3036 /** \brief Register for ip4 arp resolution events
3037     @param client_index - opaque cookie to identify the sender
3038     @param context - sender context, to match reply w/ request
3039     @param enable_disable - 1 => register for events, 0 => cancel registration
3040     @param pid - sender's pid
3041     @param address - the exact ip4 address of interest
3042 */
3043 define want_ip4_arp_events
3044 {
3045   u32 client_index;
3046   u32 context;
3047   u8 enable_disable;
3048   u32 pid;
3049   u32 address;
3050 };
3051
3052 /** \brief Reply for interface events registration
3053     @param context - returned sender context, to match reply w/ request
3054     @param retval - return code
3055 */
3056 define want_ip4_arp_events_reply
3057 {
3058   u32 context;
3059   i32 retval;
3060 };
3061
3062 /** \brief Tell client about an ip4 arp resolution event
3063     @param client_index - opaque cookie to identify the sender
3064     @param context - sender context, to match reply w/ request
3065     @param address - the exact ip4 address of interest
3066     @param pid - client pid registered to receive notification
3067     @param sw_if_index - interface which received ARP packet
3068     @param new_mac - the new mac address 
3069     @param mac_ip - 0: resolution event, 1: mac/ip binding in bd
3070 */
3071 define ip4_arp_event
3072 {
3073   u32 client_index;
3074   u32 context;
3075   u32 address;
3076   u32 pid;
3077   u32 sw_if_index;
3078   u8 new_mac[6];
3079   u8 mac_ip;
3080 };
3081
3082 /** \brief Register for ip6 nd resolution events
3083     @param client_index - opaque cookie to identify the sender
3084     @param context - sender context, to match reply w/ request
3085     @param enable_disable - 1 => register for events, 0 => cancel registration
3086     @param pid - sender's pid
3087     @param address - the exact ip6 address of interest
3088 */
3089 define want_ip6_nd_events
3090 {
3091   u32 client_index;
3092   u32 context;
3093   u8 enable_disable;
3094   u32 pid;
3095   u8 address[16];
3096 };
3097
3098 /** \brief Reply for ip6 nd resolution events registration
3099     @param context - returned sender context, to match reply w/ request
3100     @param retval - return code
3101 */
3102 define want_ip6_nd_events_reply
3103 {
3104   u32 context;
3105   i32 retval;
3106 };
3107
3108 /** \brief Tell client about an ip6 nd resolution or mac/ip event
3109     @param client_index - opaque cookie to identify the sender
3110     @param context - sender context, to match reply w/ request
3111     @param pid - client pid registered to receive notification
3112     @param sw_if_index - interface which received ARP packet
3113     @param address - the exact ip6 address of interest
3114     @param new_mac - the new mac address 
3115     @param mac_ip - 0: resolution event, 1: mac/ip binding in bd
3116 */
3117 define ip6_nd_event
3118 {
3119   u32 client_index;
3120   u32 context;
3121   u32 pid;
3122   u32 sw_if_index;
3123   u8 address[16];
3124   u8 new_mac[6];
3125   u8 mac_ip;
3126 };
3127     
3128 /** \brief L2 bridge domain add or delete request
3129     @param client_index - opaque cookie to identify the sender
3130     @param context - sender context, to match reply w/ request
3131     @param bd_id - the bridge domain to create
3132     @param flood - enable/disable bcast/mcast flooding in the bd
3133     @param uu_flood - enable/disable uknown unicast flood in the bd
3134     @param forward - enable/disable forwarding on all interfaces in the bd
3135     @param learn - enable/disable learning on all interfaces in the bd
3136     @param arp_term - enable/disable arp termination in the bd
3137     @param is_add - add or delete flag
3138 */
3139 define bridge_domain_add_del
3140 {
3141   u32 client_index;
3142   u32 context;
3143   u32 bd_id;
3144   u8 flood;
3145   u8 uu_flood;
3146   u8 forward;
3147   u8 learn;
3148   u8 arp_term;
3149   u8 is_add;
3150 };
3151
3152 /** \brief L2 bridge domain add or delete response
3153     @param context - sender context, to match reply w/ request
3154     @param retval - return code for the set bridge flags request
3155 */
3156 define bridge_domain_add_del_reply
3157 {
3158   u32 context;
3159   i32 retval;
3160 };
3161
3162 /** \brief L2 bridge domain request operational state details
3163     @param client_index - opaque cookie to identify the sender
3164     @param context - sender context, to match reply w/ request
3165     @param bd_id - the bridge domain id desired or ~0 to request all bds
3166 */
3167 define bridge_domain_dump
3168 {
3169   u32 client_index;
3170   u32 context;
3171   u32 bd_id;
3172 };
3173
3174 /** \brief L2 bridge domain operational state response
3175     @param bd_id - the bridge domain id
3176     @param flood - bcast/mcast flooding state on all interfaces in the bd
3177     @param uu_flood - uknown unicast flooding state on all interfaces in the bd
3178     @param forward - forwarding state on all interfaces in the bd
3179     @param learn - learning state on all interfaces in the bd
3180     @param arp_term - arp termination state on all interfaces in the bd
3181     @param n_sw_ifs - number of sw_if_index's in the domain
3182 */
3183 define bridge_domain_details
3184 {
3185   u32 context;
3186   u32 bd_id;
3187   u8 flood;
3188   u8 uu_flood;
3189   u8 forward;
3190   u8 learn;
3191   u8 arp_term;
3192   u32 bvi_sw_if_index;
3193   u32 n_sw_ifs;
3194 };
3195
3196 /** \brief L2 bridge domain sw interface operational state response
3197     @param bd_id - the bridge domain id
3198     @param sw_if_index - sw_if_index in the domain
3199     @param shg - split horizon group for the interface
3200 */
3201 define bridge_domain_sw_if_details
3202 {
3203   u32 context;
3204   u32 bd_id;
3205   u32 sw_if_index;
3206   u8 shg;
3207 };
3208
3209 /** \brief DHCP Client config add / del request
3210     @param client_index - opaque cookie to identify the sender
3211     @param context - sender context, to match reply w/ request
3212     @param sw_if_index - index of the interface for DHCP client
3213     @param hostname - hostname
3214     @param is_add - add the config if non-zero, else delete
3215     @param want_dhcp_event - DHCP event sent to the sender
3216            via dhcp_compl_event API message if non-zero
3217     @param pid - sender's pid
3218 */
3219 define dhcp_client_config
3220 {
3221   u32 client_index;
3222   u32 context;
3223   u32 sw_if_index;
3224   u8 hostname[64];
3225   u8 is_add;
3226   u8 want_dhcp_event;
3227   u32 pid;
3228 };
3229
3230 /** \brief DHCP Client config response
3231     @param context - sender context, to match reply w/ request
3232     @param retval - return code for the request
3233 */
3234 define dhcp_client_config_reply
3235 {
3236   u32 context;
3237   i32 retval;
3238 };
3239
3240 /** \brief Set/unset input ACL interface
3241     @param client_index - opaque cookie to identify the sender
3242     @param context - sender context, to match reply w/ request
3243     @param sw_if_index - interface to set/unset input ACL
3244     @param ip4_table_index - ip4 classify table index (~0 for skip)
3245     @param ip6_table_index - ip6 classify table index (~0 for skip)
3246     @param l2_table_index  -  l2 classify table index (~0 for skip)
3247     @param is_add - Set input ACL if non-zero, else unset
3248     Note: User is recommeneded to use just one valid table_index per call.
3249           (ip4_table_index, ip6_table_index, or l2_table_index)
3250 */
3251 define input_acl_set_interface
3252 {
3253   u32 client_index;
3254   u32 context;
3255   u32 sw_if_index;
3256   u32 ip4_table_index;
3257   u32 ip6_table_index;
3258   u32 l2_table_index;
3259   u8 is_add;
3260 };
3261
3262 /** \brief Set/unset input ACL interface response
3263     @param context - sender context, to match reply w/ request
3264     @param retval - return code for the request
3265 */
3266 define input_acl_set_interface_reply
3267 {
3268   u32 context;
3269   i32 retval;
3270 };
3271
3272 /** \brief IPsec: Add/delete Security Policy Database
3273     @param client_index - opaque cookie to identify the sender
3274     @param context - sender context, to match reply w/ request
3275     @param is_add - add SPD if non-zero, else delete
3276     @param spd_id - SPD instance id (control plane allocated)
3277 */
3278
3279 define ipsec_spd_add_del
3280 {
3281   u32 client_index;
3282   u32 context;
3283   u8 is_add;
3284   u32 spd_id;
3285 };
3286
3287 /** \brief Reply for IPsec: Add/delete Security Policy Database entry
3288     @param context - returned sender context, to match reply w/ request
3289     @param retval - return code
3290 */
3291
3292 define ipsec_spd_add_del_reply
3293 {
3294   u32 context;
3295   i32 retval;
3296 };
3297
3298 /** \brief IPsec: Add/delete SPD from interface
3299
3300     @param client_index - opaque cookie to identify the sender
3301     @param context - sender context, to match reply w/ request
3302     @param is_add - add security mode if non-zero, else delete
3303     @param sw_if_index - index of the interface
3304     @param spd_id - SPD instance id to use for lookups
3305 */
3306
3307
3308 define ipsec_interface_add_del_spd
3309 {
3310   u32 client_index;
3311   u32 context;
3312
3313   u8 is_add;
3314   u32 sw_if_index;
3315   u32 spd_id;
3316 };
3317
3318 /** \brief Reply for IPsec: Add/delete SPD from interface
3319     @param context - returned sender context, to match reply w/ request
3320     @param retval - return code
3321 */
3322
3323 define ipsec_interface_add_del_spd_reply
3324 {
3325   u32 context;
3326   i32 retval;
3327 };
3328
3329 /** \brief IPsec: Add/delete Security Policy Database entry
3330
3331     See RFC 4301, 4.4.1.1 on how to match packet to selectors
3332
3333     @param client_index - opaque cookie to identify the sender
3334     @param context - sender context, to match reply w/ request
3335     @param is_add - add SPD if non-zero, else delete
3336     @param spd_id - SPD instance id (control plane allocated)
3337     @param priority - priority of SPD entry (non-unique value).  Used to order SPD matching - higher priorities match before lower
3338     @param is_outbound - entry applies to outbound traffic if non-zero, otherwise applies to inbound traffic
3339     @param is_ipv6 - remote/local address are IPv6 if non-zero, else IPv4
3340     @param remote_address_start - start of remote address range to match
3341     @param remote_address_stop - end of remote address range to match
3342     @param local_address_start - start of local address range to match
3343     @param local_address_stop - end of local address range to match
3344     @param protocol - protocol type to match [0 means any]
3345     @param remote_port_start - start of remote port range to match ...
3346     @param remote_port_stop - end of remote port range to match [0 to 65535 means ANY, 65535 to 0 means OPAQUE]
3347     @param local_port_start - start of local port range to match ...
3348     @param local_port_stop - end of remote port range to match [0 to 65535 means ANY, 65535 to 0 means OPAQUE]
3349     @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)
3350     @param sa_id - SAD instance id (control plane allocated)
3351
3352 */
3353
3354 define ipsec_spd_add_del_entry
3355 {
3356   u32 client_index;
3357   u32 context;
3358   u8 is_add;
3359
3360   u32 spd_id;
3361   i32 priority;
3362   u8 is_outbound;
3363
3364   // Selector
3365   u8 is_ipv6;
3366   u8 is_ip_any;
3367   u8 remote_address_start[16];
3368   u8 remote_address_stop[16];
3369   u8 local_address_start[16];
3370   u8 local_address_stop[16];
3371
3372   u8 protocol;
3373
3374   u16 remote_port_start;
3375   u16 remote_port_stop;
3376   u16 local_port_start;
3377   u16 local_port_stop;
3378
3379   // Policy
3380   u8 policy;
3381   u32 sa_id;
3382 };
3383
3384 /** \brief Reply for IPsec: Add/delete Security Policy Database entry
3385     @param context - returned sender context, to match reply w/ request
3386     @param retval - return code
3387 */
3388
3389 define ipsec_spd_add_del_entry_reply
3390 {
3391   u32 context;
3392   i32 retval;
3393 };
3394
3395 /** \brief IPsec: Add/delete Security Association Database entry
3396     @param client_index - opaque cookie to identify the sender
3397     @param context - sender context, to match reply w/ request
3398     @param is_add - add SAD entry if non-zero, else delete
3399
3400     @param sad_id - sad id
3401
3402     @param spi - security parameter index
3403
3404     @param protocol - 0 = AH, 1 = ESP
3405
3406     @param crypto_algorithm - 0 = Null, 1 = AES-CBC-128, 2 = AES-CBC-192, 3 = AES-CBC-256, 4 = 3DES-CBC
3407     @param crypto_key_length - length of crypto_key in bytes
3408     @param crypto_key - crypto keying material
3409
3410     @param integrity_algorithm - 0 = None, 1 = MD5-96, 2 = SHA1-96, 3 = SHA-256, 4 = SHA-384, 5=SHA-512
3411     @param integrity_key_length - length of integrity_key in bytes
3412     @param integrity_key - integrity keying material
3413
3414     @param use_extended_sequence_number - use ESN when non-zero
3415
3416     @param is_tunnel - IPsec tunnel mode if non-zero, else transport mode
3417     @param is_tunnel_ipv6 - IPsec tunnel mode is IPv6 if non-zero, else IPv4 tunnel only valid if is_tunnel is non-zero
3418     @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
3419     @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
3420
3421     To be added:
3422      Anti-replay
3423      IPsec tunnel address copy mode (to support GDOI)
3424  */
3425
3426 define ipsec_sad_add_del_entry
3427 {
3428   u32 client_index;
3429   u32 context;
3430   u8 is_add;
3431
3432   u32 sad_id;
3433
3434   u32 spi;
3435
3436   u8 protocol;
3437
3438   u8 crypto_algorithm;
3439   u8 crypto_key_length;
3440   u8 crypto_key[128];
3441
3442   u8 integrity_algorithm;
3443   u8 integrity_key_length;
3444   u8 integrity_key[128];
3445
3446   u8 use_extended_sequence_number;
3447
3448   u8 is_tunnel;
3449   u8 is_tunnel_ipv6;
3450   u8 tunnel_src_address[16];
3451   u8 tunnel_dst_address[16];
3452 };
3453
3454 /** \brief Reply for IPsec: Add/delete Security Association Database entry
3455     @param context - returned sender context, to match reply w/ request
3456     @param retval - return code
3457 */
3458
3459 define ipsec_sad_add_del_entry_reply
3460 {
3461   u32 context;
3462   i32 retval;
3463 };
3464
3465 /** \brief IPsec: Update Security Association keys
3466     @param client_index - opaque cookie to identify the sender
3467     @param context - sender context, to match reply w/ request
3468
3469     @param sa_id - sa id
3470
3471     @param crypto_key_length - length of crypto_key in bytes
3472     @param crypto_key - crypto keying material
3473
3474     @param integrity_key_length - length of integrity_key in bytes
3475     @param integrity_key - integrity keying material
3476 */
3477
3478 define ipsec_sa_set_key
3479 {
3480   u32 client_index;
3481   u32 context;
3482
3483   u32 sa_id;
3484
3485   u8 crypto_key_length;
3486   u8 crypto_key[128];
3487
3488   u8 integrity_key_length;
3489   u8 integrity_key[128];
3490 };
3491
3492 /** \brief Reply for IPsec: Update Security Association keys
3493     @param context - returned sender context, to match reply w/ request
3494     @param retval - return code
3495 */
3496
3497 define ipsec_sa_set_key_reply
3498 {
3499   u32 context;
3500   i32 retval;
3501 };
3502
3503 /** \brief IKEv2: Add/delete profile
3504     @param client_index - opaque cookie to identify the sender
3505     @param context - sender context, to match reply w/ request
3506
3507     @param name - IKEv2 profile name
3508     @param is_add - Add IKEv2 profile if non-zero, else delete
3509 */
3510 define ikev2_profile_add_del
3511 {
3512   u32 client_index;
3513   u32 context;
3514
3515   u8 name[64];
3516   u8 is_add;
3517 };
3518
3519 /** \brief Reply for IKEv2: Add/delete profile
3520     @param context - returned sender context, to match reply w/ request
3521     @param retval - return code
3522 */
3523 define ikev2_profile_add_del_reply
3524 {
3525   u32 context;
3526   i32 retval;
3527 };
3528
3529 /** \brief IKEv2: Set IKEv2 profile authentication method
3530     @param client_index - opaque cookie to identify the sender
3531     @param context - sender context, to match reply w/ request
3532
3533     @param name - IKEv2 profile name
3534     @param auth_method - IKEv2 authentication method (shared-key-mic/rsa-sig)
3535     @param is_hex - Authentication data in hex format if non-zero, else string
3536     @param data_len - Authentication data length
3537     @param data - Authentication data (for rsa-sig cert file path)
3538 */
3539 define ikev2_profile_set_auth
3540 {
3541   u32 client_index;
3542   u32 context;
3543
3544   u8 name[64];
3545   u8 auth_method;
3546   u8 is_hex;
3547   u32 data_len;
3548   u8 data[0];
3549 };
3550
3551 /** \brief Reply for IKEv2: Set IKEv2 profile authentication method
3552     @param context - returned sender context, to match reply w/ request
3553     @param retval - return code
3554 */
3555 define ikev2_profile_set_auth_reply
3556 {
3557   u32 context;
3558   i32 retval;
3559 };
3560
3561 /** \brief IKEv2: Set IKEv2 profile local/remote identification
3562     @param client_index - opaque cookie to identify the sender
3563     @param context - sender context, to match reply w/ request
3564
3565     @param name - IKEv2 profile name
3566     @param is_local - Identification is local if non-zero, else remote
3567     @param id_type - Identification type
3568     @param data_len - Identification data length
3569     @param data - Identification data
3570 */
3571 define ikev2_profile_set_id
3572 {
3573   u32 client_index;
3574   u32 context;
3575
3576   u8 name[64];
3577   u8 is_local;
3578   u8 id_type;
3579   u32 data_len;
3580   u8 data[0];
3581 };
3582
3583 /** \brief Reply for IKEv2:
3584     @param context - returned sender context, to match reply w/ request
3585     @param retval - return code
3586 */
3587 define ikev2_profile_set_id_reply
3588 {
3589   u32 context;
3590   i32 retval;
3591 };
3592
3593 /** \brief IKEv2: Set IKEv2 profile traffic selector parameters
3594     @param client_index - opaque cookie to identify the sender
3595     @param context - sender context, to match reply w/ request
3596
3597     @param name - IKEv2 profile name
3598     @param is_local - Traffic selector is local if non-zero, else remote
3599     @param proto - Traffic selector IP protocol (if zero not relevant)
3600     @param start_port - The smallest port number allowed by traffic selector
3601     @param end_port - The largest port number allowed by traffic selector
3602     @param start_addr - The smallest address included in traffic selector
3603     @param end_addr - The largest address included in traffic selector
3604 */
3605 define ikev2_profile_set_ts
3606 {
3607   u32 client_index;
3608   u32 context;
3609
3610   u8 name[64];
3611   u8 is_local;
3612   u8 proto;
3613   u16 start_port;
3614   u16 end_port;
3615   u32 start_addr;
3616   u32 end_addr;
3617 };
3618
3619 /** \brief Reply for IKEv2: Set IKEv2 profile traffic selector parameters
3620     @param context - returned sender context, to match reply w/ request
3621     @param retval - return code
3622 */
3623 define ikev2_profile_set_ts_reply
3624 {
3625   u32 context;
3626   i32 retval;
3627 };
3628
3629 /** \brief IKEv2: Set IKEv2 local RSA private key
3630     @param client_index - opaque cookie to identify the sender
3631     @param context - sender context, to match reply w/ request
3632
3633     @param key_file - Key file absolute path
3634 */
3635 define ikev2_set_local_key
3636 {
3637   u32 client_index;
3638   u32 context;
3639
3640   u8 key_file[256];
3641 };
3642
3643 /** \brief Reply for IKEv2: Set IKEv2 local key
3644     @param context - returned sender context, to match reply w/ request
3645     @param retval - return code
3646 */
3647 define ikev2_set_local_key_reply
3648 {
3649   u32 context;
3650   i32 retval;
3651 };
3652
3653 /** \brief Tell client about a DHCP completion event
3654     @param client_index - opaque cookie to identify the sender
3655     @param pid - client pid registered to receive notification
3656     @param is_ipv6 - if non-zero the address is ipv6, else ipv4
3657     @param host_address - Host IP address
3658     @param router_address - Router IP address
3659     @param host_mac - Host MAC address
3660 */
3661 define dhcp_compl_event
3662 {
3663   u32 client_index;
3664   u32 pid;
3665   u8 hostname[64];
3666   u8 is_ipv6;
3667   u8 host_address[16];
3668   u8 router_address[16];
3669   u8 host_mac[6];
3670 };
3671
3672 /** \brief Add MAP domains
3673     @param client_index - opaque cookie to identify the sender
3674     @param context - sender context, to match reply w/ request
3675     @param ip6_prefix - Rule IPv6 prefix
3676     @param ip4_prefix - Rule IPv4 prefix
3677     @param ip6_src - MAP domain IPv6 BR address / Tunnel source
3678     @param ip6_prefix_len - Rule IPv6 prefix length
3679     @param ip4_prefix_len - Rule IPv4 prefix length
3680     @param ea_bits_len - Embedded Address bits length
3681     @param psid_offset - Port Set Identifider (PSID) offset
3682     @param psid_length - PSID length
3683     @param is_translation - MAP-E / MAP-T
3684     @param mtu - MTU
3685 */
3686 define map_add_domain
3687 {
3688   u32 client_index;
3689   u32 context;
3690   u8 ip6_prefix[16];
3691   u8 ip4_prefix[4];
3692   u8 ip6_src[16];
3693   u8 ip6_prefix_len;
3694   u8 ip4_prefix_len;
3695   u8 ip6_src_prefix_len;
3696   u8 ea_bits_len;
3697   u8 psid_offset;
3698   u8 psid_length;
3699   u8 is_translation;
3700   u16 mtu;
3701 };
3702
3703 /** \brief Reply for MAP domain add
3704     @param context - returned sender context, to match reply w/ request
3705     @param index - MAP domain index
3706     @param retval - return code
3707 */
3708 define map_add_domain_reply
3709 {
3710   u32 context;
3711   u32 index;
3712   i32 retval;
3713 };
3714
3715 /** \brief Delete MAP domain
3716     @param client_index - opaque cookie to identify the sender
3717     @param context - sender context, to match reply w/ request
3718     @param index - MAP Domain index
3719 */
3720 define map_del_domain
3721 {
3722   u32 client_index;
3723   u32 context;
3724   u32 index;
3725 };
3726
3727 /** \brief Reply for MAP domain del
3728     @param context - returned sender context, to match reply w/ request
3729     @param retval - return code
3730 */
3731 define map_del_domain_reply
3732 {
3733   u32 context;
3734   i32 retval;
3735 };
3736
3737 /** \brief Add or Delete MAP rule from a domain (Only used for shared IPv4 per subscriber)
3738     @param client_index - opaque cookie to identify the sender
3739     @param context - sender context, to match reply w/ request
3740     @param index - MAP Domain index
3741     @param is_add - If 1 add rule, if 0 delete rule
3742     @param ip6_dst - MAP CE IPv6 address
3743     @param psid - Rule PSID
3744 */
3745 define map_add_del_rule
3746 {
3747   u32 client_index;
3748   u32 context;
3749   u32 index;
3750   u32 is_add;
3751   u8 ip6_dst[16];
3752   u16 psid;
3753 };
3754
3755 /** \brief Reply for MAP rule add/del
3756     @param context - returned sender context, to match reply w/ request
3757     @param retval - return code
3758 */
3759 define map_add_del_rule_reply
3760 {
3761   u32 context;
3762   i32 retval;
3763 };
3764
3765 /** \brief Get list of map domains
3766     @param client_index - opaque cookie to identify the sender
3767 */
3768 define map_domain_dump
3769 {
3770   u32 client_index;
3771   u32 context;
3772 };
3773
3774 define map_domain_details
3775 {
3776   u32 context;
3777   u32 domain_index;
3778   u8 ip6_prefix[16];
3779   u8 ip4_prefix[4];
3780   u8 ip6_src[16];
3781   u8 ip6_prefix_len;
3782   u8 ip4_prefix_len;
3783   u8 ip6_src_len;
3784   u8 ea_bits_len;
3785   u8 psid_offset;
3786   u8 psid_length;
3787   u8 flags;
3788   u16 mtu;
3789   u8 is_translation;
3790 };
3791
3792 define map_rule_dump
3793 {
3794   u32 client_index;
3795   u32 context;
3796   u32 domain_index;
3797 };
3798
3799 define map_rule_details
3800 {
3801   u32 context;
3802   u8 ip6_dst[16];
3803   u16 psid;
3804 };
3805
3806 /** \brief Request for a single block of summary stats
3807     @param client_index - opaque cookie to identify the sender
3808     @param context - sender context, to match reply w/ request
3809 */
3810 define map_summary_stats
3811 {
3812   u32 client_index;
3813   u32 context;
3814 };
3815
3816 /** \brief Reply for map_summary_stats request
3817     @param context - sender context, to match reply w/ request
3818     @param retval - return code for request
3819     @param total_bindings -  
3820     @param total_pkts -  
3821     @param total_ip4_fragments -
3822     @param total_security_check - 
3823 */
3824 define map_summary_stats_reply
3825 {
3826   u32 context;
3827   i32 retval;
3828   u64 total_bindings;
3829   u64 total_pkts[2];
3830   u64 total_bytes[2];
3831   u64 total_ip4_fragments;
3832   u64 total_security_check[2];
3833 };
3834
3835 /** \brief cop: enable/disable junk filtration features on an interface
3836     @param client_index - opaque cookie to identify the sender
3837     @param context - sender context, to match reply w/ request
3838     @param sw_if_inded - desired interface
3839     @param enable_disable - 1 => enable, 0 => disable
3840 */
3841
3842 define cop_interface_enable_disable
3843 {
3844   u32 client_index;
3845   u32 context;
3846   u32 sw_if_index;
3847   u8 enable_disable;
3848 };
3849
3850 /** \brief cop: interface enable/disable junk filtration reply
3851     @param context - returned sender context, to match reply w/ request
3852     @param retval - return code
3853 */
3854
3855 define cop_interface_enable_disable_reply
3856 {
3857   u32 context;
3858   i32 retval;
3859 };
3860
3861 /** \brief cop: enable/disable whitelist filtration features on an interface
3862     Note: the supplied fib_id must match in order to remove the feature!
3863     
3864     @param client_index - opaque cookie to identify the sender
3865     @param context - sender context, to match reply w/ request
3866     @param sw_if_index - interface handle, physical interfaces only
3867     @param fib_id - fib identifier for the whitelist / blacklist fib
3868     @param ip4 - 1 => enable ip4 filtration, 0=> disable ip4 filtration
3869     @param ip6 - 1 => enable ip6 filtration, 0=> disable ip6 filtration
3870     @param default_cop -  1 => enable non-ip4, non-ip6 filtration 0=> disable it
3871 */
3872
3873 define cop_whitelist_enable_disable
3874 {
3875   u32 client_index;
3876   u32 context;
3877   u32 sw_if_index;
3878   u32 fib_id;
3879   u8 ip4;
3880   u8 ip6;
3881   u8 default_cop;
3882 };
3883
3884 /** \brief cop: interface enable/disable junk filtration reply
3885     @param context - returned sender context, to match reply w/ request
3886     @param retval - return code
3887 */
3888
3889 define cop_whitelist_enable_disable_reply
3890 {
3891   u32 context;
3892   i32 retval;
3893 };
3894
3895 /** \brief get_node_graph - get a copy of the vpp node graph
3896     including the current set of graph arcs.
3897
3898     @param client_index - opaque cookie to identify the sender
3899     @param context - sender context, to match reply w/ request
3900 */
3901
3902 define get_node_graph
3903 {
3904   u32 client_index;
3905   u32 context;
3906 };
3907
3908 /** \brief get_node_graph_reply
3909     @param context - returned sender context, to match reply w/ request
3910     @param retval - return code
3911     @param reply_in_shmem - result from vlib_node_serialize, in shared
3912     memory. Process with vlib_node_unserialize, remember to switch
3913     heaps and free the result.
3914 */
3915
3916 define get_node_graph_reply
3917 {
3918   u32 context;
3919   i32 retval;
3920   u64 reply_in_shmem;
3921 };
3922
3923 /** \brief Clear interface statistics
3924     @param client_index - opaque cookie to identify the sender
3925     @param context - sender context, to match reply w/ request
3926     @param sw_if_index - index of the interface to clear statistics
3927 */
3928 define sw_interface_clear_stats
3929 {
3930   u32 client_index;
3931   u32 context;
3932   u32 sw_if_index;
3933 };
3934
3935 /** \brief Reply to sw_interface_clear_stats 
3936     @param context - sender context which was passed in the request
3937     @param retval - return code of the set flags request
3938 */
3939 define sw_interface_clear_stats_reply
3940 {
3941   u32 context;
3942   i32 retval;
3943 };
3944
3945 /** \brief IOAM enable : Enable in-band OAM
3946     @param id - profile id
3947     @param trace_ppc - Trace PPC (none/encap/decap)
3948     @param pow_enable - Proof of Work enabled or not flag
3949     @param trace_enable - iOAM Trace enabled or not flag
3950 */
3951 define ioam_enable
3952 {
3953   u32 client_index;
3954   u32 context;
3955   u16 id;
3956   u8 trace_ppc;
3957   u8 pow_enable;
3958   u8 trace_enable;
3959   u32 node_id;
3960 };
3961
3962 /** \brief iOAM Trace profile add / del response
3963     @param context - sender context, to match reply w/ request
3964     @param retval - return value for request
3965 */
3966 define ioam_enable_reply
3967 {
3968   u32 context;
3969   i32 retval;
3970 };
3971
3972 /** \brief iOAM disable
3973     @param client_index - opaque cookie to identify the sender
3974     @param context - sender context, to match reply w/ request
3975     @param index - MAP Domain index
3976 */
3977 define ioam_disable
3978 {
3979   u32 client_index;
3980   u32 context;
3981   u16 id;
3982 };
3983
3984 /** \brief iOAM disable response
3985     @param context - sender context, to match reply w/ request
3986     @param retval - return value for request
3987 */
3988 define ioam_disable_reply
3989 {
3990   u32 context;
3991   i32 retval;
3992 };
3993
3994 /** \brief Create host-interface
3995     @param client_index - opaque cookie to identify the sender
3996     @param context - sender context, to match reply w/ request
3997     @param host_if_name - interface name
3998     @param hw_addr - interface MAC
3999     @param use_random_hw_addr - use random generated MAC
4000 */
4001 define af_packet_create
4002 {
4003   u32 client_index;
4004   u32 context;
4005
4006   u8 host_if_name[64];
4007   u8 hw_addr[6];
4008   u8 use_random_hw_addr;
4009 };
4010
4011 /** \brief Create host-interface response
4012     @param context - sender context, to match reply w/ request
4013     @param retval - return value for request
4014 */
4015 define af_packet_create_reply
4016 {
4017   u32 context;
4018   i32 retval;
4019   u32 sw_if_index;
4020 };
4021
4022 /** \brief Delete host-interface
4023     @param client_index - opaque cookie to identify the sender
4024     @param context - sender context, to match reply w/ request
4025     @param host_if_name - interface name
4026 */
4027 define af_packet_delete
4028 {
4029   u32 client_index;
4030   u32 context;
4031
4032   u8 host_if_name[64];
4033 };
4034
4035 /** \brief Delete host-interface response
4036     @param context - sender context, to match reply w/ request
4037     @param retval - return value for request
4038 */
4039 define af_packet_delete_reply
4040 {
4041   u32 context;
4042   i32 retval;
4043 };
4044
4045 /** \brief Add/del policer
4046     @param client_index - opaque cookie to identify the sender
4047     @param context - sender context, to match reply w/ request
4048     @param is_add - add policer if non-zero, else delete
4049     @param name - policer name
4050     @param cir - CIR
4051     @param eir - EIR
4052     @param cb - Committed Burst
4053     @param eb - Excess or Peak Burst
4054     @param rate_type - rate type
4055     @param round_type - rounding type
4056     @param type - policer algorithm
4057     @param color_aware - 0=color-blind, 1=color-aware
4058     @param conform_action_type - conform action type
4059     @param conform_dscp - DSCP for conform mar-and-transmit action
4060     @param exceed_action_type - exceed action type
4061     @param exceed_dscp - DSCP for exceed mar-and-transmit action
4062     @param violate_action_type - violate action type
4063     @param violate_dscp - DSCP for violate mar-and-transmit action
4064 */
4065 define policer_add_del
4066 {
4067   u32 client_index;
4068   u32 context;
4069
4070   u8 is_add;
4071   u8 name[64];
4072   u32 cir;
4073   u32 eir;
4074   u64 cb;
4075   u64 eb;
4076   u8 rate_type;
4077   u8 round_type;
4078   u8 type;
4079   u8 color_aware;
4080   u8 conform_action_type;
4081   u8 conform_dscp;
4082   u8 exceed_action_type;
4083   u8 exceed_dscp;
4084   u8 violate_action_type;
4085   u8 violate_dscp;
4086 };
4087
4088 /** \brief Add/del policer response
4089     @param context - sender context, to match reply w/ request
4090     @param retval - return value for request
4091     @param policer_index - for add, returned index of the new policer
4092 */
4093 define policer_add_del_reply
4094 {
4095   u32 context;
4096   i32 retval;
4097   u32 policer_index;
4098 };
4099
4100 /** \brief Get list of policers
4101     @param client_index - opaque cookie to identify the sender
4102     @param context - sender context, to match reply w/ request
4103     @param match_name_valid - if 0 request all policers otherwise use match_name
4104     @param match_name - policer name
4105 */
4106 define policer_dump
4107 {
4108   u32 client_index;
4109   u32 context;
4110
4111   u8 match_name_valid;
4112   u8 match_name[64];
4113 };
4114
4115 /** \brief Policer operational state response.
4116     @param context - sender context, to match reply w/ request
4117     @param name - policer name
4118     @param cir - CIR
4119     @param eir - EIR
4120     @param cb - Committed Burst
4121     @param eb - Excess or Peak Burst
4122     @param rate_type - rate type
4123     @param round_type - rounding type
4124     @param type - policer algorithm
4125     @param conform_action_type - conform action type
4126     @param conform_dscp - DSCP for conform mar-and-transmit action
4127     @param exceed_action_type - exceed action type
4128     @param exceed_dscp - DSCP for exceed mar-and-transmit action
4129     @param violate_action_type - violate action type
4130     @param violate_dscp - DSCP for violate mar-and-transmit action
4131     @param single_rate - 1 = single rate policer, 0 = two rate policer
4132     @param color_aware - for hierarchical policing
4133     @param scale - power-of-2 shift amount for lower rates
4134     @param cir_tokens_per_period - number of tokens for each period
4135     @param pir_tokens_per_period - number of tokens for each period for 2-rate policer
4136     @param current_limit - current limit
4137     @param current_bucket - current bucket
4138     @param extended_limit - extended limit
4139     @param extended_bucket - extended bucket
4140     @param last_update_time - last update time
4141 */
4142 define policer_details
4143 {
4144   u32 context;
4145
4146   u8 name[64];
4147   u32 cir;
4148   u32 eir;
4149   u64 cb;
4150   u64 eb;
4151   u8 rate_type;
4152   u8 round_type;
4153   u8 type;
4154   u8 conform_action_type;
4155   u8 conform_dscp;
4156   u8 exceed_action_type;
4157   u8 exceed_dscp;
4158   u8 violate_action_type;
4159   u8 violate_dscp;
4160   u8 single_rate;
4161   u8 color_aware;
4162   u32 scale;
4163   u32 cir_tokens_per_period;
4164   u32 pir_tokens_per_period;
4165   u32 current_limit;
4166   u32 current_bucket;
4167   u32 extended_limit;
4168   u32 extended_bucket;
4169   u64 last_update_time;
4170 };
4171
4172 /** \brief Set/unset policer classify interface
4173     @param client_index - opaque cookie to identify the sender
4174     @param context - sender context, to match reply w/ request
4175     @param sw_if_index - interface to set/unset policer classify
4176     @param ip4_table_index - ip4 classify table index (~0 for skip)
4177     @param ip6_table_index - ip6 classify table index (~0 for skip)
4178     @param l2_table_index  -  l2 classify table index (~0 for skip)
4179     @param is_add - Set if non-zero, else unset
4180     Note: User is recommeneded to use just one valid table_index per call.
4181           (ip4_table_index, ip6_table_index, or l2_table_index)
4182 */
4183 define policer_classify_set_interface
4184 {
4185   u32 client_index;
4186   u32 context;
4187   u32 sw_if_index;
4188   u32 ip4_table_index;
4189   u32 ip6_table_index;
4190   u32 l2_table_index;
4191   u8 is_add;
4192 };
4193
4194 /** \brief Set/unset policer classify interface response
4195     @param context - sender context, to match reply w/ request
4196     @param retval - return value for request
4197 */
4198 define policer_classify_set_interface_reply
4199 {
4200   u32 context;
4201   i32 retval;
4202 };
4203
4204 /** \brief Get list of policer classify interfaces and tables
4205     @param client_index - opaque cookie to identify the sender
4206     @param context - sender context, to match reply w/ request
4207     @param type - classify table type
4208 */
4209 define policer_classify_dump
4210 {
4211   u32 client_index;
4212   u32 context;
4213   u8 type;
4214 };
4215
4216 /** \brief Policer iclassify operational state response.
4217     @param context - sender context, to match reply w/ request
4218     @param sw_if_index - software interface index
4219     @param table_index - classify table index
4220 */
4221 define policer_classify_details
4222 {
4223   u32 context;
4224   u32 sw_if_index;
4225   u32 table_index;
4226 };
4227
4228 /** \brief Create netmap
4229     @param client_index - opaque cookie to identify the sender
4230     @param context - sender context, to match reply w/ request
4231     @param netmap_if_name - interface name
4232     @param hw_addr - interface MAC
4233     @param use_random_hw_addr - use random generated MAC
4234     @param is_pipe - is pipe
4235     @param is_master - 0=slave, 1=master
4236 */
4237 define netmap_create
4238 {
4239   u32 client_index;
4240   u32 context;
4241
4242   u8 netmap_if_name[64];
4243   u8 hw_addr[6];
4244   u8 use_random_hw_addr;
4245   u8 is_pipe;
4246   u8 is_master;
4247 };
4248
4249 /** \brief Create netmap response
4250     @param context - sender context, to match reply w/ request
4251     @param retval - return value for request
4252 */
4253 define netmap_create_reply
4254 {
4255   u32 context;
4256   i32 retval;
4257 };
4258
4259 /** \brief Delete netmap
4260     @param client_index - opaque cookie to identify the sender
4261     @param context - sender context, to match reply w/ request
4262     @param netmap_if_name - interface name
4263 */
4264 define netmap_delete
4265 {
4266   u32 client_index;
4267   u32 context;
4268
4269   u8 netmap_if_name[64];
4270 };
4271
4272 /** \brief Delete netmap response
4273     @param context - sender context, to match reply w/ request
4274     @param retval - return value for request
4275 */
4276 define netmap_delete_reply
4277 {
4278   u32 context;
4279   i32 retval;
4280 };
4281
4282 /** \brief Dump mpls gre tunnel table
4283     @param client_index - opaque cookie to identify the sender
4284     @param tunnel_index - gre tunnel identifier or -1 in case of all tunnels
4285 */
4286 define mpls_gre_tunnel_dump
4287 {
4288   u32 client_index;
4289   u32 context;
4290   i32 tunnel_index;
4291 };
4292
4293 /** \brief mpls gre tunnel operational state response
4294     @param tunnel_index - gre tunnel identifier
4295     @param intfc_address - interface ipv4 addr
4296     @param mask_width - interface ipv4 addr mask
4297     @param hw_if_index - interface id
4298     @param l2_only -
4299     @param tunnel_src - tunnel source ipv4 addr
4300     @param tunnel_dst - tunnel destination ipv4 addr
4301     @param outer_fib_index - gre tunnel identifier
4302     @param encap_index - reference to mpls label table
4303     @param nlabels - number of resolved labels
4304     @param labels - resolved labels
4305 */
4306 define mpls_gre_tunnel_details
4307 {
4308   u32 context;
4309   u32 tunnel_index;
4310
4311   u32 intfc_address;
4312   u32 inner_fib_index;
4313   u32 mask_width;
4314   u32 encap_index;
4315   u32 hw_if_index;
4316   u8 l2_only;
4317   u32 tunnel_src;
4318   u32 tunnel_dst;
4319   u32 outer_fib_index;
4320   u32 nlabels;
4321   u32 labels[nlabels];
4322 };
4323
4324 /** \brief Dump mpls eth tunnel table
4325     @param client_index - opaque cookie to identify the sender
4326     @param tunnel_index - eth tunnel identifier or -1 in case of all tunnels
4327 */
4328 define mpls_eth_tunnel_dump
4329 {
4330   u32 client_index;
4331   u32 context;
4332   i32 tunnel_index;
4333 };
4334
4335 /** \brief mpls eth tunnel operational state response
4336     @param tunnel_index - eth tunnel identifier
4337     @param intfc_address - interface ipv4 addr
4338     @param mask_width - interface ipv4 addr mask
4339     @param hw_if_index - interface id
4340     @param l2_only -
4341     @param tunnel_dst_mac -
4342     @param tx_sw_if_index -
4343     @param encap_index - reference to mpls label table
4344     @param nlabels - number of resolved labels
4345     @param labels - resolved labels
4346 */
4347 define mpls_eth_tunnel_details
4348 {
4349   u32 context;
4350   u32 tunnel_index;
4351
4352   u32 intfc_address;
4353   u32 inner_fib_index;
4354   u32 mask_width;
4355   u32 encap_index;
4356   u32 hw_if_index;
4357   u8 l2_only;
4358   u8 tunnel_dst_mac[6];
4359   u32 tx_sw_if_index;
4360   u32 nlabels;
4361   u32 labels[nlabels];
4362 };
4363
4364 /** \brief Dump mpls fib table
4365     @param client_index - opaque cookie to identify the sender
4366     @param fib_index    - mpls fib entry identifier or -1 in case of all entries
4367 */
4368 define mpls_fib_encap_dump
4369 {
4370   u32 client_index;
4371   u32 context;
4372 };
4373
4374 /** \brief mpls fib encap table response
4375     @param fib_index - fib table id
4376     @param dest - destination ipv4 addr
4377     @param s_bit -
4378     @param entry_index - reference to mpls label table
4379     @param nlabels - number of resolved labels
4380     @param labels - resolved labels
4381 */
4382 define mpls_fib_encap_details
4383 {
4384   u32 context;
4385
4386   u32 fib_index;
4387   u32 entry_index;
4388   u32 dest;
4389   u32 s_bit;
4390   u32 nlabels;
4391   u32 labels[nlabels];
4392 };
4393
4394 /** \brief Dump mpls fib decap table
4395     @param client_index - opaque cookie to identify the sender
4396     @param fib_index    - mpls fib entry identifier or -1 in case of all entries
4397 */
4398 define mpls_fib_decap_dump
4399 {
4400   u32 client_index;
4401   u32 context;
4402 };
4403
4404 /** \brief mpls fib decap table response
4405     @param fib_index - fib table id
4406     @param entry_index - reference to mpls label table
4407     @param dest - destination ipv4 addr
4408     @param s_bit -
4409     @param label - mpls labels
4410     @param rx_table_id - rx fib id
4411     @param tx_table_id - tx fib id
4412     @param swif_tag -
4413 */
4414 define mpls_fib_decap_details
4415 {
4416   u32 context;
4417
4418   u32 fib_index;
4419   u32 entry_index;
4420   u32 dest;
4421   u32 s_bit;
4422   u32 label;
4423   u32 rx_table_id;
4424   u32 tx_table_id;
4425   u8 swif_tag[8];
4426 };
4427
4428 /** \brief Classify get table IDs request
4429     @param client_index - opaque cookie to identify the sender
4430     @param context - sender context, to match reply w/ request
4431 */
4432 define classify_table_ids
4433 {
4434   u32 client_index;
4435   u32 context;
4436 };
4437
4438 /** \brief Reply for classify get table IDs request
4439     @param context - sender context which was passed in the request
4440     @param count - number of ids returned in response
4441     @param ids - array of classify table ids
4442 */
4443 define classify_table_ids_reply
4444 {
4445   u32 context;
4446   i32 retval;
4447   u32 count;
4448   u32 ids[count];
4449 };
4450
4451 /** \brief Classify table ids by interface index request
4452     @param client_index - opaque cookie to identify the sender
4453     @param context - sender context, to match reply w/ request
4454     @param sw_if_index - index of the interface
4455 */
4456 define classify_table_by_interface
4457 {
4458   u32 client_index;
4459   u32 context;
4460   u32 sw_if_index;
4461 };
4462
4463 /** \brief Reply for classify table id by interface index request
4464     @param context - sender context which was passed in the request
4465     @param count - number of ids returned in response
4466     @param sw_if_index - index of the interface
4467     @param l2_table_id - l2 classify table index
4468     @param ip4_table_id - ip4 classify table index
4469     @param ip6_table_id - ip6 classify table index
4470 */
4471 define classify_table_by_interface_reply
4472 {
4473   u32 context;
4474   i32 retval;
4475   u32 sw_if_index;
4476   u32 l2_table_id;
4477   u32 ip4_table_id;
4478   u32 ip6_table_id;
4479 };
4480
4481 /** \brief Classify table info
4482     @param client_index - opaque cookie to identify the sender
4483     @param context - sender context, to match reply w/ request
4484     @param table_id - classify table index
4485 */
4486 define classify_table_info
4487 {
4488   u32 client_index;
4489   u32 context;
4490   u32 table_id;
4491 };
4492
4493 /** \brief Reply for classify table info request
4494     @param context - sender context which was passed in the request
4495     @param count - number of ids returned in response
4496     @param table_id - classify table index
4497     @param nbuckets - number of buckets when adding a table
4498     @param match_n_vectors - number of match vectors
4499     @param skip_n_vectors - number of skip_n_vectors
4500     @param active_sessions - number of sessions (active entries)
4501     @param next_table_index - index of next table
4502     @param miss_next_index - index of miss table
4503     @param mask[] - match mask
4504 */
4505 define classify_table_info_reply
4506 {
4507   u32 context;
4508   i32 retval;
4509   u32 table_id;
4510   u32 nbuckets;
4511   u32 match_n_vectors;
4512   u32 skip_n_vectors;
4513   u32 active_sessions;
4514   u32 next_table_index;
4515   u32 miss_next_index;
4516   u32 mask_length;
4517   u8 mask[mask_length];
4518 };
4519
4520 /** \brief Classify sessions dump request
4521     @param client_index - opaque cookie to identify the sender
4522     @param context - sender context, to match reply w/ request
4523     @param table_id - classify table index
4524 */
4525 define classify_session_dump
4526 {
4527   u32 client_index;
4528   u32 context;
4529   u32 table_id;
4530 };
4531
4532 /** \brief Reply for classify table session dump request
4533     @param context - sender context which was passed in the request
4534     @param count - number of ids returned in response
4535     @param table_id - classify table index
4536     @param hit_next_index - hit_next_index of session
4537     @param opaque_index - for add, opaque_index of session
4538     @param advance - advance value of session
4539     @param match[] - match value for session
4540 */
4541 define classify_session_details
4542 {
4543   u32 context;
4544   i32 retval;
4545   u32 table_id;
4546   u32 hit_next_index;
4547   i32 advance;
4548   u32 opaque_index;
4549   u32 match_length;
4550   u8 match[match_length];
4551 };
4552
4553 /** \brief Configure IPFIX exporter process request
4554     @param client_index - opaque cookie to identify the sender
4555     @param context - sender context, to match reply w/ request
4556     @param collector_address - address of IPFIX collector
4557     @param collector_port - port of IPFIX collector
4558     @param src_address - address of IPFIX exporter
4559     @param vrf_id - VRF / fib table ID
4560     @param path_mtu - Path MTU between exporter and collector
4561     @param template_interval - number of seconds after which to resend template
4562     @param udp_checksum - UDP checksum calculation enable flag
4563 */
4564 define set_ipfix_exporter
4565 {
4566   u32 client_index;
4567   u32 context;
4568   u8 collector_address[16];
4569   u16 collector_port;
4570   u8 src_address[16];
4571   u32 vrf_id;
4572   u32 path_mtu;
4573   u32 template_interval;
4574   u8 udp_checksum;
4575 };
4576
4577 /** \brief Reply to IPFIX exporter configure request
4578     @param context - sender context which was passed in the request
4579 */
4580 define set_ipfix_exporter_reply
4581 {
4582   u32 context;
4583   i32 retval;
4584 };
4585
4586 /** \brief IPFIX exporter dump request
4587     @param client_index - opaque cookie to identify the sender
4588     @param context - sender context, to match reply w/ request
4589 */
4590 define ipfix_exporter_dump
4591 {
4592   u32 client_index;
4593   u32 context;
4594 };
4595
4596 /** \brief Reply to IPFIX exporter dump request
4597     @param context - sender context which was passed in the request
4598     @param collector_address - address of IPFIX collector
4599     @param collector_port - port of IPFIX collector
4600     @param src_address - address of IPFIX exporter
4601     @param fib_index - fib table index
4602     @param path_mtu - Path MTU between exporter and collector
4603     @param template_interval - number of seconds after which to resend template
4604     @param udp_checksum - UDP checksum calculation enable flag
4605 */
4606 define ipfix_exporter_details
4607 {
4608   u32 context;
4609   u8 collector_address[16];
4610   u16 collector_port;
4611   u8 src_address[16];
4612   u32 vrf_id;
4613   u32 path_mtu;
4614   u32 template_interval;
4615   u8 udp_checksum;
4616 };
4617
4618 /** \brief IPFIX classify stream configure request
4619     @param client_index - opaque cookie to identify the sender
4620     @param context - sender context, to match reply w/ request
4621     @param domain_id - domain ID reported in IPFIX messages for classify stream
4622     @param src_port - source port of UDP session for classify stream
4623 */
4624 define set_ipfix_classify_stream {
4625     u32 client_index;
4626     u32 context;
4627     u32 domain_id;
4628     u16 src_port;
4629 };
4630
4631 /** \brief IPFIX classify stream configure response
4632     @param context - sender context, to match reply w/ request
4633     @param retval - return value for request
4634 */
4635 define set_ipfix_classify_stream_reply {
4636     u32 context;
4637     i32 retval;
4638 };
4639
4640 /** \brief IPFIX classify stream dump request
4641     @param client_index - opaque cookie to identify the sender
4642     @param context - sender context, to match reply w/ request
4643 */
4644 define ipfix_classify_stream_dump {
4645     u32 client_index;
4646     u32 context;
4647 };
4648
4649 /** \brief Reply to IPFIX classify stream dump request
4650     @param context - sender context, to match reply w/ request
4651     @param domain_id - domain ID reported in IPFIX messages for classify stream
4652     @param src_port - source port of UDP session for classify stream
4653 */
4654 define ipfix_classify_stream_details {
4655     u32 context;
4656     u32 domain_id;
4657     u16 src_port;
4658 };
4659
4660 /** \brief IPFIX add or delete classifier table request
4661     @param client_index - opaque cookie to identify the sender
4662     @param context - sender context, to match reply w/ request
4663     @param table_id - classifier table ID
4664     @param ip_version - version of IP used in the classifier table
4665     @param transport_protocol - transport protocol used in the classifier table or 255 for unspecified
4666 */
4667 define ipfix_classify_table_add_del {
4668     u32 client_index;
4669     u32 context;
4670     u32 table_id;
4671     u8 ip_version;
4672     u8 transport_protocol;
4673     u8 is_add;
4674 };
4675
4676 /** \brief IPFIX add classifier table response
4677     @param context - sender context which was passed in the request
4678 */
4679 define ipfix_classify_table_add_del_reply {
4680     u32 context;
4681     i32 retval;
4682 };
4683
4684 /** \brief IPFIX classify tables dump request
4685     @param client_index - opaque cookie to identify the sender
4686     @param context - sender context, to match reply w/ request
4687 */
4688 define ipfix_classify_table_dump {
4689     u32 client_index;
4690     u32 context;
4691 };
4692
4693 /** \brief Reply to IPFIX classify tables dump request
4694     @param context - sender context, to match reply w/ request
4695     @param table_id - classifier table ID
4696     @param ip_version - version of IP used in the classifier table
4697     @param transport_protocol - transport protocol used in the classifier table or 255 for unspecified
4698 */
4699 define ipfix_classify_table_details {
4700     u32 context;
4701     u32 table_id;
4702     u8 ip_version;
4703     u8 transport_protocol;
4704 };
4705
4706 /** \brief Query relative index via node names
4707     @param client_index - opaque cookie to identify the sender
4708     @param context - sender context, to match reply w/ request
4709     @param node_name - name of node to find relative index from
4710     @param next_name - next node from node_name to find relative index of
4711 */
4712 define get_next_index
4713 {
4714   u32 client_index;
4715   u32 context;
4716   u8 node_name[64];
4717   u8 next_name[64];
4718 };
4719
4720 /** \brief Reply for get next node index
4721     @param context - sender context which was passed in the request
4722     @param retval - return value
4723     @param next_index - index of the next_node
4724 */
4725 define get_next_index_reply
4726 {
4727   u32 context;
4728   i32 retval;
4729   u32 next_index;
4730 };
4731
4732 /** \brief PacketGenerator create interface request
4733     @param client_index - opaque cookie to identify the sender
4734     @param context - sender context, to match reply w/ request
4735     @param interface_id - interface index
4736 */
4737 define pg_create_interface
4738 {
4739   u32 client_index;
4740   u32 context;
4741   u32 interface_id;
4742 };
4743
4744 /** \brief PacketGenerator create interface response
4745     @param context - sender context, to match reply w/ request
4746     @param retval - return value for request
4747 */
4748 define pg_create_interface_reply
4749 {
4750   u32 context;
4751   i32 retval;
4752   u32 sw_if_index;
4753 };
4754
4755 /** \brief PacketGenerator capture packets on given interface request
4756     @param client_index - opaque cookie to identify the sender
4757     @param context - sender context, to match reply w/ request
4758     @param interface_id - pg interface index
4759     @param is_enabled - 1 if enabling streams, 0 if disabling
4760     @param count - number of packets to be captured
4761     @param pcap_file - pacp file name to store captured packets
4762 */
4763 define pg_capture
4764 {
4765   u32 client_index;
4766   u32 context;
4767   u32 interface_id;
4768   u8 is_enabled;
4769   u32 count;
4770   u32 pcap_name_length;
4771   u8 pcap_file_name[pcap_name_length];
4772 };
4773
4774 /** \brief PacketGenerator capture packets response
4775     @param context - sender context, to match reply w/ request
4776     @param retval - return value for request
4777 */
4778 define pg_capture_reply
4779 {
4780   u32 context;
4781   i32 retval;
4782 };
4783
4784 /** \brief Enable / disable packet generator request
4785     @param client_index - opaque cookie to identify the sender
4786     @param context - sender context, to match reply w/ request
4787     @param is_enabled - 1 if enabling streams, 0 if disabling
4788     @param stream - stream name to be enable/disabled, if not specified handle all streams
4789 */
4790 define pg_enable_disable
4791 {
4792   u32 client_index;
4793   u32 context;
4794   u8 is_enabled;
4795   u32 stream_name_length;
4796   u8 stream_name[stream_name_length];
4797 };
4798
4799 /** \brief Reply for enable / disable packet generator
4800     @param context - returned sender context, to match reply w/ request
4801     @param retval - return code
4802 */
4803 define pg_enable_disable_reply
4804 {
4805   u32 context;
4806   i32 retval;
4807 };
4808
4809 /** \brief Configure IP source and L4 port-range check
4810     @param client_index - opaque cookie to identify the sender
4811     @param context - sender context, to match reply w/ request
4812     @param is_ip6 - 1 if source address type is IPv6
4813     @param is_add - 1 if add, 0 if delete
4814     @param mask_length - mask length for address entry
4815     @param address - array of address bytes
4816     @param number_of_ranges - length of low_port and high_port arrays (must match)
4817     @param low_ports[32] - up to 32 low end of port range entries (must have corresponding high_ports entry)
4818     @param high_ports[32] - up to 32 high end of port range entries (must have corresponding low_ports entry)
4819     @param vrf_id - fib table/vrf id to associate the source and port-range check with
4820     @note To specify a single port set low_port and high_port entry the same
4821 */
4822 define ip_source_and_port_range_check_add_del
4823 {
4824   u32 client_index;
4825   u32 context;
4826   u8 is_ipv6;
4827   u8 is_add;
4828   u8 mask_length;
4829   u8 address[16];
4830   u8 number_of_ranges;
4831   u16 low_ports[32];
4832   u16 high_ports[32];
4833   u32 vrf_id;
4834 };
4835
4836 /** \brief Configure IP source and L4 port-range check reply
4837     @param context - returned sender context, to match reply w/ request
4838     @param retval - return code
4839 */
4840 define ip_source_and_port_range_check_add_del_reply
4841 {
4842   u32 context;
4843   i32 retval;
4844 };
4845
4846 /** \brief Set interface source and L4 port-range request
4847     @param client_index - opaque cookie to identify the sender
4848     @param context - sender context, to match reply w/ request
4849     @param interface_id - interface index
4850     @param tcp_vrf_id - VRF associated with source and TCP port-range check
4851     @param udp_vrf_id - VRF associated with source and TCP port-range check
4852 */
4853 define ip_source_and_port_range_check_interface_add_del
4854 {
4855   u32 client_index;
4856   u32 context;
4857   u8 is_add;
4858   u32 sw_if_index;
4859   u32 tcp_in_vrf_id;
4860   u32 tcp_out_vrf_id;
4861   u32 udp_in_vrf_id;
4862   u32 udp_out_vrf_id;
4863 };
4864
4865 /** \brief Set interface source and L4 port-range response
4866     @param context - sender context, to match reply w/ request
4867     @param retval - return value for request
4868 */
4869 define ip_source_and_port_range_check_interface_add_del_reply
4870 {
4871   u32 context;
4872   i32 retval;
4873 };
4874
4875 /** \brief Add / del ipsec gre tunnel request
4876     @param client_index - opaque cookie to identify the sender
4877     @param context - sender context, to match reply w/ request
4878     @param local_sa_id - local SA id
4879     @param remote_sa_id - remote SA id
4880     @param is_add - 1 if adding the tunnel, 0 if deleting
4881     @param src_address - tunnel source address
4882     @param dst_address - tunnel destination address
4883 */
4884 define ipsec_gre_add_del_tunnel {
4885     u32 client_index;
4886     u32 context;
4887     u32 local_sa_id;
4888     u32 remote_sa_id;
4889     u8 is_add;
4890     u8 src_address[4];
4891     u8 dst_address[4];
4892 };
4893
4894 /** \brief Reply for add / del ipsec gre tunnel request
4895     @param context - returned sender context, to match reply w/ request
4896     @param retval - return code
4897     @param sw_if_index - software index of the new ipsec gre tunnel
4898 */
4899 define ipsec_gre_add_del_tunnel_reply {
4900     u32 context;
4901     i32 retval;
4902     u32 sw_if_index;
4903 };
4904
4905 /** \brief Dump ipsec gre tunnel table
4906     @param client_index - opaque cookie to identify the sender
4907     @param context - sender context, to match reply w/ request
4908     @param tunnel_index - gre tunnel identifier or -1 in case of all tunnels
4909 */
4910 define ipsec_gre_tunnel_dump {
4911     u32 client_index;
4912     u32 context;
4913     u32 sw_if_index;
4914 };
4915
4916 /** \brief mpls gre tunnel operational state response
4917     @param context - returned sender context, to match reply w/ request
4918     @param sw_if_index - software index of the ipsec gre tunnel
4919     @param local_sa_id - local SA id
4920     @param remote_sa_id - remote SA id
4921     @param src_address - tunnel source address
4922     @param dst_address - tunnel destination address
4923 */
4924 define ipsec_gre_tunnel_details {
4925     u32 context;
4926     u32 sw_if_index;
4927     u32 local_sa_id;
4928     u32 remote_sa_id;
4929     u8 src_address[4];
4930     u8 dst_address[4];
4931 };
4932
4933 /** \brief Delete sub interface request
4934     @param client_index - opaque cookie to identify the sender
4935     @param context - sender context, to match reply w/ request
4936     @param sw_if_index - sw index of the interface that was created by create_subif
4937 */
4938 define delete_subif {
4939   u32 client_index;
4940   u32 context;
4941   u32 sw_if_index;
4942 };
4943
4944 /** \brief Delete sub interface response
4945     @param context - sender context, to match reply w/ request
4946     @param retval - return code for the request
4947 */
4948 define delete_subif_reply {
4949   u32 context;
4950   i32 retval;
4951 };