aboutsummaryrefslogtreecommitdiffstats
path: root/include/osmocom/gsm/protocol/gsm_44_318.h
blob: e5f85d57d9a9c7bc9e100443bccabf2ab9eed7dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
#ifndef PROTO_GSM_44_318_H
#define PROTO_GSM_44_318_H

#include <stdint.h>

/* Definitions according to 3GPP TS 44.318 6.8.0 Release 6 */

/* Table 11.1.1.2.1: Protocol Discriminator */
enum gan_pdisc {
	GA_PDISC_RC			= 0,
	GA_PDISC_CSR			= 1,
	GA_PDISC_PSR			= 2,
};

/* Table 11.1.1.4.1: Message types for URR */

enum gan_msg_type {
	GA_MT_RC_DISCOVERY_REQUEST	= 0x01,
	GA_MT_RC_DISCOVERY_ACCEPT	= 0x02,
	GA_MT_RC_DISCOVERY_REJECT	= 0x03,

	GA_MT_RC_REGISTER_REQUEST	= 0x10,
	GA_MT_RC_REGISTER_ACCEPT	= 0x11,
	GA_MT_RC_REGISTER_REDIRECT	= 0x12,
	GA_MT_RC_REGISTER_REJECT	= 0x13,
	GA_MT_RC_DEREGISTER		= 0x14,
	GA_MT_RC_REGISTER_UPDATE_UL	= 0x15,
	GA_MT_RC_REGISTER_UPDATE_DL	= 0x16,
	GA_MT_RC_CELL_BCAST_INFO	= 0x17,

	GA_MT_CSR_CIPH_MODE_CMD		= 0x20,
	GA_MT_CSR_CIPH_MODE_COMPL	= 0x21,

	GA_MT_CSR_ACT_CHAN		= 0x30,
	GA_MT_CSR_ACT_CHAN_ACK		= 0x31,
	GA_MT_CSR_ACT_CHAN_COMPL	= 0x32,
	GA_MT_CSR_ACT_CHAN_FAIL		= 0x33,
	GA_MT_CSR_CHAN_MODE_MOD		= 0x34,
	GA_MT_CSR_CHAN_MODE_MOD_ACK	= 0x35,

	GA_MT_CSR_RELEASE		= 0x40,
	GA_MT_CSR_RELEASE_COMPL		= 0x41,
	GA_MT_CSR_CLEAR_REQ		= 0x42,

	GA_MT_CSR_HO_ACCESS		= 0x50,
	GA_MT_CSR_HO_COMPL		= 0x51,
	GA_MT_CSR_UL_QUAL_IND		= 0x52,
	GA_MT_CSR_HO_INFO		= 0x53,
	GA_MT_CSR_HO_CMD		= 0x54,
	GA_MT_CSR_HO_FAIL		= 0x55,

	GA_MT_CSR_PAGING_REQ		= 0x60,
	GA_MT_CSR_PAGING_RESP		= 0x61,

	GA_MT_CSR_UL_DIRECT_XFER	= 0x70,
	GA_MT_CSR_DL_DIRECT_XFER	= 0x72,
	GA_MT_CSR_STATUS		= 0x73,
	GA_MT_RC_KEEPALIVE		= 0x74,
	GA_MT_CSR_CM_ENQ		= 0x75,
	GA_MT_CSR_CM_CHANGE		= 0x76,

	GA_MT_CSR_REQUEST		= 0x80,
	GA_MT_CSR_REQUEST_ACCEPT	= 0x81,
	GA_MT_CSR_REQUEST_REJECT	= 0x82,
};

/* All tables in 10.1.x and 10.2.x / Table 11.2.1 */
enum gan_iei {
	GA_IE_MI		= 1,
	GA_IE_GAN_RELEASE_IND	= 2,
	GA_IE_RADIO_IE		= 3,
	GA_IE_GERAN_CELL_ID	= 4,
	GA_IE_LAC		= 5,
	GA_IE_GERAN_COV_IND	= 6,
	GA_IE_GAN_CM		= 7,
	GA_IE_GEO_LOC		= 8,
	GA_IE_DEF_SEGW_IP	= 9,
	GA_IE_DEF_SEGW_FQDN	= 10,
	GA_IE_REDIR_CTR		= 11,
	GA_IE_DISCOV_REJ_CAUSE	= 12,
	GA_IE_GANC_CELL_DESC	= 13,
	GA_IE_GANC_CTRL_CH_DESC	= 14,
	GA_IE_GERAN_CELL_ID_LIST= 15,
	GA_IE_TU3907_TIMER	= 16,
	GA_IE_RR_STATE		= 17,
	GA_IE_RAI		= 18,
	GA_IE_GAN_BAND		= 19,
	GA_IE_GARC_GACSR_STATE	= 20,
	GA_IE_REG_REJ_CAUSE	= 21,
	GA_IE_TU3906_TIMER	= 22,
	GA_IE_TU3910_TIMER	= 23,
	GA_IE_TU3902_TIMER	= 24,
	GA_IE_L3_MSG		= 26,
	GA_IE_CHAN_MODE		= 27,
	GA_IE_MS_CLASSMARK2	= 28,
	GA_IE_RR_CAUSE		= 29,
	GA_EI_CIPH_MODE_SET	= 30,
	GA_IE_GPRS_RESUMPTION	= 31,
	GA_IE_HO_FROM_GAN_CMD	= 32,
	GA_IE_UL_QUAL_IND	= 33,
	GA_IE_TLLI		= 34,
	GA_IE_PFI		= 35,
	GA_IE_SUSP_CAUSE	= 36,
	GA_IE_TU3820_TIMER	= 37,
	GA_IE_REQD_QOS		= 38,
	GA_IE_P_DEACT_CAUSE	= 39,
	GA_IE_REQD_UL_RATE	= 40,
	GA_IE_RAC		= 41,
	GA_IE_AP_LOCATION	= 42,
	GA_IE_TU4001_TIMER	= 43,
	GA_IE_LOC_STATUS	= 44,
	GA_IE_CIPH_RESP		= 45,
	GA_IE_CIPH_RAND		= 46,
	GA_IE_CIPH_MAC		= 47,
	GA_IE_CKSN		= 48,
	GA_IE_SAPI_ID		= 49,
	GA_IE_EST_CAUSE		= 50,
	GA_IE_CHAN_NEEDED	= 51,
	GA_IE_PDU_IN_ERROR	= 52,
	GA_IE_SAMPLE_SIZE	= 53,
	GA_IE_PAYLOAD_TYPE	= 54,
	GA_IE_MULTIRATE_CONF	= 55,
	GA_IE_MS_CLASSMARK3	= 56,
	GA_IE_LLC_PDU		= 57,
	GA_IE_LOC_BLACKL_IND	= 58,
	GA_IE_RESET_IND		= 59,
	GA_IE_TU4003_TIMER	= 60,
	GA_IE_AP_SERV_NAME	= 61,
	GA_IE_SERV_ZONE_INFO	= 62,
	GA_IE_RTP_RED_CONF	= 63,
	GA_IE_UTRAN_CLASSMARK	= 64,
	GA_IE_CM_ENQ_MASK	= 65,
	GA_IE_UTRAN_CELLID_LIST = 66,
	GA_IE_SERV_GANC_TBL_IND	= 67,
	GA_IE_AP_REG_IND	= 68,
	GA_IE_GAN_PLMN_LIST	= 69,
	GA_IE_REQD_GAN_SERV	= 71,
	GA_IE_BCAST_CONTAINER	= 72,
	GA_IE_3G_CELL_ID	= 73,
	GA_IE_MS_RADIO_ID	= 96,
	GA_IE_DEF_GANC_IP	= 97,
	GA_IE_DEF_GANC_FQDN	= 98,
	GA_IE_GPRS_IP_ADDR	= 99,
	GA_IE_GPRS_UDP_PORT	= 100,
	GA_IE_GANC_TCP_PORT	= 103,
	GA_IE_RTP_UDP_PORT	= 104,
	GA_IE_RTCP_UDP_PORT	= 105,
	GA_IE_GERAN_RCV_SIGL_LIST = 106,
	GA_IE_UTRAN_RCV_SIGL_LIST = 107,
};

/* 11.1.1 GA-RC and GA-CSR Message header IE */
struct gan_rc_csr_hdr {
	uint16_t len;
	uint8_t pdisc:4,
		skip_ind:4;
	uint8_t msg_type;
	uint8_t data[0];
} __attribute__((packed));

/* 11.2.14.1: GAN Control Channel Description IE */
struct gan_cch_desc_ie {
	uint8_t mscr:1,
		att:1,
		dtm:1,
		gprs:1,
		nmo:2,
		ecmc:1,
		spare:1;
	uint16_t t3212;
	uint8_t rac;
	uint8_t spare2:2,
		tgecs:2,
		pfcfm:1,
		re:1,
		ecmp:1,
		sgsnr:1;
	uint8_t access_class[2];
} __attribute__((packed));
#endif /* PROTO_GSM_44_318_H */