Wireshark-dev: Re: [Wireshark-dev] asn2wrs AttributeError: Node instance has no attribute 'AddT
From: Anders Broman <anders.broman@xxxxxxxxxxxx>
Date: Mon, 30 Mar 2015 07:48:35 +0000

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