Neels Hofmeyr | c6848f4 | 2020-09-18 18:00:50 +0200 | [diff] [blame] | 1 | /*! \defgroup bsslap 3GPP TS 48.071 BSS LCS Assistance Protocol (BSSLAP). |
| 2 | * @{ |
| 3 | * \file gsm_48_071.h |
| 4 | */ |
| 5 | /* |
| 6 | * (C) 2020 by sysmocom - s.f.m.c. GmbH <info@sysmocom.de> |
| 7 | * All Rights Reserved |
| 8 | * |
| 9 | * Author: Neels Hofmeyr <neels@hofmeyr.de> |
| 10 | * |
| 11 | * SPDX-License-Identifier: GPL-2.0+ |
| 12 | * |
| 13 | * This program is free software; you can redistribute it and/or modify |
| 14 | * it under the terms of the GNU General Public License as published by |
| 15 | * the Free Software Foundation; either version 2 of the License, or |
| 16 | * (at your option) any later version. |
| 17 | * |
| 18 | * This program is distributed in the hope that it will be useful, |
| 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 21 | * GNU General Public License for more details. |
| 22 | * |
Neels Hofmeyr | c6848f4 | 2020-09-18 18:00:50 +0200 | [diff] [blame] | 23 | */ |
| 24 | #pragma once |
| 25 | |
| 26 | #include <osmocom/gsm/protocol/gsm_04_08.h> |
| 27 | |
| 28 | enum bsslap_msgt { |
| 29 | BSSLAP_MSGT_TA_REQUEST = 0x1, |
| 30 | BSSLAP_MSGT_TA_RESPONSE = 0x2, |
| 31 | BSSLAP_MSGT_REJECT = 0xa, |
| 32 | BSSLAP_MSGT_RESET = 0xb, |
| 33 | BSSLAP_MSGT_ABORT = 0xc, |
| 34 | BSSLAP_MSGT_TA_LAYER3 = 0xd, |
| 35 | BSSLAP_MSGT_MS_POS_CMD = 0xf, |
| 36 | BSSLAP_MSGT_MS_POS_RESP = 0x10, |
| 37 | BSSLAP_MSGT_UTDOA_REQ = 0x11, |
| 38 | BSSLAP_MSGT_UTDOA_RESP = 0x12, |
| 39 | }; |
| 40 | |
| 41 | enum bsslap_cause { |
| 42 | BSSLAP_CAUSE_CONGESTION = 0x0, |
| 43 | BSSLAP_CAUSE_CHAN_MODE_NOT_SUPP = 0x1, |
| 44 | BSSLAP_CAUSE_POS_PROC_NOT_SUPP = 0x2, |
| 45 | BSSLAP_CAUSE_OTHER_RADIO_EVT_FAIL = 0x3, |
| 46 | BSSLAP_CAUSE_INTRA_BSS_HO = 0x4, |
| 47 | BSSLAP_CAUSE_SUPERV_TIMER_EXPIRED = 0x5, |
| 48 | BSSLAP_CAUSE_INTER_BSS_HO = 0x6, |
| 49 | BSSLAP_CAUSE_LOSS_SIG_CONN_MS = 0x7, |
| 50 | BSSLAP_CAUSE_INCORR_SERV_CELL_ID = 0x8, |
| 51 | BSSLAP_CAUSE_BSSAP_LE_SEGMENT_ERR = 0x9, |
| 52 | BSSLAP_CAUSE_CONCUR_POS_PROC_NOT_EN = 0xa, |
| 53 | }; |
| 54 | |
| 55 | enum bsslap_iei { |
| 56 | BSSLAP_IEI_TA = 0x1, |
| 57 | BSSLAP_IEI_CELL_ID = 0x9, |
| 58 | BSSLAP_IEI_CHAN_DESC = 0x10, |
| 59 | BSSLAP_IEI_MEAS_REP = 0x14, |
| 60 | BSSLAP_IEI_CAUSE = 0x18, |
| 61 | BSSLAP_IEI_RRLP_FLAG = 0x19, |
| 62 | BSSLAP_IEI_RRLP = 0x1b, |
| 63 | BSSLAP_IEI_CELL_ID_LIST = 0x1c, |
| 64 | BSSLAP_IEI_ENH_MEAS_REP = 0x1d, |
| 65 | BSSLAP_IEI_LAC = 0x1e, |
| 66 | BSSLAP_IEI_FREQ_LIST = 0x21, |
| 67 | BSSLAP_IEI_MS_POWER = 0x22, |
| 68 | BSSLAP_IEI_DELTA_TIMER = 0x23, |
| 69 | BSSLAP_IEI_SERVING_CELL_ID = 0x24, |
| 70 | BSSLAP_IEI_ENCR_KEY = 0x25, |
| 71 | BSSLAP_IEI_CIPH_MODE_SET = 0x26, |
| 72 | BSSLAP_IEI_CHAN_MODE = 0x27, |
| 73 | BSSLAP_IEI_MR_CONFIG = 0x28, |
| 74 | BSSLAP_IEI_POLLING_REPETITION = 0x29, |
| 75 | BSSLAP_IEI_PACKET_CHAN_DESC = 0x2a, |
| 76 | BSSLAP_IEI_TLLI = 0x2b, |
| 77 | BSSLAP_IEI_TFI = 0x2c, |
| 78 | BSSLAP_IEI_TBF_START_TIME = 0x2d, |
| 79 | BSSLAP_IEI_PWRUP_START_TIME = 0x2e, |
| 80 | BSSLAP_IEI_LONG_ENCR_KEY = 0x2f, |
| 81 | BSSLAP_IEI_CONCUR_POS_PROC_F = 0x30, |
| 82 | }; |
| 83 | |
| 84 | struct bsslap_ta_response { |
| 85 | uint16_t cell_id; |
| 86 | uint8_t ta; |
| 87 | |
| 88 | bool more_items; /*!< always set this to false */ |
| 89 | }; |
| 90 | |
| 91 | struct bsslap_ta_layer3 { |
| 92 | uint8_t ta; |
| 93 | |
| 94 | bool more_items; /*!< always set this to false */ |
| 95 | }; |
| 96 | |
| 97 | struct bsslap_reset { |
| 98 | uint16_t cell_id; |
| 99 | uint8_t ta; |
| 100 | struct gsm48_chan_desc chan_desc; |
| 101 | enum bsslap_cause cause; |
| 102 | |
| 103 | bool more_items; /*!< always set this to false */ |
| 104 | }; |
| 105 | |
| 106 | struct bsslap_pdu { |
| 107 | enum bsslap_msgt msg_type; |
| 108 | union { |
| 109 | /* ta_request: a TA Request message consists only of the message type. */ |
| 110 | struct bsslap_ta_response ta_response; |
| 111 | enum bsslap_cause reject; |
| 112 | struct bsslap_reset reset; |
| 113 | enum bsslap_cause abort; |
| 114 | struct bsslap_ta_layer3 ta_layer3; |
| 115 | }; |
| 116 | }; |
| 117 | |
| 118 | /*! @} */ |