summaryrefslogtreecommitdiff
path: root/wiretap/iseries.c
AgeCommit message (Collapse)AuthorFilesLines
2012-04-22Various minor cleanup:Bill Meier1-200/+222
- fix a few small memory leaks; - fix some indentation to match style used (gnu); - remove trailing whitespace; - ... svn path=/trunk/; revision=42196
2012-04-20Fix more indentation.Guy Harris1-1/+1
svn path=/trunk/; revision=42147
2012-04-20Use consistent 2-space indentation, and don't use tabs.Guy Harris1-496/+496
svn path=/trunk/; revision=42146
2012-02-25Add a presence flag field to the packet information structure filled inGuy Harris1-3/+6
by Wiretap, to indicate whether certain fields in that structure actually have data in them. Use the "time stamp present" flag to omit showing time stamp information for packets (and "packets") that don't have time stamps; don't bother working very hard to "fake" a time stamp for data files. Use the "interface ID present" flag to omit the interface ID for packets that don't have an interface ID. We don't use the "captured length, separate from packet length, present" flag to omit the captured length; that flag might be present but equal to the packet length, and if you want to know if a packet was cut short by a snapshot length, comparing the values would be the way to do that. More work is needed to have wiretap/pcapng.c properly report the flags, e.g. reporting no time stamp being present for a Simple Packet Block. svn path=/trunk/; revision=41185
2012-02-06Fix some Dead Store (Dead assignement/Dead increment) Warning found by ClangAlexis La Goutte1-1/+0
svn path=/trunk/; revision=40909
2012-02-06Fix some Dead Store (Dead assignement/Dead increment) Warning found by ClangAlexis La Goutte1-3/+3
svn path=/trunk/; revision=40907
2011-12-13Rename WTAP_ERR_BAD_RECORD to WTAP_ERR_BAD_FILE; it really reports anyGuy Harris1-4/+4
form of corruption/bogosity in a file, including in a file header as well as in records in the file. Change the error message wtap_strerror() returns for it to reflect that. Use it for some file header problems for which it wasn't already being used - WTAP_ERR_UNSUPPORTED shouldn't be used for that, it should only be used for files that we have no reason to believe are invalid but that have a version number we don't know about or some other non-link-layer-encapsulation-type value we don't know about. svn path=/trunk/; revision=40175
2011-06-07Fix gcc 4.6 "set but not used [-Wunused-but-set-variable]" warning.Bill Meier1-2/+1
svn path=/trunk/; revision=37604
2011-05-29Remove unused varable:Anders Broman1-1/+1
iseries.c:305: warning: unused variable 'tcpformat' svn path=/trunk/; revision=37467
2011-05-29From Martin Warnes:Anders Broman1-181/+371
This is significant update to the existing iseries wiretap module. It adds support for IPv6 (formatted & unformatted comms traces), in addition I've tidied up the sscanf routines to better handle traces files with offset lines. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5957 svn path=/trunk/; revision=37466
2011-04-21Add a new WTAP_ERR_DECOMPRESS error, and use that for errors discoveredGuy Harris1-17/+20
by the gunzipping code. Have it also supply a err_info string, and report it. Have file_error() supply an err_info string. Put "the file" - or, for WTAP_ERR_DECOMPRESS, "the compressed file", to suggest a decompression error - into the rawshark and tshark errors, along the lines of what other programs print. Fix a case in the Netscaler code where we weren't fetching the error code on a read failure. svn path=/trunk/; revision=36748
2011-04-11Use ws_open(), not open(), so we handle UTF-8 pathnames on Windows.Guy Harris1-2/+2
Update or remove some additional "we don't have ferror() in zlib" comments to reflect the current reality. svn path=/trunk/; revision=36568
2011-04-07Be more picky about our sscanf integer field widths. Hopefully this willGerald Combs1-2/+2
help squelch Coverity CIDs 701-709. svn path=/trunk/; revision=36511
2011-04-06From Jakub Zawadzki:Guy Harris1-1/+1
file_read(buf, bsize, count, file) macro is compilant with fread function and takes elements count+ size of each element, however to make it compilant with gzread() it always returns number of bytes. In wiretap file_read() this is not really used, file_read is called either with bsize set to 1 or count to 1. Attached patch remove bsize argument from macro. svn path=/trunk/; revision=36491
2011-02-16Fix errors found by the Visual C++ analyzer.Gerald Combs1-1/+1
svn path=/trunk/; revision=35954
2010-02-26Move the definitions of all the private data structures out ofGuy Harris1-3/+3
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-02-24Move the definition of the private data structure from wtap-int.h to theGuy Harris1-25/+33
iSeries capture processor. Parse the start date into year/month/day at the time we see it, rather than for every packet; that means we don't need to allocate a buffer to hold the date as a string (a buffer which we weren't ever freeing). svn path=/trunk/; revision=31981
2009-10-18Fixed data type for asciibuf.Stig Bjørlykke1-2/+2
svn path=/trunk/; revision=30608
2009-03-09P64 fixes.Gerald Combs1-4/+4
svn path=/trunk/; revision=27683
2008-10-16Fixed a datatype to avoid a warning.Stig Bjørlykke1-2/+2
svn path=/trunk/; revision=26479
2008-09-03g_ascii_strdown() and g_ascii_strup(), unlike g_strdown() and g_strup(),Guy Harris1-1/+3
do *not* modify the string handed to them - they g_mallocate a new string and return it. Create routines that *do* ASCII-only case mapping in place, and use them instead. Clean up indentation. svn path=/trunk/; revision=26131
2008-05-29Have iseries_parse_hex_string() take a "const char *" as its firstGuy Harris1-7/+20
argument, as 1) it doesn't modify the string that argument points to and 2) it's a buffer of "char". Use g_ascii_xdigit_value() and put the values of the two bytes together ourselves; strtoul() is a bit of overkill for two-hex-digit pairs. While we're at it, check for invalid hex digits, and for bytes where only one hex digit is present. svn path=/trunk/; revision=25392
2008-05-28Always set pkt_encap, not just when we have the start date. This bug, aroundJeff Morriss1-5/+6
since rev 17756, meant that attempts to read iSeries files would fail in the "Make sure it [pkt_encap] is not WTAP_ENCAP_PER_PACKET" assertion in wtap_read(). Also set file_encap to WTAP_ENCAP_ETHERNET (instead of WTAP_ENCAP_PER_PACKET) since it seems that all the packets in iSeries files are Ethernet (or at least this module currently only supports Ethernet). svn path=/trunk/; revision=25388
2008-05-08From Anders: Checkapi enabled for wiretap and more functions converted.Martin Mathieson1-1/+1
svn path=/trunk/; revision=25257
2008-05-08strncpy -> g_strlcpyAnders Broman1-3/+3
svn path=/trunk/; revision=25254
2008-02-09Fix (Sun) compiler warnings as reported by David Kirkby: Part 1Bill Meier1-7/+8
svn path=/trunk/; revision=24295
2008-01-24Fixed some more malloc -> g_malloc, free -> g_free, strdup -> g_strdup.Stig Bjørlykke1-3/+3
svn path=/trunk/; revision=24180
2007-10-19Fix bug #1926: buffer overflow when parsing iseries filesStephen Fisher1-1/+1
svn path=/trunk/; revision=23232
2007-09-27From Martin Warnes:Sake Blok1-1/+5
Attached is a small patch that correct an issue with reading certain IBM iSeries Comms traces. Traces where data has been dropped for whatever reason now have the packet number suffixed with an asterix "*", this causes the current iSeries wiretap routine to report a "bad" header. The attached patch simply scans the packet number field and removes any "* characters prior to scanning, the fact that data may be missing is more than adequately reported later by current wireshark packet processing. Regards .. Martin svn path=/trunk/; revision=23000
2007-04-21Match "%4x" with an unsigned value in sscanf.Guy Harris1-3/+11
Check for a case where, conceivably, the on-the-wire packet length (from the IP header) could be shorter than the captured data length (due to Ethernet padding), and handle it by making sure the on-the-wire length is always >= the captured data length. svn path=/trunk/; revision=21490
2007-04-10Fix for bug 1526. Compare to uppercased strings.Jaap Keuter1-3/+5
svn path=/trunk/; revision=21361
2007-03-28Remove almost all of the casts I committed recently and in place ofStephen Fisher1-17/+17
them, add -Wno-pointer-sign to CFLAGS when gcc will accept it. svn path=/trunk/; revision=21253
2007-03-23Fix about 150 warnings new to gcc 4.0 in the error on warning directories.Stephen Fisher1-17/+17
Comment out -Werror in plugins/asn1/ until warnings can be fixed. svn path=/trunk/; revision=21158
2007-03-07Fix a couple of off-by-one overflows reported in bug 1415. Update theGerald Combs1-1/+1
release notes accordingly. svn path=/trunk/; revision=20990
2006-11-05change all file offsets from long to gint64 so we can - theoretically - ↵Ulf Lamping1-9/+10
handle files > 2GB correct. Please distclean Win32 builds! svn path=/trunk/; revision=19814
2006-10-04From Martin Warnes:Anders Broman1-7/+16
The patch addresses issues with higher precision packet timings on top end iSeries hardware and should enable the iseries wiretap to handle timings in both micro and nano seconds. svn path=/trunk/; revision=19428
2006-03-29The header will be there, just make sure the date is put in.Jaap Keuter1-1/+3
Coverity bug 148 svn path=/trunk/; revision=17756
2006-03-27From Martin Warnes:Anders Broman1-61/+14
> I've attached a fix that cleans up this code, actually since my last > update of this module the particular call in question was fairly > redundant so I just went ahead and removed it and updated the constant > that specifies the maximum possible line length instead. > > Thanks for bring this to my attention. svn path=/trunk/; revision=17737
2006-03-27Fix a possible NULL dereference (bug 827 / CID 145). Add an SVNGerald Combs1-54/+59
ID. Fix up whitespace. svn path=/trunk/; revision=17732
2006-03-22From Mertin Wrnes:Anders Broman1-455/+545
Following my last submitted patch I did some further investigation on the different types of iSeries Comms Traces, although the field formats are constant, things such as page throws and line spacing vary depending on the tool used to pull the trace form the iSeries spool. This patch should better handle the different formats and more importantly exit in a graceful manner if an unknown format is encountered. svn path=/trunk/; revision=17699
2006-03-17From Martin Warnes:Jaap Keuter1-3/+6
Attached is a fix that addresses a problem reading certain IBM iSeries Communications traces. svn path=/trunk/; revision=17655
2005-11-25From Martin Warnes:Anders Broman1-0/+756
Add Support for reading of IBM iSeries (AS/400) Comms traces svn path=/trunk/; revision=16588