API: Cleaning up message naming that does not follow the conventions
[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  * SESSION APIs: .../vnet/session/{session.api session_api.c}
42  * MPLS APIs: see .../src/vnet/mpls/{mpls.api, mpls_api.c}
43  * SR APIs: see .../src/vnet/srv6/{sr.api, sr_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  * DHCP APIs: see ... /src/vnet/dhcp/{dhcpk.api, dhcp_api.c}
47  * COP APIs: see ... /src/vnet/cop/{cop.api, cop_api.c}
48  * POLICER APIs: see ... /src/vnet/policer/{policer.api, policer_api.c}
49  */
50
51 /** \brief Create a new subinterface with the given vlan id
52     @param client_index - opaque cookie to identify the sender
53     @param context - sender context, to match reply w/ request
54     @param sw_if_index - software index of the new vlan's parent interface
55     @param vlan_id - vlan tag of the new interface
56 */
57 define create_vlan_subif
58 {
59   u32 client_index;
60   u32 context;
61   u32 sw_if_index;
62   u32 vlan_id;
63 };
64
65 /** \brief Reply for the vlan subinterface create request
66     @param context - returned sender context, to match reply w/ request
67     @param retval - return code
68     @param sw_if_index - software index allocated for the new subinterface
69 */
70 define create_vlan_subif_reply
71 {
72   u32 context;
73   i32 retval;
74   u32 sw_if_index;
75 };
76
77 /** \brief Enable or Disable MPLS on and interface
78     @param client_index - opaque cookie to identify the sender
79     @param context - sender context, to match reply w/ request
80     @param sw_if_index - index of the interface
81     @param enable - if non-zero enable, else disable
82 */
83 autoreply define sw_interface_set_mpls_enable
84 {
85   u32 client_index;
86   u32 context;
87   u32 sw_if_index;
88   u8 enable;
89 };
90
91 /** \brief Proxy ARP add / del request
92     @param client_index - opaque cookie to identify the sender
93     @param context - sender context, to match reply w/ request
94     @param vrf_id - VRF / Fib table ID
95     @param is_add - 1 if adding the Proxy ARP range, 0 if deleting
96     @param low_address[4] - Low address of the Proxy ARP range
97     @param hi_address[4] - High address of the Proxy ARP range
98 */
99 autoreply define proxy_arp_add_del
100 {
101   u32 client_index;
102   u32 context;
103   u32 vrf_id;
104   u8 is_add;
105   u8 low_address[4];
106   u8 hi_address[4];
107 };
108
109 /** \brief Proxy ARP add / del request
110     @param client_index - opaque cookie to identify the sender
111     @param context - sender context, to match reply w/ request
112     @param sw_if_index - Which interface to enable / disable Proxy Arp on
113     @param enable_disable - 1 to enable Proxy ARP on interface, 0 to disable
114 */
115 autoreply define proxy_arp_intfc_enable_disable
116 {
117   u32 client_index;
118   u32 context;
119   u32 sw_if_index;
120   /* 1 = on, 0 = off */
121   u8 enable_disable;
122 };
123
124 /** \brief Reset VRF (remove all routes etc) request
125     @param client_index - opaque cookie to identify the sender
126     @param context - sender context, to match reply w/ request
127     @param is_ipv6 - 1 for IPv6 neighbor, 0 for IPv4
128     @param vrf_id - ID of th FIB table / VRF to reset
129 */
130 autoreply define reset_vrf
131 {
132   u32 client_index;
133   u32 context;
134   u8 is_ipv6;
135   u32 vrf_id;
136 };
137
138 /** \brief Want Stats, register for stats updates
139     @param client_index - opaque cookie to identify the sender
140     @param context - sender context, to match reply w/ request
141     @param enable_disable - 1 = enable stats, 0 = disable
142     @param pid - pid of process requesting stats updates
143 */
144 autoreply define want_stats
145 {
146   u32 client_index;
147   u32 context;
148   u32 enable_disable;
149   u32 pid;
150 };
151
152 typeonly manual_print manual_endian define ip4_fib_counter
153 {
154   u32 address;
155   u8 address_length;
156   u64 packets;
157   u64 bytes;
158 };
159
160 manual_print manual_endian define vnet_ip4_fib_counters
161 {
162   u32 vrf_id;
163   u32 count;
164   vl_api_ip4_fib_counter_t c[count];
165 };
166
167 typeonly manual_print manual_endian define ip4_nbr_counter
168 {
169   u32 address;
170   u8  link_type;
171   u64 packets;
172   u64 bytes;
173 };
174
175 /**
176  * @brief Per-neighbour (i.e. per-adjacency) coutners
177  * @param count The size of the array of counters
178  * @param sw_if_index The interface the adjacency is on
179  * @param begin Flag to indicate this is the first set of stats for this
180  *        interface. If this flag is not set the it is a continuation of
181  *        stats for this interface
182  * @param  c counters
183  */
184 manual_print manual_endian define vnet_ip4_nbr_counters
185 {
186   u32 count;
187   u32 sw_if_index;
188   u8 begin;
189   vl_api_ip4_nbr_counter_t c[count];
190 };
191
192 typeonly manual_print manual_endian define ip6_fib_counter
193 {
194   u64 address[2];
195   u8 address_length;
196   u64 packets;
197   u64 bytes;
198 };
199
200 manual_print manual_endian define vnet_ip6_fib_counters
201 {
202   u32 vrf_id;
203   u32 count;
204   vl_api_ip6_fib_counter_t c[count];
205 };
206
207 typeonly manual_print manual_endian define ip6_nbr_counter
208 {
209   u64 address[2];
210   u8  link_type;
211   u64 packets;
212   u64 bytes;
213 };
214
215 manual_print manual_endian define vnet_ip6_nbr_counters
216 {
217   u32 count;
218   u32 sw_if_index;
219   u8 begin;
220   vl_api_ip6_nbr_counter_t c[count];
221 };
222
223 /** \brief Request for a single block of summary stats
224     @param client_index - opaque cookie to identify the sender
225     @param context - sender context, to match reply w/ request
226 */
227 define vnet_get_summary_stats
228 {
229   u32 client_index;
230   u32 context;
231 };
232
233 /** \brief Reply for vnet_get_summary_stats request
234     @param context - sender context, to match reply w/ request
235     @param retval - return code for request
236     @param total_pkts -  
237     @param total_bytes -
238     @param vector_rate - 
239 */
240 define vnet_get_summary_stats_reply
241 {
242   u32 context;
243   i32 retval;
244   u64 total_pkts[2];
245   u64 total_bytes[2];
246   f64 vector_rate;
247 };
248
249 /** \brief OAM event structure
250     @param dst_address[] - 
251     @param state
252 */
253 define oam_event
254 {
255   u8 dst_address[4];
256   u8 state;
257 };
258
259 /** \brief Want OAM events request
260     @param client_index - opaque cookie to identify the sender
261     @param context - sender context, to match reply w/ request
262     @param enable_disable- enable if non-zero, else disable
263     @param pid - pid of the requesting process
264 */
265 autoreply define want_oam_events
266 {
267   u32 client_index;
268   u32 context;
269   u32 enable_disable;
270   u32 pid;
271 };
272
273 /** \brief OAM add / del target request
274     @param client_index - opaque cookie to identify the sender
275     @param context - sender context, to match reply w/ request
276     @param vrf_id - vrf_id of the target
277     @param src_address[] - source address to use for the updates 
278     @param dst_address[] - destination address of the target
279     @param is_add - add target if non-zero, else delete
280 */
281 autoreply define oam_add_del
282 {
283   u32 client_index;
284   u32 context;
285   u32 vrf_id;
286   u8 src_address[4];
287   u8 dst_address[4];
288   u8 is_add;
289 };
290
291 /** \brief Reset fib table request
292     @param client_index - opaque cookie to identify the sender
293     @param context - sender context, to match reply w/ request
294     @param vrf_id - vrf/table id of the fib table to reset
295     @param is_ipv6 - an ipv6 fib to reset if non-zero, else ipv4
296 */
297 autoreply define reset_fib
298 {
299   u32 client_index;
300   u32 context;
301   u32 vrf_id;
302   u8 is_ipv6;
303 };
304
305 /** \brief Create loopback interface request
306     @param client_index - opaque cookie to identify the sender
307     @param context - sender context, to match reply w/ request
308     @param mac_address - mac addr to assign to the interface if none-zero
309 */
310 define create_loopback
311 {
312   u32 client_index;
313   u32 context;
314   u8 mac_address[6];
315 };
316
317 /** \brief Create loopback interface response
318     @param context - sender context, to match reply w/ request
319     @param sw_if_index - sw index of the interface that was created
320     @param retval - return code for the request
321 */
322 define create_loopback_reply
323 {
324   u32 context;
325   i32 retval;
326   u32 sw_if_index;
327 };
328
329 /** \brief Create loopback interface instance request
330     @param client_index - opaque cookie to identify the sender
331     @param context - sender context, to match reply w/ request
332     @param mac_address - mac addr to assign to the interface if none-zero
333     @param is_specified - if non-0, a specific user_instance is being requested
334     @param user_instance - requested instance, ~0 => dynamically allocate
335 */
336 define create_loopback_instance
337 {
338   u32 client_index;
339   u32 context;
340   u8 mac_address[6];
341   u8 is_specified;
342   u32 user_instance;
343 };
344
345 /** \brief Create loopback interface instance response
346     @param context - sender context, to match reply w/ request
347     @param sw_if_index - sw index of the interface that was created
348     @param retval - return code for the request
349 */
350 define create_loopback_instance_reply
351 {
352   u32 context;
353   i32 retval;
354   u32 sw_if_index;
355 };
356
357 /** \brief Delete loopback interface request
358     @param client_index - opaque cookie to identify the sender
359     @param context - sender context, to match reply w/ request
360     @param sw_if_index - sw index of the interface that was created
361 */
362 autoreply define delete_loopback
363 {
364   u32 client_index;
365   u32 context;
366   u32 sw_if_index;
367 };
368
369 /** \brief Control ping from client to api server request
370     @param client_index - opaque cookie to identify the sender
371     @param context - sender context, to match reply w/ request
372 */
373 define control_ping
374 {
375   u32 client_index;
376   u32 context;
377 };
378
379 /** \brief Control ping from the client to the server response
380     @param client_index - opaque cookie to identify the sender
381     @param context - sender context, to match reply w/ request
382     @param retval - return code for the request
383     @param vpe_pid - the pid of the vpe, returned by the server
384 */
385 define control_ping_reply
386 {
387   u32 context;
388   i32 retval;
389   u32 client_index;
390   u32 vpe_pid;
391 };
392
393 /** \brief Process a vpe parser cli string request
394     @param client_index - opaque cookie to identify the sender
395     @param context - sender context, to match reply w/ request
396     @param cmd_in_shmem - pointer to cli command string
397 */
398 define cli
399 {
400   u32 client_index;
401   u32 context;
402   u64 cmd_in_shmem;
403 };
404 define cli_inband
405 {
406   u32 client_index;
407   u32 context;
408   u32 length;
409   u8 cmd[length];
410 };
411
412 /** \brief vpe parser cli string response
413     @param context - sender context, to match reply w/ request
414     @param retval - return code for request
415     @param reply_in_shmem - Reply string from cli processing if any
416 */
417 define cli_reply
418 {
419   u32 context;
420   i32 retval;
421   u64 reply_in_shmem;
422 };
423 define cli_inband_reply
424 {
425   u32 context;
426   i32 retval;
427   u32 length;
428   u8 reply[length];
429 };
430
431 /** \brief Set max allowed ARP or ip6 neighbor entries request
432     @param client_index - opaque cookie to identify the sender
433     @param context - sender context, to match reply w/ request
434     @param is_ipv6 - neighbor limit if non-zero, else ARP limit
435     @param arp_neighbor_limit - the new limit, defaults are ~ 50k
436 */
437 autoreply define set_arp_neighbor_limit
438 {
439   u32 client_index;
440   u32 context;
441   u8 is_ipv6;
442   u32 arp_neighbor_limit;
443 };
444
445 /** \brief L2 interface patch add / del request
446     @param client_index - opaque cookie to identify the sender
447     @param context - sender context, to match reply w/ request
448     @param rx_sw_if_index - receive side interface 
449     @param tx_sw_if_index - transmit side interface
450     @param is_add - if non-zero set up the interface patch, else remove it
451 */
452 autoreply define l2_patch_add_del
453 {
454   u32 client_index;
455   u32 context;
456   u32 rx_sw_if_index;
457   u32 tx_sw_if_index;
458   u8 is_add;
459 };
460
461 /** \brief Interface set vpath request
462     @param client_index - opaque cookie to identify the sender
463     @param context - sender context, to match reply w/ request
464     @param sw_if_index - interface used to reach neighbor
465     @param enable - if non-zero enable, else disable
466 */
467 autoreply define sw_interface_set_vpath
468 {
469   u32 client_index;
470   u32 context;
471   u32 sw_if_index;
472   u8 enable;
473 };
474
475 /** \brief Set L2 XConnect between two interfaces request
476     @param client_index - opaque cookie to identify the sender
477     @param context - sender context, to match reply w/ request
478     @param rx_sw_if_index - Receive interface index
479     @param tx_sw_if_index - Transmit interface index
480     @param enable - enable xconnect if not 0, else set to L3 mode
481 */
482 autoreply define sw_interface_set_l2_xconnect
483 {
484   u32 client_index;
485   u32 context;
486   u32 rx_sw_if_index;
487   u32 tx_sw_if_index;
488   u8 enable;
489 };
490
491 /** \brief Interface bridge mode request
492     @param client_index - opaque cookie to identify the sender
493     @param context - sender context, to match reply w/ request
494     @param rx_sw_if_index - the interface
495     @param bd_id - bridge domain id
496     @param bvi - Setup interface as a bvi, bridge mode only
497     @param shg - Shared horizon group, for bridge mode only
498     @param enable - Enable beige mode if not 0, else set to L3 mode
499 */
500 autoreply define sw_interface_set_l2_bridge
501 {
502   u32 client_index;
503   u32 context;
504   u32 rx_sw_if_index;
505   u32 bd_id;
506   u8 shg;
507   u8 bvi;
508   u8 enable;
509 };
510
511 /** \brief Set bridge domain ip to mac entry request
512     @param client_index - opaque cookie to identify the sender
513     @param context - sender context, to match reply w/ request
514     @param bd_id - the bridge domain to set the flags for
515     @param is_add - if non-zero, add the entry, else clear it
516     @param is_ipv6 - if non-zero, ipv6 address, else ipv4 address
517     @param mac_address - MAC address
518     @param 
519 */
520 autoreply define bd_ip_mac_add_del
521 {
522   u32 client_index;
523   u32 context;
524   u32 bd_id;
525   u8 is_add;
526   u8 is_ipv6;
527   u8 ip_address[16];
528   u8 mac_address[6];
529 };
530
531 /** \brief Set/unset the classification table for an interface request 
532     @param client_index - opaque cookie to identify the sender
533     @param context - sender context, to match reply w/ request
534     @param is_ipv6 - ipv6 if non-zero, else ipv4
535     @param sw_if_index - interface to associate with the table
536     @param table_index - index of the table, if ~0 unset the table
537 */
538 autoreply define classify_set_interface_ip_table
539 {
540   u32 client_index;
541   u32 context;
542   u8 is_ipv6;
543   u32 sw_if_index;
544   u32 table_index;              /* ~0 => off */
545 };
546
547 /** \brief Set/unset l2 classification tables for an interface request
548     @param client_index - opaque cookie to identify the sender
549     @param context - sender context, to match reply w/ request
550     @param sw_if_index - interface to set/unset tables for
551     @param ip4_table_index - ip4 index, use ~0 for all 3 indexes to unset
552     @param ip6_table_index - ip6 index
553     @param other_table_index - other index
554 */
555 autoreply define classify_set_interface_l2_tables
556 {
557   u32 client_index;
558   u32 context;
559   u32 sw_if_index;
560   /* 3 x ~0 => off */
561   u32 ip4_table_index;
562   u32 ip6_table_index;
563   u32 other_table_index;
564   u8 is_input;
565 };
566
567 /** \brief Get node index using name request
568     @param client_index - opaque cookie to identify the sender
569     @param context - sender context, to match reply w/ request
570     @param node_name[] - name of the node
571 */
572 define get_node_index
573 {
574   u32 client_index;
575   u32 context;
576   u8 node_name[64];
577 };
578
579 /** \brief Get node index using name request
580     @param context - sender context, to match reply w/ request
581     @param retval - return code for the request
582     @param node_index - index of the desired node if found, else ~0
583 */
584 define get_node_index_reply
585 {
586   u32 context;
587   i32 retval;
588   u32 node_index;
589 };
590
591 /** \brief Set the next node for a given node request
592     @param client_index - opaque cookie to identify the sender
593     @param context - sender context, to match reply w/ request
594     @param node_name[] - node to add the next node to
595     @param next_name[] - node to add as the next node
596 */
597 define add_node_next
598 {
599   u32 client_index;
600   u32 context;
601   u8 node_name[64];
602   u8 next_name[64];
603 };
604
605 /** \brief IP Set the next node for a given node response
606     @param context - sender context, to match reply w/ request
607     @param retval - return code for the add next node request
608     @param next_index - the index of the next node if success, else ~0
609 */
610 define add_node_next_reply
611 {
612   u32 context;
613   i32 retval;
614   u32 next_index;
615 };
616
617 /** \brief L2 interface ethernet flow point filtering enable/disable request
618     @param client_index - opaque cookie to identify the sender
619     @param context - sender context, to match reply w/ request
620     @param sw_if_index - interface to enable/disable filtering on
621     @param enable_disable - if non-zero enable filtering, else disable
622 */
623 autoreply define l2_interface_efp_filter
624 {
625   u32 client_index;
626   u32 context;
627   u32 sw_if_index;
628   u32 enable_disable;
629 };
630
631 define create_subif
632 {
633   u32 client_index;
634   u32 context;
635   u32 sw_if_index;
636   u32 sub_id;
637
638   /* These fields map directly onto the subif template */
639   u8 no_tags;
640   u8 one_tag;
641   u8 two_tags;
642   u8 dot1ad;                    // 0 = dot1q, 1=dot1ad
643   u8 exact_match;
644   u8 default_sub;
645   u8 outer_vlan_id_any;
646   u8 inner_vlan_id_any;
647   u16 outer_vlan_id;
648   u16 inner_vlan_id;
649 };
650
651 define create_subif_reply
652 {
653   u32 context;
654   i32 retval;
655   u32 sw_if_index;
656 };
657
658 /** \brief show version
659     @param client_index - opaque cookie to identify the sender
660     @param context - sender context, to match reply w/ request
661 */
662 define show_version
663 {
664   u32 client_index;
665   u32 context;
666 };
667
668 /** \brief show version response
669     @param context - sender context, to match reply w/ request
670     @param retval - return code for the request
671     @param program - name of the program (vpe)
672     @param version  - version of the program
673     @param build_directory - root of the workspace where the program was built
674 */
675 define show_version_reply
676 {
677   u32 context;
678   i32 retval;
679   u8 program[32];
680   u8 version[32];
681   u8 build_date[32];
682   u8 build_directory[256];
683 };
684
685 /* Gross kludge, DGMS */
686 autoreply define interface_name_renumber
687 {
688   u32 client_index;
689   u32 context;
690   u32 sw_if_index;
691   u32 new_show_dev_instance;
692 };
693
694 /** \brief Register for ip4 arp resolution events
695     @param client_index - opaque cookie to identify the sender
696     @param context - sender context, to match reply w/ request
697     @param enable_disable - 1 => register for events, 0 => cancel registration
698     @param pid - sender's pid
699     @param address - the exact ip4 address of interest
700 */
701 autoreply define want_ip4_arp_events
702 {
703   u32 client_index;
704   u32 context;
705   u8 enable_disable;
706   u32 pid;
707   u32 address;
708 };
709
710 /** \brief Tell client about an ip4 arp resolution event
711     @param client_index - opaque cookie to identify the sender
712     @param context - sender context, to match reply w/ request
713     @param address - the exact ip4 address of interest
714     @param pid - client pid registered to receive notification
715     @param sw_if_index - interface which received ARP packet
716     @param new_mac - the new mac address 
717     @param mac_ip - 0: resolution event, 1: mac/ip binding in bd
718 */
719 define ip4_arp_event
720 {
721   u32 client_index;
722   u32 context;
723   u32 address;
724   u32 pid;
725   u32 sw_if_index;
726   u8 new_mac[6];
727   u8 mac_ip;
728 };
729
730 /** \brief Register for ip6 nd resolution events
731     @param client_index - opaque cookie to identify the sender
732     @param context - sender context, to match reply w/ request
733     @param enable_disable - 1 => register for events, 0 => cancel registration
734     @param pid - sender's pid
735     @param address - the exact ip6 address of interest
736 */
737 autoreply define want_ip6_nd_events
738 {
739   u32 client_index;
740   u32 context;
741   u8 enable_disable;
742   u32 pid;
743   u8 address[16];
744 };
745
746 /** \brief Tell client about an ip6 nd resolution or mac/ip event
747     @param client_index - opaque cookie to identify the sender
748     @param context - sender context, to match reply w/ request
749     @param pid - client pid registered to receive notification
750     @param sw_if_index - interface which received ARP packet
751     @param address - the exact ip6 address of interest
752     @param new_mac - the new mac address 
753     @param mac_ip - 0: resolution event, 1: mac/ip binding in bd
754 */
755 define ip6_nd_event
756 {
757   u32 client_index;
758   u32 context;
759   u32 pid;
760   u32 sw_if_index;
761   u8 address[16];
762   u8 new_mac[6];
763   u8 mac_ip;
764 };
765     
766 /** \brief Set/unset input ACL interface
767     @param client_index - opaque cookie to identify the sender
768     @param context - sender context, to match reply w/ request
769     @param sw_if_index - interface to set/unset input ACL
770     @param ip4_table_index - ip4 classify table index (~0 for skip)
771     @param ip6_table_index - ip6 classify table index (~0 for skip)
772     @param l2_table_index  -  l2 classify table index (~0 for skip)
773     @param is_add - Set input ACL if non-zero, else unset
774     Note: User is recommeneded to use just one valid table_index per call.
775           (ip4_table_index, ip6_table_index, or l2_table_index)
776 */
777 autoreply define input_acl_set_interface
778 {
779   u32 client_index;
780   u32 context;
781   u32 sw_if_index;
782   u32 ip4_table_index;
783   u32 ip6_table_index;
784   u32 l2_table_index;
785   u8 is_add;
786 };
787
788 define get_node_graph
789 {
790   u32 client_index;
791   u32 context;
792 };
793
794 /** \brief get_node_graph_reply
795     @param context - returned sender context, to match reply w/ request
796     @param retval - return code
797     @param reply_in_shmem - result from vlib_node_serialize, in shared
798     memory. Process with vlib_node_unserialize, remember to switch
799     heaps and free the result.
800 */
801
802 define get_node_graph_reply
803 {
804   u32 context;
805   i32 retval;
806   u64 reply_in_shmem;
807 };
808
809 /** \brief IOAM enable : Enable in-band OAM
810     @param id - profile id
811     @param seqno - To enable Seqno Processing
812     @param analyse - Enabling analysis of iOAM at decap node 
813     @param pow_enable - Proof of Work enabled or not flag
814     @param trace_enable - iOAM Trace enabled or not flag
815 */
816 autoreply define ioam_enable
817 {
818   u32 client_index;
819   u32 context;
820   u16 id;
821   u8 seqno;
822   u8 analyse;
823   u8 pot_enable;
824   u8 trace_enable;
825   u32 node_id;
826 };
827
828 /** \brief iOAM disable
829     @param client_index - opaque cookie to identify the sender
830     @param context - sender context, to match reply w/ request
831     @param index - MAP Domain index
832 */
833 autoreply define ioam_disable
834 {
835   u32 client_index;
836   u32 context;
837   u16 id;
838 };
839
840 /** \brief Query relative index via node names
841     @param client_index - opaque cookie to identify the sender
842     @param context - sender context, to match reply w/ request
843     @param node_name - name of node to find relative index from
844     @param next_name - next node from node_name to find relative index of
845 */
846 define get_next_index
847 {
848   u32 client_index;
849   u32 context;
850   u8 node_name[64];
851   u8 next_name[64];
852 };
853
854 /** \brief Reply for get next node index
855     @param context - sender context which was passed in the request
856     @param retval - return value
857     @param next_index - index of the next_node
858 */
859 define get_next_index_reply
860 {
861   u32 context;
862   i32 retval;
863   u32 next_index;
864 };
865
866 /** \brief PacketGenerator create interface request
867     @param client_index - opaque cookie to identify the sender
868     @param context - sender context, to match reply w/ request
869     @param interface_id - interface index
870 */
871 define pg_create_interface
872 {
873   u32 client_index;
874   u32 context;
875   u32 interface_id;
876 };
877
878 /** \brief PacketGenerator create interface response
879     @param context - sender context, to match reply w/ request
880     @param retval - return value for request
881 */
882 define pg_create_interface_reply
883 {
884   u32 context;
885   i32 retval;
886   u32 sw_if_index;
887 };
888
889 /** \brief PacketGenerator capture packets on given interface request
890     @param client_index - opaque cookie to identify the sender
891     @param context - sender context, to match reply w/ request
892     @param interface_id - pg interface index
893     @param is_enabled - 1 if enabling streams, 0 if disabling
894     @param count - number of packets to be captured
895     @param pcap_file - pacp file name to store captured packets
896 */
897 autoreply define pg_capture
898 {
899   u32 client_index;
900   u32 context;
901   u32 interface_id;
902   u8 is_enabled;
903   u32 count;
904   u32 pcap_name_length;
905   u8 pcap_file_name[pcap_name_length];
906 };
907
908 /** \brief Enable / disable packet generator request
909     @param client_index - opaque cookie to identify the sender
910     @param context - sender context, to match reply w/ request
911     @param is_enabled - 1 if enabling streams, 0 if disabling
912     @param stream - stream name to be enable/disabled, if not specified handle all streams
913 */
914 autoreply define pg_enable_disable
915 {
916   u32 client_index;
917   u32 context;
918   u8 is_enabled;
919   u32 stream_name_length;
920   u8 stream_name[stream_name_length];
921 };
922
923 /** \brief Configure IP source and L4 port-range check
924     @param client_index - opaque cookie to identify the sender
925     @param context - sender context, to match reply w/ request
926     @param is_ip6 - 1 if source address type is IPv6
927     @param is_add - 1 if add, 0 if delete
928     @param mask_length - mask length for address entry
929     @param address - array of address bytes
930     @param number_of_ranges - length of low_port and high_port arrays (must match)
931     @param low_ports[32] - up to 32 low end of port range entries (must have corresponding high_ports entry)
932     @param high_ports[32] - up to 32 high end of port range entries (must have corresponding low_ports entry)
933     @param vrf_id - fib table/vrf id to associate the source and port-range check with
934     @note To specify a single port set low_port and high_port entry the same
935 */
936 autoreply define ip_source_and_port_range_check_add_del
937 {
938   u32 client_index;
939   u32 context;
940   u8 is_ipv6;
941   u8 is_add;
942   u8 mask_length;
943   u8 address[16];
944   u8 number_of_ranges;
945   u16 low_ports[32];
946   u16 high_ports[32];
947   u32 vrf_id;
948 };
949
950 /** \brief Set interface source and L4 port-range request
951     @param client_index - opaque cookie to identify the sender
952     @param context - sender context, to match reply w/ request
953     @param interface_id - interface index
954     @param tcp_vrf_id - VRF associated with source and TCP port-range check
955     @param udp_vrf_id - VRF associated with source and TCP port-range check
956 */
957 autoreply define ip_source_and_port_range_check_interface_add_del
958 {
959   u32 client_index;
960   u32 context;
961   u8 is_add;
962   u32 sw_if_index;
963   u32 tcp_in_vrf_id;
964   u32 tcp_out_vrf_id;
965   u32 udp_in_vrf_id;
966   u32 udp_out_vrf_id;
967 };
968
969 /** \brief Delete sub interface request
970     @param client_index - opaque cookie to identify the sender
971     @param context - sender context, to match reply w/ request
972     @param sw_if_index - sw index of the interface that was created by create_subif
973 */
974 autoreply define delete_subif {
975   u32 client_index;
976   u32 context;
977   u32 sw_if_index;
978 };
979
980 /** \brief Punt traffic to the host
981     @param client_index - opaque cookie to identify the sender
982     @param context - sender context, to match reply w/ request
983     @param is_add - add punt if non-zero, else delete
984     @param ipv - L3 protocol 4 - IPv4, 6 - IPv6, ~0 - All
985     @param l4_protocol - L4 protocol to be punted, only UDP (0x11) is supported
986     @param l4_port - TCP/UDP port to be punted
987 */
988 autoreply define punt {
989     u32 client_index;
990     u32 context;
991     u8 is_add;
992     u8 ipv;
993     u8 l4_protocol;
994     u16 l4_port;
995 };
996
997 /** \brief Feature path enable/disable request
998     @param client_index - opaque cookie to identify the sender
999     @param context - sender context, to match reply w/ request
1000     @param sw_if_index - the interface
1001     @param enable - 1 = on, 0 = off
1002 */
1003 autoreply define feature_enable_disable {
1004     u32 client_index;
1005     u32 context;
1006     u32 sw_if_index;
1007     u8 enable;
1008     u8 arc_name[64];
1009     u8 feature_name[64];
1010 };
1011
1012 /*
1013  * Local Variables:
1014  * eval: (c-set-style "gnu")
1015  * End:
1016  */