libosmogsm  1.8.0
Osmocom GSM library
gsm_49_031.h
Go to the documentation of this file.
1 
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  */
24 #pragma once
25 
26 #include <stdint.h>
27 #include <stdbool.h>
28 
29 #include <osmocom/core/endian.h>
33 #include <osmocom/gsm/gsm48.h>
34 
36 enum lcs_cause {
53 };
54 
56 struct lcs_cause_ie {
57  bool present;
60  uint8_t diag_val;
61 };
62 
63 /* 3GPP TS 49.031 10.16 LCS QoS IE */
65 #if OSMO_IS_LITTLE_ENDIAN
66  uint8_t vert:1, vel:1, spare1:6;
67  uint8_t ha_val:7, ha_ind:1;
68  uint8_t va_val:7, va_ind:1;
69  uint8_t spare3:6, rt:2;
70 #elif OSMO_IS_BIG_ENDIAN
71  uint8_t spare1:6, vel:1, vert:1;
72  uint8_t ha_ind:1, ha_val:7;
73  uint8_t va_ind:1, va_val:7;
74  uint8_t rt:2, spare3:6;
75 #endif
76 } __attribute__ ((packed));
77 
80 };
81 
93 };
94 
136 };
137 
143 };
144 
149 };
150 
156 };
157 
159  enum bssmap_le_location_information location_information;
160  enum bssmap_le_positioning_method positioning_method;
161 };
162 
172 };
173 
175  struct bssmap_le_location_type location_type;
176  struct gsm0808_cell_id cell_id;
177 
179  enum bssmap_le_lcs_client_type lcs_client_type;
180 
181  struct osmo_mobile_identity imsi;
182  struct osmo_mobile_identity imei;
183 
185  struct bsslap_pdu apdu;
186 
187  bool more_items;
190  uint8_t lcs_priority;
193  struct osmo_bssmap_le_lcs_qos lcs_qos;
194 
195  bool more_items2;
196 };
197 
200  union gad_raw location_estimate;
201 
203 
204  bool more_items;
205 };
206 
208  struct bsslap_pdu apdu;
209 
210  bool more_items;
211 };
212 
215  union {
216  enum gsm0808_cause reset;
217  /* reset_ack consists only of the message type */
218  struct bssmap_le_perform_loc_req perform_loc_req;
219  struct bssmap_le_perform_loc_resp perform_loc_resp;
220  struct lcs_cause_ie perform_loc_abort;
221  struct bssmap_le_conn_oriented_info conn_oriented_info;
222  };
223 };
224 
225 struct bssap_le_pdu {
226  enum bssap_le_msg_discr discr;
227  union {
228  struct bssmap_le_pdu bssmap_le;
229  /* future: add DTAP PDU, currently not implemented */
230  };
231 };
232 
uint8_t msg_type
Definition: gsm_04_08.h:768
Definition: gsm_49_031.h:108
Definition: gsm_49_031.h:126
Definition: gsm_49_031.h:124
Definition: gsm_49_031.h:207
Definition: gsm_49_031.h:37
Definition: gsm_49_031.h:87
Definition: gsm_49_031.h:133
Definition: gsm_49_031.h:42
Definition: gsm_49_031.h:39
Definition: gsm_49_031.h:91
Definition: gsm_49_031.h:169
Definition: gsm_49_031.h:51
Definition: gsm_49_031.h:120
bssmap_le_positioning_method
Definition: gsm_49_031.h:151
Definition: gsm_49_031.h:105
bool present
Definition: gsm_49_031.h:57
GAD PDU in network-byte-order according to 3GPP TS 23.032 GAD: Universal Geographical Area Descriptio...
Definition: gsm_23_032.h:239
Definition: gsm_49_031.h:109
bool more_items
always set this to false
Definition: gsm_49_031.h:204
Definition: gsm_49_031.h:225
Definition: gsm_49_031.h:106
bssmap_le_iei
Definition: gsm_49_031.h:95
Definition: gsm_49_031.h:154
Definition: gsm_49_031.h:129
bssmap_le_apdu_proto
Definition: gsm_49_031.h:138
Definition: gsm_49_031.h:45
Definition: gsm_49_031.h:125
Definition: gsm_49_031.h:131
Definition: gsm_49_031.h:102
lcs_cause
3GPP TS 49.031 10.13 LCS Cause, also in 3GPP TS 48.008 3.2.2.66, which simply refers to the former...
Definition: gsm_49_031.h:36
Definition: gsm_49_031.h:146
Definition: gsm_49_031.h:213
Definition: gsm_49_031.h:118
bool apdu_present
Definition: gsm_49_031.h:184
Definition: gsm_49_031.h:50
Definition: gsm_49_031.h:40
Definition: gsm_49_031.h:104
Definition: gsm_49_031.h:158
Definition: gsm_49_031.h:49
Definition: gsm_49_031.h:48
Definition: gsm_49_031.h:130
Definition: gsm_49_031.h:89
Definition: gsm_49_031.h:135
Definition: gsm_49_031.h:98
Definition: gsm_49_031.h:148
bool lcs_qos_present
Definition: gsm_49_031.h:192
Definition: gsm_49_031.h:112
Definition: gsm_49_031.h:52
Definition: gsm_49_031.h:84
Definition: gsm_49_031.h:165
bool diag_val_present
Definition: gsm_49_031.h:59
Definition: gsm_49_031.h:38
Definition: gsm_49_031.h:121
Definition: gsm_49_031.h:134
Definition: gsm_49_031.h:142
Definition: gsm_49_031.h:128
Definition: gsm_49_031.h:64
Definition: gsm_49_031.h:139
Definition: gsm_49_031.h:116
Definition: gsm_49_031.h:90
Definition: gsm_49_031.h:113
Definition: gsm_49_031.h:107
Definition: gsm_49_031.h:115
Definition: gsm_49_031.h:110
Definition: gsm_49_031.h:103
Definition: gsm_49_031.h:83
Definition: gsm_49_031.h:99
gsm0808_cause
Definition: gsm_08_08.h:363
3GPP TS 49.031 10.13 LCS Cause, also in 3GPP TS 48.008 3.2.2.66, which simply refers to the former...
Definition: gsm_49_031.h:56
Definition: gsm_49_031.h:86
bssap_le_msg_discr
Definition: gsm_49_031.h:78
Definition: gsm_49_031.h:119
enum bssap_le_msg_discr __attribute__
Definition: gsm_49_031.h:117
bssmap_le_msgt
Definition: gsm_49_031.h:82
Definition: gsm_49_031.h:47
Definition: gsm_49_031.h:100
Definition: gsm_49_031.h:92
Definition: gsm_49_031.h:111
Definition: gsm_49_031.h:43
bool more_items2
always set this to false
Definition: gsm_49_031.h:195
bool location_estimate_present
Definition: gsm_49_031.h:199
Definition: gsm_49_031.h:147
Definition: gsm_49_031.h:79
Definition: gsm_49_031.h:140
Definition: gsm_49_031.h:152
bssmap_le_lcs_client_type
Definition: gsm_49_031.h:163
Definition: gsm_49_031.h:155
Definition: gsm_49_031.h:46
Definition: gsm_49_031.h:167
enum lcs_cause cause_val
Definition: gsm_49_031.h:58
bssmap_le_location_information
Definition: gsm_49_031.h:145
bool lcs_client_type_present
Definition: gsm_49_031.h:178
Definition: gsm_49_031.h:41
uint8_t lcs_priority
see in 3GPP TS 29.002
Definition: gsm_49_031.h:190
Definition: gsm_49_031.h:127
bool more_items
always set this to false
Definition: gsm_49_031.h:210
uint8_t diag_val
Definition: gsm_49_031.h:60
Definition: gsm_49_031.h:132
Definition: gsm_49_031.h:114
Definition: gsm_49_031.h:88
bool lcs_priority_present
Definition: gsm_49_031.h:189
Parsed representation of Cell Identifier IE (3GPP TS 48.008 3.2.2.17)
Definition: gsm0808_utils.h:53
Definition: gsm_49_031.h:123
Definition: gsm_49_031.h:153
Definition: gsm_49_031.h:170
Definition: gsm_49_031.h:168
Definition: gsm_49_031.h:174
Definition: gsm_49_031.h:171
Definition: gsm_49_031.h:122
Definition: gsm_49_031.h:97
Definition: gsm_49_031.h:141
Definition: gsm_49_031.h:44
bool more_items
set this to true iff any fields below are used
Definition: gsm_49_031.h:187
Definition: gsm_49_031.h:101
Definition: gsm_49_031.h:198
Definition: gsm_49_031.h:96
Definition: gsm_48_071.h:106
Definition: gsm_49_031.h:85