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 | |
Klement Sekera | 239790f | 2017-02-16 10:53:53 +0100 | [diff] [blame] | 16 | /** \brief Set BFD echo source |
Pavel Kotucek | 20d1232 | 2016-12-21 09:13:17 +0100 | [diff] [blame] | 17 | @param client_index - opaque cookie to identify the sender |
| 18 | @param context - sender context, to match reply w/ request |
Klement Sekera | 239790f | 2017-02-16 10:53:53 +0100 | [diff] [blame] | 19 | @param sw_if_index - interface to use as echo source |
Pavel Kotucek | 20d1232 | 2016-12-21 09:13:17 +0100 | [diff] [blame] | 20 | */ |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 21 | autoreply define bfd_udp_set_echo_source |
Klement Sekera | b17dd96 | 2017-01-09 07:43:48 +0100 | [diff] [blame] | 22 | { |
Pavel Kotucek | 20d1232 | 2016-12-21 09:13:17 +0100 | [diff] [blame] | 23 | u32 client_index; |
| 24 | u32 context; |
Klement Sekera | 239790f | 2017-02-16 10:53:53 +0100 | [diff] [blame] | 25 | u32 sw_if_index; |
Pavel Kotucek | 20d1232 | 2016-12-21 09:13:17 +0100 | [diff] [blame] | 26 | }; |
| 27 | |
Klement Sekera | 239790f | 2017-02-16 10:53:53 +0100 | [diff] [blame] | 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 | */ |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 32 | autoreply define bfd_udp_del_echo_source |
Klement Sekera | 239790f | 2017-02-16 10:53:53 +0100 | [diff] [blame] | 33 | { |
| 34 | u32 client_index; |
| 35 | u32 context; |
| 36 | }; |
| 37 | |
Pavel Kotucek | 20d1232 | 2016-12-21 09:13:17 +0100 | [diff] [blame] | 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) |
Pavel Kotucek | 20d1232 | 2016-12-21 09:13:17 +0100 | [diff] [blame] | 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 |
Klement Sekera | b17dd96 | 2017-01-09 07:43:48 +0100 | [diff] [blame] | 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) |
Pavel Kotucek | 20d1232 | 2016-12-21 09:13:17 +0100 | [diff] [blame] | 51 | */ |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 52 | autoreply define bfd_udp_add |
Klement Sekera | b17dd96 | 2017-01-09 07:43:48 +0100 | [diff] [blame] | 53 | { |
Pavel Kotucek | 20d1232 | 2016-12-21 09:13:17 +0100 | [diff] [blame] | 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; |
Klement Sekera | b17dd96 | 2017-01-09 07:43:48 +0100 | [diff] [blame] | 63 | u8 is_authenticated; |
| 64 | u8 bfd_key_id; |
| 65 | u32 conf_key_id; |
Pavel Kotucek | 20d1232 | 2016-12-21 09:13:17 +0100 | [diff] [blame] | 66 | }; |
| 67 | |
Klement Sekera | a57a970 | 2017-02-02 06:58:07 +0100 | [diff] [blame] | 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 | */ |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 79 | autoreply define bfd_udp_mod |
Klement Sekera | a57a970 | 2017-02-02 06:58:07 +0100 | [diff] [blame] | 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 | |
Pavel Kotucek | 20d1232 | 2016-12-21 09:13:17 +0100 | [diff] [blame] | 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 | */ |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 100 | autoreply define bfd_udp_del |
Klement Sekera | b17dd96 | 2017-01-09 07:43:48 +0100 | [diff] [blame] | 101 | { |
Pavel Kotucek | 20d1232 | 2016-12-21 09:13:17 +0100 | [diff] [blame] | 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 | |
Pavel Kotucek | 20d1232 | 2016-12-21 09:13:17 +0100 | [diff] [blame] | 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 | */ |
Klement Sekera | b17dd96 | 2017-01-09 07:43:48 +0100 | [diff] [blame] | 114 | define bfd_udp_session_dump |
| 115 | { |
Pavel Kotucek | 20d1232 | 2016-12-21 09:13:17 +0100 | [diff] [blame] | 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 |
Pavel Kotucek | 20d1232 | 2016-12-21 09:13:17 +0100 | [diff] [blame] | 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 |
Klement Sekera | b17dd96 | 2017-01-09 07:43:48 +0100 | [diff] [blame] | 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 |
Klement Sekera | a57a970 | 2017-02-02 06:58:07 +0100 | [diff] [blame] | 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) |
Pavel Kotucek | 20d1232 | 2016-12-21 09:13:17 +0100 | [diff] [blame] | 133 | */ |
Klement Sekera | b17dd96 | 2017-01-09 07:43:48 +0100 | [diff] [blame] | 134 | define bfd_udp_session_details |
| 135 | { |
Pavel Kotucek | 20d1232 | 2016-12-21 09:13:17 +0100 | [diff] [blame] | 136 | u32 context; |
Pavel Kotucek | 20d1232 | 2016-12-21 09:13:17 +0100 | [diff] [blame] | 137 | u32 sw_if_index; |
| 138 | u8 local_addr[16]; |
| 139 | u8 peer_addr[16]; |
| 140 | u8 is_ipv6; |
| 141 | u8 state; |
Klement Sekera | b17dd96 | 2017-01-09 07:43:48 +0100 | [diff] [blame] | 142 | u8 is_authenticated; |
| 143 | u8 bfd_key_id; |
| 144 | u32 conf_key_id; |
Klement Sekera | a57a970 | 2017-02-02 06:58:07 +0100 | [diff] [blame] | 145 | u32 required_min_rx; |
| 146 | u32 desired_min_tx; |
| 147 | u8 detect_mult; |
Pavel Kotucek | 20d1232 | 2016-12-21 09:13:17 +0100 | [diff] [blame] | 148 | }; |
| 149 | |
Klement Sekera | b17dd96 | 2017-01-09 07:43:48 +0100 | [diff] [blame] | 150 | /** \brief Set flags of BFD UDP session |
Pavel Kotucek | 20d1232 | 2016-12-21 09:13:17 +0100 | [diff] [blame] | 151 | @param client_index - opaque cookie to identify the sender |
| 152 | @param context - sender context, to match reply w/ request |
Klement Sekera | b17dd96 | 2017-01-09 07:43:48 +0100 | [diff] [blame] | 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 |
Pavel Kotucek | 20d1232 | 2016-12-21 09:13:17 +0100 | [diff] [blame] | 157 | @param admin_up_down - set the admin state, 1 = up, 0 = down |
| 158 | */ |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 159 | autoreply define bfd_udp_session_set_flags |
Klement Sekera | b17dd96 | 2017-01-09 07:43:48 +0100 | [diff] [blame] | 160 | { |
Pavel Kotucek | 20d1232 | 2016-12-21 09:13:17 +0100 | [diff] [blame] | 161 | u32 client_index; |
| 162 | u32 context; |
Klement Sekera | b17dd96 | 2017-01-09 07:43:48 +0100 | [diff] [blame] | 163 | u32 sw_if_index; |
| 164 | u8 local_addr[16]; |
| 165 | u8 peer_addr[16]; |
| 166 | u8 is_ipv6; |
Pavel Kotucek | 20d1232 | 2016-12-21 09:13:17 +0100 | [diff] [blame] | 167 | u8 admin_up_down; |
| 168 | }; |
| 169 | |
Pavel Kotucek | 20d1232 | 2016-12-21 09:13:17 +0100 | [diff] [blame] | 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 | */ |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 176 | autoreply define want_bfd_events |
Pavel Kotucek | 20d1232 | 2016-12-21 09:13:17 +0100 | [diff] [blame] | 177 | { |
| 178 | u32 client_index; |
| 179 | u32 context; |
| 180 | u32 enable_disable; |
| 181 | u32 pid; |
| 182 | }; |
| 183 | |
Klement Sekera | b17dd96 | 2017-01-09 07:43:48 +0100 | [diff] [blame] | 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 | */ |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 192 | autoreply define bfd_auth_set_key |
Klement Sekera | b17dd96 | 2017-01-09 07:43:48 +0100 | [diff] [blame] | 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 | |
Klement Sekera | b17dd96 | 2017-01-09 07:43:48 +0100 | [diff] [blame] | 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 | */ |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 209 | autoreply define bfd_auth_del_key |
Klement Sekera | b17dd96 | 2017-01-09 07:43:48 +0100 | [diff] [blame] | 210 | { |
| 211 | u32 client_index; |
| 212 | u32 context; |
| 213 | u32 conf_key_id; |
| 214 | }; |
| 215 | |
Klement Sekera | b17dd96 | 2017-01-09 07:43:48 +0100 | [diff] [blame] | 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 | */ |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 251 | autoreply define bfd_udp_auth_activate |
Klement Sekera | b17dd96 | 2017-01-09 07:43:48 +0100 | [diff] [blame] | 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 | |
Klement Sekera | b17dd96 | 2017-01-09 07:43:48 +0100 | [diff] [blame] | 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 | */ |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 273 | autoreply define bfd_udp_auth_deactivate |
Klement Sekera | b17dd96 | 2017-01-09 07:43:48 +0100 | [diff] [blame] | 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 | |
Pavel Kotucek | 20d1232 | 2016-12-21 09:13:17 +0100 | [diff] [blame] | 284 | /* |
| 285 | * Local Variables: |
| 286 | * eval: (c-set-style "gnu") |
| 287 | * End: |
| 288 | */ |