summaryrefslogtreecommitdiffstats
path: root/src/vnet/ip6-nd/ip6_nd.api
blob: 91b5faf9bdf52aacfb17d907b4265130587d03df (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
/* 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.0.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 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:
 */