]> git.ipfire.org Git - thirdparty/libvirt.git/commit
wireshark: Fix int type of some virNetMessageHeader members
authorMichal Privoznik <mprivozn@redhat.com>
Mon, 13 Oct 2025 07:21:30 +0000 (09:21 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 14 Oct 2025 13:08:27 +0000 (15:08 +0200)
commit7374c4ecbd591b02f7be4b2918addc6d5852aafb
treef1d8ab92a7dada5ec5e16deb219d796f051d17ce
parent02a0e78bf54c903da8922c56bade9b3298ade351
wireshark: Fix int type of some virNetMessageHeader members

Our virNetMessageHeader is a struct that's declared as follows:

  struct virNetMessageHeader {
      unsigned prog;
      unsigned vers;
      int proc;
      virNetMessageType type;
      unsigned serial;
      virNetMessageStatus status;
  };

Now, per RFC 4506 enums are also encoded as signed integers. This
means, that only 'prog', 'vers' and 'serial' are really unsigned
integers. The others ('proc', 'type' and 'status') are encoded as
signed integers. Fix their type when dissecting.

While at it, also follow latest trend in wireshark and switch
from guint32 to uint32_t.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
tools/wireshark/src/packet-libvirt.c