Add in-message cli_request/cli_reply API
[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 Control ping from client to api server request, no print json output
1152     @param client_index - opaque cookie to identify the sender
1153     @param context - sender context, to match reply w/ request
1154 */
1155 define noprint_control_ping
1156 {
1157   u32 client_index;
1158   u32 context;
1159 };
1160
1161 /** \brief Control ping from the client to the server response
1162     @param client_index - opaque cookie to identify the sender
1163     @param context - sender context, to match reply w/ request
1164     @param retval - return code for the request
1165     @param vpe_pid - the pid of the vpe, returned by the server
1166 */
1167 define noprint_control_ping_reply
1168 {
1169   u32 context;
1170   i32 retval;
1171   u32 client_index;
1172   u32 vpe_pid;
1173 };
1174
1175 /** \brief Process a vpe parser cli string request
1176     @param client_index - opaque cookie to identify the sender
1177     @param context - sender context, to match reply w/ request
1178     @param cmd_in_shmem - pointer to cli command string
1179 */
1180 define cli_request
1181 {
1182   u32 client_index;
1183   u32 context;
1184   u64 cmd_in_shmem;
1185 };
1186 define cli_inband
1187 {
1188   u32 client_index;
1189   u32 context;
1190   u32 length;
1191   u8 cmd[length];
1192 };
1193
1194 /** \brief vpe parser cli string response
1195     @param context - sender context, to match reply w/ request
1196     @param retval - return code for request
1197     @param reply_in_shmem - Reply string from cli processing if any
1198 */
1199 define cli_reply
1200 {
1201   u32 context;
1202   i32 retval;
1203   u64 reply_in_shmem;
1204 };
1205 define cli_inband_reply
1206 {
1207   u32 context;
1208   i32 retval;
1209   u32 length;
1210   u8 reply[length];
1211 };
1212
1213 /** \brief Set max allowed ARP or ip6 neighbor entries request
1214     @param client_index - opaque cookie to identify the sender
1215     @param context - sender context, to match reply w/ request
1216     @param is_ipv6 - neighbor limit if non-zero, else ARP limit
1217     @param arp_neighbor_limit - the new limit, defaults are ~ 50k
1218 */
1219 define set_arp_neighbor_limit
1220 {
1221   u32 client_index;
1222   u32 context;
1223   u8 is_ipv6;
1224   u32 arp_neighbor_limit;
1225 };
1226
1227 /** \brief Set max allowed ARP or ip6 neighbor entries response
1228     @param context - sender context, to match reply w/ request
1229     @param retval - return code for request
1230 */
1231 define set_arp_neighbor_limit_reply
1232 {
1233   u32 context;
1234   i32 retval;
1235 };
1236
1237 /** \brief L2 interface patch add / del request
1238     @param client_index - opaque cookie to identify the sender
1239     @param context - sender context, to match reply w/ request
1240     @param rx_sw_if_index - receive side interface 
1241     @param tx_sw_if_index - transmit side interface
1242     @param is_add - if non-zero set up the interface patch, else remove it
1243 */
1244 define l2_patch_add_del
1245 {
1246   u32 client_index;
1247   u32 context;
1248   u32 rx_sw_if_index;
1249   u32 tx_sw_if_index;
1250   u8 is_add;
1251 };
1252
1253 /** \brief L2 interface patch add / del response
1254     @param context - sender context, to match reply w/ request
1255     @param retval - return code for the request
1256 */
1257 define l2_patch_add_del_reply
1258 {
1259   u32 context;
1260   i32 retval;
1261 };
1262
1263 /** \brief IPv6 segment routing tunnel add / del request
1264     @param client_index - opaque cookie to identify the sender
1265     @param context - sender context, to match reply w/ request
1266     @param is_add - add the tunnel if non-zero, else delete it
1267     @param name[] - tunnel name (len. 64)
1268     @param src_address[] -
1269     @param dst_address[] -
1270     @param dst_mask_width -
1271     @param inner_vrf_id -
1272     @param outer_vrf_id -
1273     @param flags_net_byte_order -
1274     @param n_segments -
1275     @param n_tags -
1276     @param segs_and_tags[] -
1277     @param policy_name[] - name of policy to associate this tunnel to (len. 64)
1278 */
1279 define sr_tunnel_add_del
1280 {
1281   u32 client_index;
1282   u32 context;
1283   u8 is_add;
1284   u8 name[64];
1285   u8 src_address[16];
1286   u8 dst_address[16];
1287   u8 dst_mask_width;
1288   u32 inner_vrf_id;
1289   u32 outer_vrf_id;
1290   u16 flags_net_byte_order;
1291   u8 n_segments;
1292   u8 n_tags;
1293   u8 segs_and_tags[0];
1294   u8 policy_name[64];
1295 };
1296
1297 /** \brief IPv6 segment routing tunnel add / del response
1298     @param context - sender context, to match reply w/ request
1299     @param retval - return value for request
1300 */
1301 define sr_tunnel_add_del_reply
1302 {
1303   u32 context;
1304   i32 retval;
1305 };
1306
1307 /** \brief IPv6 segment routing policy add / del request
1308     @param client_index - opaque cookie to identify the sender
1309     @param context - sender context, to match reply w/ request
1310     @param is_add - add the tunnel if non-zero, else delete it
1311     @param name[] - policy name (len. 64)
1312     @param tunnel_names[] -
1313 */
1314 define sr_policy_add_del
1315 {
1316   u32 client_index;
1317   u32 context;
1318   u8 is_add;
1319   u8 name[64];
1320   u8 tunnel_names[0];
1321 };
1322
1323 /** \brief IPv6 segment routing policy add / del response
1324     @param context - sender context, to match reply w/ request
1325     @param retval - return value for request
1326 */
1327 define sr_policy_add_del_reply
1328 {
1329   u32 context;
1330   i32 retval;
1331 };
1332
1333 /** \brief IPv6 segment routing multicast map to policy add / del request
1334     @param client_index - opaque cookie to identify the sender
1335     @param context - sender context, to match reply w/ request
1336     @param is_add - add the tunnel if non-zero, else delete it
1337     @param multicast_address[] - IP6 multicast address
1338     @param policy_name[] = policy name (len.64)
1339 */
1340 define sr_multicast_map_add_del
1341 {
1342   u32 client_index;
1343   u32 context;
1344   u8 is_add;
1345   u8 multicast_address[16];
1346   u8 policy_name[64];
1347 };
1348
1349 /** \brief IPv6 segment routing multicast map to policy add / del response
1350     @param context - sender context, to match reply w/ request
1351     @param retval - return value for request
1352 */
1353 define sr_multicast_map_add_del_reply
1354 {
1355   u32 context;
1356   i32 retval;
1357 };
1358
1359 /** \brief Interface set vpath request
1360     @param client_index - opaque cookie to identify the sender
1361     @param context - sender context, to match reply w/ request
1362     @param sw_if_index - interface used to reach neighbor
1363     @param enable - if non-zero enable, else disable
1364 */
1365 define sw_interface_set_vpath
1366 {
1367   u32 client_index;
1368   u32 context;
1369   u32 sw_if_index;
1370   u8 enable;
1371 };
1372
1373 /** \brief Interface set vpath response
1374     @param context - sender context, to match reply w/ request
1375     @param retval - return code for the request
1376 */
1377 define sw_interface_set_vpath_reply
1378 {
1379   u32 context;
1380   i32 retval;
1381 };
1382
1383 /** \brief MPLS Ethernet add / del tunnel request
1384     @param client_index - opaque cookie to identify the sender
1385     @param context - sender context, to match reply w/ request
1386     @param vrf_id - vrf_id, only for IP4
1387     @param sw_if_index - interface used to reach neighbor
1388     @param is_add - add if set, tunnel delete if 0
1389     @param dst_mac_address - 
1390     @param adj_address - 
1391     @param adj_address_length -
1392 */
1393 define mpls_ethernet_add_del_tunnel
1394 {
1395   u32 client_index;
1396   u32 context;
1397   u32 vrf_id;
1398   u32 tx_sw_if_index;
1399   u8 is_add;
1400   u8 l2_only;
1401   u8 dst_mac_address[6];
1402   u8 adj_address[4];
1403   u8 adj_address_length;
1404 };
1405
1406 /** \brief Reply for MPLS Ethernet add / delete tunnel request
1407     @param context - sender context, to match reply w/ request
1408     @param retval - return code for the request
1409 */
1410 define mpls_ethernet_add_del_tunnel_reply
1411 {
1412   u32 context;
1413   i32 retval;
1414   u32 tunnel_sw_if_index;
1415 };
1416 /** \brief MPLS Ethernet add/ del tunnel 2
1417     @param client_index - opaque cookie to identify the sender
1418     @param context - sender context, to match reply w/ request
1419     @param inner_vrf_id - 
1420     @param outer_vrf_id - 
1421     @param resolve_attempts - 
1422     @param resolve_opaque - 
1423     @param resolve_if_needed -
1424     @param is_add -
1425     @param adj_address -
1426     @param adj_address_length -
1427     @param next_hop_ip4_address_in_outer_vrf -
1428 */
1429 define mpls_ethernet_add_del_tunnel_2
1430 {
1431   u32 client_index;
1432   u32 context;
1433   u32 inner_vrf_id;
1434   u32 outer_vrf_id;
1435   u32 resolve_attempts;
1436   u32 resolve_opaque;           /* no need to set this */
1437   u8 resolve_if_needed;
1438   u8 is_add;
1439   u8 l2_only;
1440   u8 adj_address[4];
1441   u8 adj_address_length;
1442   u8 next_hop_ip4_address_in_outer_vrf[4];
1443 };
1444
1445 /** \brief MPLS Ethernet add/ del tunnel 2
1446     @param context - sender context, to match reply w/ request
1447     @param retval - return code for add /del request
1448 */
1449 define mpls_ethernet_add_del_tunnel_2_reply
1450 {
1451   u32 context;
1452   i32 retval;
1453 };
1454
1455 /** \brief Set L2 XConnect between two interfaces request
1456     @param client_index - opaque cookie to identify the sender
1457     @param context - sender context, to match reply w/ request
1458     @param rx_sw_if_index - Receive interface index
1459     @param tx_sw_if_index - Transmit interface index
1460     @param enable - enable xconnect if not 0, else set to L3 mode
1461 */
1462 define sw_interface_set_l2_xconnect
1463 {
1464   u32 client_index;
1465   u32 context;
1466   u32 rx_sw_if_index;
1467   u32 tx_sw_if_index;
1468   u8 enable;
1469 };
1470
1471 /** \brief Set L2 XConnect response
1472     @param context - sender context, to match reply w/ request
1473     @param retval - L2 XConnect request return code
1474 */
1475 define sw_interface_set_l2_xconnect_reply
1476 {
1477   u32 context;
1478   i32 retval;
1479 };
1480
1481 /** \brief Interface bridge mode request
1482     @param client_index - opaque cookie to identify the sender
1483     @param context - sender context, to match reply w/ request
1484     @param rx_sw_if_index - the interface
1485     @param bd_id - bridge domain id
1486     @param bvi - Setup interface as a bvi, bridge mode only
1487     @param shg - Shared horizon group, for bridge mode only
1488     @param enable - Enable beige mode if not 0, else set to L3 mode
1489 */
1490 define sw_interface_set_l2_bridge
1491 {
1492   u32 client_index;
1493   u32 context;
1494   u32 rx_sw_if_index;
1495   u32 bd_id;
1496   u8 shg;
1497   u8 bvi;
1498   u8 enable;
1499 };
1500
1501 /** \brief Interface bridge mode response
1502     @param context - sender context, to match reply w/ request
1503     @param retval - Bridge mode request return code
1504 */
1505 define sw_interface_set_l2_bridge_reply
1506 {
1507   u32 context;
1508   i32 retval;
1509 };
1510
1511 /** \brief L2 FIB add entry request
1512     @param client_index - opaque cookie to identify the sender
1513     @param context - sender context, to match reply w/ request
1514     @param mac - the entry's mac address
1515     @param bd_id - the entry's bridge domain id
1516     @param sw_if_index - the interface
1517     @param is_add - If non zero add the entry, else delete it
1518     @param static_mac - 
1519     @param filter_mac -
1520 */
1521 define l2fib_add_del
1522 {
1523   u32 client_index;
1524   u32 context;
1525   u64 mac;
1526   u32 bd_id;
1527   u32 sw_if_index;
1528   u8 is_add;
1529   u8 static_mac;
1530   u8 filter_mac;
1531   u8 bvi_mac;
1532 };
1533
1534 /** \brief L2 FIB add entry response
1535     @param context - sender context, to match reply w/ request
1536     @param retval - return code for the add l2fib entry request
1537 */
1538 define l2fib_add_del_reply
1539 {
1540   u32 context;
1541   i32 retval;
1542 };
1543
1544 /** \brief Set L2 flags request !!! TODO - need more info, feature bits in l2_input.h
1545     @param client_index - opaque cookie to identify the sender
1546     @param context - sender context, to match reply w/ request
1547     @param sw_if_index - interface 
1548     @param is_set - if non-zero, set the bits, else clear them
1549     @param feature_bitmap - non-zero bits to set or clear
1550 */
1551 define l2_flags
1552 {
1553   u32 client_index;
1554   u32 context;
1555   u32 sw_if_index;
1556   u8 is_set;
1557   u32 feature_bitmap;
1558 };
1559
1560 /** \brief Set L2 bits response
1561     @param context - sender context, to match reply w/ request
1562     @param retval - return code for the set l2 bits request
1563 */
1564 define l2_flags_reply
1565 {
1566   u32 context;
1567   i32 retval;
1568   u32 resulting_feature_bitmap;
1569 };
1570
1571 /** \brief Set bridge flags (such as L2_LEARN, L2_FWD, L2_FLOOD, 
1572     L2_UU_FLOOD, or L2_ARP_TERM) request
1573     @param client_index - opaque cookie to identify the sender
1574     @param context - sender context, to match reply w/ request
1575     @param bd_id - the bridge domain to set the flags for
1576     @param is_set - if non-zero, set the flags, else clear them
1577     @param feature_bitmap - bits that are non-zero to set or clear
1578 */
1579 define bridge_flags
1580 {
1581   u32 client_index;
1582   u32 context;
1583   u32 bd_id;
1584   u8 is_set;
1585   u32 feature_bitmap;
1586 };
1587
1588 /** \brief Set bridge flags response
1589     @param context - sender context, to match reply w/ request
1590     @param retval - return code for the set bridge flags request
1591     @param resulting_feature_bitmap - the feature bitmap value after the request is implemented
1592 */
1593 define bridge_flags_reply
1594 {
1595   u32 context;
1596   i32 retval;
1597   u32 resulting_feature_bitmap;
1598 };
1599
1600 /** \brief Set bridge domain ip to mac entry request
1601     @param client_index - opaque cookie to identify the sender
1602     @param context - sender context, to match reply w/ request
1603     @param bd_id - the bridge domain to set the flags for
1604     @param is_add - if non-zero, add the entry, else clear it
1605     @param is_ipv6 - if non-zero, ipv6 address, else ipv4 address
1606     @param mac_address - MAC address
1607     @param 
1608 */
1609 define bd_ip_mac_add_del
1610 {
1611   u32 client_index;
1612   u32 context;
1613   u32 bd_id;
1614   u8 is_add;
1615   u8 is_ipv6;
1616   u8 ip_address[16];
1617   u8 mac_address[6];
1618 };
1619
1620 /** \brief Set bridge domain ip to mac entry response
1621     @param context - sender context, to match reply w/ request
1622     @param retval - return code for the set bridge flags request
1623 */
1624 define bd_ip_mac_add_del_reply
1625 {
1626   u32 context;
1627   i32 retval;
1628 };
1629
1630 /** \brief Add/Delete classification table request
1631     @param client_index - opaque cookie to identify the sender
1632     @param context - sender context, to match reply w/ request
1633     @param is_add- if non-zero add the table, else delete it
1634     @param table_index - if add, reuturns index of the created table, else specifies the table to delete  
1635     @param nbuckets - number of buckets when adding a table
1636     @param memory_size - memory size when adding a table
1637     @param match_n_vectors - number of match vectors
1638     @param next_table_index - index of next table
1639     @param miss_next_index - index of miss table
1640     @param mask[] - match mask
1641 */
1642 define classify_add_del_table
1643 {
1644   u32 client_index;
1645   u32 context;
1646   u8 is_add;
1647   u32 table_index;
1648   u32 nbuckets;
1649   u32 memory_size;
1650   u32 skip_n_vectors;
1651   u32 match_n_vectors;
1652   u32 next_table_index;
1653   u32 miss_next_index;
1654   u8 mask[0];
1655 };
1656
1657 /** \brief Add/Delete classification table response
1658     @param context - sender context, to match reply w/ request
1659     @param retval - return code for the table add/del requst
1660     @param new_table_index - for add, returned index of the new table
1661     @param skip_n_vectors - for add, returned value of skip_n_vectors in table
1662     @param match_n_vectors -for add, returned value of match_n_vectors in table
1663 */
1664 define classify_add_del_table_reply
1665 {
1666   u32 context;
1667   i32 retval;
1668   u32 new_table_index;
1669   u32 skip_n_vectors;
1670   u32 match_n_vectors;
1671 };
1672
1673 /** \brief Classify add / del session request
1674     @param client_index - opaque cookie to identify the sender
1675     @param context - sender context, to match reply w/ request
1676     @param is_add - add session if non-zero, else delete
1677     @param table_index - index of the table to add/del the session, required
1678     @param hit_next_index - for add, hit_next_index of new session, required
1679     @param opaque_index - for add, opaque_index of new session
1680     @param advance -for add, advance value for session
1681     @param match[] - for add, match value for session, required
1682 */
1683 define classify_add_del_session
1684 {
1685   u32 client_index;
1686   u32 context;
1687   u8 is_add;
1688   u32 table_index;
1689   u32 hit_next_index;
1690   u32 opaque_index;
1691   i32 advance;
1692   u8 match[0];
1693 };
1694
1695 /** \brief Classify add / del session response
1696     @param context - sender context, to match reply w/ request
1697     @param retval - return code for the add/del session request
1698 */
1699 define classify_add_del_session_reply
1700 {
1701   u32 context;
1702   i32 retval;
1703 };
1704
1705 /** \brief Set/unset the classification table for an interface request 
1706     @param client_index - opaque cookie to identify the sender
1707     @param context - sender context, to match reply w/ request
1708     @param is_ipv6 - ipv6 if non-zero, else ipv4
1709     @param sw_if_index - interface to associate with the table
1710     @param table_index - index of the table, if ~0 unset the table
1711 */
1712 define classify_set_interface_ip_table
1713 {
1714   u32 client_index;
1715   u32 context;
1716   u8 is_ipv6;
1717   u32 sw_if_index;
1718   u32 table_index;              /* ~0 => off */
1719 };
1720
1721 /** \brief Set/unset interface classification table response 
1722     @param context - sender context, to match reply w/ request
1723     @param retval - return code
1724 */
1725 define classify_set_interface_ip_table_reply
1726 {
1727   u32 context;
1728   i32 retval;
1729 };
1730
1731 /** \brief Set/unset l2 classification tables for an interface request
1732     @param client_index - opaque cookie to identify the sender
1733     @param context - sender context, to match reply w/ request
1734     @param sw_if_index - interface to set/unset tables for
1735     @param ip4_table_index - ip4 index, use ~0 for all 3 indexes to unset
1736     @param ip6_table_index - ip6 index
1737     @param other_table_index - other index
1738 */
1739 define classify_set_interface_l2_tables
1740 {
1741   u32 client_index;
1742   u32 context;
1743   u32 sw_if_index;
1744   /* 3 x ~0 => off */
1745   u32 ip4_table_index;
1746   u32 ip6_table_index;
1747   u32 other_table_index;
1748   u8 is_input;
1749 };
1750
1751 /** \brief Set/unset l2 classification tables for an interface response
1752     @param context - sender context, to match reply w/ request
1753     @param retval - return code for the request
1754 */
1755 define classify_set_interface_l2_tables_reply
1756 {
1757   u32 context;
1758   i32 retval;
1759 };
1760
1761 /** \brief Get node index using name 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[] - name of the node
1765 */
1766 define get_node_index
1767 {
1768   u32 client_index;
1769   u32 context;
1770   u8 node_name[64];
1771 };
1772
1773 /** \brief Get node index using name request
1774     @param context - sender context, to match reply w/ request
1775     @param retval - return code for the request
1776     @param node_index - index of the desired node if found, else ~0
1777 */
1778 define get_node_index_reply
1779 {
1780   u32 context;
1781   i32 retval;
1782   u32 node_index;
1783 };
1784
1785 /** \brief Set the next node for a given node request
1786     @param client_index - opaque cookie to identify the sender
1787     @param context - sender context, to match reply w/ request
1788     @param node_name[] - node to add the next node to
1789     @param next_name[] - node to add as the next node
1790 */
1791 define add_node_next
1792 {
1793   u32 client_index;
1794   u32 context;
1795   u8 node_name[64];
1796   u8 next_name[64];
1797 };
1798
1799 /** \brief IP Set the next node for a given node response
1800     @param context - sender context, to match reply w/ request
1801     @param retval - return code for the add next node request
1802     @param next_index - the index of the next node if success, else ~0
1803 */
1804 define add_node_next_reply
1805 {
1806   u32 context;
1807   i32 retval;
1808   u32 next_index;
1809 };
1810
1811 /** \brief DHCP Proxy config 2 add / del request
1812     @param client_index - opaque cookie to identify the sender
1813     @param context - sender context, to match reply w/ request
1814     @param rx_vrf_id - receive vrf id
1815     @param server_vrf_id - server vrf id
1816     @param if_ipv6 - ipv6 if non-zero, else ipv4
1817     @param is_add - add the config if non-zero, else delete
1818     @param insert_circuit_id - option82 suboption 1 fib number
1819     @param dhcp_server[] - server address
1820     @param dhcp_src_address[] - <fix this, need details>
1821 */
1822 define dhcp_proxy_config_2
1823 {
1824   u32 client_index;
1825   u32 context;
1826   u32 rx_vrf_id;
1827   u32 server_vrf_id;
1828   u8 is_ipv6;
1829   u8 is_add;
1830   u8 insert_circuit_id;
1831   u8 dhcp_server[16];
1832   u8 dhcp_src_address[16];
1833 };
1834
1835 /** \brief DHCP Proxy config 2 add / del response
1836     @param context - sender context, to match reply w/ request
1837     @param retval - return code for request
1838 */
1839 define dhcp_proxy_config_2_reply
1840 {
1841   u32 context;
1842   i32 retval;
1843 };
1844
1845 /** \brief l2tpv3 tunnel interface create request
1846     @param client_index - opaque cookie to identify the sender
1847     @param context - sender context, to match reply w/ request
1848     @param client_address - remote client tunnel ip address
1849     @param client_address - local tunnel ip address
1850     @param is_ipv6 - ipv6 if non-zero, else ipv4
1851     @param local_session_id - local tunnel session id
1852     @param remote_session_id - remote tunnel session id
1853     @param local_cookie - local tunnel cookie
1854     @param l2_sublayer_present - l2 sublayer is present in packets if non-zero
1855     @param encap_vrf_id - fib identifier used for outgoing encapsulated packets
1856 */
1857 define l2tpv3_create_tunnel
1858 {
1859   u32 client_index;
1860   u32 context;
1861   u8 client_address[16];
1862   u8 our_address[16];
1863   u8 is_ipv6;
1864   u32 local_session_id;
1865   u32 remote_session_id;
1866   u64 local_cookie;
1867   u64 remote_cookie;
1868   u8 l2_sublayer_present;
1869   u32 encap_vrf_id;
1870 };
1871
1872 /** \brief l2tpv3 tunnel interface create response
1873     @param context - sender context, to match reply w/ request
1874     @param retval - return code for the request
1875     @param sw_if_index - index of the new tunnel interface
1876 */
1877 define l2tpv3_create_tunnel_reply
1878 {
1879   u32 context;
1880   i32 retval;
1881   u32 sw_if_index;
1882 };
1883
1884 define l2tpv3_set_tunnel_cookies
1885 {
1886   u32 client_index;
1887   u32 context;
1888   u32 sw_if_index;
1889   u64 new_local_cookie;
1890   u64 new_remote_cookie;
1891 };
1892
1893 /** \brief L2TP tunnel set cookies response
1894     @param context - sender context, to match reply w/ request
1895     @param retval - return code for the request
1896 */
1897 define l2tpv3_set_tunnel_cookies_reply
1898 {
1899   u32 context;
1900   i32 retval;
1901 };
1902
1903 define sw_if_l2tpv3_tunnel_details
1904 {
1905   u32 context;
1906   u32 sw_if_index;
1907   u8 interface_name[64];
1908   u8 client_address[16];
1909   u8 our_address[16];
1910   u32 local_session_id;
1911   u32 remote_session_id;
1912   u64 local_cookie[2];
1913   u64 remote_cookie;
1914   u8 l2_sublayer_present;
1915 };
1916
1917 define sw_if_l2tpv3_tunnel_dump
1918 {
1919   u32 client_index;
1920   u32 context;
1921 };
1922
1923 /** \brief L2 fib clear table request, clear all mac entries in the l2 fib
1924     @param client_index - opaque cookie to identify the sender
1925     @param context - sender context, to match reply w/ request
1926 */
1927 define l2_fib_clear_table
1928 {
1929   u32 client_index;
1930   u32 context;
1931 };
1932
1933 /** \brief L2 fib clear table response
1934     @param context - sender context, to match reply w/ request
1935     @param retval - return code for the request
1936 */
1937 define l2_fib_clear_table_reply
1938 {
1939   u32 context;
1940   i32 retval;
1941 };
1942
1943 /** \brief L2 interface ethernet flow point filtering enable/disable request
1944     @param client_index - opaque cookie to identify the sender
1945     @param context - sender context, to match reply w/ request
1946     @param sw_if_index - interface to enable/disable filtering on
1947     @param enable_disable - if non-zero enable filtering, else disable
1948 */
1949 define l2_interface_efp_filter
1950 {
1951   u32 client_index;
1952   u32 context;
1953   u32 sw_if_index;
1954   u32 enable_disable;
1955 };
1956
1957 /** \brief L2 interface ethernet flow point filtering response
1958     @param context - sender context, to match reply w/ request
1959     @param retval - return code for the request
1960 */
1961 define l2_interface_efp_filter_reply
1962 {
1963   u32 context;
1964   i32 retval;
1965 };
1966
1967 define l2tpv3_interface_enable_disable
1968 {
1969   u32 client_index;
1970   u32 context;
1971   u8 enable_disable;
1972   u32 sw_if_index;
1973 };
1974
1975 define l2tpv3_interface_enable_disable_reply
1976 {
1977   u32 context;
1978   i32 retval;
1979 };
1980
1981 define l2tpv3_set_lookup_key
1982 {
1983   u32 client_index;
1984   u32 context;
1985   /* 0 = ip6 src_address, 1 = ip6 dst_address, 2 = session_id */
1986   u8 key;
1987 };
1988
1989 define l2tpv3_set_lookup_key_reply
1990 {
1991   u32 context;
1992   i32 retval;
1993 };
1994
1995 define vxlan_add_del_tunnel
1996 {
1997   u32 client_index;
1998   u32 context;
1999   u8 is_add;
2000   u8 is_ipv6;
2001   u8 src_address[16];
2002   u8 dst_address[16];
2003   u32 encap_vrf_id;
2004   u32 decap_next_index;
2005   u32 vni;
2006 };
2007
2008 define vxlan_add_del_tunnel_reply
2009 {
2010   u32 context;
2011   i32 retval;
2012   u32 sw_if_index;
2013 };
2014
2015 define vxlan_tunnel_dump
2016 {
2017   u32 client_index;
2018   u32 context;
2019   u32 sw_if_index;
2020 };
2021
2022 define vxlan_tunnel_details
2023 {
2024   u32 context;
2025   u32 sw_if_index;
2026   u8 src_address[16];
2027   u8 dst_address[16];
2028   u32 encap_vrf_id;
2029   u32 decap_next_index;
2030   u32 vni;
2031   u8 is_ipv6;
2032 };
2033
2034 define gre_add_del_tunnel
2035 {
2036   u32 client_index;
2037   u32 context;
2038   u8 is_add;
2039   u8 is_ipv6;
2040   u8 src_address[16];
2041   u8 dst_address[16];
2042   u32 outer_fib_id;
2043 };
2044
2045 define gre_add_del_tunnel_reply
2046 {
2047   u32 context;
2048   i32 retval;
2049   u32 sw_if_index;
2050 };
2051
2052 define gre_tunnel_dump
2053 {
2054   u32 client_index;
2055   u32 context;
2056   u32 sw_if_index;
2057 };
2058
2059 define gre_tunnel_details
2060 {
2061   u32 context;
2062   u32 sw_if_index;
2063   u8 is_ipv6;
2064   u8 src_address[16];
2065   u8 dst_address[16];
2066   u32 outer_fib_id;
2067 };
2068
2069 /** \brief L2 interface vlan tag rewrite configure request
2070     @param client_index - opaque cookie to identify the sender
2071     @param context - sender context, to match reply w/ request
2072     @param sw_if_index - interface the operation is applied to
2073     @param vtr_op - Choose from l2_vtr_op_t enum values
2074     @param push_dot1q - first pushed flag dot1q id set, else dot1ad
2075     @param tag1 - Needed for any push or translate vtr op
2076     @param tag2 - Needed for any push 2 or translate x-2 vtr ops
2077 */
2078 define l2_interface_vlan_tag_rewrite
2079 {
2080   u32 client_index;
2081   u32 context;
2082   u32 sw_if_index;
2083   u32 vtr_op;
2084   u32 push_dot1q;               // ethertype of first pushed tag is dot1q/dot1ad
2085   u32 tag1;                     // first pushed tag
2086   u32 tag2;                     // second pushed tag
2087 };
2088
2089 /** \brief L2 interface vlan tag rewrite response
2090     @param context - sender context, to match reply w/ request
2091     @param retval - return code for the request
2092 */
2093 define l2_interface_vlan_tag_rewrite_reply
2094 {
2095   u32 context;
2096   i32 retval;
2097 };
2098
2099 /** \brief vhost-user interface create request
2100     @param client_index - opaque cookie to identify the sender
2101     @param is_server - our side is socket server
2102     @param sock_filename - unix socket filename, used to speak with frontend
2103     @param use_custom_mac - enable or disable the use of the provided hardware address
2104     @param mac_address - hardware address to use if 'use_custom_mac' is set
2105 */
2106 define create_vhost_user_if
2107 {
2108   u32 client_index;
2109   u32 context;
2110   u8 is_server;
2111   u8 sock_filename[256];
2112   u8 renumber;
2113   u32 custom_dev_instance;
2114   u8 use_custom_mac;
2115   u8 mac_address[6];
2116 };
2117
2118 /** \brief vhost-user interface create response
2119     @param context - sender context, to match reply w/ request
2120     @param retval - return code for the request
2121     @param sw_if_index - interface the operation is applied to
2122 */
2123 define create_vhost_user_if_reply
2124 {
2125   u32 context;
2126   i32 retval;
2127   u32 sw_if_index;
2128 };
2129
2130 /** \brief vhost-user interface modify request
2131     @param client_index - opaque cookie to identify the sender
2132     @param is_server - our side is socket server
2133     @param sock_filename - unix socket filename, used to speak with frontend
2134 */
2135 define modify_vhost_user_if
2136 {
2137   u32 client_index;
2138   u32 context;
2139   u32 sw_if_index;
2140   u8 is_server;
2141   u8 sock_filename[256];
2142   u8 renumber;
2143   u32 custom_dev_instance;
2144 };
2145
2146 /** \brief vhost-user interface modify response
2147     @param context - sender context, to match reply w/ request
2148     @param retval - return code for the request
2149 */
2150 define modify_vhost_user_if_reply
2151 {
2152   u32 context;
2153   i32 retval;
2154 };
2155
2156 /** \brief vhost-user interface delete request
2157     @param client_index - opaque cookie to identify the sender
2158 */
2159 define delete_vhost_user_if
2160 {
2161   u32 client_index;
2162   u32 context;
2163   u32 sw_if_index;
2164 };
2165
2166 /** \brief vhost-user interface delete response
2167     @param context - sender context, to match reply w/ request
2168     @param retval - return code for the request
2169 */
2170 define delete_vhost_user_if_reply
2171 {
2172   u32 context;
2173   i32 retval;
2174 };
2175
2176 define create_subif
2177 {
2178   u32 client_index;
2179   u32 context;
2180   u32 sw_if_index;
2181   u32 sub_id;
2182
2183   /* These fields map directly onto the subif template */
2184   u8 no_tags;
2185   u8 one_tag;
2186   u8 two_tags;
2187   u8 dot1ad;                    // 0 = dot1q, 1=dot1ad
2188   u8 exact_match;
2189   u8 default_sub;
2190   u8 outer_vlan_id_any;
2191   u8 inner_vlan_id_any;
2192   u16 outer_vlan_id;
2193   u16 inner_vlan_id;
2194 };
2195
2196 define create_subif_reply
2197 {
2198   u32 context;
2199   i32 retval;
2200   u32 sw_if_index;
2201 };
2202
2203 /** \brief show version
2204     @param client_index - opaque cookie to identify the sender
2205     @param context - sender context, to match reply w/ request
2206 */
2207 define show_version
2208 {
2209   u32 client_index;
2210   u32 context;
2211 };
2212
2213 /** \brief show version response
2214     @param context - sender context, to match reply w/ request
2215     @param retval - return code for the request
2216     @param program - name of the program (vpe)
2217     @param version  - version of the program
2218     @param build_directory - root of the workspace where the program was built
2219 */
2220 define show_version_reply
2221 {
2222   u32 context;
2223   i32 retval;
2224   u8 program[32];
2225   u8 version[32];
2226   u8 build_date[32];
2227   u8 build_directory[256];
2228 };
2229
2230 /** \brief Vhost-user interface details structure (fix this)
2231     @param sw_if_index - index of the interface
2232     @param interface_name - name of interface
2233     @param virtio_net_hdr_sz - net header size
2234     @param features - interface features
2235     @param is_server - vhost-user server socket
2236     @param sock_filename - socket filename
2237     @param num_regions - number of used memory regions
2238 */
2239 define sw_interface_vhost_user_details
2240 {
2241   u32 context;
2242   u32 sw_if_index;
2243   u8 interface_name[64];
2244   u32 virtio_net_hdr_sz;
2245   u64 features;
2246   u8 is_server;
2247   u8 sock_filename[256];
2248   u32 num_regions;
2249   i32 sock_errno;
2250 };
2251
2252 /* works */
2253 define sw_interface_vhost_user_dump
2254 {
2255   u32 client_index;
2256   u32 context;
2257 };
2258
2259 define ip_address_details
2260 {
2261   u32 client_index;
2262   u32 context;
2263   u8 ip[16];
2264   u8 prefix_length;
2265 };
2266
2267 define ip_address_dump
2268 {
2269   u32 client_index;
2270   u32 context;
2271   u32 sw_if_index;
2272   u8 is_ipv6;
2273 };
2274
2275 define ip_details
2276 {
2277   u32 sw_if_index;
2278   u32 context;
2279 };
2280
2281 define ip_dump
2282 {
2283   u32 client_index;
2284   u32 context;
2285   u8 is_ipv6;
2286 };
2287
2288 /** \brief l2 fib table entry structure
2289     @param bd_id - the l2 fib / bridge domain table id
2290     @param mac - the entry's mac address
2291     @param sw_if_index - index of the interface
2292     @param static_mac - the entry is statically configured.
2293     @param filter_mac - the entry is a mac filter entry.
2294     @param bvi_mac - the mac address is a bridge virtual interface
2295 */
2296 define l2_fib_table_entry
2297 {
2298   u32 context;
2299   u32 bd_id;
2300   u64 mac;
2301   u32 sw_if_index;
2302   u8 static_mac;
2303   u8 filter_mac;
2304   u8 bvi_mac;
2305 };
2306
2307 /** \brief Dump l2 fib (aka bridge domain) table
2308     @param client_index - opaque cookie to identify the sender
2309     @param bd_id - the l2 fib / bridge domain table identifier
2310 */
2311 define l2_fib_table_dump
2312 {
2313   u32 client_index;
2314   u32 context;
2315   u32 bd_id;
2316 };
2317
2318 define vxlan_gpe_add_del_tunnel
2319 {
2320   u32 client_index;
2321   u32 context;
2322   u8 is_ipv6;
2323   u8 local[16];
2324   u8 remote[16];
2325   u32 encap_vrf_id;
2326   u32 decap_vrf_id;
2327   u8 protocol;
2328   u32 vni;
2329   u8 is_add;
2330 };
2331
2332 define vxlan_gpe_add_del_tunnel_reply
2333 {
2334   u32 context;
2335   i32 retval;
2336   u32 sw_if_index;
2337 };
2338
2339 define vxlan_gpe_tunnel_dump
2340 {
2341   u32 client_index;
2342   u32 context;
2343   u32 sw_if_index;
2344 };
2345
2346 define vxlan_gpe_tunnel_details
2347 {
2348   u32 context;
2349   u32 sw_if_index;
2350   u8 local[16];
2351   u8 remote[16];
2352   u32 vni;
2353   u8 protocol;
2354   u32 encap_vrf_id;
2355   u32 decap_vrf_id;
2356   u8 is_ipv6;
2357 };
2358
2359 /** \brief add or delete locator_set
2360     @param client_index - opaque cookie to identify the sender
2361     @param context - sender context, to match reply w/ request
2362     @param is_add - add address if non-zero, else delete
2363     @param locator_set_name - locator name
2364     @param locator_num - number of locators
2365     @param locators - Lisp locator data
2366 */
2367 define lisp_add_del_locator_set
2368 {
2369   u32 client_index;
2370   u32 context;
2371   u8 is_add;
2372   u8 locator_set_name[64];
2373   u32 locator_num;
2374   u8 locators[locator_num];
2375 };
2376
2377 /** \brief Reply for locator_set add/del
2378     @param context - returned sender context, to match reply w/ request
2379     @param retval - return code
2380     @param ls_index - locator set index
2381 */
2382 define lisp_add_del_locator_set_reply
2383 {
2384   u32 context;
2385   i32 retval;
2386   u32 ls_index;
2387 };
2388
2389 /** \brief add or delete locator for locator_set
2390     @param client_index - opaque cookie to identify the sender
2391     @param context - sender context, to match reply w/ request
2392     @param is_add - add address if non-zero, else delete
2393     @param locator_set_name - name of locator_set to add/del locator
2394     @param sw_if_index - index of the interface
2395     @param priority - priority of the lisp locator
2396     @param weight - weight of the lisp locator
2397 */
2398 define lisp_add_del_locator
2399 {
2400   u32 client_index;
2401   u32 context;
2402   u8 is_add;
2403   u8 locator_set_name[64];
2404   u32 sw_if_index;
2405   u8 priority;
2406   u8 weight;
2407 };
2408
2409 /** \brief Reply for locator add/del
2410     @param context - returned sender context, to match reply w/ request
2411     @param retval - return code
2412 */
2413 define lisp_add_del_locator_reply
2414 {
2415   u32 context;
2416   i32 retval;
2417 };
2418
2419 /** \brief add or delete lisp eid-table
2420     @param client_index - opaque cookie to identify the sender
2421     @param context - sender context, to match reply w/ request
2422     @param is_add - add address if non-zero, else delete
2423     @param eid_type:
2424       0 : ipv4
2425       1 : ipv6
2426       2 : mac
2427     @param eid - EID can be ip4, ip6 or mac
2428     @param prefix_len - prefix len
2429     @param locator_set_name - name of locator_set to add/del eid-table
2430     @param vni - virtual network instance
2431 */
2432 define lisp_add_del_local_eid
2433 {
2434   u32 client_index;
2435   u32 context;
2436   u8 is_add;
2437   u8 eid_type;
2438   u8 eid[16];
2439   u8 prefix_len;
2440   u8 locator_set_name[64];
2441   u32 vni;
2442 };
2443
2444 /** \brief Reply for local_eid add/del
2445     @param context - returned sender context, to match reply w/ request
2446     @param retval - return code
2447 */
2448 define lisp_add_del_local_eid_reply
2449 {
2450   u32 context;
2451   i32 retval;
2452 };
2453
2454 /** \brief add or delete lisp gpe tunnel
2455     @param client_index - opaque cookie to identify the sender
2456     @param context - sender context, to match reply w/ request
2457     @param is_add - add address if non-zero, else delete
2458     @param eid_type -
2459       0 : ipv4
2460       1 : ipv6
2461       2 : mac
2462     @param rmt_eid - remote eid
2463     @param lcl_eid - local eid
2464     @param rmt_len - remote prefix len
2465     @param lcl_len - local prefix len
2466     @param vni - virtual network identifier
2467     @param dp_table - vrf/bridge domain id
2468     @param loc_num - number of locators
2469     @param lcl_locs - array of local locators
2470     @param rmt_locs - array of remote locators
2471     @param action - negative action when 0 locators configured
2472 */
2473 define lisp_gpe_add_del_fwd_entry
2474 {
2475   u32 client_index;
2476   u32 context;
2477   u8 is_add;
2478   u8 eid_type;
2479   u8 rmt_eid[16];
2480   u8 lcl_eid[16];
2481   u8 rmt_len;
2482   u8 lcl_len;
2483   u32 vni;
2484   u32 dp_table;
2485   u32 loc_num;
2486   u8 lcl_locs[loc_num];
2487   u8 rmt_locs[loc_num];
2488   u8 action;
2489 };
2490
2491 /** \brief Reply for gpe_fwd_entry add/del
2492     @param context - returned sender context, to match reply w/ request
2493     @param retval - return code
2494 */
2495 define lisp_gpe_add_del_fwd_entry_reply
2496 {
2497   u32 context;
2498   i32 retval;
2499 };
2500
2501 /** \brief add or delete map-resolver
2502     @param client_index - opaque cookie to identify the sender
2503     @param context - sender context, to match reply w/ request
2504     @param is_add - add address if non-zero, else delete
2505     @param is_ipv6 - if non-zero the address is ipv6, else ipv4
2506     @param ip_address - array of address bytes
2507 */
2508 define lisp_add_del_map_resolver
2509 {
2510   u32 client_index;
2511   u32 context;
2512   u8 is_add;
2513   u8 is_ipv6;
2514   u8 ip_address[16];
2515 };
2516
2517 /** \brief Reply for map_resolver add/del
2518     @param context - returned sender context, to match reply w/ request
2519     @param retval - return code
2520 */
2521 define lisp_add_del_map_resolver_reply
2522 {
2523   u32 context;
2524   i32 retval;
2525 };
2526
2527 /** \brief enable or disable lisp-gpe protocol
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_gpe_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_gpe_enable_disable_reply
2544 {
2545   u32 context;
2546   i32 retval;
2547 };
2548
2549 /** \brief enable or disable LISP feature
2550     @param client_index - opaque cookie to identify the sender
2551     @param context - sender context, to match reply w/ request
2552     @param is_en - enable protocol if non-zero, else disable
2553 */
2554 define lisp_enable_disable
2555 {
2556   u32 client_index;
2557   u32 context;
2558   u8 is_en;
2559 };
2560
2561 /** \brief Reply for gpe enable/disable
2562     @param context - returned sender context, to match reply w/ request
2563     @param retval - return code
2564 */
2565 define lisp_enable_disable_reply
2566 {
2567   u32 context;
2568   i32 retval;
2569 };
2570
2571 /** \brief add or delete gpe_iface
2572     @param client_index - opaque cookie to identify the sender
2573     @param context - sender context, to match reply w/ request
2574     @param is_add - add address if non-zero, else delete
2575 */
2576 define lisp_gpe_add_del_iface
2577 {
2578   u32 client_index;
2579   u32 context;
2580   u8 is_add;
2581   u8 is_l2;
2582   u32 dp_table;
2583   u32 vni;
2584 };
2585
2586 /** \brief Reply for gpe_iface add/del
2587     @param context - returned sender context, to match reply w/ request
2588     @param retval - return code
2589 */
2590 define lisp_gpe_add_del_iface_reply
2591 {
2592   u32 context;
2593   i32 retval;
2594 };
2595
2596 /** \brief configure or disable LISP PITR node
2597     @param client_index - opaque cookie to identify the sender
2598     @param context - sender context, to match reply w/ request
2599     @param ls_name - locator set name
2600     @param is_add - add locator set if non-zero, else disable pitr
2601 */
2602 define lisp_pitr_set_locator_set
2603 {
2604   u32 client_index;
2605   u32 context;
2606   u8 is_add;
2607   u8 ls_name[64];
2608 };
2609
2610 /** \brief Reply for lisp_pitr_set_locator_set
2611     @param context - returned sender context, to match reply w/ request
2612     @param retval - return code
2613 */
2614 define lisp_pitr_set_locator_set_reply
2615 {
2616   u32 context;
2617   i32 retval;
2618 };
2619
2620 /** \brief add or delete remote static mapping
2621     @param client_index - opaque cookie to identify the sender
2622     @param context - sender context, to match reply w/ request
2623     @param is_add - add address if non-zero, else delete
2624     @param is_src_dst - flag indicating src/dst based routing policy
2625     @param del_all - if set, delete all remote mappings
2626     @param vni - virtual network instance
2627     @param action - negative map-reply action
2628     @param eid_type -
2629       0 : ipv4
2630       1 : ipv6
2631       2 : mac
2632     @param deid - dst EID
2633     @param seid - src EID, valid only if is_src_dst is enabled
2634     @param rloc_num - number of remote locators
2635     @param rlocs - remote locator data
2636 */
2637 define lisp_add_del_remote_mapping
2638 {
2639   u32 client_index;
2640   u32 context;
2641   u8 is_add;
2642   u8 is_src_dst;
2643   u8 del_all;
2644   u32 vni;
2645   u8 action;
2646   u8 eid_type;
2647   u8 eid[16];
2648   u8 eid_len;
2649   u8 seid[16];
2650   u8 seid_len;
2651   u32 rloc_num;
2652   u8 rlocs[rloc_num];
2653 };
2654
2655 /** \brief Reply for lisp_add_del_remote_mapping
2656     @param context - returned sender context, to match reply w/ request
2657     @param retval - return code
2658 */
2659 define lisp_add_del_remote_mapping_reply
2660 {
2661   u32 context;
2662   i32 retval;
2663 };
2664
2665 /** \brief add or delete LISP adjacency adjacency
2666     @param client_index - opaque cookie to identify the sender
2667     @param context - sender context, to match reply w/ request
2668     @param is_add - add address if non-zero, else delete
2669     @param vni - virtual network instance
2670     @param eid_type -
2671       0 : ipv4
2672       1 : ipv6
2673       2 : mac
2674     @param deid - destination EID
2675     @param seid - source EID
2676 */
2677 define lisp_add_del_adjacency
2678 {
2679   u32 client_index;
2680   u32 context;
2681   u8 is_add;
2682   u32 vni;
2683   u8 eid_type;
2684   u8 deid[16];
2685   u8 seid[16];
2686   u8 deid_len;
2687   u8 seid_len;
2688 };
2689
2690 /** \brief Reply for lisp_add_del_adjacency
2691     @param context - returned sender context, to match reply w/ request
2692     @param retval - return code
2693 */
2694 define lisp_add_del_adjacency_reply
2695 {
2696   u32 context;
2697   i32 retval;
2698 };
2699
2700 /** \brief add or delete map request itr rlocs
2701     @param client_index - opaque cookie to identify the sender
2702     @param context - sender context, to match reply w/ request
2703     @param is_add - add address if non-zero, else delete
2704     @param locator_set_name - locator set name
2705 */
2706 define lisp_add_del_map_request_itr_rlocs
2707 {
2708   u32 client_index;
2709   u32 context;
2710   u8 is_add;
2711   u8 locator_set_name[64];
2712 };
2713
2714 /** \brief Reply for lisp_add_del_map_request_itr_rlocs
2715     @param context - returned sender context, to match reply w/ request
2716     @param retval - return code
2717 */
2718
2719 define lisp_add_del_map_request_itr_rlocs_reply
2720 {
2721   u32 context;
2722   i32 retval;
2723 };
2724
2725 /** \brief map/unmap vni/bd_index to vrf
2726     @param client_index - opaque cookie to identify the sender
2727     @param context - sender context, to match reply w/ request
2728     @param is_add - add or delete mapping
2729     @param dp_table - virtual network id/bridge domain index
2730     @param vrf - vrf
2731 */
2732 define lisp_eid_table_add_del_map
2733 {
2734   u32 client_index;
2735   u32 context;
2736   u8 is_add;
2737   u32 vni;
2738   u32 dp_table;
2739   u8 is_l2;
2740 };
2741
2742 /** \brief Reply for lisp_eid_table_add_del_map
2743     @param context - returned sender context, to match reply w/ request
2744     @param retval - return code
2745 */
2746 define lisp_eid_table_add_del_map_reply
2747 {
2748   u32 context;
2749   i32 retval;
2750 };
2751
2752 /** \brief Request for map lisp locator status
2753     @param client_index - opaque cookie to identify the sender
2754     @param context - sender context, to match reply w/ request
2755     @param locator_set_index - index of locator_set
2756     @param filter - filter type;
2757       Support value:
2758         0: all locator
2759         1: local locator
2760         2: remote locator
2761  */
2762 define lisp_locator_dump
2763 {
2764   u32 client_index;
2765   u32 context;
2766   u32 locator_set_index;
2767   u8 filter;
2768 };
2769
2770 /** \brief LISP locator_set status
2771     @param local - if is set, then locator is local
2772     @param locator_set_name - name of the locator_set
2773     @param sw_if_index - sw_if_index of the locator
2774     @param priority - locator priority
2775     @param weight - locator weight
2776   */
2777 define lisp_locator_details
2778 {
2779   u32 context;
2780   u8 local;
2781   u32 sw_if_index;
2782   u8 is_ipv6;
2783   u8 ip_address[16];
2784   u8 priority;
2785   u8 weight;
2786 };
2787
2788 /** \brief LISP locator_set status
2789     @param locator_set_name - name of the locator_set
2790     @param local - if is set, then locator_set is local
2791     @param locator_count - number of locator this stats block includes
2792     @param locator - locator data
2793  */
2794 define lisp_locator_set_details
2795 {
2796   u32 context;
2797   u8 local;
2798   u32 locator_set_index;
2799   u8 locator_set_name[64];
2800 };
2801
2802 /** \brief Request for locator_set summary status
2803     @param client_index - opaque cookie to identify the sender
2804     @param context - sender context, to match reply w/ request
2805     @param filter - filter type;
2806       Support value:
2807         0: all locator_set
2808         1: local locator_set
2809         2: remote locator_set
2810  */
2811 define lisp_locator_set_dump
2812 {
2813   u32 client_index;
2814   u32 context;
2815   u8 filter;
2816 };
2817
2818 /** \brief Dump lisp eid-table
2819     @param client_index - opaque cookie to identify the sender
2820     @param context - sender context, to match reply w/ request
2821     @param locator_set_index - index of locator_set, if ~0 then the mapping
2822                                 is negative
2823     @param action - negative map request action
2824     @param is_local - local if non-zero, else remote
2825     @param eid_type:
2826       0 : ipv4
2827       1 : ipv6
2828       2 : mac
2829     @param eid - EID can be ip4, ip6 or mac
2830     @param prefix_len - prefix len
2831     @param vni - virtual network instance
2832     @param ttl - time to live
2833     @param authoritative - authoritative
2834 */
2835
2836 define lisp_eid_table_details
2837 {
2838   u32 context;
2839   u32 locator_set_index;
2840   u8 action;
2841   u8 is_local;
2842   u8 eid_type;
2843   u32 vni;
2844   u8 eid[16];
2845   u8 eid_prefix_len;
2846   u32 ttl;
2847   u8 authoritative;
2848 };
2849
2850 /** \brief Request for eid table summary status
2851     @param client_index - opaque cookie to identify the sender
2852     @param context - sender context, to match reply w/ request
2853     @param eid_set - if non-zero request info about specific mapping
2854     @param vni - virtual network instance; valid only if eid_set != 0
2855     @param prefix_length - prefix length if EID is IP address;
2856       valid only if eid_set != 0
2857     @param eid_type - EID type; valid only if eid_set != 0
2858       Supported values:
2859         0: EID is IPv4
2860         1: EID is IPv6
2861         2: EID is ethernet address
2862     @param eid - endpoint identifier
2863     @param filter - filter type;
2864       Support values:
2865         0: all eid
2866         1: local eid
2867         2: remote eid
2868  */
2869 define lisp_eid_table_dump
2870 {
2871   u32 client_index;
2872   u32 context;
2873   u8 eid_set;
2874   u8 prefix_length;
2875   u32 vni;
2876   u8 eid_type;
2877   u8 eid[16];
2878   u8 filter;
2879 };
2880
2881 /** \brief Shows relationship between vni and vrf/bd
2882     @param dp_table - VRF index or bridge domain index
2883     @param vni - vitual network instance
2884   */
2885 define lisp_eid_table_map_details
2886 {
2887   u32 context;
2888   u32 vni;
2889   u32 dp_table;
2890 };
2891
2892 /** \brief Request for lisp_eid_table_map_details
2893     @param client_index - opaque cookie to identify the sender
2894     @param context - sender context, to match reply w/ request
2895     @param is_l2 - if set dump vni/bd mappings else vni/vrf
2896  */
2897 define lisp_eid_table_map_dump
2898 {
2899   u32 client_index;
2900   u32 context;
2901   u8 is_l2;
2902 };
2903
2904 /** \brief Dumps all VNIs used in mappings
2905     @param client_index - opaque cookie to identify the sender
2906     @param context - sender context, to match reply w/ request
2907   */
2908 define lisp_eid_table_vni_dump
2909 {
2910   u32 client_index;
2911   u32 context;
2912 };
2913
2914 /** \brief reply to lisp_eid_table_vni_dump
2915     @param client_index - opaque cookie to identify the sender
2916     @param context - sender context, to match reply w/ request
2917     @param vni - virtual network instance
2918  */
2919 define lisp_eid_table_vni_details
2920 {
2921   u32 client_index;
2922   u32 context;
2923   u32 vni;
2924 };
2925
2926 define lisp_gpe_tunnel_details
2927 {
2928   u32 context;
2929   u32 tunnels;
2930   u8 is_ipv6;
2931   u8 source_ip[16];
2932   u8 destination_ip[16];
2933   u32 encap_fib_id;
2934   u32 decap_fib_id;
2935   u32 dcap_next;
2936   u8 lisp_ver;
2937   u8 next_protocol;
2938   u8 flags;
2939   u8 ver_res;
2940   u8 res;
2941   u32 iid;
2942 };
2943
2944 /** \brief Request for gpe tunnel summary status
2945     @param client_index - opaque cookie to identify the sender
2946     @param context - sender context, to match reply w/ request
2947  */
2948 define lisp_gpe_tunnel_dump
2949 {
2950   u32 client_index;
2951   u32 context;
2952 };
2953
2954 /** \brief LISP map resolver status
2955     @param locator_set_name - name of the locator_set
2956     @param is_ipv6 - if non-zero the address is ipv6, else ipv4
2957     @param ip_address - array of address bytes
2958  */
2959 define lisp_map_resolver_details
2960 {
2961   u32 context;
2962   u8 is_ipv6;
2963   u8 ip_address[16];
2964 };
2965
2966 /** \brief Request for map resolver summary status
2967     @param client_index - opaque cookie to identify the sender
2968     @param context - sender context, to match reply w/ request
2969  */
2970 define lisp_map_resolver_dump
2971 {
2972   u32 client_index;
2973   u32 context;
2974 };
2975
2976 /** \brief Request for lisp-gpe protocol status
2977     @param client_index - opaque cookie to identify the sender
2978     @param context - sender context, to match reply w/ request
2979 */
2980 define show_lisp_status
2981 {
2982   u32 client_index;
2983   u32 context;
2984 };
2985
2986 /** \brief Status of lisp, enable or disable
2987     @param context - sender context, to match reply w/ request
2988     @param feature_status - lisp enable if non-zero, else disable
2989     @param gpe_status - lisp enable if non-zero, else disable
2990 */
2991 define show_lisp_status_reply
2992 {
2993   u32 context;
2994   i32 retval;
2995   u8 feature_status;
2996   u8 gpe_status;
2997 };
2998
2999 /** \brief Get LISP map request itr rlocs status
3000     @param context - sender context, to match reply w/ request
3001     @param locator_set_name - name of the locator_set
3002  */
3003 define lisp_get_map_request_itr_rlocs
3004 {
3005   u32 client_index;
3006   u32 context;
3007 };
3008
3009 /** \brief Request for map request itr rlocs summary status
3010  */
3011 define lisp_get_map_request_itr_rlocs_reply
3012 {
3013   u32 context;
3014   i32 retval;
3015   u8 locator_set_name[64];
3016 };
3017
3018 /** \brief Request for lisp pitr status
3019     @param client_index - opaque cookie to identify the sender
3020     @param context - sender context, to match reply w/ request
3021 */
3022 define show_lisp_pitr
3023 {
3024   u32 client_index;
3025   u32 context;
3026 };
3027
3028 /** \brief Status of lisp pitr, enable or disable
3029     @param context - sender context, to match reply w/ request
3030     @param status - lisp pitr enable if non-zero, else disable
3031     @param locator_set_name -  name of the locator_set
3032 */
3033 define show_lisp_pitr_reply
3034 {
3035   u32 context;
3036   i32 retval;
3037   u8 status;
3038   u8 locator_set_name[64];
3039 };
3040
3041 /* Gross kludge, DGMS */
3042 define interface_name_renumber
3043 {
3044   u32 client_index;
3045   u32 context;
3046   u32 sw_if_index;
3047   u32 new_show_dev_instance;
3048 };
3049
3050 define interface_name_renumber_reply
3051 {
3052   u32 context;
3053   i32 retval;
3054 };
3055
3056 /** \brief Register for ip4 arp resolution events
3057     @param client_index - opaque cookie to identify the sender
3058     @param context - sender context, to match reply w/ request
3059     @param enable_disable - 1 => register for events, 0 => cancel registration
3060     @param pid - sender's pid
3061     @param address - the exact ip4 address of interest
3062 */
3063 define want_ip4_arp_events
3064 {
3065   u32 client_index;
3066   u32 context;
3067   u8 enable_disable;
3068   u32 pid;
3069   u32 address;
3070 };
3071
3072 /** \brief Reply for interface events registration
3073     @param context - returned sender context, to match reply w/ request
3074     @param retval - return code
3075 */
3076 define want_ip4_arp_events_reply
3077 {
3078   u32 context;
3079   i32 retval;
3080 };
3081
3082 /** \brief Tell client about an ip4 arp resolution event
3083     @param client_index - opaque cookie to identify the sender
3084     @param context - sender context, to match reply w/ request
3085     @param address - the exact ip4 address of interest
3086     @param pid - client pid registered to receive notification
3087     @param sw_if_index - interface which received ARP packet
3088     @param new_mac - the new mac address 
3089     @param mac_ip - 0: resolution event, 1: mac/ip binding in bd
3090 */
3091 define ip4_arp_event
3092 {
3093   u32 client_index;
3094   u32 context;
3095   u32 address;
3096   u32 pid;
3097   u32 sw_if_index;
3098   u8 new_mac[6];
3099   u8 mac_ip;
3100 };
3101
3102 /** \brief Register for ip6 nd resolution events
3103     @param client_index - opaque cookie to identify the sender
3104     @param context - sender context, to match reply w/ request
3105     @param enable_disable - 1 => register for events, 0 => cancel registration
3106     @param pid - sender's pid
3107     @param address - the exact ip6 address of interest
3108 */
3109 define want_ip6_nd_events
3110 {
3111   u32 client_index;
3112   u32 context;
3113   u8 enable_disable;
3114   u32 pid;
3115   u8 address[16];
3116 };
3117
3118 /** \brief Reply for ip6 nd resolution events registration
3119     @param context - returned sender context, to match reply w/ request
3120     @param retval - return code
3121 */
3122 define want_ip6_nd_events_reply
3123 {
3124   u32 context;
3125   i32 retval;
3126 };
3127
3128 /** \brief Tell client about an ip6 nd resolution or mac/ip event
3129     @param client_index - opaque cookie to identify the sender
3130     @param context - sender context, to match reply w/ request
3131     @param pid - client pid registered to receive notification
3132     @param sw_if_index - interface which received ARP packet
3133     @param address - the exact ip6 address of interest
3134     @param new_mac - the new mac address 
3135     @param mac_ip - 0: resolution event, 1: mac/ip binding in bd
3136 */
3137 define ip6_nd_event
3138 {
3139   u32 client_index;
3140   u32 context;
3141   u32 pid;
3142   u32 sw_if_index;
3143   u8 address[16];
3144   u8 new_mac[6];
3145   u8 mac_ip;
3146 };
3147     
3148 /** \brief L2 bridge domain add or delete request
3149     @param client_index - opaque cookie to identify the sender
3150     @param context - sender context, to match reply w/ request
3151     @param bd_id - the bridge domain to create
3152     @param flood - enable/disable bcast/mcast flooding in the bd
3153     @param uu_flood - enable/disable uknown unicast flood in the bd
3154     @param forward - enable/disable forwarding on all interfaces in the bd
3155     @param learn - enable/disable learning on all interfaces in the bd
3156     @param arp_term - enable/disable arp termination in the bd
3157     @param is_add - add or delete flag
3158 */
3159 define bridge_domain_add_del
3160 {
3161   u32 client_index;
3162   u32 context;
3163   u32 bd_id;
3164   u8 flood;
3165   u8 uu_flood;
3166   u8 forward;
3167   u8 learn;
3168   u8 arp_term;
3169   u8 is_add;
3170 };
3171
3172 /** \brief L2 bridge domain add or delete response
3173     @param context - sender context, to match reply w/ request
3174     @param retval - return code for the set bridge flags request
3175 */
3176 define bridge_domain_add_del_reply
3177 {
3178   u32 context;
3179   i32 retval;
3180 };
3181
3182 /** \brief L2 bridge domain request operational state details
3183     @param client_index - opaque cookie to identify the sender
3184     @param context - sender context, to match reply w/ request
3185     @param bd_id - the bridge domain id desired or ~0 to request all bds
3186 */
3187 define bridge_domain_dump
3188 {
3189   u32 client_index;
3190   u32 context;
3191   u32 bd_id;
3192 };
3193
3194 /** \brief L2 bridge domain operational state response
3195     @param bd_id - the bridge domain id
3196     @param flood - bcast/mcast flooding state on all interfaces in the bd
3197     @param uu_flood - uknown unicast flooding state on all interfaces in the bd
3198     @param forward - forwarding state on all interfaces in the bd
3199     @param learn - learning state on all interfaces in the bd
3200     @param arp_term - arp termination state on all interfaces in the bd
3201     @param n_sw_ifs - number of sw_if_index's in the domain
3202 */
3203 define bridge_domain_details
3204 {
3205   u32 context;
3206   u32 bd_id;
3207   u8 flood;
3208   u8 uu_flood;
3209   u8 forward;
3210   u8 learn;
3211   u8 arp_term;
3212   u32 bvi_sw_if_index;
3213   u32 n_sw_ifs;
3214 };
3215
3216 /** \brief L2 bridge domain sw interface operational state response
3217     @param bd_id - the bridge domain id
3218     @param sw_if_index - sw_if_index in the domain
3219     @param shg - split horizon group for the interface
3220 */
3221 define bridge_domain_sw_if_details
3222 {
3223   u32 context;
3224   u32 bd_id;
3225   u32 sw_if_index;
3226   u8 shg;
3227 };
3228
3229 /** \brief DHCP Client config add / del request
3230     @param client_index - opaque cookie to identify the sender
3231     @param context - sender context, to match reply w/ request
3232     @param sw_if_index - index of the interface for DHCP client
3233     @param hostname - hostname
3234     @param is_add - add the config if non-zero, else delete
3235     @param want_dhcp_event - DHCP event sent to the sender
3236            via dhcp_compl_event API message if non-zero
3237     @param pid - sender's pid
3238 */
3239 define dhcp_client_config
3240 {
3241   u32 client_index;
3242   u32 context;
3243   u32 sw_if_index;
3244   u8 hostname[64];
3245   u8 is_add;
3246   u8 want_dhcp_event;
3247   u32 pid;
3248 };
3249
3250 /** \brief DHCP Client config response
3251     @param context - sender context, to match reply w/ request
3252     @param retval - return code for the request
3253 */
3254 define dhcp_client_config_reply
3255 {
3256   u32 context;
3257   i32 retval;
3258 };
3259
3260 /** \brief Set/unset input ACL interface
3261     @param client_index - opaque cookie to identify the sender
3262     @param context - sender context, to match reply w/ request
3263     @param sw_if_index - interface to set/unset input ACL
3264     @param ip4_table_index - ip4 classify table index (~0 for skip)
3265     @param ip6_table_index - ip6 classify table index (~0 for skip)
3266     @param l2_table_index  -  l2 classify table index (~0 for skip)
3267     @param is_add - Set input ACL if non-zero, else unset
3268     Note: User is recommeneded to use just one valid table_index per call.
3269           (ip4_table_index, ip6_table_index, or l2_table_index)
3270 */
3271 define input_acl_set_interface
3272 {
3273   u32 client_index;
3274   u32 context;
3275   u32 sw_if_index;
3276   u32 ip4_table_index;
3277   u32 ip6_table_index;
3278   u32 l2_table_index;
3279   u8 is_add;
3280 };
3281
3282 /** \brief Set/unset input ACL interface response
3283     @param context - sender context, to match reply w/ request
3284     @param retval - return code for the request
3285 */
3286 define input_acl_set_interface_reply
3287 {
3288   u32 context;
3289   i32 retval;
3290 };
3291
3292 /** \brief IPsec: Add/delete Security Policy Database
3293     @param client_index - opaque cookie to identify the sender
3294     @param context - sender context, to match reply w/ request
3295     @param is_add - add SPD if non-zero, else delete
3296     @param spd_id - SPD instance id (control plane allocated)
3297 */
3298
3299 define ipsec_spd_add_del
3300 {
3301   u32 client_index;
3302   u32 context;
3303   u8 is_add;
3304   u32 spd_id;
3305 };
3306
3307 /** \brief Reply for IPsec: Add/delete Security Policy Database entry
3308     @param context - returned sender context, to match reply w/ request
3309     @param retval - return code
3310 */
3311
3312 define ipsec_spd_add_del_reply
3313 {
3314   u32 context;
3315   i32 retval;
3316 };
3317
3318 /** \brief IPsec: Add/delete SPD from interface
3319
3320     @param client_index - opaque cookie to identify the sender
3321     @param context - sender context, to match reply w/ request
3322     @param is_add - add security mode if non-zero, else delete
3323     @param sw_if_index - index of the interface
3324     @param spd_id - SPD instance id to use for lookups
3325 */
3326
3327
3328 define ipsec_interface_add_del_spd
3329 {
3330   u32 client_index;
3331   u32 context;
3332
3333   u8 is_add;
3334   u32 sw_if_index;
3335   u32 spd_id;
3336 };
3337
3338 /** \brief Reply for IPsec: Add/delete SPD from interface
3339     @param context - returned sender context, to match reply w/ request
3340     @param retval - return code
3341 */
3342
3343 define ipsec_interface_add_del_spd_reply
3344 {
3345   u32 context;
3346   i32 retval;
3347 };
3348
3349 /** \brief IPsec: Add/delete Security Policy Database entry
3350
3351     See RFC 4301, 4.4.1.1 on how to match packet to selectors
3352
3353     @param client_index - opaque cookie to identify the sender
3354     @param context - sender context, to match reply w/ request
3355     @param is_add - add SPD if non-zero, else delete
3356     @param spd_id - SPD instance id (control plane allocated)
3357     @param priority - priority of SPD entry (non-unique value).  Used to order SPD matching - higher priorities match before lower
3358     @param is_outbound - entry applies to outbound traffic if non-zero, otherwise applies to inbound traffic
3359     @param is_ipv6 - remote/local address are IPv6 if non-zero, else IPv4
3360     @param remote_address_start - start of remote address range to match
3361     @param remote_address_stop - end of remote address range to match
3362     @param local_address_start - start of local address range to match
3363     @param local_address_stop - end of local address range to match
3364     @param protocol - protocol type to match [0 means any]
3365     @param remote_port_start - start of remote port range to match ...
3366     @param remote_port_stop - end of remote port range to match [0 to 65535 means ANY, 65535 to 0 means OPAQUE]
3367     @param local_port_start - start of local port range to match ...
3368     @param local_port_stop - end of remote port range to match [0 to 65535 means ANY, 65535 to 0 means OPAQUE]
3369     @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)
3370     @param sa_id - SAD instance id (control plane allocated)
3371
3372 */
3373
3374 define ipsec_spd_add_del_entry
3375 {
3376   u32 client_index;
3377   u32 context;
3378   u8 is_add;
3379
3380   u32 spd_id;
3381   i32 priority;
3382   u8 is_outbound;
3383
3384   // Selector
3385   u8 is_ipv6;
3386   u8 is_ip_any;
3387   u8 remote_address_start[16];
3388   u8 remote_address_stop[16];
3389   u8 local_address_start[16];
3390   u8 local_address_stop[16];
3391
3392   u8 protocol;
3393
3394   u16 remote_port_start;
3395   u16 remote_port_stop;
3396   u16 local_port_start;
3397   u16 local_port_stop;
3398
3399   // Policy
3400   u8 policy;
3401   u32 sa_id;
3402 };
3403
3404 /** \brief Reply for IPsec: Add/delete Security Policy Database entry
3405     @param context - returned sender context, to match reply w/ request
3406     @param retval - return code
3407 */
3408
3409 define ipsec_spd_add_del_entry_reply
3410 {
3411   u32 context;
3412   i32 retval;
3413 };
3414
3415 /** \brief IPsec: Add/delete Security Association Database entry
3416     @param client_index - opaque cookie to identify the sender
3417     @param context - sender context, to match reply w/ request
3418     @param is_add - add SAD entry if non-zero, else delete
3419
3420     @param sad_id - sad id
3421
3422     @param spi - security parameter index
3423
3424     @param protocol - 0 = AH, 1 = ESP
3425
3426     @param crypto_algorithm - 0 = Null, 1 = AES-CBC-128, 2 = AES-CBC-192, 3 = AES-CBC-256, 4 = 3DES-CBC
3427     @param crypto_key_length - length of crypto_key in bytes
3428     @param crypto_key - crypto keying material
3429
3430     @param integrity_algorithm - 0 = None, 1 = MD5-96, 2 = SHA1-96, 3 = SHA-256, 4 = SHA-384, 5=SHA-512
3431     @param integrity_key_length - length of integrity_key in bytes
3432     @param integrity_key - integrity keying material
3433
3434     @param use_extended_sequence_number - use ESN when non-zero
3435
3436     @param is_tunnel - IPsec tunnel mode if non-zero, else transport mode
3437     @param is_tunnel_ipv6 - IPsec tunnel mode is IPv6 if non-zero, else IPv4 tunnel only valid if is_tunnel is non-zero
3438     @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
3439     @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
3440
3441     To be added:
3442      Anti-replay
3443      IPsec tunnel address copy mode (to support GDOI)
3444  */
3445
3446 define ipsec_sad_add_del_entry
3447 {
3448   u32 client_index;
3449   u32 context;
3450   u8 is_add;
3451
3452   u32 sad_id;
3453
3454   u32 spi;
3455
3456   u8 protocol;
3457
3458   u8 crypto_algorithm;
3459   u8 crypto_key_length;
3460   u8 crypto_key[128];
3461
3462   u8 integrity_algorithm;
3463   u8 integrity_key_length;
3464   u8 integrity_key[128];
3465
3466   u8 use_extended_sequence_number;
3467
3468   u8 is_tunnel;
3469   u8 is_tunnel_ipv6;
3470   u8 tunnel_src_address[16];
3471   u8 tunnel_dst_address[16];
3472 };
3473
3474 /** \brief Reply for IPsec: Add/delete Security Association Database entry
3475     @param context - returned sender context, to match reply w/ request
3476     @param retval - return code
3477 */
3478
3479 define ipsec_sad_add_del_entry_reply
3480 {
3481   u32 context;
3482   i32 retval;
3483 };
3484
3485 /** \brief IPsec: Update Security Association keys
3486     @param client_index - opaque cookie to identify the sender
3487     @param context - sender context, to match reply w/ request
3488
3489     @param sa_id - sa id
3490
3491     @param crypto_key_length - length of crypto_key in bytes
3492     @param crypto_key - crypto keying material
3493
3494     @param integrity_key_length - length of integrity_key in bytes
3495     @param integrity_key - integrity keying material
3496 */
3497
3498 define ipsec_sa_set_key
3499 {
3500   u32 client_index;
3501   u32 context;
3502
3503   u32 sa_id;
3504
3505   u8 crypto_key_length;
3506   u8 crypto_key[128];
3507
3508   u8 integrity_key_length;
3509   u8 integrity_key[128];
3510 };
3511
3512 /** \brief Reply for IPsec: Update Security Association keys
3513     @param context - returned sender context, to match reply w/ request
3514     @param retval - return code
3515 */
3516
3517 define ipsec_sa_set_key_reply
3518 {
3519   u32 context;
3520   i32 retval;
3521 };
3522
3523 /** \brief IKEv2: Add/delete profile
3524     @param client_index - opaque cookie to identify the sender
3525     @param context - sender context, to match reply w/ request
3526
3527     @param name - IKEv2 profile name
3528     @param is_add - Add IKEv2 profile if non-zero, else delete
3529 */
3530 define ikev2_profile_add_del
3531 {
3532   u32 client_index;
3533   u32 context;
3534
3535   u8 name[64];
3536   u8 is_add;
3537 };
3538
3539 /** \brief Reply for IKEv2: Add/delete profile
3540     @param context - returned sender context, to match reply w/ request
3541     @param retval - return code
3542 */
3543 define ikev2_profile_add_del_reply
3544 {
3545   u32 context;
3546   i32 retval;
3547 };
3548
3549 /** \brief IKEv2: Set IKEv2 profile authentication method
3550     @param client_index - opaque cookie to identify the sender
3551     @param context - sender context, to match reply w/ request
3552
3553     @param name - IKEv2 profile name
3554     @param auth_method - IKEv2 authentication method (shared-key-mic/rsa-sig)
3555     @param is_hex - Authentication data in hex format if non-zero, else string
3556     @param data_len - Authentication data length
3557     @param data - Authentication data (for rsa-sig cert file path)
3558 */
3559 define ikev2_profile_set_auth
3560 {
3561   u32 client_index;
3562   u32 context;
3563
3564   u8 name[64];
3565   u8 auth_method;
3566   u8 is_hex;
3567   u32 data_len;
3568   u8 data[0];
3569 };
3570
3571 /** \brief Reply for IKEv2: Set IKEv2 profile authentication method
3572     @param context - returned sender context, to match reply w/ request
3573     @param retval - return code
3574 */
3575 define ikev2_profile_set_auth_reply
3576 {
3577   u32 context;
3578   i32 retval;
3579 };
3580
3581 /** \brief IKEv2: Set IKEv2 profile local/remote identification
3582     @param client_index - opaque cookie to identify the sender
3583     @param context - sender context, to match reply w/ request
3584
3585     @param name - IKEv2 profile name
3586     @param is_local - Identification is local if non-zero, else remote
3587     @param id_type - Identification type
3588     @param data_len - Identification data length
3589     @param data - Identification data
3590 */
3591 define ikev2_profile_set_id
3592 {
3593   u32 client_index;
3594   u32 context;
3595
3596   u8 name[64];
3597   u8 is_local;
3598   u8 id_type;
3599   u32 data_len;
3600   u8 data[0];
3601 };
3602
3603 /** \brief Reply for IKEv2:
3604     @param context - returned sender context, to match reply w/ request
3605     @param retval - return code
3606 */
3607 define ikev2_profile_set_id_reply
3608 {
3609   u32 context;
3610   i32 retval;
3611 };
3612
3613 /** \brief IKEv2: Set IKEv2 profile traffic selector parameters
3614     @param client_index - opaque cookie to identify the sender
3615     @param context - sender context, to match reply w/ request
3616
3617     @param name - IKEv2 profile name
3618     @param is_local - Traffic selector is local if non-zero, else remote
3619     @param proto - Traffic selector IP protocol (if zero not relevant)
3620     @param start_port - The smallest port number allowed by traffic selector
3621     @param end_port - The largest port number allowed by traffic selector
3622     @param start_addr - The smallest address included in traffic selector
3623     @param end_addr - The largest address included in traffic selector
3624 */
3625 define ikev2_profile_set_ts
3626 {
3627   u32 client_index;
3628   u32 context;
3629
3630   u8 name[64];
3631   u8 is_local;
3632   u8 proto;
3633   u16 start_port;
3634   u16 end_port;
3635   u32 start_addr;
3636   u32 end_addr;
3637 };
3638
3639 /** \brief Reply for IKEv2: Set IKEv2 profile traffic selector parameters
3640     @param context - returned sender context, to match reply w/ request
3641     @param retval - return code
3642 */
3643 define ikev2_profile_set_ts_reply
3644 {
3645   u32 context;
3646   i32 retval;
3647 };
3648
3649 /** \brief IKEv2: Set IKEv2 local RSA private key
3650     @param client_index - opaque cookie to identify the sender
3651     @param context - sender context, to match reply w/ request
3652
3653     @param key_file - Key file absolute path
3654 */
3655 define ikev2_set_local_key
3656 {
3657   u32 client_index;
3658   u32 context;
3659
3660   u8 key_file[256];
3661 };
3662
3663 /** \brief Reply for IKEv2: Set IKEv2 local key
3664     @param context - returned sender context, to match reply w/ request
3665     @param retval - return code
3666 */
3667 define ikev2_set_local_key_reply
3668 {
3669   u32 context;
3670   i32 retval;
3671 };
3672
3673 /** \brief Tell client about a DHCP completion event
3674     @param client_index - opaque cookie to identify the sender
3675     @param pid - client pid registered to receive notification
3676     @param is_ipv6 - if non-zero the address is ipv6, else ipv4
3677     @param host_address - Host IP address
3678     @param router_address - Router IP address
3679     @param host_mac - Host MAC address
3680 */
3681 define dhcp_compl_event
3682 {
3683   u32 client_index;
3684   u32 pid;
3685   u8 hostname[64];
3686   u8 is_ipv6;
3687   u8 host_address[16];
3688   u8 router_address[16];
3689   u8 host_mac[6];
3690 };
3691
3692 /** \brief Add MAP domains
3693     @param client_index - opaque cookie to identify the sender
3694     @param context - sender context, to match reply w/ request
3695     @param ip6_prefix - Rule IPv6 prefix
3696     @param ip4_prefix - Rule IPv4 prefix
3697     @param ip6_src - MAP domain IPv6 BR address / Tunnel source
3698     @param ip6_prefix_len - Rule IPv6 prefix length
3699     @param ip4_prefix_len - Rule IPv4 prefix length
3700     @param ea_bits_len - Embedded Address bits length
3701     @param psid_offset - Port Set Identifider (PSID) offset
3702     @param psid_length - PSID length
3703     @param is_translation - MAP-E / MAP-T
3704     @param mtu - MTU
3705 */
3706 define map_add_domain
3707 {
3708   u32 client_index;
3709   u32 context;
3710   u8 ip6_prefix[16];
3711   u8 ip4_prefix[4];
3712   u8 ip6_src[16];
3713   u8 ip6_prefix_len;
3714   u8 ip4_prefix_len;
3715   u8 ip6_src_prefix_len;
3716   u8 ea_bits_len;
3717   u8 psid_offset;
3718   u8 psid_length;
3719   u8 is_translation;
3720   u16 mtu;
3721 };
3722
3723 /** \brief Reply for MAP domain add
3724     @param context - returned sender context, to match reply w/ request
3725     @param index - MAP domain index
3726     @param retval - return code
3727 */
3728 define map_add_domain_reply
3729 {
3730   u32 context;
3731   u32 index;
3732   i32 retval;
3733 };
3734
3735 /** \brief Delete MAP domain
3736     @param client_index - opaque cookie to identify the sender
3737     @param context - sender context, to match reply w/ request
3738     @param index - MAP Domain index
3739 */
3740 define map_del_domain
3741 {
3742   u32 client_index;
3743   u32 context;
3744   u32 index;
3745 };
3746
3747 /** \brief Reply for MAP domain del
3748     @param context - returned sender context, to match reply w/ request
3749     @param retval - return code
3750 */
3751 define map_del_domain_reply
3752 {
3753   u32 context;
3754   i32 retval;
3755 };
3756
3757 /** \brief Add or Delete MAP rule from a domain (Only used for shared IPv4 per subscriber)
3758     @param client_index - opaque cookie to identify the sender
3759     @param context - sender context, to match reply w/ request
3760     @param index - MAP Domain index
3761     @param is_add - If 1 add rule, if 0 delete rule
3762     @param ip6_dst - MAP CE IPv6 address
3763     @param psid - Rule PSID
3764 */
3765 define map_add_del_rule
3766 {
3767   u32 client_index;
3768   u32 context;
3769   u32 index;
3770   u32 is_add;
3771   u8 ip6_dst[16];
3772   u16 psid;
3773 };
3774
3775 /** \brief Reply for MAP rule add/del
3776     @param context - returned sender context, to match reply w/ request
3777     @param retval - return code
3778 */
3779 define map_add_del_rule_reply
3780 {
3781   u32 context;
3782   i32 retval;
3783 };
3784
3785 /** \brief Get list of map domains
3786     @param client_index - opaque cookie to identify the sender
3787 */
3788 define map_domain_dump
3789 {
3790   u32 client_index;
3791   u32 context;
3792 };
3793
3794 define map_domain_details
3795 {
3796   u32 context;
3797   u32 domain_index;
3798   u8 ip6_prefix[16];
3799   u8 ip4_prefix[4];
3800   u8 ip6_src[16];
3801   u8 ip6_prefix_len;
3802   u8 ip4_prefix_len;
3803   u8 ip6_src_len;
3804   u8 ea_bits_len;
3805   u8 psid_offset;
3806   u8 psid_length;
3807   u8 flags;
3808   u16 mtu;
3809   u8 is_translation;
3810 };
3811
3812 define map_rule_dump
3813 {
3814   u32 client_index;
3815   u32 context;
3816   u32 domain_index;
3817 };
3818
3819 define map_rule_details
3820 {
3821   u32 context;
3822   u8 ip6_dst[16];
3823   u16 psid;
3824 };
3825
3826 /** \brief Request for a single block of summary stats
3827     @param client_index - opaque cookie to identify the sender
3828     @param context - sender context, to match reply w/ request
3829 */
3830 define map_summary_stats
3831 {
3832   u32 client_index;
3833   u32 context;
3834 };
3835
3836 /** \brief Reply for map_summary_stats request
3837     @param context - sender context, to match reply w/ request
3838     @param retval - return code for request
3839     @param total_bindings -  
3840     @param total_pkts -  
3841     @param total_ip4_fragments -
3842     @param total_security_check - 
3843 */
3844 define map_summary_stats_reply
3845 {
3846   u32 context;
3847   i32 retval;
3848   u64 total_bindings;
3849   u64 total_pkts[2];
3850   u64 total_bytes[2];
3851   u64 total_ip4_fragments;
3852   u64 total_security_check[2];
3853 };
3854
3855 /** \brief cop: enable/disable junk filtration features on an interface
3856     @param client_index - opaque cookie to identify the sender
3857     @param context - sender context, to match reply w/ request
3858     @param sw_if_inded - desired interface
3859     @param enable_disable - 1 => enable, 0 => disable
3860 */
3861
3862 define cop_interface_enable_disable
3863 {
3864   u32 client_index;
3865   u32 context;
3866   u32 sw_if_index;
3867   u8 enable_disable;
3868 };
3869
3870 /** \brief cop: interface enable/disable junk filtration reply
3871     @param context - returned sender context, to match reply w/ request
3872     @param retval - return code
3873 */
3874
3875 define cop_interface_enable_disable_reply
3876 {
3877   u32 context;
3878   i32 retval;
3879 };
3880
3881 /** \brief cop: enable/disable whitelist filtration features on an interface
3882     Note: the supplied fib_id must match in order to remove the feature!
3883     
3884     @param client_index - opaque cookie to identify the sender
3885     @param context - sender context, to match reply w/ request
3886     @param sw_if_index - interface handle, physical interfaces only
3887     @param fib_id - fib identifier for the whitelist / blacklist fib
3888     @param ip4 - 1 => enable ip4 filtration, 0=> disable ip4 filtration
3889     @param ip6 - 1 => enable ip6 filtration, 0=> disable ip6 filtration
3890     @param default_cop -  1 => enable non-ip4, non-ip6 filtration 0=> disable it
3891 */
3892
3893 define cop_whitelist_enable_disable
3894 {
3895   u32 client_index;
3896   u32 context;
3897   u32 sw_if_index;
3898   u32 fib_id;
3899   u8 ip4;
3900   u8 ip6;
3901   u8 default_cop;
3902 };
3903
3904 /** \brief cop: interface enable/disable junk filtration reply
3905     @param context - returned sender context, to match reply w/ request
3906     @param retval - return code
3907 */
3908
3909 define cop_whitelist_enable_disable_reply
3910 {
3911   u32 context;
3912   i32 retval;
3913 };
3914
3915 /** \brief get_node_graph - get a copy of the vpp node graph
3916     including the current set of graph arcs.
3917
3918     @param client_index - opaque cookie to identify the sender
3919     @param context - sender context, to match reply w/ request
3920 */
3921
3922 define get_node_graph
3923 {
3924   u32 client_index;
3925   u32 context;
3926 };
3927
3928 /** \brief get_node_graph_reply
3929     @param context - returned sender context, to match reply w/ request
3930     @param retval - return code
3931     @param reply_in_shmem - result from vlib_node_serialize, in shared
3932     memory. Process with vlib_node_unserialize, remember to switch
3933     heaps and free the result.
3934 */
3935
3936 define get_node_graph_reply
3937 {
3938   u32 context;
3939   i32 retval;
3940   u64 reply_in_shmem;
3941 };
3942
3943 /** \brief Clear interface statistics
3944     @param client_index - opaque cookie to identify the sender
3945     @param context - sender context, to match reply w/ request
3946     @param sw_if_index - index of the interface to clear statistics
3947 */
3948 define sw_interface_clear_stats
3949 {
3950   u32 client_index;
3951   u32 context;
3952   u32 sw_if_index;
3953 };
3954
3955 /** \brief Reply to sw_interface_clear_stats 
3956     @param context - sender context which was passed in the request
3957     @param retval - return code of the set flags request
3958 */
3959 define sw_interface_clear_stats_reply
3960 {
3961   u32 context;
3962   i32 retval;
3963 };
3964
3965 /** \brief IOAM Trace : Set TRACE profile
3966     @param id - profile id
3967     @param trace_type - Trace type
3968     @param trace_num_elt - Number of nodes in trace path
3969     @param trace_ppc - Trace PPC (none/encap/decap)
3970     @param trace_tsp - Trace timestamp precision (0-sec,1-ms,2-us,3-ns)
3971     @param trace_app_data - Trace application data, can be any 4 bytes
3972     @param pow_enable - Proof of Work enabled or not flag
3973     @param node_id - Id of this node
3974 */
3975 define trace_profile_add
3976 {
3977   u32 client_index;
3978   u32 context;
3979   u16 id;
3980   u8 trace_type;
3981   u8 trace_num_elt;
3982   u8 trace_ppc;
3983   u8 trace_tsp;
3984   u32 trace_app_data;
3985   u8 pow_enable;
3986   u32 node_id;
3987 };
3988
3989 /** \brief Trace profile add / del response
3990     @param context - sender context, to match reply w/ request
3991     @param retval - return value for request
3992 */
3993 define trace_profile_add_reply
3994 {
3995   u32 context;
3996   i32 retval;
3997 };
3998
3999 /** \brief IOAM Trace enable trace profile for a flow
4000     @param id - id of the trace profile to be applied
4001     @param dest_ipv6 - Destination IPv6 address
4002     @param prefix_length - prefix mask
4003     @param vrf_id - VRF ID
4004     @param trace_op - Trace operation (add/mod/del)
4005     @param enable - apply/remove the trace profile for the flow
4006 */
4007 define trace_profile_apply
4008 {
4009   u32 client_index;
4010   u32 context;
4011   u16 id;
4012   u8 dest_ipv6[16];
4013   u32 prefix_length;
4014   u32 vrf_id;
4015   u8 trace_op;
4016   u8 enable;
4017 };
4018
4019 /** \brief Trace profile apply response
4020     @param context - sender context, to match reply w/ request   
4021     @param retval - return value for request
4022 */
4023 define trace_profile_apply_reply
4024 {
4025   u32 context;
4026   i32 retval;
4027 };
4028
4029 /** \brief Delete Trace Profile 
4030     @param client_index - opaque cookie to identify the sender
4031     @param context - sender context, to match reply w/ request
4032     @param index - MAP Domain index
4033 */
4034 define trace_profile_del
4035 {
4036   u32 client_index;
4037   u32 context;
4038   u16 id;
4039 };
4040
4041 /** \brief Trace profile add / del response
4042     @param context - sender context, to match reply w/ request
4043     @param retval - return value for request
4044 */
4045 define trace_profile_del_reply
4046 {
4047   u32 context;
4048   i32 retval;
4049 };
4050
4051 /** \brief Create host-interface
4052     @param client_index - opaque cookie to identify the sender
4053     @param context - sender context, to match reply w/ request
4054     @param host_if_name - interface name
4055     @param hw_addr - interface MAC
4056     @param use_random_hw_addr - use random generated MAC
4057 */
4058 define af_packet_create
4059 {
4060   u32 client_index;
4061   u32 context;
4062
4063   u8 host_if_name[64];
4064   u8 hw_addr[6];
4065   u8 use_random_hw_addr;
4066 };
4067
4068 /** \brief Create host-interface response
4069     @param context - sender context, to match reply w/ request
4070     @param retval - return value for request
4071 */
4072 define af_packet_create_reply
4073 {
4074   u32 context;
4075   i32 retval;
4076   u32 sw_if_index;
4077 };
4078
4079 /** \brief Delete host-interface
4080     @param client_index - opaque cookie to identify the sender
4081     @param context - sender context, to match reply w/ request
4082     @param host_if_name - interface name
4083 */
4084 define af_packet_delete
4085 {
4086   u32 client_index;
4087   u32 context;
4088
4089   u8 host_if_name[64];
4090 };
4091
4092 /** \brief Delete host-interface response
4093     @param context - sender context, to match reply w/ request
4094     @param retval - return value for request
4095 */
4096 define af_packet_delete_reply
4097 {
4098   u32 context;
4099   i32 retval;
4100 };
4101
4102 /** \brief Add/del policer
4103     @param client_index - opaque cookie to identify the sender
4104     @param context - sender context, to match reply w/ request
4105     @param is_add - add policer if non-zero, else delete
4106     @param name - policer name
4107     @param cir - CIR
4108     @param eir - EIR
4109     @param cb - Committed Burst
4110     @param eb - Excess or Peak Burst
4111     @param rate_type - rate type
4112     @param round_type - rounding type
4113     @param type - policer algorithm
4114     @param color_aware - 0=color-blind, 1=color-aware
4115     @param conform_action_type - conform action type
4116     @param conform_dscp - DSCP for conform mar-and-transmit action
4117     @param exceed_action_type - exceed action type
4118     @param exceed_dscp - DSCP for exceed mar-and-transmit action
4119     @param violate_action_type - violate action type
4120     @param violate_dscp - DSCP for violate mar-and-transmit action
4121 */
4122 define policer_add_del
4123 {
4124   u32 client_index;
4125   u32 context;
4126
4127   u8 is_add;
4128   u8 name[64];
4129   u32 cir;
4130   u32 eir;
4131   u64 cb;
4132   u64 eb;
4133   u8 rate_type;
4134   u8 round_type;
4135   u8 type;
4136   u8 color_aware;
4137   u8 conform_action_type;
4138   u8 conform_dscp;
4139   u8 exceed_action_type;
4140   u8 exceed_dscp;
4141   u8 violate_action_type;
4142   u8 violate_dscp;
4143 };
4144
4145 /** \brief Add/del policer response
4146     @param context - sender context, to match reply w/ request
4147     @param retval - return value for request
4148     @param policer_index - for add, returned index of the new policer
4149 */
4150 define policer_add_del_reply
4151 {
4152   u32 context;
4153   i32 retval;
4154   u32 policer_index;
4155 };
4156
4157 /** \brief Get list of policers
4158     @param client_index - opaque cookie to identify the sender
4159     @param context - sender context, to match reply w/ request
4160     @param match_name_valid - if 0 request all policers otherwise use match_name
4161     @param match_name - policer name
4162 */
4163 define policer_dump
4164 {
4165   u32 client_index;
4166   u32 context;
4167
4168   u8 match_name_valid;
4169   u8 match_name[64];
4170 };
4171
4172 /** \brief Policer operational state response.
4173     @param context - sender context, to match reply w/ request
4174     @param name - policer name
4175     @param cir - CIR
4176     @param eir - EIR
4177     @param cb - Committed Burst
4178     @param eb - Excess or Peak Burst
4179     @param rate_type - rate type
4180     @param round_type - rounding type
4181     @param type - policer algorithm
4182     @param conform_action_type - conform action type
4183     @param conform_dscp - DSCP for conform mar-and-transmit action
4184     @param exceed_action_type - exceed action type
4185     @param exceed_dscp - DSCP for exceed mar-and-transmit action
4186     @param violate_action_type - violate action type
4187     @param violate_dscp - DSCP for violate mar-and-transmit action
4188     @param single_rate - 1 = single rate policer, 0 = two rate policer
4189     @param color_aware - for hierarchical policing
4190     @param scale - power-of-2 shift amount for lower rates
4191     @param cir_tokens_per_period - number of tokens for each period
4192     @param pir_tokens_per_period - number of tokens for each period for 2-rate policer
4193     @param current_limit - current limit
4194     @param current_bucket - current bucket
4195     @param extended_limit - extended limit
4196     @param extended_bucket - extended bucket
4197     @param last_update_time - last update time
4198 */
4199 define policer_details
4200 {
4201   u32 context;
4202
4203   u8 name[64];
4204   u32 cir;
4205   u32 eir;
4206   u64 cb;
4207   u64 eb;
4208   u8 rate_type;
4209   u8 round_type;
4210   u8 type;
4211   u8 conform_action_type;
4212   u8 conform_dscp;
4213   u8 exceed_action_type;
4214   u8 exceed_dscp;
4215   u8 violate_action_type;
4216   u8 violate_dscp;
4217   u8 single_rate;
4218   u8 color_aware;
4219   u32 scale;
4220   u32 cir_tokens_per_period;
4221   u32 pir_tokens_per_period;
4222   u32 current_limit;
4223   u32 current_bucket;
4224   u32 extended_limit;
4225   u32 extended_bucket;
4226   u64 last_update_time;
4227 };
4228
4229 /** \brief Set/unset policer classify interface
4230     @param client_index - opaque cookie to identify the sender
4231     @param context - sender context, to match reply w/ request
4232     @param sw_if_index - interface to set/unset policer classify
4233     @param ip4_table_index - ip4 classify table index (~0 for skip)
4234     @param ip6_table_index - ip6 classify table index (~0 for skip)
4235     @param l2_table_index  -  l2 classify table index (~0 for skip)
4236     @param is_add - Set if non-zero, else unset
4237     Note: User is recommeneded to use just one valid table_index per call.
4238           (ip4_table_index, ip6_table_index, or l2_table_index)
4239 */
4240 define policer_classify_set_interface
4241 {
4242   u32 client_index;
4243   u32 context;
4244   u32 sw_if_index;
4245   u32 ip4_table_index;
4246   u32 ip6_table_index;
4247   u32 l2_table_index;
4248   u8 is_add;
4249 };
4250
4251 /** \brief Set/unset policer classify interface response
4252     @param context - sender context, to match reply w/ request
4253     @param retval - return value for request
4254 */
4255 define policer_classify_set_interface_reply
4256 {
4257   u32 context;
4258   i32 retval;
4259 };
4260
4261 /** \brief Get list of policer classify interfaces and tables
4262     @param client_index - opaque cookie to identify the sender
4263     @param context - sender context, to match reply w/ request
4264     @param type - classify table type
4265 */
4266 define policer_classify_dump
4267 {
4268   u32 client_index;
4269   u32 context;
4270   u8 type;
4271 };
4272
4273 /** \brief Policer iclassify operational state response.
4274     @param context - sender context, to match reply w/ request
4275     @param sw_if_index - software interface index
4276     @param table_index - classify table index
4277 */
4278 define policer_classify_details
4279 {
4280   u32 context;
4281   u32 sw_if_index;
4282   u32 table_index;
4283 };
4284
4285 /** \brief Create netmap
4286     @param client_index - opaque cookie to identify the sender
4287     @param context - sender context, to match reply w/ request
4288     @param netmap_if_name - interface name
4289     @param hw_addr - interface MAC
4290     @param use_random_hw_addr - use random generated MAC
4291     @param is_pipe - is pipe
4292     @param is_master - 0=slave, 1=master
4293 */
4294 define netmap_create
4295 {
4296   u32 client_index;
4297   u32 context;
4298
4299   u8 netmap_if_name[64];
4300   u8 hw_addr[6];
4301   u8 use_random_hw_addr;
4302   u8 is_pipe;
4303   u8 is_master;
4304 };
4305
4306 /** \brief Create netmap response
4307     @param context - sender context, to match reply w/ request
4308     @param retval - return value for request
4309 */
4310 define netmap_create_reply
4311 {
4312   u32 context;
4313   i32 retval;
4314 };
4315
4316 /** \brief Delete netmap
4317     @param client_index - opaque cookie to identify the sender
4318     @param context - sender context, to match reply w/ request
4319     @param netmap_if_name - interface name
4320 */
4321 define netmap_delete
4322 {
4323   u32 client_index;
4324   u32 context;
4325
4326   u8 netmap_if_name[64];
4327 };
4328
4329 /** \brief Delete netmap response
4330     @param context - sender context, to match reply w/ request
4331     @param retval - return value for request
4332 */
4333 define netmap_delete_reply
4334 {
4335   u32 context;
4336   i32 retval;
4337 };
4338
4339 /** \brief Dump mpls gre tunnel table
4340     @param client_index - opaque cookie to identify the sender
4341     @param tunnel_index - gre tunnel identifier or -1 in case of all tunnels
4342 */
4343 define mpls_gre_tunnel_dump
4344 {
4345   u32 client_index;
4346   u32 context;
4347   i32 tunnel_index;
4348 };
4349
4350 /** \brief mpls gre tunnel operational state response
4351     @param tunnel_index - gre tunnel identifier
4352     @param intfc_address - interface ipv4 addr
4353     @param mask_width - interface ipv4 addr mask
4354     @param hw_if_index - interface id
4355     @param l2_only -
4356     @param tunnel_src - tunnel source ipv4 addr
4357     @param tunnel_dst - tunnel destination ipv4 addr
4358     @param outer_fib_index - gre tunnel identifier
4359     @param encap_index - reference to mpls label table
4360     @param nlabels - number of resolved labels
4361     @param labels - resolved labels
4362 */
4363 define mpls_gre_tunnel_details
4364 {
4365   u32 context;
4366   u32 tunnel_index;
4367
4368   u32 intfc_address;
4369   u32 inner_fib_index;
4370   u32 mask_width;
4371   u32 encap_index;
4372   u32 hw_if_index;
4373   u8 l2_only;
4374   u32 tunnel_src;
4375   u32 tunnel_dst;
4376   u32 outer_fib_index;
4377   u32 nlabels;
4378   u32 labels[nlabels];
4379 };
4380
4381 /** \brief Dump mpls eth tunnel table
4382     @param client_index - opaque cookie to identify the sender
4383     @param tunnel_index - eth tunnel identifier or -1 in case of all tunnels
4384 */
4385 define mpls_eth_tunnel_dump
4386 {
4387   u32 client_index;
4388   u32 context;
4389   i32 tunnel_index;
4390 };
4391
4392 /** \brief mpls eth tunnel operational state response
4393     @param tunnel_index - eth tunnel identifier
4394     @param intfc_address - interface ipv4 addr
4395     @param mask_width - interface ipv4 addr mask
4396     @param hw_if_index - interface id
4397     @param l2_only -
4398     @param tunnel_dst_mac -
4399     @param tx_sw_if_index -
4400     @param encap_index - reference to mpls label table
4401     @param nlabels - number of resolved labels
4402     @param labels - resolved labels
4403 */
4404 define mpls_eth_tunnel_details
4405 {
4406   u32 context;
4407   u32 tunnel_index;
4408
4409   u32 intfc_address;
4410   u32 inner_fib_index;
4411   u32 mask_width;
4412   u32 encap_index;
4413   u32 hw_if_index;
4414   u8 l2_only;
4415   u8 tunnel_dst_mac[6];
4416   u32 tx_sw_if_index;
4417   u32 nlabels;
4418   u32 labels[nlabels];
4419 };
4420
4421 /** \brief Dump mpls fib table
4422     @param client_index - opaque cookie to identify the sender
4423     @param fib_index    - mpls fib entry identifier or -1 in case of all entries
4424 */
4425 define mpls_fib_encap_dump
4426 {
4427   u32 client_index;
4428   u32 context;
4429 };
4430
4431 /** \brief mpls fib encap table response
4432     @param fib_index - fib table id
4433     @param dest - destination ipv4 addr
4434     @param s_bit -
4435     @param entry_index - reference to mpls label table
4436     @param nlabels - number of resolved labels
4437     @param labels - resolved labels
4438 */
4439 define mpls_fib_encap_details
4440 {
4441   u32 context;
4442
4443   u32 fib_index;
4444   u32 entry_index;
4445   u32 dest;
4446   u32 s_bit;
4447   u32 nlabels;
4448   u32 labels[nlabels];
4449 };
4450
4451 /** \brief Dump mpls fib decap table
4452     @param client_index - opaque cookie to identify the sender
4453     @param fib_index    - mpls fib entry identifier or -1 in case of all entries
4454 */
4455 define mpls_fib_decap_dump
4456 {
4457   u32 client_index;
4458   u32 context;
4459 };
4460
4461 /** \brief mpls fib decap table response
4462     @param fib_index - fib table id
4463     @param entry_index - reference to mpls label table
4464     @param dest - destination ipv4 addr
4465     @param s_bit -
4466     @param label - mpls labels
4467     @param rx_table_id - rx fib id
4468     @param tx_table_id - tx fib id
4469     @param swif_tag -
4470 */
4471 define mpls_fib_decap_details
4472 {
4473   u32 context;
4474
4475   u32 fib_index;
4476   u32 entry_index;
4477   u32 dest;
4478   u32 s_bit;
4479   u32 label;
4480   u32 rx_table_id;
4481   u32 tx_table_id;
4482   u8 swif_tag[8];
4483 };
4484
4485 /** \brief Classify get table IDs request
4486     @param client_index - opaque cookie to identify the sender
4487     @param context - sender context, to match reply w/ request
4488 */
4489 define classify_table_ids
4490 {
4491   u32 client_index;
4492   u32 context;
4493 };
4494
4495 /** \brief Reply for classify get table IDs request
4496     @param context - sender context which was passed in the request
4497     @param count - number of ids returned in response
4498     @param ids - array of classify table ids
4499 */
4500 define classify_table_ids_reply
4501 {
4502   u32 context;
4503   i32 retval;
4504   u32 count;
4505   u32 ids[count];
4506 };
4507
4508 /** \brief Classify table ids by interface index request
4509     @param client_index - opaque cookie to identify the sender
4510     @param context - sender context, to match reply w/ request
4511     @param sw_if_index - index of the interface
4512 */
4513 define classify_table_by_interface
4514 {
4515   u32 client_index;
4516   u32 context;
4517   u32 sw_if_index;
4518 };
4519
4520 /** \brief Reply for classify table id by interface index request
4521     @param context - sender context which was passed in the request
4522     @param count - number of ids returned in response
4523     @param sw_if_index - index of the interface
4524     @param l2_table_id - l2 classify table index
4525     @param ip4_table_id - ip4 classify table index
4526     @param ip6_table_id - ip6 classify table index
4527 */
4528 define classify_table_by_interface_reply
4529 {
4530   u32 context;
4531   i32 retval;
4532   u32 sw_if_index;
4533   u32 l2_table_id;
4534   u32 ip4_table_id;
4535   u32 ip6_table_id;
4536 };
4537
4538 /** \brief Classify table info
4539     @param client_index - opaque cookie to identify the sender
4540     @param context - sender context, to match reply w/ request
4541     @param table_id - classify table index
4542 */
4543 define classify_table_info
4544 {
4545   u32 client_index;
4546   u32 context;
4547   u32 table_id;
4548 };
4549
4550 /** \brief Reply for classify table info request
4551     @param context - sender context which was passed in the request
4552     @param count - number of ids returned in response
4553     @param table_id - classify table index
4554     @param nbuckets - number of buckets when adding a table
4555     @param match_n_vectors - number of match vectors
4556     @param skip_n_vectors - number of skip_n_vectors
4557     @param active_sessions - number of sessions (active entries)
4558     @param next_table_index - index of next table
4559     @param miss_next_index - index of miss table
4560     @param mask[] - match mask
4561 */
4562 define classify_table_info_reply
4563 {
4564   u32 context;
4565   i32 retval;
4566   u32 table_id;
4567   u32 nbuckets;
4568   u32 match_n_vectors;
4569   u32 skip_n_vectors;
4570   u32 active_sessions;
4571   u32 next_table_index;
4572   u32 miss_next_index;
4573   u32 mask_length;
4574   u8 mask[mask_length];
4575 };
4576
4577 /** \brief Classify sessions dump request
4578     @param client_index - opaque cookie to identify the sender
4579     @param context - sender context, to match reply w/ request
4580     @param table_id - classify table index
4581 */
4582 define classify_session_dump
4583 {
4584   u32 client_index;
4585   u32 context;
4586   u32 table_id;
4587 };
4588
4589 /** \brief Reply for classify table session dump request
4590     @param context - sender context which was passed in the request
4591     @param count - number of ids returned in response
4592     @param table_id - classify table index
4593     @param hit_next_index - hit_next_index of session
4594     @param opaque_index - for add, opaque_index of session
4595     @param advance - advance value of session
4596     @param match[] - match value for session
4597 */
4598 define classify_session_details
4599 {
4600   u32 context;
4601   i32 retval;
4602   u32 table_id;
4603   u32 hit_next_index;
4604   i32 advance;
4605   u32 opaque_index;
4606   u32 match_length;
4607   u8 match[match_length];
4608 };
4609
4610 /** \brief Enable and configure IPFIX exporter process request
4611     @param client_index - opaque cookie to identify the sender
4612     @param context - sender context, to match reply w/ request
4613     @param collector_address - address of IPFIX collector
4614     @param collector_port - port of IPFIX IPFIX collector
4615     @param src_address - address of IPFIX exporter
4616     @param vrf_id - VRF / fib table ID
4617     @param path_mtu - Path MTU between exporter and collector
4618     @param template_interval - number of seconds after which to resend template
4619 */
4620 define ipfix_enable
4621 {
4622   u32 client_index;
4623   u32 context;
4624   u8 collector_address[16];
4625   u16 collector_port;
4626   u8 src_address[16];
4627   u32 vrf_id;
4628   u32 path_mtu;
4629   u32 template_interval;
4630 };
4631
4632 /** \brief Reply to IPFIX enable and configure request
4633     @param context - sender context which was passed in the request
4634 */
4635 define ipfix_enable_reply
4636 {
4637   u32 context;
4638   i32 retval;
4639 };
4640
4641 /** \brief IPFIX dump request
4642     @param client_index - opaque cookie to identify the sender
4643     @param context - sender context, to match reply w/ request
4644 */
4645 define ipfix_dump
4646 {
4647   u32 client_index;
4648   u32 context;
4649 };
4650
4651 /** \brief Reply to IPFIX dump request
4652     @param context - sender context which was passed in the request
4653     @param collector_address - address of IPFIX collector
4654     @param collector_port - port of IPFIX IPFIX collector
4655     @param src_address - address of IPFIX exporter
4656     @param fib_index - fib table index
4657     @param path_mtu - Path MTU between exporter and collector
4658     @param template_interval - number of seconds after which to resend template
4659 */
4660 define ipfix_details
4661 {
4662   u32 context;
4663   u8 collector_address[16];
4664   u16 collector_port;
4665   u8 src_address[16];
4666   u32 fib_index;
4667   u32 path_mtu;
4668   u32 template_interval;
4669 };
4670
4671 /** \brief Query relative index via node names
4672     @param client_index - opaque cookie to identify the sender
4673     @param context - sender context, to match reply w/ request
4674     @param node_name - name of node to find relative index from
4675     @param next_name - next node from node_name to find relative index of
4676 */
4677 define get_next_index
4678 {
4679   u32 client_index;
4680   u32 context;
4681   u8 node_name[64];
4682   u8 next_name[64];
4683 };
4684
4685 /** \brief Reply for get next node index
4686     @param context - sender context which was passed in the request
4687     @param retval - return value
4688     @param next_index - index of the next_node
4689 */
4690 define get_next_index_reply
4691 {
4692   u32 context;
4693   i32 retval;
4694   u32 next_index;
4695 };
4696
4697 /** \brief PacketGenerator create interface request
4698     @param client_index - opaque cookie to identify the sender
4699     @param context - sender context, to match reply w/ request
4700     @param interface_id - interface index
4701 */
4702 define pg_create_interface
4703 {
4704   u32 client_index;
4705   u32 context;
4706   u32 interface_id;
4707 };
4708
4709 /** \brief PacketGenerator create interface response
4710     @param context - sender context, to match reply w/ request
4711     @param retval - return value for request
4712 */
4713 define pg_create_interface_reply
4714 {
4715   u32 context;
4716   i32 retval;
4717   u32 sw_if_index;
4718 };
4719
4720 /** \brief PacketGenerator capture packets on given interface request
4721     @param client_index - opaque cookie to identify the sender
4722     @param context - sender context, to match reply w/ request
4723     @param interface_id - pg interface index
4724     @param is_enabled - 1 if enabling streams, 0 if disabling
4725     @param count - number of packets to be captured
4726     @param pcap_file - pacp file name to store captured packets
4727 */
4728 define pg_capture
4729 {
4730   u32 client_index;
4731   u32 context;
4732   u32 interface_id;
4733   u8 is_enabled;
4734   u32 count;
4735   u32 pcap_name_length;
4736   u8 pcap_file_name[pcap_name_length];
4737 };
4738
4739 /** \brief PacketGenerator capture packets response
4740     @param context - sender context, to match reply w/ request
4741     @param retval - return value for request
4742 */
4743 define pg_capture_reply
4744 {
4745   u32 context;
4746   i32 retval;
4747 };
4748
4749 /** \brief Enable / disable packet generator request
4750     @param client_index - opaque cookie to identify the sender
4751     @param context - sender context, to match reply w/ request
4752     @param is_enabled - 1 if enabling streams, 0 if disabling
4753     @param stream - stream name to be enable/disabled, if not specified handle all streams
4754 */
4755 define pg_enable_disable
4756 {
4757   u32 client_index;
4758   u32 context;
4759   u8 is_enabled;
4760   u32 stream_name_length;
4761   u8 stream_name[stream_name_length];
4762 };
4763
4764 /** \brief Reply for enable / disable packet generator
4765     @param context - returned sender context, to match reply w/ request
4766     @param retval - return code
4767 */
4768 define pg_enable_disable_reply
4769 {
4770   u32 context;
4771   i32 retval;
4772 };
4773
4774 /** \brief Configure IP source and L4 port-range check
4775     @param client_index - opaque cookie to identify the sender
4776     @param context - sender context, to match reply w/ request
4777     @param is_ip6 - 1 if source address type is IPv6
4778     @param is_add - 1 if add, 0 if delete
4779     @param mask_length - mask length for address entry
4780     @param address - array of address bytes
4781     @param number_of_ranges - length of low_port and high_port arrays (must match)
4782     @param low_ports[32] - up to 32 low end of port range entries (must have corresponding high_ports entry)
4783     @param high_ports[32] - up to 32 high end of port range entries (must have corresponding low_ports entry)
4784     @param vrf_id - fib table/vrf id to associate the source and port-range check with
4785     @note To specify a single port set low_port and high_port entry the same
4786 */
4787 define ip_source_and_port_range_check_add_del
4788 {
4789   u32 client_index;
4790   u32 context;
4791   u8 is_ipv6;
4792   u8 is_add;
4793   u8 mask_length;
4794   u8 address[16];
4795   u8 number_of_ranges;
4796   u16 low_ports[32];
4797   u16 high_ports[32];
4798   u32 vrf_id;
4799 };
4800
4801 /** \brief Configure IP source and L4 port-range check reply
4802     @param context - returned sender context, to match reply w/ request
4803     @param retval - return code
4804 */
4805 define ip_source_and_port_range_check_add_del_reply
4806 {
4807   u32 context;
4808   i32 retval;
4809 };
4810
4811 /** \brief Set interface source and L4 port-range request
4812     @param client_index - opaque cookie to identify the sender
4813     @param context - sender context, to match reply w/ request
4814     @param interface_id - interface index
4815     @param tcp_vrf_id - VRF associated with source and TCP port-range check
4816     @param udp_vrf_id - VRF associated with source and TCP port-range check
4817 */
4818 define ip_source_and_port_range_check_interface_add_del
4819 {
4820   u32 client_index;
4821   u32 context;
4822   u8 is_add;
4823   u32 sw_if_index;
4824   u32 tcp_in_vrf_id;
4825   u32 tcp_out_vrf_id;
4826   u32 udp_in_vrf_id;
4827   u32 udp_out_vrf_id;
4828 };
4829
4830 /** \brief Set interface source and L4 port-range response
4831     @param context - sender context, to match reply w/ request
4832     @param retval - return value for request
4833 */
4834 define ip_source_and_port_range_check_interface_add_del_reply
4835 {
4836   u32 context;
4837   i32 retval;
4838 };
4839
4840 /** \brief Add / del ipsec gre tunnel request
4841     @param client_index - opaque cookie to identify the sender
4842     @param context - sender context, to match reply w/ request
4843     @param local_sa_id - local SA id
4844     @param remote_sa_id - remote SA id
4845     @param is_add - 1 if adding the tunnel, 0 if deleting
4846     @param src_address - tunnel source address
4847     @param dst_address - tunnel destination address
4848 */
4849 define ipsec_gre_add_del_tunnel {
4850     u32 client_index;
4851     u32 context;
4852     u32 local_sa_id;
4853     u32 remote_sa_id;
4854     u8 is_add;
4855     u8 src_address[4];
4856     u8 dst_address[4];
4857 };
4858
4859 /** \brief Reply for add / del ipsec gre tunnel request
4860     @param context - returned sender context, to match reply w/ request
4861     @param retval - return code
4862     @param sw_if_index - software index of the new ipsec gre tunnel
4863 */
4864 define ipsec_gre_add_del_tunnel_reply {
4865     u32 context;
4866     i32 retval;
4867     u32 sw_if_index;
4868 };
4869
4870 /** \brief Dump ipsec gre tunnel table
4871     @param client_index - opaque cookie to identify the sender
4872     @param context - sender context, to match reply w/ request
4873     @param tunnel_index - gre tunnel identifier or -1 in case of all tunnels
4874 */
4875 define ipsec_gre_tunnel_dump {
4876     u32 client_index;
4877     u32 context;
4878     u32 sw_if_index;
4879 };
4880
4881 /** \brief mpls gre tunnel operational state response
4882     @param context - returned sender context, to match reply w/ request
4883     @param sw_if_index - software index of the ipsec gre tunnel
4884     @param local_sa_id - local SA id
4885     @param remote_sa_id - remote SA id
4886     @param src_address - tunnel source address
4887     @param dst_address - tunnel destination address
4888 */
4889 define ipsec_gre_tunnel_details {
4890     u32 context;
4891     u32 sw_if_index;
4892     u32 local_sa_id;
4893     u32 remote_sa_id;
4894     u8 src_address[4];
4895     u8 dst_address[4];
4896 };
4897
4898 /** \brief Delete sub interface request
4899     @param client_index - opaque cookie to identify the sender
4900     @param context - sender context, to match reply w/ request
4901     @param sw_if_index - sw index of the interface that was created by create_subif
4902 */
4903 define delete_subif {
4904   u32 client_index;
4905   u32 context;
4906   u32 sw_if_index;
4907 };
4908
4909 /** \brief Delete sub interface response
4910     @param context - sender context, to match reply w/ request
4911     @param retval - return code for the request
4912 */
4913 define delete_subif_reply {
4914   u32 context;
4915   i32 retval;
4916 };