]> git.ipfire.org Git - thirdparty/libvirt.git/commit
wireshark: Switch to tvb_bytes_to_str()
authorMichal Privoznik <mprivozn@redhat.com>
Mon, 29 Nov 2021 08:57:49 +0000 (09:57 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Mon, 29 Nov 2021 14:05:33 +0000 (15:05 +0100)
commit7e299ba649b1288d529c7595c0e6060c9ae0ff2a
tree7eee1d6e23ee04a8eef32b018c768e58a8b22199
parent540c8cbef0615cc2c0bd6b5ab314b31962a060ad
wireshark: Switch to tvb_bytes_to_str()

When the dissector sees a byte sequence that is either an opaque
data (xdr_opaque) or a byte sequence (xdr_bytes) it formats the
bytes as a hex numbers using our own implementation. But
wireshark already provides a function for it: tvb_bytes_to_str().
NB, the reason why it returns a const string is so that callers
don't try to free it - the string is allocated using an allocator
which will decide when to free it.

The wireshark formatter was introduced in wireshark commit of
v1.99.2~479 and thus is present in the version we require at
least (2.6.0).

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
tools/wireshark/src/packet-libvirt.c