asn2eth generated ranap dissector, there's still problems with rab-assignment and secondValue(rab-setupormodifyitem2).

svn path=/trunk/; revision=16182
This commit is contained in:
Anders Broman 2005-10-10 20:42:58 +00:00
parent 3f7ed7c2a2
commit 24df5c368e
6 changed files with 7678 additions and 0 deletions

16
asn1/ranap/Makefile Normal file
View File

@ -0,0 +1,16 @@
# $Id$
DISSECTOR_FILES=packet-ranap.c packet-ranap.h
all: generate_dissector
generate_dissector: $(DISSECTOR_FILES)
$(DISSECTOR_FILES): ../../tools/asn2eth.py SS-Operations.asn packet-ranap-template.c packet-ranap-template.h ranap.cnf
python ../../tools/asn2eth.py -X -e -p ranap -c ranap.cnf -s packet-ranap-template ranap.asn
clean:
rm -f parsetab.py $(DISSECTOR_FILES)
copy_files: generate_dissector
cp $(DISSECTOR_FILES) ../../epan/dissectors

41
asn1/ranap/Makefile.nmake Normal file
View File

@ -0,0 +1,41 @@
## Use: $(MAKE) /$(MAKEFLAGS) -f makefile.nmake
#
# $Id$
include ../../config.nmake
UNIX2DOS=$(PERL) ../../tools/unix2dos.pl
PROTOCOL_NAME=ranap
DISSECTOR_FILES=packet-$(PROTOCOL_NAME).c packet-$(PROTOCOL_NAME).h
all: generate_dissector
generate_dissector: $(DISSECTOR_FILES)
$(DISSECTOR_FILES): ../../tools/asn2eth.py ranap.asn packet-$(PROTOCOL_NAME)-template.c packet-$(PROTOCOL_NAME)-template.h ranap.cnf
!IFDEF PYTHON
$(PYTHON) ../../tools/asn2eth.py -X -e -p $(PROTOCOL_NAME) -c ranap.cnf -s packet-$(PROTOCOL_NAME)-template ranap.asn
!ELSE
@echo Error: You need Python to use asn2eth.py
@exit 1
!ENDIF
clean:
rm -f parsetab.py $(DISSECTOR_FILES)
# Fix EOL in generated dissectors. Cygwin's python generates files with
# mixed EOL styles, which can't be commited to the SVN repository.
# Stuff included from template and "cnf" files has "\r\n" on windows, while
# the generated stuff has "\n".
fix_eol: generate_dissector
move packet-$(PROTOCOL_NAME).c packet-$(PROTOCOL_NAME).c.tmp
move packet-$(PROTOCOL_NAME).h packet-$(PROTOCOL_NAME).h.tmp
$(UNIX2DOS) < packet-$(PROTOCOL_NAME).c.tmp > packet-$(PROTOCOL_NAME).c
$(UNIX2DOS) < packet-$(PROTOCOL_NAME).h.tmp > packet-$(PROTOCOL_NAME).h
del /f packet-$(PROTOCOL_NAME).c.tmp packet-$(PROTOCOL_NAME).h.tmp
copy_files: generate_dissector fix_eol
xcopy packet-$(PROTOCOL_NAME).c ..\..\epan\dissectors /d
xcopy packet-$(PROTOCOL_NAME).h ..\..\epan\dissectors /d

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,28 @@
/* packet-ranap-template.h
* Routines for GSM Supplementary Services dissection
* Copyright 2005, 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_RANAP_H
#define PACKET_RANAP_H
/* #include "packet-ranap-exp.h"*/
#endif /* PACKET_RANAP_H */

6365
asn1/ranap/ranap.asn Normal file

File diff suppressed because it is too large Load Diff

74
asn1/ranap/ranap.cnf Normal file
View File

@ -0,0 +1,74 @@
# ranap.cnf
# ranap conformation file
# $Id$
#.PDU
#.NO_EMIT
#.TYPE_RENAME
#.FIELD_RENAME
SDU-ErrorRatio/exponent exponent_1_8
PrivateIE-Field/id private_id
ProtocolExtensionField/id ext_id
MessageStructure/_item/repetitionNumber item_repetitionNumber
PrivateIE-Field/value private_value
ProtocolIE-Field/value ie_field_value
RAB-DataVolumeReportItem/dl-UnsuccessfullyTransmittedDataVolume rab-dl-UnsuccessfullyTransmittedDataVolume
#.FN_PARS RANAP-PDU
VAL_PTR = &type_of_message
#.FN_PARS ProcedureCode
VAL_PTR = &ProcedureCode
#.FN_FTR ProcedureCode
if (check_col(pinfo->cinfo, COL_INFO))
col_add_fstr(pinfo->cinfo, COL_INFO, "%s ",
val_to_str(ProcedureCode, ranap_ProcedureCode_vals,
"unknown message"));
#.FN_PARS ProtocolIE-ID
VAL_PTR = &ProtocolIE_ID
#.FN_BODY Value
offset = dissect_ranap_messages(tvb, offset, pinfo, tree);
#.FN_BODY RANAP_PROTOCOL_IES_Value
offset = dissect_ranap_ies(tvb, offset, pinfo, tree);
#.FN_PARS NAS-PDU
VAL_PTR = &nas_pdu_tvb
#.FN_BODY NAS-PDU
tvbuff_t *nas_pdu_tvb=NULL;
%(DEFAULT_BODY)s
if (nas_pdu_tvb)
dissector_try_port(nas_pdu_dissector_table, 0x1, nas_pdu_tvb, pinfo, top_tree);
#.FN_BODY SecondValue
offset = dissect_ranap_SecondValue_ies(tvb, offset, pinfo, tree);
#.FN_BODY FirstValue
offset = dissect_ranap_FirstValue_ies(tvb, offset, pinfo, tree);
#.FN_BODY Extension
offset = dissect_ranap_ies(tvb, offset, pinfo, tree);
#.FN_BODY RANAP_PRIVATE_IES_Value
/* FIX ME */
#.END