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 | |
Dave Barach | 0d056e5 | 2017-09-28 15:11:16 -0400 | [diff] [blame] | 16 | vl_api_version 1.0.0 |
| 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 | |
Pavel Kotucek | 20d1232 | 2016-12-21 09:13:17 +0100 | [diff] [blame] | 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) |
Pavel Kotucek | 20d1232 | 2016-12-21 09:13:17 +0100 | [diff] [blame] | 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 |
Klement Sekera | b17dd96 | 2017-01-09 07:43:48 +0100 | [diff] [blame] | 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) |
Pavel Kotucek | 20d1232 | 2016-12-21 09:13:17 +0100 | [diff] [blame] | 53 | */ |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 54 | autoreply define bfd_udp_add |
Klement Sekera | b17dd96 | 2017-01-09 07:43:48 +0100 | [diff] [blame] | 55 | { |
Pavel Kotucek | 20d1232 | 2016-12-21 09:13:17 +0100 | [diff] [blame] | 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; |
Klement Sekera | b17dd96 | 2017-01-09 07:43:48 +0100 | [diff] [blame] | 65 | u8 is_authenticated; |
| 66 | u8 bfd_key_id; |
| 67 | u32 conf_key_id; |
Pavel Kotucek | 20d1232 | 2016-12-21 09:13:17 +0100 | [diff] [blame] | 68 | }; |
| 69 | |
Klement Sekera | a57a970 | 2017-02-02 06:58:07 +0100 | [diff] [blame] | 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 | */ |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 81 | autoreply define bfd_udp_mod |
Klement Sekera | a57a970 | 2017-02-02 06:58:07 +0100 | [diff] [blame] | 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 | |
Pavel Kotucek | 20d1232 | 2016-12-21 09:13:17 +0100 | [diff] [blame] | 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 | */ |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 102 | autoreply define bfd_udp_del |
Klement Sekera | b17dd96 | 2017-01-09 07:43:48 +0100 | [diff] [blame] | 103 | { |
Pavel Kotucek | 20d1232 | 2016-12-21 09:13:17 +0100 | [diff] [blame] | 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 | |
Pavel Kotucek | 20d1232 | 2016-12-21 09:13:17 +0100 | [diff] [blame] | 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 | */ |
Klement Sekera | b17dd96 | 2017-01-09 07:43:48 +0100 | [diff] [blame] | 116 | define bfd_udp_session_dump |
| 117 | { |
Pavel Kotucek | 20d1232 | 2016-12-21 09:13:17 +0100 | [diff] [blame] | 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 |
Pavel Kotucek | 20d1232 | 2016-12-21 09:13:17 +0100 | [diff] [blame] | 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 |
Klement Sekera | b17dd96 | 2017-01-09 07:43:48 +0100 | [diff] [blame] | 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 |
Klement Sekera | a57a970 | 2017-02-02 06:58:07 +0100 | [diff] [blame] | 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) |
Pavel Kotucek | 20d1232 | 2016-12-21 09:13:17 +0100 | [diff] [blame] | 135 | */ |
Klement Sekera | b17dd96 | 2017-01-09 07:43:48 +0100 | [diff] [blame] | 136 | define bfd_udp_session_details |
| 137 | { |
Pavel Kotucek | 20d1232 | 2016-12-21 09:13:17 +0100 | [diff] [blame] | 138 | u32 context; |
Pavel Kotucek | 20d1232 | 2016-12-21 09:13:17 +0100 | [diff] [blame] | 139 | u32 sw_if_index; |
| 140 | u8 local_addr[16]; |
| 141 | u8 peer_addr[16]; |
| 142 | u8 is_ipv6; |
| 143 | u8 state; |
Klement Sekera | b17dd96 | 2017-01-09 07:43:48 +0100 | [diff] [blame] | 144 | u8 is_authenticated; |
| 145 | u8 bfd_key_id; |
| 146 | u32 conf_key_id; |
Klement Sekera | a57a970 | 2017-02-02 06:58:07 +0100 | [diff] [blame] | 147 | u32 required_min_rx; |
| 148 | u32 desired_min_tx; |
| 149 | u8 detect_mult; |
Pavel Kotucek | 20d1232 | 2016-12-21 09:13:17 +0100 | [diff] [blame] | 150 | }; |
| 151 | |
Klement Sekera | b17dd96 | 2017-01-09 07:43:48 +0100 | [diff] [blame] | 152 | /** \brief Set flags of BFD UDP session |
Pavel Kotucek | 20d1232 | 2016-12-21 09:13:17 +0100 | [diff] [blame] | 153 | @param client_index - opaque cookie to identify the sender |
| 154 | @param context - sender context, to match reply w/ request |
Klement Sekera | b17dd96 | 2017-01-09 07:43:48 +0100 | [diff] [blame] | 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 |
Pavel Kotucek | 20d1232 | 2016-12-21 09:13:17 +0100 | [diff] [blame] | 159 | @param admin_up_down - set the admin state, 1 = up, 0 = down |
| 160 | */ |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 161 | autoreply define bfd_udp_session_set_flags |
Klement Sekera | b17dd96 | 2017-01-09 07:43:48 +0100 | [diff] [blame] | 162 | { |
Pavel Kotucek | 20d1232 | 2016-12-21 09:13:17 +0100 | [diff] [blame] | 163 | u32 client_index; |
| 164 | u32 context; |
Klement Sekera | b17dd96 | 2017-01-09 07:43:48 +0100 | [diff] [blame] | 165 | u32 sw_if_index; |
| 166 | u8 local_addr[16]; |
| 167 | u8 peer_addr[16]; |
| 168 | u8 is_ipv6; |
Pavel Kotucek | 20d1232 | 2016-12-21 09:13:17 +0100 | [diff] [blame] | 169 | u8 admin_up_down; |
| 170 | }; |
| 171 | |
Pavel Kotucek | 20d1232 | 2016-12-21 09:13:17 +0100 | [diff] [blame] | 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 | */ |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 178 | autoreply define want_bfd_events |
Pavel Kotucek | 20d1232 | 2016-12-21 09:13:17 +0100 | [diff] [blame] | 179 | { |
| 180 | u32 client_index; |
| 181 | u32 context; |
| 182 | u32 enable_disable; |
| 183 | u32 pid; |
| 184 | }; |
| 185 | |
Klement Sekera | b17dd96 | 2017-01-09 07:43:48 +0100 | [diff] [blame] | 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 | */ |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 194 | autoreply define bfd_auth_set_key |
Klement Sekera | b17dd96 | 2017-01-09 07:43:48 +0100 | [diff] [blame] | 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 | |
Klement Sekera | b17dd96 | 2017-01-09 07:43:48 +0100 | [diff] [blame] | 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 | */ |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 211 | autoreply define bfd_auth_del_key |
Klement Sekera | b17dd96 | 2017-01-09 07:43:48 +0100 | [diff] [blame] | 212 | { |
| 213 | u32 client_index; |
| 214 | u32 context; |
| 215 | u32 conf_key_id; |
| 216 | }; |
| 217 | |
Klement Sekera | b17dd96 | 2017-01-09 07:43:48 +0100 | [diff] [blame] | 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 | */ |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 253 | autoreply define bfd_udp_auth_activate |
Klement Sekera | b17dd96 | 2017-01-09 07:43:48 +0100 | [diff] [blame] | 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 | |
Klement Sekera | b17dd96 | 2017-01-09 07:43:48 +0100 | [diff] [blame] | 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 | */ |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 275 | autoreply define bfd_udp_auth_deactivate |
Klement Sekera | b17dd96 | 2017-01-09 07:43:48 +0100 | [diff] [blame] | 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 | |
Pavel Kotucek | 20d1232 | 2016-12-21 09:13:17 +0100 | [diff] [blame] | 286 | /* |
| 287 | * Local Variables: |
| 288 | * eval: (c-set-style "gnu") |
| 289 | * End: |
| 290 | */ |