blob: 5c00ea00eaf8f74eb128c57c42cc6ed644f84aa4 [file] [log] [blame]
Harald Welte82f94ef2016-05-05 23:33:27 +02001/* (C) 2009-2016 by Harald Welte <laforge@gnumonks.org>
Harald Welte64f38c02016-04-20 17:12:24 +02002 * (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" },
Harald Welte82f94ef2016-05-05 23:33:27 +020033 { GMM_CAUSE_IMEI_NOT_ACCEPTED, "IMEI not accepted" },
Harald Welte64f38c02016-04-20 17:12:24 +020034 { GMM_CAUSE_ILLEGAL_ME, "Illegal ME" },
35 { GMM_CAUSE_GPRS_NOTALLOWED, "GPRS services not allowed" },
36 { GMM_CAUSE_GPRS_OTHER_NOTALLOWED,
37 "GPRS services and non-GPRS services not allowed" },
38 { GMM_CAUSE_MS_ID_NOT_DERIVED,
39 "MS identity cannot be derived by the network" },
40 { GMM_CAUSE_IMPL_DETACHED, "Implicitly detached" },
41 { GMM_CAUSE_PLMN_NOTALLOWED, "PLMN not allowed" },
42 { GMM_CAUSE_LA_NOTALLOWED, "Location Area not allowed" },
43 { GMM_CAUSE_ROAMING_NOTALLOWED,
44 "Roaming not allowed in this location area" },
45 { GMM_CAUSE_NO_GPRS_PLMN,
46 "GPRS services not allowed in this PLMN" },
Harald Welte82f94ef2016-05-05 23:33:27 +020047 { GMM_CAUSE_NO_SUIT_CELL_IN_LA, "No suitable cell in LA" },
Harald Welte64f38c02016-04-20 17:12:24 +020048 { GMM_CAUSE_MSC_TEMP_NOTREACH, "MSC temporarily not reachable" },
49 { GMM_CAUSE_NET_FAIL, "Network failure" },
Harald Welte82f94ef2016-05-05 23:33:27 +020050 { GMM_CAUSE_MAC_FAIL, "MAC failure" },
51 { GMM_CAUSE_SYNC_FAIL, "SYNC failure" },
Harald Welte64f38c02016-04-20 17:12:24 +020052 { GMM_CAUSE_CONGESTION, "Congestion" },
Harald Welte82f94ef2016-05-05 23:33:27 +020053 { GMM_CAUSE_GSM_AUTH_UNACCEPT, "GSM authentication unacceptable" },
54 { GMM_CAUSE_NOT_AUTH_FOR_CSG, "Not authorized for this CSG" },
55 { GMM_CAUSE_SMS_VIA_GPRS_IN_RA, "SMS provided via GPRS in this RA" },
56 { GMM_CAUSE_NO_PDP_ACTIVATED, "No PDP context activated" },
Harald Welte64f38c02016-04-20 17:12:24 +020057 { GMM_CAUSE_SEM_INCORR_MSG, "Semantically incorrect message" },
58 { GMM_CAUSE_INV_MAND_INFO, "Invalid mandatory information" },
59 { GMM_CAUSE_MSGT_NOTEXIST_NOTIMPL,
60 "Message type non-existant or not implemented" },
61 { GMM_CAUSE_MSGT_INCOMP_P_STATE,
62 "Message type not compatible with protocol state" },
63 { GMM_CAUSE_IE_NOTEXIST_NOTIMPL,
64 "Information element non-existent or not implemented" },
65 { GMM_CAUSE_COND_IE_ERR, "Conditional IE error" },
66 { GMM_CAUSE_MSG_INCOMP_P_STATE,
67 "Message not compatible with protocol state " },
68 { GMM_CAUSE_PROTO_ERR_UNSPEC, "Protocol error, unspecified" },
69 { 0, NULL }
70};
71
72const struct value_string *gsm48_gmm_cause_names = gsm48_gmm_cause_names_;
73
74/* 10.5.6.6 SM Cause / Table 10.5.157 */
75const struct value_string gsm48_gsm_cause_names_[] = {
76 { GSM_CAUSE_INSUFF_RSRC, "Insufficient resources" },
77 { GSM_CAUSE_MISSING_APN, "Missing or unknown APN" },
78 { GSM_CAUSE_UNKNOWN_PDP, "Unknown PDP address or PDP type" },
79 { GSM_CAUSE_AUTH_FAILED, "User Authentication failed" },
80 { GSM_CAUSE_ACT_REJ_GGSN, "Activation rejected by GGSN" },
81 { GSM_CAUSE_ACT_REJ_UNSPEC, "Activation rejected, unspecified" },
82 { GSM_CAUSE_SERV_OPT_NOTSUPP, "Service option not supported" },
83 { GSM_CAUSE_REQ_SERV_OPT_NOTSUB,
84 "Requested service option not subscribed" },
85 { GSM_CAUSE_SERV_OPT_TEMP_OOO,
86 "Service option temporarily out of order" },
87 { GSM_CAUSE_NSAPI_IN_USE, "NSAPI already used" },
88 { GSM_CAUSE_DEACT_REGULAR, "Regular deactivation" },
89 { GSM_CAUSE_QOS_NOT_ACCEPTED, "QoS not accepted" },
90 { GSM_CAUSE_NET_FAIL, "Network Failure" },
91 { GSM_CAUSE_REACT_RQD, "Reactivation required" },
92 { GSM_CAUSE_FEATURE_NOTSUPP, "Feature not supported " },
93 { GSM_CAUSE_INVALID_TRANS_ID, "Invalid transaction identifier" },
94 { GSM_CAUSE_SEM_INCORR_MSG, "Semantically incorrect message" },
95 { GSM_CAUSE_INV_MAND_INFO, "Invalid mandatory information" },
96 { GSM_CAUSE_MSGT_NOTEXIST_NOTIMPL,
97 "Message type non-existant or not implemented" },
98 { GSM_CAUSE_MSGT_INCOMP_P_STATE,
99 "Message type not compatible with protocol state" },
100 { GSM_CAUSE_IE_NOTEXIST_NOTIMPL,
101 "Information element non-existent or not implemented" },
102 { GSM_CAUSE_COND_IE_ERR, "Conditional IE error" },
103 { GSM_CAUSE_MSG_INCOMP_P_STATE,
104 "Message not compatible with protocol state " },
105 { GSM_CAUSE_PROTO_ERR_UNSPEC, "Protocol error, unspecified" },
106 { 0, NULL }
107};
108
109const struct value_string *gsm48_gsm_cause_names = gsm48_gsm_cause_names_;
110
111/* 10.5.5.2 */
112const struct value_string gprs_att_t_strs_[] = {
113 { GPRS_ATT_T_ATTACH, "GPRS attach" },
114 { GPRS_ATT_T_ATT_WHILE_IMSI, "GPRS attach while IMSI attached" },
115 { GPRS_ATT_T_COMBINED, "Combined GPRS/IMSI attach" },
116 { 0, NULL }
117};
118
119const struct value_string *gprs_att_t_strs = gprs_att_t_strs_;
120
121const struct value_string gprs_upd_t_strs_[] = {
122 { GPRS_UPD_T_RA, "RA updating" },
123 { GPRS_UPD_T_RA_LA, "combined RA/LA updating" },
124 { GPRS_UPD_T_RA_LA_IMSI_ATT, "combined RA/LA updating + IMSI attach" },
125 { GPRS_UPD_T_PERIODIC, "periodic updating" },
126 { 0, NULL }
127};
128
129const struct value_string *gprs_upd_t_strs = gprs_upd_t_strs_;
130
131/* 10.5.5.5 */
132const struct value_string gprs_det_t_mo_strs_[] = {
133 { GPRS_DET_T_MO_GPRS, "GPRS detach" },
134 { GPRS_DET_T_MO_IMSI, "IMSI detach" },
135 { GPRS_DET_T_MO_COMBINED, "Combined GPRS/IMSI detach" },
136 { 0, NULL }
137};
138
139const struct value_string *gprs_det_t_mo_strs = gprs_det_t_mo_strs_;
140
141const struct value_string gprs_det_t_mt_strs_[] = {
142 { GPRS_DET_T_MT_REATT_REQ, "re-attach required" },
143 { GPRS_DET_T_MT_REATT_NOTREQ, "re-attach not required" },
144 { GPRS_DET_T_MT_IMSI, "IMSI detach (after VLR failure)" },
145 { 0, NULL }
146};
147
148const struct value_string *gprs_det_t_mt_strs = gprs_det_t_mt_strs_;