diff options
author | Harald Welte <laforge@gnumonks.org> | 2012-06-24 21:52:07 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2012-06-24 21:52:07 +0200 |
commit | c17f57053802c8b151df38169b73eef804ce2b3e (patch) | |
tree | 3df988e757ad70507357d934ea62ca57aa40c945 /src/gsm | |
parent | c2a25c67f8b423beb3b75d526044fd9f2cc5ac1a (diff) |
ganc: add value_strings for GAN message type and protocol discriminator
Diffstat (limited to 'src/gsm')
-rw-r--r-- | src/gsm/Makefile.am | 2 | ||||
-rw-r--r-- | src/gsm/gan.c | 77 | ||||
-rw-r--r-- | src/gsm/libosmogsm.map | 3 |
3 files changed, 81 insertions, 1 deletions
diff --git a/src/gsm/Makefile.am b/src/gsm/Makefile.am index 7796caff..167aeb7b 100644 --- a/src/gsm/Makefile.am +++ b/src/gsm/Makefile.am @@ -19,7 +19,7 @@ libosmogsm_la_SOURCES = a5.c rxlev_stat.c tlv_parser.c comp128.c gsm_utils.c \ lapd_core.c lapdm.c \ auth_core.c auth_comp128v1.c auth_milenage.c \ milenage/aes-encblock.c milenage/aes-internal.c \ - milenage/aes-internal-enc.c milenage/milenage.c + milenage/aes-internal-enc.c milenage/milenage.c gan.c libosmogsm_la_LDFLAGS = -Wl,--version-script=$(srcdir)/libosmogsm.map -version-info $(LIBVERSION) libosmogsm_la_LIBADD = $(top_builddir)/src/libosmocore.la diff --git a/src/gsm/gan.c b/src/gsm/gan.c new file mode 100644 index 00000000..e041936e --- /dev/null +++ b/src/gsm/gan.c @@ -0,0 +1,77 @@ +/* (C) 2012 by Harald Welte <laforge@gnumonks.org> + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ + +#include <unistd.h> +#include <osmocom/core/utils.h> + +#include <osmocom/gsm/protocol/gsm_44_318.h> + + +const struct value_string gan_msgt_vals[] = { + { GA_MT_RC_DISCOVERY_REQUEST, "GA-RC DISCOVERY REQUEST" }, + { GA_MT_RC_DISCOVERY_ACCEPT, "GA-RC DISCOVERY ACCEPT" }, + { GA_MT_RC_DISCOVERY_REJECT, "GA-RC DISCOVERY REJECT" }, + { GA_MT_RC_REGISTER_REQUEST, "GA-RC REGISTER REQUEST" }, + { GA_MT_RC_REGISTER_ACCEPT, "GA-RC REGISTER ACCEPT" }, + { GA_MT_RC_REGISTER_REDIRECT, "GA-RC REGISTER REDIRECT" }, + { GA_MT_RC_REGISTER_REJECT, "GA-RC REGISTER REJECT" }, + { GA_MT_RC_DEREGISTER, "GA-RC DEREGISTER" }, + { GA_MT_RC_REGISTER_UPDATE_UL, "GA-RC REGISTER UPDATE UL" }, + { GA_MT_RC_REGISTER_UPDATE_DL, "GA-RC REGISTER UPDATE DL" }, + { GA_MT_RC_CELL_BCAST_INFO, "GA-RC CELL BROADCAST INFO" }, + { GA_MT_CSR_CIPH_MODE_CMD, "GA-CSR CIPHER MDOE COMMAND" }, + { GA_MT_CSR_CIPH_MODE_COMPL, "GA-CSR CIPHER MODE COMPLETE" }, + { GA_MT_CSR_ACT_CHAN, "GA-CSR ACTIVATE CHANNEL" }, + { GA_MT_CSR_ACT_CHAN_ACK, "GA-CSR ACTIVATE CHANNEL ACK" }, + { GA_MT_CSR_ACT_CHAN_COMPL, "GA-CSR ACTIVATE CHANNEL COMPLETE" }, + { GA_MT_CSR_ACT_CHAN_FAIL, "GA-CSR ACTIVATE CHANNEL FAIL" }, + { GA_MT_CSR_CHAN_MODE_MOD, "GA-CSR CHANNEL MODE MODIFY" }, + { GA_MT_CSR_CHAN_MODE_MOD_ACK, "GA-CSR CHANNEL MODE MODIFY ACK" }, + { GA_MT_CSR_RELEASE, "GA-CSR RELEASE" }, + { GA_MT_CSR_RELEASE_COMPL, "GA-CSR RELEASE COMPLETE" }, + { GA_MT_CSR_CLEAR_REQ, "GA-CSR CLEAR REQUEST" }, + { GA_MT_CSR_HO_ACCESS, "GA-CSR HANDOVER ACCESS" }, + { GA_MT_CSR_HO_COMPL, "GA-CSR HANDOVER COMPLETE" }, + { GA_MT_CSR_UL_QUAL_IND, "GA-CSR UL QUALITY INDICATION" }, + { GA_MT_CSR_HO_INFO, "GA-CSR HANDOVER INFO" }, + { GA_MT_CSR_HO_CMD, "GA-CSR HANDOVER COMMAND" }, + { GA_MT_CSR_HO_FAIL, "GA-CSR HANDOVER FAILURE" }, + { GA_MT_CSR_PAGING_REQ, "GA-CSR PAGING REQUEST" }, + { GA_MT_CSR_PAGING_RESP, "GA-CSR PAGING RESPONSE" }, + { GA_MT_CSR_UL_DIRECT_XFER, "GA-CSR UL DIRECT TRANSFER" }, + { GA_MT_CSR_DL_DIRECT_XFER, "GA-CSR DL DIRECT TRANSFER" }, + { GA_MT_CSR_STATUS, "GA-CSR STATUS" }, + { GA_MT_RC_KEEPALIVE, "GA-CSR KEEPALIVE" }, + { GA_MT_CSR_CM_ENQ, "GA-CSR CLASSMARK ENQUIRY" }, + { GA_MT_CSR_CM_CHANGE, "GA-CSR CLASSMARK CHANGE" }, + { GA_MT_PSR_GPRS_SUSPEND_REQ, "GA-PSR GPRS SUSPEND REQUEST" }, + { GA_RC_SYNC_INFO, "GA-RC SYNCH INFORMATION" }, + { GA_CSR_UTRAN_CM_CHG, "GA-CSR UTRAN CLASSMARK CHANGE" }, + { GA_MT_CSR_REQUEST, "GA-CSR REQUEST" }, + { GA_MT_CSR_REQUEST_ACCEPT, "GA-CSR REQUEST ACCEPT" }, + { GA_MT_CSR_REQUEST_REJECT, "GA-CSR REQUEST REJECT" }, + { 0, NULL } +}; + +static const struct value_string gan_pdisc_vals[] = { + { GA_PDISC_RC, "RC" }, + { GA_PDISC_CSR, "CSR" }, + { GA_PDISC_PSR, "PSR" }, + { 0, NULL } +}; + diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map index 4583de81..80e1dc18 100644 --- a/src/gsm/libosmogsm.map +++ b/src/gsm/libosmogsm.map @@ -227,5 +227,8 @@ tlv_parse; tlv_parse_one; tvlv_att_def; +gan_msgt_vals; +gan_pdisc_vals; + local: *; }; |