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