Wireshark mailing list archives

Re: asn2wrs AttributeError: Node instance has no attribute 'AddTag'


From: Anders Broman <a.broman () bredband net>
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 () ericsson com <mailto:anders.broman () ericsson com>> 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 () wireshark org
    <mailto:wireshark-dev-bounces () wireshark org>
    [mailto:wireshark-dev-bounces () wireshark org
    <mailto:wireshark-dev-bounces () wireshark org>] *On Behalf Of *lhasa
    wireshark
    *Sent:* den 27 mars 2015 16:26
    *To:* wireshark-dev () wireshark org <mailto:wireshark-dev () wireshark org>
    *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 () wireshark org <mailto:wireshark-dev () wireshark org>>
    Archives: https://www.wireshark.org/lists/wireshark-dev
    Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
                 mailto:wireshark-dev-request () wireshark org
    <mailto:wireshark-dev-request () wireshark org>?subject=unsubscribe




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

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

Current thread: