"autoreply" flag: autogenerate standard xxx_reply_t messages
[vpp.git] / src / vnet / lisp-cp / one.api
1 /*
2  * Copyright (c) 2015-2017 Cisco and/or its affiliates.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at:
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15
16 typeonly manual_print manual_endian define one_local_locator
17 {
18   u32 sw_if_index;
19   u8 priority;
20   u8 weight;
21 };
22
23 /** \brief add or delete locator_set
24     @param client_index - opaque cookie to identify the sender
25     @param context - sender context, to match reply w/ request
26     @param is_add - add address if non-zero, else delete
27     @param locator_set_name - locator name
28     @param locator_num - number of locators
29     @param locators - locator records
30 */
31 manual_endian manual_print define one_add_del_locator_set
32 {
33   u32 client_index;
34   u32 context;
35   u8 is_add;
36   u8 locator_set_name[64];
37   u32 locator_num;
38   vl_api_one_local_locator_t locators[locator_num];
39 };
40
41 /** \brief Reply for locator_set add/del
42     @param context - returned sender context, to match reply w/ request
43     @param retval - return code
44     @param ls_index - locator set index
45 */
46 define one_add_del_locator_set_reply
47 {
48   u32 context;
49   i32 retval;
50   u32 ls_index;
51 };
52
53 /** \brief add or delete locator for locator set
54     @param client_index - opaque cookie to identify the sender
55     @param context - sender context, to match reply w/ request
56     @param is_add - add address if non-zero, else delete
57     @param locator_set_name - name of locator_set to add/del locator
58     @param sw_if_index - index of the interface
59     @param priority - priority of the locator
60     @param weight - weight of the locator
61 */
62 autoreply define one_add_del_locator
63 {
64   u32 client_index;
65   u32 context;
66   u8 is_add;
67   u8 locator_set_name[64];
68   u32 sw_if_index;
69   u8 priority;
70   u8 weight;
71 };
72
73 /** \brief add or delete ONE eid-table
74     @param client_index - opaque cookie to identify the sender
75     @param context - sender context, to match reply w/ request
76     @param is_add - add address if non-zero, else delete
77     @param eid_type:
78       0 : ipv4
79       1 : ipv6
80       2 : mac
81     @param eid - EID can be ip4, ip6 or mac
82     @param prefix_len - prefix len
83     @param locator_set_name - name of locator_set to add/del eid-table
84     @param vni - virtual network instance
85     @param key_id
86       HMAC_NO_KEY           0
87       HMAC_SHA_1_96         1
88       HMAC_SHA_256_128      2
89     @param key - secret key
90 */
91 autoreply define one_add_del_local_eid
92 {
93   u32 client_index;
94   u32 context;
95   u8 is_add;
96   u8 eid_type;
97   u8 eid[16];
98   u8 prefix_len;
99   u8 locator_set_name[64];
100   u32 vni;
101   u16 key_id;
102   u8 key[64];
103 };
104
105 /** \brief Add/delete map server
106     @param client_index - opaque cookie to identify the sender
107     @param context - sender context, to match reply w/ request
108     @param is_add - add address if non-zero; delete otherwise
109     @param is_ipv6 - if non-zero the address is ipv6, else ipv4
110     @param ip_address - map server IP address
111 */
112 autoreply define one_add_del_map_server
113 {
114   u32 client_index;
115   u32 context;
116   u8 is_add;
117   u8 is_ipv6;
118   u8 ip_address[16];
119 };
120
121 /** \brief add or delete map-resolver
122     @param client_index - opaque cookie to identify the sender
123     @param context - sender context, to match reply w/ request
124     @param is_add - add address if non-zero, else delete
125     @param is_ipv6 - if non-zero the address is ipv6, else ipv4
126     @param ip_address - array of address bytes
127 */
128 autoreply define one_add_del_map_resolver
129 {
130   u32 client_index;
131   u32 context;
132   u8 is_add;
133   u8 is_ipv6;
134   u8 ip_address[16];
135 };
136
137 /** \brief enable or disable ONE feature
138     @param client_index - opaque cookie to identify the sender
139     @param context - sender context, to match reply w/ request
140     @param is_en - enable protocol if non-zero, else disable
141 */
142 autoreply define one_enable_disable
143 {
144   u32 client_index;
145   u32 context;
146   u8 is_en;
147 };
148
149 /** \brief configure or disable ONE PITR node
150     @param client_index - opaque cookie to identify the sender
151     @param context - sender context, to match reply w/ request
152     @param ls_name - locator set name
153     @param is_add - add locator set if non-zero, else disable pitr
154 */
155 autoreply define one_pitr_set_locator_set
156 {
157   u32 client_index;
158   u32 context;
159   u8 is_add;
160   u8 ls_name[64];
161 };
162
163 /** \brief configure or disable use of PETR
164     @param client_index - opaque cookie to identify the sender
165     @param context - sender context, to match reply w/ request
166     @param is_ip4 - Address is IPv4 if set and IPv6 otherwise
167     @param address - PETR IP address
168     @param is_add - add locator set if non-zero, else disable PETR
169 */
170 autoreply define one_use_petr
171 {
172   u32 client_index;
173   u32 context;
174   u8 is_ip4;
175   u8 address[16];
176   u8 is_add;
177 };
178
179 /** \brief Request for ONE PETR status
180     @param client_index - opaque cookie to identify the sender
181     @param context - sender context, to match reply w/ request
182 */
183 define show_one_use_petr
184 {
185   u32 client_index;
186   u32 context;
187 };
188
189 /** \brief ONE PETR status, enable or disable
190     @param context - sender context, to match reply w/ request
191     @param status - ONE PETR enable if non-zero, else disable
192     @param is_ip4 - Address is IPv4 if non-zero, else IPv6
193     @param address - PETR IP address
194 */
195 define show_one_use_petr_reply
196 {
197   u32 context;
198   i32 retval;
199   u8 status;
200   u8 is_ip4;
201   u8 address[16];
202 };
203
204 /** \brief Get state of ONE RLOC probing
205     @param client_index - opaque cookie to identify the sender
206     @param context - sender context, to match reply w/ request
207 */
208 define show_one_rloc_probe_state
209 {
210   u32 client_index;
211   u32 context;
212 };
213
214 /** \brief Reply for show_one_rloc_probe_state
215     @param context - returned sender context, to match reply w/ request
216     @param retval - return code
217     @param is_enabled - state of RLOC probing
218 */
219 define show_one_rloc_probe_state_reply
220 {
221   u32 context;
222   i32 retval;
223   u8 is_enabled;
224 };
225
226 /** \brief enable/disable ONE RLOC probing
227     @param client_index - opaque cookie to identify the sender
228     @param context - sender context, to match reply w/ request
229     @param is_enable - enable if non-zero; disable otherwise
230 */
231 autoreply define one_rloc_probe_enable_disable
232 {
233   u32 client_index;
234   u32 context;
235   u8 is_enabled;
236 };
237
238 /** \brief enable/disable ONE map-register
239     @param client_index - opaque cookie to identify the sender
240     @param context - sender context, to match reply w/ request
241     @param is_enable - enable if non-zero; disable otherwise
242 */
243 autoreply define one_map_register_enable_disable
244 {
245   u32 client_index;
246   u32 context;
247   u8 is_enabled;
248 };
249
250 /** \brief Get state of ONE map-register
251     @param client_index - opaque cookie to identify the sender
252     @param context - sender context, to match reply w/ request
253 */
254 define show_one_map_register_state
255 {
256   u32 client_index;
257   u32 context;
258 };
259
260 /** \brief Reply for show_one_map_register_state
261     @param context - returned sender context, to match reply w/ request
262     @param retval - return code
263 */
264 define show_one_map_register_state_reply
265 {
266   u32 context;
267   i32 retval;
268   u8 is_enabled;
269 };
270
271 /** \brief set ONE map-request mode. Based on configuration VPP will send
272       src/dest or just normal destination map requests.
273     @param client_index - opaque cookie to identify the sender
274     @param context - sender context, to match reply w/ request
275     @param mode - new map-request mode. Supported values are:
276       0 - destination only
277       1 - source/destaination
278 */
279 autoreply define one_map_request_mode
280 {
281   u32 client_index;
282   u32 context;
283   u8 mode;
284 };
285
286 /** \brief Request for ONE map-request mode
287     @param client_index - opaque cookie to identify the sender
288     @param context - sender context, to match reply w/ request
289 */
290 define show_one_map_request_mode
291 {
292   u32 client_index;
293   u32 context;
294 };
295
296 /** \brief Reply for show_one_map_request_mode
297     @param context - returned sender context, to match reply w/ request
298     @param retval - return code
299     @param mode - map-request mode
300 */
301 define show_one_map_request_mode_reply
302 {
303   u32 context;
304   i32 retval;
305   u8 mode;
306 };
307
308 typeonly manual_endian manual_print define one_remote_locator
309 {
310   u8 is_ip4;
311   u8 priority;
312   u8 weight;
313   u8 addr[16];
314 };
315
316 /** \brief add or delete remote static mapping
317     @param client_index - opaque cookie to identify the sender
318     @param context - sender context, to match reply w/ request
319     @param is_add - add address if non-zero, else delete
320     @param is_src_dst - flag indicating src/dst based routing policy
321     @param del_all - if set, delete all remote mappings
322     @param vni - virtual network instance
323     @param action - negative map-reply action
324     @param eid_type -
325       0 : ipv4
326       1 : ipv6
327       2 : mac
328     @param deid - dst EID
329     @param seid - src EID, valid only if is_src_dst is enabled
330     @param rloc_num - number of remote locators
331     @param rlocs - remote locator records
332 */
333 autoreply manual_print manual_endian define one_add_del_remote_mapping
334 {
335   u32 client_index;
336   u32 context;
337   u8 is_add;
338   u8 is_src_dst;
339   u8 del_all;
340   u32 vni;
341   u8 action;
342   u8 eid_type;
343   u8 eid[16];
344   u8 eid_len;
345   u8 seid[16];
346   u8 seid_len;
347   u32 rloc_num;
348   vl_api_one_remote_locator_t rlocs[rloc_num];
349 };
350
351 /** \brief add or delete ONE adjacency adjacency
352     @param client_index - opaque cookie to identify the sender
353     @param context - sender context, to match reply w/ request
354     @param is_add - add address if non-zero, else delete
355     @param vni - virtual network instance
356     @param eid_type -
357       0 : ipv4
358       1 : ipv6
359       2 : mac
360     @param reid - remote EID
361     @param leid - local EID
362 */
363 autoreply define one_add_del_adjacency
364 {
365   u32 client_index;
366   u32 context;
367   u8 is_add;
368   u32 vni;
369   u8 eid_type;
370   u8 reid[16];
371   u8 leid[16];
372   u8 reid_len;
373   u8 leid_len;
374 };
375
376 /** \brief add or delete map request itr rlocs
377     @param client_index - opaque cookie to identify the sender
378     @param context - sender context, to match reply w/ request
379     @param is_add - add address if non-zero, else delete
380     @param locator_set_name - locator set name
381 */
382 autoreply define one_add_del_map_request_itr_rlocs
383 {
384   u32 client_index;
385   u32 context;
386   u8 is_add;
387   u8 locator_set_name[64];
388 };
389
390 /** \brief map/unmap vni/bd_index to vrf
391     @param client_index - opaque cookie to identify the sender
392     @param context - sender context, to match reply w/ request
393     @param is_add - add or delete mapping
394     @param dp_table - virtual network id/bridge domain index
395     @param vrf - vrf
396 */
397 autoreply define one_eid_table_add_del_map
398 {
399   u32 client_index;
400   u32 context;
401   u8 is_add;
402   u32 vni;
403   u32 dp_table;
404   u8 is_l2;
405 };
406
407 /** \brief Request for map one locator status
408     @param client_index - opaque cookie to identify the sender
409     @param context - sender context, to match reply w/ request
410     @param locator_set_index - index of locator_set
411     @param ls_name - locator set name
412     @param is_index_set - flag indicating whether ls_name or ls_index is set
413  */
414 define one_locator_dump
415 {
416   u32 client_index;
417   u32 context;
418   u32 ls_index;
419   u8 ls_name[64];
420   u8 is_index_set;
421 };
422
423 /** \brief ONE locator_set status
424     @param local - if is set, then locator is local
425     @param locator_set_name - name of the locator_set
426     @param sw_if_index - sw_if_index of the locator
427     @param priority - locator priority
428     @param weight - locator weight
429   */
430 define one_locator_details
431 {
432   u32 context;
433   u8 local;
434   u32 sw_if_index;
435   u8 is_ipv6;
436   u8 ip_address[16];
437   u8 priority;
438   u8 weight;
439 };
440
441 /** \brief ONE locator_set status
442     @param context - sender context, to match reply w/ request
443     @param ls_index - locator set index
444     @param ls_name - name of the locator set
445  */
446 define one_locator_set_details
447 {
448   u32 context;
449   u32 ls_index;
450   u8 ls_name[64];
451 };
452
453 /** \brief Request for locator_set summary status
454     @param client_index - opaque cookie to identify the sender
455     @param context - sender context, to match reply w/ request
456     @param filter - filter type
457       Supported values:
458         0: all locator sets
459         1: local locator sets
460         2: remote locator sets
461  */
462 define one_locator_set_dump
463 {
464   u32 client_index;
465   u32 context;
466   u8 filter;
467 };
468
469 /** \brief Dump ONE eid-table
470     @param client_index - opaque cookie to identify the sender
471     @param context - sender context, to match reply w/ request
472     @param locator_set_index - index of locator_set, if ~0 then the mapping
473                                 is negative
474     @param action - negative map request action
475     @param is_local - local if non-zero, else remote
476     @param eid_type:
477       0 : ipv4
478       1 : ipv6
479       2 : mac
480     @param is_src_dst - EID is type of source/destination
481     @param eid - EID can be ip4, ip6 or mac
482     @param eid_prefix_len - prefix length
483     @param seid - source EID can be ip4, ip6 or mac
484     @param seid_prefix_len - source prefix length
485     @param vni - virtual network instance
486     @param ttl - time to live
487     @param authoritative - authoritative
488     @param key_id
489       HMAC_NO_KEY           0
490       HMAC_SHA_1_96         1
491       HMAC_SHA_256_128      2
492     @param key - secret key
493 */
494
495 define one_eid_table_details
496 {
497   u32 context;
498   u32 locator_set_index;
499   u8 action;
500   u8 is_local;
501   u8 eid_type;
502   u8 is_src_dst;
503   u32 vni;
504   u8 eid[16];
505   u8 eid_prefix_len;
506   u8 seid[16];
507   u8 seid_prefix_len;
508   u32 ttl;
509   u8 authoritative;
510   u16 key_id;
511   u8 key[64];
512 };
513
514 /** \brief Request for eid table summary status
515     @param client_index - opaque cookie to identify the sender
516     @param context - sender context, to match reply w/ request
517     @param eid_set - if non-zero request info about specific mapping
518     @param vni - virtual network instance; valid only if eid_set != 0
519     @param prefix_length - prefix length if EID is IP address;
520       valid only if eid_set != 0
521     @param eid_type - EID type; valid only if eid_set != 0
522       Supported values:
523         0: EID is IPv4
524         1: EID is IPv6
525         2: EID is ethernet address
526     @param eid - endpoint identifier
527     @param filter - filter type;
528       Support values:
529         0: all eid
530         1: local eid
531         2: remote eid
532  */
533 define one_eid_table_dump
534 {
535   u32 client_index;
536   u32 context;
537   u8 eid_set;
538   u8 prefix_length;
539   u32 vni;
540   u8 eid_type;
541   u8 eid[16];
542   u8 filter;
543 };
544
545 /** \brief ONE adjacency
546     @param eid_type -
547       0 : ipv4
548       1 : ipv6
549       2 : mac
550     @param reid - remote EID
551     @param leid - local EID
552     @param reid_prefix_len - remote EID IP prefix length
553     @param leid_prefix_len - local EID IP prefix length
554   */
555 typeonly manual_print manual_endian define one_adjacency
556 {
557   u8 eid_type;
558   u8 reid[16];
559   u8 leid[16];
560   u8 reid_prefix_len;
561   u8 leid_prefix_len;
562 };
563
564 /** \brief ONE adjacency reply
565     @param count - number of adjacencies
566     @param adjacencies - array of adjacencies
567   */
568 manual_endian manual_print define one_adjacencies_get_reply
569 {
570   u32 context;
571   i32 retval;
572   u32 count;
573   vl_api_one_adjacency_t adjacencies[count];
574 };
575
576 /** \brief Request for ONE adjacencies
577     @param client_index - opaque cookie to identify the sender
578     @param context - sender context, to match reply w/ request
579     @param vni - filter adjacencies by VNI
580  */
581 define one_adjacencies_get
582 {
583   u32 client_index;
584   u32 context;
585   u32 vni;
586 };
587
588 /** \brief Shows relationship between vni and vrf/bd
589     @param dp_table - VRF index or bridge domain index
590     @param vni - vitual network instance
591   */
592 define one_eid_table_map_details
593 {
594   u32 context;
595   u32 vni;
596   u32 dp_table;
597 };
598
599 /** \brief Request for one_eid_table_map_details
600     @param client_index - opaque cookie to identify the sender
601     @param context - sender context, to match reply w/ request
602     @param is_l2 - if set dump vni/bd mappings else vni/vrf
603  */
604 define one_eid_table_map_dump
605 {
606   u32 client_index;
607   u32 context;
608   u8 is_l2;
609 };
610
611 /** \brief Dumps all VNIs used in mappings
612     @param client_index - opaque cookie to identify the sender
613     @param context - sender context, to match reply w/ request
614   */
615 define one_eid_table_vni_dump
616 {
617   u32 client_index;
618   u32 context;
619 };
620
621 /** \brief reply to one_eid_table_vni_dump
622     @param client_index - opaque cookie to identify the sender
623     @param context - sender context, to match reply w/ request
624     @param vni - virtual network instance
625  */
626 define one_eid_table_vni_details
627 {
628   u32 client_index;
629   u32 context;
630   u32 vni;
631 };
632
633 /** \brief ONE map resolver status
634     @param is_ipv6 - if non-zero the address is ipv6, else ipv4
635     @param ip_address - array of address bytes
636  */
637 define one_map_resolver_details
638 {
639   u32 context;
640   u8 is_ipv6;
641   u8 ip_address[16];
642 };
643
644 /** \brief Request for map resolver summary status
645     @param client_index - opaque cookie to identify the sender
646     @param context - sender context, to match reply w/ request
647  */
648 define one_map_resolver_dump
649 {
650   u32 client_index;
651   u32 context;
652 };
653
654 /** \brief ONE map server details
655     @param is_ipv6 - if non-zero the address is ipv6, else ipv4
656     @param ip_address - array of address bytes
657  */
658 define one_map_server_details
659 {
660   u32 context;
661   u8 is_ipv6;
662   u8 ip_address[16];
663 };
664
665 /** \brief Request for map server summary status
666     @param client_index - opaque cookie to identify the sender
667     @param context - sender context, to match reply w/ request
668  */
669 define one_map_server_dump
670 {
671   u32 client_index;
672   u32 context;
673 };
674
675 /** \brief Request for ONE status
676     @param client_index - opaque cookie to identify the sender
677     @param context - sender context, to match reply w/ request
678 */
679 define show_one_status
680 {
681   u32 client_index;
682   u32 context;
683 };
684
685 /** \brief ONE status
686     @param context - sender context, to match reply w/ request
687     @param feature_status - enabled if non-zero, else disabled
688     @param gpe_status - enabled if non-zero, else disabled
689 */
690 define show_one_status_reply
691 {
692   u32 context;
693   i32 retval;
694   u8 feature_status;
695   u8 gpe_status;
696 };
697
698 /** \brief Get ONE map request itr rlocs status
699     @param context - sender context, to match reply w/ request
700     @param locator_set_name - name of the locator_set
701  */
702 define one_get_map_request_itr_rlocs
703 {
704   u32 client_index;
705   u32 context;
706 };
707
708 /** \brief Request for map request itr rlocs summary status
709  */
710 define one_get_map_request_itr_rlocs_reply
711 {
712   u32 context;
713   i32 retval;
714   u8 locator_set_name[64];
715 };
716
717 /** \brief Request for ONE PITR status
718     @param client_index - opaque cookie to identify the sender
719     @param context - sender context, to match reply w/ request
720 */
721 define show_one_pitr
722 {
723   u32 client_index;
724   u32 context;
725 };
726
727 /** \brief Status of ONE PITR, enable or disable
728     @param context - sender context, to match reply w/ request
729     @param status - ONE PITR enable if non-zero, else disable
730     @param locator_set_name -  name of the locator_set
731 */
732 define show_one_pitr_reply
733 {
734   u32 context;
735   i32 retval;
736   u8 status;
737   u8 locator_set_name[64];
738 };
739
740 define one_stats_dump
741 {
742   u32 client_index;
743   u32 context;
744 };
745
746 define one_stats_details
747 {
748   u32 context;
749   u32 vni;
750   u8 eid_type;
751   u8 deid[16];
752   u8 seid[16];
753   u8 deid_pref_len;
754   u8 seid_pref_len;
755   u8 is_ip4;
756   u8 rloc[16];
757   u8 lloc[16];
758
759   u32 pkt_count;
760   u32 bytes;
761 };
762
763 autoreply define one_stats_flush
764 {
765   u32 client_index;
766   u32 context;
767 };
768
769 autoreply define one_stats_enable_disable
770 {
771   u32 client_index;
772   u32 context;
773   u8 is_en;
774 };
775
776 define show_one_stats_enable_disable
777 {
778   u32 client_index;
779   u32 context;
780 };
781
782 define show_one_stats_enable_disable_reply
783 {
784   u32 context;
785   i32 retval;
786   u8 is_en;
787 };
788
789 /*
790  * Local Variables:
791  * eval: (c-set-style "gnu")
792  * End:
793  */