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