summaryrefslogtreecommitdiffstats
path: root/src/vnet/ip/ip.api
blob: 0a4a9c9773ccae0351b2360ead00fc01695c9142 (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
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
/*
 * Copyright (c) 2016 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. 
*/

/** \brief Dump IP fib table
    @param client_index - opaque cookie to identify the sender
*/
define ip_fib_dump
{
  u32 client_index;
  u32 context;
};

/** \brief FIB path
    @param sw_if_index - index of the interface
    @param weight - The weight, for UCMP
    @param is_local - local if non-zero, else remote
    @param is_drop - Drop the packet
    @param is_unreach - Drop the packet and rate limit send ICMP unreachable
    @param is_prohibit - Drop the packet and rate limit send ICMP prohibited
    @param afi - the afi of the next hop, IP46_TYPE_IP4=1, IP46_TYPE_IP6=2
    @param next_hop[16] - the next hop address

    WARNING: this type is replicated, pending cleanup completion
*/
typeonly manual_print manual_endian define fib_path
{
  u32 sw_if_index;
  u32 weight;
  u8 is_local;
  u8 is_drop;
  u8 is_unreach;
  u8 is_prohibit;
  u8 afi;
  u8 next_hop[16];
};

/** \brief IP FIB table response
    @param table_id - IP fib table id
    @address_length - mask length
    @address - ip4 prefix
    @param count - the number of fib_path in path
    @param path  - array of of fib_path structures
*/
manual_endian manual_print define ip_fib_details
{
  u32 context;
  u32 table_id;
  u8  address_length;
  u8  address[4];
  u32 count;
  vl_api_fib_path_t path[count];
};

/** \brief Dump IP6 fib table
    @param client_index - opaque cookie to identify the sender
*/
define ip6_fib_dump
{
  u32 client_index;
  u32 context;
};

/** \brief IP6 FIB table response
    @param table_id - IP6 fib table id
    @address_length - mask length
    @address - ip6 prefix
    @param count - the number of fib_path in path
    @param path  - array of of fib_path structures
*/
manual_endian manual_print define ip6_fib_details
{
  u32 context;
  u32 table_id;
  u8  address_length;
  u8  address[16];
  u32 count;
  vl_api_fib_path_t path[count];
};

/** \brief Dump IP neighboors
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param sw_if_index - the interface to dump neighboors
    @param is_ipv6 - [1|0] to indicate if address family is ipv[6|4]
*/
define ip_neighbor_dump
{
    u32 client_index;
    u32 context;
    u32 sw_if_index;
    u8  is_ipv6;
};

/** \brief IP neighboors dump response
    @param context - sender context which was passed in the request
    @param is_static - [1|0] to indicate if neighbor is statically configured
    @param is_ipv6 - [1|0] to indicate if address family is ipv[6|4]
*/
define ip_neighbor_details {
    u32 context;
    u8  is_static;
    u8  is_ipv6;
    u8  mac_address[6];
    u8  ip_address[16];
};

/** \brief IP neighbor add / del request
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param vrf_id - vrf_id, only for IP4
    @param sw_if_index - interface used to reach neighbor
    @param is_add - 1 to add neighbor, 0 to delete
    @param is_ipv6 - 1 for IPv6 neighbor, 0 for IPv4
    @param is_static - 
    @param mac_address - l2 address of the neighbor
    @param dst_address - ip4 or ip6 address of the neighbor
*/
define ip_neighbor_add_del
{
  u32 client_index;
  u32 context;
  u32 vrf_id;			/* only makes sense for ip4 */
  u32 sw_if_index;
  /* 1 = add, 0 = delete */
  u8 is_add;
  u8 is_ipv6;
  u8 is_static;
  u8 mac_address[6];
  u8 dst_address[16];
};

/** \brief Reply for IP Neighbor add / delete request
    @param context - returned sender context, to match reply w/ request
    @param retval - return code
*/
define ip_neighbor_add_del_reply
{
  u32 context;
  i32 retval;
};

/** \brief Set the ip flow hash config for a fib request
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param vrf_id - vrf/fib id
    @param is_ipv6 - if non-zero the fib is ip6, else ip4
    @param src - if non-zero include src in flow hash
    @param dst - if non-zero include dst in flow hash
    @param sport - if non-zero include sport in flow hash
    @param dport - if non-zero include dport in flow hash
    @param proto -if non-zero include proto in flow hash
    @param reverse - if non-zero include reverse in flow hash
*/
define set_ip_flow_hash
{
  u32 client_index;
  u32 context;
  u32 vrf_id;
  u8 is_ipv6;
  u8 src;
  u8 dst;
  u8 sport;
  u8 dport;
  u8 proto;
  u8 reverse;
};

/** \brief Set the ip flow hash config for a fib response
    @param context - sender context, to match reply w/ request
    @param retval - return code for the request
*/
define set_ip_flow_hash_reply
{
  u32 context;
  i32 retval;
};

/** \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 -
*/
define sw_interface_ip6nd_ra_config
{
  u32 client_index;
  u32 context;
  u32 sw_if_index;
  u8 suppress;
  u8 managed;
  u8 other;
  u8 ll_option;
  u8 send_unicast;
  u8 cease;
  u8 is_no;
  u8 default_router;
  u32 max_interval;
  u32 min_interval;
  u32 lifetime;
  u32 initial_count;
  u32 initial_interval;
};

/** \brief IPv6 router advertisement config response
    @param context - sender context, to match reply w/ request
    @param retval - return code for the request
*/
define sw_interface_ip6nd_ra_config_reply
{
  u32 context;
  i32 retval;
};

/** \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 - 
    @param address[] -
    @param address_length -
    @param use_default -
    @param no_advertise -
    @param off_link -
    @param no_autoconfig -
    @param no_onlink -
    @param is_no -
    @param val_lifetime -
    @param pref_lifetime -
*/
define sw_interface_ip6nd_ra_prefix
{
  u32 client_index;
  u32 context;
  u32 sw_if_index;
  u8 address[16];
  u8 address_length;
  u8 use_default;
  u8 no_advertise;
  u8 off_link;
  u8 no_autoconfig;
  u8 no_onlink;
  u8 is_no;
  u32 val_lifetime;
  u32 pref_lifetime;
};

/** \brief IPv6 router advertisement prefix config response
    @param context - sender context, to match reply w/ request
    @param retval - return code for the request
*/
define sw_interface_ip6nd_ra_prefix_reply
{
  u32 context;
  i32 retval;
};

/** \brief IPv6 interface enable / disable request
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param sw_if_index - interface used to reach neighbor
    @param enable - if non-zero enable ip6 on interface, else disable
*/
define sw_interface_ip6_enable_disable
{
  u32 client_index;
  u32 context;
  u32 sw_if_index;
  u8 enable;			/* set to true if enable */
};

/** \brief IPv6 interface enable / disable response
    @param context - sender context, to match reply w/ request
    @param retval - return code for the request
*/
define sw_interface_ip6_enable_disable_reply
{
  u32 context;
  i32 retval;
};

/** \brief IPv6 set link local address on interface request
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param sw_if_index - interface to set link local on
    @param address[] - the new link local address
*/
define sw_interface_ip6_set_link_local_address
{
  u32 client_index;
  u32 context;
  u32 sw_if_index;
  u8 address[16];
};

/** \brief IPv6 set link local address on interface response
    @param context - sender context, to match reply w/ request
    @param retval - error code for the request
*/
define sw_interface_ip6_set_link_local_address_reply
{
  u32 context;
  i32 retval;
};

/** \brief Add / del route request
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param sw_if_index - software index of the new vlan's parent interface
    @param vrf_id - fib table /vrf associated with the route
    @param lookup_in_vrf - 
    @param classify_table_index - 
    @param create_vrf_if_needed - 
    @param is_add - 1 if adding the route, 0 if deleting
    @param is_drop - Drop the packet
    @param is_unreach - Drop the packet and rate limit send ICMP unreachable
    @param is_prohibit - Drop the packet and rate limit send ICMP prohibited
    @param is_ipv6 - 0 if an ip4 route, else ip6
    @param is_local - 
    @param is_classify - 
    @param is_multipath - Set to 1 if this is a multipath route, else 0
    @param not_last - Is last or not last msg in group of multiple add/del msgs
    @param next_hop_weight - 
    @param dst_address_length - 
    @param dst_address[16] - 
    @param next_hop_address[16] - 
    @param next_hop_n_out_labels - the number of labels in the label stack
    @param next_hop_out_label_stack - the next-hop output label stack, outer most first
    @param next_hop_via_label - The next-hop is a resolved via a local label
*/
define ip_add_del_route
{
  u32 client_index;
  u32 context;
  u32 next_hop_sw_if_index;
  u32 table_id;
  u32 classify_table_index;
  u32 next_hop_table_id;
  u8 create_vrf_if_needed;
  u8 is_add;
  u8 is_drop;
  u8 is_unreach;
  u8 is_prohibit;
  u8 is_ipv6;
  u8 is_local;
  u8 is_classify;
  u8 is_multipath;
  u8 is_resolve_host;
  u8 is_resolve_attached;
  /* Is last/not-last message in group of multiple add/del messages. */
  u8 not_last;
  u8 next_hop_weight;
  u8 dst_address_length;
  u8 dst_address[16];
  u8 next_hop_address[16];
  u8 next_hop_n_out_labels;
  u32 next_hop_via_label;
  u32 next_hop_out_label_stack[next_hop_n_out_labels];
};

/** \brief Reply for add / del route request
    @param context - returned sender context, to match reply w/ request
    @param retval - return code
*/
define ip_add_del_route_reply
{
  u32 context;
  i32 retval;
};

/** \brief Add / del route request
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param sw_if_index - software index of the new vlan's parent interface
    @param vrf_id - fib table /vrf associated with the route

    FIXME
*/
define ip_mroute_add_del
{
  u32 client_index;
  u32 context;
  u32 next_hop_sw_if_index;
  u32 table_id;
  u32 entry_flags;
  u32 itf_flags;
  u16 grp_address_length;
  u8 create_vrf_if_needed;
  u8 is_add;
  u8 is_ipv6;
  u8 is_local;
  u8 grp_address[16];
  u8 src_address[16];
};

/** \brief Reply for add / del mroute request
    @param context - returned sender context, to match reply w/ request
    @param retval - return code
*/
define ip_mroute_add_del_reply
{
  u32 context;
  i32 retval;
};

define ip_address_details
{
  u32 client_index;
  u32 context;
  u8 ip[16];
  u8 prefix_length;
  u32 sw_if_index;
  u8 is_ipv6;
};

define ip_address_dump
{
  u32 client_index;
  u32 context;
  u32 sw_if_index;
  u8 is_ipv6;
};

define ip_details
{
  u32 sw_if_index;
  u32 context;
  u8 is_ipv6;
};

define ip_dump
{
  u32 client_index;
  u32 context;
  u8 is_ipv6;
};

define mfib_signal_dump
{
  u32 client_index;
  u32 context;
};

define mfib_signal_details
{
  u32 client_index;
  u32 context;
  u32 sw_if_index;
  u32 table_id;
  u16 grp_address_len;
  u8 grp_address[16];
  u8 src_address[16];
  u16 ip_packet_len;
  u8 ip_packet_data[256];
};

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