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