"autoreply" flag: autogenerate standard xxx_reply_t messages
[vpp.git] / src / vnet / bfd / bfd.api
1 /*
2  * Copyright (c) 2015-2016 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 /** \brief Set BFD echo source
17     @param client_index - opaque cookie to identify the sender
18     @param context - sender context, to match reply w/ request
19     @param sw_if_index - interface to use as echo source
20 */
21 autoreply define bfd_udp_set_echo_source
22 {
23   u32 client_index;
24   u32 context;
25   u32 sw_if_index;
26 };
27
28 /** \brief Delete BFD echo source
29     @param client_index - opaque cookie to identify the sender
30     @param context - sender context, to match reply w/ request
31 */
32 autoreply define bfd_udp_del_echo_source
33 {
34   u32 client_index;
35   u32 context;
36 };
37
38 /** \brief Add UDP BFD session on interface
39     @param client_index - opaque cookie to identify the sender
40     @param context - sender context, to match reply w/ request
41     @param sw_if_index - sw index of the interface
42     @param desired_min_tx - desired min transmit interval (microseconds)
43     @param required_min_rx - required min receive interval (microseconds)
44     @param local_addr - local address
45     @param peer_addr - peer address
46     @param is_ipv6 - local_addr, peer_addr are IPv6 if non-zero, otherwise IPv4
47     @param detect_mult - detect multiplier (# of packets missed before connection goes down)
48     @param is_authenticated - non-zero if authentication is required
49     @param bfd_key_id - key id sent out in BFD packets (if is_authenticated)
50     @param conf_key_id - id of already configured key (if is_authenticated)
51 */
52 autoreply define bfd_udp_add
53 {
54   u32 client_index;
55   u32 context;
56   u32 sw_if_index;
57   u32 desired_min_tx;
58   u32 required_min_rx;
59   u8 local_addr[16];
60   u8 peer_addr[16];
61   u8 is_ipv6;
62   u8 detect_mult;
63   u8 is_authenticated;
64   u8 bfd_key_id;
65   u32 conf_key_id;
66 };
67
68 /** \brief Modify UDP BFD session on interface
69     @param client_index - opaque cookie to identify the sender
70     @param context - sender context, to match reply w/ request
71     @param sw_if_index - sw index of the interface
72     @param desired_min_tx - desired min transmit interval (microseconds)
73     @param required_min_rx - required min receive interval (microseconds)
74     @param local_addr - local address
75     @param peer_addr - peer address
76     @param is_ipv6 - local_addr, peer_addr are IPv6 if non-zero, otherwise IPv4
77     @param detect_mult - detect multiplier (# of packets missed before connection goes down)
78 */
79 autoreply define bfd_udp_mod
80 {
81   u32 client_index;
82   u32 context;
83   u32 sw_if_index;
84   u32 desired_min_tx;
85   u32 required_min_rx;
86   u8 local_addr[16];
87   u8 peer_addr[16];
88   u8 is_ipv6;
89   u8 detect_mult;
90 };
91
92 /** \brief Delete UDP BFD session on interface
93     @param client_index - opaque cookie to identify the sender
94     @param context - sender context, to match reply w/ request
95     @param sw_if_index - sw index of the interface
96     @param local_addr - local address
97     @param peer_addr - peer address
98     @param is_ipv6 - local_addr, peer_addr are IPv6 if non-zero, otherwise IPv4
99 */
100 autoreply define bfd_udp_del
101 {
102   u32 client_index;
103   u32 context;
104   u32 sw_if_index;
105   u8 local_addr[16];
106   u8 peer_addr[16];
107   u8 is_ipv6;
108 };
109
110 /** \brief Get all BFD sessions
111     @param client_index - opaque cookie to identify the sender
112     @param context - sender context, to match reply w/ request
113 */
114 define bfd_udp_session_dump
115 {
116   u32 client_index;
117   u32 context;
118 };
119
120 /** \brief BFD session details structure
121     @param context - sender context, to match reply w/ request
122     @param sw_if_index - sw index of the interface
123     @param local_addr - local address
124     @param peer_addr - peer address
125     @param is_ipv6 - local_addr, peer_addr are IPv6 if non-zero, otherwise IPv4
126     @param state - session state
127     @param is_authenticated - non-zero if authentication in-use, zero otherwise
128     @param bfd_key_id - ID of key currently in-use if auth is on
129     @param conf_key_id - configured key ID for this session
130     @param required_min_rx - required min receive interval (microseconds)
131     @param desired_min_tx - desired min transmit interval (microseconds)
132     @param detect_mult - detect multiplier (# of packets missed before connection goes down)
133 */
134 define bfd_udp_session_details
135 {
136   u32 context;
137   u32 sw_if_index;
138   u8 local_addr[16];
139   u8 peer_addr[16];
140   u8 is_ipv6;
141   u8 state;
142   u8 is_authenticated;
143   u8 bfd_key_id;
144   u32 conf_key_id;
145   u32 required_min_rx;
146   u32 desired_min_tx;
147   u8 detect_mult;
148 };
149
150 /** \brief Set flags of BFD UDP session
151     @param client_index - opaque cookie to identify the sender
152     @param context - sender context, to match reply w/ request
153     @param sw_if_index - sw index of the interface
154     @param local_addr - local address
155     @param peer_addr - peer address
156     @param is_ipv6 - local_addr, peer_addr are IPv6 if non-zero, otherwise IPv4
157     @param admin_up_down - set the admin state, 1 = up, 0 = down
158 */
159 autoreply define bfd_udp_session_set_flags
160 {
161   u32 client_index;
162   u32 context;
163   u32 sw_if_index;
164   u8 local_addr[16];
165   u8 peer_addr[16];
166   u8 is_ipv6;
167   u8 admin_up_down;
168 };
169
170 /** \brief Register for BFD events
171     @param client_index - opaque cookie to identify the sender
172     @param context - sender context, to match reply w/ request
173     @param enable_disable - 1 => register for events, 0 => cancel registration
174     @param pid - sender's pid
175 */
176 autoreply define want_bfd_events
177 {
178   u32 client_index;
179   u32 context;
180   u32 enable_disable;
181   u32 pid;
182 };
183
184 /** \brief BFD UDP - add/replace key to configuration
185     @param client_index - opaque cookie to identify the sender
186     @param context - sender context, to match reply w/ request
187     @param conf_key_id - key ID to add/replace/delete
188     @param key_len - length of key (must be non-zero)
189     @param auth_type - authentication type (RFC 5880/4.1/Auth Type)
190     @param key - key data
191 */
192 autoreply define bfd_auth_set_key
193 {
194   u32 client_index;
195   u32 context;
196   u32 conf_key_id;
197   u8 key_len;
198   u8 auth_type;
199   u8 key[20];
200 };
201
202 /** \brief BFD UDP - delete key from configuration
203     @param client_index - opaque cookie to identify the sender
204     @param context - sender context, to match reply w/ request
205     @param conf_key_id - key ID to add/replace/delete
206     @param key_len - length of key (must be non-zero)
207     @param key - key data
208 */
209 autoreply define bfd_auth_del_key
210 {
211   u32 client_index;
212   u32 context;
213   u32 conf_key_id;
214 };
215
216 /** \brief Get a list of configured authentication keys
217     @param client_index - opaque cookie to identify the sender
218     @param context - sender context, to match reply w/ request
219 */
220 define bfd_auth_keys_dump
221 {
222   u32 client_index;
223   u32 context;
224 };
225
226 /** \brief BFD authentication key details
227     @param context - sender context, to match reply w/ request
228     @param conf_key_id - configured key ID
229     @param use_count - how many BFD sessions currently use this key
230     @param auth_type - authentication type (RFC 5880/4.1/Auth Type)
231 */
232 define bfd_auth_keys_details
233 {
234   u32 context;
235   u32 conf_key_id;
236   u32 use_count;
237   u8 auth_type;
238 };
239
240 /** \brief BFD UDP - activate/change authentication
241     @param client_index - opaque cookie to identify the sender
242     @param context - sender context, to match reply w/ request
243     @param sw_if_index - sw index of the interface
244     @param local_addr - local address
245     @param peer_addr - peer address
246     @param is_ipv6 - local_addr, peer_addr are IPv6 if non-zero, otherwise IPv4
247     @param is_delayed - change is applied once peer applies the change (on first received packet with this auth)
248     @param bfd_key_id - key id sent out in BFD packets
249     @param conf_key_id - id of already configured key
250 */
251 autoreply define bfd_udp_auth_activate
252 {
253   u32 client_index;
254   u32 context;
255   u32 sw_if_index;
256   u8 local_addr[16];
257   u8 peer_addr[16];
258   u8 is_ipv6;
259   u8 is_delayed;
260   u8 bfd_key_id;
261   u32 conf_key_id;
262 };
263
264 /** \brief BFD UDP - deactivate authentication
265     @param client_index - opaque cookie to identify the sender
266     @param context - sender context, to match reply w/ request
267     @param sw_if_index - sw index of the interface
268     @param local_addr - local address
269     @param peer_addr - peer address
270     @param is_ipv6 - local_addr, peer_addr are IPv6 if non-zero, otherwise IPv4
271     @param is_delayed - change is applied once peer applies the change (on first received non-authenticated packet)
272 */
273 autoreply define bfd_udp_auth_deactivate
274 {
275   u32 client_index;
276   u32 context;
277   u32 sw_if_index;
278   u8 local_addr[16];
279   u8 peer_addr[16];
280   u8 is_ipv6;
281   u8 is_delayed;
282 };
283
284 /*
285  * Local Variables:
286  * eval: (c-set-style "gnu")
287  * End:
288  */