"autoreply" flag: autogenerate standard xxx_reply_t messages
[vpp.git] / src / plugins / ioam / lib-pot / pot.api
1 /* Hey Emacs use -*- mode: C -*- */
2 /*
3  * Copyright (c) 2016 Cisco and/or its affiliates.
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at:
7  *
8  *     http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17
18 /** \brief Proof of Transit(POT): Set POT profile
19     @param id - id of the profile 
20     @param validator - True/False to indicate if this is verifier
21     @param secret_key - Verification key
22     @param secret_share - Share of the 1st polynomial
23     @param prime - Prime number used for modulo operation
24     @param max_bits - Max bits to be used for Random number generation
25     @param lpc - Lagrange basis polynomial
26     @param polynomial_public - pre-evaluated public polynomial 
27     @param list_name_len - length of the name of this profile list
28     @param list_name - name of this profile list
29 */
30 autoreply define pot_profile_add {
31   u32 client_index;
32   u32 context;
33   u8 id;
34   u8 validator;
35   u64 secret_key;
36   u64 secret_share;
37   u64 prime;
38   u8  max_bits;
39   u64 lpc;
40   u64 polynomial_public;
41   u8 list_name_len;
42   u8 list_name[0];
43 };
44
45 /** \brief Proof of Transit(POT): Activate POT profile in the list
46     @param id - id of the profile 
47     @param list_name_len - length of the name of this profile list
48     @param list_name - name of this profile list
49 */
50 autoreply define pot_profile_activate {
51   u32 client_index;
52   u32 context;
53   u8 id;
54   u8 list_name_len;
55   u8 list_name[0];
56 };
57
58 /** \brief Delete POT Profile 
59     @param client_index - opaque cookie to identify the sender
60     @param context - sender context, to match reply w/ request
61     @param list_name_len - length of the name of the profile list
62     @param list_name - name of profile list to delete
63 */
64 autoreply define pot_profile_del {
65   u32 client_index;
66   u32 context;
67   u8 list_name_len;
68   u8 list_name[0];
69 };
70
71 /** \brief Show POT Profiles
72     @param client_index - opaque cookie to identify the sender
73     @param context - sender context, to match reply w/ request
74     @param id - id of the profile
75 */
76 define pot_profile_show_config_dump {
77   u32 client_index;
78   u32 context;
79   u8 id;
80 };
81
82 /** \brief Show POT profile reply
83     @param id - id of the profile
84     @param validator - True/False to indicate if this is verifier
85     @param secret_key - Verification key
86     @param secret_share - Share of the 1st polynomial
87     @param prime - Prime number used for modulo operation
88     @param max_bits - Max bits to be used for Random number generation
89     @param lpc - Lagrange basis polynomial
90     @param polynomial_public - pre-evaluated public polynomial
91     @param list_name_len - length of the name of this profile list
92     @param list_name - name of this profile list
93 */
94 define pot_profile_show_config_details {
95   u32 context;
96   i32 retval;
97   u8 id;
98   u8 validator;
99   u64 secret_key;
100   u64 secret_share;
101   u64 prime;
102   u64 bit_mask;
103   u64 lpc;
104   u64 polynomial_public;
105 };