Commit 65530eb9 authored by Anders Broman's avatar Anders Broman

Add the abillity to translate MCC.

svn path=/trunk/; revision=17105
parent 9c10169b
......@@ -39,6 +39,7 @@
#include "packet-ber.h"
#include "packet-per.h"
#include "packet-ranap.h"
#include "packet-e212.h"
#define SCCP_SSN_RANAP 0x8E
......@@ -66,7 +67,8 @@ static int hf_ranap_IE_length = -1;
#include "packet-ranap-hf.c"
/* Initialize the subtree pointers */
static int ett_ranap;
static int ett_ranap = -1;
static int ett_ranap_plnmidentity = -1;
#include "packet-ranap-ett.c"
......@@ -1149,6 +1151,7 @@ void proto_register_ranap(void) {
/* List of subtrees */
static gint *ett[] = {
&ett_ranap,
&ett_ranap_plnmidentity,
#include "packet-ranap-ettarr.c"
};
......
......@@ -75,4 +75,21 @@ tvbuff_t *nas_pdu_tvb=NULL;
#.FN_BODY RANAP_PRIVATE_IES_Value
/* FIX ME */
#.FN_PARS PLMNidentity
VAL_PTR = &parameter_tvb
#.FN_BODY PLMNidentity
tvbuff_t *parameter_tvb=NULL;
%(DEFAULT_BODY)s
if (!parameter_tvb)
return offset;
dissect_e212_mcc_mnc(parameter_tvb, tree, 0);
#.END
#.TYPE_ATTR
ProtocolExtensionID TYPE = FT_UINT8 DISPLAY = BASE_DEC STRINGS = VALS(ranap_ProtocolIE_ID_vals)
\ No newline at end of file
......@@ -263,6 +263,7 @@ DISSECTOR_SRC = \
packet-dua.c \
packet-dvmrp.c \
packet-e164.c \
packet-e212.c \
packet-eap.c \
packet-eapol.c \
packet-echo.c \
......@@ -734,6 +735,7 @@ DISSECTOR_INCLUDES = \
packet-dsp.h \
packet-dvmrp.h \
packet-e164.h \
packet-e212.h \
packet-edonkey.h \
packet-enc.h \
packet-esis.h \
......
This diff is collapsed.
/* packet-e212.h
* E212 tables
* Copyright 2006, Anders Broman <anders.broman@ericsson.com>
*
* $Id$
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef __PACKET_E212_H__
#define __PACKET_E212_H__
#include "epan/value_string.h"
extern const value_string E212_codes[];
int dissect_e212_mcc_mnc(tvbuff_t *tvb, proto_tree *tree, int offset);
#endif /* __PACKET_E212_H__ */
\ No newline at end of file
......@@ -8,7 +8,7 @@
#line 1 "packet-ranap-template.c"
/* packet-ranap-template.c
* Routines for Radio Access Network Application Part Protocol dissection
* Copyright 2005, Anders Broman <anders.broman@ericsson.com>
* Copyright 2005 - 2006, Anders Broman <anders.broman@ericsson.com>
* Based on the dissector by Martin Held <Martin.Held@icn.siemens.de>
*
* Ethereal - Network traffic analyzer
......@@ -47,6 +47,7 @@
#include "packet-ber.h"
#include "packet-per.h"
#include "packet-ranap.h"
#include "packet-e212.h"
#define SCCP_SSN_RANAP 0x8E
......@@ -591,10 +592,11 @@ static int hf_ranap_private_id = -1; /* PrivateIE_ID */
static int hf_ranap_private_value = -1; /* RANAP_PRIVATE_IES_Value */
/*--- End of included file: packet-ranap-hf.c ---*/
#line 67 "packet-ranap-template.c"
#line 68 "packet-ranap-template.c"
/* Initialize the subtree pointers */
static int ett_ranap;
static int ett_ranap = -1;
static int ett_ranap_plnmidentity = -1;
/*--- Included file: packet-ranap-ett.c ---*/
#line 1 "packet-ranap-ett.c"
......@@ -857,7 +859,7 @@ static gint ett_ranap_PrivateIE_Container = -1;
static gint ett_ranap_PrivateIE_Field = -1;
/*--- End of included file: packet-ranap-ett.c ---*/
#line 71 "packet-ranap-template.c"
#line 73 "packet-ranap-template.c"
/* Global variables */
......@@ -1909,6 +1911,7 @@ dissect_ranap_RANAP_PRIVATE_IES_Value(tvbuff_t *tvb, int offset, packet_info *pi
return offset;
}
static int dissect_private_value(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree) {
......@@ -3053,8 +3056,19 @@ static int dissect_aPN(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree
static int
dissect_ranap_PLMNidentity(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index) {
#line 84 "ranap.cnf"
tvbuff_t *parameter_tvb=NULL;
offset = dissect_per_octet_string(tvb, offset, pinfo, tree, hf_index,
3, 3, NULL);
3, 3, &parameter_tvb);
if (!parameter_tvb)
return offset;
dissect_e212_mcc_mnc(parameter_tvb, tree, 0);
return offset;
}
......@@ -9734,7 +9748,7 @@ dissect_ranap_ProtocolIE_ContainerPairList(tvbuff_t *tvb, int offset, packet_inf
/*--- End of included file: packet-ranap-fn.c ---*/
#line 84 "packet-ranap-template.c"
#line 86 "packet-ranap-template.c"
......@@ -12842,7 +12856,7 @@ void proto_register_ranap(void) {
"ProtocolExtensionContainer/_item", HFILL }},
{ &hf_ranap_ext_id,
{ "id", "ranap.id",
FT_UINT32, BASE_DEC, NULL, 0,
FT_UINT8, BASE_DEC, VALS(ranap_ProtocolIE_ID_vals), 0,
"ProtocolExtensionField/id", HFILL }},
{ &hf_ranap_extensionValue,
{ "extensionValue", "ranap.extensionValue",
......@@ -12862,12 +12876,13 @@ void proto_register_ranap(void) {
"PrivateIE-Field/value", HFILL }},
/*--- End of included file: packet-ranap-hfarr.c ---*/
#line 1147 "packet-ranap-template.c"
#line 1149 "packet-ranap-template.c"
};
/* List of subtrees */
static gint *ett[] = {
&ett_ranap,
&ett_ranap_plnmidentity,
/*--- Included file: packet-ranap-ettarr.c ---*/
#line 1 "packet-ranap-ettarr.c"
......@@ -13130,7 +13145,7 @@ void proto_register_ranap(void) {
&ett_ranap_PrivateIE_Field,
/*--- End of included file: packet-ranap-ettarr.c ---*/
#line 1153 "packet-ranap-template.c"
#line 1156 "packet-ranap-template.c"
};
/* Register protocol */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment