summaryrefslogtreecommitdiff
path: root/wiretap/visual.c
AgeCommit message (Collapse)AuthorFilesLines
2010-02-26Move the definitions of all the private data structures out ofGuy Harris1-25/+8
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
2010-01-23Fix for bug 4408:Jaap Keuter1-2/+14
Make further encapsulation determination between "VC-multiplexed PPP" and "LLC encapsulated PPP". See RFC 2364. svn path=/trunk/; revision=31634
2009-04-22Clean up some 64-bit issues.Guy Harris1-1/+1
svn path=/trunk/; revision=28117
2009-03-09More 64-bit fixes.Gerald Combs1-1/+1
svn path=/trunk/; revision=27685
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-1/+1
svn path=/trunk/; revision=24258
2007-11-25Clean up a comment.Guy Harris1-2/+2
svn path=/trunk/; revision=23579
2007-11-25Removed a "/*" within comment.Stig Bjørlykke1-1/+1
svn path=/trunk/; revision=23578
2007-11-25Put in a comment about encapsulation hint values.Guy Harris1-1/+8
svn path=/trunk/; revision=23576
2007-11-25Note that the encapsulation type values are SNMP ifType values, andGuy Harris1-10/+15
suggest that perhaps WTAP_ENCAP_PER_PACKET be used for propPointToPointSerial and HDLC. svn path=/trunk/; revision=23575
2007-11-24From James Menzies: if the per-packet encapsulation hint is 14, theGuy Harris1-3/+19
packets are always PPP, otherwise they're of an unknown type and we use a heuristic to guess the type. svn path=/trunk/; revision=23573
2007-11-21Get rid of a no-longer-used variable.Guy Harris1-1/+0
svn path=/trunk/; revision=23537
2007-11-21Don't use "if it begins with 0xff 0x03 it's PPP, otherwise it's CiscoGuy Harris1-10/+3
HDLC" to try to distinguish Cisco HDLC from PPP packets; Address-and-Control-Field-Compression can be negotiated on, so there's no guarantee that PPP frames begin with 0xff 0x03. Fixes bug 2005. svn path=/trunk/; revision=23535
2007-08-23From Scott Robinson:Stephen Fisher1-12/+218
Enhancement patch: http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1758 This change gives Wireshark the ability to read ATM captures saved by UpTime Select traffic capture. svn path=/trunk/; revision=22612
2007-03-31From James Menzies:Stephen Fisher1-3/+12
This corrects two long standing issues with the Visual Networks file type in PPP and ML-PPP environments. svn path=/trunk/; revision=21293
2007-03-21set compiler option "treat warnings as errors" - to prevent new warnings for ↵Ulf Lamping1-2/+2
wiretap remove all compiler warnings: a) prevent wrong malloc/free definitions by lex/yacc generated files b) add int/time_t casts - MSVC2005 is more "sensitive" about this than MSVC6 svn path=/trunk/; revision=21078
2006-11-05change all file offsets from long to gint64 so we can - theoretically - ↵Ulf Lamping1-4/+4
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
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-5/+5
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
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-03-03Have "wtap_read()" set "wth->phdr.pkt_encap" to "wth->file_encap",Guy Harris1-3/+1
rather than requiring individual capture file type handlers to do it (unless they're doing per-packet encapsulation, in which case we check to make sure they didn't *leave* it as WTAP_ENCAP_PER_PACKET). svn path=/trunk/; revision=10290
2004-01-25Have the Wiretap open, read, and seek-and-read routines return, inGuy Harris1-11/+14
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
2003-10-25Add a new WTAP_ENCAP_CHDLC_WITH_PHDR type, to distinguish Cisco HDLCGuy Harris1-8/+8
captures with packet direction information from captures without it. Use them appropriately. svn path=/trunk/; revision=8780
2003-10-01Have a pseudo-header for Ethernet packets, giving the size of the FCS -Guy Harris1-27/+25
0 means "there is no FCS in the packet data", 4 means "there is an FCS in the packet data", -1 means "I don't know whether there's an FCS in the packet data, guess based on the packet size". Assume that Ethernet encapsulated inside other protocols has no FCS, by having the "eth" dissector assume that (and not check for an Ethernet pseudo-header). Have "ethertype()" take an argument giving the FCS size; pass 0 when appropriate. Fix up Wiretap routines to set the pseudo-header. This means we no longer use the "generic" seek-and-read routine, so get rid of it. svn path=/trunk/; revision=8574
2003-01-31Add WTAP_ENCAP_FRELAY_WITH_PHDR for use with Frame Relay capture filesGuy Harris1-16/+45
that have direction information. Support writing WTAP_ENCAP_FRELAY_WITH_PHDR and WTAP_ENCAP_PPP_WITH_PHDR captures out in libpcap format - we throw away the direction information, but so it goes. When reading/writing Windows Sniffer format, read and write the direction flag. svn path=/trunk/; revision=7052
2002-08-28Removed trailing whitespaces from .h and .c files using theJörg Mayer1-23/+23
winapi_cleanup tool written by Patrik Stridvall for the wine project. svn path=/trunk/; revision=6115
2002-07-29From Joerg Mayer:Guy Harris1-4/+4
All files: - Replace types from sys/types.h by those from glib.h - Replace ntoh family of macros from netinet/in.h and winsock2.h by g_ntoh family from glib.h - Remove now unneeded includes of sys/types.h, netinet/in.h and winsock2.h wtap.h Move includes to the top svn path=/trunk/; revision=5909
2002-07-16From Graeme Hewson:Guy Harris1-2/+9
Allow "-" as the output file name in Wiretap, referring to the standard error. Optimize the capture loop. Fix some of the error-message printing code in Ethereal and Tethereal. Have Wiretap check whether it can seek on a file descriptor, and pass the results of that test to the file-type-specific "open for output" routine. Have the "open for output" routines for files where we need to seek when writing the file return an error if seeks don't work. svn path=/trunk/; revision=5884
2002-06-07Graeme Hewson noted that zlib has a bug wherein "gzseek()" doesn't setGuy Harris1-4/+2
the internal z_err value for the stream if an "fseek()" call it makes fails, so that if "gzerror()" is subsequently called, it returns Z_OK rather than an error. To work around this, we pass "file_seek()" an "int *err", and have the with-zlib version of "file_seek()" check, if "gzseek()" fails, whether the return value of "file_error()" is 0 and, if so, have it return "errno" instead. svn path=/trunk/; revision=5642
2002-05-04Fix capture-file-specific "close output" routines to check whether theGuy Harris1-14/+23
"err" argument is null and return an error code through that argument only if it isn't, to match what "wtap_dump_close()", which calls those routines, does. Put the NetXRay dump routines in order by version number. svn path=/trunk/; revision=5385
2002-04-09Move the definition of the FROM_DCE bit in the "flags" field of aGuy Harris1-4/+6
"struct x25_phdr" to "wiretap/wtap.h". Have two X.25 dissectors, one of which assumes that there's a "struct x25_phdr" pseudo-header and one of which doesn't; the former uses the information in that pseudo-header to determine whether the packet is DTE->DCE or DCE->DTE, and the latter assumes it has no clue whether the packet is DTE->DCE or DCE->TDE. Use the former one in the LAPB dissector, and the latter one in the XOT dissector and in the LLC dissector table. In the X.25-over-TCP dissector, handle multiple X.25 packets per TCP segment, and handle X.25 packets split across TCP segments. svn path=/trunk/; revision=5134
2002-03-05Make "wtap_seek_read()" return TRUE on success and FALSE on error, likeGuy Harris1-7/+7
"wtap_read()". Add some additional error checks to the Sniffer file reader. svn path=/trunk/; revision=4875
2002-03-05Have "wtap_seek_read()" return 0 on success and -1 on failure, and takeGuy Harris1-6/+18
an "err" argument that points to an "int" into which to put an error code if it fails. Check for errors in one call to it, and note that we should do so in other places. In the "wtap_seek_read()" call in the TCP graphing code, don't overwrite "cfile.pseudo_header", and make the buffer into which we read the data WTAP_MAX_PACKET_SIZE bytes, as it should be. In some of the file readers for text files, check for errors from the "parse the record header" and "parse the hex dump" routines when reading sequentially. In "csids_seek_read()", fix some calls to "file_error()" to check the error on the random stream (that being what we're reading). svn path=/trunk/; revision=4874
2002-03-04Check for errors in seeks, "tell"s, and "stat()"s/"fstat()"s.Guy Harris1-2/+5
For file types where we allocate private data, add "close" routines where they were missing, to free the private data. Also fix up the code to clean up after some errors by freeing private data where that wasn't being done. Get rid of unused arguments to "wtap_dump_open_finish()". Fix indentation. svn path=/trunk/; revision=4857
2002-02-27From Joerg Mayer: remove unused variables and declarations ofGuy Harris1-4/+2
non-existent functions. Remove the "filetype" argument from the "can_write_encap" functions for particular capture file types - the argument value is implicit, in that the routine being called is the routine for that particular file type. svn path=/trunk/; revision=4823
2001-12-04Support for reading Visual Networks traffic capture files, from TomGuy Harris1-0/+660
Nisbet. Make a comment in "wiretap/file.c" clearer, so people know where to put the entries for their capture file type. svn path=/trunk/; revision=4328