Skip to content
This repository was archived by the owner on Jul 16, 2019. It is now read-only.

Commit 4bc9e7b

Browse files
committed
Slight updates to spead plugin to allow compatibility with wireshark 1.10.7
1 parent a904ecd commit 4bc9e7b

File tree

2 files changed

+13
-11
lines changed

2 files changed

+13
-11
lines changed

wireshark_plugin/spead/packet-spead.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,11 @@ dissect_spead(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
9696
// get the number of items in this header
9797
offset = 8;
9898
for (i=0; i < no_items; i++) {
99-
item_sub_item = proto_tree_add_item(items_tree, hf_spead_item_id, tvb, offset+1, 2, FALSE);
99+
item_sub_item = proto_tree_add_item(items_tree, hf_spead_item_id, tvb, offset+0, 2, FALSE);
100100
item_tree = proto_item_add_subtree(item_sub_item, ett_item);
101101
proto_tree_add_uint_format(item_tree, hf_spead_item_mode, tvb, offset, 1, tvb_get_guint8(tvb,7),
102102
"Item Adress Mode: %s", (tvb_get_guint8(tvb,offset) & 0x80) ? "Immediate" : "Absolute");
103-
proto_tree_add_item(item_tree, hf_spead_item_val, tvb, offset+3, 5, FALSE);
103+
proto_tree_add_item(item_tree, hf_spead_item_val, tvb, offset+2, 6, FALSE);
104104
offset+=8;
105105
}
106106

@@ -148,5 +148,5 @@ proto_reg_handoff_spead(void)
148148
static dissector_handle_t spead_handle;
149149

150150
spead_handle = create_dissector_handle(dissect_spead, proto_spead);
151-
dissector_add("udp.port", SPEAD_PORT, spead_handle);
151+
dissector_add_uint("udp.port", SPEAD_PORT, spead_handle);
152152
}

wireshark_plugin/spead/plugin.c

+10-8
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,31 @@
11
/*
2-
* Do not modify this file.
2+
* Do not modify this file. Changes will be overwritten.
33
*
4-
* It is created automatically by Makefile or Makefile.nmake.
4+
* Generated automatically from ../../tools/make-dissector-reg.py.
55
*/
66

7-
#ifdef HAVE_CONFIG_H
8-
# include "config.h"
9-
#endif
7+
#include "config.h"
108

119
#include <gmodule.h>
1210

1311
#include "moduleinfo.h"
1412

13+
/* plugins are DLLs */
14+
#define WS_BUILD_DLL
15+
#include "ws_symbol_export.h"
16+
1517
#ifndef ENABLE_STATIC
16-
G_MODULE_EXPORT const gchar version[] = VERSION;
18+
WS_DLL_PUBLIC_NOEXTERN const gchar version[] = VERSION;
1719

1820
/* Start the functions we need for the plugin stuff */
1921

20-
G_MODULE_EXPORT void
22+
WS_DLL_PUBLIC_NOEXTERN void
2123
plugin_register (void)
2224
{
2325
{extern void proto_register_spead (void); proto_register_spead ();}
2426
}
2527

26-
G_MODULE_EXPORT void
28+
WS_DLL_PUBLIC_NOEXTERN void
2729
plugin_reg_handoff(void)
2830
{
2931
{extern void proto_reg_handoff_spead (void); proto_reg_handoff_spead ();}

0 commit comments

Comments
 (0)