This is a static archive of our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

Asn2Wrs file placement and needed changes?

0

Hey there, I've tried building an asn2wrs dissector but I can't find any up to date resource. README.dissector, README.plugins and the web docs don't seem to mention that while the Asn2wrs wiki entry is from 2010.

A small guide or a few pointers would be much appreciated, best regards.

asked 24 Mar '17, 09:09

clem's gravatar image

clem
6115
accept rate: 100%


One Answer:

0

On what OS are you building? If you are adding a new dissector add a new dir in /epan/dissectors/asn1 and add your files there. Then just compare with an existing dissector and add similar stuff for your new one. If building with cmake add your dissector and the build files run cmake then in the build dir do (h248 as an example)

On Windows, you need to go to epan\dissectors\asn\h248 folder and run: msbuild /m /p:Configuration=RelWithDebInfo generate_dissector-h248.vcxproj

answered 27 Mar '17, 01:55

Anders's gravatar image

Anders ♦
4.6k952
accept rate: 17%

Building on ubuntu 16, tried make didn't get that to work so far. Using cmake I got to the point of invoking asn2wrs and now I'm also getting compile errors, which are probably due to the antique example files. Progress.

To get to this point I've done the following:

  • create 'foo' dir in ws/epan/dissectors/asn1/
  • copied and changed the required files from h248
  • in main-dir create CMakeListsCustom.txt, add "epan/dissectors/asn1/foo" to CUSTOM_PLUGIN_SRC_DIR (invokes asn2wrs ?)
  • ws/epan/dissectors/CMakeListsCustom.txt added "packet-foo.c" to CUSTOM_DISSECTOR_SRC (invokes compile ?)

Is there a way to compile asn2wrs-dissector as plugins or this not an intended ?

(30 Mar '17, 06:58) clem