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