blob: 7bcaa4c322f2a6f2d42ccbae62d0b0bd8a4dbd60 [file] [log] [blame]
Pavel Kotucek20d12322016-12-21 09:13:17 +01001/*
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
Klement Sekera239790f2017-02-16 10:53:53 +010016/** \brief Set BFD echo source
Pavel Kotucek20d12322016-12-21 09:13:17 +010017 @param client_index - opaque cookie to identify the sender
18 @param context - sender context, to match reply w/ request
Klement Sekera239790f2017-02-16 10:53:53 +010019 @param sw_if_index - interface to use as echo source
Pavel Kotucek20d12322016-12-21 09:13:17 +010020*/
Dave Barach11b8dbf2017-04-24 10:46:54 -040021autoreply define bfd_udp_set_echo_source
Klement Sekerab17dd962017-01-09 07:43:48 +010022{
Pavel Kotucek20d12322016-12-21 09:13:17 +010023 u32 client_index;
24 u32 context;
Klement Sekera239790f2017-02-16 10:53:53 +010025 u32 sw_if_index;
Pavel Kotucek20d12322016-12-21 09:13:17 +010026};
27
Klement Sekera239790f2017-02-16 10:53:53 +010028/** \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*/
Dave Barach11b8dbf2017-04-24 10:46:54 -040032autoreply define bfd_udp_del_echo_source
Klement Sekera239790f2017-02-16 10:53:53 +010033{
34 u32 client_index;
35 u32 context;
36};
37
Pavel Kotucek20d12322016-12-21 09:13:17 +010038/** \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)
Pavel Kotucek20d12322016-12-21 09:13:17 +010044 @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
Klement Sekerab17dd962017-01-09 07:43:48 +010047 @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)
Pavel Kotucek20d12322016-12-21 09:13:17 +010051*/
Dave Barach11b8dbf2017-04-24 10:46:54 -040052autoreply define bfd_udp_add
Klement Sekerab17dd962017-01-09 07:43:48 +010053{
Pavel Kotucek20d12322016-12-21 09:13:17 +010054 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;
Klement Sekerab17dd962017-01-09 07:43:48 +010063 u8 is_authenticated;
64 u8 bfd_key_id;
65 u32 conf_key_id;
Pavel Kotucek20d12322016-12-21 09:13:17 +010066};
67
Klement Sekeraa57a9702017-02-02 06:58:07 +010068/** \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*/
Dave Barach11b8dbf2017-04-24 10:46:54 -040079autoreply define bfd_udp_mod
Klement Sekeraa57a9702017-02-02 06:58:07 +010080{
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
Pavel Kotucek20d12322016-12-21 09:13:17 +010092/** \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*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400100autoreply define bfd_udp_del
Klement Sekerab17dd962017-01-09 07:43:48 +0100101{
Pavel Kotucek20d12322016-12-21 09:13:17 +0100102 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
Pavel Kotucek20d12322016-12-21 09:13:17 +0100110/** \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*/
Klement Sekerab17dd962017-01-09 07:43:48 +0100114define bfd_udp_session_dump
115{
Pavel Kotucek20d12322016-12-21 09:13:17 +0100116 u32 client_index;
117 u32 context;
118};
119
120/** \brief BFD session details structure
121 @param context - sender context, to match reply w/ request
Pavel Kotucek20d12322016-12-21 09:13:17 +0100122 @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
Klement Sekerab17dd962017-01-09 07:43:48 +0100127 @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
Klement Sekeraa57a9702017-02-02 06:58:07 +0100130 @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)
Pavel Kotucek20d12322016-12-21 09:13:17 +0100133*/
Klement Sekerab17dd962017-01-09 07:43:48 +0100134define bfd_udp_session_details
135{
Pavel Kotucek20d12322016-12-21 09:13:17 +0100136 u32 context;
Pavel Kotucek20d12322016-12-21 09:13:17 +0100137 u32 sw_if_index;
138 u8 local_addr[16];
139 u8 peer_addr[16];
140 u8 is_ipv6;
141 u8 state;
Klement Sekerab17dd962017-01-09 07:43:48 +0100142 u8 is_authenticated;
143 u8 bfd_key_id;
144 u32 conf_key_id;
Klement Sekeraa57a9702017-02-02 06:58:07 +0100145 u32 required_min_rx;
146 u32 desired_min_tx;
147 u8 detect_mult;
Pavel Kotucek20d12322016-12-21 09:13:17 +0100148};
149
Klement Sekerab17dd962017-01-09 07:43:48 +0100150/** \brief Set flags of BFD UDP session
Pavel Kotucek20d12322016-12-21 09:13:17 +0100151 @param client_index - opaque cookie to identify the sender
152 @param context - sender context, to match reply w/ request
Klement Sekerab17dd962017-01-09 07:43:48 +0100153 @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
Pavel Kotucek20d12322016-12-21 09:13:17 +0100157 @param admin_up_down - set the admin state, 1 = up, 0 = down
158*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400159autoreply define bfd_udp_session_set_flags
Klement Sekerab17dd962017-01-09 07:43:48 +0100160{
Pavel Kotucek20d12322016-12-21 09:13:17 +0100161 u32 client_index;
162 u32 context;
Klement Sekerab17dd962017-01-09 07:43:48 +0100163 u32 sw_if_index;
164 u8 local_addr[16];
165 u8 peer_addr[16];
166 u8 is_ipv6;
Pavel Kotucek20d12322016-12-21 09:13:17 +0100167 u8 admin_up_down;
168};
169
Pavel Kotucek20d12322016-12-21 09:13:17 +0100170/** \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*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400176autoreply define want_bfd_events
Pavel Kotucek20d12322016-12-21 09:13:17 +0100177{
178 u32 client_index;
179 u32 context;
180 u32 enable_disable;
181 u32 pid;
182};
183
Klement Sekerab17dd962017-01-09 07:43:48 +0100184/** \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*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400192autoreply define bfd_auth_set_key
Klement Sekerab17dd962017-01-09 07:43:48 +0100193{
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
Klement Sekerab17dd962017-01-09 07:43:48 +0100202/** \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*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400209autoreply define bfd_auth_del_key
Klement Sekerab17dd962017-01-09 07:43:48 +0100210{
211 u32 client_index;
212 u32 context;
213 u32 conf_key_id;
214};
215
Klement Sekerab17dd962017-01-09 07:43:48 +0100216/** \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*/
220define 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*/
232define 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*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400251autoreply define bfd_udp_auth_activate
Klement Sekerab17dd962017-01-09 07:43:48 +0100252{
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
Klement Sekerab17dd962017-01-09 07:43:48 +0100264/** \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*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400273autoreply define bfd_udp_auth_deactivate
Klement Sekerab17dd962017-01-09 07:43:48 +0100274{
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
Pavel Kotucek20d12322016-12-21 09:13:17 +0100284/*
285 * Local Variables:
286 * eval: (c-set-style "gnu")
287 * End:
288 */