libosmogsm 1.13.1.1-afb4 Osmocom GSM library

gsm0808_utils.h
Go to the documentation of this file.
1
4/*
5 * (C) 2016 by sysmocom - s.f.m.c. GmbH, Author: Philipp Maier
6 * All Rights Reserved
7 *
8 * SPDX-License-Identifier: GPL-2.0+
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program. If not, see <http://www.gnu.org/licenses/>.
22 *
23 */
24#pragma once
25
26 struct sockaddr_storage;
27
28#include <osmocom/gsm/protocol/gsm_08_08.h>
29#include <osmocom/gsm/protocol/gsm_04_08.h>
30#include <osmocom/gsm/gsm29205.h>
31#include <osmocom/gsm/gsm23003.h>
32#include <osmocom/gsm/gsm_utils.h>
33#include <osmocom/gsm/tlv.h>
34#include <osmocom/gsm/gsm48.h>
35#include <osmocom/core/endian.h>
36
38#define GSM0808_CELL_ID_LIST2_MAXLEN 127
39
43 union gsm0808_cell_id_u {
44 struct osmo_cell_global_id global;
45 struct osmo_lac_and_ci_id lac_and_ci;
46 uint16_t ci;
47 struct osmo_location_area_id lai_and_lac;
48 uint16_t lac;
49 struct osmo_service_area_id sai;
50 /* osmocom specific: */
51 struct osmo_cell_global_id_ps global_ps;
52};
53
55 struct gsm0808_cell_id {
56 enum CELL_IDENT id_discr;
57 union gsm0808_cell_id_u id;
58};
59
61 struct gsm0808_cell_id_list2 {
62 enum CELL_IDENT id_discr;
63 union gsm0808_cell_id_u id_list[GSM0808_CELL_ID_LIST2_MAXLEN];
64 unsigned int id_list_len;
65};
66
68 struct gsm0808_priority {
69#if OSMO_IS_LITTLE_ENDIAN
70 uint8_t pvi:1, /* Preemption Vulnerability indicator */
71 qa:1, /* Queuing allowed indicator */
72 priority_level:4, /* Priority level: 1 == hightest, 14 == lowest */
73 pci:1, /* Preemption Capability indicator */
74 spare:1;
75#elif OSMO_IS_BIG_ENDIAN
76/* auto-generated from the little endian part above (libosmocore/contrib/struct_endianness.py) */
77 uint8_t spare:1, pci:1, priority_level:4, qa:1, pvi:1;
78#endif
79} __attribute__ ((packed));
80
82 struct gsm0808_vgcs_feature_flags {
83#if OSMO_IS_LITTLE_ENDIAN
84 uint8_t tp_ind:1, /* Talker priority supported */
85 as_ind_circuit:1, /* A-interface circuit sharing supported */
86 as_ind_link:1, /* A-interface link sharing supported */
87 bss_res:1, /* BSS supports re-establishment */
88 tcp:1, /* Talker channel parameter supported */
89 spare:3;
90#elif OSMO_IS_BIG_ENDIAN
91/* auto-generated from the little endian part above (libosmocore/contrib/struct_endianness.py) */
92 uint8_t spare:3, tcp:1, bss_res:1, as_ind_link:1, as_ind_circuit:1, tp_ind:1;
93#endif
94} __attribute__ ((packed));
95
96/* TS 48.008 3.2.2.52 */
97 enum gsm0808_assignment_requirement {
98 GSM0808_ASRQ_DELAY_ALLOWED = 0x00,
99 GSM0808_ASRQ_IMMEDIATE = 0x01,
100 GSM0808_ASRQ_IMMEDIATE_ON_DEMAND = 0x02,
101};
102
103/* TS 48.008 Table 10.5.8 */
104 enum gsm0808_service_flag {
105 GSM0808_SF_VBS = 0,
106 GSM0808_SF_VGCS = 1,
107};
108
109 enum gsm0808_call_priority {
110 GSM0808_CALL_PRIORITY_NONE = 0x00,
111 GSM0808_CALL_PRIORITY_LEVEL_4 = 0x01,
112 GSM0808_CALL_PRIORITY_LEVEL_3 = 0x02,
113 GSM0808_CALL_PRIORITY_LEVEL_2 = 0x03,
114 GSM0808_CALL_PRIORITY_LEVEL_1 = 0x04,
115 GSM0808_CALL_PRIORITY_LEVEL_0 = 0x05,
116 GSM0808_CALL_PRIORITY_LEVEL_B = 0x06,
117 GSM0808_CALL_PRIORITY_LEVEL_A = 0x07,
118};
119
121 struct gsm0808_group_callref {
122#if OSMO_IS_LITTLE_ENDIAN
123 uint8_t call_ref_hi[3];
124 uint8_t call_priority:3,
125 af:1, /* Acknowledgement flag */
126 sf:1, /* Service flag */
127 call_ref_lo:3;
128 uint8_t spare:4,
129 ciphering_info:4;
130#elif OSMO_IS_BIG_ENDIAN
131/* auto-generated from the little endian part above (libosmocore/contrib/struct_endianness.py) */
132 uint8_t call_ref_hi[3];
133 uint8_t call_ref_lo:3, sf:1, af:1, call_priority:3;
134 uint8_t ciphering_info:4, spare:4;
135#endif
136} __attribute__ ((packed));
137
138/* TS 48.008 3.2.2.26 */
139 enum gsm0808_downlink_dtx_flag {
140 GSM0808_DTX_FLAG_ALLOW = 0,
141 GSM0808_DTX_FLAG_FORBID = 1,
142};
143
145 struct gsm0808_cell_id_list_segment {
146 uint8_t seq_last;
147 uint8_t seq_number;
148 struct gsm0808_cell_id_list2 cil;
149};
150
152#define CIRCUIT_POOL_LIST_MAXLEN 252
153 struct gsm0808_circuit_pool_list {
154 uint8_t pool[CIRCUIT_POOL_LIST_MAXLEN];
155 unsigned int list_len;
156};
157
158/* 3GPP TS 48.008 Table 3.2.2.90.1 Talker Priority */
159 enum gsm0808_talker_priority {
160 GSM0808_TALKER_PRIORITY_NORMAL = 0x00,
161 GSM0808_TALKER_PRIORITY_PRIVILEGED = 0x01,
162 GSM0808_TALKER_PRIORITY_EMERGENCY = 0x02,
163};
164
166#define LAYER_3_INFORMATION_MAXLEN 252
167 struct gsm0808_layer_3_information {
168 uint8_t l3[LAYER_3_INFORMATION_MAXLEN];
169 unsigned int l3_len;
170};
171
173#define TALKER_IDENTITY_MAXLEN 17
174 struct gsm0808_talker_identity {
175 uint8_t talker_id[TALKER_IDENTITY_MAXLEN];
176 unsigned int id_bits;
177};
178
179/* 3GPP TS 48.008 3.2.2.94 VGCS/VBS Cell Status */
180 enum gsm0808_vgcs_vbs_cell_status {
181 GSM0808_CSTAT_ESTABLISHED = 0x00,
182 GSM0808_CSTAT_NOT_ESTABLISHED1 = 0x01,
183 GSM0808_CSTAT_RELEASED_NO_USER = 0x02,
184 GSM0808_CSTAT_NOT_ESTABLISHED2 = 0x03,
185};
186
188#define SMS_TO_VGCS_MAXLEN 252
189 struct gsm0808_sms_to_vgcs {
190 uint8_t sms[SMS_TO_VGCS_MAXLEN];
191 unsigned int sms_len;
192};
193
195#define APP_DATA_MAXLEN 9
196 struct gsm0808_application_data {
197 uint8_t data[APP_DATA_MAXLEN];
198 unsigned int data_len;
199};
200
202 enum gsm0808_application_idndicator {
203 GSM0808_AI_APP_DATA = 0x00,
204 GSM0808_AI_CONFIRM_APP_DATA = 0x01,
205};
206
207#define GSM0808_DP_MASK_TALKERS_LISTENERS 0x04
208#define GSM0808_DP_MASK_DISPATCHERS 0x02
209#define GSM0808_DP_MASK_NETWORK_APP 0x01
210
211 struct gsm0808_data_identity {
212#if OSMO_IS_LITTLE_ENDIAN
213 uint8_t ai:1, /* Application Indicator */
214 di:4, /* Data identifier */
215 dp:3; /* Distribution parameter (bit mask) */
216#elif OSMO_IS_BIG_ENDIAN
217/* auto-generated from the little endian part above (libosmocore/contrib/struct_endianness.py) */
218 uint8_t dp:3, di:4, ai:1;
219#endif
220} __attribute__ ((packed));
221
223#define MSISDN_MAXLEN 20
224
226 struct osmo_lcls {
227 enum gsm0808_lcls_config config;
228 enum gsm0808_lcls_control control;
229 struct osmo_gcr_parsed gcr;
230 bool gcr_available;
231 bool corr_needed;
232};
233
234 char *osmo_lcls_dump(const struct osmo_lcls *lcls);
235 char *osmo_lcls_dump_buf(char *buf, size_t buf_len, const struct osmo_lcls *lcls);
236 char *osmo_lcls_dump_c(void *ctx, const struct osmo_lcls *lcls);
237 char *osmo_gcr_dump(const struct osmo_lcls *lcls);
238 char *osmo_gcr_dump_buf(char *buf, size_t buf_len, const struct osmo_lcls *lcls);
239
240 extern const struct value_string gsm0808_cell_id_discr_names[];
241 static inline const char *gsm0808_cell_id_discr_name(enum CELL_IDENT id_discr)
242{ return get_value_string(gsm0808_cell_id_discr_names, id_discr); }
243
244 const char *gsm0808_cell_id_name(const struct gsm0808_cell_id *cid);
245 const char *gsm0808_cell_id_name2(const struct gsm0808_cell_id *cid);
246 char *gsm0808_cell_id_name_buf(char *buf, size_t buflen, const struct gsm0808_cell_id *cid);
247 char *gsm0808_cell_id_name_c(const void *ctx, const struct gsm0808_cell_id *cid);
248 const char *gsm0808_cell_id_list_name(const struct gsm0808_cell_id_list2 *cil);
249 int gsm0808_cell_id_list_name_buf(char *buf, size_t buflen, const struct gsm0808_cell_id_list2 *cil);
250 char *gsm0808_cell_id_list_name_c(const void *ctx, const struct gsm0808_cell_id_list2 *cil);
251 int gsm0808_cell_id_u_name(char *buf, size_t buflen,
252 enum CELL_IDENT id_discr, const union gsm0808_cell_id_u *u);
253 bool gsm0808_cell_ids_match(const struct gsm0808_cell_id *id1, const struct gsm0808_cell_id *id2, bool exact_match);
254 int gsm0808_cell_id_matches_list(const struct gsm0808_cell_id *id, const struct gsm0808_cell_id_list2 *list,
255 unsigned int match_nr, bool exact_match);
256 void gsm0808_cell_id_from_cgi(struct gsm0808_cell_id *cid, enum CELL_IDENT id_discr,
257 const struct osmo_cell_global_id *cgi);
258 int gsm0808_cell_id_to_cgi(struct osmo_cell_global_id *cgi, const struct gsm0808_cell_id *cid);
259 void gsm0808_msgb_put_cell_id_u(struct msgb *msg, enum CELL_IDENT id_discr, const union gsm0808_cell_id_u *u);
260 int gsm0808_decode_cell_id_u(union gsm0808_cell_id_u *out, enum CELL_IDENT discr, const uint8_t *buf, unsigned int len);
261 int gsm0808_cell_id_size(enum CELL_IDENT discr);
262
263uint8_t gsm0808_enc_cause(struct msgb *msg, uint16_t cause);
264uint8_t gsm0808_enc_aoip_trasp_addr(struct msgb *msg,
265 const struct sockaddr_storage *ss);
266 int gsm0808_dec_aoip_trasp_addr(struct sockaddr_storage *ss,
267 const uint8_t *elem, uint8_t len);
268 int gsm0808_dec_osmux_cid(uint8_t *cid, const uint8_t *elem, uint8_t len);
269
270uint8_t gsm0808_enc_lcls(struct msgb *msg, const struct osmo_lcls *lcls);
271 int gsm0808_dec_lcls(struct osmo_lcls *lcls, const struct tlv_parsed *tp);
272
273uint8_t gsm0808_enc_speech_codec(struct msgb *msg,
274 const struct gsm0808_speech_codec *sc)
275 OSMO_DEPRECATED("use gsm0808_enc_speech_codec2() instead");
276 int gsm0808_enc_speech_codec2(struct msgb *msg,
277 const struct gsm0808_speech_codec *sc);
278 int gsm0808_dec_speech_codec(struct gsm0808_speech_codec *sc,
279 const uint8_t *elem, uint8_t len);
280uint8_t gsm0808_enc_speech_codec_list(struct msgb *msg,
281 const struct gsm0808_speech_codec_list *scl)
282 OSMO_DEPRECATED("use gsm0808_enc_speech_codec_list2() instead");
283 int gsm0808_enc_speech_codec_list2(struct msgb *msg,
284 const struct gsm0808_speech_codec_list *scl);
285 int gsm0808_dec_speech_codec_list(struct gsm0808_speech_codec_list *scl,
286 const uint8_t *elem, uint8_t len);
287uint8_t gsm0808_enc_channel_type(struct msgb *msg,
288 const struct gsm0808_channel_type *ct);
289 int gsm0808_dec_channel_type(struct gsm0808_channel_type *ct,
290 const uint8_t *elem, uint8_t len);
291uint8_t gsm0808_enc_encrypt_info(struct msgb *msg,
292 const struct gsm0808_encrypt_info *ei);
293 int gsm0808_dec_encrypt_info(struct gsm0808_encrypt_info *ei,
294 const uint8_t *elem, uint8_t len);
295 int gsm0808_enc_kc128(struct msgb *msg, const uint8_t *kc128);
296 int gsm0808_dec_kc128(uint8_t *kc128, const uint8_t *elem, uint8_t len);
297uint8_t gsm0808_enc_cell_id_list2(struct msgb *msg, const struct gsm0808_cell_id_list2 *cil);
298uint8_t gsm0808_enc_cell_id_list(struct msgb *msg,
299 const struct gsm0808_cell_id_list *cil)
300 OSMO_DEPRECATED("use gsm0808_enc_cell_id_list2 instead");
301 int gsm0808_dec_cell_id_list2(struct gsm0808_cell_id_list2 *cil, const uint8_t *elem, uint8_t len);
302 int gsm0808_dec_cell_id_list(struct gsm0808_cell_id_list *cil,
303 const uint8_t *elem, uint8_t len)
304 OSMO_DEPRECATED("use gsm0808_dec_cell_id_list2 instead");
305 int gsm0808_cell_id_list_add(struct gsm0808_cell_id_list2 *dst, const struct gsm0808_cell_id_list2 *src);
306 void gsm0808_cell_id_to_list(struct gsm0808_cell_id_list2 *dst, const struct gsm0808_cell_id *src);
307uint8_t gsm0808_enc_cell_id(struct msgb *msg, const struct gsm0808_cell_id *ci);
308 int gsm0808_dec_cell_id(struct gsm0808_cell_id *ci, const uint8_t *elem, uint8_t len);
309 int gsm0808_chan_type_to_speech_codec(uint8_t perm_spch);
310 int gsm0808_speech_codec_from_chan_type(struct gsm0808_speech_codec *sc,
311 uint8_t perm_spch);
312uint16_t gsm0808_sc_cfg_from_gsm48_mr_cfg(const struct gsm48_multi_rate_conf *cfg, bool fr);
313 int gsm48_mr_cfg_from_gsm0808_sc_cfg(struct gsm48_multi_rate_conf *cfg, uint16_t s15_s0);
314
316 static inline enum gsm0808_cause_class gsm0808_cause_class(enum gsm0808_cause cause)
317{
318 return (cause >> 4) & 0x7;
319}
320
322 static inline bool gsm0808_cause_ext(enum gsm0808_cause cause)
323{
324 /* check that cause looks like 1XXX0000 where XXX represent class */
325 return (cause & 0x80) && !(cause & 0x0F);
326}
327
328 int gsm0808_get_cipher_reject_cause(const struct tlv_parsed *tp)
329 OSMO_DEPRECATED("Use gsm0808_get_cause() instead");
330
332 static inline uint8_t gsm0808_current_channel_type_1(enum gsm_chan_t type)
333{
334 switch (type) {
335 default:
336 return 0;
337 case GSM_LCHAN_SDCCH:
338 return 0x01;
339 case GSM_LCHAN_TCH_F:
340 return 0x18;
341 case GSM_LCHAN_TCH_H:
342 return 0x19;
343 }
344}
345
348 static inline enum gsm0808_permitted_speech gsm0808_permitted_speech(enum gsm_chan_t type,
349 enum gsm48_chan_mode mode)
350{
351#define MODE_TYPE(mode, type) ((mode << 16) | type)
352
353 switch (MODE_TYPE(mode, type)) {
354 case MODE_TYPE(GSM48_CMODE_SPEECH_V1, GSM_LCHAN_TCH_F):
355 return GSM0808_PERM_FR1;
356 case MODE_TYPE(GSM48_CMODE_SPEECH_V1, GSM_LCHAN_TCH_H):
357 return GSM0808_PERM_HR1;
358 case MODE_TYPE(GSM48_CMODE_SPEECH_EFR, GSM_LCHAN_TCH_F):
359 return GSM0808_PERM_FR2;
360 case MODE_TYPE(GSM48_CMODE_SPEECH_EFR, GSM_LCHAN_TCH_H):
361 return GSM0808_PERM_HR2; /* (deprecated) */
362 case MODE_TYPE(GSM48_CMODE_SPEECH_AMR, GSM_LCHAN_TCH_F):
363 return GSM0808_PERM_FR3;
364 case MODE_TYPE(GSM48_CMODE_SPEECH_AMR, GSM_LCHAN_TCH_H):
365 return GSM0808_PERM_HR3;
366 case MODE_TYPE(GSM48_CMODE_SPEECH_V4, GSM_LCHAN_TCH_F):
367 return GSM0808_PERM_FR4;
368 case MODE_TYPE(GSM48_CMODE_SPEECH_V4, GSM_LCHAN_TCH_H):
369 return GSM0808_PERM_HR4;
370 case MODE_TYPE(GSM48_CMODE_SPEECH_V5, GSM_LCHAN_TCH_F):
371 return GSM0808_PERM_FR5; /* FR only */
372 case MODE_TYPE(GSM48_CMODE_SPEECH_V6, GSM_LCHAN_TCH_H):
373 return GSM0808_PERM_HR6; /* HR only */
374 default:
375 return 0;
376 }
377
378#undef MODE_TYPE
379}
380
382 static inline uint8_t gsm0808_chosen_channel(enum gsm_chan_t type, enum gsm48_chan_mode mode)
383{
384 uint8_t channel_mode = 0, channel = 0;
385
386 switch (mode) {
387 case GSM48_CMODE_SPEECH_V1:
388 case GSM48_CMODE_SPEECH_EFR:
389 case GSM48_CMODE_SPEECH_AMR:
390 case GSM48_CMODE_SPEECH_V4:
391 case GSM48_CMODE_SPEECH_V5:
392 case GSM48_CMODE_SPEECH_V6:
393 channel_mode = 0x9;
394 break;
395 case GSM48_CMODE_SIGN:
396 channel_mode = 0x8;
397 break;
398 case GSM48_CMODE_DATA_14k5:
399 channel_mode = 0xe;
400 break;
401 case GSM48_CMODE_DATA_12k0:
402 channel_mode = 0xb;
403 break;
404 case GSM48_CMODE_DATA_6k0:
405 channel_mode = 0xc;
406 break;
407 case GSM48_CMODE_DATA_3k6:
408 channel_mode = 0xd;
409 break;
410 case GSM48_CMODE_DATA_29k0:
411 channel_mode = 0x1;
412 break;
413 case GSM48_CMODE_DATA_32k0:
414 channel_mode = 0x2;
415 break;
416 case GSM48_CMODE_DATA_43k5:
417 channel_mode = 0x3;
418 break;
419 case GSM48_CMODE_DATA_43k5_14k5:
420 channel_mode = 0x4;
421 break;
422 case GSM48_CMODE_DATA_29k0_14k5:
423 channel_mode = 0x5;
424 break;
425 case GSM48_CMODE_DATA_43k5_29k0:
426 channel_mode = 0x6;
427 break;
428 case GSM48_CMODE_DATA_14k5_43k5:
429 channel_mode = 0x7;
430 break;
431 case GSM48_CMODE_DATA_14k5_29k0:
432 channel_mode = 0xa;
433 break;
434 case GSM48_CMODE_DATA_29k0_43k5:
435 channel_mode = 0xf;
436 break;
437 default:
438 return 0;
439 }
440
441 switch (type) {
442 case GSM_LCHAN_NONE:
443 channel = 0x0;
444 break;
445 case GSM_LCHAN_SDCCH:
446 channel = 0x1;
447 break;
448 case GSM_LCHAN_TCH_F:
449 channel = 0x8;
450 break;
451 case GSM_LCHAN_TCH_H:
452 channel = 0x9;
453 break;
454 /* TODO: more than 1 TCHs? */
455 default:
456 return 0;
457 }
458
459 return channel_mode << 4 | channel;
460}
461
462 const char *gsm0808_channel_type_name(const struct gsm0808_channel_type *ct);
463 char *gsm0808_channel_type_name_buf(char *buf, size_t buf_len, const struct gsm0808_channel_type *ct);
464 char *gsm0808_channel_type_name_c(const void *ctx, const struct gsm0808_channel_type *ct);
465
466uint8_t gsm0808_enc_group_callref(struct msgb *msg, const struct gsm0808_group_callref *gc);
467 int gsm0808_dec_group_callref(struct gsm0808_group_callref *gc, const uint8_t *elem, uint8_t len);
468uint8_t gsm0808_enc_priority(struct msgb *msg, const struct gsm0808_priority *pri);
469 int gsm0808_dec_priority(struct gsm0808_priority *pri, const uint8_t *elem, uint8_t len);
470uint8_t gsm0808_enc_vgcs_feature_flags(struct msgb *msg, const struct gsm0808_vgcs_feature_flags *ff);
471 int gsm0808_dec_vgcs_feature_flags(struct gsm0808_vgcs_feature_flags *ff, const uint8_t *elem, uint8_t len);
472uint8_t gsm0808_enc_talker_identity(struct msgb *msg, const struct gsm0808_talker_identity *ti);
473 int gsm0808_dec_talker_identity(struct gsm0808_talker_identity *ti, const uint8_t *elem, uint8_t len);
474uint8_t gsm0808_enc_data_identity(struct msgb *msg, const struct gsm0808_data_identity *ai);
475 int gsm0808_dec_data_identity(struct gsm0808_data_identity *ai, const uint8_t *elem, uint8_t len);
476uint8_t gsm0808_enc_msisdn(struct msgb *msg, const char *msisdn);
477 int gsm0808_dec_msisdn(char *msisdn, const char *elem, uint8_t len);
478uint8_t gsm0808_enc_assign_req(struct msgb *msg, const enum gsm0808_assignment_requirement ar);
479 int gsm0808_dec_assign_req(enum gsm0808_assignment_requirement *ar, const uint8_t *elem, uint8_t len);
480uint8_t gsm0808_enc_cell_id_list_segment(struct msgb *msg, uint8_t ie_type,
481 const struct gsm0808_cell_id_list_segment *ci);
482 int gsm0808_dec_cell_id_list_segment(struct gsm0808_cell_id_list_segment *ci, const uint8_t *elem, uint8_t len);
483 int gsm0808_dec_call_id(uint32_t *ci, const uint8_t *elem, uint8_t len);
484
endian.h
gsm0808_channel_type_name
const char * gsm0808_channel_type_name(const struct gsm0808_channel_type *ct)
Definition: gsm0808_utils.c:2184
__attribute__
enum gsm0808_assignment_requirement __attribute__
gsm0808_dec_group_callref
int gsm0808_dec_group_callref(struct gsm0808_group_callref *gc, const uint8_t *elem, uint8_t len)
Decode Group Call Reference IE (3GPP TS 48.008 3.2.2.55).
Definition: gsm0808_utils.c:2225
gsm0808_dec_speech_codec_list
int gsm0808_dec_speech_codec_list(struct gsm0808_speech_codec_list *scl, const uint8_t *elem, uint8_t len)
Decode TS 08.08 Speech Codec list IE.
Definition: gsm0808_utils.c:455
gsm0808_enc_cell_id_list_segment
uint8_t gsm0808_enc_cell_id_list_segment(struct msgb *msg, uint8_t ie_type, const struct gsm0808_cell_id_list_segment *ci)
Encode Cell Identifier List Segment IE (3GPP TS 48.008 3.2.2.27a).
Definition: gsm0808_utils.c:2493
gsm0808_dec_cell_id_list
int gsm0808_dec_cell_id_list(struct gsm0808_cell_id_list *cil, const uint8_t *elem, uint8_t len) OSMO_DEPRECATED("use gsm0808_dec_cell_id_list2 instead")
DEPRECATED: Use gsm0808_dec_cell_id_list2 instead.
Definition: gsm0808_utils.c:1371
gsm0808_enc_cause
uint8_t gsm0808_enc_cause(struct msgb *msg, uint16_t cause)
gsm0808_dec_channel_type
int gsm0808_dec_channel_type(struct gsm0808_channel_type *ct, const uint8_t *elem, uint8_t len)
Decode TS 08.08 Channel Type IE.
Definition: gsm0808_utils.c:559
gsm0808_dec_assign_req
int gsm0808_dec_assign_req(enum gsm0808_assignment_requirement *ar, const uint8_t *elem, uint8_t len)
Decode Assignment Requirements IE (3GPP TS 48.008 3.2.2.52).
Definition: gsm0808_utils.c:2475
gsm0808_msgb_put_cell_id_u
void gsm0808_msgb_put_cell_id_u(struct msgb *msg, enum CELL_IDENT id_discr, const union gsm0808_cell_id_u *u)
Definition: gsm0808_utils.c:1023
gsm0808_dec_cell_id_list_segment
int gsm0808_dec_cell_id_list_segment(struct gsm0808_cell_id_list_segment *ci, const uint8_t *elem, uint8_t len)
Decode Cell Identifier List Segment IE (3GPP TS 48.008 3.2.2.27a).
Definition: gsm0808_utils.c:2522
gsm0808_enc_speech_codec2
int gsm0808_enc_speech_codec2(struct msgb *msg, const struct gsm0808_speech_codec *sc)
Encode TS 08.08 Speech Codec IE.
Definition: gsm0808_utils.c:296
gsm0808_sc_cfg_from_gsm48_mr_cfg
uint16_t gsm0808_sc_cfg_from_gsm48_mr_cfg(const struct gsm48_multi_rate_conf *cfg, bool fr)
Determine a set of AMR speech codec configuration bits (S0-S15) from a given GSM 04....
Definition: gsm0808_utils.c:1665
gsm0808_chan_type_to_speech_codec
int gsm0808_chan_type_to_speech_codec(uint8_t perm_spch)
Convert the representation of the permitted speech codec identifier that is used in struct gsm0808_ch...
Definition: gsm0808_utils.c:1574
gsm0808_cell_id_list_name_c
char * gsm0808_cell_id_list_name_c(const void *ctx, const struct gsm0808_cell_id_list2 *cil)
Definition: gsm0808_utils.c:2167
gsm0808_cell_id_name
const char * gsm0808_cell_id_name(const struct gsm0808_cell_id *cid)
Return a human readable representation of a Cell Identifier, like "LAC:123" or "CGI:001-01-42-23".
Definition: gsm0808_utils.c:2092
gsm0808_get_cipher_reject_cause
int gsm0808_get_cipher_reject_cause(const struct tlv_parsed *tp) OSMO_DEPRECATED("Use gsm0808_get_cause() instead")
Definition: gsm0808_utils.c:1806
gsm0808_dec_cell_id_list2
int gsm0808_dec_cell_id_list2(struct gsm0808_cell_id_list2 *cil, const uint8_t *elem, uint8_t len)
Decode Cell Identifier List IE.
Definition: gsm0808_utils.c:1304
gsm0808_cause_ext
static bool gsm0808_cause_ext(enum gsm0808_cause cause)
Definition: gsm0808_utils.h:322
gsm0808_enc_cell_id
uint8_t gsm0808_enc_cell_id(struct msgb *msg, const struct gsm0808_cell_id *ci)
Encode Cell Identifier IE (3GPP TS 48.008 3.2.2.17).
Definition: gsm0808_utils.c:1525
osmo_gcr_dump_buf
char * osmo_gcr_dump_buf(char *buf, size_t buf_len, const struct osmo_lcls *lcls)
Dump GCR struct into string for printing.
Definition: gsm0808_utils.c:760
gsm0808_call_priority
gsm0808_call_priority
Definition: gsm0808_utils.h:109
gsm48_mr_cfg_from_gsm0808_sc_cfg
int gsm48_mr_cfg_from_gsm0808_sc_cfg(struct gsm48_multi_rate_conf *cfg, uint16_t s15_s0)
Determine a GSM 04.08 AMR configuration struct from a set of speech codec configuration bits (S0-S15)
Definition: gsm0808_utils.c:1718
APP_DATA_MAXLEN
#define APP_DATA_MAXLEN
Parsed representation of a Application Data IE (3GPP TS 48.008 3.2.2.98)
Definition: gsm0808_utils.h:195
gsm0808_dec_vgcs_feature_flags
int gsm0808_dec_vgcs_feature_flags(struct gsm0808_vgcs_feature_flags *ff, const uint8_t *elem, uint8_t len)
Decode VGCS Feature Flags IE (3GPP TS 48.008 3.2.2.88).
Definition: gsm0808_utils.c:2305
gsm0808_cell_id_u_name
int gsm0808_cell_id_u_name(char *buf, size_t buflen, enum CELL_IDENT id_discr, const union gsm0808_cell_id_u *u)
Print a human readable name of the cell identifier to the char buffer.
Definition: gsm0808_utils.c:1821
osmo_lcls_dump_c
char * osmo_lcls_dump_c(void *ctx, const struct osmo_lcls *lcls)
Definition: gsm0808_utils.c:747
gsm0808_cell_id_matches_list
int gsm0808_cell_id_matches_list(const struct gsm0808_cell_id *id, const struct gsm0808_cell_id_list2 *list, unsigned int match_nr, bool exact_match)
Find an index in a Cell Identifier list that matches a given single Cell Identifer.
Definition: gsm0808_utils.c:1936
gsm0808_application_idndicator
gsm0808_application_idndicator
Packed representation of a Data Identity IE (GGPP TS 48.008 3.2.2.99)
Definition: gsm0808_utils.h:202
gsm0808_dec_msisdn
int gsm0808_dec_msisdn(char *msisdn, const char *elem, uint8_t len)
Decode MSISDN IE (3GPP TS 48.008 3.2.2.101).
Definition: gsm0808_utils.c:2389
gsm0808_dec_talker_identity
int gsm0808_dec_talker_identity(struct gsm0808_talker_identity *ti, const uint8_t *elem, uint8_t len)
Decode Talker Identity IE (3GPP TS 48.008 3.2.2.91).
Definition: gsm0808_utils.c:2434
gsm0808_cause_class
static enum gsm0808_cause_class gsm0808_cause_class(enum gsm0808_cause cause)
Definition: gsm0808_utils.h:316
gsm0808_cell_ids_match
bool gsm0808_cell_ids_match(const struct gsm0808_cell_id *id1, const struct gsm0808_cell_id *id2, bool exact_match)
Return true if the common information between the two Cell Identifiers match.
Definition: gsm0808_utils.c:1919
gsm0808_dec_call_id
int gsm0808_dec_call_id(uint32_t *ci, const uint8_t *elem, uint8_t len)
Decode Call Identifier IE (3GPP TS 48.008 3.2.2.105).
Definition: gsm0808_utils.c:2547
gsm0808_vgcs_vbs_cell_status
gsm0808_vgcs_vbs_cell_status
Definition: gsm0808_utils.h:180
gsm0808_dec_kc128
int gsm0808_dec_kc128(uint8_t *kc128, const uint8_t *elem, uint8_t len)
Decode TS 48.008 Kc128 IE.
Definition: gsm0808_utils.c:879
gsm0808_decode_cell_id_u
int gsm0808_decode_cell_id_u(union gsm0808_cell_id_u *out, enum CELL_IDENT discr, const uint8_t *buf, unsigned int len)
Decode a single GSM 08.08 Cell ID list element payload.
Definition: gsm0808_utils.c:968
gsm0808_enc_cell_id_list
uint8_t gsm0808_enc_cell_id_list(struct msgb *msg, const struct gsm0808_cell_id_list *cil) OSMO_DEPRECATED("use gsm0808_enc_cell_id_list2 instead")
DEPRECATED: Use gsm0808_enc_cell_id_list2 instead.
Definition: gsm0808_utils.c:1129
gsm0808_talker_priority
gsm0808_talker_priority
Definition: gsm0808_utils.h:159
gsm0808_enc_group_callref
uint8_t gsm0808_enc_group_callref(struct msgb *msg, const struct gsm0808_group_callref *gc)
Encode Group Call Reference IE (3GPP TS 48.008 3.2.2.55).
Definition: gsm0808_utils.c:2202
gsm0808_channel_type_name_c
char * gsm0808_channel_type_name_c(const void *ctx, const struct gsm0808_channel_type *ct)
Definition: gsm0808_utils.c:2190
gsm0808_cell_id_name_c
char * gsm0808_cell_id_name_c(const void *ctx, const struct gsm0808_cell_id *cid)
Definition: gsm0808_utils.c:2108
gsm0808_cell_id_discr_name
static const char * gsm0808_cell_id_discr_name(enum CELL_IDENT id_discr)
Definition: gsm0808_utils.h:241
gsm0808_enc_lcls
uint8_t gsm0808_enc_lcls(struct msgb *msg, const struct osmo_lcls *lcls)
Add LCLS parameters to a given msgb, 3GPP TS 48.008 §3.2.2.115 - 3.2.2.120.
Definition: gsm0808_utils.c:672
gsm0808_current_channel_type_1
static uint8_t gsm0808_current_channel_type_1(enum gsm_chan_t type)
Definition: gsm0808_utils.h:332
gsm0808_dec_encrypt_info
int gsm0808_dec_encrypt_info(struct gsm0808_encrypt_info *ei, const uint8_t *elem, uint8_t len)
Decode TS 08.08 Encryption Information IE.
Definition: gsm0808_utils.c:828
gsm0808_cell_id_to_list
void gsm0808_cell_id_to_list(struct gsm0808_cell_id_list2 *dst, const struct gsm0808_cell_id *src)
Convert a single Cell Identifier to a Cell Identifier List with one entry.
Definition: gsm0808_utils.c:1494
gsm0808_enc_priority
uint8_t gsm0808_enc_priority(struct msgb *msg, const struct gsm0808_priority *pri)
Encode Priority IE (3GPP TS 48.008 3.2.2.18).
Definition: gsm0808_utils.c:2242
gsm0808_enc_speech_codec_list2
int gsm0808_enc_speech_codec_list2(struct msgb *msg, const struct gsm0808_speech_codec_list *scl)
Encode TS 08.08 Speech Codec list.
Definition: gsm0808_utils.c:411
GSM0808_CELL_ID_LIST2_MAXLEN
#define GSM0808_CELL_ID_LIST2_MAXLEN
(225-1)/2 is the maximum number of elements in a cell identifier list.
Definition: gsm0808_utils.h:38
gsm0808_dec_lcls
int gsm0808_dec_lcls(struct osmo_lcls *lcls, const struct tlv_parsed *tp)
Decode LCLS parameters to a given msgb, 3GPP TS 48.008 §3.2.2.115 - 3.2.2.120.
Definition: gsm0808_utils.c:705
gsm0808_dec_osmux_cid
int gsm0808_dec_osmux_cid(uint8_t *cid, const uint8_t *elem, uint8_t len)
gsm0808_enc_encrypt_info
uint8_t gsm0808_enc_encrypt_info(struct msgb *msg, const struct gsm0808_encrypt_info *ei)
Encode TS 08.08 Encryption Information IE.
Definition: gsm0808_utils.c:789
gsm0808_enc_data_identity
uint8_t gsm0808_enc_data_identity(struct msgb *msg, const struct gsm0808_data_identity *ai)
Encode Data Identity IE (3GPP TS 48.008 3.2.2.99).
Definition: gsm0808_utils.c:2322
gsm0808_enc_aoip_trasp_addr
uint8_t gsm0808_enc_aoip_trasp_addr(struct msgb *msg, const struct sockaddr_storage *ss)
gsm0808_dec_data_identity
int gsm0808_dec_data_identity(struct gsm0808_data_identity *ai, const uint8_t *elem, uint8_t len)
Decode Data Identity IE (3GPP TS 48.008 3.2.2.99).
Definition: gsm0808_utils.c:2345
gsm0808_dec_aoip_trasp_addr
int gsm0808_dec_aoip_trasp_addr(struct sockaddr_storage *ss, const uint8_t *elem, uint8_t len)
gsm0808_enc_cell_id_list2
uint8_t gsm0808_enc_cell_id_list2(struct msgb *msg, const struct gsm0808_cell_id_list2 *cil)
Encode TS 08.08 Cell Identifier List IE.
Definition: gsm0808_utils.c:1087
gsm0808_cell_id_list_add
int gsm0808_cell_id_list_add(struct gsm0808_cell_id_list2 *dst, const struct gsm0808_cell_id_list2 *src)
Append entries from one Cell Identifier List to another.
Definition: gsm0808_utils.c:1457
gsm0808_cell_id_list_name
const char * gsm0808_cell_id_list_name(const struct gsm0808_cell_id_list2 *cil)
Return a human-readable representation of cil in a static buffer.
Definition: gsm0808_utils.c:2160
gsm0808_cell_id_name_buf
char * gsm0808_cell_id_name_buf(char *buf, size_t buflen, const struct gsm0808_cell_id *cid)
Definition: gsm0808_utils.c:2078
gsm0808_enc_msisdn
uint8_t gsm0808_enc_msisdn(struct msgb *msg, const char *msisdn)
Encode MSISDN IE (3GPP TS 48.008 3.2.2.101).
Definition: gsm0808_utils.c:2362
osmo_lcls_dump
char * osmo_lcls_dump(const struct osmo_lcls *lcls)
Dump LCLS parameters (GCR excluded) into static string buffer for printing.
Definition: gsm0808_utils.c:742
gsm0808_service_flag
gsm0808_service_flag
Definition: gsm0808_utils.h:104
gsm0808_cell_id_size
int gsm0808_cell_id_size(enum CELL_IDENT discr)
Definition: gsm0808_utils.c:938
gsm0808_permitted_speech
static enum gsm0808_permitted_speech gsm0808_permitted_speech(enum gsm_chan_t type, enum gsm48_chan_mode mode)
Return 3GPP TS 48.008 3.2.2.51 Speech Version aka permitted speech version indication in 3....
Definition: gsm0808_utils.h:348
TALKER_IDENTITY_MAXLEN
#define TALKER_IDENTITY_MAXLEN
Parsed representation of a Talker Identity IE (3GPP TS 48.008 3.2.2.91)
Definition: gsm0808_utils.h:173
gsm0808_cell_id_list_name_buf
int gsm0808_cell_id_list_name_buf(char *buf, size_t buflen, const struct gsm0808_cell_id_list2 *cil)
Return a human readable representation of the Cell Identifier List, like "LAC[2]:{123,...
Definition: gsm0808_utils.c:2128
LAYER_3_INFORMATION_MAXLEN
#define LAYER_3_INFORMATION_MAXLEN
Parsed representation of a Layer 3 Information IE (3GPP TS 48.008 3.2.2.24)
Definition: gsm0808_utils.h:166
gsm0808_dec_cell_id
int gsm0808_dec_cell_id(struct gsm0808_cell_id *ci, const uint8_t *elem, uint8_t len)
Decode Cell Identifier IE (3GPP TS 48.008 3.2.2.17).
Definition: gsm0808_utils.c:1550
gsm0808_speech_codec_from_chan_type
int gsm0808_speech_codec_from_chan_type(struct gsm0808_speech_codec *sc, uint8_t perm_spch)
Extrapolate a speech codec field from a given permitted speech parameter (channel type).
Definition: gsm0808_utils.c:1612
gsm0808_enc_speech_codec
uint8_t gsm0808_enc_speech_codec(struct msgb *msg, const struct gsm0808_speech_codec *sc) OSMO_DEPRECATED("use gsm0808_enc_speech_codec2() instead")
Deprecated: gsm0808_enc_speech_codec2() wrapper for backwards compatibility.
Definition: gsm0808_utils.c:316
gsm0808_enc_speech_codec_list
uint8_t gsm0808_enc_speech_codec_list(struct msgb *msg, const struct gsm0808_speech_codec_list *scl) OSMO_DEPRECATED("use gsm0808_enc_speech_codec_list2() instead")
Deprecated: gsm0808_enc_speech_codec_list2() wrapper for backwards compatibility.
Definition: gsm0808_utils.c:439
gsm0808_cell_id_discr_names
const struct value_string gsm0808_cell_id_discr_names[]
value_string[] for enum CELL_IDENT.
Definition: gsm0808_utils.c:2062
gsm0808_enc_vgcs_feature_flags
uint8_t gsm0808_enc_vgcs_feature_flags(struct msgb *msg, const struct gsm0808_vgcs_feature_flags *ff)
Encode VGCS Feature Flags IE (3GPP TS 48.008 3.2.2.88).
Definition: gsm0808_utils.c:2282
gsm0808_enc_talker_identity
uint8_t gsm0808_enc_talker_identity(struct msgb *msg, const struct gsm0808_talker_identity *ti)
Encode Talker Identity IE (3GPP TS 48.008 3.2.2.91).
Definition: gsm0808_utils.c:2406
gsm0808_channel_type_name_buf
char * gsm0808_channel_type_name_buf(char *buf, size_t buf_len, const struct gsm0808_channel_type *ct)
Definition: gsm0808_utils.c:2176
gsm0808_dec_speech_codec
int gsm0808_dec_speech_codec(struct gsm0808_speech_codec *sc, const uint8_t *elem, uint8_t len)
Decode TS 08.08 Speech Codec IE.
Definition: gsm0808_utils.c:332
gsm0808_downlink_dtx_flag
gsm0808_downlink_dtx_flag
Definition: gsm0808_utils.h:139
osmo_lcls_dump_buf
char * osmo_lcls_dump_buf(char *buf, size_t buf_len, const struct osmo_lcls *lcls)
Dump LCLS parameters (GCR excluded) into string for printing.
Definition: gsm0808_utils.c:724
gsm0808_assignment_requirement
gsm0808_assignment_requirement
Definition: gsm0808_utils.h:97
gsm0808_chosen_channel
static uint8_t gsm0808_chosen_channel(enum gsm_chan_t type, enum gsm48_chan_mode mode)
Return 3GPP TS 48.008 3.2.2.33 Chosen Channel.
Definition: gsm0808_utils.h:382
gsm0808_enc_assign_req
uint8_t gsm0808_enc_assign_req(struct msgb *msg, const enum gsm0808_assignment_requirement ar)
Encode Assignment Requirements IE (3GPP TS 48.008 3.2.2.52).
Definition: gsm0808_utils.c:2456
gsm0808_cell_id_to_cgi
int gsm0808_cell_id_to_cgi(struct osmo_cell_global_id *cgi, const struct gsm0808_cell_id *cid)
Overwrite parts of cgi with values from a Cell Identifier.
Definition: gsm0808_utils.c:2018
gsm0808_cell_id_name2
const char * gsm0808_cell_id_name2(const struct gsm0808_cell_id *cid)
Like gsm0808_cell_id_name() but uses a different static buffer.
Definition: gsm0808_utils.c:2102
SMS_TO_VGCS_MAXLEN
#define SMS_TO_VGCS_MAXLEN
Parsed representation of a SMS to VGCS IE (3GPP TS 48.008 3.2.2.92)
Definition: gsm0808_utils.h:188
CIRCUIT_POOL_LIST_MAXLEN
#define CIRCUIT_POOL_LIST_MAXLEN
Parsed representation of a Circuit Pool List IE (3GPP TS 48.008 3.2.2.26)
Definition: gsm0808_utils.h:152
osmo_gcr_dump
char * osmo_gcr_dump(const struct osmo_lcls *lcls)
Dump GCR struct into static string buffer for printing.
Definition: gsm0808_utils.c:779
gsm0808_cell_id_from_cgi
void gsm0808_cell_id_from_cgi(struct gsm0808_cell_id *cid, enum CELL_IDENT id_discr, const struct osmo_cell_global_id *cgi)
Copy information from a CGI to form a Cell Identifier of the specified kind.
Definition: gsm0808_utils.c:1956
gsm0808_enc_kc128
int gsm0808_enc_kc128(struct msgb *msg, const uint8_t *kc128)
Encode TS 48.008 Kc128 IE.
Definition: gsm0808_utils.c:867
gsm0808_dec_priority
int gsm0808_dec_priority(struct gsm0808_priority *pri, const uint8_t *elem, uint8_t len)
Decode Priority IE (3GPP TS 48.008 3.2.2.18).
Definition: gsm0808_utils.c:2265
gsm0808_enc_channel_type
uint8_t gsm0808_enc_channel_type(struct msgb *msg, const struct gsm0808_channel_type *ct)
Encode TS 08.08 Channel Type IE.
Definition: gsm0808_utils.c:491
GSM0808_CALL_PRIORITY_LEVEL_1
@ GSM0808_CALL_PRIORITY_LEVEL_1
Definition: gsm0808_utils.h:114
GSM0808_CALL_PRIORITY_LEVEL_0
@ GSM0808_CALL_PRIORITY_LEVEL_0
Definition: gsm0808_utils.h:115
GSM0808_CALL_PRIORITY_LEVEL_B
@ GSM0808_CALL_PRIORITY_LEVEL_B
Definition: gsm0808_utils.h:116
GSM0808_CALL_PRIORITY_LEVEL_4
@ GSM0808_CALL_PRIORITY_LEVEL_4
Definition: gsm0808_utils.h:111
GSM0808_CALL_PRIORITY_LEVEL_2
@ GSM0808_CALL_PRIORITY_LEVEL_2
Definition: gsm0808_utils.h:113
GSM0808_CALL_PRIORITY_LEVEL_A
@ GSM0808_CALL_PRIORITY_LEVEL_A
Definition: gsm0808_utils.h:117
GSM0808_CALL_PRIORITY_LEVEL_3
@ GSM0808_CALL_PRIORITY_LEVEL_3
Definition: gsm0808_utils.h:112
GSM0808_CALL_PRIORITY_NONE
@ GSM0808_CALL_PRIORITY_NONE
Definition: gsm0808_utils.h:110
GSM0808_AI_CONFIRM_APP_DATA
@ GSM0808_AI_CONFIRM_APP_DATA
Definition: gsm0808_utils.h:204
GSM0808_AI_APP_DATA
@ GSM0808_AI_APP_DATA
Definition: gsm0808_utils.h:203
GSM0808_CSTAT_NOT_ESTABLISHED1
@ GSM0808_CSTAT_NOT_ESTABLISHED1
Definition: gsm0808_utils.h:182
GSM0808_CSTAT_RELEASED_NO_USER
@ GSM0808_CSTAT_RELEASED_NO_USER
Definition: gsm0808_utils.h:183
GSM0808_CSTAT_ESTABLISHED
@ GSM0808_CSTAT_ESTABLISHED
Definition: gsm0808_utils.h:181
GSM0808_CSTAT_NOT_ESTABLISHED2
@ GSM0808_CSTAT_NOT_ESTABLISHED2
Definition: gsm0808_utils.h:184
GSM0808_TALKER_PRIORITY_PRIVILEGED
@ GSM0808_TALKER_PRIORITY_PRIVILEGED
Definition: gsm0808_utils.h:161
GSM0808_TALKER_PRIORITY_NORMAL
@ GSM0808_TALKER_PRIORITY_NORMAL
Definition: gsm0808_utils.h:160
GSM0808_TALKER_PRIORITY_EMERGENCY
@ GSM0808_TALKER_PRIORITY_EMERGENCY
Definition: gsm0808_utils.h:162
GSM0808_SF_VGCS
@ GSM0808_SF_VGCS
Definition: gsm0808_utils.h:106
GSM0808_SF_VBS
@ GSM0808_SF_VBS
Definition: gsm0808_utils.h:105
GSM0808_DTX_FLAG_ALLOW
@ GSM0808_DTX_FLAG_ALLOW
Definition: gsm0808_utils.h:140
GSM0808_DTX_FLAG_FORBID
@ GSM0808_DTX_FLAG_FORBID
Definition: gsm0808_utils.h:141
GSM0808_ASRQ_IMMEDIATE_ON_DEMAND
@ GSM0808_ASRQ_IMMEDIATE_ON_DEMAND
Definition: gsm0808_utils.h:100
GSM0808_ASRQ_IMMEDIATE
@ GSM0808_ASRQ_IMMEDIATE
Definition: gsm0808_utils.h:99
GSM0808_ASRQ_DELAY_ALLOWED
@ GSM0808_ASRQ_DELAY_ALLOWED
Definition: gsm0808_utils.h:98
OSMO_DEPRECATED
#define OSMO_DEPRECATED(text)
get_value_string
const char * get_value_string(const struct value_string *vs, uint32_t val)
MODE_TYPE
#define MODE_TYPE(mode, type)
gsm23003.h
gsm29205.h
gsm48.h
gsm_04_08.h
GSM TS 04.08 definitions.
cause
uint8_t cause
Definition: gsm_04_08.h:2
gsm48_chan_mode
gsm48_chan_mode
10.5.2.6 Channel Mode value
Definition: gsm_04_08.h:750
GSM48_CMODE_DATA_6k0
@ GSM48_CMODE_DATA_6k0
CSD: 6.0 kbit/s radio interface rate, 4.8 kbit/s services (TCH/{F,H}4.8)
Definition: gsm_04_08.h:790
GSM48_CMODE_DATA_14k5_29k0
@ GSM48_CMODE_DATA_14k5_29k0
Definition: gsm_04_08.h:775
GSM48_CMODE_DATA_29k0_43k5
@ GSM48_CMODE_DATA_29k0_43k5
Definition: gsm_04_08.h:777
GSM48_CMODE_SPEECH_V1
@ GSM48_CMODE_SPEECH_V1
Speech: FR (TCH/FS) or HR (TCH/HS)
Definition: gsm_04_08.h:754
GSM48_CMODE_DATA_3k6
@ GSM48_CMODE_DATA_3k6
CSD: 3.6 kbit/s radio interface rate, 2.4 kbit/s and less services (TCH/{F,H}2.4)
Definition: gsm_04_08.h:792
GSM48_CMODE_SPEECH_V6
@ GSM48_CMODE_SPEECH_V6
Speech: OHR AMR (O-TCH/AHS)
Definition: gsm_04_08.h:764
GSM48_CMODE_SIGN
@ GSM48_CMODE_SIGN
Signalling only (TCH/F or TCH/H)
Definition: gsm_04_08.h:752
GSM48_CMODE_DATA_32k0
@ GSM48_CMODE_DATA_32k0
ECSD: 32.0 kbit/s radio interface rate, 32.0 kbit/s services (E-TCH/F32.0)
Definition: gsm_04_08.h:782
GSM48_CMODE_DATA_29k0
@ GSM48_CMODE_DATA_29k0
ECSD: 29.0 kbit/s radio interface rate, 28.8 kbit/s services (E-TCH/F28.8)
Definition: gsm_04_08.h:784
GSM48_CMODE_SPEECH_V5
@ GSM48_CMODE_SPEECH_V5
Speech: FR AMR-WB (TCH/WFS)
Definition: gsm_04_08.h:762
GSM48_CMODE_DATA_12k0
@ GSM48_CMODE_DATA_12k0
CSD: 12.0 kbit/s radio interface rate, 9.6 kbit/s services (TCH/F9.6)
Definition: gsm_04_08.h:788
GSM48_CMODE_DATA_14k5_43k5
@ GSM48_CMODE_DATA_14k5_43k5
Definition: gsm_04_08.h:773
GSM48_CMODE_SPEECH_AMR
@ GSM48_CMODE_SPEECH_AMR
Speech: AMR (TCH/AFS or TCH/AHS)
Definition: gsm_04_08.h:758
GSM48_CMODE_DATA_43k5_14k5
@ GSM48_CMODE_DATA_43k5_14k5
Definition: gsm_04_08.h:767
GSM48_CMODE_SPEECH_V4
@ GSM48_CMODE_SPEECH_V4
Speech: OFR AMR-WB (O-TCH/WFS) or OHR AMR-WB (O-TCH/WHS)
Definition: gsm_04_08.h:760
GSM48_CMODE_DATA_43k5_29k0
@ GSM48_CMODE_DATA_43k5_29k0
Definition: gsm_04_08.h:771
GSM48_CMODE_DATA_29k0_14k5
@ GSM48_CMODE_DATA_29k0_14k5
Definition: gsm_04_08.h:769
GSM48_CMODE_DATA_43k5
@ GSM48_CMODE_DATA_43k5
ECSD: 43.5 kbit/s radio interface rate, 43.2 kbit/s services (E-TCH/F43.2)
Definition: gsm_04_08.h:780
GSM48_CMODE_SPEECH_EFR
@ GSM48_CMODE_SPEECH_EFR
Speech: EFR (TCH/EFS)
Definition: gsm_04_08.h:756
GSM48_CMODE_DATA_14k5
@ GSM48_CMODE_DATA_14k5
CSD: 14.5 kbit/s radio interface rate, 14.4 kbit/s services (TCH/F14.4)
Definition: gsm_04_08.h:786
mode
uint8_t mode
Definition: gsm_04_08.h:1
type
uint8_t type
Definition: gsm_04_08_gprs.h:7
len
uint8_t len
Definition: gsm_04_11.h:0
gsm_08_08.h
gsm0808_cause
gsm0808_cause
Definition: gsm_08_08.h:367
msg
uint8_t msg[0]
Definition: gsm_08_08.h:8
gsm0808_cause_class
gsm0808_cause_class
Definition: gsm_08_08.h:434
gsm0808_lcls_control
gsm0808_lcls_control
Definition: gsm_08_08.h:793
gsm0808_lcls_config
gsm0808_lcls_config
Definition: gsm_08_08.h:782
gsm0808_permitted_speech
gsm0808_permitted_speech
GSM 08.08 3.2.2.11 Channel Type (see also 3GPP TS 48.008, section 3.2.2.11)
Definition: gsm_08_08.h:494
GSM0808_PERM_FR2
@ GSM0808_PERM_FR2
GSM EFR.
Definition: gsm_08_08.h:496
GSM0808_PERM_HR6
@ GSM0808_PERM_HR6
OHR AMR.
Definition: gsm_08_08.h:504
GSM0808_PERM_FR1
@ GSM0808_PERM_FR1
GSM FR.
Definition: gsm_08_08.h:495
GSM0808_PERM_HR1
@ GSM0808_PERM_HR1
GSM HR.
Definition: gsm_08_08.h:500
GSM0808_PERM_HR4
@ GSM0808_PERM_HR4
OHR AMR-WB.
Definition: gsm_08_08.h:503
GSM0808_PERM_HR3
@ GSM0808_PERM_HR3
HR AMR.
Definition: gsm_08_08.h:502
GSM0808_PERM_HR2
@ GSM0808_PERM_HR2
(deprecated)
Definition: gsm_08_08.h:501
GSM0808_PERM_FR3
@ GSM0808_PERM_FR3
FR AMR.
Definition: gsm_08_08.h:497
GSM0808_PERM_FR4
@ GSM0808_PERM_FR4
OFR AMR-WB.
Definition: gsm_08_08.h:498
GSM0808_PERM_FR5
@ GSM0808_PERM_FR5
FR AMR-WB.
Definition: gsm_08_08.h:499
CELL_IDENT
CELL_IDENT
Definition: gsm_08_08.h:17
gsm_utils.h
GSM utility functions, e.g.
gsm_chan_t
gsm_chan_t
Definition: gsm_utils.h:236
GSM_LCHAN_TCH_H
@ GSM_LCHAN_TCH_H
Definition: gsm_utils.h:240
GSM_LCHAN_SDCCH
@ GSM_LCHAN_SDCCH
Definition: gsm_utils.h:238
GSM_LCHAN_TCH_F
@ GSM_LCHAN_TCH_F
Definition: gsm_utils.h:239
GSM_LCHAN_NONE
@ GSM_LCHAN_NONE
Definition: gsm_utils.h:237
gsm0808_application_data
Definition: gsm0808_utils.h:196
gsm0808_application_data::data_len
unsigned int data_len
Definition: gsm0808_utils.h:198
gsm0808_application_data::data
uint8_t data[APP_DATA_MAXLEN]
Definition: gsm0808_utils.h:197
gsm0808_cell_id_list2
Parsed representation of a Cell Identifier List IE (3GPP TS 48.008 3.2.2.27).
Definition: gsm0808_utils.h:61
gsm0808_cell_id_list2::id_discr
enum CELL_IDENT id_discr
Definition: gsm0808_utils.h:62
gsm0808_cell_id_list2::id_list
union gsm0808_cell_id_u id_list[GSM0808_CELL_ID_LIST2_MAXLEN]
Definition: gsm0808_utils.h:63
gsm0808_cell_id_list2::id_list_len
unsigned int id_list_len
Definition: gsm0808_utils.h:64
gsm0808_cell_id_list_segment
Parsed representation of a Cell Identifier List Segment IE (3GPP TS 48.008 3.2.2.27a)
Definition: gsm0808_utils.h:145
gsm0808_cell_id_list_segment::seq_last
uint8_t seq_last
Definition: gsm0808_utils.h:146
gsm0808_cell_id_list_segment::cil
struct gsm0808_cell_id_list2 cil
Definition: gsm0808_utils.h:148
gsm0808_cell_id_list_segment::seq_number
uint8_t seq_number
Definition: gsm0808_utils.h:147
gsm0808_cell_id_list
DEPRECATED: This definition of the cell identifier list is insufficient.
Definition: gsm_08_08.h:775
gsm0808_cell_id
Parsed representation of Cell Identifier IE (3GPP TS 48.008 3.2.2.17)
Definition: gsm0808_utils.h:55
gsm0808_cell_id::id
union gsm0808_cell_id_u id
Definition: gsm0808_utils.h:57
gsm0808_cell_id::id_discr
enum CELL_IDENT id_discr
Definition: gsm0808_utils.h:56
gsm0808_channel_type
Definition: gsm_08_08.h:741
gsm0808_circuit_pool_list
Definition: gsm0808_utils.h:153
gsm0808_circuit_pool_list::pool
uint8_t pool[CIRCUIT_POOL_LIST_MAXLEN]
Definition: gsm0808_utils.h:154
gsm0808_circuit_pool_list::list_len
unsigned int list_len
Definition: gsm0808_utils.h:155
gsm0808_data_identity
Definition: gsm0808_utils.h:211
gsm0808_encrypt_info
Definition: gsm_08_08.h:761
gsm0808_group_callref
Packed representation of a Group Call Reference IE (3GPP TS 48.008 3.2.2.55)
Definition: gsm0808_utils.h:121
gsm0808_layer_3_information
Definition: gsm0808_utils.h:167
gsm0808_layer_3_information::l3
uint8_t l3[LAYER_3_INFORMATION_MAXLEN]
Definition: gsm0808_utils.h:168
gsm0808_layer_3_information::l3_len
unsigned int l3_len
Definition: gsm0808_utils.h:169
gsm0808_priority
Packed representation of a Priority IE (GGPP TS 48.008 3.2.2.18)
Definition: gsm0808_utils.h:68
gsm0808_sms_to_vgcs
Definition: gsm0808_utils.h:189
gsm0808_sms_to_vgcs::sms
uint8_t sms[SMS_TO_VGCS_MAXLEN]
Definition: gsm0808_utils.h:190
gsm0808_sms_to_vgcs::sms_len
unsigned int sms_len
Definition: gsm0808_utils.h:191
gsm0808_speech_codec_list
Definition: gsm_08_08.h:725
gsm0808_speech_codec
3GPP TS 48.008 3.2.2.104 Speech Codec.
Definition: gsm_08_08.h:593
gsm0808_talker_identity
Definition: gsm0808_utils.h:174
gsm0808_talker_identity::talker_id
uint8_t talker_id[TALKER_IDENTITY_MAXLEN]
Definition: gsm0808_utils.h:175
gsm0808_talker_identity::id_bits
unsigned int id_bits
Definition: gsm0808_utils.h:176
gsm0808_vgcs_feature_flags
Packed representation of a VGCS Feature Flags IE (3GPP TS 48.008 3.2.2.88)
Definition: gsm0808_utils.h:82
gsm48_multi_rate_conf
Definition: gsm_04_08.h:603
msgb
osmo_cell_global_id_ps
Definition: gsm23003.h:37
osmo_cell_global_id
Definition: gsm23003.h:29
osmo_gcr_parsed
Parsed representation of Global Call Reference, 3GPP TS 29.205 Table B 2.1.9.1.
Definition: gsm29205.h:29
osmo_lac_and_ci_id
Definition: gsm23003.h:54
osmo_lcls
LCLS-related parameters from 3GPP TS 48.008.
Definition: gsm0808_utils.h:226
osmo_lcls::control
enum gsm0808_lcls_control control
§3.2.2.117 Connection Status Control
Definition: gsm0808_utils.h:228
osmo_lcls::gcr_available
bool gcr_available
Definition: gsm0808_utils.h:230
osmo_lcls::gcr
struct osmo_gcr_parsed gcr
§3.2.2.115 Global Call Reference
Definition: gsm0808_utils.h:229
osmo_lcls::config
enum gsm0808_lcls_config config
§3.2.2.116 Configuration
Definition: gsm0808_utils.h:227
osmo_lcls::corr_needed
bool corr_needed
§3.2.2.118 Correlation-Not-Needed
Definition: gsm0808_utils.h:231
osmo_location_area_id
Definition: gsm23003.h:17
osmo_service_area_id
Definition: gsm23003.h:66
tlv_parsed
result of the TLV parser
Definition: tlv.h:532
value_string
tlv.h
gsm0808_cell_id_u
Instead of this, use either struct gsm0808_cell_id or gsm0808_cell_id_list2.
Definition: gsm0808_utils.h:43
gsm0808_cell_id_u::lac
uint16_t lac
Definition: gsm0808_utils.h:48
gsm0808_cell_id_u::global_ps
struct osmo_cell_global_id_ps global_ps
Definition: gsm0808_utils.h:51
gsm0808_cell_id_u::ci
uint16_t ci
Definition: gsm0808_utils.h:46
gsm0808_cell_id_u::global
struct osmo_cell_global_id global
Definition: gsm0808_utils.h:44
gsm0808_cell_id_u::lai_and_lac
struct osmo_location_area_id lai_and_lac
Definition: gsm0808_utils.h:47
gsm0808_cell_id_u::lac_and_ci
struct osmo_lac_and_ci_id lac_and_ci
Definition: gsm0808_utils.h:45
gsm0808_cell_id_u::sai
struct osmo_service_area_id sai
Definition: gsm0808_utils.h:49