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