annotate include/mncc.h @ 240:c7a3ba56c636

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