1 /* Hey Emacs use -*- mode: C -*- */
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:
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
19 This file defines vpp IP control-plane API messages which are generally
20 called through a shared memory interface.
23 option version = "1.1.0";
25 import "vnet/ip/ip_types.api";
26 import "vnet/interface_types.api";
28 /** \brief IPv6 router advertisement config request
29 @param client_index - opaque cookie to identify the sender
30 @param context - sender context, to match reply w/ request
38 @param default_router -
42 @param initial_count -
43 @param initial_interval -
45 autoreply define sw_interface_ip6nd_ra_config
49 vl_api_interface_index_t sw_if_index;
65 /** \brief IPv6 router advertisement prefix config request
66 @param client_index - opaque cookie to identify the sender
67 @param context - sender context, to match reply w/ request
68 @param sw_if_index - The interface the RA prefix information is for
69 @param prefix - The prefix to advertise
70 @param use_default - Revert to default settings
71 @param no_advertise - Do not advertise this prefix
72 @param off_link - The prefix is off link (it is not configured on the interface)
73 Configures the L-flag, When set, indicates that this
74 prefix can be used for on-link determination.
75 @param no_autoconfig - Setting for the A-flag. When
76 set indicates that this prefix can be used for
77 stateless address configuration.
78 @param no_onlink - The prefix is not on link. Make sure this is consistent
79 with the off_link parameter else YMMV
80 @param is_no - add/delete
81 @param val_lifetime - The length of time in
82 seconds (relative to the time the packet is sent)
83 that the prefix is valid for the purpose of on-link
84 determination. A value of all one bits
85 (0xffffffff) represents infinity
86 @param pref_lifetime - The length of time in
87 seconds (relative to the time the packet is sent)
88 that addresses generated from the prefix via
89 stateless address autoconfiguration remain
90 preferred [ADDRCONF]. A value of all one bits
91 (0xffffffff) represents infinity.
93 autoreply define sw_interface_ip6nd_ra_prefix
97 vl_api_interface_index_t sw_if_index;
98 vl_api_prefix_t prefix;
109 /** \brief IPv6 Router Advertisements prefix entry
110 @param prefix - prefix to advertise
111 @param onlink_flag - if true, the prefix can be used for on-link
113 @param autonomous_flag - if true, the prefix can be used for stateless
114 address configuration
115 @param val_lifetime - valid lifetime in seconds (0xffffffff represents
117 @param pref_lifetime - preferred lifetime in seconds (0xffffffff represents
119 @param valid_lifetime_expires - number of seconds in which valid lifetime
120 expires (zero means never, negative value
121 means expired this number of seconds ago)
122 @param pref_lifetime_expires - number of seconds in which preferred
123 lifetime expires (zero means never, negative
124 value means expired this number of seconds
126 @param decrement_lifetime_flag - if true, decrement valid lifetime and
128 @param no_advertise - if true, the prefix will not be advertised
130 typedef ip6nd_ra_prefix
132 vl_api_prefix_t prefix;
134 bool autonomous_flag;
137 f64 valid_lifetime_expires;
138 f64 pref_lifetime_expires;
139 bool decrement_lifetime_flag;
143 /** \brief Dump IPv6 Router Advertisements details on a per-interface basis
144 @param client_index - opaque cookie to identify the sender
145 @param context - sender context, to match reply w/ request
146 @param sw_if_index - interface index to use as a filter (0xffffffff
147 represents all interfaces)
149 define sw_interface_ip6nd_ra_dump
154 vl_api_interface_index_t sw_if_index;
155 option vat_help = "[(<if-name>|sw_if_index <if-idx>)]";
158 /** \brief Details on IPv6 Router Advertisements for a single interface
159 @param context - returned sender context, to match reply w/ request
160 @param sw_if_index - interface index the details are belong to
161 @param cur_hop_limit - current hop limit
162 @param adv_managed_flag - if true, enable DHCP for address
163 @param adv_other_flag - if true, Enable DHCP for other information
164 @param adv_router_lifetime - lifetime associated with the default router in
165 seconds (zero indicates that the router is not
167 @param adv_neighbor_reachable_time - number of milliseconds within which a
168 neighbor is assumed to be reachable
169 (zero means unspecified)
170 @param adv_retransmit_interval - number of milliseconds between
171 retransmitted Neighbor Solicitation
172 messages (zero means unspecified)
173 @param adv_link_mtu - MTU that all the nodes on a link use
174 @param send_radv - if true, send periodic Router Advertisements
175 @param cease_radv - if true, cease to send periodic Router Advertisements
176 @param send_unicast - if true, destination address of a Router
177 Advertisement message will use the source address of
178 the Router Solicitation message (when available).
179 Otherwise, multicast address will be used
180 @param adv_link_layer_address - if true, add link layer address option
181 @param max_radv_interval - maximum time in seconds allowed between sending
182 unsolicited multicast Router Advertisements
183 @param min_radv_interval - minimum time in seconds allowed between sending
184 unsolicited multicast Router Advertisements
185 @param last_radv_time - number of seconds since the last time a solicited
186 Router Advertisement message was sent (zero means
188 @param last_multicast_time - number of seconds since the last time a
189 multicast Router Advertisements message was
190 sent (zero means never)
191 @param next_multicast_time - number of seconds within which next time a
192 multicast Router Advertisement message will be
193 sent (zero means never)
194 @param initial_adverts_count - number of initial Router Advertisement
196 @param initial_adverts_interval - number of seconds between initial Router
197 Advertisement messages
198 @param initial_adverts_sent - if true, all initial Router Advertisement
200 @param n_advertisements_sent - number of Router Advertisements sent
201 @param n_solicitations_rcvd - number of Router Solicitations received
202 @param n_solicitations_dropped - number of Router Solicitations dropped
203 @param n_prefixes - number of prefix entries
204 @param prefixes - array of prefix entries
206 define sw_interface_ip6nd_ra_details
210 vl_api_interface_index_t sw_if_index;
212 bool adv_managed_flag;
214 u16 adv_router_lifetime;
215 u32 adv_neighbor_reachable_time;
216 u32 adv_retransmit_interval;
221 bool adv_link_layer_address;
222 f64 max_radv_interval;
223 f64 min_radv_interval;
225 f64 last_multicast_time;
226 f64 next_multicast_time;
227 u32 initial_adverts_count;
228 f64 initial_adverts_interval;
229 bool initial_adverts_sent;
230 u32 n_advertisements_sent;
231 u32 n_solicitations_rcvd;
232 u32 n_solicitations_dropped;
234 vl_api_ip6nd_ra_prefix_t prefixes[n_prefixes];
237 /** \brief IPv6 ND (mirror) proxy
238 @param client_index - opaque cookie to identify the sender
239 @param context - sender context, to match reply w/ request
240 @param sw_if_index - The interface the host is on
241 @param is_enable - enable or disable
243 autoreply define ip6nd_proxy_enable_disable
247 vl_api_interface_index_t sw_if_index;
251 /** \brief IPv6 ND proxy config
252 @param client_index - opaque cookie to identify the sender
253 @param context - sender context, to match reply w/ request
254 @param sw_if_index - The interface the host is on
255 @param ip - The address of the host for which to proxy for
256 @param is_add - Adding or deleting
258 autoreply define ip6nd_proxy_add_del
262 vl_api_interface_index_t sw_if_index;
264 vl_api_ip6_address_t ip;
267 /** \brief IPv6 ND proxy details returned after request
268 @param context - sender context, to match reply w/ request
269 @param sw_if_index - The interface the host is on
270 @param ip - The address of the host for which to proxy for
272 define ip6nd_proxy_details
275 vl_api_interface_index_t sw_if_index;
276 vl_api_ip6_address_t ip;
279 /** \brief IPv6 ND proxy dump request
280 @param context - sender context, to match reply w/ request
282 define ip6nd_proxy_dump
288 /** \brief Start / stop sending router solicitation
289 @param client_index - opaque cookie to identify the sender
290 @param context - sender context, to match reply w/ request
291 @param irt - initial retransmission time
292 @param mrt - maximum retransmission time
293 @param mrc - maximum retransmission count
294 @param mrd - maximum retransmission duration
295 @param sw_if_index - software interface index of interface
296 for sending router solicitation
297 @param stop - if non-zero then stop sending router solicitation,
298 otherwise start sending router solicitation
300 autoreply define ip6nd_send_router_solicitation
308 vl_api_interface_index_t sw_if_index;
313 rpc want_ip6_ra_events returns want_ip6_ra_events_reply
317 /** \brief Register for ip6 router advertisement events
318 @param client_index - opaque cookie to identify the sender
319 @param context - sender context, to match reply w/ request
320 @param enable - 1 => register for events, 0 => cancel registration
321 @param pid - sender's pid
323 autoreply define want_ip6_ra_events
331 /** \brief Struct representing RA prefix info
332 @param prefix - RA prefix info destination address
333 @param flags - RA prefix info flags
334 @param valid_time - RA prefix info valid time
335 @param preferred_time - RA prefix info preferred time
337 typedef ip6_ra_prefix_info
339 vl_api_prefix_t prefix;
345 /** \brief Tell client about a router advertisement event
346 @param client_index - opaque cookie to identify the sender
347 @param pid - client pid registered to receive notification
348 @param current_hop_limit - RA current hop limit
349 @param flags - RA flags
350 @param router_lifetime_in_sec - RA lifetime in seconds
351 @param router_addr - The router's address
352 @param neighbor_reachable_time_in_msec - RA neighbor reachable time in msec
353 @param time_in_msec_between_retransmitted_neighbor_solicitations -
354 time in msec between retransmitted neighbor solicitations
362 vl_api_interface_index_t sw_if_index;
363 vl_api_ip6_address_t router_addr;
364 u8 current_hop_limit;
366 u16 router_lifetime_in_sec;
367 u32 neighbor_reachable_time_in_msec;
368 u32 time_in_msec_between_retransmitted_neighbor_solicitations;
370 vl_api_ip6_ra_prefix_info_t prefixes[n_prefixes];
376 * eval: (c-set-style "gnu")