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