Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: Re: [Wireshark-dev] Compilation error in asn.1 file

Date: Wed, 26 Dec 2007 17:19:58 +0530
Hi Anders,

Yeah you got right. This runs on top of the ANSI-TCAP layer.I am writing a separate asn for this file.

I did not import any operations from ANSI-TCAP. I feel there should be an identifier which TCAP identifies this dissector and its operations( I don't have that still).Can you please tell me , how does it do it??

In all the .asn files, before the DEFINITIONS , there is a declaration of the module/PDU ..for example in gsmmap and ansi_map :

MAP-Protocol{ 0 identified-organization (4) etsi (0) mobileDomain (0) gsm-Network (1) modules (3) map-Protocol (4) version5 (5) }

In the case of TCAP:

DialoguePDUs { ccitt recommendation q 773 modules (2) dialoguePDUs(2) version1 (1) }

I am not able to write this part for my .asn file. Can you please tell me the significance of this and how should I go about it??

BR,
Tarani 

> -----Original Message-----
> From: wireshark-dev-bounces@xxxxxxxxxxxxx [mailto:wireshark-dev-
> bounces@xxxxxxxxxxxxx] On Behalf Of Anders Broman
> Sent: Wednesday, December 26, 2007 4:46 PM
> To: 'Developer support list for Wireshark'
> Subject: Re: [Wireshark-dev] Compilation error in asn.1 file
> 
> Hi,
> Ok I think I remember now you are dealing with ANSI TCAP stuff - right?
> And you are hand writing the asn1 file?
> 
> I don't think asn2wrs can handle "ANSI OPERATIONS" in theory you should
> IMPORT OPERATIONS like:
> 
> IMPORTS
> 	OPERATION
> FROM TCAP-Remote-Operations-Information-Objects {iso(1)memberbody(2)
> usa(840) t1-114(10013)
> 	modules(0) informationObjects(1) version4(4) }
> 
> And that asn1 file should be compiled with your asn1 file or you could
> Declare the OPERATION class in our .cnf file.
> 
> However if you just define the parameters in the asn1 file like:
> 
> xxxRequest ::= SEQUENCE {
> 
> aaa (2) AAA,
> 
> bbb (3) BBB }
> 
> xxxResult ::=
> 
> (see ANSI MAP)
> 
> Then in your template file you'll have to make the connection from
> operation
> code to xxxRequest.
> Switch(code){
>  Case xxx:
> 	Dissect_xxxRequest();
> 	Break;
> }
> A bit more complicated to get it called from ANSI TCAP but that depends on
> How the ANSI TCAP bit looks in your case...
> 
> Regards
> Anders
> 
> -----Ursprungligt meddelande-----
> Från: wireshark-dev-bounces@xxxxxxxxxxxxx
> [mailto:wireshark-dev-bounces@xxxxxxxxxxxxx] För
> taraniteja.vishwanatha@xxxxxxxxx
> Skickat: den 26 december 2007 11:20
> Till: wireshark-dev@xxxxxxxxxxxxx
> Ämne: Re: [Wireshark-dev] Compilation error in asn.1 file
> 
> 
> Hi ,
> 
> Let me explain you in detail. I have a protocol defined in asn.1 format ,
> whose operations and parameters look like the ones mentioned below:
> 
> Operation Code=1
> 
> Class=1
> 
> ASN.1 Formal Description
> 
> xxxRequest ::= OPERATION
> 
> PARAMETER SEQUENCE {
> 
> aaa (2) AAA,
> 
> bbb (3) BBB }
> 
> RESULT
> 
> reqresult (4) ReqResult
> 
> Parameters :
> 
> xxx ::= ENUMERATED {
> 
> xxxNotActive (0),
> 
> xxxActive (1) }
> 
> I have copied these exactly to generate my .asn file . I am still having
> hiccups in generating the .cnf file. But the code is not getting compiled
> and it is giving error at each line of the .asn file.
> 
> BR.
> Tarani
> 
> 
> > -----Original Message-----
> > From: wireshark-dev-bounces@xxxxxxxxxxxxx [mailto:wireshark-dev-
> > bounces@xxxxxxxxxxxxx] On Behalf Of Anders Broman
> > Sent: Tuesday, December 25, 2007 5:20 PM
> > To: 'Developer support list for Wireshark'
> > Subject: Re: [Wireshark-dev] Compilation error in asn.1 file
> >
> > Hi,
> > OPERATION is not a predefined asn1 type, in GSM MAP operation is from:
> >
> > :
> > IMPORTS
> > 	OPERATION
> > FROM Remote-Operations-Information-Objects {
> > joint-iso-itu-t remote-operations(4)
> >   informationObjects(5) version1(0)}
> > :
> >
> > And is used as:
> > sendRoutingInfo  OPERATION ::= {				--Timer m
> > -- The timer is set to the upper limit of the range if the GMSC supports
> > pre-paging.
> > 	ARGUMENT
> > 		SendRoutingInfoArg
> > 	RESULT
> > 		SendRoutingInfoRes
> > 	ERRORS {
> > 		systemFailure |
> > :
> > I'm not sure what you are trying to achieve...
> > Regards
> > Anders
> >
> > ________________________________________
> > Från: wireshark-dev-bounces@xxxxxxxxxxxxx
> > [mailto:wireshark-dev-bounces@xxxxxxxxxxxxx] För
> > taraniteja.vishwanatha@xxxxxxxxx
> > Skickat: den 24 december 2007 11:46
> > Till: wireshark-dev@xxxxxxxxxxxxx
> > Ämne: Re: [Wireshark-dev] Compilation error in asn.1 file
> >
> > Hi ,
> >
> > There has to be a PDU added before DEFINITIONS in the .asn file. I don't
> > have it but used it from existing asn files, though it is different for
> > each
> > file.
> >
> > After that I am getting the following error:
> >
> > __main__.ParseError: LexToken(ASSIGNMENT,'::=',1,468)
> >
> > I think it is giving a problem at the following assingnment :
> >
> > XXX ::= OPERATION
> >
> > Here , I want to know whether the keyword OPERATION is in the standard
> > asn.1
> > notation , or some changes are required here?
> >
> > //Tarani
> >
> > ________________________________________
> > From: wireshark-dev-bounces@xxxxxxxxxxxxx
> > [mailto:wireshark-dev-bounces@xxxxxxxxxxxxx] On Behalf Of Anders Broman
> > Sent: Monday, December 24, 2007 3:52 PM
> > To: 'Developer support list for Wireshark'
> > Subject: Re: [Wireshark-dev] Compilation error in asn.1 file
> >
> > Hi,
> > >tsrp.cnf:65: UserWarning: Duplicated FN_PARS for Command. Previous one
> is
> > at tsrp.cnf:57
> >
> > Is a problem in the .cnf file
> >
> > >__main__.ParseError: LexToken(DEFINITIONS,'DEFINITIONS',1,199)
> > Is a problem in the .asn file Line 199?
> > Regards
> > Anders
> >
> > ________________________________________
> > Från: wireshark-dev-bounces@xxxxxxxxxxxxx
> > [mailto:wireshark-dev-bounces@xxxxxxxxxxxxx] För
> > taraniteja.vishwanatha@xxxxxxxxx
> > Skickat: den 24 december 2007 06:38
> > Till: wireshark-dev@xxxxxxxxxxxxx
> > Ämne: [Wireshark-dev] Compilation error in asn.1 file
> >
> > Hi ,
> >
> > I have written .asn and  .cnf files for my dissector. I have created a
> > nominal template.c and template .h files as I suppose the asn2wrs
> compiler
> > would generate the functions and declarations. I also suppose I should
> add
> > the variable declarations and function definitions after the
> compilation.
> >
> > I am getting the following error while compiling :
> >
> > python ../../tools/asn2wrs.py -b -e -p tsrp -c tsrp.cnf -s
> > packet-tsrp-template tsrp.asn
> > ASN.1 to Wireshark dissector compiler
> > tsrp.cnf:65: UserWarning: Duplicated FN_PARS for Command. Previous one
> is
> > at
> > tsrp.cnf:57
> >   #.FN_BODY  Command Result VAL_PTR = &parameter_tvb
> > Traceback (most recent call last):
> >   File "../../tools/asn2wrs.py", line 4875, in ?
> >     eth_main()
> >   File "../../tools/asn2wrs.py", line 4831, in eth_main
> >     ast.extend(yacc.parse(f.read(), lexer=lexer, debug=pd))
> >   File "/home/eth/plugin_dev/wireshark_tsrp/wireshark/tools/yacc.py",
> line
> > 334, in parse
> >     tok = self.errorfunc(errtoken)
> >   File "../../tools/asn2wrs.py", line 4705, in p_error
> >     raise ParseError(str(t))
> > __main__.ParseError: LexToken(DEFINITIONS,'DEFINITIONS',1,199)
> > make: *** [packet-tsrp.c] Error 1
> >
> > I am not sure the error is pertaining to .asn, .cnf or the template
> > files.Can somebody please help.
> >
> > BR,
> > Tarani
> >
> > _______________________________________________
> > Wireshark-dev mailing list
> > Wireshark-dev@xxxxxxxxxxxxx
> > http://www.wireshark.org/mailman/listinfo/wireshark-dev
> 
> 
> The information contained in this electronic message and any attachments
> to
> this message are intended for the exclusive use of the addressee(s) and
> may
> contain proprietary, confidential or privileged information. If you are
> not
> the intended recipient, you should not disseminate, distribute or copy
> this
> e-mail. Please notify the sender immediately and destroy all copies of
> this
> message and any attachments.
> 
> WARNING: Computer viruses can be transmitted via email. The recipient
> should
> check this email and any attachments for the presence of viruses. The
> company accepts no liability for any damage caused by any virus
> transmitted
> by this email.
> 
> www.wipro.com
> _______________________________________________
> Wireshark-dev mailing list
> Wireshark-dev@xxxxxxxxxxxxx
> http://www.wireshark.org/mailman/listinfo/wireshark-dev
> 
> _______________________________________________
> Wireshark-dev mailing list
> Wireshark-dev@xxxxxxxxxxxxx
> http://www.wireshark.org/mailman/listinfo/wireshark-dev


The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
 
www.wipro.com