Wireshark-dev: Re: [Wireshark-dev] asn2wrs AttributeError: Node instance has no attribute 'AddT

From: Anders Broman <a.broman@xxxxxxxxxxxx>
Date: Sun, 05 Apr 2015 18:31:05 +0200
lhasa wireshark skrev den 2015-04-03 14:30:
Hello Anders,

It seems it can't handle qualified imports like 'OtherModule.TypeDefinedInOtherModule'.
Probably not.

One other problem is that all types are global. If I have 2 different modules that each defines a type like 'GlobalID' asn2wrs gives an 'Duplicate type' error.
The #.MODULE directive might work see gsm_map.

Regards
Anders


Because the Nokalva compiler works I will presume these are missing features.� My solution for now is to make sure every typename is unique and to avoid qualified imports.

Regards,

John


On Mon, Mar 30, 2015 at 9:48 AM, Anders Broman <anders.broman@xxxxxxxxxxxx> wrote:

Hi,

You have to try to determine what statmet(s) in your asn1 file(s) throws as2wrs off, it looks like its related to tagged types any unusual complicated statements in there? Perhaps the order of inclusion matters?

Regards

Anders

�

From: wireshark-dev-bounces@xxxxxxxxxxxxx [mailto:wireshark-dev-bounces@xxxxxxxxxxxxx] On Behalf Of lhasa wireshark
Sent: den 27 mars 2015 16:26
To: wireshark-dev@xxxxxxxxxxxxx
Subject: [Wireshark-dev] asn2wrs AttributeError: Node instance has no attribute 'AddTag'

�

Hello,

While trying to build an asn.1 dissector the asn2wrs.py tool gives the following error:

/usr/bin/python ../../tools/asn2wrs.py \
������� -b� \
������� -p xyz \
������� -c ./xyz.cnf \
������� -s ./packet-xyz-template \
������� -D . \
������� -O ../../epan/dissectors \
������� asnfile1.asn asnfile2.asn asnfile3.asn
ASN.1 to Wireshark dissector compiler
Traceback (most recent call last):
� File "../../tools/asn2wrs.py", line 8050, in <module>
��� eth_main()
� File "../../tools/asn2wrs.py", line 7981, in eth_main
��� ast.extend(yacc.parse(f.read(), lexer=lexer, debug=pd))
� File "/home/xyz/git/wireshark/tools/yacc.py", line 313, in parse
��� return self.parseopt_notrack(input,lexer,debug,tracking,tokenfunc)
� File "/home/xyz/git/wireshark/tools/yacc.py", line 1033, in parseopt_notrack
��� p.callable(pslice)
� File "../../tools/asn2wrs.py", line 6435, in p_TaggedType_1
��� t[0].AddTag(t[1])
AttributeError: Node instance has no attribute 'AddTag'
make: *** [../../epan/dissectors/packet-xyz.c] Error 1

Is this a bug. Is there someone who can give me some clue.

Regards,

John


___________________________________________________________________________
Sent via:� � Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
Archives:� � https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
� � � � � � �mailto:wireshark-dev-request@xxxxxxxxxxxxx?subject=unsubscribe



___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
Archives:    https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request@xxxxxxxxxxxxx?subject=unsubscribe