mncc.h
Go to the documentation of this file.
#pragma once
#include <osmocom/gsm/protocol/gsm_04_08.h>
#define GSM_MAX_FACILITY 128
#define GSM_MAX_SSVERSION 128
#define GSM_MAX_USERUSER 128
/* Expanded fields from GSM TS 04.08, Table 10.5.102 */
struct gsm_mncc_bearer_cap {
int transfer; /* Information Transfer Capability, see enum gsm48_bcap_itcap. */
int mode; /* Transfer Mode, see enum gsm48_bcap_tmod. */
int coding; /* Coding Standard, see enum gsm48_bcap_coding.*/
int radio; /* Radio Channel Requirement, see enum gsm48_bcap_rrq. */
int speech_ctm; /* CTM text telephony indication */
int speech_ver[8]; /* Speech version indication, see enum gsm48_bcap_speech_ver; -1 marks end */
struct {
enum gsm48_bcap_ra rate_adaption;
enum gsm48_bcap_sig_access sig_access;
int async;
int nr_stop_bits;
int nr_data_bits;
enum gsm48_bcap_user_rate user_rate;
enum gsm48_bcap_parity parity;
enum gsm48_bcap_interm_rate interm_rate;
enum gsm48_bcap_transp transp;
enum gsm48_bcap_modem_type modem_type;
} data;
};
struct gsm_mncc_number {
int type;
int plan;
int present;
int screen;
char number[33];
};
struct gsm_mncc_cause {
int location;
int coding;
int rec;
int rec_val;
int value;
int diag_len;
char diag[32];
};
struct gsm_mncc_useruser {
int proto;
char info[GSM_MAX_USERUSER + 1]; /* + termination char */
};
struct gsm_mncc_progress {
int coding;
int location;
int descr;
};
struct gsm_mncc_facility {
int len;
char info[GSM_MAX_FACILITY];
};
struct gsm_mncc_ssversion {
int len;
char info[GSM_MAX_SSVERSION];
};
struct gsm_mncc_cccap {
int dtmf;
int pcp;
};
enum {
GSM_MNCC_BCAP_SPEECH = 0,
GSM_MNCC_BCAP_UNR_DIG = 1,
GSM_MNCC_BCAP_AUDIO = 2,
GSM_MNCC_BCAP_FAX_G3 = 3,
GSM_MNCC_BCAP_OTHER_ITC = 5,
GSM_MNCC_BCAP_RESERVED = 7,
};
struct msgb;
struct msgb *osmo_mncc_stringify(const uint8_t *msg, unsigned int len);
void _osmo_mncc_log(int subsys, int level, const char *file, int line, const char *prefix,
const uint8_t *msg, unsigned int len);
#define osmo_mncc_log(ss, level, prefix, msg, len) \
_osmo_mncc_log(ss, level, __FILE__, __LINE__, prefix, msg, len);
extern const struct value_string osmo_mncc_names[];
static inline const char *osmo_mncc_name(uint32_t msg_type) {
return get_value_string(osmo_mncc_names, msg_type);
}
file
write Write running configuration to or terminal n Write configuration to the file(same as write file)\n") ALIAS(config_write_file
get_value_string
const char * get_value_string(const struct value_string *vs, uint32_t val)
gsm_04_08.h
GSM TS 04.08 definitions.
gsm48_bcap_user_rate
gsm48_bcap_user_rate
Definition: gsm_04_08.h:2049
gsm48_bcap_parity
gsm48_bcap_parity
Definition: gsm_04_08.h:2060
gsm48_bcap_interm_rate
gsm48_bcap_interm_rate
Definition: gsm_04_08.h:2069
gsm48_bcap_transp
gsm48_bcap_transp
Definition: gsm_04_08.h:2075
gsm48_bcap_sig_access
gsm48_bcap_sig_access
Definition: gsm_04_08.h:2039
gsm48_bcap_modem_type
gsm48_bcap_modem_type
Definition: gsm_04_08.h:2083
gsm48_bcap_ra
gsm48_bcap_ra
Definition: gsm_04_08.h:2031
msg_type
uint8_t msg_type
Definition: gsm_04_08.h:2
len
uint8_t len
Definition: gsm_04_11.h:0
msg
uint8_t msg[0]
Definition: gsm_08_08.h:8
GSM_MAX_USERUSER
#define GSM_MAX_USERUSER
Definition: mncc.h:9
osmo_mncc_stringify
struct msgb * osmo_mncc_stringify(const uint8_t *msg, unsigned int len)
GSM_MAX_SSVERSION
#define GSM_MAX_SSVERSION
Definition: mncc.h:8
osmo_mncc_name
static const char * osmo_mncc_name(uint32_t msg_type)
Definition: mncc.h:96
osmo_mncc_names
const struct value_string osmo_mncc_names[]
_osmo_mncc_log
void _osmo_mncc_log(int subsys, int level, const char *file, int line, const char *prefix, const uint8_t *msg, unsigned int len)
GSM_MAX_FACILITY
#define GSM_MAX_FACILITY
Definition: mncc.h:7
GSM_MNCC_BCAP_AUDIO
@ GSM_MNCC_BCAP_AUDIO
Definition: mncc.h:80
GSM_MNCC_BCAP_OTHER_ITC
@ GSM_MNCC_BCAP_OTHER_ITC
Definition: mncc.h:82
GSM_MNCC_BCAP_SPEECH
@ GSM_MNCC_BCAP_SPEECH
Definition: mncc.h:78
GSM_MNCC_BCAP_FAX_G3
@ GSM_MNCC_BCAP_FAX_G3
Definition: mncc.h:81
GSM_MNCC_BCAP_RESERVED
@ GSM_MNCC_BCAP_RESERVED
Definition: mncc.h:83
GSM_MNCC_BCAP_UNR_DIG
@ GSM_MNCC_BCAP_UNR_DIG
Definition: mncc.h:79
gsm_mncc_bearer_cap
Definition: mncc.h:12
gsm_mncc_bearer_cap::speech_ctm
int speech_ctm
Definition: mncc.h:17
gsm_mncc_bearer_cap::mode
int mode
Definition: mncc.h:14
gsm_mncc_bearer_cap::parity
enum gsm48_bcap_parity parity
Definition: mncc.h:26
gsm_mncc_bearer_cap::data
struct gsm_mncc_bearer_cap::@20 data
gsm_mncc_bearer_cap::transfer
int transfer
Definition: mncc.h:13
gsm_mncc_bearer_cap::radio
int radio
Definition: mncc.h:16
gsm_mncc_bearer_cap::interm_rate
enum gsm48_bcap_interm_rate interm_rate
Definition: mncc.h:27
gsm_mncc_bearer_cap::rate_adaption
enum gsm48_bcap_ra rate_adaption
Definition: mncc.h:20
gsm_mncc_bearer_cap::speech_ver
int speech_ver[8]
Definition: mncc.h:18
gsm_mncc_bearer_cap::nr_stop_bits
int nr_stop_bits
Definition: mncc.h:23
gsm_mncc_bearer_cap::transp
enum gsm48_bcap_transp transp
Definition: mncc.h:28
gsm_mncc_bearer_cap::nr_data_bits
int nr_data_bits
Definition: mncc.h:24
gsm_mncc_bearer_cap::async
int async
Definition: mncc.h:22
gsm_mncc_bearer_cap::user_rate
enum gsm48_bcap_user_rate user_rate
Definition: mncc.h:25
gsm_mncc_bearer_cap::coding
int coding
Definition: mncc.h:15
gsm_mncc_bearer_cap::sig_access
enum gsm48_bcap_sig_access sig_access
Definition: mncc.h:21
gsm_mncc_bearer_cap::modem_type
enum gsm48_bcap_modem_type modem_type
Definition: mncc.h:29
gsm_mncc_cause
Definition: mncc.h:41
gsm_mncc_cause::rec_val
int rec_val
Definition: mncc.h:45
gsm_mncc_cause::value
int value
Definition: mncc.h:46
gsm_mncc_cause::diag_len
int diag_len
Definition: mncc.h:47
gsm_mncc_cause::diag
char diag[32]
Definition: mncc.h:48
gsm_mncc_cause::location
int location
Definition: mncc.h:42
gsm_mncc_cause::coding
int coding
Definition: mncc.h:43
gsm_mncc_cause::rec
int rec
Definition: mncc.h:44
gsm_mncc_cccap
Definition: mncc.h:72
gsm_mncc_cccap::pcp
int pcp
Definition: mncc.h:74
gsm_mncc_cccap::dtmf
int dtmf
Definition: mncc.h:73
gsm_mncc_facility
Definition: mncc.h:62
gsm_mncc_facility::info
char info[GSM_MAX_FACILITY]
Definition: mncc.h:64
gsm_mncc_facility::len
int len
Definition: mncc.h:63
gsm_mncc_number
Definition: mncc.h:33
gsm_mncc_number::plan
int plan
Definition: mncc.h:35
gsm_mncc_number::screen
int screen
Definition: mncc.h:37
gsm_mncc_number::type
int type
Definition: mncc.h:34
gsm_mncc_number::number
char number[33]
Definition: mncc.h:38
gsm_mncc_number::present
int present
Definition: mncc.h:36
gsm_mncc_progress
Definition: mncc.h:56
gsm_mncc_progress::location
int location
Definition: mncc.h:58
gsm_mncc_progress::coding
int coding
Definition: mncc.h:57
gsm_mncc_progress::descr
int descr
Definition: mncc.h:59
gsm_mncc_ssversion
Definition: mncc.h:67
gsm_mncc_ssversion::info
char info[GSM_MAX_SSVERSION]
Definition: mncc.h:69
gsm_mncc_ssversion::len
int len
Definition: mncc.h:68
gsm_mncc_useruser
Definition: mncc.h:51
gsm_mncc_useruser::info
char info[GSM_MAX_USERUSER+1]
Definition: mncc.h:53
gsm_mncc_useruser::proto
int proto
Definition: mncc.h:52
msgb
value_string