blob: 3ddf25103c1f965cccfa6ebb387511cc5f98cabd [file] [log] [blame]
Neale Rannscbe25aa2019-09-30 10:53:31 +00001/* 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
Alexander Chernavin3b28fd72023-02-02 14:22:56 +000023option version = "1.1.0";
Neale Rannscbe25aa2019-09-30 10:53:31 +000024
25import "vnet/ip/ip_types.api";
26import "vnet/interface_types.api";
27
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
31 @param suppress -
32 @param managed -
33 @param other -
34 @param ll_option -
35 @param send_unicast -
36 @param cease -
37 @param is_no -
38 @param default_router -
39 @param max_interval -
40 @param min_interval -
41 @param lifetime -
42 @param initial_count -
43 @param initial_interval -
44*/
45autoreply define sw_interface_ip6nd_ra_config
46{
47 u32 client_index;
48 u32 context;
49 vl_api_interface_index_t sw_if_index;
50 u8 suppress;
51 u8 managed;
52 u8 other;
53 u8 ll_option;
54 u8 send_unicast;
55 u8 cease;
56 bool is_no;
57 u8 default_router;
58 u32 max_interval;
59 u32 min_interval;
60 u32 lifetime;
61 u32 initial_count;
62 u32 initial_interval;
63};
64
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.
92*/
93autoreply define sw_interface_ip6nd_ra_prefix
94{
95 u32 client_index;
96 u32 context;
97 vl_api_interface_index_t sw_if_index;
98 vl_api_prefix_t prefix;
99 bool use_default;
100 bool no_advertise;
101 bool off_link;
102 bool no_autoconfig;
103 bool no_onlink;
104 bool is_no;
105 u32 val_lifetime;
106 u32 pref_lifetime;
107};
108
Alexander Chernavin3b28fd72023-02-02 14:22:56 +0000109/** \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
112 determination
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
116 infinity)
117 @param pref_lifetime - preferred lifetime in seconds (0xffffffff represents
118 infinity)
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
125 ago)
126 @param decrement_lifetime_flag - if true, decrement valid lifetime and
127 preferred lifetime
128 @param no_advertise - if true, the prefix will not be advertised
129*/
130typedef ip6nd_ra_prefix
131{
132 vl_api_prefix_t prefix;
133 bool onlink_flag;
134 bool autonomous_flag;
135 u32 val_lifetime;
136 u32 pref_lifetime;
137 f64 valid_lifetime_expires;
138 f64 pref_lifetime_expires;
139 bool decrement_lifetime_flag;
140 bool no_advertise;
141};
142
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)
148*/
149define sw_interface_ip6nd_ra_dump
150{
151 option in_progress;
152 u32 client_index;
153 u32 context;
154 vl_api_interface_index_t sw_if_index;
155 option vat_help = "[(<if-name>|sw_if_index <if-idx>)]";
156};
157
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
166 a default router)
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
187 never)
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
195 messages to send
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
199 messages were sent
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
205*/
206define sw_interface_ip6nd_ra_details
207{
208 option in_progress;
209 u32 context;
210 vl_api_interface_index_t sw_if_index;
211 u8 cur_hop_limit;
212 bool adv_managed_flag;
213 bool adv_other_flag;
214 u16 adv_router_lifetime;
215 u32 adv_neighbor_reachable_time;
216 u32 adv_retransmit_interval;
217 u32 adv_link_mtu;
218 bool send_radv;
219 bool cease_radv;
220 bool send_unicast;
221 bool adv_link_layer_address;
222 f64 max_radv_interval;
223 f64 min_radv_interval;
224 f64 last_radv_time;
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;
233 u32 n_prefixes;
234 vl_api_ip6nd_ra_prefix_t prefixes[n_prefixes];
235};
236
Mohsin Kazmicebb4772021-04-07 19:50:35 +0200237/** \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
242*/
243autoreply define ip6nd_proxy_enable_disable
244{
245 u32 client_index;
246 u32 context;
247 vl_api_interface_index_t sw_if_index;
248 bool is_enable;
249};
250
Neale Rannscbe25aa2019-09-30 10:53:31 +0000251/** \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
257*/
258autoreply define ip6nd_proxy_add_del
259{
260 u32 client_index;
261 u32 context;
262 vl_api_interface_index_t sw_if_index;
263 bool is_add;
264 vl_api_ip6_address_t ip;
265};
266
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
271*/
272define ip6nd_proxy_details
273{
274 u32 context;
275 vl_api_interface_index_t sw_if_index;
276 vl_api_ip6_address_t ip;
277};
278
279/** \brief IPv6 ND proxy dump request
280 @param context - sender context, to match reply w/ request
281*/
282define ip6nd_proxy_dump
283{
284 u32 client_index;
285 u32 context;
286};
287
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
299*/
300autoreply define ip6nd_send_router_solicitation
301{
302 u32 client_index;
303 u32 context;
304 u32 irt;
305 u32 mrt;
306 u32 mrc;
307 u32 mrd;
308 vl_api_interface_index_t sw_if_index;
309 bool stop;
310};
311
312service {
313 rpc want_ip6_ra_events returns want_ip6_ra_events_reply
314 events ip6_ra_event;
315};
316
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
322*/
323autoreply define want_ip6_ra_events
324{
325 u32 client_index;
326 u32 context;
327 bool enable;
328 u32 pid;
329};
330
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
336*/
337typedef ip6_ra_prefix_info
338{
339 vl_api_prefix_t prefix;
340 u8 flags;
341 u32 valid_time;
342 u32 preferred_time;
343};
344
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
355 @param n_prefixes -
356 @param prefixes -
357*/
358define ip6_ra_event
359{
360 u32 client_index;
361 u32 pid;
362 vl_api_interface_index_t sw_if_index;
363 vl_api_ip6_address_t router_addr;
364 u8 current_hop_limit;
365 u8 flags;
366 u16 router_lifetime_in_sec;
367 u32 neighbor_reachable_time_in_msec;
368 u32 time_in_msec_between_retransmitted_neighbor_solicitations;
369 u32 n_prefixes;
370 vl_api_ip6_ra_prefix_info_t prefixes[n_prefixes];
371};
372
373
374/*
375 * Local Variables:
376 * eval: (c-set-style "gnu")
377 * End:
378 */