Pau Espin Pedrol | a6bbb8c | 2021-11-24 17:00:03 +0100 | [diff] [blame] | 1 | /* Osmocom HNBLL Interface Templates, as per osmo-hnodeb/include/osmocom/hnodeb/hnb_prim.h |
| 2 | * (C) 2021 by sysmocom - s.f.m.c. GmbH <info@sysmocom.de> |
| 3 | * All rights reserved. |
| 4 | * Author: Pau Espin Pedrol <pespin@sysmocom.de> |
| 5 | * |
| 6 | * Released under the terms of GNU General Public License, Version 2 or |
| 7 | * (at your option) any later version. |
| 8 | * |
| 9 | * SPDX-License-Identifier: GPL-2.0-or-later |
| 10 | */ |
| 11 | |
| 12 | module HNBLLIF_Templates { |
| 13 | |
| 14 | import from General_Types all; |
| 15 | import from Osmocom_Types all; |
| 16 | import from HNBLLIF_Types all; |
| 17 | |
| 18 | /********************** |
| 19 | * CTL SAPI |
| 20 | **********************/ |
| 21 | template (value) HNBLLIF_Message ts_HNBLLIF_CTL_HELLO_REQ(template (value) HNBLLIF_Sapi sapi, |
| 22 | template (value) uint16_t api_version) := { |
| 23 | sapi := HNBLL_IF_SAPI_CTL, |
| 24 | u := { |
| 25 | ctl := { |
| 26 | prim := HNBLL_IF_CTL_MSG_HELLO, |
| 27 | u := { |
| 28 | hello := { |
| 29 | op := HNBLL_IF_OP_REQUEST, |
| 30 | u := { |
| 31 | req := { |
| 32 | sapi := sapi, |
| 33 | api_version := api_version |
| 34 | } |
| 35 | } |
| 36 | } |
| 37 | } |
| 38 | } |
| 39 | } |
| 40 | } |
| 41 | |
| 42 | template (present) HNBLLIF_Message tr_HNBLLIF_CTL_HELLO_CNF(template (present) HNBLLIF_Sapi sapi := ?, |
| 43 | template (present) uint32_t api_version := ?) := { |
| 44 | sapi := HNBLL_IF_SAPI_CTL, |
| 45 | u := { |
| 46 | ctl := { |
| 47 | prim := HNBLL_IF_CTL_MSG_HELLO, |
| 48 | u := { |
| 49 | hello := { |
| 50 | op := HNBLL_IF_OP_CONFIRM, |
| 51 | u := { |
| 52 | cnf := { |
| 53 | sapi := sapi, |
| 54 | api_version := api_version |
| 55 | } |
| 56 | } |
| 57 | } |
| 58 | } |
| 59 | } |
| 60 | } |
| 61 | } |
| 62 | |
| 63 | |
| 64 | /********************** |
| 65 | * IUH SAPI |
| 66 | **********************/ |
| 67 | |
| 68 | template (present) HNBLLIF_Message tr_HNBLLIF_IUH_CONFIGURE_IND(template (present) uint16_t mcc := ?, |
| 69 | template (present) uint16_t mnc := ?, |
| 70 | template (present) uint16_t cell_identity := ?, |
| 71 | template (present) uint16_t lac := ?, |
| 72 | template (present) uint8_t rac := ?, |
| 73 | template (present) uint16_t sac := ?, |
| 74 | template (present) uint16_t rnc_id := ?) := { |
| 75 | sapi := HNBLL_IF_SAPI_IUH, |
| 76 | u := { |
| 77 | iuh := { |
| 78 | prim := HNBLL_IF_IUH_MSG_CONFIGURE, |
| 79 | u := { |
| 80 | configure := { |
| 81 | op := HNBLL_IF_OP_INDICATION, |
| 82 | u := { |
| 83 | ind := { |
| 84 | mcc := mcc, |
| 85 | mnc := mnc, |
| 86 | cell_identity := cell_identity, |
| 87 | lac := lac, |
| 88 | rac := rac, |
| 89 | reserved := ?, |
| 90 | sac := sac, |
| 91 | rnc_id := rnc_id |
| 92 | } |
| 93 | } |
| 94 | } |
| 95 | } |
| 96 | } |
| 97 | } |
| 98 | } |
| 99 | |
| 100 | template (value) HNBLLIF_Message ts_HNBLLIF_IUH_CONN_ESTABLISH_REQ(template (value) uint32_t context_id, |
| 101 | template (value) uint8_t domain, |
| 102 | template (value) uint8_t est_cause, |
| 103 | template (value) octetstring data) := { |
| 104 | sapi := HNBLL_IF_SAPI_IUH, |
| 105 | u := { |
| 106 | iuh := { |
| 107 | prim := HNBLL_IF_IUH_MSG_CONN_ESTABLISH, |
| 108 | u := { |
| 109 | conn_establish := { |
| 110 | op := HNBLL_IF_OP_REQUEST, |
| 111 | u := { |
| 112 | req := { |
| 113 | context_id := context_id, |
| 114 | domain := domain, |
| 115 | est_cause := est_cause, |
| 116 | reserved := 0, |
| 117 | data_len := lengthof(data), |
| 118 | data := data |
| 119 | } |
| 120 | } |
| 121 | } |
| 122 | } |
| 123 | } |
| 124 | } |
| 125 | } |
| 126 | |
| 127 | template (present) HNBLLIF_Message tr_HNBLLIF_IUH_CONN_ESTABLISH_CNF(template (present) uint32_t context_id := ?, |
| 128 | template (present) uint8_t domain := ?, |
| 129 | template (present) uint8_t est_cause := ?) := { |
| 130 | sapi := HNBLL_IF_SAPI_IUH, |
| 131 | u := { |
| 132 | iuh := { |
| 133 | prim := HNBLL_IF_IUH_MSG_CONN_ESTABLISH, |
| 134 | u := { |
| 135 | conn_establish := { |
| 136 | op := HNBLL_IF_OP_CONFIRM, |
| 137 | u := { |
| 138 | cnf := { |
| 139 | context_id := context_id, |
| 140 | domain := domain, |
| 141 | est_cause := est_cause |
| 142 | } |
| 143 | } |
| 144 | } |
| 145 | } |
| 146 | } |
| 147 | } |
| 148 | } |
| 149 | |
| 150 | template (value) HNBLLIF_Message ts_HNBLLIF_IUH_CONN_RELEASE_REQ(template (value) uint32_t context_id, |
| 151 | template (value) uint8_t domain, |
| 152 | template (value) uint8_t cause_type, |
| 153 | template (value) uint8_t cause, |
| 154 | template (value) octetstring data) := { |
| 155 | sapi := HNBLL_IF_SAPI_IUH, |
| 156 | u := { |
| 157 | iuh := { |
| 158 | prim := HNBLL_IF_IUH_MSG_CONN_RELEASE, |
| 159 | u := { |
| 160 | conn_release := { |
| 161 | op := HNBLL_IF_OP_REQUEST, |
| 162 | u := { |
| 163 | req := { |
| 164 | context_id := context_id, |
| 165 | domain := domain, |
| 166 | spare1 := 0, |
| 167 | cause_type := cause_type, |
| 168 | cause := cause, |
| 169 | data_len := lengthof(data), |
| 170 | data := data |
| 171 | } |
| 172 | } |
| 173 | } |
| 174 | } |
| 175 | } |
| 176 | } |
| 177 | } |
| 178 | |
| 179 | template (present) HNBLLIF_Message tr_HNBLLIF_IUH_CONN_DATA_IND(template (present) uint32_t context_id := ?, |
| 180 | template (present) uint8_t domain := ?, |
| 181 | template (present) octetstring data := ?) := { |
| 182 | sapi := HNBLL_IF_SAPI_IUH, |
| 183 | u := { |
| 184 | iuh := { |
| 185 | prim := HNBLL_IF_IUH_MSG_CONN_DATA, |
| 186 | u := { |
| 187 | conn_data := { |
| 188 | op := HNBLL_IF_OP_INDICATION, |
| 189 | u := { |
| 190 | ind := { |
| 191 | context_id := context_id, |
| 192 | domain := domain, |
| 193 | spare1 := ?, |
| 194 | spare2 := ?, |
| 195 | data_len := ?, |
| 196 | data := data |
| 197 | } |
| 198 | } |
| 199 | } |
| 200 | } |
| 201 | } |
| 202 | } |
| 203 | } |
| 204 | |
| 205 | template (value) HNBLLIF_Message ts_HNBLLIF_IUH_CONN_DATA_REQ(template (value) uint32_t context_id, |
| 206 | template (value) uint8_t domain, |
| 207 | template (value) octetstring data) := { |
| 208 | sapi := HNBLL_IF_SAPI_IUH, |
| 209 | u := { |
| 210 | iuh := { |
| 211 | prim := HNBLL_IF_IUH_MSG_CONN_DATA, |
| 212 | u := { |
| 213 | conn_data := { |
| 214 | op := HNBLL_IF_OP_REQUEST, |
| 215 | u := { |
| 216 | req := { |
| 217 | context_id := context_id, |
| 218 | domain := domain, |
| 219 | spare1 := 0, |
| 220 | spare2 := 0, |
| 221 | data_len := lengthof(data), |
| 222 | data := data |
| 223 | } |
| 224 | } |
| 225 | } |
| 226 | } |
| 227 | } |
| 228 | } |
| 229 | } |
| 230 | |
| 231 | template (present) HNBLLIF_Message tr_HNBLLIF_IUH_UNITDATA_IND(template (present) octetstring data := ?) := { |
| 232 | sapi := HNBLL_IF_SAPI_IUH, |
| 233 | u := { |
| 234 | iuh := { |
| 235 | prim := HNBLL_IF_IUH_MSG_UNITDATA, |
| 236 | u := { |
| 237 | unitdata := { |
| 238 | op := HNBLL_IF_OP_INDICATION, |
| 239 | u := { |
| 240 | ind := { |
| 241 | data_len := ?, |
| 242 | data := data |
| 243 | } |
| 244 | } |
| 245 | } |
| 246 | } |
| 247 | } |
| 248 | } |
| 249 | } |
| 250 | |
Pau Espin Pedrol | 32fb54e | 2021-11-29 16:21:26 +0100 | [diff] [blame] | 251 | /********************** |
| 252 | * AUDIO SAPI |
| 253 | **********************/ |
| 254 | |
| 255 | template (value) HNBLLIF_Message ts_HNBLLIF_AUDIO_CONN_ESTABLISH_REQ(template (value) uint32_t context_id, |
| 256 | template (value) uint16_t remote_rtp_port, |
| 257 | template (value) HNBLLIF_AddrType remote_rtp_address_type, |
| 258 | template (value) HNBLLIF_Addr remote_addr) := { |
| 259 | sapi := HNBLL_IF_SAPI_AUDIO, |
| 260 | u := { |
| 261 | audio := { |
| 262 | prim := HNBLL_IF_AUDIO_MSG_CONN_ESTABLISH, |
| 263 | u := { |
| 264 | conn_establish := { |
| 265 | op := HNBLL_IF_OP_REQUEST, |
| 266 | u := { |
| 267 | req := { |
| 268 | context_id := context_id, |
| 269 | remote_rtp_port := remote_rtp_port, |
| 270 | reserved := 0, |
| 271 | remote_rtp_address_type := remote_rtp_address_type, |
| 272 | remote_addr := remote_addr |
| 273 | } |
| 274 | } |
| 275 | } |
| 276 | } |
| 277 | } |
| 278 | } |
| 279 | } |
| 280 | |
| 281 | template (present) HNBLLIF_Message tr_HNBLLIF_AUDIO_CONN_ESTABLISH_CNF(template (present) uint32_t context_id := ?, |
Pau Espin Pedrol | 2514245 | 2021-12-14 18:43:46 +0100 | [diff] [blame] | 282 | template (present) uint32_t audio_conn_id := ?, |
Pau Espin Pedrol | 32fb54e | 2021-11-29 16:21:26 +0100 | [diff] [blame] | 283 | template (present) uint8_t error_code := ?, |
| 284 | template (present) uint16_t local_rtp_port:= ?, |
| 285 | template (present) HNBLLIF_AddrType local_rtp_address_type := ?, |
| 286 | template (present) HNBLLIF_Addr local_addr := ?) := { |
| 287 | sapi := HNBLL_IF_SAPI_AUDIO, |
| 288 | u := { |
| 289 | audio := { |
| 290 | prim := HNBLL_IF_AUDIO_MSG_CONN_ESTABLISH, |
| 291 | u := { |
| 292 | conn_establish := { |
| 293 | op := HNBLL_IF_OP_CONFIRM, |
| 294 | u := { |
| 295 | cnf := { |
| 296 | context_id := context_id, |
Pau Espin Pedrol | 2514245 | 2021-12-14 18:43:46 +0100 | [diff] [blame] | 297 | audio_conn_id := audio_conn_id, |
Pau Espin Pedrol | 32fb54e | 2021-11-29 16:21:26 +0100 | [diff] [blame] | 298 | local_rtp_port := local_rtp_port, |
| 299 | error_code := error_code, |
| 300 | local_rtp_address_type := local_rtp_address_type, |
| 301 | local_addr := local_addr |
| 302 | } |
| 303 | } |
| 304 | } |
| 305 | } |
| 306 | } |
| 307 | } |
| 308 | } |
| 309 | |
Pau Espin Pedrol | 2514245 | 2021-12-14 18:43:46 +0100 | [diff] [blame] | 310 | template (value) HNBLLIF_Message ts_HNBLLIF_AUDIO_CONN_RELEASE_REQ(template (value) uint32_t audio_conn_id) := { |
Pau Espin Pedrol | 32fb54e | 2021-11-29 16:21:26 +0100 | [diff] [blame] | 311 | sapi := HNBLL_IF_SAPI_AUDIO, |
| 312 | u := { |
| 313 | audio := { |
| 314 | prim := HNBLL_IF_AUDIO_MSG_CONN_RELEASE, |
| 315 | u := { |
| 316 | conn_release := { |
| 317 | op := HNBLL_IF_OP_REQUEST, |
| 318 | u := { |
| 319 | req := { |
Pau Espin Pedrol | 2514245 | 2021-12-14 18:43:46 +0100 | [diff] [blame] | 320 | audio_conn_id := audio_conn_id |
Pau Espin Pedrol | 32fb54e | 2021-11-29 16:21:26 +0100 | [diff] [blame] | 321 | } |
| 322 | } |
| 323 | } |
| 324 | } |
| 325 | } |
| 326 | } |
| 327 | } |
| 328 | |
Pau Espin Pedrol | 2514245 | 2021-12-14 18:43:46 +0100 | [diff] [blame] | 329 | template (present) HNBLLIF_Message tr_HNBLLIF_AUDIO_CONN_DATA_IND(template (present) uint32_t audio_conn_id := ?, |
Pau Espin Pedrol | 32fb54e | 2021-11-29 16:21:26 +0100 | [diff] [blame] | 330 | template (present) octetstring data := ?) := { |
| 331 | sapi := HNBLL_IF_SAPI_AUDIO, |
| 332 | u := { |
| 333 | audio := { |
| 334 | prim := HNBLL_IF_AUDIO_MSG_CONN_DATA, |
| 335 | u := { |
| 336 | conn_data := { |
| 337 | op := HNBLL_IF_OP_INDICATION, |
| 338 | u := { |
| 339 | ind := { |
Pau Espin Pedrol | 2514245 | 2021-12-14 18:43:46 +0100 | [diff] [blame] | 340 | audio_conn_id := audio_conn_id, |
Pau Espin Pedrol | 32fb54e | 2021-11-29 16:21:26 +0100 | [diff] [blame] | 341 | data_len := ?, |
| 342 | data := data |
| 343 | } |
| 344 | } |
| 345 | } |
| 346 | } |
| 347 | } |
| 348 | } |
| 349 | } |
| 350 | |
Pau Espin Pedrol | 2514245 | 2021-12-14 18:43:46 +0100 | [diff] [blame] | 351 | template (value) HNBLLIF_Message ts_HNBLLIF_AUDIO_CONN_DATA_REQ(template (value) uint32_t audio_conn_id, |
Pau Espin Pedrol | 32fb54e | 2021-11-29 16:21:26 +0100 | [diff] [blame] | 352 | template (value) octetstring data) := { |
| 353 | sapi := HNBLL_IF_SAPI_AUDIO, |
| 354 | u := { |
| 355 | audio := { |
| 356 | prim := HNBLL_IF_AUDIO_MSG_CONN_DATA, |
| 357 | u := { |
| 358 | conn_data := { |
| 359 | op := HNBLL_IF_OP_REQUEST, |
| 360 | u := { |
| 361 | req := { |
Pau Espin Pedrol | 2514245 | 2021-12-14 18:43:46 +0100 | [diff] [blame] | 362 | audio_conn_id := audio_conn_id, |
Pau Espin Pedrol | 32fb54e | 2021-11-29 16:21:26 +0100 | [diff] [blame] | 363 | data_len := lengthof(data), |
| 364 | data := data |
| 365 | } |
| 366 | } |
| 367 | } |
| 368 | } |
| 369 | } |
| 370 | } |
| 371 | } |
Pau Espin Pedrol | 9e18372 | 2021-12-02 20:12:25 +0100 | [diff] [blame] | 372 | |
| 373 | |
| 374 | /********************** |
| 375 | * GTP SAPI |
| 376 | **********************/ |
| 377 | template (value) HNBLLIF_Message ts_HNBLLIF_GTP_CONN_ESTABLISH_REQ(template (value) uint32_t context_id, |
| 378 | template (value) uint32_t remote_tei, |
| 379 | template (value) HNBLLIF_AddrType remote_gtpu_address_type, |
| 380 | template (value) HNBLLIF_Addr remote_gtpu_addr) := { |
| 381 | sapi := HNBLL_IF_SAPI_GTP, |
| 382 | u := { |
| 383 | gtp := { |
| 384 | prim := HNBLL_IF_GTP_MSG_CONN_ESTABLISH, |
| 385 | u := { |
| 386 | conn_establish := { |
| 387 | op := HNBLL_IF_OP_REQUEST, |
| 388 | u := { |
| 389 | req := { |
| 390 | context_id := context_id, |
| 391 | remote_tei := remote_tei, |
| 392 | reserved := 0, |
| 393 | remote_gtpu_address_type := remote_gtpu_address_type, |
| 394 | remote_gtpu_addr := remote_gtpu_addr |
| 395 | } |
| 396 | } |
| 397 | } |
| 398 | } |
| 399 | } |
| 400 | } |
| 401 | } |
| 402 | |
| 403 | template (present) HNBLLIF_Message tr_HNBLLIF_GTP_CONN_ESTABLISH_CNF(template (present) uint32_t context_id := ?, |
Pau Espin Pedrol | 2514245 | 2021-12-14 18:43:46 +0100 | [diff] [blame] | 404 | template (present) uint32_t gtp_conn_id := ?, |
Pau Espin Pedrol | 9e18372 | 2021-12-02 20:12:25 +0100 | [diff] [blame] | 405 | template (present) uint32_t local_tei := ?, |
| 406 | template (present) uint8_t error_code := ?, |
| 407 | template (present) HNBLLIF_AddrType local_gtpu_address_type := ?, |
| 408 | template (present) HNBLLIF_Addr local_gtpu_addr := ?) := { |
| 409 | sapi := HNBLL_IF_SAPI_GTP, |
| 410 | u := { |
| 411 | gtp := { |
| 412 | prim := HNBLL_IF_GTP_MSG_CONN_ESTABLISH, |
| 413 | u := { |
| 414 | conn_establish := { |
| 415 | op := HNBLL_IF_OP_CONFIRM, |
| 416 | u := { |
| 417 | cnf := { |
| 418 | context_id := context_id, |
Pau Espin Pedrol | 2514245 | 2021-12-14 18:43:46 +0100 | [diff] [blame] | 419 | gtp_conn_id := gtp_conn_id, |
Pau Espin Pedrol | 9e18372 | 2021-12-02 20:12:25 +0100 | [diff] [blame] | 420 | local_tei := local_tei, |
| 421 | error_code := error_code, |
| 422 | local_gtpu_address_type := local_gtpu_address_type, |
| 423 | local_gtpu_addr := local_gtpu_addr |
| 424 | } |
| 425 | } |
| 426 | } |
| 427 | } |
| 428 | } |
| 429 | } |
| 430 | } |
| 431 | |
Pau Espin Pedrol | 2514245 | 2021-12-14 18:43:46 +0100 | [diff] [blame] | 432 | template (value) HNBLLIF_Message ts_HNBLLIF_GTP_CONN_RELEASE_REQ(template (value) uint32_t gtp_conn_id) := { |
Pau Espin Pedrol | 9e18372 | 2021-12-02 20:12:25 +0100 | [diff] [blame] | 433 | sapi := HNBLL_IF_SAPI_GTP, |
| 434 | u := { |
| 435 | gtp := { |
| 436 | prim := HNBLL_IF_GTP_MSG_CONN_RELEASE, |
| 437 | u := { |
| 438 | conn_release := { |
| 439 | op := HNBLL_IF_OP_REQUEST, |
| 440 | u := { |
| 441 | req := { |
Pau Espin Pedrol | 2514245 | 2021-12-14 18:43:46 +0100 | [diff] [blame] | 442 | gtp_conn_id := gtp_conn_id |
Pau Espin Pedrol | 9e18372 | 2021-12-02 20:12:25 +0100 | [diff] [blame] | 443 | } |
| 444 | } |
| 445 | } |
| 446 | } |
| 447 | } |
| 448 | } |
| 449 | } |
| 450 | |
Pau Espin Pedrol | 2514245 | 2021-12-14 18:43:46 +0100 | [diff] [blame] | 451 | template (present) HNBLLIF_Message tr_HNBLLIF_GTP_CONN_DATA_IND(template (present) uint32_t gtp_conn_id, |
Pau Espin Pedrol | 9e18372 | 2021-12-02 20:12:25 +0100 | [diff] [blame] | 452 | template (present) octetstring data := ?) := { |
| 453 | sapi := HNBLL_IF_SAPI_GTP, |
| 454 | u := { |
| 455 | gtp := { |
| 456 | prim := HNBLL_IF_GTP_MSG_CONN_DATA, |
| 457 | u := { |
| 458 | conn_data := { |
| 459 | op := HNBLL_IF_OP_INDICATION, |
| 460 | u := { |
| 461 | ind := { |
Pau Espin Pedrol | 2514245 | 2021-12-14 18:43:46 +0100 | [diff] [blame] | 462 | gtp_conn_id := gtp_conn_id, |
Pau Espin Pedrol | 9e18372 | 2021-12-02 20:12:25 +0100 | [diff] [blame] | 463 | data_len := ?, |
| 464 | data := data |
| 465 | } |
| 466 | } |
| 467 | } |
| 468 | } |
| 469 | } |
| 470 | } |
| 471 | } |
| 472 | |
Pau Espin Pedrol | 2514245 | 2021-12-14 18:43:46 +0100 | [diff] [blame] | 473 | template (value) HNBLLIF_Message ts_HNBLLIF_GTP_CONN_DATA_REQ(template (value) uint32_t gtp_conn_id, |
Pau Espin Pedrol | 9e18372 | 2021-12-02 20:12:25 +0100 | [diff] [blame] | 474 | template (value) octetstring data) := { |
| 475 | sapi := HNBLL_IF_SAPI_GTP, |
| 476 | u := { |
| 477 | gtp := { |
| 478 | prim := HNBLL_IF_GTP_MSG_CONN_DATA, |
| 479 | u := { |
| 480 | conn_data := { |
| 481 | op := HNBLL_IF_OP_REQUEST, |
| 482 | u := { |
| 483 | req := { |
Pau Espin Pedrol | 2514245 | 2021-12-14 18:43:46 +0100 | [diff] [blame] | 484 | gtp_conn_id := gtp_conn_id, |
Pau Espin Pedrol | 9e18372 | 2021-12-02 20:12:25 +0100 | [diff] [blame] | 485 | data_len := lengthof(data), |
| 486 | data := data |
| 487 | } |
| 488 | } |
| 489 | } |
| 490 | } |
| 491 | } |
| 492 | } |
| 493 | } |
| 494 | |
Pau Espin Pedrol | a6bbb8c | 2021-11-24 17:00:03 +0100 | [diff] [blame] | 495 | } with { encode "RAW" variant "BYTEORDER(first)" }; |