9c173653b1de15ebd30cfe5a9b8ebbcc2015b019
[vpp.git] / vpp / vpp-api / vpe.api
1 /*
2  * Copyright (c) 2015-2016 Cisco and/or its affiliates.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at:
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15
16 /** \file
17
18     This file defines vpe control-plane API messages which are generally
19     called through a shared memory interface. 
20 */
21
22 /* 
23  * Note: API placement cleanup in progress
24  * If you're looking for interface APIs, please
25  * see .../vnet/vnet/{interface.api,interface_api.c}
26  * IP APIs: see .../vnet/vnet/ip/{ip.api, ip_api.c}
27  * TAP APIs: see .../vnet/vnet/unix/{tap.api, tap_api.c}
28  * VXLAN APIs: see .../vnet/vnet/vxlan/{vxlan.api, vxlan_api.c}
29  * AF-PACKET APIs: ... see /vnet/devices/af_packet/{af_packet.api, af_packet_api.c}
30  * NETMAP APIs: see ... /vnet/vnet/devices/netmap/{netmap.api, netmap_api.c}
31  * VHOST-USER APIs: see .../vnet/devices/virtio/{vhost_user.api, vhost_user_api.c}
32  * VXLAN GPE APIs: see .../vnet/vnet/vxlan-gpe/{vxlan_gpe.api, vxlan_gpe_api.c}
33  * GRE APIs: see .../vnet/vnet/gre/{gre.api, gre_api.c}
34  * L2TP APIs: see .../vnet/vnet/l2tp/{l2tp.api, l2tp_api.c}
35  * BFD APIs: see .../vnet/vnet/bfd/{bfd.api, bfd_api.c}
36  * IPSEC APIs: see .../vnet/vnet/ipsec/{ipsec.api, ipsec_api.c}
37  * IPSEC-GRE APIs: see .../vnet/vnet/ipsec-gre/{ipsec_gre.api, ipsec_gre_api.c}
38  * LISP APIs: see .../vnet/vnet/lisp/{lisp.api, lisp_api.c}
39  */
40
41 /** \brief Create a new subinterface with the given vlan id
42     @param client_index - opaque cookie to identify the sender
43     @param context - sender context, to match reply w/ request
44     @param sw_if_index - software index of the new vlan's parent interface
45     @param vlan_id - vlan tag of the new interface
46 */
47 define create_vlan_subif
48 {
49   u32 client_index;
50   u32 context;
51   u32 sw_if_index;
52   u32 vlan_id;
53 };
54
55 /** \brief Reply for the vlan subinterface create request
56     @param context - returned sender context, to match reply w/ request
57     @param retval - return code
58     @param sw_if_index - software index allocated for the new subinterface
59 */
60 define create_vlan_subif_reply
61 {
62   u32 context;
63   i32 retval;
64   u32 sw_if_index;
65 };
66
67 /** \brief Enable or Disable MPLS on and interface
68     @param client_index - opaque cookie to identify the sender
69     @param context - sender context, to match reply w/ request
70     @param sw_if_index - index of the interface
71     @param enable - if non-zero enable, else disable
72 */
73 define sw_interface_set_mpls_enable
74 {
75   u32 client_index;
76   u32 context;
77   u32 sw_if_index;
78   u8 enable;
79 };
80
81 /** \brief Reply for MPLS state on an interface
82     @param context - returned sender context, to match reply w/ request
83     @param retval - return code
84 */
85 define sw_interface_set_mpls_enable_reply
86 {
87   u32 context;
88   i32 retval;
89 };
90
91 /** \brief MPLS Route Add / del route
92     @param client_index - opaque cookie to identify the sender
93     @param context - sender context, to match reply w/ request
94     @param mr_label - The MPLS label value
95     @param mr_eos - The End of stack bit
96     @param mr_table_id - The MPLS table-id the route is added in
97     @param mr_classify_table_index - If this is a classify route, 
98                                      this is the classify table index
99     @param  mr_create_table_if_needed - If the MPLS or IP tables do not exist,
100                                         create them
101     @param mr_is_add - Is this a route add or delete
102     @param mr_is_classify - Is this route result a classify
103     @param mr_is_multipath - Is this route update a multipath - i.e. is this
104                              a path addition to an existing route
105     @param mr_is_resolve_host - Recurse resolution constraint via a host prefix
106     @param mr_is_resolve_attached - Recurse resolution constraint via attached prefix
107     @param mr_next_hop_proto_is_ip4 - The next-hop is IPV4
108     @param mr_next_hop_weight - The weight, for UCMP
109     @param mr_next_hop[16] - the nextop address
110     @param mr_next_hop_sw_if_index - the next-hop SW interface
111     @param mr_next_hop_table_id - the next-hop table-id (if appropriate)
112     @param mr_next_hop_n_out_labels - the number of labels in the label stack
113     @param mr_next_hop_out_label_stack - the next-hop output label stack, outer most first
114     @param next_hop_via_label - The next-hop is a resolved via a local label
115 */
116 define mpls_route_add_del
117 {
118   u32 client_index;
119   u32 context;
120   u32 mr_label;
121   u8 mr_eos;
122   u32 mr_table_id;
123   u32 mr_classify_table_index;
124   u8 mr_create_table_if_needed;
125   u8 mr_is_add;
126   u8 mr_is_classify;
127   u8 mr_is_multipath;
128   u8 mr_is_resolve_host;
129   u8 mr_is_resolve_attached;
130   u8 mr_next_hop_proto_is_ip4;
131   u8 mr_next_hop_weight;
132   u8 mr_next_hop[16];
133   u8 mr_next_hop_n_out_labels;
134   u32 mr_next_hop_sw_if_index;
135   u32 mr_next_hop_table_id;
136   u32 mr_next_hop_via_label;
137   u32 mr_next_hop_out_label_stack[mr_next_hop_n_out_labels];
138 };
139
140 /** \brief Reply for MPLS route add / del request
141     @param context - returned sender context, to match reply w/ request
142     @param retval - return code
143 */
144 define mpls_route_add_del_reply
145 {
146   u32 context;
147   i32 retval;
148 };
149
150 /** \brief Dump MPLS fib table
151     @param client_index - opaque cookie to identify the sender
152 */
153 define mpls_fib_dump
154 {
155   u32 client_index;
156   u32 context;
157 };
158
159 /** \brief FIB path
160     @param sw_if_index - index of the interface
161     @param weight - The weight, for UCMP
162     @param is_local - local if non-zero, else remote
163     @param is_drop - Drop the packet
164     @param is_unreach - Drop the packet and rate limit send ICMP unreachable
165     @param is_prohibit - Drop the packet and rate limit send ICMP prohibited
166     @param afi - the afi of the next hop, IP46_TYPE_IP4=1, IP46_TYPE_IP6=2
167     @param next_hop[16] - the next hop address
168
169     WARNING: this type is replicated, pending cleanup completion
170
171 */
172 typeonly manual_print manual_endian define fib_path2
173 {
174   u32 sw_if_index;
175   u32 weight;
176   u8 is_local;
177   u8 is_drop;
178   u8 is_unreach;
179   u8 is_prohibit;
180   u8 afi;
181   u8 next_hop[16];
182 };
183
184 /** \brief mpls FIB table response
185     @param table_id - MPLS fib table id
186     @param s_bit - End-of-stack bit
187     @param label - MPLS label value
188     @param count - the number of fib_path in path
189     @param path  - array of of fib_path structures
190 */
191 manual_endian manual_print define mpls_fib_details
192 {
193   u32 context;
194   u32 table_id;
195   u8  eos_bit;
196   u32 label;
197   u32 count;
198   vl_api_fib_path2_t path[count];
199 };
200
201 /** \brief Bind/Unbind an MPLS local label to an IP prefix. i.e. create
202            a per-prefix label entry.
203     @param client_index - opaque cookie to identify the sender
204     @param context - sender context, to match reply w/ request
205     @param mb_mpls_table_id - The MPLS table-id the MPLS entry will be added in
206     @param mb_label - The MPLS label value to bind
207     @param mb_ip_table_id - The IP table-id of the IP prefix to bind to.
208     @param mb_create_table_if_needed - Create either/both tables if required.
209     @param mb_is_bind - Bind or unbind
210     @param mb_is_ip4 - The prefix to bind to is IPv4
211     @param mb_address_length - Length of IP prefix
212     @param mb_address[16] - IP prefix/
213 */
214 define mpls_ip_bind_unbind
215 {
216   u32 client_index;
217   u32 context;
218   u32 mb_mpls_table_id;
219   u32 mb_label;
220   u32 mb_ip_table_id;
221   u8 mb_create_table_if_needed;
222   u8 mb_is_bind;
223   u8 mb_is_ip4;
224   u8 mb_address_length;
225   u8 mb_address[16];
226 };
227
228 /** \brief Reply for MPLS IP bind/unbind request
229     @param context - returned sender context, to match reply w/ request
230     @param retval - return code
231 */
232 define mpls_ip_bind_unbind_reply
233 {
234   u32 context;
235   i32 retval;
236 };
237
238 /** \brief MPLS tunnel Add / del route
239     @param client_index - opaque cookie to identify the sender
240     @param context - sender context, to match reply w/ request
241     @param mt_is_add - Is this a route add or delete
242     @param mt_sw_if_index - The SW interface index of the tunnel to delete
243     @param mt_next_hop_proto_is_ip4 - The next-hop is IPV4
244     @param mt_next_hop_weight - The weight, for UCMP
245     @param mt_next_hop[16] - the nextop address
246     @param mt_next_hop_sw_if_index - the next-hop SW interface
247     @param mt_next_hop_table_id - the next-hop table-id (if appropriate)
248     @param mt_next_hop_n_out_labels - the number of next-hop output labels
249     @param mt_next_hop_out_label_stack - the next-hop output label stack,  outer most first
250 */
251 define mpls_tunnel_add_del
252 {
253   u32 client_index;
254   u32 context;
255   u32 mt_sw_if_index;
256   u8 mt_is_add;
257   u8 mt_l2_only;
258   u8 mt_next_hop_proto_is_ip4;
259   u8 mt_next_hop_weight;
260   u8 mt_next_hop[16];
261   u8 mt_next_hop_n_out_labels;
262   u32 mt_next_hop_sw_if_index;
263   u32 mt_next_hop_table_id;
264   u32 mt_next_hop_out_label_stack[mt_next_hop_n_out_labels];
265 };
266
267 /** \brief Reply for MPLS tunnel add / del request
268     @param context - returned sender context, to match reply w/ request
269     @param retval - return code
270     @param sw_if_index - SW interface index of the tunnel created
271 */
272 define mpls_tunnel_add_del_reply
273 {
274   u32 context;
275   i32 retval;
276   u32 sw_if_index;
277 };
278
279 /** \brief Dump mpls eth tunnel table
280     @param client_index - opaque cookie to identify the sender
281     @param tunnel_index - eth tunnel identifier or -1 in case of all tunnels
282 */
283 define mpls_tunnel_dump
284 {
285   u32 client_index;
286   u32 context;
287   i32 tunnel_index;
288 };
289
290 /** \brief mpls eth tunnel operational state response
291     @param tunnel_index - eth tunnel identifier
292     @param intfc_address - interface ipv4 addr
293     @param mask_width - interface ipv4 addr mask
294     @param hw_if_index - interface id
295     @param l2_only -
296     @param tunnel_dst_mac -
297     @param tx_sw_if_index -
298     @param encap_index - reference to mpls label table
299     @param nlabels - number of resolved labels
300     @param labels - resolved labels
301 */
302 define mpls_tunnel_details
303 {
304   u32 context;
305   u32 tunnel_index;
306   u8 mt_l2_only;
307   u8 mt_sw_if_index;
308   u8 mt_next_hop_proto_is_ip4;
309   u8 mt_next_hop[16];
310   u32 mt_next_hop_sw_if_index;
311   u32 mt_next_hop_table_id;
312   u32 mt_next_hop_n_labels;
313   u32 mt_next_hop_out_labels[mt_next_hop_n_labels];
314 };
315
316 /** \brief Proxy ARP add / del request
317     @param client_index - opaque cookie to identify the sender
318     @param context - sender context, to match reply w/ request
319     @param vrf_id - VRF / Fib table ID
320     @param is_add - 1 if adding the Proxy ARP range, 0 if deleting
321     @param low_address[4] - Low address of the Proxy ARP range
322     @param hi_address[4] - High address of the Proxy ARP range
323 */
324 define proxy_arp_add_del
325 {
326   u32 client_index;
327   u32 context;
328   u32 vrf_id;
329   u8 is_add;
330   u8 low_address[4];
331   u8 hi_address[4];
332 };
333
334 /** \brief Reply for proxy arp add / del request
335     @param context - returned sender context, to match reply w/ request
336     @param retval - return code
337 */
338 define proxy_arp_add_del_reply
339 {
340   u32 context;
341   i32 retval;
342 };
343
344 /** \brief Proxy ARP add / del request
345     @param client_index - opaque cookie to identify the sender
346     @param context - sender context, to match reply w/ request
347     @param sw_if_index - Which interface to enable / disable Proxy Arp on
348     @param enable_disable - 1 to enable Proxy ARP on interface, 0 to disable
349 */
350 define proxy_arp_intfc_enable_disable
351 {
352   u32 client_index;
353   u32 context;
354   u32 sw_if_index;
355   /* 1 = on, 0 = off */
356   u8 enable_disable;
357 };
358
359 /** \brief Reply for Proxy ARP interface enable / disable request
360     @param context - returned sender context, to match reply w/ request
361     @param retval - return code
362 */
363 define proxy_arp_intfc_enable_disable_reply
364 {
365   u32 context;
366   i32 retval;
367 };
368
369 /** \brief Reset VRF (remove all routes etc) request
370     @param client_index - opaque cookie to identify the sender
371     @param context - sender context, to match reply w/ request
372     @param is_ipv6 - 1 for IPv6 neighbor, 0 for IPv4
373     @param vrf_id - ID of th FIB table / VRF to reset
374 */
375 define reset_vrf
376 {
377   u32 client_index;
378   u32 context;
379   u8 is_ipv6;
380   u32 vrf_id;
381 };
382
383 /** \brief Reply for Reset VRF request
384     @param context - returned sender context, to match reply w/ request
385     @param retval - return code
386 */
387 define reset_vrf_reply
388 {
389   u32 context;
390   i32 retval;
391 };
392
393 /** \brief Is Address Reachable request - DISABLED
394     @param client_index - opaque cookie to identify the sender
395     @param context - sender context, to match reply w/ request
396     @param next_hop_sw_if_index - index of interface used to get to next hop
397     @param is_ipv6 - 1 for IPv6, 0 for IPv4
398     @param is_error - address not found or does not match intf
399     @param address[] - Address in question 
400 */
401 define is_address_reachable
402 {
403   u32 client_index;             /* (api_main_t *) am->my_client_index */
404   u32 context;
405   u32 next_hop_sw_if_index;
406   u8 is_known;                  /* on reply, this is the answer */
407   u8 is_ipv6;
408   u8 is_error;                  /* address not found or does not match intf */
409   u8 address[16];
410 };
411
412 /** \brief Want Stats, register for stats updates
413     @param client_index - opaque cookie to identify the sender
414     @param context - sender context, to match reply w/ request
415     @param enable_disable - 1 = enable stats, 0 = disable
416     @param pid - pid of process requesting stats updates
417 */
418 define want_stats
419 {
420   u32 client_index;
421   u32 context;
422   u32 enable_disable;
423   u32 pid;
424 };
425
426 /** \brief Reply for Want Stats request
427     @param context - returned sender context, to match reply w/ request
428     @param retval - return code
429 */
430 define want_stats_reply
431 {
432   u32 context;
433   i32 retval;
434 };
435
436 typeonly manual_print manual_endian define ip4_fib_counter
437 {
438   u32 address;
439   u8 address_length;
440   u64 packets;
441   u64 bytes;
442 };
443
444 manual_print manual_endian define vnet_ip4_fib_counters
445 {
446   u32 vrf_id;
447   u32 count;
448   vl_api_ip4_fib_counter_t c[count];
449 };
450
451 typeonly manual_print manual_endian define ip6_fib_counter
452 {
453   u64 address[2];
454   u8 address_length;
455   u64 packets;
456   u64 bytes;
457 };
458
459 manual_print manual_endian define vnet_ip6_fib_counters
460 {
461   u32 vrf_id;
462   u32 count;
463   vl_api_ip6_fib_counter_t c[count];
464 };
465
466 /** \brief Request for a single block of summary stats
467     @param client_index - opaque cookie to identify the sender
468     @param context - sender context, to match reply w/ request
469 */
470 define vnet_get_summary_stats
471 {
472   u32 client_index;
473   u32 context;
474 };
475
476 /** \brief Reply for vnet_get_summary_stats request
477     @param context - sender context, to match reply w/ request
478     @param retval - return code for request
479     @param total_pkts -  
480     @param total_bytes -
481     @param vector_rate - 
482 */
483 define vnet_summary_stats_reply
484 {
485   u32 context;
486   i32 retval;
487   u64 total_pkts[2];
488   u64 total_bytes[2];
489   f64 vector_rate;
490 };
491
492 /** \brief OAM event structure
493     @param dst_address[] - 
494     @param state
495 */
496 define oam_event
497 {
498   u8 dst_address[4];
499   u8 state;
500 };
501
502 /** \brief Want OAM events request
503     @param client_index - opaque cookie to identify the sender
504     @param context - sender context, to match reply w/ request
505     @param enable_disable- enable if non-zero, else disable
506     @param pid - pid of the requesting process
507 */
508 define want_oam_events
509 {
510   u32 client_index;
511   u32 context;
512   u32 enable_disable;
513   u32 pid;
514 };
515
516 /** \brief Want OAM events response
517     @param context - sender context, to match reply w/ request
518     @param retval - return code for the want oam stats request
519 */
520 define want_oam_events_reply
521 {
522   u32 context;
523   i32 retval;
524 };
525
526 /** \brief OAM add / del target request
527     @param client_index - opaque cookie to identify the sender
528     @param context - sender context, to match reply w/ request
529     @param vrf_id - vrf_id of the target
530     @param src_address[] - source address to use for the updates 
531     @param dst_address[] - destination address of the target
532     @param is_add - add target if non-zero, else delete
533 */
534 define oam_add_del
535 {
536   u32 client_index;
537   u32 context;
538   u32 vrf_id;
539   u8 src_address[4];
540   u8 dst_address[4];
541   u8 is_add;
542 };
543
544 /** \brief OAM add / del target response
545     @param context - sender context, to match reply w/ request
546     @param retval - return code of the request
547 */
548 define oam_add_del_reply
549 {
550   u32 context;
551   i32 retval;
552 };
553
554 /** \brief Reset fib table request
555     @param client_index - opaque cookie to identify the sender
556     @param context - sender context, to match reply w/ request
557     @param vrf_id - vrf/table id of the fib table to reset
558     @param is_ipv6 - an ipv6 fib to reset if non-zero, else ipv4
559 */
560 define reset_fib
561 {
562   u32 client_index;
563   u32 context;
564   u32 vrf_id;
565   u8 is_ipv6;
566 };
567
568 /** \brief Reset fib response
569     @param context - sender context, to match reply w/ request
570     @param retval - return code for the reset bfib request
571 */
572 define reset_fib_reply
573 {
574   u32 context;
575   i32 retval;
576 };
577
578 /** \brief DHCP Proxy config add / del request
579     @param client_index - opaque cookie to identify the sender
580     @param context - sender context, to match reply w/ request
581     @param vrf_id - vrf id
582     @param if_ipv6 - ipv6 if non-zero, else ipv4
583     @param is_add - add the config if non-zero, else delete
584     @param insert_circuit_id - option82 suboption 1 fib number
585     @param dhcp_server[] - server address
586     @param dhcp_src_address[] - <fix this, need details>
587 */
588 define dhcp_proxy_config
589 {
590   u32 client_index;
591   u32 context;
592   u32 vrf_id;
593   u8 is_ipv6;
594   u8 is_add;
595   u8 insert_circuit_id;
596   u8 dhcp_server[16];
597   u8 dhcp_src_address[16];
598 };
599
600 /** \brief DHCP Proxy config response
601     @param context - sender context, to match reply w/ request
602     @param retval - return code for the request
603 */
604 define dhcp_proxy_config_reply
605 {
606   u32 context;
607   i32 retval;
608 };
609
610 /** \brief DHCP Proxy set / unset vss request
611     @param client_index - opaque cookie to identify the sender
612     @param context - sender context, to match reply w/ request
613     @param tbl_id - table id
614     @param oui - first part of vpn id
615     @param fib_id - second part of vpn id
616     @param is_ipv6 - ip6 if non-zero, else ip4
617     @param is_add - set vss if non-zero, else delete
618 */
619 define dhcp_proxy_set_vss
620 {
621   u32 client_index;
622   u32 context;
623   u32 tbl_id;
624   u32 oui;
625   u32 fib_id;
626   u8 is_ipv6;
627   u8 is_add;
628 };
629
630 /** \brief DHCP proxy set / unset vss response
631     @param context - sender context, to match reply w/ request
632     @param retval - return code for the request
633 */
634 define dhcp_proxy_set_vss_reply
635 {
636   u32 context;
637   i32 retval;
638 };
639
640 /** \brief Create loopback interface request
641     @param client_index - opaque cookie to identify the sender
642     @param context - sender context, to match reply w/ request
643     @param mac_address - mac addr to assign to the interface if none-zero
644 */
645 define create_loopback
646 {
647   u32 client_index;
648   u32 context;
649   u8 mac_address[6];
650 };
651
652 /** \brief Create loopback interface response
653     @param context - sender context, to match reply w/ request
654     @param sw_if_index - sw index of the interface that was created
655     @param retval - return code for the request
656 */
657 define create_loopback_reply
658 {
659   u32 context;
660   i32 retval;
661   u32 sw_if_index;
662 };
663
664 /** \brief Delete loopback interface request
665     @param client_index - opaque cookie to identify the sender
666     @param context - sender context, to match reply w/ request
667     @param sw_if_index - sw index of the interface that was created
668 */
669 define delete_loopback
670 {
671   u32 client_index;
672   u32 context;
673   u32 sw_if_index;
674 };
675
676 /** \brief Delete loopback interface response
677     @param context - sender context, to match reply w/ request
678     @param retval - return code for the request
679 */
680 define delete_loopback_reply
681 {
682   u32 context;
683   i32 retval;
684 };
685
686 /** \brief Control ping from client to api server request
687     @param client_index - opaque cookie to identify the sender
688     @param context - sender context, to match reply w/ request
689 */
690 define control_ping
691 {
692   u32 client_index;
693   u32 context;
694 };
695
696 /** \brief Control ping from the client to the server response
697     @param client_index - opaque cookie to identify the sender
698     @param context - sender context, to match reply w/ request
699     @param retval - return code for the request
700     @param vpe_pid - the pid of the vpe, returned by the server
701 */
702 define control_ping_reply
703 {
704   u32 context;
705   i32 retval;
706   u32 client_index;
707   u32 vpe_pid;
708 };
709
710 /** \brief Process a vpe parser cli string request
711     @param client_index - opaque cookie to identify the sender
712     @param context - sender context, to match reply w/ request
713     @param cmd_in_shmem - pointer to cli command string
714 */
715 define cli_request
716 {
717   u32 client_index;
718   u32 context;
719   u64 cmd_in_shmem;
720 };
721 define cli_inband
722 {
723   u32 client_index;
724   u32 context;
725   u32 length;
726   u8 cmd[length];
727 };
728
729 /** \brief vpe parser cli string response
730     @param context - sender context, to match reply w/ request
731     @param retval - return code for request
732     @param reply_in_shmem - Reply string from cli processing if any
733 */
734 define cli_reply
735 {
736   u32 context;
737   i32 retval;
738   u64 reply_in_shmem;
739 };
740 define cli_inband_reply
741 {
742   u32 context;
743   i32 retval;
744   u32 length;
745   u8 reply[length];
746 };
747
748 /** \brief Set max allowed ARP or ip6 neighbor entries request
749     @param client_index - opaque cookie to identify the sender
750     @param context - sender context, to match reply w/ request
751     @param is_ipv6 - neighbor limit if non-zero, else ARP limit
752     @param arp_neighbor_limit - the new limit, defaults are ~ 50k
753 */
754 define set_arp_neighbor_limit
755 {
756   u32 client_index;
757   u32 context;
758   u8 is_ipv6;
759   u32 arp_neighbor_limit;
760 };
761
762 /** \brief Set max allowed ARP or ip6 neighbor entries response
763     @param context - sender context, to match reply w/ request
764     @param retval - return code for request
765 */
766 define set_arp_neighbor_limit_reply
767 {
768   u32 context;
769   i32 retval;
770 };
771
772 /** \brief L2 interface patch add / del request
773     @param client_index - opaque cookie to identify the sender
774     @param context - sender context, to match reply w/ request
775     @param rx_sw_if_index - receive side interface 
776     @param tx_sw_if_index - transmit side interface
777     @param is_add - if non-zero set up the interface patch, else remove it
778 */
779 define l2_patch_add_del
780 {
781   u32 client_index;
782   u32 context;
783   u32 rx_sw_if_index;
784   u32 tx_sw_if_index;
785   u8 is_add;
786 };
787
788 /** \brief L2 interface patch add / del response
789     @param context - sender context, to match reply w/ request
790     @param retval - return code for the request
791 */
792 define l2_patch_add_del_reply
793 {
794   u32 context;
795   i32 retval;
796 };
797
798 /** \brief IPv6 segment routing tunnel add / del request
799     @param client_index - opaque cookie to identify the sender
800     @param context - sender context, to match reply w/ request
801     @param is_add - add the tunnel if non-zero, else delete it
802     @param name[] - tunnel name (len. 64)
803     @param src_address[] -
804     @param dst_address[] -
805     @param dst_mask_width -
806     @param inner_vrf_id -
807     @param outer_vrf_id -
808     @param flags_net_byte_order -
809     @param n_segments -
810     @param n_tags -
811     @param segs_and_tags[] -
812     @param policy_name[] - name of policy to associate this tunnel to (len. 64)
813 */
814 define sr_tunnel_add_del
815 {
816   u32 client_index;
817   u32 context;
818   u8 is_add;
819   u8 name[64];
820   u8 src_address[16];
821   u8 dst_address[16];
822   u8 dst_mask_width;
823   u32 inner_vrf_id;
824   u32 outer_vrf_id;
825   u16 flags_net_byte_order;
826   u8 n_segments;
827   u8 n_tags;
828   u8 policy_name[64];
829   u8 segs_and_tags[0];
830 };
831
832 /** \brief IPv6 segment routing tunnel add / del response
833     @param context - sender context, to match reply w/ request
834     @param retval - return value for request
835 */
836 define sr_tunnel_add_del_reply
837 {
838   u32 context;
839   i32 retval;
840 };
841
842 /** \brief IPv6 segment routing policy add / del request
843     @param client_index - opaque cookie to identify the sender
844     @param context - sender context, to match reply w/ request
845     @param is_add - add the tunnel if non-zero, else delete it
846     @param name[] - policy name (len. 64)
847     @param tunnel_names[] -
848 */
849 define sr_policy_add_del
850 {
851   u32 client_index;
852   u32 context;
853   u8 is_add;
854   u8 name[64];
855   u8 tunnel_names[0];
856 };
857
858 /** \brief IPv6 segment routing policy add / del response
859     @param context - sender context, to match reply w/ request
860     @param retval - return value for request
861 */
862 define sr_policy_add_del_reply
863 {
864   u32 context;
865   i32 retval;
866 };
867
868 /** \brief IPv6 segment routing multicast map to policy add / del request
869     @param client_index - opaque cookie to identify the sender
870     @param context - sender context, to match reply w/ request
871     @param is_add - add the tunnel if non-zero, else delete it
872     @param multicast_address[] - IP6 multicast address
873     @param policy_name[] = policy name (len.64)
874 */
875 define sr_multicast_map_add_del
876 {
877   u32 client_index;
878   u32 context;
879   u8 is_add;
880   u8 multicast_address[16];
881   u8 policy_name[64];
882 };
883
884 /** \brief IPv6 segment routing multicast map to policy add / del response
885     @param context - sender context, to match reply w/ request
886     @param retval - return value for request
887 */
888 define sr_multicast_map_add_del_reply
889 {
890   u32 context;
891   i32 retval;
892 };
893
894 /** \brief Interface set vpath request
895     @param client_index - opaque cookie to identify the sender
896     @param context - sender context, to match reply w/ request
897     @param sw_if_index - interface used to reach neighbor
898     @param enable - if non-zero enable, else disable
899 */
900 define sw_interface_set_vpath
901 {
902   u32 client_index;
903   u32 context;
904   u32 sw_if_index;
905   u8 enable;
906 };
907
908 /** \brief Interface set vpath response
909     @param context - sender context, to match reply w/ request
910     @param retval - return code for the request
911 */
912 define sw_interface_set_vpath_reply
913 {
914   u32 context;
915   i32 retval;
916 };
917
918 /** \brief Set L2 XConnect between two interfaces request
919     @param client_index - opaque cookie to identify the sender
920     @param context - sender context, to match reply w/ request
921     @param rx_sw_if_index - Receive interface index
922     @param tx_sw_if_index - Transmit interface index
923     @param enable - enable xconnect if not 0, else set to L3 mode
924 */
925 define sw_interface_set_l2_xconnect
926 {
927   u32 client_index;
928   u32 context;
929   u32 rx_sw_if_index;
930   u32 tx_sw_if_index;
931   u8 enable;
932 };
933
934 /** \brief Set L2 XConnect response
935     @param context - sender context, to match reply w/ request
936     @param retval - L2 XConnect request return code
937 */
938 define sw_interface_set_l2_xconnect_reply
939 {
940   u32 context;
941   i32 retval;
942 };
943
944 /** \brief Interface bridge mode request
945     @param client_index - opaque cookie to identify the sender
946     @param context - sender context, to match reply w/ request
947     @param rx_sw_if_index - the interface
948     @param bd_id - bridge domain id
949     @param bvi - Setup interface as a bvi, bridge mode only
950     @param shg - Shared horizon group, for bridge mode only
951     @param enable - Enable beige mode if not 0, else set to L3 mode
952 */
953 define sw_interface_set_l2_bridge
954 {
955   u32 client_index;
956   u32 context;
957   u32 rx_sw_if_index;
958   u32 bd_id;
959   u8 shg;
960   u8 bvi;
961   u8 enable;
962 };
963
964 /** \brief Interface bridge mode response
965     @param context - sender context, to match reply w/ request
966     @param retval - Bridge mode request return code
967 */
968 define sw_interface_set_l2_bridge_reply
969 {
970   u32 context;
971   i32 retval;
972 };
973
974 /** \brief L2 FIB add entry request
975     @param client_index - opaque cookie to identify the sender
976     @param context - sender context, to match reply w/ request
977     @param mac - the entry's mac address
978     @param bd_id - the entry's bridge domain id
979     @param sw_if_index - the interface
980     @param is_add - If non zero add the entry, else delete it
981     @param static_mac - 
982     @param filter_mac -
983 */
984 define l2fib_add_del
985 {
986   u32 client_index;
987   u32 context;
988   u64 mac;
989   u32 bd_id;
990   u32 sw_if_index;
991   u8 is_add;
992   u8 static_mac;
993   u8 filter_mac;
994   u8 bvi_mac;
995 };
996
997 /** \brief L2 FIB add entry response
998     @param context - sender context, to match reply w/ request
999     @param retval - return code for the add l2fib entry request
1000 */
1001 define l2fib_add_del_reply
1002 {
1003   u32 context;
1004   i32 retval;
1005 };
1006
1007 /** \brief Set L2 flags request !!! TODO - need more info, feature bits in l2_input.h
1008     @param client_index - opaque cookie to identify the sender
1009     @param context - sender context, to match reply w/ request
1010     @param sw_if_index - interface 
1011     @param is_set - if non-zero, set the bits, else clear them
1012     @param feature_bitmap - non-zero bits to set or clear
1013 */
1014 define l2_flags
1015 {
1016   u32 client_index;
1017   u32 context;
1018   u32 sw_if_index;
1019   u8 is_set;
1020   u32 feature_bitmap;
1021 };
1022
1023 /** \brief Set L2 bits response
1024     @param context - sender context, to match reply w/ request
1025     @param retval - return code for the set l2 bits request
1026 */
1027 define l2_flags_reply
1028 {
1029   u32 context;
1030   i32 retval;
1031   u32 resulting_feature_bitmap;
1032 };
1033
1034 /** \brief Set bridge flags (such as L2_LEARN, L2_FWD, L2_FLOOD, 
1035     L2_UU_FLOOD, or L2_ARP_TERM) request
1036     @param client_index - opaque cookie to identify the sender
1037     @param context - sender context, to match reply w/ request
1038     @param bd_id - the bridge domain to set the flags for
1039     @param is_set - if non-zero, set the flags, else clear them
1040     @param feature_bitmap - bits that are non-zero to set or clear
1041 */
1042 define bridge_flags
1043 {
1044   u32 client_index;
1045   u32 context;
1046   u32 bd_id;
1047   u8 is_set;
1048   u32 feature_bitmap;
1049 };
1050
1051 /** \brief Set bridge flags response
1052     @param context - sender context, to match reply w/ request
1053     @param retval - return code for the set bridge flags request
1054     @param resulting_feature_bitmap - the feature bitmap value after the request is implemented
1055 */
1056 define bridge_flags_reply
1057 {
1058   u32 context;
1059   i32 retval;
1060   u32 resulting_feature_bitmap;
1061 };
1062
1063 /** \brief Set bridge domain ip to mac entry request
1064     @param client_index - opaque cookie to identify the sender
1065     @param context - sender context, to match reply w/ request
1066     @param bd_id - the bridge domain to set the flags for
1067     @param is_add - if non-zero, add the entry, else clear it
1068     @param is_ipv6 - if non-zero, ipv6 address, else ipv4 address
1069     @param mac_address - MAC address
1070     @param 
1071 */
1072 define bd_ip_mac_add_del
1073 {
1074   u32 client_index;
1075   u32 context;
1076   u32 bd_id;
1077   u8 is_add;
1078   u8 is_ipv6;
1079   u8 ip_address[16];
1080   u8 mac_address[6];
1081 };
1082
1083 /** \brief Set bridge domain ip to mac entry response
1084     @param context - sender context, to match reply w/ request
1085     @param retval - return code for the set bridge flags request
1086 */
1087 define bd_ip_mac_add_del_reply
1088 {
1089   u32 context;
1090   i32 retval;
1091 };
1092
1093 /** \brief Add/Delete classification table request
1094     @param client_index - opaque cookie to identify the sender
1095     @param context - sender context, to match reply w/ request
1096     @param is_add- if non-zero add the table, else delete it
1097     @param del_chain - if non-zero delete the whole chain of tables
1098     @param table_index - if add, reuturns index of the created table, else specifies the table to delete  
1099     @param nbuckets - number of buckets when adding a table
1100     @param memory_size - memory size when adding a table
1101     @param match_n_vectors - number of match vectors
1102     @param next_table_index - index of next table
1103     @param miss_next_index - index of miss table
1104     @param current_data_flag - option to use current node's packet payload
1105             as the starting point from where packets are classified,
1106             This option is only valid for L2/L3 input ACL for now.
1107             0: by default, classify data from the buffer's start location
1108             1: classify packets from VPP node’s current data pointer
1109     @param current_data_offset - a signed value to shift the start location of
1110             the packet to be classified
1111             For example, if input IP ACL node is used, L2 header’s first byte
1112             can be accessible by configuring current_data_offset to -14
1113             if there is no vlan tag.
1114             This is valid only if current_data_flag is set to 1.
1115     @param mask[] - match mask
1116 */
1117 define classify_add_del_table
1118 {
1119   u32 client_index;
1120   u32 context;
1121   u8 is_add;
1122   u8 del_chain;
1123   u32 table_index;
1124   u32 nbuckets;
1125   u32 memory_size;
1126   u32 skip_n_vectors;
1127   u32 match_n_vectors;
1128   u32 next_table_index;
1129   u32 miss_next_index;
1130   u32 current_data_flag;
1131   i32 current_data_offset;
1132   u8 mask[0];
1133 };
1134
1135 /** \brief Add/Delete classification table response
1136     @param context - sender context, to match reply w/ request
1137     @param retval - return code for the table add/del requst
1138     @param new_table_index - for add, returned index of the new table
1139     @param skip_n_vectors - for add, returned value of skip_n_vectors in table
1140     @param match_n_vectors -for add, returned value of match_n_vectors in table
1141 */
1142 define classify_add_del_table_reply
1143 {
1144   u32 context;
1145   i32 retval;
1146   u32 new_table_index;
1147   u32 skip_n_vectors;
1148   u32 match_n_vectors;
1149 };
1150
1151 /** \brief Classify add / del session request
1152     @param client_index - opaque cookie to identify the sender
1153     @param context - sender context, to match reply w/ request
1154     @param is_add - add session if non-zero, else delete
1155     @param table_index - index of the table to add/del the session, required
1156     @param hit_next_index - for add, hit_next_index of new session, required
1157     @param opaque_index - for add, opaque_index of new session
1158     @param advance -for add, advance value for session
1159     @param action -
1160            0: no action (by default)
1161               metadata is not used.
1162            1: Classified IP packets will be looked up from the
1163               specified ipv4 fib table (configured by metadata as VRF id).
1164               Only valid for L3 input ACL node
1165            2: Classified IP packets will be looked up from the
1166               specified ipv6 fib table (configured by metadata as VRF id).
1167               Only valid for L3 input ACL node
1168     @param metadata - valid only if action != 0
1169            VRF id if action is 1 or 2.
1170     @param match[] - for add, match value for session, required
1171 */
1172 define classify_add_del_session
1173 {
1174   u32 client_index;
1175   u32 context;
1176   u8 is_add;
1177   u32 table_index;
1178   u32 hit_next_index;
1179   u32 opaque_index;
1180   i32 advance;
1181   u8 action;
1182   u32 metadata;
1183   u8 match[0];
1184 };
1185
1186 /** \brief Classify add / del session response
1187     @param context - sender context, to match reply w/ request
1188     @param retval - return code for the add/del session request
1189 */
1190 define classify_add_del_session_reply
1191 {
1192   u32 context;
1193   i32 retval;
1194 };
1195
1196 /** \brief Set/unset the classification table for an interface request 
1197     @param client_index - opaque cookie to identify the sender
1198     @param context - sender context, to match reply w/ request
1199     @param is_ipv6 - ipv6 if non-zero, else ipv4
1200     @param sw_if_index - interface to associate with the table
1201     @param table_index - index of the table, if ~0 unset the table
1202 */
1203 define classify_set_interface_ip_table
1204 {
1205   u32 client_index;
1206   u32 context;
1207   u8 is_ipv6;
1208   u32 sw_if_index;
1209   u32 table_index;              /* ~0 => off */
1210 };
1211
1212 /** \brief Set/unset interface classification table response 
1213     @param context - sender context, to match reply w/ request
1214     @param retval - return code
1215 */
1216 define classify_set_interface_ip_table_reply
1217 {
1218   u32 context;
1219   i32 retval;
1220 };
1221
1222 /** \brief Set/unset l2 classification tables for an interface request
1223     @param client_index - opaque cookie to identify the sender
1224     @param context - sender context, to match reply w/ request
1225     @param sw_if_index - interface to set/unset tables for
1226     @param ip4_table_index - ip4 index, use ~0 for all 3 indexes to unset
1227     @param ip6_table_index - ip6 index
1228     @param other_table_index - other index
1229 */
1230 define classify_set_interface_l2_tables
1231 {
1232   u32 client_index;
1233   u32 context;
1234   u32 sw_if_index;
1235   /* 3 x ~0 => off */
1236   u32 ip4_table_index;
1237   u32 ip6_table_index;
1238   u32 other_table_index;
1239   u8 is_input;
1240 };
1241
1242 /** \brief Set/unset l2 classification tables for an interface response
1243     @param context - sender context, to match reply w/ request
1244     @param retval - return code for the request
1245 */
1246 define classify_set_interface_l2_tables_reply
1247 {
1248   u32 context;
1249   i32 retval;
1250 };
1251
1252 /** \brief Get node index using name request
1253     @param client_index - opaque cookie to identify the sender
1254     @param context - sender context, to match reply w/ request
1255     @param node_name[] - name of the node
1256 */
1257 define get_node_index
1258 {
1259   u32 client_index;
1260   u32 context;
1261   u8 node_name[64];
1262 };
1263
1264 /** \brief Get node index using name request
1265     @param context - sender context, to match reply w/ request
1266     @param retval - return code for the request
1267     @param node_index - index of the desired node if found, else ~0
1268 */
1269 define get_node_index_reply
1270 {
1271   u32 context;
1272   i32 retval;
1273   u32 node_index;
1274 };
1275
1276 /** \brief Set the next node for a given node request
1277     @param client_index - opaque cookie to identify the sender
1278     @param context - sender context, to match reply w/ request
1279     @param node_name[] - node to add the next node to
1280     @param next_name[] - node to add as the next node
1281 */
1282 define add_node_next
1283 {
1284   u32 client_index;
1285   u32 context;
1286   u8 node_name[64];
1287   u8 next_name[64];
1288 };
1289
1290 /** \brief IP Set the next node for a given node response
1291     @param context - sender context, to match reply w/ request
1292     @param retval - return code for the add next node request
1293     @param next_index - the index of the next node if success, else ~0
1294 */
1295 define add_node_next_reply
1296 {
1297   u32 context;
1298   i32 retval;
1299   u32 next_index;
1300 };
1301
1302 /** \brief DHCP Proxy config 2 add / del request
1303     @param client_index - opaque cookie to identify the sender
1304     @param context - sender context, to match reply w/ request
1305     @param rx_vrf_id - receive vrf id
1306     @param server_vrf_id - server vrf id
1307     @param if_ipv6 - ipv6 if non-zero, else ipv4
1308     @param is_add - add the config if non-zero, else delete
1309     @param insert_circuit_id - option82 suboption 1 fib number
1310     @param dhcp_server[] - server address
1311     @param dhcp_src_address[] - <fix this, need details>
1312 */
1313 define dhcp_proxy_config_2
1314 {
1315   u32 client_index;
1316   u32 context;
1317   u32 rx_vrf_id;
1318   u32 server_vrf_id;
1319   u8 is_ipv6;
1320   u8 is_add;
1321   u8 insert_circuit_id;
1322   u8 dhcp_server[16];
1323   u8 dhcp_src_address[16];
1324 };
1325
1326 /** \brief DHCP Proxy config 2 add / del response
1327     @param context - sender context, to match reply w/ request
1328     @param retval - return code for request
1329 */
1330 define dhcp_proxy_config_2_reply
1331 {
1332   u32 context;
1333   i32 retval;
1334 };
1335
1336 /** \brief L2 fib clear table request, clear all mac entries in the l2 fib
1337     @param client_index - opaque cookie to identify the sender
1338     @param context - sender context, to match reply w/ request
1339 */
1340 define l2_fib_clear_table
1341 {
1342   u32 client_index;
1343   u32 context;
1344 };
1345
1346 /** \brief L2 fib clear table response
1347     @param context - sender context, to match reply w/ request
1348     @param retval - return code for the request
1349 */
1350 define l2_fib_clear_table_reply
1351 {
1352   u32 context;
1353   i32 retval;
1354 };
1355
1356 /** \brief L2 interface ethernet flow point filtering enable/disable request
1357     @param client_index - opaque cookie to identify the sender
1358     @param context - sender context, to match reply w/ request
1359     @param sw_if_index - interface to enable/disable filtering on
1360     @param enable_disable - if non-zero enable filtering, else disable
1361 */
1362 define l2_interface_efp_filter
1363 {
1364   u32 client_index;
1365   u32 context;
1366   u32 sw_if_index;
1367   u32 enable_disable;
1368 };
1369
1370 /** \brief L2 interface ethernet flow point filtering response
1371     @param context - sender context, to match reply w/ request
1372     @param retval - return code for the request
1373 */
1374 define l2_interface_efp_filter_reply
1375 {
1376   u32 context;
1377   i32 retval;
1378 };
1379
1380 /** \brief L2 interface vlan tag rewrite configure request
1381     @param client_index - opaque cookie to identify the sender
1382     @param context - sender context, to match reply w/ request
1383     @param sw_if_index - interface the operation is applied to
1384     @param vtr_op - Choose from l2_vtr_op_t enum values
1385     @param push_dot1q - first pushed flag dot1q id set, else dot1ad
1386     @param tag1 - Needed for any push or translate vtr op
1387     @param tag2 - Needed for any push 2 or translate x-2 vtr ops
1388 */
1389 define l2_interface_vlan_tag_rewrite
1390 {
1391   u32 client_index;
1392   u32 context;
1393   u32 sw_if_index;
1394   u32 vtr_op;
1395   u32 push_dot1q;               // ethertype of first pushed tag is dot1q/dot1ad
1396   u32 tag1;                     // first pushed tag
1397   u32 tag2;                     // second pushed tag
1398 };
1399
1400 /** \brief L2 interface vlan tag rewrite response
1401     @param context - sender context, to match reply w/ request
1402     @param retval - return code for the request
1403 */
1404 define l2_interface_vlan_tag_rewrite_reply
1405 {
1406   u32 context;
1407   i32 retval;
1408 };
1409
1410 define create_subif
1411 {
1412   u32 client_index;
1413   u32 context;
1414   u32 sw_if_index;
1415   u32 sub_id;
1416
1417   /* These fields map directly onto the subif template */
1418   u8 no_tags;
1419   u8 one_tag;
1420   u8 two_tags;
1421   u8 dot1ad;                    // 0 = dot1q, 1=dot1ad
1422   u8 exact_match;
1423   u8 default_sub;
1424   u8 outer_vlan_id_any;
1425   u8 inner_vlan_id_any;
1426   u16 outer_vlan_id;
1427   u16 inner_vlan_id;
1428 };
1429
1430 define create_subif_reply
1431 {
1432   u32 context;
1433   i32 retval;
1434   u32 sw_if_index;
1435 };
1436
1437 /** \brief show version
1438     @param client_index - opaque cookie to identify the sender
1439     @param context - sender context, to match reply w/ request
1440 */
1441 define show_version
1442 {
1443   u32 client_index;
1444   u32 context;
1445 };
1446
1447 /** \brief show version response
1448     @param context - sender context, to match reply w/ request
1449     @param retval - return code for the request
1450     @param program - name of the program (vpe)
1451     @param version  - version of the program
1452     @param build_directory - root of the workspace where the program was built
1453 */
1454 define show_version_reply
1455 {
1456   u32 context;
1457   i32 retval;
1458   u8 program[32];
1459   u8 version[32];
1460   u8 build_date[32];
1461   u8 build_directory[256];
1462 };
1463
1464 /** \brief l2 fib table entry structure
1465     @param bd_id - the l2 fib / bridge domain table id
1466     @param mac - the entry's mac address
1467     @param sw_if_index - index of the interface
1468     @param static_mac - the entry is statically configured.
1469     @param filter_mac - the entry is a mac filter entry.
1470     @param bvi_mac - the mac address is a bridge virtual interface
1471 */
1472 define l2_fib_table_entry
1473 {
1474   u32 context;
1475   u32 bd_id;
1476   u64 mac;
1477   u32 sw_if_index;
1478   u8 static_mac;
1479   u8 filter_mac;
1480   u8 bvi_mac;
1481 };
1482
1483 /** \brief Dump l2 fib (aka bridge domain) table
1484     @param client_index - opaque cookie to identify the sender
1485     @param bd_id - the l2 fib / bridge domain table identifier
1486 */
1487 define l2_fib_table_dump
1488 {
1489   u32 client_index;
1490   u32 context;
1491   u32 bd_id;
1492 };
1493
1494 /** \brief add or delete lisp gpe tunnel
1495     @param client_index - opaque cookie to identify the sender
1496     @param context - sender context, to match reply w/ request
1497     @param is_add - add address if non-zero, else delete
1498     @param eid_type -
1499       0 : ipv4
1500       1 : ipv6
1501       2 : mac
1502     @param rmt_eid - remote eid
1503     @param lcl_eid - local eid
1504     @param rmt_len - remote prefix len
1505     @param lcl_len - local prefix len
1506     @param vni - virtual network identifier
1507     @param dp_table - vrf/bridge domain id
1508     @param loc_num - number of locators
1509     @param lcl_locs - array of local locators
1510     @param rmt_locs - array of remote locators
1511     @param action - negative action when 0 locators configured
1512 */
1513 define lisp_gpe_add_del_fwd_entry
1514 {
1515   u32 client_index;
1516   u32 context;
1517   u8 is_add;
1518   u8 eid_type;
1519   u8 rmt_eid[16];
1520   u8 lcl_eid[16];
1521   u8 rmt_len;
1522   u8 lcl_len;
1523   u32 vni;
1524   u32 dp_table;
1525   u32 loc_num;
1526   u8 lcl_locs[loc_num];
1527   u8 rmt_locs[loc_num];
1528   u8 action;
1529 };
1530
1531 /** \brief Reply for gpe_fwd_entry add/del
1532     @param context - returned sender context, to match reply w/ request
1533     @param retval - return code
1534 */
1535 define lisp_gpe_add_del_fwd_entry_reply
1536 {
1537   u32 context;
1538   i32 retval;
1539 };
1540
1541 /** \brief add or delete gpe_iface
1542     @param client_index - opaque cookie to identify the sender
1543     @param context - sender context, to match reply w/ request
1544     @param is_add - add address if non-zero, else delete
1545 */
1546 define lisp_gpe_add_del_iface
1547 {
1548   u32 client_index;
1549   u32 context;
1550   u8 is_add;
1551   u8 is_l2;
1552   u32 dp_table;
1553   u32 vni;
1554 };
1555
1556 /** \brief Reply for gpe_iface add/del
1557     @param context - returned sender context, to match reply w/ request
1558     @param retval - return code
1559 */
1560 define lisp_gpe_add_del_iface_reply
1561 {
1562   u32 context;
1563   i32 retval;
1564 };
1565
1566 define lisp_gpe_tunnel_details
1567 {
1568   u32 context;
1569   u32 tunnels;
1570   u8 is_ipv6;
1571   u8 source_ip[16];
1572   u8 destination_ip[16];
1573   u32 encap_fib_id;
1574   u32 decap_fib_id;
1575   u32 dcap_next;
1576   u8 lisp_ver;
1577   u8 next_protocol;
1578   u8 flags;
1579   u8 ver_res;
1580   u8 res;
1581   u32 iid;
1582 };
1583
1584 /** \brief Request for gpe tunnel summary status
1585     @param client_index - opaque cookie to identify the sender
1586     @param context - sender context, to match reply w/ request
1587  */
1588 define lisp_gpe_tunnel_dump
1589 {
1590   u32 client_index;
1591   u32 context;
1592 };
1593
1594 /* Gross kludge, DGMS */
1595 define interface_name_renumber
1596 {
1597   u32 client_index;
1598   u32 context;
1599   u32 sw_if_index;
1600   u32 new_show_dev_instance;
1601 };
1602
1603 define interface_name_renumber_reply
1604 {
1605   u32 context;
1606   i32 retval;
1607 };
1608
1609 /** \brief Register for ip4 arp resolution events
1610     @param client_index - opaque cookie to identify the sender
1611     @param context - sender context, to match reply w/ request
1612     @param enable_disable - 1 => register for events, 0 => cancel registration
1613     @param pid - sender's pid
1614     @param address - the exact ip4 address of interest
1615 */
1616 define want_ip4_arp_events
1617 {
1618   u32 client_index;
1619   u32 context;
1620   u8 enable_disable;
1621   u32 pid;
1622   u32 address;
1623 };
1624
1625 /** \brief Reply for interface events registration
1626     @param context - returned sender context, to match reply w/ request
1627     @param retval - return code
1628 */
1629 define want_ip4_arp_events_reply
1630 {
1631   u32 context;
1632   i32 retval;
1633 };
1634
1635 /** \brief Tell client about an ip4 arp resolution event
1636     @param client_index - opaque cookie to identify the sender
1637     @param context - sender context, to match reply w/ request
1638     @param address - the exact ip4 address of interest
1639     @param pid - client pid registered to receive notification
1640     @param sw_if_index - interface which received ARP packet
1641     @param new_mac - the new mac address 
1642     @param mac_ip - 0: resolution event, 1: mac/ip binding in bd
1643 */
1644 define ip4_arp_event
1645 {
1646   u32 client_index;
1647   u32 context;
1648   u32 address;
1649   u32 pid;
1650   u32 sw_if_index;
1651   u8 new_mac[6];
1652   u8 mac_ip;
1653 };
1654
1655 /** \brief Register for ip6 nd resolution events
1656     @param client_index - opaque cookie to identify the sender
1657     @param context - sender context, to match reply w/ request
1658     @param enable_disable - 1 => register for events, 0 => cancel registration
1659     @param pid - sender's pid
1660     @param address - the exact ip6 address of interest
1661 */
1662 define want_ip6_nd_events
1663 {
1664   u32 client_index;
1665   u32 context;
1666   u8 enable_disable;
1667   u32 pid;
1668   u8 address[16];
1669 };
1670
1671 /** \brief Reply for ip6 nd resolution events registration
1672     @param context - returned sender context, to match reply w/ request
1673     @param retval - return code
1674 */
1675 define want_ip6_nd_events_reply
1676 {
1677   u32 context;
1678   i32 retval;
1679 };
1680
1681 /** \brief Tell client about an ip6 nd resolution or mac/ip event
1682     @param client_index - opaque cookie to identify the sender
1683     @param context - sender context, to match reply w/ request
1684     @param pid - client pid registered to receive notification
1685     @param sw_if_index - interface which received ARP packet
1686     @param address - the exact ip6 address of interest
1687     @param new_mac - the new mac address 
1688     @param mac_ip - 0: resolution event, 1: mac/ip binding in bd
1689 */
1690 define ip6_nd_event
1691 {
1692   u32 client_index;
1693   u32 context;
1694   u32 pid;
1695   u32 sw_if_index;
1696   u8 address[16];
1697   u8 new_mac[6];
1698   u8 mac_ip;
1699 };
1700     
1701 /** \brief L2 bridge domain add or delete request
1702     @param client_index - opaque cookie to identify the sender
1703     @param context - sender context, to match reply w/ request
1704     @param bd_id - the bridge domain to create
1705     @param flood - enable/disable bcast/mcast flooding in the bd
1706     @param uu_flood - enable/disable uknown unicast flood in the bd
1707     @param forward - enable/disable forwarding on all interfaces in the bd
1708     @param learn - enable/disable learning on all interfaces in the bd
1709     @param arp_term - enable/disable arp termination in the bd
1710     @param mac_age - mac aging time in min, 0 for disabled
1711     @param is_add - add or delete flag
1712 */
1713 define bridge_domain_add_del
1714 {
1715   u32 client_index;
1716   u32 context;
1717   u32 bd_id;
1718   u8 flood;
1719   u8 uu_flood;
1720   u8 forward;
1721   u8 learn;
1722   u8 arp_term;
1723   u8 mac_age;
1724   u8 is_add;
1725 };
1726
1727 /** \brief L2 bridge domain add or delete response
1728     @param context - sender context, to match reply w/ request
1729     @param retval - return code for the set bridge flags request
1730 */
1731 define bridge_domain_add_del_reply
1732 {
1733   u32 context;
1734   i32 retval;
1735 };
1736
1737 /** \brief L2 bridge domain request operational state details
1738     @param client_index - opaque cookie to identify the sender
1739     @param context - sender context, to match reply w/ request
1740     @param bd_id - the bridge domain id desired or ~0 to request all bds
1741 */
1742 define bridge_domain_dump
1743 {
1744   u32 client_index;
1745   u32 context;
1746   u32 bd_id;
1747 };
1748
1749 /** \brief L2 bridge domain operational state response
1750     @param bd_id - the bridge domain id
1751     @param flood - bcast/mcast flooding state on all interfaces in the bd
1752     @param uu_flood - uknown unicast flooding state on all interfaces in the bd
1753     @param forward - forwarding state on all interfaces in the bd
1754     @param learn - learning state on all interfaces in the bd
1755     @param arp_term - arp termination state on all interfaces in the bd
1756     @param mac_age - mac aging time in min, 0 for disabled
1757     @param n_sw_ifs - number of sw_if_index's in the domain
1758 */
1759 define bridge_domain_details
1760 {
1761   u32 context;
1762   u32 bd_id;
1763   u8 flood;
1764   u8 uu_flood;
1765   u8 forward;
1766   u8 learn;
1767   u8 arp_term;
1768   u8 mac_age;
1769   u32 bvi_sw_if_index;
1770   u32 n_sw_ifs;
1771 };
1772
1773 /** \brief L2 bridge domain sw interface operational state response
1774     @param bd_id - the bridge domain id
1775     @param sw_if_index - sw_if_index in the domain
1776     @param shg - split horizon group for the interface
1777 */
1778 define bridge_domain_sw_if_details
1779 {
1780   u32 context;
1781   u32 bd_id;
1782   u32 sw_if_index;
1783   u8 shg;
1784 };
1785
1786 /** \brief DHCP Client config add / del request
1787     @param client_index - opaque cookie to identify the sender
1788     @param context - sender context, to match reply w/ request
1789     @param sw_if_index - index of the interface for DHCP client
1790     @param hostname - hostname
1791     @param is_add - add the config if non-zero, else delete
1792     @param want_dhcp_event - DHCP event sent to the sender
1793            via dhcp_compl_event API message if non-zero
1794     @param pid - sender's pid
1795 */
1796 define dhcp_client_config
1797 {
1798   u32 client_index;
1799   u32 context;
1800   u32 sw_if_index;
1801   u8 hostname[64];
1802   u8 is_add;
1803   u8 want_dhcp_event;
1804   u32 pid;
1805 };
1806
1807 /** \brief DHCP Client config response
1808     @param context - sender context, to match reply w/ request
1809     @param retval - return code for the request
1810 */
1811 define dhcp_client_config_reply
1812 {
1813   u32 context;
1814   i32 retval;
1815 };
1816
1817 /** \brief Set/unset input ACL interface
1818     @param client_index - opaque cookie to identify the sender
1819     @param context - sender context, to match reply w/ request
1820     @param sw_if_index - interface to set/unset input ACL
1821     @param ip4_table_index - ip4 classify table index (~0 for skip)
1822     @param ip6_table_index - ip6 classify table index (~0 for skip)
1823     @param l2_table_index  -  l2 classify table index (~0 for skip)
1824     @param is_add - Set input ACL if non-zero, else unset
1825     Note: User is recommeneded to use just one valid table_index per call.
1826           (ip4_table_index, ip6_table_index, or l2_table_index)
1827 */
1828 define input_acl_set_interface
1829 {
1830   u32 client_index;
1831   u32 context;
1832   u32 sw_if_index;
1833   u32 ip4_table_index;
1834   u32 ip6_table_index;
1835   u32 l2_table_index;
1836   u8 is_add;
1837 };
1838
1839 /** \brief Set/unset input ACL interface response
1840     @param context - sender context, to match reply w/ request
1841     @param retval - return code for the request
1842 */
1843 define input_acl_set_interface_reply
1844 {
1845   u32 context;
1846   i32 retval;
1847 };
1848
1849 /** \brief Tell client about a DHCP completion event
1850     @param client_index - opaque cookie to identify the sender
1851     @param pid - client pid registered to receive notification
1852     @param is_ipv6 - if non-zero the address is ipv6, else ipv4
1853     @param host_address - Host IP address
1854     @param router_address - Router IP address
1855     @param host_mac - Host MAC address
1856 */
1857 define dhcp_compl_event
1858 {
1859   u32 client_index;
1860   u32 pid;
1861   u8 hostname[64];
1862   u8 is_ipv6;
1863   u8 host_address[16];
1864   u8 router_address[16];
1865   u8 host_mac[6];
1866 };
1867
1868 /** \brief cop: enable/disable junk filtration features on an interface
1869     @param client_index - opaque cookie to identify the sender
1870     @param context - sender context, to match reply w/ request
1871     @param sw_if_inded - desired interface
1872     @param enable_disable - 1 => enable, 0 => disable
1873 */
1874
1875 define cop_interface_enable_disable
1876 {
1877   u32 client_index;
1878   u32 context;
1879   u32 sw_if_index;
1880   u8 enable_disable;
1881 };
1882
1883 /** \brief cop: interface enable/disable junk filtration reply
1884     @param context - returned sender context, to match reply w/ request
1885     @param retval - return code
1886 */
1887
1888 define cop_interface_enable_disable_reply
1889 {
1890   u32 context;
1891   i32 retval;
1892 };
1893
1894 /** \brief cop: enable/disable whitelist filtration features on an interface
1895     Note: the supplied fib_id must match in order to remove the feature!
1896     
1897     @param client_index - opaque cookie to identify the sender
1898     @param context - sender context, to match reply w/ request
1899     @param sw_if_index - interface handle, physical interfaces only
1900     @param fib_id - fib identifier for the whitelist / blacklist fib
1901     @param ip4 - 1 => enable ip4 filtration, 0=> disable ip4 filtration
1902     @param ip6 - 1 => enable ip6 filtration, 0=> disable ip6 filtration
1903     @param default_cop -  1 => enable non-ip4, non-ip6 filtration 0=> disable it
1904 */
1905
1906 define cop_whitelist_enable_disable
1907 {
1908   u32 client_index;
1909   u32 context;
1910   u32 sw_if_index;
1911   u32 fib_id;
1912   u8 ip4;
1913   u8 ip6;
1914   u8 default_cop;
1915 };
1916
1917 /** \brief cop: interface enable/disable junk filtration reply
1918     @param context - returned sender context, to match reply w/ request
1919     @param retval - return code
1920 */
1921
1922 define cop_whitelist_enable_disable_reply
1923 {
1924   u32 context;
1925   i32 retval;
1926 };
1927
1928 /** \brief get_node_graph - get a copy of the vpp node graph
1929     including the current set of graph arcs.
1930
1931     @param client_index - opaque cookie to identify the sender
1932     @param context - sender context, to match reply w/ request
1933 */
1934
1935 define get_node_graph
1936 {
1937   u32 client_index;
1938   u32 context;
1939 };
1940
1941 /** \brief get_node_graph_reply
1942     @param context - returned sender context, to match reply w/ request
1943     @param retval - return code
1944     @param reply_in_shmem - result from vlib_node_serialize, in shared
1945     memory. Process with vlib_node_unserialize, remember to switch
1946     heaps and free the result.
1947 */
1948
1949 define get_node_graph_reply
1950 {
1951   u32 context;
1952   i32 retval;
1953   u64 reply_in_shmem;
1954 };
1955
1956 /** \brief IOAM enable : Enable in-band OAM
1957     @param id - profile id
1958     @param seqno - To enable Seqno Processing
1959     @param analyse - Enabling analysis of iOAM at decap node 
1960     @param pow_enable - Proof of Work enabled or not flag
1961     @param trace_enable - iOAM Trace enabled or not flag
1962 */
1963 define ioam_enable
1964 {
1965   u32 client_index;
1966   u32 context;
1967   u16 id;
1968   u8 seqno;
1969   u8 analyse;
1970   u8 pot_enable;
1971   u8 trace_enable;
1972   u32 node_id;
1973 };
1974
1975 /** \brief iOAM Trace profile add / del response
1976     @param context - sender context, to match reply w/ request
1977     @param retval - return value for request
1978 */
1979 define ioam_enable_reply
1980 {
1981   u32 context;
1982   i32 retval;
1983 };
1984
1985 /** \brief iOAM disable
1986     @param client_index - opaque cookie to identify the sender
1987     @param context - sender context, to match reply w/ request
1988     @param index - MAP Domain index
1989 */
1990 define ioam_disable
1991 {
1992   u32 client_index;
1993   u32 context;
1994   u16 id;
1995 };
1996
1997 /** \brief iOAM disable response
1998     @param context - sender context, to match reply w/ request
1999     @param retval - return value for request
2000 */
2001 define ioam_disable_reply
2002 {
2003   u32 context;
2004   i32 retval;
2005 };
2006
2007 /** \brief Add/del policer
2008     @param client_index - opaque cookie to identify the sender
2009     @param context - sender context, to match reply w/ request
2010     @param is_add - add policer if non-zero, else delete
2011     @param name - policer name
2012     @param cir - CIR
2013     @param eir - EIR
2014     @param cb - Committed Burst
2015     @param eb - Excess or Peak Burst
2016     @param rate_type - rate type
2017     @param round_type - rounding type
2018     @param type - policer algorithm
2019     @param color_aware - 0=color-blind, 1=color-aware
2020     @param conform_action_type - conform action type
2021     @param conform_dscp - DSCP for conform mar-and-transmit action
2022     @param exceed_action_type - exceed action type
2023     @param exceed_dscp - DSCP for exceed mar-and-transmit action
2024     @param violate_action_type - violate action type
2025     @param violate_dscp - DSCP for violate mar-and-transmit action
2026 */
2027 define policer_add_del
2028 {
2029   u32 client_index;
2030   u32 context;
2031
2032   u8 is_add;
2033   u8 name[64];
2034   u32 cir;
2035   u32 eir;
2036   u64 cb;
2037   u64 eb;
2038   u8 rate_type;
2039   u8 round_type;
2040   u8 type;
2041   u8 color_aware;
2042   u8 conform_action_type;
2043   u8 conform_dscp;
2044   u8 exceed_action_type;
2045   u8 exceed_dscp;
2046   u8 violate_action_type;
2047   u8 violate_dscp;
2048 };
2049
2050 /** \brief Add/del policer response
2051     @param context - sender context, to match reply w/ request
2052     @param retval - return value for request
2053     @param policer_index - for add, returned index of the new policer
2054 */
2055 define policer_add_del_reply
2056 {
2057   u32 context;
2058   i32 retval;
2059   u32 policer_index;
2060 };
2061
2062 /** \brief Get list of policers
2063     @param client_index - opaque cookie to identify the sender
2064     @param context - sender context, to match reply w/ request
2065     @param match_name_valid - if 0 request all policers otherwise use match_name
2066     @param match_name - policer name
2067 */
2068 define policer_dump
2069 {
2070   u32 client_index;
2071   u32 context;
2072
2073   u8 match_name_valid;
2074   u8 match_name[64];
2075 };
2076
2077 /** \brief Policer operational state response.
2078     @param context - sender context, to match reply w/ request
2079     @param name - policer name
2080     @param cir - CIR
2081     @param eir - EIR
2082     @param cb - Committed Burst
2083     @param eb - Excess or Peak Burst
2084     @param rate_type - rate type
2085     @param round_type - rounding type
2086     @param type - policer algorithm
2087     @param conform_action_type - conform action type
2088     @param conform_dscp - DSCP for conform mar-and-transmit action
2089     @param exceed_action_type - exceed action type
2090     @param exceed_dscp - DSCP for exceed mar-and-transmit action
2091     @param violate_action_type - violate action type
2092     @param violate_dscp - DSCP for violate mar-and-transmit action
2093     @param single_rate - 1 = single rate policer, 0 = two rate policer
2094     @param color_aware - for hierarchical policing
2095     @param scale - power-of-2 shift amount for lower rates
2096     @param cir_tokens_per_period - number of tokens for each period
2097     @param pir_tokens_per_period - number of tokens for each period for 2-rate policer
2098     @param current_limit - current limit
2099     @param current_bucket - current bucket
2100     @param extended_limit - extended limit
2101     @param extended_bucket - extended bucket
2102     @param last_update_time - last update time
2103 */
2104 define policer_details
2105 {
2106   u32 context;
2107
2108   u8 name[64];
2109   u32 cir;
2110   u32 eir;
2111   u64 cb;
2112   u64 eb;
2113   u8 rate_type;
2114   u8 round_type;
2115   u8 type;
2116   u8 conform_action_type;
2117   u8 conform_dscp;
2118   u8 exceed_action_type;
2119   u8 exceed_dscp;
2120   u8 violate_action_type;
2121   u8 violate_dscp;
2122   u8 single_rate;
2123   u8 color_aware;
2124   u32 scale;
2125   u32 cir_tokens_per_period;
2126   u32 pir_tokens_per_period;
2127   u32 current_limit;
2128   u32 current_bucket;
2129   u32 extended_limit;
2130   u32 extended_bucket;
2131   u64 last_update_time;
2132 };
2133
2134 /** \brief Set/unset policer classify interface
2135     @param client_index - opaque cookie to identify the sender
2136     @param context - sender context, to match reply w/ request
2137     @param sw_if_index - interface to set/unset policer classify
2138     @param ip4_table_index - ip4 classify table index (~0 for skip)
2139     @param ip6_table_index - ip6 classify table index (~0 for skip)
2140     @param l2_table_index  -  l2 classify table index (~0 for skip)
2141     @param is_add - Set if non-zero, else unset
2142     Note: User is recommeneded to use just one valid table_index per call.
2143           (ip4_table_index, ip6_table_index, or l2_table_index)
2144 */
2145 define policer_classify_set_interface
2146 {
2147   u32 client_index;
2148   u32 context;
2149   u32 sw_if_index;
2150   u32 ip4_table_index;
2151   u32 ip6_table_index;
2152   u32 l2_table_index;
2153   u8 is_add;
2154 };
2155
2156 /** \brief Set/unset policer classify interface response
2157     @param context - sender context, to match reply w/ request
2158     @param retval - return value for request
2159 */
2160 define policer_classify_set_interface_reply
2161 {
2162   u32 context;
2163   i32 retval;
2164 };
2165
2166 /** \brief Get list of policer classify interfaces and tables
2167     @param client_index - opaque cookie to identify the sender
2168     @param context - sender context, to match reply w/ request
2169     @param type - classify table type
2170 */
2171 define policer_classify_dump
2172 {
2173   u32 client_index;
2174   u32 context;
2175   u8 type;
2176 };
2177
2178 /** \brief Policer iclassify operational state response.
2179     @param context - sender context, to match reply w/ request
2180     @param sw_if_index - software interface index
2181     @param table_index - classify table index
2182 */
2183 define policer_classify_details
2184 {
2185   u32 context;
2186   u32 sw_if_index;
2187   u32 table_index;
2188 };
2189
2190 /** \brief Classify get table IDs request
2191     @param client_index - opaque cookie to identify the sender
2192     @param context - sender context, to match reply w/ request
2193 */
2194 define classify_table_ids
2195 {
2196   u32 client_index;
2197   u32 context;
2198 };
2199
2200 /** \brief Reply for classify get table IDs request
2201     @param context - sender context which was passed in the request
2202     @param count - number of ids returned in response
2203     @param ids - array of classify table ids
2204 */
2205 define classify_table_ids_reply
2206 {
2207   u32 context;
2208   i32 retval;
2209   u32 count;
2210   u32 ids[count];
2211 };
2212
2213 /** \brief Classify table ids by interface index request
2214     @param client_index - opaque cookie to identify the sender
2215     @param context - sender context, to match reply w/ request
2216     @param sw_if_index - index of the interface
2217 */
2218 define classify_table_by_interface
2219 {
2220   u32 client_index;
2221   u32 context;
2222   u32 sw_if_index;
2223 };
2224
2225 /** \brief Reply for classify table id by interface index request
2226     @param context - sender context which was passed in the request
2227     @param count - number of ids returned in response
2228     @param sw_if_index - index of the interface
2229     @param l2_table_id - l2 classify table index
2230     @param ip4_table_id - ip4 classify table index
2231     @param ip6_table_id - ip6 classify table index
2232 */
2233 define classify_table_by_interface_reply
2234 {
2235   u32 context;
2236   i32 retval;
2237   u32 sw_if_index;
2238   u32 l2_table_id;
2239   u32 ip4_table_id;
2240   u32 ip6_table_id;
2241 };
2242
2243 /** \brief Classify table info
2244     @param client_index - opaque cookie to identify the sender
2245     @param context - sender context, to match reply w/ request
2246     @param table_id - classify table index
2247 */
2248 define classify_table_info
2249 {
2250   u32 client_index;
2251   u32 context;
2252   u32 table_id;
2253 };
2254
2255 /** \brief Reply for classify table info request
2256     @param context - sender context which was passed in the request
2257     @param count - number of ids returned in response
2258     @param table_id - classify table index
2259     @param nbuckets - number of buckets when adding a table
2260     @param match_n_vectors - number of match vectors
2261     @param skip_n_vectors - number of skip_n_vectors
2262     @param active_sessions - number of sessions (active entries)
2263     @param next_table_index - index of next table
2264     @param miss_next_index - index of miss table
2265     @param mask[] - match mask
2266 */
2267 define classify_table_info_reply
2268 {
2269   u32 context;
2270   i32 retval;
2271   u32 table_id;
2272   u32 nbuckets;
2273   u32 match_n_vectors;
2274   u32 skip_n_vectors;
2275   u32 active_sessions;
2276   u32 next_table_index;
2277   u32 miss_next_index;
2278   u32 mask_length;
2279   u8 mask[mask_length];
2280 };
2281
2282 /** \brief Classify sessions dump request
2283     @param client_index - opaque cookie to identify the sender
2284     @param context - sender context, to match reply w/ request
2285     @param table_id - classify table index
2286 */
2287 define classify_session_dump
2288 {
2289   u32 client_index;
2290   u32 context;
2291   u32 table_id;
2292 };
2293
2294 /** \brief Reply for classify table session dump request
2295     @param context - sender context which was passed in the request
2296     @param count - number of ids returned in response
2297     @param table_id - classify table index
2298     @param hit_next_index - hit_next_index of session
2299     @param opaque_index - for add, opaque_index of session
2300     @param advance - advance value of session
2301     @param match[] - match value for session
2302 */
2303 define classify_session_details
2304 {
2305   u32 context;
2306   i32 retval;
2307   u32 table_id;
2308   u32 hit_next_index;
2309   i32 advance;
2310   u32 opaque_index;
2311   u32 match_length;
2312   u8 match[match_length];
2313 };
2314
2315 /** \brief Configure IPFIX exporter process request
2316     @param client_index - opaque cookie to identify the sender
2317     @param context - sender context, to match reply w/ request
2318     @param collector_address - address of IPFIX collector
2319     @param collector_port - port of IPFIX collector
2320     @param src_address - address of IPFIX exporter
2321     @param vrf_id - VRF / fib table ID
2322     @param path_mtu - Path MTU between exporter and collector
2323     @param template_interval - number of seconds after which to resend template
2324     @param udp_checksum - UDP checksum calculation enable flag
2325 */
2326 define set_ipfix_exporter
2327 {
2328   u32 client_index;
2329   u32 context;
2330   u8 collector_address[16];
2331   u16 collector_port;
2332   u8 src_address[16];
2333   u32 vrf_id;
2334   u32 path_mtu;
2335   u32 template_interval;
2336   u8 udp_checksum;
2337 };
2338
2339 /** \brief Reply to IPFIX exporter configure request
2340     @param context - sender context which was passed in the request
2341 */
2342 define set_ipfix_exporter_reply
2343 {
2344   u32 context;
2345   i32 retval;
2346 };
2347
2348 /** \brief IPFIX exporter dump request
2349     @param client_index - opaque cookie to identify the sender
2350     @param context - sender context, to match reply w/ request
2351 */
2352 define ipfix_exporter_dump
2353 {
2354   u32 client_index;
2355   u32 context;
2356 };
2357
2358 /** \brief Reply to IPFIX exporter dump request
2359     @param context - sender context which was passed in the request
2360     @param collector_address - address of IPFIX collector
2361     @param collector_port - port of IPFIX collector
2362     @param src_address - address of IPFIX exporter
2363     @param fib_index - fib table index
2364     @param path_mtu - Path MTU between exporter and collector
2365     @param template_interval - number of seconds after which to resend template
2366     @param udp_checksum - UDP checksum calculation enable flag
2367 */
2368 define ipfix_exporter_details
2369 {
2370   u32 context;
2371   u8 collector_address[16];
2372   u16 collector_port;
2373   u8 src_address[16];
2374   u32 vrf_id;
2375   u32 path_mtu;
2376   u32 template_interval;
2377   u8 udp_checksum;
2378 };
2379
2380 /** \brief IPFIX classify stream configure request
2381     @param client_index - opaque cookie to identify the sender
2382     @param context - sender context, to match reply w/ request
2383     @param domain_id - domain ID reported in IPFIX messages for classify stream
2384     @param src_port - source port of UDP session for classify stream
2385 */
2386 define set_ipfix_classify_stream {
2387     u32 client_index;
2388     u32 context;
2389     u32 domain_id;
2390     u16 src_port;
2391 };
2392
2393 /** \brief IPFIX classify stream configure response
2394     @param context - sender context, to match reply w/ request
2395     @param retval - return value for request
2396 */
2397 define set_ipfix_classify_stream_reply {
2398     u32 context;
2399     i32 retval;
2400 };
2401
2402 /** \brief IPFIX classify stream dump request
2403     @param client_index - opaque cookie to identify the sender
2404     @param context - sender context, to match reply w/ request
2405 */
2406 define ipfix_classify_stream_dump {
2407     u32 client_index;
2408     u32 context;
2409 };
2410
2411 /** \brief Reply to IPFIX classify stream dump request
2412     @param context - sender context, to match reply w/ request
2413     @param domain_id - domain ID reported in IPFIX messages for classify stream
2414     @param src_port - source port of UDP session for classify stream
2415 */
2416 define ipfix_classify_stream_details {
2417     u32 context;
2418     u32 domain_id;
2419     u16 src_port;
2420 };
2421
2422 /** \brief IPFIX add or delete classifier table request
2423     @param client_index - opaque cookie to identify the sender
2424     @param context - sender context, to match reply w/ request
2425     @param table_id - classifier table ID
2426     @param ip_version - version of IP used in the classifier table
2427     @param transport_protocol - transport protocol used in the classifier table or 255 for unspecified
2428 */
2429 define ipfix_classify_table_add_del {
2430     u32 client_index;
2431     u32 context;
2432     u32 table_id;
2433     u8 ip_version;
2434     u8 transport_protocol;
2435     u8 is_add;
2436 };
2437
2438 /** \brief IPFIX add classifier table response
2439     @param context - sender context which was passed in the request
2440 */
2441 define ipfix_classify_table_add_del_reply {
2442     u32 context;
2443     i32 retval;
2444 };
2445
2446 /** \brief IPFIX classify tables dump request
2447     @param client_index - opaque cookie to identify the sender
2448     @param context - sender context, to match reply w/ request
2449 */
2450 define ipfix_classify_table_dump {
2451     u32 client_index;
2452     u32 context;
2453 };
2454
2455 /** \brief Reply to IPFIX classify tables dump request
2456     @param context - sender context, to match reply w/ request
2457     @param table_id - classifier table ID
2458     @param ip_version - version of IP used in the classifier table
2459     @param transport_protocol - transport protocol used in the classifier table or 255 for unspecified
2460 */
2461 define ipfix_classify_table_details {
2462     u32 context;
2463     u32 table_id;
2464     u8 ip_version;
2465     u8 transport_protocol;
2466 };
2467
2468 /** \brief Set/unset flow classify interface
2469     @param client_index - opaque cookie to identify the sender
2470     @param context - sender context, to match reply w/ request
2471     @param sw_if_index - interface to set/unset flow classify
2472     @param ip4_table_index - ip4 classify table index (~0 for skip)
2473     @param ip6_table_index - ip6 classify table index (~0 for skip)
2474     @param l2_table_index  -  l2 classify table index (~0 for skip)
2475     @param is_add - Set if non-zero, else unset
2476     Note: User is recommeneded to use just one valid table_index per call.
2477           (ip4_table_index, ip6_table_index, or l2_table_index)
2478 */
2479 define flow_classify_set_interface {
2480     u32 client_index;
2481     u32 context;
2482     u32 sw_if_index;
2483     u32 ip4_table_index;
2484     u32 ip6_table_index;
2485     u8  is_add;
2486 };
2487
2488 /** \brief Set/unset flow classify interface response
2489     @param context - sender context, to match reply w/ request
2490     @param retval - return value for request
2491 */
2492 define flow_classify_set_interface_reply {
2493     u32 context;
2494     i32 retval;
2495 };
2496
2497 /** \brief Get list of flow classify interfaces and tables
2498     @param client_index - opaque cookie to identify the sender
2499     @param context - sender context, to match reply w/ request
2500     @param type - classify table type
2501 */
2502 define flow_classify_dump {
2503     u32 client_index;
2504     u32 context;
2505     u8 type;
2506 };
2507
2508 /** \brief Flow classify operational state response.
2509     @param context - sender context, to match reply w/ request
2510     @param sw_if_index - software interface index
2511     @param table_index - classify table index
2512 */
2513 define flow_classify_details {
2514     u32 context;
2515     u32 sw_if_index;
2516     u32 table_index;
2517 };
2518
2519 /** \brief Query relative index via node names
2520     @param client_index - opaque cookie to identify the sender
2521     @param context - sender context, to match reply w/ request
2522     @param node_name - name of node to find relative index from
2523     @param next_name - next node from node_name to find relative index of
2524 */
2525 define get_next_index
2526 {
2527   u32 client_index;
2528   u32 context;
2529   u8 node_name[64];
2530   u8 next_name[64];
2531 };
2532
2533 /** \brief Reply for get next node index
2534     @param context - sender context which was passed in the request
2535     @param retval - return value
2536     @param next_index - index of the next_node
2537 */
2538 define get_next_index_reply
2539 {
2540   u32 context;
2541   i32 retval;
2542   u32 next_index;
2543 };
2544
2545 /** \brief PacketGenerator create interface request
2546     @param client_index - opaque cookie to identify the sender
2547     @param context - sender context, to match reply w/ request
2548     @param interface_id - interface index
2549 */
2550 define pg_create_interface
2551 {
2552   u32 client_index;
2553   u32 context;
2554   u32 interface_id;
2555 };
2556
2557 /** \brief PacketGenerator create interface response
2558     @param context - sender context, to match reply w/ request
2559     @param retval - return value for request
2560 */
2561 define pg_create_interface_reply
2562 {
2563   u32 context;
2564   i32 retval;
2565   u32 sw_if_index;
2566 };
2567
2568 /** \brief PacketGenerator capture packets on given interface request
2569     @param client_index - opaque cookie to identify the sender
2570     @param context - sender context, to match reply w/ request
2571     @param interface_id - pg interface index
2572     @param is_enabled - 1 if enabling streams, 0 if disabling
2573     @param count - number of packets to be captured
2574     @param pcap_file - pacp file name to store captured packets
2575 */
2576 define pg_capture
2577 {
2578   u32 client_index;
2579   u32 context;
2580   u32 interface_id;
2581   u8 is_enabled;
2582   u32 count;
2583   u32 pcap_name_length;
2584   u8 pcap_file_name[pcap_name_length];
2585 };
2586
2587 /** \brief PacketGenerator capture packets response
2588     @param context - sender context, to match reply w/ request
2589     @param retval - return value for request
2590 */
2591 define pg_capture_reply
2592 {
2593   u32 context;
2594   i32 retval;
2595 };
2596
2597 /** \brief Enable / disable packet generator request
2598     @param client_index - opaque cookie to identify the sender
2599     @param context - sender context, to match reply w/ request
2600     @param is_enabled - 1 if enabling streams, 0 if disabling
2601     @param stream - stream name to be enable/disabled, if not specified handle all streams
2602 */
2603 define pg_enable_disable
2604 {
2605   u32 client_index;
2606   u32 context;
2607   u8 is_enabled;
2608   u32 stream_name_length;
2609   u8 stream_name[stream_name_length];
2610 };
2611
2612 /** \brief Reply for enable / disable packet generator
2613     @param context - returned sender context, to match reply w/ request
2614     @param retval - return code
2615 */
2616 define pg_enable_disable_reply
2617 {
2618   u32 context;
2619   i32 retval;
2620 };
2621
2622 /** \brief Configure IP source and L4 port-range check
2623     @param client_index - opaque cookie to identify the sender
2624     @param context - sender context, to match reply w/ request
2625     @param is_ip6 - 1 if source address type is IPv6
2626     @param is_add - 1 if add, 0 if delete
2627     @param mask_length - mask length for address entry
2628     @param address - array of address bytes
2629     @param number_of_ranges - length of low_port and high_port arrays (must match)
2630     @param low_ports[32] - up to 32 low end of port range entries (must have corresponding high_ports entry)
2631     @param high_ports[32] - up to 32 high end of port range entries (must have corresponding low_ports entry)
2632     @param vrf_id - fib table/vrf id to associate the source and port-range check with
2633     @note To specify a single port set low_port and high_port entry the same
2634 */
2635 define ip_source_and_port_range_check_add_del
2636 {
2637   u32 client_index;
2638   u32 context;
2639   u8 is_ipv6;
2640   u8 is_add;
2641   u8 mask_length;
2642   u8 address[16];
2643   u8 number_of_ranges;
2644   u16 low_ports[32];
2645   u16 high_ports[32];
2646   u32 vrf_id;
2647 };
2648
2649 /** \brief Configure IP source and L4 port-range check reply
2650     @param context - returned sender context, to match reply w/ request
2651     @param retval - return code
2652 */
2653 define ip_source_and_port_range_check_add_del_reply
2654 {
2655   u32 context;
2656   i32 retval;
2657 };
2658
2659 /** \brief Set interface source and L4 port-range request
2660     @param client_index - opaque cookie to identify the sender
2661     @param context - sender context, to match reply w/ request
2662     @param interface_id - interface index
2663     @param tcp_vrf_id - VRF associated with source and TCP port-range check
2664     @param udp_vrf_id - VRF associated with source and TCP port-range check
2665 */
2666 define ip_source_and_port_range_check_interface_add_del
2667 {
2668   u32 client_index;
2669   u32 context;
2670   u8 is_add;
2671   u32 sw_if_index;
2672   u32 tcp_in_vrf_id;
2673   u32 tcp_out_vrf_id;
2674   u32 udp_in_vrf_id;
2675   u32 udp_out_vrf_id;
2676 };
2677
2678 /** \brief Set interface source and L4 port-range response
2679     @param context - sender context, to match reply w/ request
2680     @param retval - return value for request
2681 */
2682 define ip_source_and_port_range_check_interface_add_del_reply
2683 {
2684   u32 context;
2685   i32 retval;
2686 };
2687
2688 /** \brief Delete sub interface request
2689     @param client_index - opaque cookie to identify the sender
2690     @param context - sender context, to match reply w/ request
2691     @param sw_if_index - sw index of the interface that was created by create_subif
2692 */
2693 define delete_subif {
2694   u32 client_index;
2695   u32 context;
2696   u32 sw_if_index;
2697 };
2698
2699 /** \brief Delete sub interface response
2700     @param context - sender context, to match reply w/ request
2701     @param retval - return code for the request
2702 */
2703 define delete_subif_reply {
2704   u32 context;
2705   i32 retval;
2706 };
2707
2708 /** \brief DPDK interface HQoS pipe profile set request
2709     @param client_index - opaque cookie to identify the sender
2710     @param context - sender context, to match reply w/ request
2711     @param sw_if_index - the interface
2712     @param subport - subport ID
2713     @param pipe - pipe ID within its subport
2714     @param profile - pipe profile ID
2715 */
2716 define sw_interface_set_dpdk_hqos_pipe {
2717     u32 client_index;
2718     u32 context;
2719     u32 sw_if_index;
2720     u32 subport;
2721     u32 pipe;
2722     u32 profile;
2723 };
2724
2725 /** \brief DPDK interface HQoS pipe profile set reply
2726     @param context - sender context, to match reply w/ request
2727     @param retval - request return code
2728 */
2729 define sw_interface_set_dpdk_hqos_pipe_reply {
2730     u32 context;
2731     i32 retval;
2732 };
2733
2734 /** \brief DPDK interface HQoS subport parameters set request
2735     @param client_index - opaque cookie to identify the sender
2736     @param context - sender context, to match reply w/ request
2737     @param sw_if_index - the interface
2738     @param subport - subport ID
2739     @param tb_rate - subport token bucket rate (measured in bytes/second)
2740     @param tb_size - subport token bucket size (measured in credits)
2741     @param tc_rate - subport traffic class 0 .. 3 rates (measured in bytes/second)
2742     @param tc_period - enforcement period for rates (measured in milliseconds)
2743 */
2744 define sw_interface_set_dpdk_hqos_subport {
2745     u32 client_index;
2746     u32 context;
2747     u32 sw_if_index;
2748     u32 subport;
2749     u32 tb_rate;
2750     u32 tb_size;
2751     u32 tc_rate[4];
2752     u32 tc_period;
2753 };
2754
2755 /** \brief DPDK interface HQoS subport parameters set reply
2756     @param context - sender context, to match reply w/ request
2757     @param retval - request return code
2758 */
2759 define sw_interface_set_dpdk_hqos_subport_reply {
2760     u32 context;
2761     i32 retval;
2762 };
2763
2764 /** \brief DPDK interface HQoS tctbl entry set request
2765     @param client_index - opaque cookie to identify the sender
2766     @param context - sender context, to match reply w/ request
2767     @param sw_if_index - the interface
2768     @param entry - entry index ID
2769     @param tc - traffic class (0 .. 3)
2770     @param queue - traffic class queue (0 .. 3)
2771 */
2772 define sw_interface_set_dpdk_hqos_tctbl {
2773     u32 client_index;
2774     u32 context;
2775     u32 sw_if_index;
2776     u32 entry;
2777     u32 tc;
2778     u32 queue;
2779 };
2780
2781 /** \brief DPDK interface HQoS tctbl entry set reply
2782     @param context - sender context, to match reply w/ request
2783     @param retval - request return code
2784 */
2785 define sw_interface_set_dpdk_hqos_tctbl_reply {
2786     u32 context;
2787     i32 retval;
2788 };
2789
2790 /** \brief L2 interface pbb tag rewrite configure request
2791     @param client_index - opaque cookie to identify the sender
2792     @param context - sender context, to match reply w/ request
2793     @param sw_if_index - interface the operation is applied to
2794     @param vtr_op - Choose from l2_vtr_op_t enum values
2795     @param inner_tag - needed for translate_qinq vtr op only
2796     @param outer_tag - needed for translate_qinq vtr op only 
2797     @param b_dmac - B-tag remote mac address, needed for any push or translate_qinq vtr op
2798     @param b_smac - B-tag local mac address, needed for any push or translate qinq vtr op
2799     @param b_vlanid - B-tag vlanid, needed for any push or translate qinq vtr op
2800     @param i_sid - I-tag service id, needed for any push or translate qinq vtr op
2801 */
2802 define l2_interface_pbb_tag_rewrite
2803 {
2804   u32 client_index;
2805   u32 context;
2806   u32 sw_if_index;
2807   u32 vtr_op;
2808   u16 outer_tag;
2809   u8  b_dmac[6];
2810   u8  b_smac[6];
2811   u16 b_vlanid;
2812   u32 i_sid;
2813 };
2814
2815 /** \brief L2 interface pbb tag rewrite response
2816     @param context - sender context, to match reply w/ request
2817     @param retval - return code for the request
2818 */
2819 define l2_interface_pbb_tag_rewrite_reply
2820 {
2821   u32 context;
2822   i32 retval;
2823 };
2824
2825 /** \brief Punt traffic to the host
2826     @param client_index - opaque cookie to identify the sender
2827     @param context - sender context, to match reply w/ request
2828     @param is_add - add punt if non-zero, else delete
2829     @param ipv - L3 protocol 4 - IPv4, 6 - IPv6, ~0 - All
2830     @param l4_protocol - L4 protocol to be punted, only UDP (0x11) is supported
2831     @param l4_port - TCP/UDP port to be punted
2832 */
2833 define punt {
2834     u32 client_index;
2835     u32 context;
2836     u8 is_add;
2837     u8 ipv;
2838     u8 l4_protocol;
2839     u16 l4_port;
2840 };
2841
2842 /** \brief Reply to the punt request
2843     @param context - sender context which was passed in the request
2844     @param retval - return code of punt request
2845 */
2846 define punt_reply
2847 {
2848     u32 context;
2849     i32 retval;
2850 };
2851
2852 /** \brief Feature path enable/disable request
2853     @param client_index - opaque cookie to identify the sender
2854     @param context - sender context, to match reply w/ request
2855     @param sw_if_index - the interface
2856     @param enable - 1 = on, 0 = off
2857 */
2858 define feature_enable_disable {
2859     u32 client_index;
2860     u32 context;
2861     u32 sw_if_index;
2862     u8 enable;
2863     u8 arc_name[64];
2864     u8 feature_name[64];
2865 };
2866
2867 /** \brief Reply to the eature path enable/disable request
2868     @param context - sender context which was passed in the request
2869     @param retval - return code for the request
2870 */
2871 define feature_enable_disable_reply
2872 {
2873     u32 context;
2874     i32 retval;
2875 };
2876
2877 /*
2878  * Local Variables:
2879  * eval: (c-set-style "gnu")
2880  * End:
2881  */