summaryrefslogtreecommitdiffstats
path: root/hicn-plugin/src/hicn.api
blob: e7d7d33c465618ce1fa8e09ed25fe083067713a5 (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
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
/*
 * Copyright (c) 2017-2019 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.
 */

define hicn_api_node_params_set
{
  /* Client identifier, set from api_main.my_client_index */
  u32 client_index;

  /* Arbitrary context, so client can match reply to request */
  u32 context;

  /* Enable / disable ICN forwarder in VPP */
  u8 enable_disable;

  /* PIT maximum size, otherwise -1 to assign default value */
  i32 pit_max_size;

  /* CS maximum size, otherwise -1 to assign default value */
  i32 cs_max_size;

  /* Portion of CS reserved to application, otherwise -1 to assign default value */
  i32 cs_reserved_app;

  /* Default PIT entry lifetime */
  f64 pit_dflt_lifetime_sec;

  /* Lower bound on PIT entry lifetime */
  f64 pit_min_lifetime_sec;

  /* Upper bound on PIT entry lifetime */
  f64 pit_max_lifetime_sec;
};

define hicn_api_node_params_set_reply
{
  /* From the request */
  u32 context;

  /* Return value, zero means all OK */
  i32 retval;
};

define hicn_api_node_params_get
{
  /* Client identifier, set from api_main.my_client_index */
  u32 client_index;

  /* Arbitrary context, so client can match reply to request */
  u32 context;
};

define hicn_api_node_params_get_reply
{
  /* From the request */
  u32 context;

  /* Return value, zero means all OK */
  i32 retval;

  /* Enabled / disabled flag */
  u8 is_enabled;

  /* compile-time plugin features */
  u8 feature_cs;

  /* Number of VPP workers */
  u32 worker_count;

  /* PIT maximum size, otherwise -1 to assign default value */
  u32 pit_max_size;

  /* CS maximum size, otherwise -1 to assign default value */
  u32 cs_max_size;

  /* Default PIT entry lifetime */
  f64 pit_dflt_lifetime_sec;

  /* Lower bound on PIT entry lifetime */
  f64 pit_min_lifetime_sec;

  /* Upper bound on PIT entry lifetime */
  f64 pit_max_lifetime_sec;
};

define hicn_api_node_stats_get
{
  /* Client identifier, set from api_main.my_client_index */
  u32 client_index;

  /* Arbitrary context, so client can match reply to request */
  u32 context;
};

define hicn_api_node_stats_get_reply
{
  /* Client identifier, set from api_main.my_client_index */
  u32 client_index;

  /* Arbitrary context, so client can match reply to request */
  u32 context;

  /* Return value, zero means all OK */
  i32 retval;

  /* ICN packets processed */
  u64 pkts_processed;

  /* ICN interests forwarded */
  u64 pkts_interest_count;

  /* ICN data msgs forwarded */
  u64 pkts_data_count;

  /* ICN cached data msg replies */
  u64 pkts_from_cache_count;

  /* ICN no PIT entry drops */
  u64 pkts_no_pit_count;

  /* ICN expired PIT entries */
  u64 pit_expired_count;

  /* ICN expired CS entries */
  u64 cs_expired_count;

  /* ICN LRU CS entries freed */
  u64 cs_lru_count;

  /* ICN msgs dropped due to no packet buffers */
  u64 pkts_drop_no_buf;

  /* ICN Interest messages aggregated in PIT */
  u64 interests_aggregated;

  /* ICN Interest messages retransmitted */
  u64 interests_retx;

  /* ICN Interest messages colliding in hashtb */
  u64 interests_hash_collision;

  /* Number of entries in PIT at the present moment */
  u64 pit_entries_count;

  /* Number of entries in CS at the present moment */
  u64 cs_entries_count;

  /* Number of entries in CS at the present moment */
  u64 cs_entries_ntw_count;
};

define hicn_api_face_ip_add
{
  /* Client identifier, set from api_main.my_client_index */
  u32 client_index;

  /* Arbitrary context, so client can match reply to request */
  u32 context;

  /* IP local address */
  u64 nh_addr[2];

  /* IPv4 local port number */
  u32 swif;
};

define hicn_api_face_ip_add_reply
{
  /* From the request */
  u32 context;

  /* Return value: new Face ID, ~0 means no Face was created */
  u32 faceid;

  /* Return value, zero means all OK */
  i32 retval;
};

define hicn_api_face_ip_del
{
  /* Client identifier, set from api_main.my_client_index */
  u32 client_index;

  /* Arbitrary context, so client can match reply to request */
  u32 context;

  /* A Face ID to be deleted */
  u16 faceid;
};

define hicn_api_face_ip_del_reply
{
  /* From the request */
  u32 context;

  /* Return value, zero means all OK */
  i32 retval;
};

define hicn_api_face_ip_params_get
{
  /* Client identifier, set from api_main.my_client_index */
  u32 client_index;

  /* Arbitrary context, so client can match reply to request */
  u32 context;

  /* A Face to be retrieved */
  u16 faceid;
};

define hicn_api_face_ip_params_get_reply
{
  /* From the request */
  u32 context;

  /* Return value, zero means all OK */
  i32 retval;

  /* IP local address */
  u64 nh_addr[2];

  /* VPP interface (index) associated with the face */
  u32 swif;

  /* Face flags */
  u32 flags;
};

define hicn_api_route_nhops_add
{
  /* Client identifier, set from api_main.my_client_index */
  u32 client_index;

  /* Arbitrary context, so client can match reply to request */
  u32 context;

  /* Prefix to be added to the FIB */
  u64 prefix[2];

  /* Length of the prefix */
  u8 len;

  /* A Face ID to the next hop forwarder for the specified prefix */
  u32 face_ids[7];

  /* Number of face to add */
  u8 n_faces;
};

define hicn_api_route_nhops_add_reply
{
  /* From the request */
  u32 context;

  /* Return value, zero means all OK */
  i32 retval;
};

define hicn_api_route_del
{
  /* Client identifier, set from api_main.my_client_index */
  u32 client_index;

  /* Arbitrary context, so client can match reply to request */
  u32 context;

  /* Prefix to be added to the FIB */
  u64 prefix[2];

  /* Length of the prefix */
  u8 len;
};

define hicn_api_route_del_reply
{
  /* From the request */
  u32 context;

  /* Return value, zero means all OK */
  i32 retval;
};

define hicn_api_route_nhop_del
{
  /* Client identifier, set from api_main.my_client_index */
  u32 client_index;

  /* Arbitrary context, so client can match reply to request */
  u32 context;

  /* Prefix to be added to the FIB */
  u64 prefix[2];

  /* Length of the prefix */
  u8 len;

  /* Specific next-hop to be removed */
  u16 faceid;
};

define hicn_api_route_nhop_del_reply
{
  /* From the request */
  u32 context;

  /* Return value, zero means all OK */
  i32 retval;
};

define hicn_api_route_get
{
  /* Client identifier, set from api_main.my_client_index */
  u32 client_index;

  /* Arbitrary context, so client can match reply to request */
  u32 context;

  /* Route prefix */
  u64 prefix[2];

  /* Prefix len */
  u8 len;
};

define hicn_api_route_get_reply
{
  /* Client identifier, set from api_main.my_client_index */
  u32 client_index;

  /* Arbitrary context, so client can match reply to request */
  u32 context;

  /* List of faces pointing to the next hops */
  u16 faceids[1000];

  /* Strategy */
  u32 strategy_id;

  /* Return value, zero means all OK */
  i32 retval;
};

define hicn_api_strategies_get
{
  /* Client identifier, set from api_main.my_client_index */
  u32 client_index;

  /* Arbitrary context, so client can match reply to request */
  u32 context;
};

define hicn_api_strategies_get_reply
{
  /* Client identifier, set from api_main.my_client_index */
  u32 client_index;

  /* Arbitrary context, so client can match reply to request */
  u32 context;

  /* Number of available strategies */
  u8 n_strategies;

  /* Strategies */
  u32 strategy_id[256];

  /* Return value, zero means all OK */
  i32 retval;
};

define hicn_api_strategy_get
{
  /* Client identifier, set from api_main.my_client_index */
  u32 client_index;

  /* Arbitrary context, so client can match reply to request */
  u32 context;

  /* Route prefix */
  u32 strategy_id;
};

define hicn_api_strategy_get_reply
{
  /* Client identifier, set from api_main.my_client_index */
  u32 client_index;

  /* Arbitrary context, so client can match reply to request */
  u32 context;

  /* Strategy description */
  u8 description[200];

  /* Return value, zero means all OK */
  i32 retval;
};

define hicn_api_punting_add
{
  /* Client identifier, set from api_main.my_client_index */
  u32 client_index;

  /* Arbitrary context, so client can match reply to request */
  u32 context;

  /* Prefix to match */
  u64 prefix[2];

  /* Subnet */
  u8 len;

  /* Interface id */
  u32 swif;
};

define hicn_api_punting_add_reply
{
  /* From the request */
  u32 context;

  /* Return value, zero means all OK */
  i32 retval;
};

define hicn_api_punting_del
{
  /* Client identifier, set from api_main.my_client_index */
  u32 client_index;

  /* Arbitrary context, so client can match reply to request */
  u32 context;

  /* Prefix to match */
  u64 prefix[2];

  /* Subnet */
  u8 len;

  /* Interface id */
  u32 swif;
};

define hicn_api_punting_del_reply
{
  /* From the request */
  u32 context;

  /* Return value, zero means all OK */
  i32 retval;
};

define hicn_api_register_prod_app
{
  /* Client identifier, set from api_main.my_client_index */
  u32 client_index;

  /* Arbitrary context, so client can match reply to request */
  u64 context;

  /* Prefix to match */
  u64 prefix[2];

  /* Subnet */
  u8 len;

  /* sw_if id */
  u32 swif;

  /* CS memory reserved -- in number of packets */
  u32 cs_reserved;
};

define hicn_api_register_prod_app_reply
{
  /* From the request */
  u64 context;

  /* Return value, zero means all OK */
  i32 retval;

  /* Actual CS memory reserved -- in number of packets */
  u32 cs_reserved;

  /* Prod address (ipv4 or ipv6) */
  u64 prod_addr[2];

  /* Return value: new Face ID, ~0 means no Face was created */
  u32 faceid;
};

define hicn_api_register_cons_app
{
  /* Client identifier, set from api_main.my_client_index */
  u32 client_index;

  /* Arbitrary context, so client can match reply to request */
  u64 context;

  /* swif */
  u32 swif;
};

define hicn_api_register_cons_app_reply
{
  /* From the request */
  u64 context;

  /* Return value, zero means all OK */
  i32 retval;

  /* Ip4 address */
  u32 src_addr4;

  /* Ip6 address */
  u64 src_addr6[2];

  /* Return value: new Face ID, ~0 means no Face was created */
  u32 faceid;
};

/*
 * fd.io coding-style-patch-verification: ON
 *
 * Local Variables:
 * eval: (c-set-style "gnu")
 * End:
 */