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