libosmogsm 1.13.1.1-afb4 Osmocom GSM library

mncc.h
Go to the documentation of this file.
1
3#pragma once
4
5#include <osmocom/gsm/protocol/gsm_04_08.h>
6
7#define GSM_MAX_FACILITY 128
8#define GSM_MAX_SSVERSION 128
9#define GSM_MAX_USERUSER 128
10
11/* Expanded fields from GSM TS 04.08, Table 10.5.102 */
12 struct gsm_mncc_bearer_cap {
13 int transfer; /* Information Transfer Capability, see enum gsm48_bcap_itcap. */
14 int mode; /* Transfer Mode, see enum gsm48_bcap_tmod. */
15 int coding; /* Coding Standard, see enum gsm48_bcap_coding.*/
16 int radio; /* Radio Channel Requirement, see enum gsm48_bcap_rrq. */
17 int speech_ctm; /* CTM text telephony indication */
18 int speech_ver[8]; /* Speech version indication, see enum gsm48_bcap_speech_ver; -1 marks end */
19 struct {
20 enum gsm48_bcap_ra rate_adaption;
21 enum gsm48_bcap_sig_access sig_access;
22 int async;
23 int nr_stop_bits;
24 int nr_data_bits;
25 enum gsm48_bcap_user_rate user_rate;
26 enum gsm48_bcap_parity parity;
27 enum gsm48_bcap_interm_rate interm_rate;
28 enum gsm48_bcap_transp transp;
29 enum gsm48_bcap_modem_type modem_type;
30 } data;
31};
32
33 struct gsm_mncc_number {
34 int type;
35 int plan;
36 int present;
37 int screen;
38 char number[33];
39};
40
41 struct gsm_mncc_cause {
42 int location;
43 int coding;
44 int rec;
45 int rec_val;
46 int value;
47 int diag_len;
48 char diag[32];
49};
50
51 struct gsm_mncc_useruser {
52 int proto;
53 char info[GSM_MAX_USERUSER + 1]; /* + termination char */
54};
55
56 struct gsm_mncc_progress {
57 int coding;
58 int location;
59 int descr;
60};
61
62 struct gsm_mncc_facility {
63 int len;
64 char info[GSM_MAX_FACILITY];
65};
66
67 struct gsm_mncc_ssversion {
68 int len;
69 char info[GSM_MAX_SSVERSION];
70};
71
72 struct gsm_mncc_cccap {
73 int dtmf;
74 int pcp;
75};
76
77 enum {
78 GSM_MNCC_BCAP_SPEECH = 0,
79 GSM_MNCC_BCAP_UNR_DIG = 1,
80 GSM_MNCC_BCAP_AUDIO = 2,
81 GSM_MNCC_BCAP_FAX_G3 = 3,
82 GSM_MNCC_BCAP_OTHER_ITC = 5,
83 GSM_MNCC_BCAP_RESERVED = 7,
84};
85
86 struct msgb;
87 struct msgb *osmo_mncc_stringify(const uint8_t *msg, unsigned int len);
88
89 void _osmo_mncc_log(int subsys, int level, const char *file, int line, const char *prefix,
90 const uint8_t *msg, unsigned int len);
91
92#define osmo_mncc_log(ss, level, prefix, msg, len) \
93 _osmo_mncc_log(ss, level, __FILE__, __LINE__, prefix, msg, len);
94
95 extern const struct value_string osmo_mncc_names[];
96 static inline const char *osmo_mncc_name(uint32_t msg_type) {
97 return get_value_string(osmo_mncc_names, msg_type);
98}
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:2181
gsm48_bcap_parity
gsm48_bcap_parity
Definition: gsm_04_08.h:2192
gsm48_bcap_interm_rate
gsm48_bcap_interm_rate
Definition: gsm_04_08.h:2201
gsm48_bcap_transp
gsm48_bcap_transp
Definition: gsm_04_08.h:2207
gsm48_bcap_sig_access
gsm48_bcap_sig_access
Definition: gsm_04_08.h:2171
gsm48_bcap_modem_type
gsm48_bcap_modem_type
Definition: gsm_04_08.h:2215
gsm48_bcap_ra
gsm48_bcap_ra
Definition: gsm_04_08.h:2163
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
osmo_mncc_name
static const char * osmo_mncc_name(uint32_t msg_type)
Definition: mncc.h:96
GSM_MAX_USERUSER
#define GSM_MAX_USERUSER
Definition: mncc.h:9
GSM_MAX_SSVERSION
#define GSM_MAX_SSVERSION
Definition: mncc.h:8
osmo_mncc_stringify
struct msgb * osmo_mncc_stringify(const uint8_t *msg, unsigned int len)
osmo_mncc_names
const struct value_string osmo_mncc_names[]
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
_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_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::data
struct gsm_mncc_bearer_cap::@26 data
gsm_mncc_bearer_cap::parity
enum gsm48_bcap_parity parity
Definition: mncc.h:26
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