aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/ip6-nd/ip6_nd.api
blob: 3ddf25103c1f965cccfa6ebb387511cc5f98cabd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
/* Hey Emacs use -*- mode: C -*- */
/*
 * Copyright (c) 2018 Cisco and/or its affiliates.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at:
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

/** \file

    This file defines vpp IP control-plane API messages which are generally
    called through a shared memory interface.
*/

option version = "1.1.0";

import "vnet/ip/ip_types.api";
import "vnet/interface_types.api";

/** \brief IPv6 router advertisement config request
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param suppress -
    @param managed -
    @param other -
    @param ll_option -
    @param send_unicast -
    @param cease -
    @param is_no -
    @param default_router -
    @param max_interval -
    @param min_interval -
    @param lifetime -
    @param initial_count -
    @param initial_interval -
*/
autoreply define sw_interface_ip6nd_ra_config
{
  u32 client_index;
  u32 context;
  vl_api_interface_index_t sw_if_index;
  u8 suppress;
  u8 managed;
  u8 other;
  u8 ll_option;
  u8 send_unicast;
  u8 cease;
  bool is_no;
  u8 default_router;
  u32 max_interval;
  u32 min_interval;
  u32 lifetime;
  u32 initial_count;
  u32 initial_interval;
};

/** \brief IPv6 router advertisement prefix config request
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param sw_if_index - The interface the RA prefix information is for
    @param prefix - The prefix to advertise
    @param use_default - Revert to default settings
    @param no_advertise - Do not advertise this prefix
    @param off_link - The prefix is off link (it is not configured on the interface)
                      Configures the L-flag, When set, indicates that this
		      prefix can be used for on-link determination.
    @param no_autoconfig - Setting for the A-flag. When
                           set indicates that this prefix can be used for
                          stateless address configuration.
    @param no_onlink - The prefix is not on link. Make sure this is consistent
                       with the off_link parameter else YMMV
    @param is_no - add/delete
    @param val_lifetime - The length of time in
                     seconds (relative to the time the packet is sent)
                     that the prefix is valid for the purpose of on-link
                     determination.  A value of all one bits
                     (0xffffffff) represents infinity
    @param pref_lifetime - The length of time in
                     seconds (relative to the time the packet is sent)
                     that addresses generated from the prefix via
                     stateless address autoconfiguration remain
                     preferred [ADDRCONF].  A value of all one bits
                     (0xffffffff) represents infinity.
*/
autoreply define sw_interface_ip6nd_ra_prefix
{
  u32 client_index;
  u32 context;
  vl_api_interface_index_t sw_if_index;
  vl_api_prefix_t prefix;
  bool use_default;
  bool no_advertise;
  bool off_link;
  bool no_autoconfig;
  bool no_onlink;
  bool is_no;
  u32 val_lifetime;
  u32 pref_lifetime;
};

/** \brief IPv6 Router Advertisements prefix entry
    @param prefix - prefix to advertise
    @param onlink_flag - if true, the prefix can be used for on-link
                         determination
    @param autonomous_flag - if true, the prefix can be used for stateless
                             address configuration
    @param val_lifetime - valid lifetime in seconds (0xffffffff represents
                          infinity)
    @param pref_lifetime - preferred lifetime in seconds (0xffffffff represents
                           infinity)
    @param valid_lifetime_expires - number of seconds in which valid lifetime
                                    expires (zero means never, negative value
                                    means expired this number of seconds ago)
    @param pref_lifetime_expires - number of seconds in which preferred
                                   lifetime expires (zero means never, negative
                                   value means expired this number of seconds
                                   ago)
    @param decrement_lifetime_flag - if true, decrement valid lifetime and
                                     preferred lifetime
    @param no_advertise - if true, the prefix will not be advertised
*/
typedef ip6nd_ra_prefix
{
  vl_api_prefix_t prefix;
  bool onlink_flag;
  bool autonomous_flag;
  u32 val_lifetime;
  u32 pref_lifetime;
  f64 valid_lifetime_expires;
  f64 pref_lifetime_expires;
  bool decrement_lifetime_flag;
  bool no_advertise;
};

/** \brief Dump IPv6 Router Advertisements details on a per-interface basis
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param sw_if_index - interface index to use as a filter (0xffffffff
                         represents all interfaces)
*/
define sw_interface_ip6nd_ra_dump
{
  option in_progress;
  u32 client_index;
  u32 context;
  vl_api_interface_index_t sw_if_index;
  option vat_help = "[(<if-name>|sw_if_index <if-idx>)]";
};

/** \brief Details on IPv6 Router Advertisements for a single interface
    @param context - returned sender context, to match reply w/ request
    @param sw_if_index - interface index the details are belong to
    @param cur_hop_limit - current hop limit
    @param adv_managed_flag - if true, enable DHCP for address
    @param adv_other_flag - if true, Enable DHCP for other information
    @param adv_router_lifetime - lifetime associated with the default router in
                                 seconds (zero indicates that the router is not
				 a default router)
    @param adv_neighbor_reachable_time - number of milliseconds within which a
                                         neighbor is assumed to be reachable
                                         (zero means unspecified)
    @param adv_retransmit_interval - number of milliseconds between
                                     retransmitted Neighbor Solicitation
                                     messages (zero means unspecified)
    @param adv_link_mtu - MTU that all the nodes on a link use
    @param send_radv - if true, send periodic Router Advertisements
    @param cease_radv - if true, cease to send periodic Router Advertisements
    @param send_unicast - if true, destination address of a Router
                          Advertisement message will use the source address of
                          the Router Solicitation message (when available).
                          Otherwise, multicast address will be used
    @param adv_link_layer_address - if true, add link layer address option
    @param max_radv_interval - maximum time in seconds allowed between sending
                               unsolicited multicast Router Advertisements
    @param min_radv_interval - minimum time in seconds allowed between sending
                               unsolicited multicast Router Advertisements
    @param last_radv_time - number of seconds since the last time a solicited
                            Router Advertisement message was sent (zero means
                            never)
    @param last_multicast_time - number of seconds since the last time a
                                 multicast Router Advertisements message was
                                 sent (zero means never)
    @param next_multicast_time - number of seconds within which next time a
                                 multicast Router Advertisement message will be
                                 sent (zero means never)
    @param initial_adverts_count - number of initial Router Advertisement
                                   messages to send
    @param initial_adverts_interval - number of seconds between initial Router
                                      Advertisement messages
    @param initial_adverts_sent - if true, all initial Router Advertisement
                                  messages were sent
    @param n_advertisements_sent - number of Router Advertisements sent
    @param n_solicitations_rcvd - number of Router Solicitations received
    @param n_solicitations_dropped - number of Router Solicitations dropped
    @param n_prefixes - number of prefix entries
    @param prefixes - array of prefix entries
*/
define sw_interface_ip6nd_ra_details
{
  option in_progress;
  u32 context;
  vl_api_interface_index_t sw_if_index;
  u8 cur_hop_limit;
  bool adv_managed_flag;
  bool adv_other_flag;
  u16 adv_router_lifetime;
  u32 adv_neighbor_reachable_time;
  u32 adv_retransmit_interval;
  u32 adv_link_mtu;
  bool send_radv;
  bool cease_radv;
  bool send_unicast;
  bool adv_link_layer_address;
  f64 max_radv_interval;
  f64 min_radv_interval;
  f64 last_radv_time;
  f64 last_multicast_time;
  f64 next_multicast_time;
  u32 initial_adverts_count;
  f64 initial_adverts_interval;
  bool initial_adverts_sent;
  u32 n_advertisements_sent;
  u32 n_solicitations_rcvd;
  u32 n_solicitations_dropped;
  u32 n_prefixes;
  vl_api_ip6nd_ra_prefix_t prefixes[n_prefixes];
};

/** \brief IPv6 ND (mirror) proxy
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param sw_if_index - The interface the host is on
    @param is_enable - enable or disable
*/
autoreply define ip6nd_proxy_enable_disable
{
  u32 client_index;
  u32 context;
  vl_api_interface_index_t sw_if_index;
  bool is_enable;
};

/** \brief IPv6 ND proxy config
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param sw_if_index - The interface the host is on
    @param ip - The address of the host for which to proxy for
    @param is_add - Adding or deleting
*/
autoreply define ip6nd_proxy_add_del
{
  u32 client_index;
  u32 context;
  vl_api_interface_index_t sw_if_index;
  bool is_add;
  vl_api_ip6_address_t ip;
};

/** \brief IPv6 ND proxy details returned after request
    @param context - sender context, to match reply w/ request
    @param sw_if_index - The interface the host is on
    @param ip - The address of the host for which to proxy for
*/
define ip6nd_proxy_details
{
  u32 context;
  vl_api_interface_index_t sw_if_index;
  vl_api_ip6_address_t ip;
};

/** \brief IPv6 ND proxy dump request
    @param context - sender context, to match reply w/ request
*/
define ip6nd_proxy_dump
{
  u32 client_index;
  u32 context;
};

/** \brief Start / stop sending router solicitation
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param irt - initial retransmission time
    @param mrt - maximum retransmission time
    @param mrc - maximum retransmission count
    @param mrd - maximum retransmission duration
    @param sw_if_index - software interface index of interface
                         for sending router solicitation
    @param stop - if non-zero then stop sending router solicitation,
                  otherwise start sending router solicitation
*/
autoreply define ip6nd_send_router_solicitation
{
  u32 client_index;
  u32 context;
  u32 irt;
  u32 mrt;
  u32 mrc;
  u32 mrd;
  vl_api_interface_index_t sw_if_index;
  bool stop;
};

service {
  rpc want_ip6_ra_events returns want_ip6_ra_events_reply
    events ip6_ra_event;
};

/** \brief Register for ip6 router advertisement events
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param enable - 1 => register for events, 0 => cancel registration
    @param pid - sender's pid
*/
autoreply define want_ip6_ra_events
{
  u32 client_index;
  u32 context;
  bool enable;
  u32 pid;
};

/** \brief Struct representing RA prefix info
    @param prefix - RA prefix info destination address
    @param flags - RA prefix info flags
    @param valid_time - RA prefix info valid time
    @param preferred_time - RA prefix info preferred time
*/
typedef ip6_ra_prefix_info
{
  vl_api_prefix_t prefix;
  u8 flags;
  u32 valid_time;
  u32 preferred_time;
};

/** \brief Tell client about a router advertisement event
    @param client_index - opaque cookie to identify the sender
    @param pid - client pid registered to receive notification
    @param current_hop_limit - RA current hop limit
    @param flags - RA flags
    @param router_lifetime_in_sec - RA lifetime in seconds
    @param router_addr - The router's address
    @param neighbor_reachable_time_in_msec - RA neighbor reachable time in msec
    @param time_in_msec_between_retransmitted_neighbor_solicitations -
               time in msec between retransmitted neighbor solicitations
    @param n_prefixes -
    @param prefixes -
*/
define ip6_ra_event
{
  u32 client_index;
  u32 pid;
  vl_api_interface_index_t sw_if_index;
  vl_api_ip6_address_t router_addr;
  u8 current_hop_limit;
  u8 flags;
  u16 router_lifetime_in_sec;
  u32 neighbor_reachable_time_in_msec;
  u32 time_in_msec_between_retransmitted_neighbor_solicitations;
  u32 n_prefixes;
  vl_api_ip6_ra_prefix_info_t prefixes[n_prefixes];
};


/*
 * Local Variables:
 * eval: (c-set-style "gnu")
 * End:
 */