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