Wireshark mailing list archives

Re: Regenerate asn dissector


From: Pascal Quantin <pascal.quantin () gmail com>
Date: Mon, 19 Feb 2018 15:13:28 +0100

Hi Dario,

2018-02-19 15:04 GMT+01:00 Dario Lombardo <dario.lombardo.ml () gmail com>:

That's what I needed. I was close to it, but I didn't get the right
starting point for regenerating.
What's missing IMHO is a cmake target for that. Maybe I will take some
time to add one (many, actually).
Thanks Darien.


As indicated by Alexis, Anders and Graham, CMake should already have
created a target.
Fox example on my Linux machine, in the build tree, I can go to
epan\dissectors\asn1\h248 folder and I have a Makefile that, when executed,
will run the asn2wrs command and update the file in the source tree.

Best regards,
Pascal.



On Mon, Feb 19, 2018 at 2:41 PM, Darien Spencer <cusneud () mail com> wrote:

Hi
I've done this several times and the way I do it is:
1. Look for the final dissector file, should be under
epan/dissector/packet-xxx.c (in this case packet-snmp.c)
2. Copy the build command for asn2wrs as seen in the 4th line. In this
case it looks like this:
asn2wrs.py -b -p snmp -c ./snmp.cnf -s ./packet-snmp-template -D . -O
../.. snmp.asn
3. Open the command prompt in your dissector's asn1 folder
(/epan/dissector/asn1/snmp/)
4. Run asn2wrs.py using it's full path. In my case it's
"C:\Development\wireshark\tools\asn2wrs.py" and add the parameters you
saw in the generated file
so it should look line this:
C:\Development\wireshark\tools\asn2wrs.py -b -p snmp -c ./snmp.cnf -s
./packet-snmp-template -D . -O ../.. snmp.asn

This should create the new packet-snmp.c and .h files under
epan/dissectors/ and override the existing ones

Darien

*Sent:* Monday, February 19, 2018 at 2:55 PM
*From:* "Dario Lombardo" <dario.lombardo.ml () gmail com>
*To:* "Developer support list for Wireshark" <wireshark-dev () wireshark org

*Subject:* [Wireshark-dev] Regenerate asn dissector
Hi
I've modified epan/dissectors/asn1/snmp/packet-snmp-template.c and I
want to regenerate the corresponding dissector.
I've found the cmake target epan/dissectors/asn1/snmp/generate_dissector-snmp,
but building it doesn't regenerate the dissector.
What's the missing step?
Thanks.
Dario.
___________________________________________________________________________
Sent via: Wireshark-dev mailing list Archives:
https://www.wireshark.org/lists/wireshark-dev Unsubscribe:
https://www.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://www.wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request () wireshark org?subject=unsubscr
ibe



____________________________________________________________
_______________
Sent via:    Wireshark-dev mailing list <wireshark-dev () wireshark org>
Archives:    https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://www.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://www.wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request () wireshark org?subject=unsubscribe

Current thread: