Loading...
Searching...
No Matches
gsm0808_utils.h
Go to the documentation of this file.
/*
* (C) 2016 by sysmocom - s.f.m.c. GmbH, Author: Philipp Maier
* All Rights Reserved
*
* SPDX-License-Identifier: GPL-2.0+
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#pragma once
struct sockaddr_storage;
#include <osmocom/gsm/protocol/gsm_08_08.h>
#include <osmocom/gsm/protocol/gsm_04_08.h>
#include <osmocom/gsm/gsm29205.h>
#include <osmocom/gsm/gsm23003.h>
#include <osmocom/gsm/gsm_utils.h>
#include <osmocom/gsm/tlv.h>
#include <osmocom/gsm/gsm48.h>
#include <osmocom/core/endian.h>
#define GSM0808_CELL_ID_LIST2_MAXLEN 127
union gsm0808_cell_id_u {
struct osmo_cell_global_id global;
struct osmo_lac_and_ci_id lac_and_ci;
uint16_t ci;
struct osmo_location_area_id lai_and_lac;
uint16_t lac;
struct osmo_service_area_id sai;
/* osmocom specific: */
struct osmo_cell_global_id_ps global_ps;
};
struct gsm0808_cell_id {
enum CELL_IDENT id_discr;
union gsm0808_cell_id_u id;
};
struct gsm0808_cell_id_list2 {
enum CELL_IDENT id_discr;
union gsm0808_cell_id_u id_list[GSM0808_CELL_ID_LIST2_MAXLEN];
unsigned int id_list_len;
};
struct gsm0808_priority {
#if OSMO_IS_LITTLE_ENDIAN
uint8_t pvi:1, /* Preemption Vulnerability indicator */
qa:1, /* Queuing allowed indicator */
priority_level:4, /* Priority level: 1 == hightest, 14 == lowest */
pci:1, /* Preemption Capability indicator */
spare:1;
#elif OSMO_IS_BIG_ENDIAN
/* auto-generated from the little endian part above (libosmocore/contrib/struct_endianness.py) */
uint8_t spare:1, pci:1, priority_level:4, qa:1, pvi:1;
#endif
} __attribute__ ((packed));
struct gsm0808_vgcs_feature_flags {
#if OSMO_IS_LITTLE_ENDIAN
uint8_t tp_ind:1, /* Talker priority supported */
as_ind_circuit:1, /* A-interface circuit sharing supported */
as_ind_link:1, /* A-interface link sharing supported */
bss_res:1, /* BSS supports re-establishment */
tcp:1, /* Talker channel parameter supported */
spare:3;
#elif OSMO_IS_BIG_ENDIAN
/* auto-generated from the little endian part above (libosmocore/contrib/struct_endianness.py) */
uint8_t spare:3, tcp:1, bss_res:1, as_ind_link:1, as_ind_circuit:1, tp_ind:1;
#endif
} __attribute__ ((packed));
/* TS 48.008 3.2.2.52 */
enum gsm0808_assignment_requirement {
GSM0808_ASRQ_DELAY_ALLOWED = 0x00,
GSM0808_ASRQ_IMMEDIATE = 0x01,
GSM0808_ASRQ_IMMEDIATE_ON_DEMAND = 0x02,
};
/* TS 48.008 Table 10.5.8 */
enum gsm0808_service_flag {
GSM0808_SF_VBS = 0,
GSM0808_SF_VGCS = 1,
};
enum gsm0808_call_priority {
GSM0808_CALL_PRIORITY_NONE = 0x00,
GSM0808_CALL_PRIORITY_LEVEL_4 = 0x01,
GSM0808_CALL_PRIORITY_LEVEL_3 = 0x02,
GSM0808_CALL_PRIORITY_LEVEL_2 = 0x03,
GSM0808_CALL_PRIORITY_LEVEL_1 = 0x04,
GSM0808_CALL_PRIORITY_LEVEL_0 = 0x05,
GSM0808_CALL_PRIORITY_LEVEL_B = 0x06,
GSM0808_CALL_PRIORITY_LEVEL_A = 0x07,
};
struct gsm0808_group_callref {
#if OSMO_IS_LITTLE_ENDIAN
uint8_t call_ref_hi[3];
uint8_t call_priority:3,
af:1, /* Acknowledgement flag */
sf:1, /* Service flag */
call_ref_lo:3;
uint8_t spare:4,
ciphering_info:4;
#elif OSMO_IS_BIG_ENDIAN
/* auto-generated from the little endian part above (libosmocore/contrib/struct_endianness.py) */
uint8_t call_ref_hi[3];
uint8_t call_ref_lo:3, sf:1, af:1, call_priority:3;
uint8_t ciphering_info:4, spare:4;
#endif
} __attribute__ ((packed));
/* TS 48.008 3.2.2.26 */
enum gsm0808_downlink_dtx_flag {
GSM0808_DTX_FLAG_ALLOW = 0,
GSM0808_DTX_FLAG_FORBID = 1,
};
struct gsm0808_cell_id_list_segment {
uint8_t seq_last;
uint8_t seq_number;
struct gsm0808_cell_id_list2 cil;
};
#define CIRCUIT_POOL_LIST_MAXLEN 252
struct gsm0808_circuit_pool_list {
uint8_t pool[CIRCUIT_POOL_LIST_MAXLEN];
unsigned int list_len;
};
/* 3GPP TS 48.008 Table 3.2.2.90.1 Talker Priority */
enum gsm0808_talker_priority {
GSM0808_TALKER_PRIORITY_NORMAL = 0x00,
GSM0808_TALKER_PRIORITY_PRIVILEGED = 0x01,
GSM0808_TALKER_PRIORITY_EMERGENCY = 0x02,
};
#define LAYER_3_INFORMATION_MAXLEN 252
struct gsm0808_layer_3_information {
uint8_t l3[LAYER_3_INFORMATION_MAXLEN];
unsigned int l3_len;
};
#define TALKER_IDENTITY_MAXLEN 17
struct gsm0808_talker_identity {
uint8_t talker_id[TALKER_IDENTITY_MAXLEN];
unsigned int id_bits;
};
/* 3GPP TS 48.008 3.2.2.94 VGCS/VBS Cell Status */
enum gsm0808_vgcs_vbs_cell_status {
GSM0808_CSTAT_ESTABLISHED = 0x00,
GSM0808_CSTAT_NOT_ESTABLISHED1 = 0x01,
GSM0808_CSTAT_RELEASED_NO_USER = 0x02,
GSM0808_CSTAT_NOT_ESTABLISHED2 = 0x03,
};
#define SMS_TO_VGCS_MAXLEN 252
struct gsm0808_sms_to_vgcs {
uint8_t sms[SMS_TO_VGCS_MAXLEN];
unsigned int sms_len;
};
#define APP_DATA_MAXLEN 9
struct gsm0808_application_data {
uint8_t data[APP_DATA_MAXLEN];
unsigned int data_len;
};
enum gsm0808_application_idndicator {
GSM0808_AI_APP_DATA = 0x00,
GSM0808_AI_CONFIRM_APP_DATA = 0x01,
};
#define GSM0808_DP_MASK_TALKERS_LISTENERS 0x04
#define GSM0808_DP_MASK_DISPATCHERS 0x02
#define GSM0808_DP_MASK_NETWORK_APP 0x01
struct gsm0808_data_identity {
#if OSMO_IS_LITTLE_ENDIAN
uint8_t ai:1, /* Application Indicator */
di:4, /* Data identifier */
dp:3; /* Distribution parameter (bit mask) */
#elif OSMO_IS_BIG_ENDIAN
/* auto-generated from the little endian part above (libosmocore/contrib/struct_endianness.py) */
uint8_t dp:3, di:4, ai:1;
#endif
} __attribute__ ((packed));
#define MSISDN_MAXLEN 20
struct osmo_lcls {
enum gsm0808_lcls_config config;
enum gsm0808_lcls_control control;
struct osmo_gcr_parsed gcr;
bool gcr_available;
bool corr_needed;
};
char *osmo_lcls_dump(const struct osmo_lcls *lcls);
char *osmo_lcls_dump_buf(char *buf, size_t buf_len, const struct osmo_lcls *lcls);
char *osmo_lcls_dump_c(void *ctx, const struct osmo_lcls *lcls);
char *osmo_gcr_dump(const struct osmo_lcls *lcls);
char *osmo_gcr_dump_buf(char *buf, size_t buf_len, const struct osmo_lcls *lcls);
extern const struct value_string gsm0808_cell_id_discr_names[];
static inline const char *gsm0808_cell_id_discr_name(enum CELL_IDENT id_discr)
{ return get_value_string(gsm0808_cell_id_discr_names, id_discr); }
const char *gsm0808_cell_id_name(const struct gsm0808_cell_id *cid);
const char *gsm0808_cell_id_name2(const struct gsm0808_cell_id *cid);
char *gsm0808_cell_id_name_buf(char *buf, size_t buflen, const struct gsm0808_cell_id *cid);
char *gsm0808_cell_id_name_c(const void *ctx, const struct gsm0808_cell_id *cid);
const char *gsm0808_cell_id_list_name(const struct gsm0808_cell_id_list2 *cil);
int gsm0808_cell_id_list_name_buf(char *buf, size_t buflen, const struct gsm0808_cell_id_list2 *cil);
char *gsm0808_cell_id_list_name_c(const void *ctx, const struct gsm0808_cell_id_list2 *cil);
int gsm0808_cell_id_u_name(char *buf, size_t buflen,
enum CELL_IDENT id_discr, const union gsm0808_cell_id_u *u);
bool gsm0808_cell_ids_match(const struct gsm0808_cell_id *id1, const struct gsm0808_cell_id *id2, bool exact_match);
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);
void gsm0808_cell_id_from_cgi(struct gsm0808_cell_id *cid, enum CELL_IDENT id_discr,
const struct osmo_cell_global_id *cgi);
int gsm0808_cell_id_to_cgi(struct osmo_cell_global_id *cgi, const struct gsm0808_cell_id *cid);
void gsm0808_msgb_put_cell_id_u(struct msgb *msg, enum CELL_IDENT id_discr, const union gsm0808_cell_id_u *u);
int gsm0808_decode_cell_id_u(union gsm0808_cell_id_u *out, enum CELL_IDENT discr, const uint8_t *buf, unsigned int len);
int gsm0808_cell_id_size(enum CELL_IDENT discr);
uint8_t gsm0808_enc_cause(struct msgb *msg, uint16_t cause);
uint8_t gsm0808_enc_aoip_trasp_addr(struct msgb *msg,
const struct sockaddr_storage *ss);
int gsm0808_dec_aoip_trasp_addr(struct sockaddr_storage *ss,
const uint8_t *elem, uint8_t len);
int gsm0808_dec_osmux_cid(uint8_t *cid, const uint8_t *elem, uint8_t len);
uint8_t gsm0808_enc_lcls(struct msgb *msg, const struct osmo_lcls *lcls);
int gsm0808_dec_lcls(struct osmo_lcls *lcls, const struct tlv_parsed *tp);
uint8_t gsm0808_enc_speech_codec(struct msgb *msg,
const struct gsm0808_speech_codec *sc)
OSMO_DEPRECATED("use gsm0808_enc_speech_codec2() instead");
int gsm0808_enc_speech_codec2(struct msgb *msg,
const struct gsm0808_speech_codec *sc);
int gsm0808_dec_speech_codec(struct gsm0808_speech_codec *sc,
const uint8_t *elem, uint8_t len);
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");
int gsm0808_enc_speech_codec_list2(struct msgb *msg,
const struct gsm0808_speech_codec_list *scl);
int gsm0808_dec_speech_codec_list(struct gsm0808_speech_codec_list *scl,
const uint8_t *elem, uint8_t len);
uint8_t gsm0808_enc_channel_type(struct msgb *msg,
const struct gsm0808_channel_type *ct);
int gsm0808_dec_channel_type(struct gsm0808_channel_type *ct,
const uint8_t *elem, uint8_t len);
uint8_t gsm0808_enc_encrypt_info(struct msgb *msg,
const struct gsm0808_encrypt_info *ei);
int gsm0808_dec_encrypt_info(struct gsm0808_encrypt_info *ei,
const uint8_t *elem, uint8_t len);
int gsm0808_enc_kc128(struct msgb *msg, const uint8_t *kc128);
int gsm0808_dec_kc128(uint8_t *kc128, const uint8_t *elem, uint8_t len);
uint8_t gsm0808_enc_cell_id_list2(struct msgb *msg, const struct gsm0808_cell_id_list2 *cil);
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");
int gsm0808_dec_cell_id_list2(struct gsm0808_cell_id_list2 *cil, const uint8_t *elem, uint8_t len);
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");
int gsm0808_cell_id_list_add(struct gsm0808_cell_id_list2 *dst, const struct gsm0808_cell_id_list2 *src);
void gsm0808_cell_id_to_list(struct gsm0808_cell_id_list2 *dst, const struct gsm0808_cell_id *src);
uint8_t gsm0808_enc_cell_id(struct msgb *msg, const struct gsm0808_cell_id *ci);
int gsm0808_dec_cell_id(struct gsm0808_cell_id *ci, const uint8_t *elem, uint8_t len);
int gsm0808_chan_type_to_speech_codec(uint8_t perm_spch);
int gsm0808_speech_codec_from_chan_type(struct gsm0808_speech_codec *sc,
uint8_t perm_spch);
uint16_t gsm0808_sc_cfg_from_gsm48_mr_cfg(const struct gsm48_multi_rate_conf *cfg, bool fr);
int gsm48_mr_cfg_from_gsm0808_sc_cfg(struct gsm48_multi_rate_conf *cfg, uint16_t s15_s0);
static inline enum gsm0808_cause_class gsm0808_cause_class(enum gsm0808_cause cause)
{
return (cause >> 4) & 0x7;
}
static inline bool gsm0808_cause_ext(enum gsm0808_cause cause)
{
/* check that cause looks like 1XXX0000 where XXX represent class */
return (cause & 0x80) && !(cause & 0x0F);
}
int gsm0808_get_cipher_reject_cause(const struct tlv_parsed *tp)
OSMO_DEPRECATED("Use gsm0808_get_cause() instead");
static inline uint8_t gsm0808_current_channel_type_1(enum gsm_chan_t type)
{
switch (type) {
default:
return 0;
case GSM_LCHAN_SDCCH:
return 0x01;
case GSM_LCHAN_TCH_F:
return 0x18;
case GSM_LCHAN_TCH_H:
return 0x19;
}
}
static inline enum gsm0808_permitted_speech gsm0808_permitted_speech(enum gsm_chan_t type,
enum gsm48_chan_mode mode)
{
#define MODE_TYPE(mode, type) ((mode << 16) | type)
switch (MODE_TYPE(mode, type)) {
case MODE_TYPE(GSM48_CMODE_SPEECH_V1, GSM_LCHAN_TCH_F):
return GSM0808_PERM_FR1;
case MODE_TYPE(GSM48_CMODE_SPEECH_V1, GSM_LCHAN_TCH_H):
return GSM0808_PERM_HR1;
case MODE_TYPE(GSM48_CMODE_SPEECH_EFR, GSM_LCHAN_TCH_F):
return GSM0808_PERM_FR2;
case MODE_TYPE(GSM48_CMODE_SPEECH_EFR, GSM_LCHAN_TCH_H):
return GSM0808_PERM_HR2; /* (deprecated) */
case MODE_TYPE(GSM48_CMODE_SPEECH_AMR, GSM_LCHAN_TCH_F):
return GSM0808_PERM_FR3;
case MODE_TYPE(GSM48_CMODE_SPEECH_AMR, GSM_LCHAN_TCH_H):
return GSM0808_PERM_HR3;
case MODE_TYPE(GSM48_CMODE_SPEECH_V4, GSM_LCHAN_TCH_F):
return GSM0808_PERM_FR4;
case MODE_TYPE(GSM48_CMODE_SPEECH_V4, GSM_LCHAN_TCH_H):
return GSM0808_PERM_HR4;
case MODE_TYPE(GSM48_CMODE_SPEECH_V5, GSM_LCHAN_TCH_F):
return GSM0808_PERM_FR5; /* FR only */
case MODE_TYPE(GSM48_CMODE_SPEECH_V6, GSM_LCHAN_TCH_H):
return GSM0808_PERM_HR6; /* HR only */
default:
return 0;
}
#undef MODE_TYPE
}
static inline uint8_t gsm0808_chosen_channel(enum gsm_chan_t type, enum gsm48_chan_mode mode)
{
uint8_t channel_mode = 0, channel = 0;
switch (mode) {
case GSM48_CMODE_SPEECH_V1:
case GSM48_CMODE_SPEECH_EFR:
case GSM48_CMODE_SPEECH_AMR:
case GSM48_CMODE_SPEECH_V4:
case GSM48_CMODE_SPEECH_V5:
case GSM48_CMODE_SPEECH_V6:
channel_mode = 0x9;
break;
case GSM48_CMODE_SIGN:
channel_mode = 0x8;
break;
case GSM48_CMODE_DATA_14k5:
channel_mode = 0xe;
break;
case GSM48_CMODE_DATA_12k0:
channel_mode = 0xb;
break;
case GSM48_CMODE_DATA_6k0:
channel_mode = 0xc;
break;
case GSM48_CMODE_DATA_3k6:
channel_mode = 0xd;
break;
case GSM48_CMODE_DATA_29k0:
channel_mode = 0x1;
break;
case GSM48_CMODE_DATA_32k0:
channel_mode = 0x2;
break;
case GSM48_CMODE_DATA_43k5:
channel_mode = 0x3;
break;
case GSM48_CMODE_DATA_43k5_14k5:
channel_mode = 0x4;
break;
case GSM48_CMODE_DATA_29k0_14k5:
channel_mode = 0x5;
break;
case GSM48_CMODE_DATA_43k5_29k0:
channel_mode = 0x6;
break;
case GSM48_CMODE_DATA_14k5_43k5:
channel_mode = 0x7;
break;
case GSM48_CMODE_DATA_14k5_29k0:
channel_mode = 0xa;
break;
case GSM48_CMODE_DATA_29k0_43k5:
channel_mode = 0xf;
break;
default:
return 0;
}
switch (type) {
case GSM_LCHAN_NONE:
channel = 0x0;
break;
case GSM_LCHAN_SDCCH:
channel = 0x1;
break;
case GSM_LCHAN_TCH_F:
channel = 0x8;
break;
case GSM_LCHAN_TCH_H:
channel = 0x9;
break;
/* TODO: more than 1 TCHs? */
default:
return 0;
}
return channel_mode << 4 | channel;
}
const char *gsm0808_channel_type_name(const struct gsm0808_channel_type *ct);
char *gsm0808_channel_type_name_buf(char *buf, size_t buf_len, const struct gsm0808_channel_type *ct);
char *gsm0808_channel_type_name_c(const void *ctx, const struct gsm0808_channel_type *ct);
uint8_t gsm0808_enc_group_callref(struct msgb *msg, const struct gsm0808_group_callref *gc);
int gsm0808_dec_group_callref(struct gsm0808_group_callref *gc, const uint8_t *elem, uint8_t len);
uint8_t gsm0808_enc_priority(struct msgb *msg, const struct gsm0808_priority *pri);
int gsm0808_dec_priority(struct gsm0808_priority *pri, const uint8_t *elem, uint8_t len);
uint8_t gsm0808_enc_vgcs_feature_flags(struct msgb *msg, const struct gsm0808_vgcs_feature_flags *ff);
int gsm0808_dec_vgcs_feature_flags(struct gsm0808_vgcs_feature_flags *ff, const uint8_t *elem, uint8_t len);
uint8_t gsm0808_enc_talker_identity(struct msgb *msg, const struct gsm0808_talker_identity *ti);
int gsm0808_dec_talker_identity(struct gsm0808_talker_identity *ti, const uint8_t *elem, uint8_t len);
uint8_t gsm0808_enc_data_identity(struct msgb *msg, const struct gsm0808_data_identity *ai);
int gsm0808_dec_data_identity(struct gsm0808_data_identity *ai, const uint8_t *elem, uint8_t len);
uint8_t gsm0808_enc_msisdn(struct msgb *msg, const char *msisdn);
int gsm0808_dec_msisdn(char *msisdn, const char *elem, uint8_t len);
uint8_t gsm0808_enc_assign_req(struct msgb *msg, const enum gsm0808_assignment_requirement ar);
int gsm0808_dec_assign_req(enum gsm0808_assignment_requirement *ar, const uint8_t *elem, uint8_t len);
uint8_t gsm0808_enc_cell_id_list_segment(struct msgb *msg, uint8_t ie_type,
const struct gsm0808_cell_id_list_segment *ci);
int gsm0808_dec_cell_id_list_segment(struct gsm0808_cell_id_list_segment *ci, const uint8_t *elem, uint8_t len);
int gsm0808_dec_call_id(uint32_t *ci, const uint8_t *elem, uint8_t len);
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_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
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
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
type
uint8_t type
Definition gsm_08_08.h:0
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