"Selcuk Cevher" <[EMAIL PROTECTED]> said:
> Below is the pcap_stat structure :
> ***************************
> struct pcap_stat {
> u_int ps_recv; /* number of packets received */
> u_int ps_drop; /* number of packets dropped */
> u_int ps_ifdrop; /* drops by interface XXX not yet supported */
> #ifdef REMOTE
> #ifdef WIN32
> u_int bs_capt; /* number of packets that reach the application */
> #endif /* WIN32 */
> u_int ps_capt; /* number of packets that reach the application; please get
> rid off the Win32 ifdef */
> u_int ps_sent; /* number of packets sent by the server on the network */
> u_int ps_netdrop; /* number of packets lost on the network */
> #endif
> };
> *************************
> i use the below code fragment in my application source :
> **********
> pcap_stat ps;
> ...
> pcap_stats_ex(session_handle, &ps);
> printf("%u packets in kernel buffer", ps.bs_capt);
> ...
> **********
> when i try to compile this code,i take the following compilation error :
> bs_capt : is not a member of 'pcap_stat' ...
Use 'ps.ps_capt' or count the packets yourself in your callback.
The state on libpcap on Windows is a complete mess with the
half-finished remote capture code and everything. Don't define
REMOTE to make it compile! That will cause the ugly typecast in
pcap_stats_win32() to return wrong results.
--gv
==================================================================
This is the WinPcap users list. It is archived at
http://www.mail-archive.com/[EMAIL PROTECTED]/
To unsubscribe use
mailto: [EMAIL PROTECTED]
==================================================================