blob: a51267e0a1c3c70039880e0338504b7ddd9237d8 [file] [log] [blame]
Harald Welte1e908662010-03-07 23:39:54 +01001#ifndef _OSMOCORE_MNCC_H
2#define _OSMOCORE_MNCC_H
3
Harald Weltec8a0b932012-08-24 21:27:26 +02004#include <osmocom/gsm/protocol/gsm_04_08.h>
5
Harald Welte1e908662010-03-07 23:39:54 +01006#define GSM_MAX_FACILITY 128
7#define GSM_MAX_SSVERSION 128
8#define GSM_MAX_USERUSER 128
9
10/* Expanded fields from GSM TS 04.08, Table 10.5.102 */
11struct gsm_mncc_bearer_cap {
12 int transfer; /* Information Transfer Capability */
13 int mode; /* Transfer Mode */
14 int coding; /* Coding Standard */
15 int radio; /* Radio Channel Requirement */
16 int speech_ctm; /* CTM text telephony indication */
17 int speech_ver[8]; /* Speech version indication */
Harald Weltec8a0b932012-08-24 21:27:26 +020018 struct {
19 enum gsm48_bcap_ra rate_adaption;
20 enum gsm48_bcap_sig_access sig_access;
21 int async;
22 int nr_stop_bits;
23 int nr_data_bits;
24 enum gsm48_bcap_user_rate user_rate;
25 enum gsm48_bcap_parity parity;
26 enum gsm48_bcap_interm_rate interm_rate;
27 enum gsm48_bcap_transp transp;
28 enum gsm48_bcap_modem_type modem_type;
29 } data;
Harald Welte1e908662010-03-07 23:39:54 +010030};
31
32struct gsm_mncc_number {
33 int type;
34 int plan;
35 int present;
36 int screen;
37 char number[33];
38};
39
40struct gsm_mncc_cause {
41 int location;
42 int coding;
43 int rec;
44 int rec_val;
45 int value;
46 int diag_len;
47 char diag[32];
48};
49
50struct gsm_mncc_useruser {
51 int proto;
52 char info[GSM_MAX_USERUSER + 1]; /* + termination char */
53};
54
55struct gsm_mncc_progress {
56 int coding;
57 int location;
58 int descr;
59};
60
61struct gsm_mncc_facility {
62 int len;
63 char info[GSM_MAX_FACILITY];
64};
65
66struct gsm_mncc_ssversion {
67 int len;
68 char info[GSM_MAX_SSVERSION];
69};
70
71struct gsm_mncc_cccap {
72 int dtmf;
73 int pcp;
74};
75
76enum {
77 GSM_MNCC_BCAP_SPEECH = 0,
78 GSM_MNCC_BCAP_UNR_DIG = 1,
79 GSM_MNCC_BCAP_AUDIO = 2,
80 GSM_MNCC_BCAP_FAX_G3 = 3,
81 GSM_MNCC_BCAP_OTHER_ITC = 5,
82 GSM_MNCC_BCAP_RESERVED = 7,
83};
84
85#endif