diff options
author | João Valverde <joao.valverde@tecnico.ulisboa.pt> | 2016-03-09 03:17:51 +0000 |
---|---|---|
committer | João Valverde <j@v6e.pt> | 2016-03-13 21:30:24 +0000 |
commit | 54a520d4a1151c68d0b4e5f09a8d82466fa499f3 (patch) | |
tree | 7aacae160382098ce651ac862a5dfd5de4beff94 /asn1/smrse | |
parent | c1f3c935bdd33090c87f0d2f84842ce9729b747a (diff) |
Move /asn1 to /epan/dissectors
Change-Id: I1208fe3c2ba428995526f561e8f792b8d871e9a9
Reviewed-on: https://code.wireshark.org/review/14388
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: João Valverde <j@v6e.pt>
Diffstat (limited to 'asn1/smrse')
-rw-r--r-- | asn1/smrse/CMakeLists.txt | 48 | ||||
-rw-r--r-- | asn1/smrse/Makefile.am | 23 | ||||
-rw-r--r-- | asn1/smrse/Makefile.common | 43 | ||||
-rw-r--r-- | asn1/smrse/Makefile.nmake | 26 | ||||
-rw-r--r-- | asn1/smrse/SMRSE.asn | 133 | ||||
-rw-r--r-- | asn1/smrse/packet-smrse-template.c | 183 | ||||
-rw-r--r-- | asn1/smrse/packet-smrse-template.h | 30 | ||||
-rw-r--r-- | asn1/smrse/smrse.cnf | 49 |
8 files changed, 0 insertions, 535 deletions
diff --git a/asn1/smrse/CMakeLists.txt b/asn1/smrse/CMakeLists.txt deleted file mode 100644 index ffb58582fc..0000000000 --- a/asn1/smrse/CMakeLists.txt +++ /dev/null @@ -1,48 +0,0 @@ -# CMakeLists.txt -# -# Wireshark - Network traffic analyzer -# By Gerald Combs <gerald@wireshark.org> -# Copyright 1998 Gerald Combs -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# 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 General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# - -set( PROTOCOL_NAME smrse ) - -set( PROTO_OPT ) - -set( EXT_ASN_FILE_LIST -) - -set( ASN_FILE_LIST - SMRSE.asn -) - -set( EXTRA_DIST - ${ASN_FILE_LIST} - packet-${PROTOCOL_NAME}-template.c - packet-${PROTOCOL_NAME}-template.h - ${PROTOCOL_NAME}.cnf -) - -set( SRC_FILES - ${EXTRA_DIST} - ${EXT_ASN_FILE_LIST} -) - -set( A2W_FLAGS -b ) - -ASN2WRS() - diff --git a/asn1/smrse/Makefile.am b/asn1/smrse/Makefile.am deleted file mode 100644 index 72d28e600b..0000000000 --- a/asn1/smrse/Makefile.am +++ /dev/null @@ -1,23 +0,0 @@ -# Wireshark - Network traffic analyzer -# By Gerald Combs <gerald@wireshark.org> -# Copyright 1998 Gerald Combs -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# 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 General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - - -include ../Makefile.preinc -include Makefile.common -include ../Makefile.inc - diff --git a/asn1/smrse/Makefile.common b/asn1/smrse/Makefile.common deleted file mode 100644 index 806865a00e..0000000000 --- a/asn1/smrse/Makefile.common +++ /dev/null @@ -1,43 +0,0 @@ -# Wireshark - Network traffic analyzer -# By Gerald Combs <gerald@wireshark.org> -# Copyright 1998 Gerald Combs -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# 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 General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - - -PROTOCOL_NAME=smrse - -EXT_ASN_FILE_LIST = - -ASN_FILE_LIST = \ - SMRSE.asn - -# The packet-$(PROTOCOL_NAME)-template.h and $(PROTOCOL_NAME).asn -# files do not exist for all protocols: Please add/remove as required. -EXTRA_DIST = \ - $(EXTRA_DIST_COMMON) \ - $(ASN_FILE_LIST) \ - packet-$(PROTOCOL_NAME)-template.c \ - packet-$(PROTOCOL_NAME)-template.h \ - $(PROTOCOL_NAME).cnf - -SRC_FILES = \ - $(EXTRA_DIST) \ - $(EXT_ASN_FILE_LIST) - -A2W_FLAGS= -b - -EXTRA_CNF= - diff --git a/asn1/smrse/Makefile.nmake b/asn1/smrse/Makefile.nmake deleted file mode 100644 index fc70f2382f..0000000000 --- a/asn1/smrse/Makefile.nmake +++ /dev/null @@ -1,26 +0,0 @@ -## Use: $(MAKE) /$(MAKEFLAGS) -f makefile.nmake -# -# Wireshark - Network traffic analyzer -# By Gerald Combs <gerald@wireshark.org> -# Copyright 1998 Gerald Combs -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# 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 General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - - -include ../../config.nmake -include ../Makefile.preinc.nmake -include Makefile.common -include ../Makefile.inc.nmake - diff --git a/asn1/smrse/SMRSE.asn b/asn1/smrse/SMRSE.asn deleted file mode 100644 index ee11a261b4..0000000000 --- a/asn1/smrse/SMRSE.asn +++ /dev/null @@ -1,133 +0,0 @@ -SMRS DEFINITIONS IMPLICIT TAGS ::= -BEGIN - -SMR-Bind ::= SEQUENCE { - sc-address SMS-Address, - password Password, - ... -} - -ub-password-length INTEGER ::= 20 - -IMSI-Address ::= OCTET STRING - -SMS-Address ::= SEQUENCE { - address-type INTEGER { - unknown-type (0), - internat-number (1), - national-number (2), - net-spec-number (3), - short-number (4) - }, - - numbering-plan INTEGER { - unknown-numbering (0), - iSDN-numbering (1), - data-network-numbering (3), - telex-numbering (4), - national-numbering (8), - private-numbering (9) - }, - - address-value CHOICE { - octet-format SemiOctetString - } -} - - -SemiOctetString ::= OCTET STRING - -Password ::= PrintableString - -SMR-Bind-Confirm ::= SEQUENCE { - ... -} - -SMR-Bind-Failure ::= SEQUENCE { - connect-fail-reason Connect-fail, - ... -} - -Connect-fail ::= INTEGER { - not-entitled (0), - tmp-overload (1), - tmp-failure (2), - id-or-passwd (3), - not-supported (4), - inv-SC-addr (5) -} - -SMR-Unbind ::= SEQUENCE { - ... -} - -RPDataMT ::= SEQUENCE { - mt-priority-request BOOLEAN, - mt-mms BOOLEAN, - mt-message-reference RP-MR, - mt-originating-address SMS-Address, - mt-destination-address SMS-Address, - mt-user-data RP-UD, - mt-origVMSCAddr [1] SMS-Address OPTIONAL, - mt-tariffClass [2] SM-TC OPTIONAL, - ... -} - -RPDataMO ::= SEQUENCE { - mo-message-reference RP-MR, - mo-originating-address SMS-Address, - mo-user-data RP-UD, - origVMSCAddr [1] SMS-Address OPTIONAL , - moimsi [2] IMSI-Address OPTIONAL, - ... -} - -RP-MR ::= INTEGER (0..65535) - -RP-UD ::= OCTET STRING (SIZE (1..164)) - -SM-TC ::= INTEGER (0..65535) - -RPAck ::= SEQUENCE { - message-reference RP-MR, - ... -} - -Error-reason ::= INTEGER { - unknown-subscriber (1), - illegal-subscriber (9), - teleservice-not-provisioned (11), - call-barred (13), - cug-reject (15), - sMS-ll-capabilities-not-prov (19), - error-in-MS (20), - facility-not-supported (21), - memory-capacity-exceeded (22), - absent-subscriber (29), - ms-busy-for-MT-sms (30), - system-failure (36), - illegal-equipment (44), - no-resp-to-paging (60), - gMSC-congestion (61), - dublicate-sm (70), - sC-congestion (101), - mS-not-SC-Subscriber (103), - invalid-sme-address (104) -} - -RPError ::= SEQUENCE { - error-reason Error-reason, - msg-waiting-set BOOLEAN, - message-reference RP-MR, - alerting-MS-ISDN [1] SMS-Address OPTIONAL, - sm-diag-info [2] RP-UD OPTIONAL, - ... -} - -RPAlertSC ::= SEQUENCE { - ms-address SMS-Address, - message-reference RP-MR, - ... -} - -END diff --git a/asn1/smrse/packet-smrse-template.c b/asn1/smrse/packet-smrse-template.c deleted file mode 100644 index 0903045ea7..0000000000 --- a/asn1/smrse/packet-smrse-template.c +++ /dev/null @@ -1,183 +0,0 @@ -/* packet-smrse.c - * Routines for SMRSE Short Message Relay Service packet dissection - * Ronnie Sahlberg 2004 - * - * Wireshark - Network traffic analyzer - * By Gerald Combs <gerald@wireshark.org> - * Copyright 1998 Gerald Combs - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -#include "config.h" - -#include <epan/packet.h> -#include <epan/asn1.h> - -#include "packet-ber.h" -#include "packet-smrse.h" - -#define PNAME "Short Message Relaying Service" -#define PSNAME "SMRSE" -#define PFNAME "smrse" - -#define TCP_PORT_SMRSE 4321 - -void proto_register_smrse(void); -void proto_reg_handoff_smrse(void); - -/* Initialize the protocol and registered fields */ -static int proto_smrse = -1; -static int hf_smrse_reserved = -1; -static int hf_smrse_tag = -1; -static int hf_smrse_length = -1; -static int hf_smrse_Octet_Format = -1; -#include "packet-smrse-hf.c" - -/* Initialize the subtree pointers */ -static gint ett_smrse = -1; -#include "packet-smrse-ett.c" - - -#include "packet-smrse-fn.c" - -static const value_string tag_vals[] = { - { 1, "AliveTest" }, - { 2, "AliveTestRsp" }, - { 3, "Bind" }, - { 4, "BindRsp" }, - { 5, "BindFail" }, - { 6, "Unbind" }, - { 7, "MT" }, - { 8, "MO" }, - { 9, "Ack" }, - { 10, "Error" }, - { 11, "Alert" }, - { 0, NULL } -}; - -static int -dissect_smrse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void *data _U_) -{ - proto_item *item = NULL; - proto_tree *tree = NULL; - guint8 reserved, tag; - int offset=0; - asn1_ctx_t asn1_ctx; - asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo); - - reserved=tvb_get_guint8(tvb, 0); - tag=tvb_get_guint8(tvb, 3); - - if( reserved!= 126 ) - return 0; - if( (tag<1)||(tag>11) ) - return 0; - - if(parent_tree){ - item = proto_tree_add_item(parent_tree, proto_smrse, tvb, 0, -1, ENC_NA); - tree = proto_item_add_subtree(item, ett_smrse); - } - - col_set_str(pinfo->cinfo, COL_PROTOCOL, "SMRSE"); - col_add_str(pinfo->cinfo, COL_INFO, val_to_str(tag, tag_vals,"Unknown Tag:0x%02x")); - - proto_tree_add_item(tree, hf_smrse_reserved, tvb, 0, 1, ENC_BIG_ENDIAN); - proto_tree_add_item(tree, hf_smrse_length, tvb, 1, 2, ENC_BIG_ENDIAN); - proto_tree_add_item(tree, hf_smrse_tag, tvb, 3, 1, ENC_BIG_ENDIAN); - - switch(tag){ - case 1: - case 2: - offset=4; - break; - case 3: - offset=dissect_smrse_SMR_Bind(FALSE, tvb, 4, &asn1_ctx, tree, -1); - break; - case 4: - offset=dissect_smrse_SMR_Bind_Confirm(FALSE, tvb, 4, &asn1_ctx, tree, -1); - break; - case 5: - offset=dissect_smrse_SMR_Bind_Failure(FALSE, tvb, 4, &asn1_ctx, tree, -1); - break; - case 6: - offset=dissect_smrse_SMR_Unbind(FALSE, tvb, 4, &asn1_ctx, tree, -1); - break; - case 7: - offset=dissect_smrse_RPDataMT(FALSE, tvb, 4, &asn1_ctx, tree, -1); - break; - case 8: - offset=dissect_smrse_RPDataMO(FALSE, tvb, 4, &asn1_ctx, tree, -1); - break; - case 9: - offset=dissect_smrse_RPAck(FALSE, tvb, 4, &asn1_ctx, tree, -1); - break; - case 10: - offset=dissect_smrse_RPError(FALSE, tvb, 4, &asn1_ctx, tree, -1); - break; - case 11: - offset=dissect_smrse_RPAlertSC(FALSE, tvb, 4, &asn1_ctx, tree, -1); - break; - } - - return offset; -} - -/*--- proto_register_smrse ----------------------------------------------*/ -void proto_register_smrse(void) { - - /* List of fields */ - static hf_register_info hf[] = { - { &hf_smrse_reserved, { - "Reserved", "smrse.reserved", FT_UINT8, BASE_DEC, - NULL, 0, "Reserved byte, must be 126", HFILL }}, - { &hf_smrse_tag, { - "Tag", "smrse.tag", FT_UINT8, BASE_DEC, - VALS(tag_vals), 0, NULL, HFILL }}, - { &hf_smrse_length, { - "Length", "smrse.length", FT_UINT16, BASE_DEC, - NULL, 0, "Length of SMRSE PDU", HFILL }}, - { &hf_smrse_Octet_Format, - { "octet-Format", "smrse.octet_Format", - FT_STRING, BASE_NONE, NULL, 0, - "SMS-Address/address-value/octet-format", HFILL }}, - -#include "packet-smrse-hfarr.c" - }; - - /* List of subtrees */ - static gint *ett[] = { - &ett_smrse, -#include "packet-smrse-ettarr.c" - }; - - /* Register protocol */ - proto_smrse = proto_register_protocol(PNAME, PSNAME, PFNAME); - - /* Register fields and subtrees */ - proto_register_field_array(proto_smrse, hf, array_length(hf)); - proto_register_subtree_array(ett, array_length(ett)); - -} - - -/*--- proto_reg_handoff_smrse -------------------------------------------*/ -void proto_reg_handoff_smrse(void) { - dissector_handle_t smrse_handle; - - smrse_handle = create_dissector_handle(dissect_smrse, proto_smrse); - dissector_add_uint("tcp.port",TCP_PORT_SMRSE, smrse_handle); -} - diff --git a/asn1/smrse/packet-smrse-template.h b/asn1/smrse/packet-smrse-template.h deleted file mode 100644 index aacf5cd24d..0000000000 --- a/asn1/smrse/packet-smrse-template.h +++ /dev/null @@ -1,30 +0,0 @@ -/* packet-smrse.h - * Routines for SMRSE Short Message Relay Service packet dissection - * Ronnie Sahlberg 2004 - * - * Wireshark - Network traffic analyzer - * By Gerald Combs <gerald@wireshark.org> - * Copyright 1998 Gerald Combs - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -#ifndef PACKET_SMRSE_H -#define PACKET_SMRSE_H - -/*#include "packet-smrse-exp.h"*/ - -#endif /* PACKET_SMRSE_H */ - diff --git a/asn1/smrse/smrse.cnf b/asn1/smrse/smrse.cnf deleted file mode 100644 index 7aec8fd20e..0000000000 --- a/asn1/smrse/smrse.cnf +++ /dev/null @@ -1,49 +0,0 @@ -# smrse.cnf -# SMRSE conformation file - -#.MODULE_IMPORT - -#.EXPORTS - -#.NO_EMIT -SemiOctetString -#.END - -#.PDU - -#.TYPE_RENAME - -#.FIELD_RENAME - -#.FN_BODY SMS-Address/address-value/octet-format - char *strp,tmpstr[21]; - guint32 i, start_offset; - gint8 ber_class; - gboolean pc, ind; - gint32 tag; - guint32 len; - static char n2a[16] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' }; - - start_offset=offset; - - /* skip the tag and length */ - offset=dissect_ber_identifier(actx->pinfo, tree, tvb, offset, &ber_class, &pc, &tag); - offset=dissect_ber_length(actx->pinfo, tree, tvb, offset, &len, &ind); - if(len>10){ - len=10; - } - strp=tmpstr; - for(i=0;i<len;i++){ - *strp++=n2a[tvb_get_guint8(tvb, offset)&0x0f]; - *strp++=n2a[(tvb_get_guint8(tvb, offset)>>4)&0x0f]; - offset++; - } - *strp=0; - - proto_tree_add_string(tree, hf_smrse_Octet_Format, tvb, start_offset, offset-start_offset, tmpstr); - - return offset; - -#.END - - |