Wireshark插件编译
Wireshark plugin compiled
正在尝试使用 wireshark-nfc 示例编译 wireshark 插件
(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
我在编译时使用这个文件,一切正常,但在 wireshrk 应用程序中它显示错误
The plugin 'nfc-wireshark.so' was compiled for Wireshark version 3.3
您之前发布的图片显示了不同的版本:“775433776.775433776”。这些十进制数等于 x2E382E30.x2E382E30。这看起来像是“.8.0”、“.8.0”的转储。
如果你想为 Wireshark 3.4.9(最新版本)编译,我会尝试更改定义
#define WIRESHARK_VERSION_MAJOR "3"
#define WIRESHARK_VERSION_MINOR "4"
正在尝试使用 wireshark-nfc 示例编译 wireshark 插件 (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
我在编译时使用这个文件,一切正常,但在 wireshrk 应用程序中它显示错误
The plugin 'nfc-wireshark.so' was compiled for Wireshark version 3.3
您之前发布的图片显示了不同的版本:“775433776.775433776”。这些十进制数等于 x2E382E30.x2E382E30。这看起来像是“.8.0”、“.8.0”的转储。
如果你想为 Wireshark 3.4.9(最新版本)编译,我会尝试更改定义
#define WIRESHARK_VERSION_MAJOR "3"
#define WIRESHARK_VERSION_MINOR "4"