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