PUNT socket: External control plane processes connected via UNIX domain sockets.
[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 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 address;
723   u32 pid;
724   u32 sw_if_index;
725   u8 new_mac[6];
726   u8 mac_ip;
727 };
728
729 /** \brief Register for ip6 nd resolution events
730     @param client_index - opaque cookie to identify the sender
731     @param context - sender context, to match reply w/ request
732     @param enable_disable - 1 => register for events, 0 => cancel registration
733     @param pid - sender's pid
734     @param address - the exact ip6 address of interest
735 */
736 autoreply define want_ip6_nd_events
737 {
738   u32 client_index;
739   u32 context;
740   u8 enable_disable;
741   u32 pid;
742   u8 address[16];
743 };
744
745 /** \brief Tell client about an ip6 nd resolution or mac/ip event
746     @param client_index - opaque cookie to identify the sender
747     @param pid - client pid registered to receive notification
748     @param sw_if_index - interface which received ARP packet
749     @param address - the exact ip6 address of interest
750     @param new_mac - the new mac address 
751     @param mac_ip - 0: resolution event, 1: mac/ip binding in bd
752 */
753 define ip6_nd_event
754 {
755   u32 client_index;
756   u32 pid;
757   u32 sw_if_index;
758   u8 address[16];
759   u8 new_mac[6];
760   u8 mac_ip;
761 };
762     
763 /** \brief Set/unset input ACL interface
764     @param client_index - opaque cookie to identify the sender
765     @param context - sender context, to match reply w/ request
766     @param sw_if_index - interface to set/unset input ACL
767     @param ip4_table_index - ip4 classify table index (~0 for skip)
768     @param ip6_table_index - ip6 classify table index (~0 for skip)
769     @param l2_table_index  -  l2 classify table index (~0 for skip)
770     @param is_add - Set input ACL if non-zero, else unset
771     Note: User is recommeneded to use just one valid table_index per call.
772           (ip4_table_index, ip6_table_index, or l2_table_index)
773 */
774 autoreply define input_acl_set_interface
775 {
776   u32 client_index;
777   u32 context;
778   u32 sw_if_index;
779   u32 ip4_table_index;
780   u32 ip6_table_index;
781   u32 l2_table_index;
782   u8 is_add;
783 };
784
785 define get_node_graph
786 {
787   u32 client_index;
788   u32 context;
789 };
790
791 /** \brief get_node_graph_reply
792     @param context - returned sender context, to match reply w/ request
793     @param retval - return code
794     @param reply_in_shmem - result from vlib_node_serialize, in shared
795     memory. Process with vlib_node_unserialize, remember to switch
796     heaps and free the result.
797 */
798
799 define get_node_graph_reply
800 {
801   u32 context;
802   i32 retval;
803   u64 reply_in_shmem;
804 };
805
806 /** \brief IOAM enable : Enable in-band OAM
807     @param id - profile id
808     @param seqno - To enable Seqno Processing
809     @param analyse - Enabling analysis of iOAM at decap node 
810     @param pow_enable - Proof of Work enabled or not flag
811     @param trace_enable - iOAM Trace enabled or not flag
812 */
813 autoreply define ioam_enable
814 {
815   u32 client_index;
816   u32 context;
817   u16 id;
818   u8 seqno;
819   u8 analyse;
820   u8 pot_enable;
821   u8 trace_enable;
822   u32 node_id;
823 };
824
825 /** \brief iOAM disable
826     @param client_index - opaque cookie to identify the sender
827     @param context - sender context, to match reply w/ request
828     @param index - MAP Domain index
829 */
830 autoreply define ioam_disable
831 {
832   u32 client_index;
833   u32 context;
834   u16 id;
835 };
836
837 /** \brief Query relative index via node names
838     @param client_index - opaque cookie to identify the sender
839     @param context - sender context, to match reply w/ request
840     @param node_name - name of node to find relative index from
841     @param next_name - next node from node_name to find relative index of
842 */
843 define get_next_index
844 {
845   u32 client_index;
846   u32 context;
847   u8 node_name[64];
848   u8 next_name[64];
849 };
850
851 /** \brief Reply for get next node index
852     @param context - sender context which was passed in the request
853     @param retval - return value
854     @param next_index - index of the next_node
855 */
856 define get_next_index_reply
857 {
858   u32 context;
859   i32 retval;
860   u32 next_index;
861 };
862
863 /** \brief PacketGenerator create interface request
864     @param client_index - opaque cookie to identify the sender
865     @param context - sender context, to match reply w/ request
866     @param interface_id - interface index
867 */
868 define pg_create_interface
869 {
870   u32 client_index;
871   u32 context;
872   u32 interface_id;
873 };
874
875 /** \brief PacketGenerator create interface response
876     @param context - sender context, to match reply w/ request
877     @param retval - return value for request
878 */
879 define pg_create_interface_reply
880 {
881   u32 context;
882   i32 retval;
883   u32 sw_if_index;
884 };
885
886 /** \brief PacketGenerator capture packets on given interface request
887     @param client_index - opaque cookie to identify the sender
888     @param context - sender context, to match reply w/ request
889     @param interface_id - pg interface index
890     @param is_enabled - 1 if enabling streams, 0 if disabling
891     @param count - number of packets to be captured
892     @param pcap_file - pacp file name to store captured packets
893 */
894 autoreply define pg_capture
895 {
896   u32 client_index;
897   u32 context;
898   u32 interface_id;
899   u8 is_enabled;
900   u32 count;
901   u32 pcap_name_length;
902   u8 pcap_file_name[pcap_name_length];
903 };
904
905 /** \brief Enable / disable packet generator request
906     @param client_index - opaque cookie to identify the sender
907     @param context - sender context, to match reply w/ request
908     @param is_enabled - 1 if enabling streams, 0 if disabling
909     @param stream - stream name to be enable/disabled, if not specified handle all streams
910 */
911 autoreply define pg_enable_disable
912 {
913   u32 client_index;
914   u32 context;
915   u8 is_enabled;
916   u32 stream_name_length;
917   u8 stream_name[stream_name_length];
918 };
919
920 /** \brief Configure IP source and L4 port-range check
921     @param client_index - opaque cookie to identify the sender
922     @param context - sender context, to match reply w/ request
923     @param is_ip6 - 1 if source address type is IPv6
924     @param is_add - 1 if add, 0 if delete
925     @param mask_length - mask length for address entry
926     @param address - array of address bytes
927     @param number_of_ranges - length of low_port and high_port arrays (must match)
928     @param low_ports[32] - up to 32 low end of port range entries (must have corresponding high_ports entry)
929     @param high_ports[32] - up to 32 high end of port range entries (must have corresponding low_ports entry)
930     @param vrf_id - fib table/vrf id to associate the source and port-range check with
931     @note To specify a single port set low_port and high_port entry the same
932 */
933 autoreply define ip_source_and_port_range_check_add_del
934 {
935   u32 client_index;
936   u32 context;
937   u8 is_ipv6;
938   u8 is_add;
939   u8 mask_length;
940   u8 address[16];
941   u8 number_of_ranges;
942   u16 low_ports[32];
943   u16 high_ports[32];
944   u32 vrf_id;
945 };
946
947 /** \brief Set interface source and L4 port-range request
948     @param client_index - opaque cookie to identify the sender
949     @param context - sender context, to match reply w/ request
950     @param interface_id - interface index
951     @param tcp_vrf_id - VRF associated with source and TCP port-range check
952     @param udp_vrf_id - VRF associated with source and TCP port-range check
953 */
954 autoreply define ip_source_and_port_range_check_interface_add_del
955 {
956   u32 client_index;
957   u32 context;
958   u8 is_add;
959   u32 sw_if_index;
960   u32 tcp_in_vrf_id;
961   u32 tcp_out_vrf_id;
962   u32 udp_in_vrf_id;
963   u32 udp_out_vrf_id;
964 };
965
966 /** \brief Delete sub interface request
967     @param client_index - opaque cookie to identify the sender
968     @param context - sender context, to match reply w/ request
969     @param sw_if_index - sw index of the interface that was created by create_subif
970 */
971 autoreply define delete_subif {
972   u32 client_index;
973   u32 context;
974   u32 sw_if_index;
975 };
976
977 /** \brief Punt traffic to the host
978     @param client_index - opaque cookie to identify the sender
979     @param context - sender context, to match reply w/ request
980     @param is_add - add punt if non-zero, else delete
981     @param ipv - L3 protocol 4 - IPv4, 6 - IPv6, ~0 - All
982     @param l4_protocol - L4 protocol to be punted, only UDP (0x11) is supported
983     @param l4_port - TCP/UDP port to be punted
984 */
985 autoreply define punt {
986     u32 client_index;
987     u32 context;
988     u8 is_add;
989     u8 ipv;
990     u8 l4_protocol;
991     u16 l4_port;
992 };
993
994 /** \brief Punt traffic to the host via socket
995     @param client_index - opaque cookie to identify the sender
996     @param context - sender context, to match reply w/ request
997     @param header_version - expected meta data header version (currently 1)
998     @param is_ip4 - L3 protocol 1 - IPv4, 0 - IPv6
999     @param l4_protocol - L4 protocol to be punted, only UDP (0x11) is supported
1000     @param l4_port - TCP/UDP port to be punted
1001 */
1002 define punt_socket_register {
1003     u32 client_index;
1004     u32 context;
1005     u32 header_version;
1006     u8 is_ip4;
1007     u8 l4_protocol;
1008     u16 l4_port;
1009     u8 pathname[64];
1010 };
1011
1012 define punt_socket_register_reply
1013 {
1014   u32 context;
1015   i32 retval;
1016   u8 pathname[64];
1017 };
1018
1019 autoreply define punt_socket_deregister {
1020     u32 client_index;
1021     u32 context;
1022     u8 is_ip4;
1023     u8 l4_protocol;
1024     u16 l4_port;
1025 };
1026
1027 /** \brief Feature path enable/disable request
1028     @param client_index - opaque cookie to identify the sender
1029     @param context - sender context, to match reply w/ request
1030     @param sw_if_index - the interface
1031     @param enable - 1 = on, 0 = off
1032 */
1033 autoreply define feature_enable_disable {
1034     u32 client_index;
1035     u32 context;
1036     u32 sw_if_index;
1037     u8 enable;
1038     u8 arc_name[64];
1039     u8 feature_name[64];
1040 };
1041
1042 /*
1043  * Local Variables:
1044  * eval: (c-set-style "gnu")
1045  * End:
1046  */