Wireshark mailing list archives

Re: How to access the network statistics info from these captured files in another code i'm developing


From: Guy Harris <guy () alum mit edu>
Date: Fri, 16 Apr 2010 13:15:44 -0700


On Apr 16, 2010, at 9:12 AM, sachindeo v chavan wrote:

I captured the network using wireshark 1.2.7 in promiscuous mode.
Please find the attached capture files.

I would like to access this file in another software code i'm developing in C/C++. How to access the network 
statistics info from these captured files?

Those aren't network statistics, those are raw traces of network packets.

Wireshark's standard capture file format is pcap format, which can be read by the libpcap library on UN*X and the 
WinPcap library on Windows.  You could use that - but bear in mind that it's a *VERY* low-level library; what it gives 
you is the time at which the packet was seen by the capture mechanism (which is close to the time when it was received, 
but not necessarily the exact time it was received) and the raw packet data.  It does no interpretation of the data; 
you would either have to write your own code to parse the raw packet data the same way network analyzers such as 
Wireshark parse it, or find a library that can do some or all of that parsing for you.
___________________________________________________________________________
Sent via:    Wireshark-users mailing list <wireshark-users () wireshark org>
Archives:    http://www.wireshark.org/lists/wireshark-users
Unsubscribe: https://wireshark.org/mailman/options/wireshark-users
             mailto:wireshark-users-request () wireshark org?subject=unsubscribe


Current thread: