aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/network_instruments.c
AgeCommit message (Collapse)AuthorFilesLines
2010-11-05From Robert Bullen:Anders Broman1-39/+60
Network Instruments' trace files sometimes cannot be read with an error message of "Observer: bad record: Invalid magic number" https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5330 svn path=/trunk/; revision=34783
2010-06-06Don't use fwrite directly when writing a dump file; call it throughGuy Harris1-24/+6
wtap_dump_file_write(). Replace various wrappers around fwrite() with wtap_dump_file_write(), or at least make the wrappers call wtap_dump_file_write(). svn path=/trunk/; revision=33116
2010-02-26Move the definitions of all the private data structures out ofGuy Harris1-12/+11
wtap-int.h, and change the unions of pointers to those private data structures into just void *'s. Have the generic wtap close routine free up the private data, rather than the type-specific close routine, just as the wtap_dumper close routine does for its private data. Get rid of close routines that don't do anything any more. svn path=/trunk/; revision=32015
2009-04-22Clean up some 64-bit issues.Guy Harris1-2/+2
svn path=/trunk/; revision=28117
2009-03-09P64 fixes.Gerald Combs1-2/+2
svn path=/trunk/; revision=27683
2008-05-08strncpy -> g_strlcpyAnders Broman1-1/+1
svn path=/trunk/; revision=25254
2008-02-03More rewrite of prohibited APIs (sprintf, strcpy, strcat).Stig Bjørlykke1-2/+2
svn path=/trunk/; revision=24258
2006-11-05change all file offsets from long to gint64 so we can - theoretically - ↵Ulf Lamping1-5/+5
handle files > 2GB correct. Please distclean Win32 builds! svn path=/trunk/; revision=19814
2006-05-28Ethareal->WiresharkAnders Broman1-1/+1
svn path=/trunk/; revision=18230
2006-04-16Add some missing little-endianizing.Guy Harris1-5/+7
Get rid of some unnecessary casts. Multiply seconds by 10^9, not 10^6, to get nanoseconds. svn path=/trunk/; revision=17872
2006-04-16Add a loop to process TLVs in the file header.Guy Harris1-16/+52
Advertise nanosecond resolution. svn path=/trunk/; revision=17871
2006-04-16Move file format definitions to the header file.Guy Harris1-115/+154
Put the code to read the packet header and the packet data into routines (which also fixes some places where observer_seek_read() was using the sequential file handle rather than the random file handle), make the packet header reader skip over the TLVs, Do some additional sanity checking. Wiretap supports nanosecond resolution; provide nanosecond resolution time stamps. Rename some structure members to match their purpose (they're TLV counts, not flags). Remove the TLV header from the TLV structures (and eliminate TLV structures if we don't have the contents or they're just a string); if we process them, we'll probably end up reading the header and data separately. Add some information about some of the TLVs in expert information packets. svn path=/trunk/; revision=17870
2006-04-14Skip non-data records. Fixes bug 767.Guy Harris1-18/+46
svn path=/trunk/; revision=17861
2006-03-08Coverity's run 14 CID 82.Luis Ontanon1-2/+2
an off by one error (> vs >= in bounds check). svn path=/trunk/; revision=17520
2005-08-25timestamp display precision:Ulf Lamping1-0/+1
- automatic adjustment depending on file format - manual adjustment through menu items save the setting in the recent file svn path=/trunk/; revision=15534
2005-08-24EVERYTHING IN THE BUILDBOT IS GOING TO BE RED!!! Sorry! Ulf Lamping1-7/+7
I've done more than a day to change the timestamp resolution from microseconds to nanoseconds. As I really don't want to loose those changes, I'm going to check in the changes I've done so far. Hopefully someone else will give me a helping hand with the things left ... What's done: I've changed the timestamp resolution from usec to nsec in almost any place in the sources. I've changed parts of the implementation in nstime.s/.h and a lot of places elsewhere. As I don't understand the editcap source (well, I'm maybe just too tired right now), hopefully someone else might be able to fix this soon. Doing all those changes, we get native nanosecond timestamp resolution in Ethereal. After fixing all the remaining issues, I'll take a look how to display this in a convenient way... As I've also changed the wiretap timestamp resolution from usec to nsec we might want to change the wiretap version number... svn path=/trunk/; revision=15520
2005-06-30make reading of observer files work againRonnie Sahlberg1-1/+11
for some reason we have forgotten to skip the initial (always 8?) bytes prior to the start of the frame. svn path=/trunk/; revision=14822
2004-07-18Set the svn:eol-style property on all text files to "native", so thatGuy Harris1-1/+1
they have LF at the end of the line on UN*X and CR/LF on Windows; hopefully this means that if a CR/LF version is checked in on Windows, the CRs will be stripped so that they show up only when checked out on Windows, not on UN*X. svn path=/trunk/; revision=11400
2004-02-09Add extra {} to "avoid ambiguous `else'", to quote the GCC warning thatGuy Harris1-3/+3
this squelches. svn path=/trunk/; revision=10009
2004-01-25Have the Wiretap open, read, and seek-and-read routines return, inGuy Harris1-14/+17
addition to an error code, an error info string, for WTAP_ERR_UNSUPPORTED, WTAP_ERR_UNSUPPORTED_ENCAP, and WTAP_ERR_BAD_RECORD errors. Replace the error messages logged with "g_message()" for those errors with g_strdup()ed or g_strdup_printf()ed strings returned as the error info string, and change the callers of those routines to, for those errors, put the info string into the printed message or alert box for the error. Add messages for cases where those errors were returned without printing an additional message. Nobody uses the error code from "cf_read()" - "cf_read()" puts up the alert box itself for failures; get rid of the error code, so it just returns a success/failure indication. Rename "file_read_error_message()" to "cf_read_error_message()", as it handles read errors from Wiretap, and have it take an error info string as an argument. (That handles a lot of the work of putting the info string into the error message.) Make some variables in "ascend-grammar.y" static. Check the return value of "erf_read_header()" in "erf_seek_read()". Get rid of an unused #define in "i4btrace.c". svn path=/trunk/; revision=9852
2004-01-05 removed some MSVC warnings (level 3)Ulf Lamping1-2/+2
svn path=/trunk/; revision=9558
2003-11-25"file_seek()" sets "*err" - there's no need to set it ourselves. ItGuy Harris1-15/+7
returns -1 on errors, so just check for that. svn path=/trunk/; revision=9078
2003-11-06From Scott Emberley: support for writing Network Instruments ObserverGuy Harris1-19/+172
files. svn path=/trunk/; revision=8900
2003-11-01The time in Observer files is in nanoseconds since midnight, January 1,Guy Harris1-14/+45
2000, 00:00:00 *local* time. The amount to add to that is just the UNIX time stamp value for that point in time; get it with "mktime()". svn path=/trunk/; revision=8854
2003-10-31Temporarily get rid of the "struct tm" in "struct observer_time", andGuy Harris1-1/+5
get rid of the reference to its "tm_gmtoff" member - there are platforms on which Ethereal runs that don't have "tm_gmtoff" in "struct tm". If the time stamp in the packets is nanoseconds since midnight 2001-01-01 *local* time, we'd need to compute the offset between that and midnight 2000-01-01 GMT, and adjust the time with that. svn path=/trunk/; revision=8842
2003-10-31From Scott Emberley: support for reading Network Instruments version 9Guy Harris1-0/+290
capture files. svn path=/trunk/; revision=8840