Dave Barach | 68b0fb0 | 2017-02-28 15:15:56 -0500 | [diff] [blame] | 1 | /* |
Vratko Polak | 6fdd7a5 | 2020-04-06 15:01:46 +0200 | [diff] [blame] | 2 | * Copyright (c) 2015-2020 Cisco and/or its affiliates. |
Dave Barach | 68b0fb0 | 2017-02-28 15:15:56 -0500 | [diff] [blame] | 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 | */ |
Dave Barach | 0d056e5 | 2017-09-28 15:11:16 -0400 | [diff] [blame] | 15 | |
Steven Luong | 6f17317 | 2024-09-27 08:35:45 -0700 | [diff] [blame^] | 16 | option version = "4.0.2"; |
Jakub Grajciar | b4e5e50 | 2020-01-31 09:35:29 +0100 | [diff] [blame] | 17 | |
| 18 | import "vnet/interface_types.api"; |
| 19 | import "vnet/ip/ip_types.api"; |
| 20 | |
| 21 | |
Steven Luong | c4b5d10 | 2024-07-30 13:44:01 -0700 | [diff] [blame] | 22 | typedef sdl_rule |
| 23 | { |
| 24 | vl_api_prefix_t lcl; |
| 25 | u32 action_index; |
| 26 | string tag[64]; |
| 27 | }; |
| 28 | |
Steven Luong | 6f17317 | 2024-09-27 08:35:45 -0700 | [diff] [blame^] | 29 | typedef sdl_rule_v2 |
| 30 | { |
| 31 | vl_api_prefix_t rmt; |
| 32 | u32 action_index; |
| 33 | string tag[64]; |
| 34 | }; |
| 35 | |
Jakub Grajciar | b4e5e50 | 2020-01-31 09:35:29 +0100 | [diff] [blame] | 36 | enum transport_proto : u8 |
| 37 | { |
| 38 | TRANSPORT_PROTO_API_TCP, |
| 39 | TRANSPORT_PROTO_API_UDP, |
Jakub Grajciar | b4e5e50 | 2020-01-31 09:35:29 +0100 | [diff] [blame] | 40 | TRANSPORT_PROTO_API_NONE, |
| 41 | TRANSPORT_PROTO_API_TLS, |
Jakub Grajciar | b4e5e50 | 2020-01-31 09:35:29 +0100 | [diff] [blame] | 42 | TRANSPORT_PROTO_API_QUIC, |
| 43 | }; |
Dave Barach | 0d056e5 | 2017-09-28 15:11:16 -0400 | [diff] [blame] | 44 | |
Steven Luong | c4b5d10 | 2024-07-30 13:44:01 -0700 | [diff] [blame] | 45 | enum rt_backend_engine : u8 |
| 46 | { |
| 47 | RT_BACKEND_ENGINE_API_DISABLE = 0, |
| 48 | RT_BACKEND_ENGINE_API_RULE_TABLE, |
| 49 | RT_BACKEND_ENGINE_API_NONE, |
| 50 | RT_BACKEND_ENGINE_API_SDL, |
| 51 | }; |
| 52 | |
Florin Coras | 458089b | 2019-08-21 16:20:44 -0700 | [diff] [blame] | 53 | /** \brief Application attach to session layer |
| 54 | @param client_index - opaque cookie to identify the sender |
| 55 | @param context - sender context, to match reply w/ request |
| 56 | @param options - segment size, fifo sizes, etc. |
Jakub Grajciar | b4e5e50 | 2020-01-31 09:35:29 +0100 | [diff] [blame] | 57 | @param namespace_id - string |
Florin Coras | 458089b | 2019-08-21 16:20:44 -0700 | [diff] [blame] | 58 | */ |
| 59 | define app_attach { |
| 60 | u32 client_index; |
| 61 | u32 context; |
Florin Coras | 9845c20 | 2020-04-28 01:54:22 +0000 | [diff] [blame] | 62 | u64 options[18]; |
Jakub Grajciar | b4e5e50 | 2020-01-31 09:35:29 +0100 | [diff] [blame] | 63 | string namespace_id[]; |
Florin Coras | 458089b | 2019-08-21 16:20:44 -0700 | [diff] [blame] | 64 | }; |
| 65 | |
Vratko Polak | 6fdd7a5 | 2020-04-06 15:01:46 +0200 | [diff] [blame] | 66 | /** \brief Application attach reply |
Florin Coras | 458089b | 2019-08-21 16:20:44 -0700 | [diff] [blame] | 67 | @param context - sender context, to match reply w/ request |
| 68 | @param retval - return code for the request |
| 69 | @param app_mq - app message queue |
| 70 | @param vpp_ctrl_mq - vpp message queue for control events that should |
| 71 | be handled in main thread, i.e., bind/connect |
| 72 | @param vpp_ctrl_mq_thread_index - thread index of the ctrl mq |
| 73 | @param app_index - index of the newly created app |
| 74 | @param n_fds - number of fds exchanged |
| 75 | @param fd_flags - set of flags that indicate which fds are to be expected |
| 76 | over the socket (set only if socket transport available) |
| 77 | @param segment_size - size of first shm segment |
Florin Coras | 458089b | 2019-08-21 16:20:44 -0700 | [diff] [blame] | 78 | @param segment_handle - handle for segment |
Jakub Grajciar | b4e5e50 | 2020-01-31 09:35:29 +0100 | [diff] [blame] | 79 | @param segment_name - name of segment client needs to attach to |
Florin Coras | 458089b | 2019-08-21 16:20:44 -0700 | [diff] [blame] | 80 | */ |
| 81 | define app_attach_reply { |
| 82 | u32 context; |
| 83 | i32 retval; |
| 84 | u64 app_mq; |
| 85 | u64 vpp_ctrl_mq; |
| 86 | u8 vpp_ctrl_mq_thread; |
| 87 | u32 app_index; |
| 88 | u8 n_fds; |
| 89 | u8 fd_flags; |
| 90 | u32 segment_size; |
Florin Coras | 458089b | 2019-08-21 16:20:44 -0700 | [diff] [blame] | 91 | u64 segment_handle; |
Jakub Grajciar | b4e5e50 | 2020-01-31 09:35:29 +0100 | [diff] [blame] | 92 | string segment_name[]; |
Florin Coras | 458089b | 2019-08-21 16:20:44 -0700 | [diff] [blame] | 93 | }; |
| 94 | |
Vratko Polak | 6fdd7a5 | 2020-04-06 15:01:46 +0200 | [diff] [blame] | 95 | /** \brief Application detach from session layer |
Florin Coras | 888d9f0 | 2020-04-02 23:00:13 +0000 | [diff] [blame] | 96 | @param client_index - opaque cookie to identify the sender |
| 97 | @param context - sender context, to match reply w/ request |
| 98 | */ |
| 99 | autoreply define application_detach { |
| 100 | u32 client_index; |
| 101 | u32 context; |
| 102 | }; |
| 103 | |
Nathan Skrzypczak | 79f8953 | 2019-09-13 11:08:13 +0200 | [diff] [blame] | 104 | /** \brief Add certificate and key |
| 105 | @param client_index - opaque cookie to identify the sender |
| 106 | @param context - sender context, to match reply w/ request |
| 107 | @param engine - crypto engine |
| 108 | @param cert_len - cert length (comes first) |
| 109 | @param certkey_len - cert and key length |
| 110 | @param certkey - cert & key data (due to API limitation) |
| 111 | */ |
| 112 | define app_add_cert_key_pair { |
| 113 | u32 client_index; |
| 114 | u32 context; |
| 115 | u16 cert_len; |
| 116 | u16 certkey_len; |
| 117 | u8 certkey[certkey_len]; |
| 118 | }; |
| 119 | |
| 120 | /** \brief Add certificate and key |
| 121 | @param context - sender context, to match reply w/ request |
| 122 | @param retval - return code for the request |
| 123 | @param index - index in certificate store |
| 124 | */ |
| 125 | define app_add_cert_key_pair_reply { |
| 126 | u32 context; |
| 127 | i32 retval; |
| 128 | u32 index; |
| 129 | }; |
| 130 | |
| 131 | /** \brief Delete certificate and key |
| 132 | @param client_index - opaque cookie to identify the sender |
| 133 | @param context - sender context, to match reply w/ request |
| 134 | @param index - index in certificate store |
| 135 | */ |
| 136 | autoreply define app_del_cert_key_pair { |
| 137 | u32 client_index; |
| 138 | u32 context; |
| 139 | u32 index; |
| 140 | }; |
| 141 | |
Florin Coras | 1553197 | 2018-08-12 23:50:53 -0700 | [diff] [blame] | 142 | /** \brief add/del application worker |
| 143 | @param client_index - opaque cookie to identify the sender |
| 144 | client to vpp direction only |
| 145 | @param context - sender context, to match reply w/ request |
Florin Coras | c1f5a43 | 2018-11-20 11:31:26 -0800 | [diff] [blame] | 146 | @param app_index - application index |
Florin Coras | 1553197 | 2018-08-12 23:50:53 -0700 | [diff] [blame] | 147 | @param wrk_index - worker index, if a delete |
| 148 | @param is_add - set if an add |
| 149 | */ |
| 150 | define app_worker_add_del |
| 151 | { |
| 152 | u32 client_index; |
| 153 | u32 context; |
Florin Coras | c1f5a43 | 2018-11-20 11:31:26 -0800 | [diff] [blame] | 154 | u32 app_index; |
Florin Coras | 1553197 | 2018-08-12 23:50:53 -0700 | [diff] [blame] | 155 | u32 wrk_index; |
Jakub Grajciar | b4e5e50 | 2020-01-31 09:35:29 +0100 | [diff] [blame] | 156 | bool is_add [default=true]; |
Florin Coras | 1553197 | 2018-08-12 23:50:53 -0700 | [diff] [blame] | 157 | }; |
| 158 | |
| 159 | /** \brief Reply for app worker add/del |
| 160 | @param context - returned sender context, to match reply w/ request |
| 161 | @param retval - return code |
| 162 | @param wrk_index - worker index, if add |
| 163 | @param app_event_queue_address - vpp event queue address of new worker |
| 164 | @param n_fds - number of fds exchanged |
| 165 | @param fd_flags - set of flags that indicate which fds are to be expected |
Florin Coras | 458089b | 2019-08-21 16:20:44 -0700 | [diff] [blame] | 166 | over the socket (set only if socket transport available) |
Florin Coras | fa76a76 | 2018-11-29 12:40:10 -0800 | [diff] [blame] | 167 | @param segment_handle - handle for segment |
Jakub Grajciar | b4e5e50 | 2020-01-31 09:35:29 +0100 | [diff] [blame] | 168 | @param is_add - add if non zero, else delete |
| 169 | @param segment_name - name of segment client needs to attach to |
Florin Coras | 1553197 | 2018-08-12 23:50:53 -0700 | [diff] [blame] | 170 | */ |
| 171 | define app_worker_add_del_reply |
| 172 | { |
| 173 | u32 context; |
| 174 | i32 retval; |
| 175 | u32 wrk_index; |
| 176 | u64 app_event_queue_address; |
| 177 | u8 n_fds; |
| 178 | u8 fd_flags; |
Florin Coras | fa76a76 | 2018-11-29 12:40:10 -0800 | [diff] [blame] | 179 | u64 segment_handle; |
Jakub Grajciar | b4e5e50 | 2020-01-31 09:35:29 +0100 | [diff] [blame] | 180 | bool is_add [default=true]; |
| 181 | string segment_name[]; |
Florin Coras | 1553197 | 2018-08-12 23:50:53 -0700 | [diff] [blame] | 182 | }; |
| 183 | |
Florin Coras | e04c299 | 2017-03-01 08:17:34 -0800 | [diff] [blame] | 184 | /** \brief enable/disable session layer |
| 185 | @param client_index - opaque cookie to identify the sender |
| 186 | client to vpp direction only |
| 187 | @param context - sender context, to match reply w/ request |
| 188 | @param is_enable - disable session layer if 0, enable otherwise |
| 189 | */ |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 190 | autoreply define session_enable_disable { |
Steven Luong | c4b5d10 | 2024-07-30 13:44:01 -0700 | [diff] [blame] | 191 | option deprecated; |
Florin Coras | e04c299 | 2017-03-01 08:17:34 -0800 | [diff] [blame] | 192 | u32 client_index; |
| 193 | u32 context; |
Jakub Grajciar | b4e5e50 | 2020-01-31 09:35:29 +0100 | [diff] [blame] | 194 | bool is_enable [default=true]; |
Florin Coras | e04c299 | 2017-03-01 08:17:34 -0800 | [diff] [blame] | 195 | }; |
| 196 | |
Steven Luong | c4b5d10 | 2024-07-30 13:44:01 -0700 | [diff] [blame] | 197 | autoreply define session_enable_disable_v2 { |
| 198 | u32 client_index; |
| 199 | u32 context; |
| 200 | vl_api_rt_backend_engine_t rt_engine_type; |
| 201 | }; |
| 202 | |
Nathan Skrzypczak | 7b3a3df | 2021-07-28 14:09:50 +0200 | [diff] [blame] | 203 | /** \brief enable/disable session layer socket api |
| 204 | @param client_index - opaque cookie to identify the sender |
| 205 | client to vpp direction only |
| 206 | @param context - sender context, to match reply w/ request |
| 207 | @param is_enable - disable session layer if 0, enable otherwise |
| 208 | */ |
| 209 | autoreply define session_sapi_enable_disable { |
| 210 | u32 client_index; |
| 211 | u32 context; |
| 212 | bool is_enable [default=true]; |
| 213 | }; |
| 214 | |
Florin Coras | cea194d | 2017-10-02 00:18:51 -0700 | [diff] [blame] | 215 | /** \brief add/del application namespace |
| 216 | @param client_index - opaque cookie to identify the sender |
| 217 | client to vpp direction only |
| 218 | @param context - sender context, to match reply w/ request |
Florin Coras | 6442401 | 2019-03-02 10:47:47 -0800 | [diff] [blame] | 219 | @param secret - secret shared between app and vpp |
Florin Coras | cea194d | 2017-10-02 00:18:51 -0700 | [diff] [blame] | 220 | @param sw_if_index - local interface that "supports" namespace. Set to |
Florin Coras | 6442401 | 2019-03-02 10:47:47 -0800 | [diff] [blame] | 221 | ~0 if no preference |
| 222 | @param ip4_fib_id - id of ip4 fib that "supports" the namespace. Ignored |
| 223 | if sw_if_index set. |
| 224 | @param ip6_fib_id - id of ip6 fib that "supports" the namespace. Ignored |
| 225 | if sw_if_index set. |
Florin Coras | cea194d | 2017-10-02 00:18:51 -0700 | [diff] [blame] | 226 | @param namespace_id - namespace id |
| 227 | */ |
Florin Coras | 6e8c667 | 2017-11-10 09:03:54 -0800 | [diff] [blame] | 228 | define app_namespace_add_del { |
Florin Coras | 7cb471a | 2021-07-23 08:39:26 -0700 | [diff] [blame] | 229 | option deprecated; |
Florin Coras | cea194d | 2017-10-02 00:18:51 -0700 | [diff] [blame] | 230 | u32 client_index; |
| 231 | u32 context; |
| 232 | u64 secret; |
Paul Vinciguerra | c0e9441 | 2020-04-28 01:12:04 -0400 | [diff] [blame] | 233 | vl_api_interface_index_t sw_if_index [default=0xffffffff]; |
Florin Coras | cea194d | 2017-10-02 00:18:51 -0700 | [diff] [blame] | 234 | u32 ip4_fib_id; |
| 235 | u32 ip6_fib_id; |
Jakub Grajciar | b4e5e50 | 2020-01-31 09:35:29 +0100 | [diff] [blame] | 236 | string namespace_id[]; |
Florin Coras | cea194d | 2017-10-02 00:18:51 -0700 | [diff] [blame] | 237 | }; |
| 238 | |
Florin Coras | 7cb471a | 2021-07-23 08:39:26 -0700 | [diff] [blame] | 239 | /** \brief add/del application namespace |
| 240 | @param client_index - opaque cookie to identify the sender |
| 241 | client to vpp direction only |
| 242 | @param context - sender context, to match reply w/ request |
| 243 | @param secret - secret shared between app and vpp |
| 244 | @param sw_if_index - local interface that "supports" namespace. Set to |
| 245 | ~0 if no preference |
| 246 | @param ip4_fib_id - id of ip4 fib that "supports" the namespace. Ignored |
| 247 | if sw_if_index set. |
| 248 | @param ip6_fib_id - id of ip6 fib that "supports" the namespace. Ignored |
| 249 | if sw_if_index set. |
| 250 | @param namespace_id - namespace id |
Nathan Skrzypczak | 51f1b26 | 2023-04-27 12:43:46 +0200 | [diff] [blame] | 251 | @param sock_name - socket name (path, abstract socket name) |
| 252 | */ |
| 253 | define app_namespace_add_del_v4 { |
| 254 | option deprecated; |
| 255 | u32 client_index; |
| 256 | u32 context; |
| 257 | u64 secret; |
| 258 | bool is_add [default=true]; |
| 259 | vl_api_interface_index_t sw_if_index [default=0xffffffff]; |
| 260 | u32 ip4_fib_id; |
| 261 | u32 ip6_fib_id; |
| 262 | string namespace_id[64]; |
| 263 | string sock_name[]; |
| 264 | }; |
| 265 | |
| 266 | /** \brief Reply for app namespace add/del |
| 267 | @param context - returned sender context, to match reply w/ request |
| 268 | @param retval - return code |
| 269 | @param appns_index - app namespace index |
| 270 | */ |
| 271 | define app_namespace_add_del_v4_reply |
| 272 | { |
| 273 | u32 context; |
| 274 | i32 retval; |
| 275 | u32 appns_index; |
| 276 | }; |
| 277 | |
| 278 | /** \brief add/del application namespace |
| 279 | @param client_index - opaque cookie to identify the sender |
| 280 | client to vpp direction only |
| 281 | @param context - sender context, to match reply w/ request |
| 282 | @param secret - secret shared between app and vpp |
| 283 | @param sw_if_index - local interface that "supports" namespace. Set to |
| 284 | ~0 if no preference |
| 285 | @param ip4_fib_id - id of ip4 fib that "supports" the namespace. Ignored |
| 286 | if sw_if_index set. |
| 287 | @param ip6_fib_id - id of ip6 fib that "supports" the namespace. Ignored |
| 288 | if sw_if_index set. |
| 289 | @param namespace_id - namespace id |
Florin Coras | 7cb471a | 2021-07-23 08:39:26 -0700 | [diff] [blame] | 290 | @param netns - linux net namespace |
| 291 | */ |
| 292 | define app_namespace_add_del_v2 { |
Nathan Skrzypczak | 51f1b26 | 2023-04-27 12:43:46 +0200 | [diff] [blame] | 293 | option deprecated; |
Florin Coras | 7cb471a | 2021-07-23 08:39:26 -0700 | [diff] [blame] | 294 | u32 client_index; |
| 295 | u32 context; |
| 296 | u64 secret; |
| 297 | vl_api_interface_index_t sw_if_index [default=0xffffffff]; |
| 298 | u32 ip4_fib_id; |
| 299 | u32 ip6_fib_id; |
| 300 | string namespace_id[64]; |
| 301 | string netns[64]; |
| 302 | }; |
| 303 | |
Nathan Skrzypczak | 1a9e2f9 | 2021-07-28 19:35:08 +0200 | [diff] [blame] | 304 | /** \brief add/del application namespace |
| 305 | @param client_index - opaque cookie to identify the sender |
| 306 | client to vpp direction only |
| 307 | @param context - sender context, to match reply w/ request |
| 308 | @param secret - secret shared between app and vpp |
| 309 | @param sw_if_index - local interface that "supports" namespace. Set to |
| 310 | ~0 if no preference |
| 311 | @param ip4_fib_id - id of ip4 fib that "supports" the namespace. Ignored |
| 312 | if sw_if_index set. |
| 313 | @param ip6_fib_id - id of ip6 fib that "supports" the namespace. Ignored |
| 314 | if sw_if_index set. |
| 315 | @param namespace_id - namespace id |
| 316 | @param netns - linux net namespace |
| 317 | @param sock_name - socket name (path, abstract socket name) |
| 318 | */ |
| 319 | define app_namespace_add_del_v3 { |
Nathan Skrzypczak | 51f1b26 | 2023-04-27 12:43:46 +0200 | [diff] [blame] | 320 | option deprecated; |
Nathan Skrzypczak | 1a9e2f9 | 2021-07-28 19:35:08 +0200 | [diff] [blame] | 321 | u32 client_index; |
| 322 | u32 context; |
| 323 | u64 secret; |
| 324 | bool is_add [default=true]; |
| 325 | vl_api_interface_index_t sw_if_index [default=0xffffffff]; |
| 326 | u32 ip4_fib_id; |
| 327 | u32 ip6_fib_id; |
| 328 | string namespace_id[64]; |
| 329 | string netns[64]; |
| 330 | string sock_name[]; |
| 331 | }; |
| 332 | |
Florin Coras | 6e8c667 | 2017-11-10 09:03:54 -0800 | [diff] [blame] | 333 | /** \brief Reply for app namespace add/del |
| 334 | @param context - returned sender context, to match reply w/ request |
| 335 | @param retval - return code |
| 336 | @param appns_index - app namespace index |
| 337 | */ |
| 338 | define app_namespace_add_del_reply |
| 339 | { |
Florin Coras | 7cb471a | 2021-07-23 08:39:26 -0700 | [diff] [blame] | 340 | option deprecated; |
| 341 | u32 context; |
| 342 | i32 retval; |
| 343 | u32 appns_index; |
| 344 | }; |
| 345 | |
| 346 | /** \brief Reply for app namespace add/del |
| 347 | @param context - returned sender context, to match reply w/ request |
| 348 | @param retval - return code |
| 349 | @param appns_index - app namespace index |
| 350 | */ |
| 351 | define app_namespace_add_del_v2_reply |
| 352 | { |
Nathan Skrzypczak | 51f1b26 | 2023-04-27 12:43:46 +0200 | [diff] [blame] | 353 | option deprecated; |
Florin Coras | 6e8c667 | 2017-11-10 09:03:54 -0800 | [diff] [blame] | 354 | u32 context; |
| 355 | i32 retval; |
| 356 | u32 appns_index; |
| 357 | }; |
| 358 | |
Nathan Skrzypczak | 1a9e2f9 | 2021-07-28 19:35:08 +0200 | [diff] [blame] | 359 | define app_namespace_add_del_v3_reply |
| 360 | { |
Nathan Skrzypczak | 51f1b26 | 2023-04-27 12:43:46 +0200 | [diff] [blame] | 361 | option deprecated; |
Nathan Skrzypczak | 1a9e2f9 | 2021-07-28 19:35:08 +0200 | [diff] [blame] | 362 | u32 context; |
| 363 | i32 retval; |
| 364 | u32 appns_index; |
| 365 | }; |
| 366 | |
Jakub Grajciar | b4e5e50 | 2020-01-31 09:35:29 +0100 | [diff] [blame] | 367 | enum session_rule_scope { |
| 368 | SESSION_RULE_SCOPE_API_GLOBAL = 0, |
| 369 | SESSION_RULE_SCOPE_API_LOCAL = 1, |
| 370 | SESSION_RULE_SCOPE_API_BOTH = 2, |
| 371 | }; |
| 372 | |
Florin Coras | 1c71045 | 2017-10-17 00:03:13 -0700 | [diff] [blame] | 373 | /** \brief add/del session rule |
| 374 | @param client_index - opaque cookie to identify the sender |
| 375 | client to vpp direction only |
| 376 | @param context - sender context, to match reply w/ request |
Jakub Grajciar | b4e5e50 | 2020-01-31 09:35:29 +0100 | [diff] [blame] | 377 | @param transport_proto - transport protocol |
Florin Coras | 1c71045 | 2017-10-17 00:03:13 -0700 | [diff] [blame] | 378 | @param is_ip4 - flag to indicate if ip addresses are ip4 or 6 |
| 379 | @param lcl_ip - local ip |
| 380 | @param lcl_plen - local prefix length |
| 381 | @param rmt_ip - remote ip |
| 382 | @param rmt_ple - remote prefix length |
| 383 | @param lcl_port - local port |
| 384 | @param rmt_port - remote port |
Florin Coras | 6442401 | 2019-03-02 10:47:47 -0800 | [diff] [blame] | 385 | @param action_index - the only action defined now is forward to |
| 386 | application with index action_index |
| 387 | @param is_add - flag to indicate if add or del |
| 388 | @param appns_index - application namespace where rule is to be applied to |
Jakub Grajciar | b4e5e50 | 2020-01-31 09:35:29 +0100 | [diff] [blame] | 389 | @param scope - enum that indicates scope of the rule: global or local. |
Florin Coras | 6442401 | 2019-03-02 10:47:47 -0800 | [diff] [blame] | 390 | If 0, default is global, 1 is global 2 is local, 3 is both |
Jakub Grajciar | b4e5e50 | 2020-01-31 09:35:29 +0100 | [diff] [blame] | 391 | @param tag - tag |
Florin Coras | 1c71045 | 2017-10-17 00:03:13 -0700 | [diff] [blame] | 392 | */ |
| 393 | autoreply define session_rule_add_del { |
| 394 | u32 client_index; |
| 395 | u32 context; |
Jakub Grajciar | b4e5e50 | 2020-01-31 09:35:29 +0100 | [diff] [blame] | 396 | vl_api_transport_proto_t transport_proto; |
| 397 | vl_api_prefix_t lcl; |
| 398 | vl_api_prefix_t rmt; |
Florin Coras | 1c71045 | 2017-10-17 00:03:13 -0700 | [diff] [blame] | 399 | u16 lcl_port; |
| 400 | u16 rmt_port; |
| 401 | u32 action_index; |
Jakub Grajciar | b4e5e50 | 2020-01-31 09:35:29 +0100 | [diff] [blame] | 402 | bool is_add [default=true]; |
Florin Coras | 1c71045 | 2017-10-17 00:03:13 -0700 | [diff] [blame] | 403 | u32 appns_index; |
Jakub Grajciar | b4e5e50 | 2020-01-31 09:35:29 +0100 | [diff] [blame] | 404 | vl_api_session_rule_scope_t scope; |
| 405 | string tag[64]; |
Florin Coras | 1c71045 | 2017-10-17 00:03:13 -0700 | [diff] [blame] | 406 | }; |
| 407 | |
Florin Coras | 6c36f53 | 2017-11-03 18:32:34 -0700 | [diff] [blame] | 408 | /** \brief Dump session rules |
| 409 | @param client_index - opaque cookie to identify the sender |
| 410 | @param context - sender context, to match reply w/ request |
| 411 | */ |
| 412 | define session_rules_dump |
| 413 | { |
| 414 | u32 client_index; |
| 415 | u32 context; |
| 416 | }; |
| 417 | |
| 418 | /** \brief Session rules details |
Florin Coras | 6442401 | 2019-03-02 10:47:47 -0800 | [diff] [blame] | 419 | @param context - sender context, to match reply w/ request |
Jakub Grajciar | b4e5e50 | 2020-01-31 09:35:29 +0100 | [diff] [blame] | 420 | @param transport_proto - transport protocol |
Florin Coras | 6c36f53 | 2017-11-03 18:32:34 -0700 | [diff] [blame] | 421 | @param is_ip4 - flag to indicate if ip addresses are ip4 or 6 |
| 422 | @param lcl_ip - local ip |
| 423 | @param lcl_plen - local prefix length |
| 424 | @param rmt_ip - remote ip |
| 425 | @param rmt_ple - remote prefix length |
| 426 | @param lcl_port - local port |
| 427 | @param rmt_port - remote port |
| 428 | @param action_index - the only action defined now is forward to |
Florin Coras | 6442401 | 2019-03-02 10:47:47 -0800 | [diff] [blame] | 429 | application with index action_index |
| 430 | @param appns_index - application namespace where rule is to be applied to |
Jakub Grajciar | b4e5e50 | 2020-01-31 09:35:29 +0100 | [diff] [blame] | 431 | @param scope - enum that indicates scope of the rule: global or local. |
Florin Coras | 6442401 | 2019-03-02 10:47:47 -0800 | [diff] [blame] | 432 | If 0, default is global, 1 is global 2 is local, 3 is both |
Jakub Grajciar | b4e5e50 | 2020-01-31 09:35:29 +0100 | [diff] [blame] | 433 | @param tag - tag |
Florin Coras | 6c36f53 | 2017-11-03 18:32:34 -0700 | [diff] [blame] | 434 | */ |
| 435 | define session_rules_details |
| 436 | { |
| 437 | u32 context; |
Jakub Grajciar | b4e5e50 | 2020-01-31 09:35:29 +0100 | [diff] [blame] | 438 | vl_api_transport_proto_t transport_proto; |
| 439 | vl_api_prefix_t lcl; |
| 440 | vl_api_prefix_t rmt; |
Florin Coras | 6c36f53 | 2017-11-03 18:32:34 -0700 | [diff] [blame] | 441 | u16 lcl_port; |
| 442 | u16 rmt_port; |
| 443 | u32 action_index; |
| 444 | u32 appns_index; |
Jakub Grajciar | b4e5e50 | 2020-01-31 09:35:29 +0100 | [diff] [blame] | 445 | vl_api_session_rule_scope_t scope; |
| 446 | string tag[64]; |
Florin Coras | 6c36f53 | 2017-11-03 18:32:34 -0700 | [diff] [blame] | 447 | }; |
| 448 | |
Steven Luong | c4b5d10 | 2024-07-30 13:44:01 -0700 | [diff] [blame] | 449 | autoreply define session_sdl_add_del { |
Steven Luong | 6f17317 | 2024-09-27 08:35:45 -0700 | [diff] [blame^] | 450 | option deprecated; |
Steven Luong | c4b5d10 | 2024-07-30 13:44:01 -0700 | [diff] [blame] | 451 | u32 client_index; |
| 452 | u32 context; |
| 453 | u32 appns_index; |
| 454 | bool is_add; |
| 455 | u32 count; |
| 456 | vl_api_sdl_rule_t r[count]; |
| 457 | }; |
| 458 | |
Steven Luong | 6f17317 | 2024-09-27 08:35:45 -0700 | [diff] [blame^] | 459 | autoreply define session_sdl_add_del_v2 { |
| 460 | u32 client_index; |
| 461 | u32 context; |
| 462 | u32 appns_index; |
| 463 | bool is_add; |
| 464 | u32 count; |
| 465 | vl_api_sdl_rule_v2_t r[count]; |
| 466 | }; |
| 467 | |
Steven Luong | c4b5d10 | 2024-07-30 13:44:01 -0700 | [diff] [blame] | 468 | /** \brief Dump session sdl |
| 469 | @param client_index - opaque cookie to identify the sender |
| 470 | @param context - sender context, to match reply w/ request |
| 471 | */ |
| 472 | define session_sdl_dump |
| 473 | { |
Steven Luong | 6f17317 | 2024-09-27 08:35:45 -0700 | [diff] [blame^] | 474 | option deprecated; |
Steven Luong | c4b5d10 | 2024-07-30 13:44:01 -0700 | [diff] [blame] | 475 | u32 client_index; |
| 476 | u32 context; |
| 477 | }; |
| 478 | |
| 479 | /** \brief Session sdl details |
| 480 | @param context - sender context, to match reply w/ request |
| 481 | @param lcl - local prefix |
| 482 | @param action_index - the only action defined now is forward to |
| 483 | application with index action_index |
| 484 | @param appns_index - application namespace where rule is to be applied to |
| 485 | @param tag - tag |
| 486 | */ |
| 487 | define session_sdl_details |
| 488 | { |
Steven Luong | 6f17317 | 2024-09-27 08:35:45 -0700 | [diff] [blame^] | 489 | option deprecated; |
Steven Luong | c4b5d10 | 2024-07-30 13:44:01 -0700 | [diff] [blame] | 490 | u32 context; |
| 491 | vl_api_prefix_t lcl; |
| 492 | u32 action_index; |
| 493 | u32 appns_index; |
| 494 | string tag[64]; |
| 495 | }; |
| 496 | |
Steven Luong | 6f17317 | 2024-09-27 08:35:45 -0700 | [diff] [blame^] | 497 | /** \brief Dump session sdl v2 |
| 498 | @param client_index - opaque cookie to identify the sender |
| 499 | @param context - sender context, to match reply w/ request |
| 500 | */ |
| 501 | define session_sdl_v2_dump |
| 502 | { |
| 503 | u32 client_index; |
| 504 | u32 context; |
| 505 | }; |
| 506 | |
| 507 | /** \brief Session sdl details v2 |
| 508 | @param context - sender context, to match reply w/ request |
| 509 | @param rmt - remote prefix |
| 510 | @param action_index - the only action defined now is forward to |
| 511 | application with index action_index |
| 512 | @param appns_index - application namespace where rule is to be applied to |
| 513 | @param tag - tag |
| 514 | */ |
| 515 | define session_sdl_v2_details |
| 516 | { |
| 517 | u32 context; |
| 518 | vl_api_prefix_t rmt; |
| 519 | u32 action_index; |
| 520 | u32 appns_index; |
| 521 | string tag[64]; |
| 522 | }; |
| 523 | |
Dave Barach | 68b0fb0 | 2017-02-28 15:15:56 -0500 | [diff] [blame] | 524 | /* |
| 525 | * Local Variables: |
| 526 | * eval: (c-set-style "gnu") |
| 527 | * End: |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 528 | */ |