nfcwiresharkwireshark-dissector

Wireshark plugin compiled


Trying to compile wireshark plugin using wireshark-nfc example (https://code.google.com/archive/p/wireshark-nfc/)

#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#define WS_BUILD_DLL

#include <gmodule.h>

/* Included *after* config.h, in order to re-define these macros */
#ifdef PACKAGE
#undef PACKAGE
#endif

/* Name of package */
#define PACKAGE "nfc-wireshark"

#ifdef VERSION
#undef VERSION
#endif

/* Version number of package */
#define VERSION "0.8.0"
#define WIRESHARK_VERSION_MAJOR "0.8.0"
#define WIRESHARK_VERSION_MINOR "0.8.0"

#ifndef ENABLE_STATIC
G_MODULE_EXPORT const gchar plugin_version[] = VERSION;
G_MODULE_EXPORT const gchar plugin_want_major[] = WIRESHARK_VERSION_MAJOR;
G_MODULE_EXPORT const gchar plugin_want_minor[] = WIRESHARK_VERSION_MINOR;

G_MODULE_EXPORT void plugin_register(void) {
  extern void proto_register_llcp(void);
  extern void proto_register_snep(void);
  extern void proto_register_ndef(void);
  proto_register_llcp();
  proto_register_ndef();
  proto_register_snep();
}

G_MODULE_EXPORT void plugin_reg_handoff(void) {
  extern void proto_reg_handoff_llcp(void);
  extern void proto_reg_handoff_snep(void);
  extern void proto_reg_handoff_ndep(void);
  proto_reg_handoff_llcp();
  proto_reg_handoff_snep();
  proto_reg_handoff_ndef();
}
#endif

I use this file when compiling, everything works, but in the wireshrk application it displays an error

The plugin 'nfc-wireshark.so' was compiled for Wireshark version 3.3


Solution

  • Your previously posted graphic shows a different version: "775433776.775433776". These decimal number are equal to x2E382E30.x2E382E30. This looks like a dump of ".8.0",".8.0".

    If you want to compile for Wireshark 3.4.9 (the latest version) I would try to change the defines

    #define WIRESHARK_VERSION_MAJOR "3"
    #define WIRESHARK_VERSION_MINOR "4"