mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
wireshark: Adapt to dissector function header change
In wireshark commit bbdd89b9 (contained in 2.1.0 release) they have changed prototype of dissector function. Now it returns number of bytes consumed by the dissector, and can get a pointer to user specified data (which we don't use). Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
8ad7eceb20
commit
98aefa813d
@ -442,8 +442,14 @@ get_message_len(packet_info *pinfo ATTRIBUTE_UNUSED, tvbuff_t *tvb, int offset)
|
||||
return tvb_get_ntohl(tvb, offset);
|
||||
}
|
||||
|
||||
#if WIRESHARK_VERSION >= 2000001
|
||||
static int
|
||||
dissect_libvirt(tvbuff_t *tvb, packet_info *pinfo,
|
||||
proto_tree *tree, void *data ATTRIBUTE_UNUSED)
|
||||
#else
|
||||
static void
|
||||
dissect_libvirt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
#endif
|
||||
{
|
||||
/* Another magic const - 4; simply, how much bytes
|
||||
* is needed to tell the length of libvirt packet. */
|
||||
@ -454,6 +460,10 @@ dissect_libvirt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
tcp_dissect_pdus(tvb, pinfo, tree, TRUE, 4,
|
||||
get_message_len, dissect_libvirt_message, NULL);
|
||||
#endif
|
||||
|
||||
#if WIRESHARK_VERSION >= 2000001
|
||||
return tvb_captured_length(tvb);
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
x
Reference in New Issue
Block a user