[Bug 51818] Reporting packet length is always 0

WineHQ Bugzilla wine-bugs at winehq.org
Sun Oct 3 10:03:37 CDT 2021


https://bugs.winehq.org/show_bug.cgi?id=51818

--- Comment #5 from Hans Leidekker <hans at meelstraat.net> ---
(In reply to marc_aurel from comment #4)
> binaries should also be included in the archive above

Thanks. The problem is that the structure layout of pcap_pkthdr is different
between 64-bit Linux and 64-bit Windows. It's defined like this:

struct pcap_pkthdr {
    struct timeval ts;  /* time stamp */
    bpf_u_int32 caplen; /* length of portion present */
    bpf_u_int32 len;    /* length of this packet (off wire) */
};

The size of struct timeval is 8 bytes on 32-bit and 64-bit Windows but on
64-bit Linux it's 16 bytes. This means len is at a different offset (12 vs 20).
A 32-bit build of your test app should work.

To make this work for 64-bit apps we'll need to convert between native and
win32 versions of this structure.

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list