blob: fb9653ab1a5cc060ca8d7a494f1611fb4c92fcea [file] [log] [blame]
Neels Hofmeyrc6848f42020-09-18 18:00:50 +02001/*! \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 *
23 * You should have received a copy of the GNU General Public License along
24 * with this program; if not, write to the Free Software Foundation, Inc.,
25 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
26 *
27 */
28#pragma once
29
30#include <osmocom/gsm/protocol/gsm_04_08.h>
31
32enum bsslap_msgt {
33 BSSLAP_MSGT_TA_REQUEST = 0x1,
34 BSSLAP_MSGT_TA_RESPONSE = 0x2,
35 BSSLAP_MSGT_REJECT = 0xa,
36 BSSLAP_MSGT_RESET = 0xb,
37 BSSLAP_MSGT_ABORT = 0xc,
38 BSSLAP_MSGT_TA_LAYER3 = 0xd,
39 BSSLAP_MSGT_MS_POS_CMD = 0xf,
40 BSSLAP_MSGT_MS_POS_RESP = 0x10,
41 BSSLAP_MSGT_UTDOA_REQ = 0x11,
42 BSSLAP_MSGT_UTDOA_RESP = 0x12,
43};
44
45enum bsslap_cause {
46 BSSLAP_CAUSE_CONGESTION = 0x0,
47 BSSLAP_CAUSE_CHAN_MODE_NOT_SUPP = 0x1,
48 BSSLAP_CAUSE_POS_PROC_NOT_SUPP = 0x2,
49 BSSLAP_CAUSE_OTHER_RADIO_EVT_FAIL = 0x3,
50 BSSLAP_CAUSE_INTRA_BSS_HO = 0x4,
51 BSSLAP_CAUSE_SUPERV_TIMER_EXPIRED = 0x5,
52 BSSLAP_CAUSE_INTER_BSS_HO = 0x6,
53 BSSLAP_CAUSE_LOSS_SIG_CONN_MS = 0x7,
54 BSSLAP_CAUSE_INCORR_SERV_CELL_ID = 0x8,
55 BSSLAP_CAUSE_BSSAP_LE_SEGMENT_ERR = 0x9,
56 BSSLAP_CAUSE_CONCUR_POS_PROC_NOT_EN = 0xa,
57};
58
59enum bsslap_iei {
60 BSSLAP_IEI_TA = 0x1,
61 BSSLAP_IEI_CELL_ID = 0x9,
62 BSSLAP_IEI_CHAN_DESC = 0x10,
63 BSSLAP_IEI_MEAS_REP = 0x14,
64 BSSLAP_IEI_CAUSE = 0x18,
65 BSSLAP_IEI_RRLP_FLAG = 0x19,
66 BSSLAP_IEI_RRLP = 0x1b,
67 BSSLAP_IEI_CELL_ID_LIST = 0x1c,
68 BSSLAP_IEI_ENH_MEAS_REP = 0x1d,
69 BSSLAP_IEI_LAC = 0x1e,
70 BSSLAP_IEI_FREQ_LIST = 0x21,
71 BSSLAP_IEI_MS_POWER = 0x22,
72 BSSLAP_IEI_DELTA_TIMER = 0x23,
73 BSSLAP_IEI_SERVING_CELL_ID = 0x24,
74 BSSLAP_IEI_ENCR_KEY = 0x25,
75 BSSLAP_IEI_CIPH_MODE_SET = 0x26,
76 BSSLAP_IEI_CHAN_MODE = 0x27,
77 BSSLAP_IEI_MR_CONFIG = 0x28,
78 BSSLAP_IEI_POLLING_REPETITION = 0x29,
79 BSSLAP_IEI_PACKET_CHAN_DESC = 0x2a,
80 BSSLAP_IEI_TLLI = 0x2b,
81 BSSLAP_IEI_TFI = 0x2c,
82 BSSLAP_IEI_TBF_START_TIME = 0x2d,
83 BSSLAP_IEI_PWRUP_START_TIME = 0x2e,
84 BSSLAP_IEI_LONG_ENCR_KEY = 0x2f,
85 BSSLAP_IEI_CONCUR_POS_PROC_F = 0x30,
86};
87
88struct bsslap_ta_response {
89 uint16_t cell_id;
90 uint8_t ta;
91
92 bool more_items; /*!< always set this to false */
93};
94
95struct bsslap_ta_layer3 {
96 uint8_t ta;
97
98 bool more_items; /*!< always set this to false */
99};
100
101struct bsslap_reset {
102 uint16_t cell_id;
103 uint8_t ta;
104 struct gsm48_chan_desc chan_desc;
105 enum bsslap_cause cause;
106
107 bool more_items; /*!< always set this to false */
108};
109
110struct bsslap_pdu {
111 enum bsslap_msgt msg_type;
112 union {
113 /* ta_request: a TA Request message consists only of the message type. */
114 struct bsslap_ta_response ta_response;
115 enum bsslap_cause reject;
116 struct bsslap_reset reset;
117 enum bsslap_cause abort;
118 struct bsslap_ta_layer3 ta_layer3;
119 };
120};
121
122/*! @} */