API refactoring : flow
[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 .../src/vnet/{interface.api,interface_api.c}
26  * IP APIs: see .../src/vnet/ip/{ip.api, ip_api.c}
27  * TAP APIs: see .../src/vnet/unix/{tap.api, tap_api.c}
28  * VXLAN APIs: see .../src/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 ... /src/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 .../src/vnet/vxlan-gpe/{vxlan_gpe.api, vxlan_gpe_api.c}
33  * GRE APIs: see .../src/vnet/gre/{gre.api, gre_api.c}
34  * L2 APIs: see .../src/vnet/l2/{l2.api, l2_api.c}
35  * L2TP APIs: see .../src/vnet/l2tp/{l2tp.api, l2tp_api.c}
36  * BFD APIs: see .../src/vnet/bfd/{bfd.api, bfd_api.c}
37  * IPSEC APIs: see .../src/vnet/ipsec/{ipsec.api, ipsec_api.c}
38  * IPSEC-GRE APIs: see .../src/vnet/ipsec-gre/{ipsec_gre.api, ipsec_gre_api.c}
39  * LISP APIs: see .../src/vnet/lisp/{lisp.api, lisp_api.c}
40  * LISP-GPE APIs: see .../src/vnet/lisp-gpe/{lisp_gpe.api, lisp_gpe_api.c}
41  * MPLS APIs: see .../src/vnet/mpls/{mpls.api, mpls_api.c}
42  * SR APIs: see .../src/vnet/sr/{sr.api, sr_api.c}
43  * DPDK APIs: see ... /src/vnet/devices/dpdk/{dpdk.api, dpdk_api.c}
44  * CLASSIFY APIs: see ... /src/vnet/classify/{classify.api, classify_api.c}
45  * FLOW APIs: see ... /src/vnet/flow/{flow.api, flow_api.c}
46  */
47
48 /** \brief Create a new subinterface with the given vlan id
49     @param client_index - opaque cookie to identify the sender
50     @param context - sender context, to match reply w/ request
51     @param sw_if_index - software index of the new vlan's parent interface
52     @param vlan_id - vlan tag of the new interface
53 */
54 define create_vlan_subif
55 {
56   u32 client_index;
57   u32 context;
58   u32 sw_if_index;
59   u32 vlan_id;
60 };
61
62 /** \brief Reply for the vlan subinterface create request
63     @param context - returned sender context, to match reply w/ request
64     @param retval - return code
65     @param sw_if_index - software index allocated for the new subinterface
66 */
67 define create_vlan_subif_reply
68 {
69   u32 context;
70   i32 retval;
71   u32 sw_if_index;
72 };
73
74 /** \brief Enable or Disable MPLS on and interface
75     @param client_index - opaque cookie to identify the sender
76     @param context - sender context, to match reply w/ request
77     @param sw_if_index - index of the interface
78     @param enable - if non-zero enable, else disable
79 */
80 define sw_interface_set_mpls_enable
81 {
82   u32 client_index;
83   u32 context;
84   u32 sw_if_index;
85   u8 enable;
86 };
87
88 /** \brief Reply for MPLS state on an interface
89     @param context - returned sender context, to match reply w/ request
90     @param retval - return code
91 */
92 define sw_interface_set_mpls_enable_reply
93 {
94   u32 context;
95   i32 retval;
96 };
97
98 /** \brief Proxy ARP add / del request
99     @param client_index - opaque cookie to identify the sender
100     @param context - sender context, to match reply w/ request
101     @param vrf_id - VRF / Fib table ID
102     @param is_add - 1 if adding the Proxy ARP range, 0 if deleting
103     @param low_address[4] - Low address of the Proxy ARP range
104     @param hi_address[4] - High address of the Proxy ARP range
105 */
106 define proxy_arp_add_del
107 {
108   u32 client_index;
109   u32 context;
110   u32 vrf_id;
111   u8 is_add;
112   u8 low_address[4];
113   u8 hi_address[4];
114 };
115
116 /** \brief Reply for proxy arp add / del request
117     @param context - returned sender context, to match reply w/ request
118     @param retval - return code
119 */
120 define proxy_arp_add_del_reply
121 {
122   u32 context;
123   i32 retval;
124 };
125
126 /** \brief Proxy ARP add / del request
127     @param client_index - opaque cookie to identify the sender
128     @param context - sender context, to match reply w/ request
129     @param sw_if_index - Which interface to enable / disable Proxy Arp on
130     @param enable_disable - 1 to enable Proxy ARP on interface, 0 to disable
131 */
132 define proxy_arp_intfc_enable_disable
133 {
134   u32 client_index;
135   u32 context;
136   u32 sw_if_index;
137   /* 1 = on, 0 = off */
138   u8 enable_disable;
139 };
140
141 /** \brief Reply for Proxy ARP interface enable / disable request
142     @param context - returned sender context, to match reply w/ request
143     @param retval - return code
144 */
145 define proxy_arp_intfc_enable_disable_reply
146 {
147   u32 context;
148   i32 retval;
149 };
150
151 /** \brief Reset VRF (remove all routes etc) request
152     @param client_index - opaque cookie to identify the sender
153     @param context - sender context, to match reply w/ request
154     @param is_ipv6 - 1 for IPv6 neighbor, 0 for IPv4
155     @param vrf_id - ID of th FIB table / VRF to reset
156 */
157 define reset_vrf
158 {
159   u32 client_index;
160   u32 context;
161   u8 is_ipv6;
162   u32 vrf_id;
163 };
164
165 /** \brief Reply for Reset VRF request
166     @param context - returned sender context, to match reply w/ request
167     @param retval - return code
168 */
169 define reset_vrf_reply
170 {
171   u32 context;
172   i32 retval;
173 };
174
175 /** \brief Is Address Reachable request - DISABLED
176     @param client_index - opaque cookie to identify the sender
177     @param context - sender context, to match reply w/ request
178     @param next_hop_sw_if_index - index of interface used to get to next hop
179     @param is_ipv6 - 1 for IPv6, 0 for IPv4
180     @param is_error - address not found or does not match intf
181     @param address[] - Address in question 
182 */
183 define is_address_reachable
184 {
185   u32 client_index;             /* (api_main_t *) am->my_client_index */
186   u32 context;
187   u32 next_hop_sw_if_index;
188   u8 is_known;                  /* on reply, this is the answer */
189   u8 is_ipv6;
190   u8 is_error;                  /* address not found or does not match intf */
191   u8 address[16];
192 };
193
194 /** \brief Want Stats, register for stats updates
195     @param client_index - opaque cookie to identify the sender
196     @param context - sender context, to match reply w/ request
197     @param enable_disable - 1 = enable stats, 0 = disable
198     @param pid - pid of process requesting stats updates
199 */
200 define want_stats
201 {
202   u32 client_index;
203   u32 context;
204   u32 enable_disable;
205   u32 pid;
206 };
207
208 /** \brief Reply for Want Stats request
209     @param context - returned sender context, to match reply w/ request
210     @param retval - return code
211 */
212 define want_stats_reply
213 {
214   u32 context;
215   i32 retval;
216 };
217
218 typeonly manual_print manual_endian define ip4_fib_counter
219 {
220   u32 address;
221   u8 address_length;
222   u64 packets;
223   u64 bytes;
224 };
225
226 manual_print manual_endian define vnet_ip4_fib_counters
227 {
228   u32 vrf_id;
229   u32 count;
230   vl_api_ip4_fib_counter_t c[count];
231 };
232
233 typeonly manual_print manual_endian define ip6_fib_counter
234 {
235   u64 address[2];
236   u8 address_length;
237   u64 packets;
238   u64 bytes;
239 };
240
241 manual_print manual_endian define vnet_ip6_fib_counters
242 {
243   u32 vrf_id;
244   u32 count;
245   vl_api_ip6_fib_counter_t c[count];
246 };
247
248 /** \brief Request for a single block of summary stats
249     @param client_index - opaque cookie to identify the sender
250     @param context - sender context, to match reply w/ request
251 */
252 define vnet_get_summary_stats
253 {
254   u32 client_index;
255   u32 context;
256 };
257
258 /** \brief Reply for vnet_get_summary_stats request
259     @param context - sender context, to match reply w/ request
260     @param retval - return code for request
261     @param total_pkts -  
262     @param total_bytes -
263     @param vector_rate - 
264 */
265 define vnet_summary_stats_reply
266 {
267   u32 context;
268   i32 retval;
269   u64 total_pkts[2];
270   u64 total_bytes[2];
271   f64 vector_rate;
272 };
273
274 /** \brief OAM event structure
275     @param dst_address[] - 
276     @param state
277 */
278 define oam_event
279 {
280   u8 dst_address[4];
281   u8 state;
282 };
283
284 /** \brief Want OAM events request
285     @param client_index - opaque cookie to identify the sender
286     @param context - sender context, to match reply w/ request
287     @param enable_disable- enable if non-zero, else disable
288     @param pid - pid of the requesting process
289 */
290 define want_oam_events
291 {
292   u32 client_index;
293   u32 context;
294   u32 enable_disable;
295   u32 pid;
296 };
297
298 /** \brief Want OAM events response
299     @param context - sender context, to match reply w/ request
300     @param retval - return code for the want oam stats request
301 */
302 define want_oam_events_reply
303 {
304   u32 context;
305   i32 retval;
306 };
307
308 /** \brief OAM add / del target request
309     @param client_index - opaque cookie to identify the sender
310     @param context - sender context, to match reply w/ request
311     @param vrf_id - vrf_id of the target
312     @param src_address[] - source address to use for the updates 
313     @param dst_address[] - destination address of the target
314     @param is_add - add target if non-zero, else delete
315 */
316 define oam_add_del
317 {
318   u32 client_index;
319   u32 context;
320   u32 vrf_id;
321   u8 src_address[4];
322   u8 dst_address[4];
323   u8 is_add;
324 };
325
326 /** \brief OAM add / del target response
327     @param context - sender context, to match reply w/ request
328     @param retval - return code of the request
329 */
330 define oam_add_del_reply
331 {
332   u32 context;
333   i32 retval;
334 };
335
336 /** \brief Reset fib table request
337     @param client_index - opaque cookie to identify the sender
338     @param context - sender context, to match reply w/ request
339     @param vrf_id - vrf/table id of the fib table to reset
340     @param is_ipv6 - an ipv6 fib to reset if non-zero, else ipv4
341 */
342 define reset_fib
343 {
344   u32 client_index;
345   u32 context;
346   u32 vrf_id;
347   u8 is_ipv6;
348 };
349
350 /** \brief Reset fib response
351     @param context - sender context, to match reply w/ request
352     @param retval - return code for the reset bfib request
353 */
354 define reset_fib_reply
355 {
356   u32 context;
357   i32 retval;
358 };
359
360 /** \brief DHCP Proxy config add / del request
361     @param client_index - opaque cookie to identify the sender
362     @param context - sender context, to match reply w/ request
363     @param vrf_id - vrf id
364     @param if_ipv6 - ipv6 if non-zero, else ipv4
365     @param is_add - add the config if non-zero, else delete
366     @param insert_circuit_id - option82 suboption 1 fib number
367     @param dhcp_server[] - server address
368     @param dhcp_src_address[] - <fix this, need details>
369 */
370 define dhcp_proxy_config
371 {
372   u32 client_index;
373   u32 context;
374   u32 vrf_id;
375   u8 is_ipv6;
376   u8 is_add;
377   u8 insert_circuit_id;
378   u8 dhcp_server[16];
379   u8 dhcp_src_address[16];
380 };
381
382 /** \brief DHCP Proxy config response
383     @param context - sender context, to match reply w/ request
384     @param retval - return code for the request
385 */
386 define dhcp_proxy_config_reply
387 {
388   u32 context;
389   i32 retval;
390 };
391
392 /** \brief DHCP Proxy set / unset vss request
393     @param client_index - opaque cookie to identify the sender
394     @param context - sender context, to match reply w/ request
395     @param tbl_id - table id
396     @param oui - first part of vpn id
397     @param fib_id - second part of vpn id
398     @param is_ipv6 - ip6 if non-zero, else ip4
399     @param is_add - set vss if non-zero, else delete
400 */
401 define dhcp_proxy_set_vss
402 {
403   u32 client_index;
404   u32 context;
405   u32 tbl_id;
406   u32 oui;
407   u32 fib_id;
408   u8 is_ipv6;
409   u8 is_add;
410 };
411
412 /** \brief DHCP proxy set / unset vss response
413     @param context - sender context, to match reply w/ request
414     @param retval - return code for the request
415 */
416 define dhcp_proxy_set_vss_reply
417 {
418   u32 context;
419   i32 retval;
420 };
421
422 /** \brief Create loopback interface request
423     @param client_index - opaque cookie to identify the sender
424     @param context - sender context, to match reply w/ request
425     @param mac_address - mac addr to assign to the interface if none-zero
426 */
427 define create_loopback
428 {
429   u32 client_index;
430   u32 context;
431   u8 mac_address[6];
432 };
433
434 /** \brief Create loopback interface response
435     @param context - sender context, to match reply w/ request
436     @param sw_if_index - sw index of the interface that was created
437     @param retval - return code for the request
438 */
439 define create_loopback_reply
440 {
441   u32 context;
442   i32 retval;
443   u32 sw_if_index;
444 };
445
446 /** \brief Delete loopback interface request
447     @param client_index - opaque cookie to identify the sender
448     @param context - sender context, to match reply w/ request
449     @param sw_if_index - sw index of the interface that was created
450 */
451 define delete_loopback
452 {
453   u32 client_index;
454   u32 context;
455   u32 sw_if_index;
456 };
457
458 /** \brief Delete loopback interface response
459     @param context - sender context, to match reply w/ request
460     @param retval - return code for the request
461 */
462 define delete_loopback_reply
463 {
464   u32 context;
465   i32 retval;
466 };
467
468 /** \brief Control ping from client to api server request
469     @param client_index - opaque cookie to identify the sender
470     @param context - sender context, to match reply w/ request
471 */
472 define control_ping
473 {
474   u32 client_index;
475   u32 context;
476 };
477
478 /** \brief Control ping from the client to the server response
479     @param client_index - opaque cookie to identify the sender
480     @param context - sender context, to match reply w/ request
481     @param retval - return code for the request
482     @param vpe_pid - the pid of the vpe, returned by the server
483 */
484 define control_ping_reply
485 {
486   u32 context;
487   i32 retval;
488   u32 client_index;
489   u32 vpe_pid;
490 };
491
492 /** \brief Process a vpe parser cli string request
493     @param client_index - opaque cookie to identify the sender
494     @param context - sender context, to match reply w/ request
495     @param cmd_in_shmem - pointer to cli command string
496 */
497 define cli_request
498 {
499   u32 client_index;
500   u32 context;
501   u64 cmd_in_shmem;
502 };
503 define cli_inband
504 {
505   u32 client_index;
506   u32 context;
507   u32 length;
508   u8 cmd[length];
509 };
510
511 /** \brief vpe parser cli string response
512     @param context - sender context, to match reply w/ request
513     @param retval - return code for request
514     @param reply_in_shmem - Reply string from cli processing if any
515 */
516 define cli_reply
517 {
518   u32 context;
519   i32 retval;
520   u64 reply_in_shmem;
521 };
522 define cli_inband_reply
523 {
524   u32 context;
525   i32 retval;
526   u32 length;
527   u8 reply[length];
528 };
529
530 /** \brief Set max allowed ARP or ip6 neighbor entries request
531     @param client_index - opaque cookie to identify the sender
532     @param context - sender context, to match reply w/ request
533     @param is_ipv6 - neighbor limit if non-zero, else ARP limit
534     @param arp_neighbor_limit - the new limit, defaults are ~ 50k
535 */
536 define set_arp_neighbor_limit
537 {
538   u32 client_index;
539   u32 context;
540   u8 is_ipv6;
541   u32 arp_neighbor_limit;
542 };
543
544 /** \brief Set max allowed ARP or ip6 neighbor entries response
545     @param context - sender context, to match reply w/ request
546     @param retval - return code for request
547 */
548 define set_arp_neighbor_limit_reply
549 {
550   u32 context;
551   i32 retval;
552 };
553
554 /** \brief L2 interface patch add / del request
555     @param client_index - opaque cookie to identify the sender
556     @param context - sender context, to match reply w/ request
557     @param rx_sw_if_index - receive side interface 
558     @param tx_sw_if_index - transmit side interface
559     @param is_add - if non-zero set up the interface patch, else remove it
560 */
561 define l2_patch_add_del
562 {
563   u32 client_index;
564   u32 context;
565   u32 rx_sw_if_index;
566   u32 tx_sw_if_index;
567   u8 is_add;
568 };
569
570 /** \brief L2 interface patch add / del response
571     @param context - sender context, to match reply w/ request
572     @param retval - return code for the request
573 */
574 define l2_patch_add_del_reply
575 {
576   u32 context;
577   i32 retval;
578 };
579
580 /** \brief Interface set vpath request
581     @param client_index - opaque cookie to identify the sender
582     @param context - sender context, to match reply w/ request
583     @param sw_if_index - interface used to reach neighbor
584     @param enable - if non-zero enable, else disable
585 */
586 define sw_interface_set_vpath
587 {
588   u32 client_index;
589   u32 context;
590   u32 sw_if_index;
591   u8 enable;
592 };
593
594 /** \brief Interface set vpath response
595     @param context - sender context, to match reply w/ request
596     @param retval - return code for the request
597 */
598 define sw_interface_set_vpath_reply
599 {
600   u32 context;
601   i32 retval;
602 };
603
604 /** \brief Set L2 XConnect between two interfaces request
605     @param client_index - opaque cookie to identify the sender
606     @param context - sender context, to match reply w/ request
607     @param rx_sw_if_index - Receive interface index
608     @param tx_sw_if_index - Transmit interface index
609     @param enable - enable xconnect if not 0, else set to L3 mode
610 */
611 define sw_interface_set_l2_xconnect
612 {
613   u32 client_index;
614   u32 context;
615   u32 rx_sw_if_index;
616   u32 tx_sw_if_index;
617   u8 enable;
618 };
619
620 /** \brief Set L2 XConnect response
621     @param context - sender context, to match reply w/ request
622     @param retval - L2 XConnect request return code
623 */
624 define sw_interface_set_l2_xconnect_reply
625 {
626   u32 context;
627   i32 retval;
628 };
629
630 /** \brief Interface bridge mode request
631     @param client_index - opaque cookie to identify the sender
632     @param context - sender context, to match reply w/ request
633     @param rx_sw_if_index - the interface
634     @param bd_id - bridge domain id
635     @param bvi - Setup interface as a bvi, bridge mode only
636     @param shg - Shared horizon group, for bridge mode only
637     @param enable - Enable beige mode if not 0, else set to L3 mode
638 */
639 define sw_interface_set_l2_bridge
640 {
641   u32 client_index;
642   u32 context;
643   u32 rx_sw_if_index;
644   u32 bd_id;
645   u8 shg;
646   u8 bvi;
647   u8 enable;
648 };
649
650 /** \brief Interface bridge mode response
651     @param context - sender context, to match reply w/ request
652     @param retval - Bridge mode request return code
653 */
654 define sw_interface_set_l2_bridge_reply
655 {
656   u32 context;
657   i32 retval;
658 };
659
660 /** \brief Set bridge domain ip to mac entry request
661     @param client_index - opaque cookie to identify the sender
662     @param context - sender context, to match reply w/ request
663     @param bd_id - the bridge domain to set the flags for
664     @param is_add - if non-zero, add the entry, else clear it
665     @param is_ipv6 - if non-zero, ipv6 address, else ipv4 address
666     @param mac_address - MAC address
667     @param 
668 */
669 define bd_ip_mac_add_del
670 {
671   u32 client_index;
672   u32 context;
673   u32 bd_id;
674   u8 is_add;
675   u8 is_ipv6;
676   u8 ip_address[16];
677   u8 mac_address[6];
678 };
679
680 /** \brief Set bridge domain ip to mac entry response
681     @param context - sender context, to match reply w/ request
682     @param retval - return code for the set bridge flags request
683 */
684 define bd_ip_mac_add_del_reply
685 {
686   u32 context;
687   i32 retval;
688 };
689
690 /** \brief Set/unset the classification table for an interface request 
691     @param client_index - opaque cookie to identify the sender
692     @param context - sender context, to match reply w/ request
693     @param is_ipv6 - ipv6 if non-zero, else ipv4
694     @param sw_if_index - interface to associate with the table
695     @param table_index - index of the table, if ~0 unset the table
696 */
697 define classify_set_interface_ip_table
698 {
699   u32 client_index;
700   u32 context;
701   u8 is_ipv6;
702   u32 sw_if_index;
703   u32 table_index;              /* ~0 => off */
704 };
705
706 /** \brief Set/unset interface classification table response 
707     @param context - sender context, to match reply w/ request
708     @param retval - return code
709 */
710 define classify_set_interface_ip_table_reply
711 {
712   u32 context;
713   i32 retval;
714 };
715
716 /** \brief Set/unset l2 classification tables for an interface request
717     @param client_index - opaque cookie to identify the sender
718     @param context - sender context, to match reply w/ request
719     @param sw_if_index - interface to set/unset tables for
720     @param ip4_table_index - ip4 index, use ~0 for all 3 indexes to unset
721     @param ip6_table_index - ip6 index
722     @param other_table_index - other index
723 */
724 define classify_set_interface_l2_tables
725 {
726   u32 client_index;
727   u32 context;
728   u32 sw_if_index;
729   /* 3 x ~0 => off */
730   u32 ip4_table_index;
731   u32 ip6_table_index;
732   u32 other_table_index;
733   u8 is_input;
734 };
735
736 /** \brief Set/unset l2 classification tables for an interface response
737     @param context - sender context, to match reply w/ request
738     @param retval - return code for the request
739 */
740 define classify_set_interface_l2_tables_reply
741 {
742   u32 context;
743   i32 retval;
744 };
745
746 /** \brief Get node index using name request
747     @param client_index - opaque cookie to identify the sender
748     @param context - sender context, to match reply w/ request
749     @param node_name[] - name of the node
750 */
751 define get_node_index
752 {
753   u32 client_index;
754   u32 context;
755   u8 node_name[64];
756 };
757
758 /** \brief Get node index using name request
759     @param context - sender context, to match reply w/ request
760     @param retval - return code for the request
761     @param node_index - index of the desired node if found, else ~0
762 */
763 define get_node_index_reply
764 {
765   u32 context;
766   i32 retval;
767   u32 node_index;
768 };
769
770 /** \brief Set the next node for a given node request
771     @param client_index - opaque cookie to identify the sender
772     @param context - sender context, to match reply w/ request
773     @param node_name[] - node to add the next node to
774     @param next_name[] - node to add as the next node
775 */
776 define add_node_next
777 {
778   u32 client_index;
779   u32 context;
780   u8 node_name[64];
781   u8 next_name[64];
782 };
783
784 /** \brief IP Set the next node for a given node response
785     @param context - sender context, to match reply w/ request
786     @param retval - return code for the add next node request
787     @param next_index - the index of the next node if success, else ~0
788 */
789 define add_node_next_reply
790 {
791   u32 context;
792   i32 retval;
793   u32 next_index;
794 };
795
796 /** \brief DHCP Proxy config 2 add / del request
797     @param client_index - opaque cookie to identify the sender
798     @param context - sender context, to match reply w/ request
799     @param rx_vrf_id - receive vrf id
800     @param server_vrf_id - server vrf id
801     @param if_ipv6 - ipv6 if non-zero, else ipv4
802     @param is_add - add the config if non-zero, else delete
803     @param insert_circuit_id - option82 suboption 1 fib number
804     @param dhcp_server[] - server address
805     @param dhcp_src_address[] - <fix this, need details>
806 */
807 define dhcp_proxy_config_2
808 {
809   u32 client_index;
810   u32 context;
811   u32 rx_vrf_id;
812   u32 server_vrf_id;
813   u8 is_ipv6;
814   u8 is_add;
815   u8 insert_circuit_id;
816   u8 dhcp_server[16];
817   u8 dhcp_src_address[16];
818 };
819
820 /** \brief DHCP Proxy config 2 add / del response
821     @param context - sender context, to match reply w/ request
822     @param retval - return code for request
823 */
824 define dhcp_proxy_config_2_reply
825 {
826   u32 context;
827   i32 retval;
828 };
829
830 /** \brief L2 interface ethernet flow point filtering enable/disable request
831     @param client_index - opaque cookie to identify the sender
832     @param context - sender context, to match reply w/ request
833     @param sw_if_index - interface to enable/disable filtering on
834     @param enable_disable - if non-zero enable filtering, else disable
835 */
836 define l2_interface_efp_filter
837 {
838   u32 client_index;
839   u32 context;
840   u32 sw_if_index;
841   u32 enable_disable;
842 };
843
844 /** \brief L2 interface ethernet flow point filtering response
845     @param context - sender context, to match reply w/ request
846     @param retval - return code for the request
847 */
848 define l2_interface_efp_filter_reply
849 {
850   u32 context;
851   i32 retval;
852 };
853
854 /** \brief L2 interface vlan tag rewrite configure request
855     @param client_index - opaque cookie to identify the sender
856     @param context - sender context, to match reply w/ request
857     @param sw_if_index - interface the operation is applied to
858     @param vtr_op - Choose from l2_vtr_op_t enum values
859     @param push_dot1q - first pushed flag dot1q id set, else dot1ad
860     @param tag1 - Needed for any push or translate vtr op
861     @param tag2 - Needed for any push 2 or translate x-2 vtr ops
862 */
863 define l2_interface_vlan_tag_rewrite
864 {
865   u32 client_index;
866   u32 context;
867   u32 sw_if_index;
868   u32 vtr_op;
869   u32 push_dot1q;               // ethertype of first pushed tag is dot1q/dot1ad
870   u32 tag1;                     // first pushed tag
871   u32 tag2;                     // second pushed tag
872 };
873
874 /** \brief L2 interface vlan tag rewrite response
875     @param context - sender context, to match reply w/ request
876     @param retval - return code for the request
877 */
878 define l2_interface_vlan_tag_rewrite_reply
879 {
880   u32 context;
881   i32 retval;
882 };
883
884 define create_subif
885 {
886   u32 client_index;
887   u32 context;
888   u32 sw_if_index;
889   u32 sub_id;
890
891   /* These fields map directly onto the subif template */
892   u8 no_tags;
893   u8 one_tag;
894   u8 two_tags;
895   u8 dot1ad;                    // 0 = dot1q, 1=dot1ad
896   u8 exact_match;
897   u8 default_sub;
898   u8 outer_vlan_id_any;
899   u8 inner_vlan_id_any;
900   u16 outer_vlan_id;
901   u16 inner_vlan_id;
902 };
903
904 define create_subif_reply
905 {
906   u32 context;
907   i32 retval;
908   u32 sw_if_index;
909 };
910
911 /** \brief show version
912     @param client_index - opaque cookie to identify the sender
913     @param context - sender context, to match reply w/ request
914 */
915 define show_version
916 {
917   u32 client_index;
918   u32 context;
919 };
920
921 /** \brief show version response
922     @param context - sender context, to match reply w/ request
923     @param retval - return code for the request
924     @param program - name of the program (vpe)
925     @param version  - version of the program
926     @param build_directory - root of the workspace where the program was built
927 */
928 define show_version_reply
929 {
930   u32 context;
931   i32 retval;
932   u8 program[32];
933   u8 version[32];
934   u8 build_date[32];
935   u8 build_directory[256];
936 };
937
938 /* Gross kludge, DGMS */
939 define interface_name_renumber
940 {
941   u32 client_index;
942   u32 context;
943   u32 sw_if_index;
944   u32 new_show_dev_instance;
945 };
946
947 define interface_name_renumber_reply
948 {
949   u32 context;
950   i32 retval;
951 };
952
953 /** \brief Register for ip4 arp resolution events
954     @param client_index - opaque cookie to identify the sender
955     @param context - sender context, to match reply w/ request
956     @param enable_disable - 1 => register for events, 0 => cancel registration
957     @param pid - sender's pid
958     @param address - the exact ip4 address of interest
959 */
960 define want_ip4_arp_events
961 {
962   u32 client_index;
963   u32 context;
964   u8 enable_disable;
965   u32 pid;
966   u32 address;
967 };
968
969 /** \brief Reply for interface events registration
970     @param context - returned sender context, to match reply w/ request
971     @param retval - return code
972 */
973 define want_ip4_arp_events_reply
974 {
975   u32 context;
976   i32 retval;
977 };
978
979 /** \brief Tell client about an ip4 arp resolution event
980     @param client_index - opaque cookie to identify the sender
981     @param context - sender context, to match reply w/ request
982     @param address - the exact ip4 address of interest
983     @param pid - client pid registered to receive notification
984     @param sw_if_index - interface which received ARP packet
985     @param new_mac - the new mac address 
986     @param mac_ip - 0: resolution event, 1: mac/ip binding in bd
987 */
988 define ip4_arp_event
989 {
990   u32 client_index;
991   u32 context;
992   u32 address;
993   u32 pid;
994   u32 sw_if_index;
995   u8 new_mac[6];
996   u8 mac_ip;
997 };
998
999 /** \brief Register for ip6 nd resolution events
1000     @param client_index - opaque cookie to identify the sender
1001     @param context - sender context, to match reply w/ request
1002     @param enable_disable - 1 => register for events, 0 => cancel registration
1003     @param pid - sender's pid
1004     @param address - the exact ip6 address of interest
1005 */
1006 define want_ip6_nd_events
1007 {
1008   u32 client_index;
1009   u32 context;
1010   u8 enable_disable;
1011   u32 pid;
1012   u8 address[16];
1013 };
1014
1015 /** \brief Reply for ip6 nd resolution events registration
1016     @param context - returned sender context, to match reply w/ request
1017     @param retval - return code
1018 */
1019 define want_ip6_nd_events_reply
1020 {
1021   u32 context;
1022   i32 retval;
1023 };
1024
1025 /** \brief Tell client about an ip6 nd resolution or mac/ip event
1026     @param client_index - opaque cookie to identify the sender
1027     @param context - sender context, to match reply w/ request
1028     @param pid - client pid registered to receive notification
1029     @param sw_if_index - interface which received ARP packet
1030     @param address - the exact ip6 address of interest
1031     @param new_mac - the new mac address 
1032     @param mac_ip - 0: resolution event, 1: mac/ip binding in bd
1033 */
1034 define ip6_nd_event
1035 {
1036   u32 client_index;
1037   u32 context;
1038   u32 pid;
1039   u32 sw_if_index;
1040   u8 address[16];
1041   u8 new_mac[6];
1042   u8 mac_ip;
1043 };
1044     
1045 /** \brief DHCP Client config add / del request
1046     @param client_index - opaque cookie to identify the sender
1047     @param context - sender context, to match reply w/ request
1048     @param sw_if_index - index of the interface for DHCP client
1049     @param hostname - hostname
1050     @param is_add - add the config if non-zero, else delete
1051     @param want_dhcp_event - DHCP event sent to the sender
1052            via dhcp_compl_event API message if non-zero
1053     @param pid - sender's pid
1054 */
1055 define dhcp_client_config
1056 {
1057   u32 client_index;
1058   u32 context;
1059   u32 sw_if_index;
1060   u8 hostname[64];
1061   u8 is_add;
1062   u8 want_dhcp_event;
1063   u32 pid;
1064 };
1065
1066 /** \brief DHCP Client config response
1067     @param context - sender context, to match reply w/ request
1068     @param retval - return code for the request
1069 */
1070 define dhcp_client_config_reply
1071 {
1072   u32 context;
1073   i32 retval;
1074 };
1075
1076 /** \brief Set/unset input ACL interface
1077     @param client_index - opaque cookie to identify the sender
1078     @param context - sender context, to match reply w/ request
1079     @param sw_if_index - interface to set/unset input ACL
1080     @param ip4_table_index - ip4 classify table index (~0 for skip)
1081     @param ip6_table_index - ip6 classify table index (~0 for skip)
1082     @param l2_table_index  -  l2 classify table index (~0 for skip)
1083     @param is_add - Set input ACL if non-zero, else unset
1084     Note: User is recommeneded to use just one valid table_index per call.
1085           (ip4_table_index, ip6_table_index, or l2_table_index)
1086 */
1087 define input_acl_set_interface
1088 {
1089   u32 client_index;
1090   u32 context;
1091   u32 sw_if_index;
1092   u32 ip4_table_index;
1093   u32 ip6_table_index;
1094   u32 l2_table_index;
1095   u8 is_add;
1096 };
1097
1098 /** \brief Set/unset input ACL interface response
1099     @param context - sender context, to match reply w/ request
1100     @param retval - return code for the request
1101 */
1102 define input_acl_set_interface_reply
1103 {
1104   u32 context;
1105   i32 retval;
1106 };
1107
1108 /** \brief Tell client about a DHCP completion event
1109     @param client_index - opaque cookie to identify the sender
1110     @param pid - client pid registered to receive notification
1111     @param is_ipv6 - if non-zero the address is ipv6, else ipv4
1112     @param host_address - Host IP address
1113     @param router_address - Router IP address
1114     @param host_mac - Host MAC address
1115 */
1116 define dhcp_compl_event
1117 {
1118   u32 client_index;
1119   u32 pid;
1120   u8 hostname[64];
1121   u8 is_ipv6;
1122   u8 host_address[16];
1123   u8 router_address[16];
1124   u8 host_mac[6];
1125 };
1126
1127 /** \brief cop: enable/disable junk filtration features on an interface
1128     @param client_index - opaque cookie to identify the sender
1129     @param context - sender context, to match reply w/ request
1130     @param sw_if_inded - desired interface
1131     @param enable_disable - 1 => enable, 0 => disable
1132 */
1133
1134 define cop_interface_enable_disable
1135 {
1136   u32 client_index;
1137   u32 context;
1138   u32 sw_if_index;
1139   u8 enable_disable;
1140 };
1141
1142 /** \brief cop: interface enable/disable junk filtration reply
1143     @param context - returned sender context, to match reply w/ request
1144     @param retval - return code
1145 */
1146
1147 define cop_interface_enable_disable_reply
1148 {
1149   u32 context;
1150   i32 retval;
1151 };
1152
1153 /** \brief cop: enable/disable whitelist filtration features on an interface
1154     Note: the supplied fib_id must match in order to remove the feature!
1155     
1156     @param client_index - opaque cookie to identify the sender
1157     @param context - sender context, to match reply w/ request
1158     @param sw_if_index - interface handle, physical interfaces only
1159     @param fib_id - fib identifier for the whitelist / blacklist fib
1160     @param ip4 - 1 => enable ip4 filtration, 0=> disable ip4 filtration
1161     @param ip6 - 1 => enable ip6 filtration, 0=> disable ip6 filtration
1162     @param default_cop -  1 => enable non-ip4, non-ip6 filtration 0=> disable it
1163 */
1164
1165 define cop_whitelist_enable_disable
1166 {
1167   u32 client_index;
1168   u32 context;
1169   u32 sw_if_index;
1170   u32 fib_id;
1171   u8 ip4;
1172   u8 ip6;
1173   u8 default_cop;
1174 };
1175
1176 /** \brief cop: interface enable/disable junk filtration reply
1177     @param context - returned sender context, to match reply w/ request
1178     @param retval - return code
1179 */
1180
1181 define cop_whitelist_enable_disable_reply
1182 {
1183   u32 context;
1184   i32 retval;
1185 };
1186
1187 /** \brief get_node_graph - get a copy of the vpp node graph
1188     including the current set of graph arcs.
1189
1190     @param client_index - opaque cookie to identify the sender
1191     @param context - sender context, to match reply w/ request
1192 */
1193
1194 define get_node_graph
1195 {
1196   u32 client_index;
1197   u32 context;
1198 };
1199
1200 /** \brief get_node_graph_reply
1201     @param context - returned sender context, to match reply w/ request
1202     @param retval - return code
1203     @param reply_in_shmem - result from vlib_node_serialize, in shared
1204     memory. Process with vlib_node_unserialize, remember to switch
1205     heaps and free the result.
1206 */
1207
1208 define get_node_graph_reply
1209 {
1210   u32 context;
1211   i32 retval;
1212   u64 reply_in_shmem;
1213 };
1214
1215 /** \brief IOAM enable : Enable in-band OAM
1216     @param id - profile id
1217     @param seqno - To enable Seqno Processing
1218     @param analyse - Enabling analysis of iOAM at decap node 
1219     @param pow_enable - Proof of Work enabled or not flag
1220     @param trace_enable - iOAM Trace enabled or not flag
1221 */
1222 define ioam_enable
1223 {
1224   u32 client_index;
1225   u32 context;
1226   u16 id;
1227   u8 seqno;
1228   u8 analyse;
1229   u8 pot_enable;
1230   u8 trace_enable;
1231   u32 node_id;
1232 };
1233
1234 /** \brief iOAM Trace profile add / del response
1235     @param context - sender context, to match reply w/ request
1236     @param retval - return value for request
1237 */
1238 define ioam_enable_reply
1239 {
1240   u32 context;
1241   i32 retval;
1242 };
1243
1244 /** \brief iOAM disable
1245     @param client_index - opaque cookie to identify the sender
1246     @param context - sender context, to match reply w/ request
1247     @param index - MAP Domain index
1248 */
1249 define ioam_disable
1250 {
1251   u32 client_index;
1252   u32 context;
1253   u16 id;
1254 };
1255
1256 /** \brief iOAM disable response
1257     @param context - sender context, to match reply w/ request
1258     @param retval - return value for request
1259 */
1260 define ioam_disable_reply
1261 {
1262   u32 context;
1263   i32 retval;
1264 };
1265
1266 /** \brief Add/del policer
1267     @param client_index - opaque cookie to identify the sender
1268     @param context - sender context, to match reply w/ request
1269     @param is_add - add policer if non-zero, else delete
1270     @param name - policer name
1271     @param cir - CIR
1272     @param eir - EIR
1273     @param cb - Committed Burst
1274     @param eb - Excess or Peak Burst
1275     @param rate_type - rate type
1276     @param round_type - rounding type
1277     @param type - policer algorithm
1278     @param color_aware - 0=color-blind, 1=color-aware
1279     @param conform_action_type - conform action type
1280     @param conform_dscp - DSCP for conform mar-and-transmit action
1281     @param exceed_action_type - exceed action type
1282     @param exceed_dscp - DSCP for exceed mar-and-transmit action
1283     @param violate_action_type - violate action type
1284     @param violate_dscp - DSCP for violate mar-and-transmit action
1285 */
1286 define policer_add_del
1287 {
1288   u32 client_index;
1289   u32 context;
1290
1291   u8 is_add;
1292   u8 name[64];
1293   u32 cir;
1294   u32 eir;
1295   u64 cb;
1296   u64 eb;
1297   u8 rate_type;
1298   u8 round_type;
1299   u8 type;
1300   u8 color_aware;
1301   u8 conform_action_type;
1302   u8 conform_dscp;
1303   u8 exceed_action_type;
1304   u8 exceed_dscp;
1305   u8 violate_action_type;
1306   u8 violate_dscp;
1307 };
1308
1309 /** \brief Add/del policer response
1310     @param context - sender context, to match reply w/ request
1311     @param retval - return value for request
1312     @param policer_index - for add, returned index of the new policer
1313 */
1314 define policer_add_del_reply
1315 {
1316   u32 context;
1317   i32 retval;
1318   u32 policer_index;
1319 };
1320
1321 /** \brief Get list of policers
1322     @param client_index - opaque cookie to identify the sender
1323     @param context - sender context, to match reply w/ request
1324     @param match_name_valid - if 0 request all policers otherwise use match_name
1325     @param match_name - policer name
1326 */
1327 define policer_dump
1328 {
1329   u32 client_index;
1330   u32 context;
1331
1332   u8 match_name_valid;
1333   u8 match_name[64];
1334 };
1335
1336 /** \brief Policer operational state response.
1337     @param context - sender context, to match reply w/ request
1338     @param name - policer name
1339     @param cir - CIR
1340     @param eir - EIR
1341     @param cb - Committed Burst
1342     @param eb - Excess or Peak Burst
1343     @param rate_type - rate type
1344     @param round_type - rounding type
1345     @param type - policer algorithm
1346     @param conform_action_type - conform action type
1347     @param conform_dscp - DSCP for conform mar-and-transmit action
1348     @param exceed_action_type - exceed action type
1349     @param exceed_dscp - DSCP for exceed mar-and-transmit action
1350     @param violate_action_type - violate action type
1351     @param violate_dscp - DSCP for violate mar-and-transmit action
1352     @param single_rate - 1 = single rate policer, 0 = two rate policer
1353     @param color_aware - for hierarchical policing
1354     @param scale - power-of-2 shift amount for lower rates
1355     @param cir_tokens_per_period - number of tokens for each period
1356     @param pir_tokens_per_period - number of tokens for each period for 2-rate policer
1357     @param current_limit - current limit
1358     @param current_bucket - current bucket
1359     @param extended_limit - extended limit
1360     @param extended_bucket - extended bucket
1361     @param last_update_time - last update time
1362 */
1363 define policer_details
1364 {
1365   u32 context;
1366
1367   u8 name[64];
1368   u32 cir;
1369   u32 eir;
1370   u64 cb;
1371   u64 eb;
1372   u8 rate_type;
1373   u8 round_type;
1374   u8 type;
1375   u8 conform_action_type;
1376   u8 conform_dscp;
1377   u8 exceed_action_type;
1378   u8 exceed_dscp;
1379   u8 violate_action_type;
1380   u8 violate_dscp;
1381   u8 single_rate;
1382   u8 color_aware;
1383   u32 scale;
1384   u32 cir_tokens_per_period;
1385   u32 pir_tokens_per_period;
1386   u32 current_limit;
1387   u32 current_bucket;
1388   u32 extended_limit;
1389   u32 extended_bucket;
1390   u64 last_update_time;
1391 };
1392
1393 /** \brief Query relative index via node names
1394     @param client_index - opaque cookie to identify the sender
1395     @param context - sender context, to match reply w/ request
1396     @param node_name - name of node to find relative index from
1397     @param next_name - next node from node_name to find relative index of
1398 */
1399 define get_next_index
1400 {
1401   u32 client_index;
1402   u32 context;
1403   u8 node_name[64];
1404   u8 next_name[64];
1405 };
1406
1407 /** \brief Reply for get next node index
1408     @param context - sender context which was passed in the request
1409     @param retval - return value
1410     @param next_index - index of the next_node
1411 */
1412 define get_next_index_reply
1413 {
1414   u32 context;
1415   i32 retval;
1416   u32 next_index;
1417 };
1418
1419 /** \brief PacketGenerator create interface request
1420     @param client_index - opaque cookie to identify the sender
1421     @param context - sender context, to match reply w/ request
1422     @param interface_id - interface index
1423 */
1424 define pg_create_interface
1425 {
1426   u32 client_index;
1427   u32 context;
1428   u32 interface_id;
1429 };
1430
1431 /** \brief PacketGenerator create interface response
1432     @param context - sender context, to match reply w/ request
1433     @param retval - return value for request
1434 */
1435 define pg_create_interface_reply
1436 {
1437   u32 context;
1438   i32 retval;
1439   u32 sw_if_index;
1440 };
1441
1442 /** \brief PacketGenerator capture packets on given interface request
1443     @param client_index - opaque cookie to identify the sender
1444     @param context - sender context, to match reply w/ request
1445     @param interface_id - pg interface index
1446     @param is_enabled - 1 if enabling streams, 0 if disabling
1447     @param count - number of packets to be captured
1448     @param pcap_file - pacp file name to store captured packets
1449 */
1450 define pg_capture
1451 {
1452   u32 client_index;
1453   u32 context;
1454   u32 interface_id;
1455   u8 is_enabled;
1456   u32 count;
1457   u32 pcap_name_length;
1458   u8 pcap_file_name[pcap_name_length];
1459 };
1460
1461 /** \brief PacketGenerator capture packets response
1462     @param context - sender context, to match reply w/ request
1463     @param retval - return value for request
1464 */
1465 define pg_capture_reply
1466 {
1467   u32 context;
1468   i32 retval;
1469 };
1470
1471 /** \brief Enable / disable packet generator request
1472     @param client_index - opaque cookie to identify the sender
1473     @param context - sender context, to match reply w/ request
1474     @param is_enabled - 1 if enabling streams, 0 if disabling
1475     @param stream - stream name to be enable/disabled, if not specified handle all streams
1476 */
1477 define pg_enable_disable
1478 {
1479   u32 client_index;
1480   u32 context;
1481   u8 is_enabled;
1482   u32 stream_name_length;
1483   u8 stream_name[stream_name_length];
1484 };
1485
1486 /** \brief Reply for enable / disable packet generator
1487     @param context - returned sender context, to match reply w/ request
1488     @param retval - return code
1489 */
1490 define pg_enable_disable_reply
1491 {
1492   u32 context;
1493   i32 retval;
1494 };
1495
1496 /** \brief Configure IP source and L4 port-range check
1497     @param client_index - opaque cookie to identify the sender
1498     @param context - sender context, to match reply w/ request
1499     @param is_ip6 - 1 if source address type is IPv6
1500     @param is_add - 1 if add, 0 if delete
1501     @param mask_length - mask length for address entry
1502     @param address - array of address bytes
1503     @param number_of_ranges - length of low_port and high_port arrays (must match)
1504     @param low_ports[32] - up to 32 low end of port range entries (must have corresponding high_ports entry)
1505     @param high_ports[32] - up to 32 high end of port range entries (must have corresponding low_ports entry)
1506     @param vrf_id - fib table/vrf id to associate the source and port-range check with
1507     @note To specify a single port set low_port and high_port entry the same
1508 */
1509 define ip_source_and_port_range_check_add_del
1510 {
1511   u32 client_index;
1512   u32 context;
1513   u8 is_ipv6;
1514   u8 is_add;
1515   u8 mask_length;
1516   u8 address[16];
1517   u8 number_of_ranges;
1518   u16 low_ports[32];
1519   u16 high_ports[32];
1520   u32 vrf_id;
1521 };
1522
1523 /** \brief Configure IP source and L4 port-range check reply
1524     @param context - returned sender context, to match reply w/ request
1525     @param retval - return code
1526 */
1527 define ip_source_and_port_range_check_add_del_reply
1528 {
1529   u32 context;
1530   i32 retval;
1531 };
1532
1533 /** \brief Set interface source and L4 port-range request
1534     @param client_index - opaque cookie to identify the sender
1535     @param context - sender context, to match reply w/ request
1536     @param interface_id - interface index
1537     @param tcp_vrf_id - VRF associated with source and TCP port-range check
1538     @param udp_vrf_id - VRF associated with source and TCP port-range check
1539 */
1540 define ip_source_and_port_range_check_interface_add_del
1541 {
1542   u32 client_index;
1543   u32 context;
1544   u8 is_add;
1545   u32 sw_if_index;
1546   u32 tcp_in_vrf_id;
1547   u32 tcp_out_vrf_id;
1548   u32 udp_in_vrf_id;
1549   u32 udp_out_vrf_id;
1550 };
1551
1552 /** \brief Set interface source and L4 port-range response
1553     @param context - sender context, to match reply w/ request
1554     @param retval - return value for request
1555 */
1556 define ip_source_and_port_range_check_interface_add_del_reply
1557 {
1558   u32 context;
1559   i32 retval;
1560 };
1561
1562 /** \brief Delete sub interface request
1563     @param client_index - opaque cookie to identify the sender
1564     @param context - sender context, to match reply w/ request
1565     @param sw_if_index - sw index of the interface that was created by create_subif
1566 */
1567 define delete_subif {
1568   u32 client_index;
1569   u32 context;
1570   u32 sw_if_index;
1571 };
1572
1573 /** \brief Delete sub interface response
1574     @param context - sender context, to match reply w/ request
1575     @param retval - return code for the request
1576 */
1577 define delete_subif_reply {
1578   u32 context;
1579   i32 retval;
1580 };
1581
1582 /** \brief L2 interface pbb tag rewrite configure request
1583     @param client_index - opaque cookie to identify the sender
1584     @param context - sender context, to match reply w/ request
1585     @param sw_if_index - interface the operation is applied to
1586     @param vtr_op - Choose from l2_vtr_op_t enum values
1587     @param inner_tag - needed for translate_qinq vtr op only
1588     @param outer_tag - needed for translate_qinq vtr op only 
1589     @param b_dmac - B-tag remote mac address, needed for any push or translate_qinq vtr op
1590     @param b_smac - B-tag local mac address, needed for any push or translate qinq vtr op
1591     @param b_vlanid - B-tag vlanid, needed for any push or translate qinq vtr op
1592     @param i_sid - I-tag service id, needed for any push or translate qinq vtr op
1593 */
1594 define l2_interface_pbb_tag_rewrite
1595 {
1596   u32 client_index;
1597   u32 context;
1598   u32 sw_if_index;
1599   u32 vtr_op;
1600   u16 outer_tag;
1601   u8  b_dmac[6];
1602   u8  b_smac[6];
1603   u16 b_vlanid;
1604   u32 i_sid;
1605 };
1606
1607 /** \brief L2 interface pbb tag rewrite response
1608     @param context - sender context, to match reply w/ request
1609     @param retval - return code for the request
1610 */
1611 define l2_interface_pbb_tag_rewrite_reply
1612 {
1613   u32 context;
1614   i32 retval;
1615 };
1616
1617 /** \brief Punt traffic to the host
1618     @param client_index - opaque cookie to identify the sender
1619     @param context - sender context, to match reply w/ request
1620     @param is_add - add punt if non-zero, else delete
1621     @param ipv - L3 protocol 4 - IPv4, 6 - IPv6, ~0 - All
1622     @param l4_protocol - L4 protocol to be punted, only UDP (0x11) is supported
1623     @param l4_port - TCP/UDP port to be punted
1624 */
1625 define punt {
1626     u32 client_index;
1627     u32 context;
1628     u8 is_add;
1629     u8 ipv;
1630     u8 l4_protocol;
1631     u16 l4_port;
1632 };
1633
1634 /** \brief Reply to the punt request
1635     @param context - sender context which was passed in the request
1636     @param retval - return code of punt request
1637 */
1638 define punt_reply
1639 {
1640     u32 context;
1641     i32 retval;
1642 };
1643
1644 /** \brief Feature path enable/disable request
1645     @param client_index - opaque cookie to identify the sender
1646     @param context - sender context, to match reply w/ request
1647     @param sw_if_index - the interface
1648     @param enable - 1 = on, 0 = off
1649 */
1650 define feature_enable_disable {
1651     u32 client_index;
1652     u32 context;
1653     u32 sw_if_index;
1654     u8 enable;
1655     u8 arc_name[64];
1656     u8 feature_name[64];
1657 };
1658
1659 /** \brief Reply to the eature path enable/disable request
1660     @param context - sender context which was passed in the request
1661     @param retval - return code for the request
1662 */
1663 define feature_enable_disable_reply
1664 {
1665     u32 context;
1666     i32 retval;
1667 };
1668
1669 /*
1670  * Local Variables:
1671  * eval: (c-set-style "gnu")
1672  * End:
1673  */