#include "tap.h"
+/* proto_expert cannot be static because it's referenced in the
+ * print routines
+ */
+int proto_expert = -1;
static int expert_tap = -1;
-static int proto_expert = -1;
static int highest_severity = 0;
static int ett_expert = -1;
WS_VAR_IMPORT const value_string expert_severity_vals[];
WS_VAR_IMPORT const value_string expert_group_vals[];
+/* "proto_expert" is exported from libwireshark.dll.
+ * Thus we need a special declaration.
+ */
+WS_VAR_IMPORT int proto_expert;
+
extern void
expert_init(void);
#include <epan/tvbuff.h>
#include <epan/packet.h>
#include <epan/emem.h>
+#include <epan/expert.h>
#include "packet-range.h"
#include "print.h"
}
/* Normal protocols and fields */
else {
- if (fi->hfinfo->type == FT_PROTOCOL) {
+ if (fi->hfinfo->type == FT_PROTOCOL && fi->hfinfo->id != proto_expert) {
fputs("<proto name=\"", pdata->fh);
}
else {
fputs(" ", pdata->fh);
}
/* Close off current element */
- if (fi->hfinfo->id != proto_data) { /* Data protocol uses simple tags */
+ /* Data and expert "protocols" use simple tags */
+ if (fi->hfinfo->id != proto_data && fi->hfinfo->id != proto_expert) {
if (fi->hfinfo->type == FT_PROTOCOL) {
fputs("</proto>\n", pdata->fh);
}