How can I get the Wireshark install directory from within a wireshark dissector? My dissector relies on some external libraries and I would like to avoid hard coding "C:Program FilesWiresharkPluginsFooDebendancies" Thank you for your time, Brandon asked 25 Jul '11, 08:09 officialhopsof |
One Answer:
You can use one of the routines in epan/filesystem.c, for example get_plugin_dir(). Not that you should normally be doing any such thing in a dissector... answered 25 Jul '11, 14:05 JeffMorriss ♦ |
include <epan/filesystem.c>
Causes linker errors, specifically:
error LNK2019: unresolved external symbol _ws_stdio_stat64 referenced in function _test_for_directory
error LNK2019: unresolved external symbol _utf_16to8 referenced in function _init_progfile_dir
error LNK2019: unresolved external symbol _getenv_utf8 referenced in function _get_datafile_dir
error LNK2019: unresolved external symbol _ws_stdio_remove referenced in function _delete_directory
error LNK2019: unresolved external symbol _ws_stdio_rename referenced in function _rename_persconffile_profile
error LNK2019: unresolved external symbol _ws_stdio_mkdir referenced in function _create_persconffile_profile
packet-vmf.obj : error LNK2019: unresolved external symbol imp[email protected] referenced in function _get_persdatafile_dir
error LNK2019: unresolved external symbol _ws_stdio_unlink referenced in function _deletefile
error LNK2019: unresolved external symbol _ws_stdio_open referenced in function _copy_file_binary_mode
But this appears like it's what I want.
It's an atrocity to
#include
a C file. Include the header instead.Oh! That was a typo I didn't spot! Thanks!