annotate include/mncc.h @ 7:d0b86b144577

top Makefile: add mtctest
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 09 Jun 2024 01:56:27 +0000
parents b161dbfffdaa
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 /*
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2 * This header file defines the MNCC interface for passing call control
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
3 * into and out of Osmocom GSM network. It has been put together by
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4 * assembling bits from several different Osmocom header files.
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
5 */
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7 #ifndef __MNCC_H
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
8 #define __MNCC_H
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
9
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10 #define GSM_MAX_FACILITY 128
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11 #define GSM_MAX_SSVERSION 128
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
12 #define GSM_MAX_USERUSER 128
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14 /* GSM 04.08 Bearer Capability: Information Transfer Capability */
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
15 enum gsm48_bcap_itcap {
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
16 GSM48_BCAP_ITCAP_SPEECH = 0,
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17 GSM48_BCAP_ITCAP_UNR_DIG_INF = 1,
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18 GSM48_BCAP_ITCAP_3k1_AUDIO = 2,
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
19 GSM48_BCAP_ITCAP_FAX_G3 = 3,
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
20 GSM48_BCAP_ITCAP_OTHER = 5,
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21 GSM48_BCAP_ITCAP_RESERVED = 7,
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
22 };
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
23
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
24 /* GSM 04.08 Bearer Capability: Transfer Mode */
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
25 enum gsm48_bcap_tmod {
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
26 GSM48_BCAP_TMOD_CIRCUIT = 0,
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
27 GSM48_BCAP_TMOD_PACKET = 1,
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
28 };
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
29
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
30 /* GSM 04.08 Bearer Capability: Coding Standard */
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
31 enum gsm48_bcap_coding {
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
32 GSM48_BCAP_CODING_GSM_STD = 0,
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
33 };
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
34
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
35 /* GSM 04.08 Bearer Capability: Radio Channel Requirements */
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
36 enum gsm48_bcap_rrq {
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
37 GSM48_BCAP_RRQ_FR_ONLY = 1,
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
38 GSM48_BCAP_RRQ_DUAL_HR = 2,
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
39 GSM48_BCAP_RRQ_DUAL_FR = 3,
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
40 };
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
41
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
42 /* GSM 04.08 Bearer Capability: Rate Adaption */
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
43 enum gsm48_bcap_ra {
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
44 GSM48_BCAP_RA_NONE = 0,
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
45 GSM48_BCAP_RA_V110_X30 = 1,
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
46 GSM48_BCAP_RA_X31 = 2,
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
47 GSM48_BCAP_RA_OTHER = 3,
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
48 };
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
49
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
50 /* GSM 04.08 Bearer Capability: Signalling access protocol */
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
51 enum gsm48_bcap_sig_access {
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
52 GSM48_BCAP_SA_I440_I450 = 1,
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
53 GSM48_BCAP_SA_X21 = 2,
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
54 GSM48_BCAP_SA_X28_DP_IN = 3,
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
55 GSM48_BCAP_SA_X28_DP_UN = 4,
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
56 GSM48_BCAP_SA_X28_NDP = 5,
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
57 GSM48_BCAP_SA_X32 = 6,
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
58 };
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
59
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
60 /* GSM 04.08 Bearer Capability: User Rate */
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
61 enum gsm48_bcap_user_rate {
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
62 GSM48_BCAP_UR_300 = 1,
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
63 GSM48_BCAP_UR_1200 = 2,
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
64 GSM48_BCAP_UR_2400 = 3,
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
65 GSM48_BCAP_UR_4800 = 4,
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
66 GSM48_BCAP_UR_9600 = 5,
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
67 GSM48_BCAP_UR_12000 = 6,
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
68 GSM48_BCAP_UR_1200_75 = 7,
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
69 };
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
70
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
71 /* GSM 04.08 Bearer Capability: Parity */
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
72 enum gsm48_bcap_parity {
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
73 GSM48_BCAP_PAR_ODD = 0,
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
74 GSM48_BCAP_PAR_EVEN = 2,
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
75 GSM48_BCAP_PAR_NONE = 3,
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
76 GSM48_BCAP_PAR_ZERO = 4,
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
77 GSM48_BCAP_PAR_ONE = 5,
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
78 };
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
79
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
80 /* GSM 04.08 Bearer Capability: Intermediate Rate */
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
81 enum gsm48_bcap_interm_rate {
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
82 GSM48_BCAP_IR_8k = 2,
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
83 GSM48_BCAP_IR_16k = 3,
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
84 };
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
85
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
86 /* GSM 04.08 Bearer Capability: Transparency */
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
87 enum gsm48_bcap_transp {
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
88 GSM48_BCAP_TR_TRANSP = 0,
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
89 GSM48_BCAP_TR_RLP = 1,
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
90 GSM48_BCAP_TR_TR_PREF = 2,
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
91 GSM48_BCAP_TR_RLP_PREF = 3,
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
92 };
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
93
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
94 /* GSM 04.08 Bearer Capability: Modem Type */
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
95 enum gsm48_bcap_modem_type {
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
96 GSM48_BCAP_MT_NONE = 0,
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
97 GSM48_BCAP_MT_V21 = 1,
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
98 GSM48_BCAP_MT_V22 = 2,
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
99 GSM48_BCAP_MT_V22bis = 3,
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
100 GSM48_BCAP_MT_V23 = 4,
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
101 GSM48_BCAP_MT_V26ter = 5,
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
102 GSM48_BCAP_MT_V32 = 6,
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
103 GSM48_BCAP_MT_UNDEF = 7,
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
104 GSM48_BCAP_MT_AUTO_1 = 8,
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
105 };
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
106
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
107 /*! GSM 04.08 Bearer Capability: Speech Version Indication
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
108 * (See also 3GPP TS 24.008, Table 10.5.103) */
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
109 enum gsm48_bcap_speech_ver {
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
110 GSM48_BCAP_SV_FR = 0, /*!< GSM FR V1 (GSM FR) */
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
111 GSM48_BCAP_SV_HR = 1, /*!< GSM HR V1 (GSM HR) */
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
112 GSM48_BCAP_SV_EFR = 2, /*!< GSM FR V2 (GSM EFR) */
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
113 GSM48_BCAP_SV_AMR_F = 4, /*!< GSM FR V3 (FR AMR) */
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
114 GSM48_BCAP_SV_AMR_H = 5, /*!< GSM HR V3 (HR_AMR) */
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
115 GSM48_BCAP_SV_AMR_OFW = 6, /*!< GSM FR V4 (OFR AMR-WB) */
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
116 GSM48_BCAP_SV_AMR_OHW = 7, /*!< GSM HR V4 (OHR AMR-WB) */
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
117 GSM48_BCAP_SV_AMR_FW = 8, /*!< GSM FR V5 (FR AMR-WB) */
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
118 GSM48_BCAP_SV_AMR_OH = 11, /*!< GSM HR V6 (OHR AMR) */
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
119 };
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
120
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
121 /* Expanded fields from GSM TS 04.08, Table 10.5.102 */
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
122 struct gsm_mncc_bearer_cap {
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
123 int transfer; /* Information Transfer Capability, see enum gsm48_bcap_itcap. */
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
124 int mode; /* Transfer Mode, see enum gsm48_bcap_tmod. */
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
125 int coding; /* Coding Standard, see enum gsm48_bcap_coding.*/
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
126 int radio; /* Radio Channel Requirement, see enum gsm48_bcap_rrq. */
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
127 int speech_ctm; /* CTM text telephony indication */
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
128 int speech_ver[8]; /* Speech version indication, see enum gsm48_bcap_speech_ver; -1 marks end */
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
129 struct {
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
130 enum gsm48_bcap_ra rate_adaption;
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
131 enum gsm48_bcap_sig_access sig_access;
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
132 int async;
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
133 int nr_stop_bits;
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
134 int nr_data_bits;
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
135 enum gsm48_bcap_user_rate user_rate;
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
136 enum gsm48_bcap_parity parity;
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
137 enum gsm48_bcap_interm_rate interm_rate;
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
138 enum gsm48_bcap_transp transp;
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
139 enum gsm48_bcap_modem_type modem_type;
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
140 } data;
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
141 };
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
142
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
143 struct gsm_mncc_number {
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
144 int type;
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
145 int plan;
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
146 int present;
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
147 int screen;
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
148 char number[33];
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
149 };
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
150
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
151 struct gsm_mncc_cause {
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
152 int location;
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
153 int coding;
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
154 int rec;
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
155 int rec_val;
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
156 int value;
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
157 int diag_len;
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
158 char diag[32];
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
159 };
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
160
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
161 struct gsm_mncc_useruser {
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
162 int proto;
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
163 char info[GSM_MAX_USERUSER + 1]; /* + termination char */
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
164 };
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
165
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
166 struct gsm_mncc_progress {
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
167 int coding;
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
168 int location;
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
169 int descr;
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
170 };
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
171
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
172 struct gsm_mncc_facility {
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
173 int len;
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
174 char info[GSM_MAX_FACILITY];
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
175 };
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
176
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
177 struct gsm_mncc_ssversion {
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
178 int len;
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
179 char info[GSM_MAX_SSVERSION];
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
180 };
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
181
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
182 struct gsm_mncc_cccap {
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
183 int dtmf;
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
184 int pcp;
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
185 };
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
186
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
187 #define MNCC_SETUP_REQ 0x0101
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
188 #define MNCC_SETUP_IND 0x0102
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
189 #define MNCC_SETUP_RSP 0x0103
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
190 #define MNCC_SETUP_CNF 0x0104
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
191 #define MNCC_SETUP_COMPL_REQ 0x0105
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
192 #define MNCC_SETUP_COMPL_IND 0x0106
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
193 /* MNCC_REJ_* is performed via MNCC_REL_* */
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
194 #define MNCC_CALL_CONF_IND 0x0107
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
195 #define MNCC_CALL_PROC_REQ 0x0108
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
196 #define MNCC_PROGRESS_REQ 0x0109
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
197 #define MNCC_ALERT_REQ 0x010a
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
198 #define MNCC_ALERT_IND 0x010b
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
199 #define MNCC_NOTIFY_REQ 0x010c
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
200 #define MNCC_NOTIFY_IND 0x010d
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
201 #define MNCC_DISC_REQ 0x010e
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
202 #define MNCC_DISC_IND 0x010f
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
203 #define MNCC_REL_REQ 0x0110
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
204 #define MNCC_REL_IND 0x0111
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
205 #define MNCC_REL_CNF 0x0112
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
206 #define MNCC_FACILITY_REQ 0x0113
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
207 #define MNCC_FACILITY_IND 0x0114
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
208 #define MNCC_START_DTMF_IND 0x0115
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
209 #define MNCC_START_DTMF_RSP 0x0116
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
210 #define MNCC_START_DTMF_REJ 0x0117
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
211 #define MNCC_STOP_DTMF_IND 0x0118
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
212 #define MNCC_STOP_DTMF_RSP 0x0119
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
213 #define MNCC_MODIFY_REQ 0x011a
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
214 #define MNCC_MODIFY_IND 0x011b
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
215 #define MNCC_MODIFY_RSP 0x011c
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
216 #define MNCC_MODIFY_CNF 0x011d
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
217 #define MNCC_MODIFY_REJ 0x011e
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
218 #define MNCC_HOLD_IND 0x011f
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
219 #define MNCC_HOLD_CNF 0x0120
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
220 #define MNCC_HOLD_REJ 0x0121
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
221 #define MNCC_RETRIEVE_IND 0x0122
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
222 #define MNCC_RETRIEVE_CNF 0x0123
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
223 #define MNCC_RETRIEVE_REJ 0x0124
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
224 #define MNCC_USERINFO_REQ 0x0125
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
225 #define MNCC_USERINFO_IND 0x0126
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
226 #define MNCC_REJ_REQ 0x0127
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
227 #define MNCC_REJ_IND 0x0128
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
228
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
229 #define MNCC_BRIDGE 0x0200
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
230 #define MNCC_FRAME_RECV 0x0201
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
231 #define MNCC_FRAME_DROP 0x0202
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
232 #define MNCC_LCHAN_MODIFY 0x0203
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
233 #define MNCC_RTP_CREATE 0x0204
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
234 #define MNCC_RTP_CONNECT 0x0205
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
235 #define MNCC_RTP_FREE 0x0206
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
236
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
237 #define GSM_TCHF_FRAME 0x0300
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
238 #define GSM_TCHF_FRAME_EFR 0x0301
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
239 #define GSM_TCHH_FRAME 0x0302
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
240 #define GSM_TCH_FRAME_AMR 0x0303
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
241 #define GSM_BAD_FRAME 0x03ff
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
242
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
243 #define MNCC_SOCKET_HELLO 0x0400
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
244
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
245 #define MNCC_F_BEARER_CAP 0x0001
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
246 #define MNCC_F_CALLED 0x0002
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
247 #define MNCC_F_CALLING 0x0004
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
248 #define MNCC_F_REDIRECTING 0x0008
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
249 #define MNCC_F_CONNECTED 0x0010
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
250 #define MNCC_F_CAUSE 0x0020
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
251 #define MNCC_F_USERUSER 0x0040
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
252 #define MNCC_F_PROGRESS 0x0080
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
253 #define MNCC_F_EMERGENCY 0x0100
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
254 #define MNCC_F_FACILITY 0x0200
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
255 #define MNCC_F_SSVERSION 0x0400
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
256 #define MNCC_F_CCCAP 0x0800
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
257 #define MNCC_F_KEYPAD 0x1000
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
258 #define MNCC_F_SIGNAL 0x2000
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
259 #define MNCC_F_GCR 0x4000
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
260
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
261 struct gsm_mncc {
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
262 /* context based information */
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
263 uint32_t msg_type;
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
264 uint32_t callref;
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
265
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
266 /* which fields are present */
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
267 uint32_t fields;
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
268
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
269 /* data derived information (MNCC_F_ based) */
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
270 struct gsm_mncc_bearer_cap bearer_cap;
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
271 struct gsm_mncc_number called;
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
272 struct gsm_mncc_number calling;
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
273 struct gsm_mncc_number redirecting;
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
274 struct gsm_mncc_number connected;
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
275 struct gsm_mncc_cause cause;
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
276 struct gsm_mncc_progress progress;
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
277 struct gsm_mncc_useruser useruser;
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
278 struct gsm_mncc_facility facility;
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
279 struct gsm_mncc_cccap cccap;
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
280 struct gsm_mncc_ssversion ssversion;
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
281 struct {
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
282 int sup;
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
283 int inv;
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
284 } clir;
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
285 int signal;
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
286
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
287 /* data derived information, not MNCC_F based */
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
288 int keypad;
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
289 int more;
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
290 int notify; /* 0..127 */
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
291 int emergency;
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
292 char imsi[16];
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
293
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
294 unsigned char lchan_type;
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
295 unsigned char lchan_mode;
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
296
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
297 /* Global Call Reference (encoded as per 3GPP TS 29.205) */
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
298 uint8_t gcr[16];
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
299
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
300 /* A buffer to contain SDP ('\0' terminated) */
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
301 char sdp[1024];
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
302 };
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
303
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
304 struct gsm_data_frame {
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
305 uint32_t msg_type;
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
306 uint32_t callref;
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
307 unsigned char data[0];
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
308 };
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
309
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
310 #define MNCC_SOCK_VERSION 8
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
311 struct gsm_mncc_hello {
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
312 uint32_t msg_type;
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
313 uint32_t version;
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
314
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
315 /* send the sizes of the structs */
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
316 uint32_t mncc_size;
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
317 uint32_t data_frame_size;
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
318
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
319 /* send some offsets */
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
320 uint32_t called_offset;
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
321 uint32_t signal_offset;
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
322 uint32_t emergency_offset;
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
323 uint32_t lchan_type_offset;
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
324 };
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
325
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
326 struct gsm_mncc_rtp {
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
327 uint32_t msg_type;
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
328 uint32_t callref;
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
329 struct sockaddr_storage addr;
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
330 uint32_t payload_type;
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
331 uint32_t payload_msg_type;
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
332 char sdp[1024];
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
333 };
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
334
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
335 struct gsm_mncc_bridge {
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
336 uint32_t msg_type;
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
337 uint32_t callref[2];
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
338 };
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
339
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
340 union mncc_msg {
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
341 uint32_t msg_type;
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
342 struct gsm_mncc signal;
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
343 struct gsm_mncc_hello hello;
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
344 struct gsm_data_frame data_frame;
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
345 struct gsm_mncc_rtp rtp;
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
346 struct gsm_mncc_bridge bridge;
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
347 };
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
348
b161dbfffdaa include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
349 #endif /* include guard */