Hello,

I've been active in creating a dissector for IEC61850, which is mapped on
top of mms. There is an integrated mms dissector that I'm using as a
template, while mapping all mms names to the IEC61850 equivalent. I have
been able to successfully use asn2wrs.py to generate a packet dissector
from the .cnf and .asn files, and can build a static wireshark executable
with my dissector included.

However, I'm now trying to get the same dissector to work as an external
plugin, so it can be loaded by others into their wireshark without having
to use my compiled version of wireshark.

While the external plugin compiled fine, i'm running into the problem that
the dissector_acse_* external symbols cannot be
resolved(dissect_acse_EXTERNALt is the first one) during runtime. The
dissector relies on these symbols from epan/dissectors/packet-acse.c, and
as statically build dissector they can of course be resolved. But when the
plugin loads externally during runtime(manual or automatic), the symbol
cannot be resolved anymore, while I can find it in libwireshark.so, which
is in turn loaded into memory by the wireshark process.

I was not able to find other wireshark examples where external plugins
relied on symbols from statically linked dissectors. Is what I want simply
not possible, and should I include all acse dissector, and sub dependencies
as well in my plugin(lots of code duplication), or am I building the plugin
not correct or missing a linker flag?

I'm using the following (standard) CMakeLists.txt

include(WiresharkPlugin)

# Plugin name and version info (major minor micro extra)
set_module_info(iec61850 0 0 1 0)

set(DISSECTOR_SRC
packet-iec61850.c
)

set(PLUGIN_FILES
plugin.c
${DISSECTOR_SRC}
)

set_source_files_properties(
${PLUGIN_FILES}
PROPERTIES
COMPILE_FLAGS "${WERROR_COMMON_FLAGS}"
)

register_plugin_files(plugin.c
plugin
"iec 61850 mms protocol"
${DISSECTOR_SRC}
)

add_wireshark_epan_plugin_library(iec61850)

target_link_libraries(iec61850 epan)

install_plugin(iec61850 epan)

file(GLOB DISSECTOR_HEADERS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "*.h")
CHECKAPI(
NAME
 iec61850
SWITCHES
 --group dissectors-prohibited
 --group dissectors-restricted
SOURCES
 ${DISSECTOR_SRC}
 ${DISSECTOR_HEADERS}
)

Thanks in advance,

Robin
___________________________________________________________________________
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-requ...@wireshark.org?subject=unsubscribe

Reply via email to