blob: 6ce9415937f9d064e8670df2532e13b40f8a2cb5 [file] [log] [blame]
Harald Welte64f38c02016-04-20 17:12:24 +02001/* (C) 2009-2010 by Harald Welte <laforge@gnumonks.org>
2 * (C) 2010 by On-Waves
3 * (C) 2014-2015 by Sysmocom s.f.m.c. GmbH
4 *
5 * All Rights Reserved
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU Affero General Public License as published by
9 * the Free Software Foundation; either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU Affero General Public License for more details.
16 *
17 * You should have received a copy of the GNU Affero General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 *
20 */
21
22
23#include <osmocom/gsm/protocol/gsm_04_08_gprs.h>
24
25#include <osmocom/core/utils.h>
26
27/* Protocol related stuff, should go into libosmocore */
28
29/* 10.5.5.14 GPRS MM Cause / Table 10.5.147 */
30const struct value_string gsm48_gmm_cause_names_[] = {
31 { GMM_CAUSE_IMSI_UNKNOWN, "IMSI unknown in HLR" },
32 { GMM_CAUSE_ILLEGAL_MS, "Illegal MS" },
33 { GMM_CAUSE_ILLEGAL_ME, "Illegal ME" },
34 { GMM_CAUSE_GPRS_NOTALLOWED, "GPRS services not allowed" },
35 { GMM_CAUSE_GPRS_OTHER_NOTALLOWED,
36 "GPRS services and non-GPRS services not allowed" },
37 { GMM_CAUSE_MS_ID_NOT_DERIVED,
38 "MS identity cannot be derived by the network" },
39 { GMM_CAUSE_IMPL_DETACHED, "Implicitly detached" },
40 { GMM_CAUSE_PLMN_NOTALLOWED, "PLMN not allowed" },
41 { GMM_CAUSE_LA_NOTALLOWED, "Location Area not allowed" },
42 { GMM_CAUSE_ROAMING_NOTALLOWED,
43 "Roaming not allowed in this location area" },
44 { GMM_CAUSE_NO_GPRS_PLMN,
45 "GPRS services not allowed in this PLMN" },
46 { GMM_CAUSE_MSC_TEMP_NOTREACH, "MSC temporarily not reachable" },
47 { GMM_CAUSE_NET_FAIL, "Network failure" },
48 { GMM_CAUSE_CONGESTION, "Congestion" },
49 { GMM_CAUSE_SEM_INCORR_MSG, "Semantically incorrect message" },
50 { GMM_CAUSE_INV_MAND_INFO, "Invalid mandatory information" },
51 { GMM_CAUSE_MSGT_NOTEXIST_NOTIMPL,
52 "Message type non-existant or not implemented" },
53 { GMM_CAUSE_MSGT_INCOMP_P_STATE,
54 "Message type not compatible with protocol state" },
55 { GMM_CAUSE_IE_NOTEXIST_NOTIMPL,
56 "Information element non-existent or not implemented" },
57 { GMM_CAUSE_COND_IE_ERR, "Conditional IE error" },
58 { GMM_CAUSE_MSG_INCOMP_P_STATE,
59 "Message not compatible with protocol state " },
60 { GMM_CAUSE_PROTO_ERR_UNSPEC, "Protocol error, unspecified" },
61 { 0, NULL }
62};
63
64const struct value_string *gsm48_gmm_cause_names = gsm48_gmm_cause_names_;
65
66/* 10.5.6.6 SM Cause / Table 10.5.157 */
67const struct value_string gsm48_gsm_cause_names_[] = {
68 { GSM_CAUSE_INSUFF_RSRC, "Insufficient resources" },
69 { GSM_CAUSE_MISSING_APN, "Missing or unknown APN" },
70 { GSM_CAUSE_UNKNOWN_PDP, "Unknown PDP address or PDP type" },
71 { GSM_CAUSE_AUTH_FAILED, "User Authentication failed" },
72 { GSM_CAUSE_ACT_REJ_GGSN, "Activation rejected by GGSN" },
73 { GSM_CAUSE_ACT_REJ_UNSPEC, "Activation rejected, unspecified" },
74 { GSM_CAUSE_SERV_OPT_NOTSUPP, "Service option not supported" },
75 { GSM_CAUSE_REQ_SERV_OPT_NOTSUB,
76 "Requested service option not subscribed" },
77 { GSM_CAUSE_SERV_OPT_TEMP_OOO,
78 "Service option temporarily out of order" },
79 { GSM_CAUSE_NSAPI_IN_USE, "NSAPI already used" },
80 { GSM_CAUSE_DEACT_REGULAR, "Regular deactivation" },
81 { GSM_CAUSE_QOS_NOT_ACCEPTED, "QoS not accepted" },
82 { GSM_CAUSE_NET_FAIL, "Network Failure" },
83 { GSM_CAUSE_REACT_RQD, "Reactivation required" },
84 { GSM_CAUSE_FEATURE_NOTSUPP, "Feature not supported " },
85 { GSM_CAUSE_INVALID_TRANS_ID, "Invalid transaction identifier" },
86 { GSM_CAUSE_SEM_INCORR_MSG, "Semantically incorrect message" },
87 { GSM_CAUSE_INV_MAND_INFO, "Invalid mandatory information" },
88 { GSM_CAUSE_MSGT_NOTEXIST_NOTIMPL,
89 "Message type non-existant or not implemented" },
90 { GSM_CAUSE_MSGT_INCOMP_P_STATE,
91 "Message type not compatible with protocol state" },
92 { GSM_CAUSE_IE_NOTEXIST_NOTIMPL,
93 "Information element non-existent or not implemented" },
94 { GSM_CAUSE_COND_IE_ERR, "Conditional IE error" },
95 { GSM_CAUSE_MSG_INCOMP_P_STATE,
96 "Message not compatible with protocol state " },
97 { GSM_CAUSE_PROTO_ERR_UNSPEC, "Protocol error, unspecified" },
98 { 0, NULL }
99};
100
101const struct value_string *gsm48_gsm_cause_names = gsm48_gsm_cause_names_;
102
103/* 10.5.5.2 */
104const struct value_string gprs_att_t_strs_[] = {
105 { GPRS_ATT_T_ATTACH, "GPRS attach" },
106 { GPRS_ATT_T_ATT_WHILE_IMSI, "GPRS attach while IMSI attached" },
107 { GPRS_ATT_T_COMBINED, "Combined GPRS/IMSI attach" },
108 { 0, NULL }
109};
110
111const struct value_string *gprs_att_t_strs = gprs_att_t_strs_;
112
113const struct value_string gprs_upd_t_strs_[] = {
114 { GPRS_UPD_T_RA, "RA updating" },
115 { GPRS_UPD_T_RA_LA, "combined RA/LA updating" },
116 { GPRS_UPD_T_RA_LA_IMSI_ATT, "combined RA/LA updating + IMSI attach" },
117 { GPRS_UPD_T_PERIODIC, "periodic updating" },
118 { 0, NULL }
119};
120
121const struct value_string *gprs_upd_t_strs = gprs_upd_t_strs_;
122
123/* 10.5.5.5 */
124const struct value_string gprs_det_t_mo_strs_[] = {
125 { GPRS_DET_T_MO_GPRS, "GPRS detach" },
126 { GPRS_DET_T_MO_IMSI, "IMSI detach" },
127 { GPRS_DET_T_MO_COMBINED, "Combined GPRS/IMSI detach" },
128 { 0, NULL }
129};
130
131const struct value_string *gprs_det_t_mo_strs = gprs_det_t_mo_strs_;
132
133const struct value_string gprs_det_t_mt_strs_[] = {
134 { GPRS_DET_T_MT_REATT_REQ, "re-attach required" },
135 { GPRS_DET_T_MT_REATT_NOTREQ, "re-attach not required" },
136 { GPRS_DET_T_MT_IMSI, "IMSI detach (after VLR failure)" },
137 { 0, NULL }
138};
139
140const struct value_string *gprs_det_t_mt_strs = gprs_det_t_mt_strs_;