[Winpcap-users] struct bpf_hdr mismatch

Gianluca Varenni gianluca.varenni at cacetech.com
Thu Sep 4 22:20:03 GMT 2008


I just tried your code snippet from the VS2008EE IDE, and it didn't compile 
as it was. I had to change the order of the #include directives (not 
surprising, it's always been like that. You need to include packet32.h 
before windows.h).

After that, the result was "sizes ok". I used the developer's pack for 
winpcap 4.1 beta4.

Can you please send me a zip file of the VS2008EE solution that you used for 
the test?

Have a nice day

----- Original Message ----- 
From: "Gisle Vanem" <gvanem at broadpark.no>
To: "WinDump" <winpcap-users at winpcap.org>
Sent: Thursday, September 04, 2008 6:43 AM
Subject: Re: [Winpcap-users] struct bpf_hdr mismatch

> "Fish" <fish at infidels.org> wrote:
>> Gisle Vanem wrote:
>> [...]
>>> layout of this structure has changed. But I fail
>>> to see why; 'time_t' is still a 'long' from what
>>> I can see from 'cl -E'.
>> Does:
>>  cl -MTd -W2 struct_bpf.c -I<pcap_root>\Include -D_USE_32BIT_TIME_T
>> help any?
> Yes, that helps. But that raises another question; should WinPcap/libpcap
> users really have to remember to set '-D_USE_32BIT_TIME_T'? If so, what a 
> kludge!
> Maybe there should be a new 'struct npf_sys_timeval' structure to match
> what npf.sys was built with. Or a runtime check to warn users bout this?
> What do you say Gianluca?
> --gv
> _______________________________________________
> Winpcap-users mailing list
> Winpcap-users at winpcap.org
> https://www.winpcap.org/mailman/listinfo/winpcap-users 

More information about the Winpcap-users mailing list