fib: fib api updates
[vpp.git] / src / vnet / ip / ip.api
1 /* Hey Emacs use -*- mode: C -*- */
2 /*
3  * Copyright (c) 2018 Cisco and/or its affiliates.
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at:
7  *
8  *     http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 /** \file
18
19     This file defines vpp IP control-plane API messages which are generally
20     called through a shared memory interface. 
21 */
22
23 option version = "3.0.0";
24
25 import "vnet/fib/fib_types.api";
26 import "vnet/ethernet/ethernet_types.api";
27 import "vnet/mfib/mfib_types.api";
28
29 /** \brief An IP table
30     @param is_ipv6 - V4 or V6 table
31     @param table_id - table ID associated with the route
32                       This table ID will apply to both the unicats
33                       and mlticast FIBs
34     @param name - A client provided name/tag for the table. If this is
35                   not set by the client, then VPP will generate something
36                   meaningfull.
37 */
38 typeonly define ip_table
39 {
40   u32 table_id;
41   u8  is_ip6;
42   u8  name[64];
43 };
44
45 /** \brief Add / del table request
46            A table can be added multiple times, but need be deleted only once.
47     @param client_index - opaque cookie to identify the sender
48     @param context - sender context, to match reply w/ request
49 */
50 autoreply define ip_table_add_del
51 {
52   u32 client_index;
53   u32 context;
54   u8 is_add;
55   vl_api_ip_table_t table;
56 };
57
58 /** \brief Dump IP all fib tables
59     @param client_index - opaque cookie to identify the sender
60     @param context - sender context, to match reply w/ request
61 */
62 define ip_table_dump
63 {
64   u32 client_index;
65   u32 context;
66 };
67
68 /** \brief IP FIB table response
69     @param context - sender context
70     @param table - description of the table
71 */
72 manual_endian manual_print define ip_table_details
73 {
74   u32 context;
75   vl_api_ip_table_t table;
76 };
77
78 /** \brief An IP route
79   @param table_id The IP table the route is in
80   @param stats_index The index of the route in the stats segment
81   @param prefix the prefix for the route
82   @param n_paths The number of paths the route has
83   @param paths The paths of the route
84 */
85 typeonly define ip_route
86 {
87   u32 table_id;
88   u32 stats_index;
89   vl_api_prefix_t prefix;
90   u8 n_paths;
91   vl_api_fib_path_t paths[n_paths];
92 };
93
94 /** \brief Add / del route request
95     @param client_index - opaque cookie to identify the sender
96     @param context - sender context, to match reply w/ request
97     @param is_multipath - Set to 1 if these paths will be added/removed
98                           to/from the existing set, or 0 to replace
99                           the existing set.
100                           is_add=0 & is_multipath=0 implies delete all paths
101     @param is_add - Are the paths being added or removed
102 */
103 define ip_route_add_del
104 {
105   u32 client_index;
106   u32 context;
107   u8  is_add;
108   u8  is_multipath;
109   vl_api_ip_route_t route;
110 };
111 define ip_route_add_del_reply
112 {
113   u32 context;
114   i32 retval;
115   u32 stats_index;
116 };
117
118 /** \brief Dump IP routes from a table
119     @param client_index - opaque cookie to identify the sender
120     @param table - The table from which to dump routes (ony ID an AF are needed)
121 */
122 define ip_route_dump
123 {
124   u32 client_index;
125   u32 context;
126   vl_api_ip_table_t table;
127 };
128
129 /** \brief IP FIB table entry response
130     @param route The route entry in the table
131 */
132 manual_endian manual_print define ip_route_details
133 {
134   u32 context;
135   vl_api_ip_route_t route;
136 };
137
138 /** \brief IP neighbor flags
139     @param is_static - A static neighbor Entry - there are not flushed
140                        If the interface goes down.
141     @param is_no_fib_entry - Do not create a corresponding entry in the FIB
142                            table for the neighbor.
143 */
144 enum ip_neighbor_flags
145 {
146   IP_API_NEIGHBOR_FLAG_NONE = 0,
147   IP_API_NEIGHBOR_FLAG_STATIC = 0x1,
148   IP_API_NEIGHBOR_FLAG_NO_FIB_ENTRY = 0x2,
149 };
150
151 /** \brief IP neighbor
152     @param sw_if_index - interface used to reach neighbor
153     @param mac_address - l2 address of the neighbor
154     @param ip_address - ip4 or ip6 address of the neighbor
155     @param flags - flags for the nieghbor
156 */
157 typedef ip_neighbor {
158   u32 sw_if_index;
159   vl_api_ip_neighbor_flags_t flags;
160   vl_api_mac_address_t mac_address;
161   vl_api_address_t ip_address;
162 };
163
164 /** \brief IP neighbor add / del request
165     @param client_index - opaque cookie to identify the sender
166     @param context - sender context, to match reply w/ request
167     @param is_add - 1 to add neighbor, 0 to delete
168     @param neighbor - the neighor to add/remove
169 */
170 define ip_neighbor_add_del
171 {
172   u32 client_index;
173   u32 context;
174   /* 1 = add, 0 = delete */
175   u8 is_add;
176   vl_api_ip_neighbor_t neighbor;
177 };
178 define ip_neighbor_add_del_reply
179 {
180   u32 context;
181   i32 retval;
182   u32 stats_index;
183 };
184
185 /** \brief Dump IP neighboors
186     @param client_index - opaque cookie to identify the sender
187     @param context - sender context, to match reply w/ request
188     @param sw_if_index - the interface to dump neighboors, ~0 == all
189     @param is_ipv6 - [1|0] to indicate if address family is ipv[6|4]
190 */
191 define ip_neighbor_dump
192 {
193   u32 client_index;
194   u32 context;
195   u32 sw_if_index;
196   u8  is_ipv6;
197 };
198
199 /** \brief IP neighboors dump response
200     @param context - sender context which was passed in the request
201     @param neighbour - the neighbor
202 */
203 define ip_neighbor_details {
204   u32 context;
205   vl_api_ip_neighbor_t neighbor;
206 };
207
208 /** \brief Set the ip flow hash config for a fib request
209     @param client_index - opaque cookie to identify the sender
210     @param context - sender context, to match reply w/ request
211     @param vrf_id - vrf/fib id
212     @param is_ipv6 - if non-zero the fib is ip6, else ip4
213     @param src - if non-zero include src in flow hash
214     @param dst - if non-zero include dst in flow hash
215     @param sport - if non-zero include sport in flow hash
216     @param dport - if non-zero include dport in flow hash
217     @param proto -if non-zero include proto in flow hash
218     @param reverse - if non-zero include reverse in flow hash
219     @param symmetric - if non-zero include symmetry in flow hash
220 */
221 autoreply define set_ip_flow_hash
222 {
223   u32 client_index;
224   u32 context;
225   u32 vrf_id;
226   u8 is_ipv6;
227   u8 src;
228   u8 dst;
229   u8 sport;
230   u8 dport;
231   u8 proto;
232   u8 reverse;
233   u8 symmetric;
234 };
235
236 /** \brief IPv6 router advertisement config request
237     @param client_index - opaque cookie to identify the sender
238     @param context - sender context, to match reply w/ request
239     @param suppress -
240     @param managed -
241     @param other -
242     @param ll_option -
243     @param send_unicast -
244     @param cease -
245     @param is_no -
246     @param default_router -
247     @param max_interval -
248     @param min_interval -
249     @param lifetime -
250     @param initial_count -
251     @param initial_interval -
252 */
253 autoreply define sw_interface_ip6nd_ra_config
254 {
255   u32 client_index;
256   u32 context;
257   u32 sw_if_index;
258   u8 suppress;
259   u8 managed;
260   u8 other;
261   u8 ll_option;
262   u8 send_unicast;
263   u8 cease;
264   u8 is_no;
265   u8 default_router;
266   u32 max_interval;
267   u32 min_interval;
268   u32 lifetime;
269   u32 initial_count;
270   u32 initial_interval;
271 };
272
273 /** \brief IPv6 router advertisement prefix config request
274     @param client_index - opaque cookie to identify the sender
275     @param context - sender context, to match reply w/ request
276     @param sw_if_index - The interface the RA prefix information is for
277     @param prefix - The prefix to advertise
278     @param use_default - Revert to default settings
279     @param no_advertise - Do not advertise this prefix
280     @param off_link - The prefix is off link (it is not configured on the interface)
281                       Configures the L-flag, When set, indicates that this
282                       prefix can be used for on-link determination.
283     @param no_autoconfig - Setting for the A-flag. When
284                            set indicates that this prefix can be used for
285                           stateless address configuration.
286     @param no_onlink - The prefix is not on link. Make sure this is consistent
287                        with the off_link parameter else YMMV
288     @param is_no - add/delete
289     @param val_lifetime - The length of time in
290                      seconds (relative to the time the packet is sent)
291                      that the prefix is valid for the purpose of on-link
292                      determination.  A value of all one bits
293                      (0xffffffff) represents infinity
294     @param pref_lifetime - The length of time in
295                      seconds (relative to the time the packet is sent)
296                      that addresses generated from the prefix via
297                      stateless address autoconfiguration remain
298                      preferred [ADDRCONF].  A value of all one bits
299                      (0xffffffff) represents infinity.
300 */
301 autoreply define sw_interface_ip6nd_ra_prefix
302 {
303   u32 client_index;
304   u32 context;
305   u32 sw_if_index;
306   vl_api_prefix_t prefix;
307   u8 use_default;
308   u8 no_advertise;
309   u8 off_link;
310   u8 no_autoconfig;
311   u8 no_onlink;
312   u8 is_no;
313   u32 val_lifetime;
314   u32 pref_lifetime;
315 };
316
317 /** \brief IPv6 ND proxy config
318     @param client_index - opaque cookie to identify the sender
319     @param context - sender context, to match reply w/ request
320     @param sw_if_index - The interface the host is on
321     @param address - The address of the host for which to proxy for
322     @param is_add - Adding or deleting
323 */
324 autoreply define ip6nd_proxy_add_del
325 {
326   u32 client_index;
327   u32 context;
328   u32 sw_if_index;
329   u8 is_del;
330   vl_api_ip6_address_t ip;
331 };
332
333 /** \brief IPv6 ND proxy details returned after request
334     @param context - sender context, to match reply w/ request
335     @param retval - return code for the request
336 */
337 define ip6nd_proxy_details
338 {
339   u32 context;
340   u32 sw_if_index;
341   vl_api_ip6_address_t ip;
342 };
343
344 /** \brief IPv6 ND proxy dump request
345     @param context - sender context, to match reply w/ request
346     @param retval - return code for the request
347     @param sw_if_index - The interface the host is on
348     @param address - The address of the host for which to proxy for
349 */
350 define ip6nd_proxy_dump
351 {
352   u32 client_index;
353   u32 context;
354 };
355
356 /** \brief Start / stop sending router solicitation
357     @param client_index - opaque cookie to identify the sender
358     @param context - sender context, to match reply w/ request
359     @param irt - initial retransmission time
360     @param mrt - maximum retransmission time
361     @param mrc - maximum retransmission count
362     @param mrd - maximum retransmission duration
363     @param sw_if_index - software interface index of interface
364                          for sending router solicitation
365     @param stop - if non-zero then stop sending router solicitation,
366                   otherwise start sending router solicitation
367 */
368 autoreply define ip6nd_send_router_solicitation
369 {
370   u32 client_index;
371   u32 context;
372   u32 irt;
373   u32 mrt;
374   u32 mrc;
375   u32 mrd;
376   u32 sw_if_index;
377   u8 stop;
378 };
379
380 /** \brief IPv6 interface enable / disable request
381     @param client_index - opaque cookie to identify the sender
382     @param context - sender context, to match reply w/ request
383     @param sw_if_index - interface used to reach neighbor
384     @param enable - if non-zero enable ip6 on interface, else disable
385 */
386 autoreply define sw_interface_ip6_enable_disable
387 {
388   u32 client_index;
389   u32 context;
390   u32 sw_if_index;
391   u8 enable;                    /* set to true if enable */
392 };
393
394 /** \brief IPv6 set link local address on interface request
395     @param client_index - opaque cookie to identify the sender
396     @param context - sender context, to match reply w/ request
397     @param sw_if_index - interface to set link local on
398     @param address[] - the new link local address
399 */
400 autoreply define sw_interface_ip6_set_link_local_address
401 {
402   u32 client_index;
403   u32 context;
404   u32 sw_if_index;
405   u8 address[16];
406 };
407
408 /** \brief Dump IP multicast fib table
409     @param client_index - opaque cookie to identify the sender
410 */
411 define ip_mtable_dump
412 {
413   u32 client_index;
414   u32 context;
415 };
416 define ip_mtable_details
417 {
418   u32 client_index;
419   u32 context;
420   vl_api_ip_table_t table;
421 };
422
423 /** \brief Add / del route request
424
425     Adds a route, consisting both of the MFIB entry to match packets
426     (which may already exist) and a path to send those packets down.
427     Routes can be entered repeatedly to add multiple paths.  Deletions are
428     per-path.
429
430     @param client_index - opaque cookie to identify the sender
431     @param context - sender context, to match reply w/ request
432     @param table_id - fib table /vrf associated with the route
433     @param is_add - true if adding a route; false if deleting one
434     @param is_ipv6 - true iff all the addresses are v6
435     @param entry_flags - see fib_entry_flag_t
436     @param itf_flags - see mfib_entry_flags_t
437     @param next_hop_afi - see dpo_proto_t; the type of destination description
438     @param src_address - the source of the packet
439     @param grp_address - the group the packet is destined to
440     @param nh_address - the nexthop to forward the packet to
441     @param next_hop_sw_if_index - interface to emit packet on
442
443     BIER AFIs use the BIER imposition ID.  v4 and v6 AFIs use either the
444     interface or the nexthop address.
445
446     Note that if the route is source-specific (S is supplied, not all 0s),
447     the prefix match is treated as exact (prefixlen /32 or /128).
448
449     FIXME not complete yet
450 */
451 typedef ip_mroute
452 {
453   u32 table_id;
454   u32 entry_flags;
455   u32 rpf_id;
456   vl_api_mprefix_t prefix;
457   u8 n_paths;
458   vl_api_mfib_path_t paths[n_paths];
459 };
460
461 define ip_mroute_add_del
462 {
463   u32 client_index;
464   u32 context;
465   u8 is_add;
466   u8 is_multipath;
467   vl_api_ip_mroute_t route;
468 };
469 define ip_mroute_add_del_reply
470 {
471   u32 context;
472   i32 retval;
473   u32 stats_index;
474 };
475
476 /** \brief Dump IP multicast fib table
477     @param table - The table from which to dump routes (ony ID an AF are needed)
478 */
479 define ip_mroute_dump
480 {
481   u32 client_index;
482   u32 context;
483   vl_api_ip_table_t table;
484 };
485
486 /** \brief IP Multicast Route Details
487     @param route - Details of the route
488 */
489 manual_endian manual_print define ip_mroute_details
490 {
491   u32 context;
492   vl_api_ip_mroute_t route;
493 };
494
495 define ip_address_details
496 {
497   u32 context;
498   u32 sw_if_index;
499   vl_api_prefix_t prefix;
500 };
501
502 define ip_address_dump
503 {
504   u32 client_index;
505   u32 context;
506   u32 sw_if_index;
507   u8 is_ipv6;
508 };
509
510 /** \brief IP unnumbered configurations
511     @param sw_if_index The interface that has unnumbered configuration
512     @param ip_sw_if_index The IP interface that it is unnnumbered to
513 */
514 define ip_unnumbered_details
515 {
516   u32 context;
517   u32 sw_if_index;
518   u32 ip_sw_if_index;
519 };
520
521 /** \brief Dump IP unnumbered configurations
522     @param sw_if_index ~0 for all interfaces, else the interface desired
523 */
524 define ip_unnumbered_dump
525 {
526   u32 client_index;
527   u32 context;
528   u32 sw_if_index;
529 };
530
531 define ip_details
532 {
533   u32 context;
534   u32 sw_if_index;
535   u8 is_ipv6;
536 };
537
538 define ip_dump
539 {
540   u32 client_index;
541   u32 context;
542   u8 is_ipv6;
543 };
544
545 define mfib_signal_dump
546 {
547   u32 client_index;
548   u32 context;
549 };
550
551 define mfib_signal_details
552 {
553   u32 context;
554   u32 sw_if_index;
555   u32 table_id;
556   vl_api_mprefix_t prefix;
557   u16 ip_packet_len;
558   u8 ip_packet_data[256];
559 };
560
561 /** \brief IP punt policer
562     @param client_index - opaque cookie to identify the sender
563     @param context - sender context, to match reply w/ request
564     @param is_add - 1 to add neighbor, 0 to delete
565     @param is_ipv6 - 1 for IPv6 neighbor, 0 for IPv4
566     @param policer_index - Index of policer to use
567 */
568 autoreply define ip_punt_police
569 {
570   u32 client_index;
571   u32 context;
572   u32 policer_index;
573   u8 is_add;
574   u8 is_ip6;
575 };
576
577 /** \brief Punt redirect type
578     @param rx_sw_if_index - specify the original RX interface of traffic
579                             that should be redirected. ~0 means any interface.
580     @param tx_sw_if_index - the TX interface to which traffic shoulde be
581                             redirected.
582     @param nh - the next-hop to redirect the traffic to.
583     @param is_ipv6 - 1 for IPv6 neighbor, 0 for IPv4
584 */
585 typeonly define punt_redirect
586 {
587   u32 rx_sw_if_index;
588   u32 tx_sw_if_index;
589   vl_api_address_t nh;
590 };
591
592 /** \brief IP punt redirect
593     @param client_index - opaque cookie to identify the sender
594     @param context - sender context, to match reply w/ request
595     @param punt - punt definition
596     @param is_add - 1 to add neighbor, 0 to delete
597 */
598 autoreply define ip_punt_redirect
599 {
600   u32 client_index;
601   u32 context;
602   vl_api_punt_redirect_t punt;
603   u8 is_add;
604 };
605
606 define ip_punt_redirect_dump
607 {
608   u32 client_index;
609   u32 context;
610   u32 sw_if_index;
611   u8 is_ipv6;
612 };
613
614 define ip_punt_redirect_details
615 {
616   u32 context;
617   vl_api_punt_redirect_t punt;
618 };
619
620 autoreply define ip_container_proxy_add_del
621 {
622   u32 client_index;
623   u32 context;
624   vl_api_prefix_t pfx;
625   u32 sw_if_index;
626   u8 is_add;
627 };
628
629 define ip_container_proxy_dump
630 {
631   u32 client_index;
632   u32 context;
633 };
634
635 define ip_container_proxy_details
636 {
637   u32 context;
638   u32 sw_if_index;
639   vl_api_prefix_t prefix;
640 };
641
642 /** \brief Configure IP source and L4 port-range check
643     @param client_index - opaque cookie to identify the sender
644     @param context - sender context, to match reply w/ request
645     @param is_ip6 - 1 if source address type is IPv6
646     @param is_add - 1 if add, 0 if delete
647     @param ip - prefix to match
648     @param number_of_ranges - length of low_port and high_port arrays (must match)
649     @param low_ports[32] - up to 32 low end of port range entries (must have corresponding high_ports entry)
650     @param high_ports[32] - up to 32 high end of port range entries (must have corresponding low_ports entry)
651     @param vrf_id - fib table/vrf id to associate the source and port-range check with
652     @note To specify a single port set low_port and high_port entry the same
653 */
654 autoreply define ip_source_and_port_range_check_add_del
655 {
656   u32 client_index;
657   u32 context;
658   u8 is_add;
659   vl_api_prefix_t prefix;
660   u8 number_of_ranges;
661   u16 low_ports[32];
662   u16 high_ports[32];
663   u32 vrf_id;
664 };
665
666 /** \brief Set interface source and L4 port-range request
667     @param client_index - opaque cookie to identify the sender
668     @param context - sender context, to match reply w/ request
669     @param interface_id - interface index
670     @param tcp_vrf_id - VRF associated with source and TCP port-range check
671     @param udp_vrf_id - VRF associated with source and TCP port-range check
672 */
673 autoreply define ip_source_and_port_range_check_interface_add_del
674 {
675   u32 client_index;
676   u32 context;
677   u8 is_add;
678   u32 sw_if_index;
679   u32 tcp_in_vrf_id;
680   u32 tcp_out_vrf_id;
681   u32 udp_in_vrf_id;
682   u32 udp_out_vrf_id;
683 };
684
685 /** \brief Set interface source check request
686     @param client_index - opaque cookie to identify the sender
687     @param context - sender context, to match reply w/ request
688     @param is_add - add or del
689     @param loose - strict or loose
690     @param sw_if_index - interface index
691 */
692 autoreply define ip_source_check_interface_add_del
693 {
694   u32 client_index;
695   u32 context;
696   u8 is_add;
697   u8 loose;
698   u32 sw_if_index;
699 };
700
701 /** \brief Enable/disable periodic IP neighbor scan
702     @param client_index - opaque cookie to identify the sender
703     @param context - sender context, to match reply w/ request
704     @param mode - 0: disable, 1: IPv4, 2: IPv6, 3: both IPv4/v6
705     @param scan_interval - neighbor scan interval in minutes, 0: default to 1
706     @param max_proc_time - max processing time per run in usec, 0: default to 20
707     @param max_update - max neighbor probe/delete per run, 0: default to 10
708     @param scan_int_delay - delay in msec to resume scan if exceed max proc
709                             time or update, 0: default to 1
710     @param stale_threshold - threshold in minutes for neighbor deletion, 
711                              0: default to 4*scan_interval
712 */
713 autoreply define ip_scan_neighbor_enable_disable
714 {
715   u32 client_index;
716   u32 context;
717   u8 mode;
718   u8 scan_interval;
719   u8 max_proc_time;
720   u8 max_update;
721   u8 scan_int_delay;
722   u8 stale_threshold;
723 };
724
725 /** \brief IP probe neighbor address on an interface by sending an
726            ARP request (for IP4) or ICMP6 Neighbor Solicitation (for IP6)
727     @param client_index - opaque cookie to identify the sender
728     @param context - sender context, to match reply w/ request
729     @param sw_if_index - interface index
730     @param dst - target IP address to send IP addr resolution request
731 */
732 autoreply define ip_probe_neighbor
733 {
734   u32 client_index;
735   u32 context;
736   u32 sw_if_index;
737   vl_api_address_t dst;
738 };
739
740 /** \brief Register for IP4 ARP resolution event on receing ARP reply or
741            MAC/IP info from ARP requests in L2 BDs
742     @param client_index - opaque cookie to identify the sender
743     @param context - sender context, to match reply w/ request
744     @param enable_disable - 1 => register for events, 0 => cancel registration
745     @param pid - sender's pid
746     @param ip - exact IP4 address of interested arp resolution event, or
747                 0 to get MAC/IP info from ARP requests in BDs
748 */
749 autoreply define want_ip4_arp_events
750 {
751   u32 client_index;
752   u32 context;
753   u8 enable_disable;
754   u32 pid;
755   vl_api_ip4_address_t ip;
756 };
757
758 /** \brief Tell client about an IP4 ARP resolution event or
759            MAC/IP info from ARP requests in L2 BDs
760     @param client_index - opaque cookie to identify the sender
761     @param ip - the exact ip4 address of interest
762     @param pid - client pid registered to receive notification
763     @param sw_if_index - interface which received ARP packet
764     @param mac - the new mac address 
765     @param mac_ip - 0: ARP resolution event, 1: MAC/IP info from L2 BDs
766 */
767 define ip4_arp_event
768 {
769   u32 client_index;
770   vl_api_ip4_address_t ip;
771   u32 pid;
772   u32 sw_if_index;
773   vl_api_mac_address_t mac;
774   u8 mac_ip;
775 };
776
777 service {
778   rpc want_ip4_arp_events returns want_ip4_arp_events_reply
779     events ip4_arp_event;
780 };
781
782 /** \brief Register for IP6 ND resolution event on recieving NA reply
783            MAC/IP info from ICMP6 Neighbor Solicitation in L2 BDs
784     @param client_index - opaque cookie to identify the sender
785     @param context - sender context, to match reply w/ request
786     @param enable_disable - 1 => register for events, 0 => cancel registration
787     @param pid - sender's pid
788     @param ip - the exact IP6 address of interested ND resolution event, or
789                 0 to get MAC/IP info from ICMP6 NS in L2 BDs.
790 */
791 autoreply define want_ip6_nd_events
792 {
793   u32 client_index;
794   u32 context;
795   u8 enable_disable;
796   u32 pid;
797   vl_api_ip6_address_t ip;
798 };
799
800 /** \brief Tell client about an IP6 ND resolution or
801            MAC/IP info from ICMP6 Neighbor Solicitation in L2 BDs.
802     @param client_index - opaque cookie to identify the sender
803     @param pid - client pid registered to receive notification
804     @param sw_if_index - interface which received ARP packet
805     @param ip - the exact ip6 address of interest
806     @param new_mac - the new mac address 
807     @param mac_ip - 0: ND resolution event, 1: MAC/IP info from L2 BDs
808 */
809 define ip6_nd_event
810 {
811   u32 client_index;
812   u32 pid;
813   u32 sw_if_index;
814   vl_api_ip6_address_t ip;
815   vl_api_mac_address_t mac;
816   u8 mac_ip;
817 };
818
819 service {
820   rpc want_ip6_ra_events returns want_ip6_ra_events_reply
821     events ip6_ra_event;
822 };
823
824 /** \brief Register for ip6 router advertisement events
825     @param client_index - opaque cookie to identify the sender
826     @param context - sender context, to match reply w/ request
827     @param enable_disable - 1 => register for events, 0 => cancel registration
828     @param pid - sender's pid
829 */
830 autoreply define want_ip6_ra_events
831 {
832   u32 client_index;
833   u32 context;
834   u8 enable_disable;
835   u32 pid;
836 };
837
838 /** \brief Struct representing RA prefix info
839     @param prefix - RA prefix info destination address
840     @param flags - RA prefix info flags
841     @param valid_time - RA prefix info valid time
842     @param preferred_time - RA prefix info preferred time
843 */
844 typeonly define ip6_ra_prefix_info
845 {
846   vl_api_prefix_t prefix;
847   u8 flags;
848   u32 valid_time;
849   u32 preferred_time;
850 };
851
852 /** \brief Tell client about a router advertisement event
853     @param client_index - opaque cookie to identify the sender
854     @param pid - client pid registered to receive notification
855     @param current_hop_limit - RA current hop limit
856     @param flags - RA flags
857     @param router_lifetime_in_sec - RA lifetime in seconds
858     @param router_addr - The router's address
859     @param neighbor_reachable_time_in_msec - RA neighbor reachable time in msec
860     @param time_in_msec_between_retransmitted_neighbor_solicitations -
861                time in msec between retransmitted neighbor solicitations
862     @param n_prefixes -
863     @param prefixes -
864 */
865 define ip6_ra_event
866 {
867   u32 client_index;
868   u32 pid;
869   u32 sw_if_index;
870   vl_api_ip6_address_t router_addr;
871   u8 current_hop_limit;
872   u8 flags;
873   u16 router_lifetime_in_sec;
874   u32 neighbor_reachable_time_in_msec;
875   u32 time_in_msec_between_retransmitted_neighbor_solicitations;
876   u32 n_prefixes;
877   vl_api_ip6_ra_prefix_info_t prefixes[n_prefixes];
878 };
879
880 service {
881   rpc want_ip6_nd_events returns want_ip6_nd_events_reply
882     events ip6_nd_event;
883 };
884
885 /** \brief Proxy ARP configuration type
886     @param table_id - VRF / Fib table ID
887     @param low - Low address of the Proxy ARP range
888     @param hi - High address of the Proxy ARP range
889 */
890 typeonly define proxy_arp
891 {
892   u32 table_id;
893   vl_api_ip4_address_t low;
894   vl_api_ip4_address_t hi;
895 };
896
897 /** \brief Proxy ARP add / del request
898     @param client_index - opaque cookie to identify the sender
899     @param context - sender context, to match reply w/ request
900     @param is_add - 1 if adding the Proxy ARP range, 0 if deleting
901     @param proxy - Proxy configuration
902 */
903 autoreply define proxy_arp_add_del
904 {
905   u32 client_index;
906   u32 context;
907   u8 is_add;
908   vl_api_proxy_arp_t proxy;
909 };
910
911 /** \brief Proxy ARP dump request
912  */
913 define proxy_arp_dump
914 {
915   u32 client_index;
916   u32 context;
917 };
918
919 /** \brief Proxy ARP dump details reply
920  * @param proxy - Same data as used to configure
921  */
922 define proxy_arp_details
923 {
924   u32 context;
925   vl_api_proxy_arp_t proxy;
926 };
927
928 /** \brief Proxy ARP add / del interface request
929     @param client_index - opaque cookie to identify the sender
930     @param context - sender context, to match reply w/ request
931     @param sw_if_index - Which interface to enable / disable Proxy Arp on
932     @param enable_disable - 1 to enable Proxy ARP on interface, 0 to disable
933 */
934 autoreply define proxy_arp_intfc_enable_disable
935 {
936   u32 client_index;
937   u32 context;
938   u32 sw_if_index;
939   /* 1 = on, 0 = off */
940   u8 enable_disable;
941 };
942
943 /** \brief Proxy ARP interface dump request
944  */
945 define proxy_arp_intfc_dump
946 {
947   u32 client_index;
948   u32 context;
949 };
950
951 /** \brief Proxy ARP interface dump details reply
952  * @param sw_if_index The interface on which ARP proxy is enabled.
953  */
954 define proxy_arp_intfc_details
955 {
956   u32 context;
957   u32 sw_if_index;
958 };
959
960 /** \brief Reset fib table request
961     @param client_index - opaque cookie to identify the sender
962     @param context - sender context, to match reply w/ request
963     @param vrf_id - vrf/table id of the fib table to reset
964     @param is_ipv6 - an ipv6 fib to reset if non-zero, else ipv4
965 */
966 autoreply define reset_fib
967 {
968   u32 client_index;
969   u32 context;
970   u32 vrf_id;
971   u8 is_ipv6;
972 };
973
974 /** \brief Set max allowed ARP or ip6 neighbor entries request
975     @param client_index - opaque cookie to identify the sender
976     @param context - sender context, to match reply w/ request
977     @param is_ipv6 - neighbor limit if non-zero, else ARP limit
978     @param arp_neighbor_limit - the new limit, defaults are ~ 50k
979 */
980 autoreply define set_arp_neighbor_limit
981 {
982   u32 client_index;
983   u32 context;
984   u8 is_ipv6;
985   u32 arp_neighbor_limit;
986 };
987
988 /** \brief IOAM enable : Enable in-band OAM
989     @param id - profile id
990     @param seqno - To enable Seqno Processing
991     @param analyse - Enabling analysis of iOAM at decap node 
992     @param pow_enable - Proof of Work enabled or not flag
993     @param trace_enable - iOAM Trace enabled or not flag
994 */
995 autoreply define ioam_enable
996 {
997   u32 client_index;
998   u32 context;
999   u16 id;
1000   u8 seqno;
1001   u8 analyse;
1002   u8 pot_enable;
1003   u8 trace_enable;
1004   u32 node_id;
1005 };
1006
1007 /** \brief iOAM disable
1008     @param client_index - opaque cookie to identify the sender
1009     @param context - sender context, to match reply w/ request
1010     @param index - MAP Domain index
1011 */
1012 autoreply define ioam_disable
1013 {
1014   u32 client_index;
1015   u32 context;
1016   u16 id;
1017 };
1018
1019 autoreply define ip_reassembly_set
1020 {
1021   u32 client_index;
1022   u32 context;
1023   u32 timeout_ms;
1024   u32 max_reassemblies;
1025   u32 max_reassembly_length;
1026   u32 expire_walk_interval_ms;
1027   u8 is_ip6;
1028 };
1029
1030 define ip_reassembly_get
1031 {
1032   u32 client_index;
1033   u32 context;
1034   u8 is_ip6;
1035 };
1036
1037 define ip_reassembly_get_reply
1038 {
1039   u32 context;
1040   i32 retval;
1041   u32 timeout_ms;
1042   u32 max_reassemblies;
1043   u32 max_reassembly_length;
1044   u32 expire_walk_interval_ms;
1045   u8 is_ip6;
1046 };
1047
1048 /** \brief Enable/disable reassembly feature
1049     @param client_index - opaque cookie to identify the sender
1050     @param context - sender context, to match reply w/ request
1051     @param sw_if_index - interface to enable/disable feature on
1052     @param enable_ip4 - enable ip4 reassembly if non-zero, disable if 0
1053     @param enable_ip6 - enable ip6 reassembly if non-zero, disable if 0
1054 */
1055 autoreply define ip_reassembly_enable_disable
1056 {
1057   u32 client_index;
1058   u32 context;
1059   u32 sw_if_index;
1060   u8 enable_ip4;
1061   u8 enable_ip6;
1062 };
1063
1064 /*
1065  * Local Variables:
1066  * eval: (c-set-style "gnu")
1067  * End:
1068  */