aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap
Commit message (Collapse)AuthorAgeFilesLines
* To fill in a ws_statb64, you must use ws_fstat64.Guy Harris2011-04-101-1/+1
| | | | | | Declare ws_stdio_stat64, as that's its new name. svn path=/trunk/; revision=36549
* Rename ws_stat to ws_stat64, and make it take a pointer to a ws_statb64Guy Harris2011-04-101-2/+2
| | | | | | | as an argument, along the lines of ws_fstat64, and, on Windows, make it use _wstati64, to handle 64-bit file sizes. svn path=/trunk/; revision=36547
* Define ws_statb64 to be the appropriate "struct XXX" for aGuy Harris2011-04-101-1/+1
| | | | | | 64-bit-file-size-capable stat call, and use it for ws_fstat64(). svn path=/trunk/; revision=36545
* Add ws_fstat64(), defined to be fstat on UN*X and _fstati64 on Windows.Guy Harris2011-04-101-1/+1
| | | | | | Use it in some places where we're getting the file size. svn path=/trunk/; revision=36544
* Use AC_SYS_LARGEFILE to turn on large file support on platforms thatGuy Harris2011-04-102-17/+5
| | | | | | | | | | | support it. Rename ws_lseek to ws_lseek64, as it should be given a 64-bit offset, and have it use _lseeki64 on Windows, to try to get 64-bit offset support; AC_SYS_LARGEFILE should cause lseek() to support 64-bit offsets on UN*X if possible. svn path=/trunk/; revision=36542
* Point to RFC 1952 as a description of the gzip file format.Guy Harris2011-04-101-0/+10
| | | | | | | Point to pages for some other compressed file formats we might want to support. svn path=/trunk/; revision=36539
* Move the definition of the structure pointed to by a FILE_T intoGuy Harris2011-04-102-32/+32
| | | | | | | wiretap/file_wrappers.c; nothing outside of file_wrappers.c needs to know what it looks like, it just passes around pointers to it. svn path=/trunk/; revision=36538
* Just make the fh member of a wtap_dumper_t a void * for now, and, in allGuy Harris2011-04-082-12/+14
| | | | | | | | | calls that use it, cast it to whatever it's supposed to be. Making it a gzFile means you can't use any stdio macros that reach inside the structure; making it a FILE *, as it used to be, amounts to trying to use a FILE * as a void * if we're writing a compressed file out. svn path=/trunk/; revision=36521
* Make wtap plugins build on windows again.Anders Broman2011-04-081-0/+1
| | | | svn path=/trunk/; revision=36517
* Change ng_file_read() to take only one size argument - and make it anGuy Harris2011-04-081-27/+27
| | | | | | | | | | unsigned int - to match file_read(). Shrink some arguments, variables, and structure members appropriately. Fix an incorrect sizeof - sizeof a pointer is the size of the pointer, not the size of what it points to. svn path=/trunk/; revision=36515
* To squelch some compiler warnings, temporarily cast the argument toGuy Harris2011-04-081-2/+12
| | | | | | | | | ws_lseek() to the appropriate type for the second argument to _lseek() for Windows or lseek() for UN*X; ultimately, we want to call the appropriate 64-bit-offset seek routine if available, otherwise cast the value down and hand it to the 32-bit-offset seek routine. svn path=/trunk/; revision=36514
* From Jakub Zawadzki:Guy Harris2011-04-085-229/+675
| | | | | | Steal file_wrappers functions from zlib v2. svn path=/trunk/; revision=36513
* Be more picky about our sscanf integer field widths. Hopefully this willGerald Combs2011-04-077-12/+12
| | | | | | help squelch Coverity CIDs 701-709. svn path=/trunk/; revision=36511
* From Jakub Zawadzki:Guy Harris2011-04-072-5/+8
| | | | | | | | | | | | | | | | | | | | | | Introduce file_clearerr I'm unsure of this patch, gzclearerr() is used to clear the end-of-file mark, but for FILE there's function which do the same (clearerr). I created test program if clearerr() is needed for tailing file. and it seems to work without it (at least on Linux, so for !HAVE_LIBZ I commented it out). For now this patch introduce file_clearerr macro, and define it only when EOF marking must be cleared (i.e. when HAVE_LIBZ and HAVE_GZCLEARERR are defined). So everything works like before, patch just to keep same prefix for file interface :) svn path=/trunk/; revision=36510
* From Jakub Zawadzki:Guy Harris2011-04-063-29/+10
| | | | | | | | | file-wrappers.[ch] is used only for reading files, and mode is always "rb". Attached patch removes 'mode' argument from file_open() & filed_open(). svn path=/trunk/; revision=36493
* From Jakub Zawadzki: fix the type of an argument.Guy Harris2011-04-061-1/+1
| | | | svn path=/trunk/; revision=36492
* From Jakub Zawadzki:Guy Harris2011-04-0632-199/+197
| | | | | | | | | | | | | 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
* Check return value of file_seek(). Fixes CID 338.Chris Maynard2011-03-311-1/+2
| | | | svn path=/trunk/; revision=36425
* Use BSWAP16 instead of BSWAP32 for 16-bit values. Fixes CID's 1179 and 1180.Chris Maynard2011-03-311-2/+2
| | | | svn path=/trunk/; revision=36422
* Don't put a 196808 byte variable on the stack: instead, malloc/free it.Jeff Morriss2011-03-291-59/+83
| | | | | | | | | | | Coverity 789-790. Since we've been keeping track of how many bytes we put in the buffer, use that value instead of calling strlen() find it again. Also, some white space/indentation cleanup. svn path=/trunk/; revision=36397
* Don't put a 65536 byte variable on the stack: instead, malloc/free it.Jeff Morriss2011-03-291-44/+78
| | | | | | | | Coverity 791-794. Also, some white space/indentation cleanup. svn path=/trunk/; revision=36394
* More updates to the wtap_open_offline() comment.Guy Harris2011-03-281-2/+4
| | | | svn path=/trunk/; revision=36384
* Update a comment.Anders Broman2011-03-281-4/+6
| | | | svn path=/trunk/; revision=36376
* Added a missing break.Stig Bjørlykke2011-03-271-1/+1
| | | | | | Coverity 492. svn path=/trunk/; revision=36356
* Fix Coverity CIDs 810 & 811: uninitialized variables.Gerald Combs2011-03-252-0/+4
| | | | svn path=/trunk/; revision=36340
* Make it build on Windows 7Anders Broman2011-03-251-1/+1
| | | | | | (pcapng.c(1817) : warning C4267: '=' : conversion from 'size_t' to 'gint', possible loss of data) svn path=/trunk/; revision=36325
* Add a missing include.Gerald Combs2011-03-241-2/+6
| | | | svn path=/trunk/; revision=36321
* Add initial pcapng name resolution record support. Wireshark has readGerald Combs2011-03-246-79/+386
| | | | | | | | | | support; TShark has read+write support. Additionally TShark can read a "hosts" file and write those records to a capture file. This uses "struct addrinfo" in many places and probably won't compile on some platforms. svn path=/trunk/; revision=36318
* Use the same style in netscreen_seek_read() that we use inGuy Harris2011-03-221-1/+5
| | | | | | | | netscreen_read(), checking the return value of parse_netscreen_hex_dump() against -1 and explicitly returning FALSE if it's -1, otherwise driving on. svn path=/trunk/; revision=36237
* Fix for bug 5762, wireshark asserts on reading juniper snoop output when no ↵Sake Blok2011-03-211-1/+1
| | | | | | hex data is present (snoop detail off). svn path=/trunk/; revision=36232
* Avoid having large buffers on the stack (as noted in VS Code Analyzer warnings).Martin Mathieson2011-03-161-3/+3
| | | | svn path=/trunk/; revision=36202
* From Martin Kaiser: dissector for DVB-CI (Common Interface)Bill Meier2011-03-073-1/+7
| | | | | | | | | | | | | | | https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5654 From me: - Entry for DVBCI added to wtap.c encap_table_base[]; - Some code simplification with respect to the use of col_...() for COL_INFO; - Certain tests for "enough bytes available" not really needed; - (Other minor tweaks); - #include<stdio.h> not req'd; - Minor reformatting and whitespace cleanup; svn path=/trunk/; revision=36149
* From Robert Bullen: ... code is not incrementing wtap_dumper.bytes_dumped.Bill Meier2011-02-251-0/+6
| | | | | | | | https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5666 Fro me: use 4 -space indentation (not tab) to match surrounding code lines. svn path=/trunk/; revision=36074
* From Robert Bullen: Fix "Potential access violation when writing to ↵Bill Meier2011-02-251-1/+13
| | | | | | | | | | | LANalyzer files" https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5698 (Note from me: Before the fix "File ! Save As" in Lanalyzer format crashed quite consistently on my Windows 7) svn path=/trunk/; revision=36061
* Revert SVN #36059; patch from Bug #5698 to be used insteadBill Meier2011-02-251-2/+1
| | | | svn path=/trunk/; revision=36060
* Fix Bug #5698: "Potential access violation when writing to LANalyzer files"Bill Meier2011-02-251-1/+2
| | | | | | | | | https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5698 Note: before fix File ! SaveAs in Lanalyzer format crashed quite consistently on Windows. svn path=/trunk/; revision=36059
* Return an error value for the new error return; it "can't happen" (butGuy Harris2011-02-161-1/+7
| | | | | | | either the VC++ analyzer can't determine that or it *can*, in fact, happen). Pick an error code that's not too far off. svn path=/trunk/; revision=35957
* Check the index before storing into the array.Guy Harris2011-02-161-1/+1
| | | | svn path=/trunk/; revision=35956
* Fix checkapi.Gerald Combs2011-02-161-64/+64
| | | | svn path=/trunk/; revision=35955
* Fix errors found by the Visual C++ analyzer.Gerald Combs2011-02-169-10/+13
| | | | svn path=/trunk/; revision=35954
* Fix a buffer overflow found by the Visual C++ analyzer.Gerald Combs2011-02-161-0/+7
| | | | svn path=/trunk/; revision=35953
* The lack of _WITH_PHDR in WTAP_ENCAP_BLUETOOTH_H4 means there's noGuy Harris2011-02-122-4/+4
| | | | | | | | | | | | | | | | | pseudo-header, and hence there's no direction indication. Don't set pinfo->p2p_dir for it. Use WTAP_ENCAP_BLUETOOTH_H4_WITH_PHDR, not WTAP_ENCAP_BLUETOOTH_H4, for capture files where we have the direction. Don't assume pinfo->p2p_dir is either P2P_DIR_SENT or P2P_DIR_RECV when setting the info column in various Bluetooth dissectors; it might be unknown. In the HCI H4 dissector, put the direction into the info column regardless of whether we have a type match or not; the dissectors for HCI packet types appear to assume it's been set (as they put a blank at the beginning of the stuff they append to the direction). svn path=/trunk/; revision=35933
* Add some information based on a Tektronix manual whose name popped up inGuy Harris2011-02-101-2/+57
| | | | | | | an email I found when looking for some other stuff and which I then found with a Google search. svn path=/trunk/; revision=35898
* Check for a large packet_len. Fixes a bug reported by HuzaifaGerald Combs2011-02-071-0/+12
| | | | | | | | Sidhpurwala of the Red Hat Security Response Team. See also: bug 5661. svn path=/trunk/; revision=35855
* Set the error code and additional information string in more cases.Guy Harris2011-02-041-27/+70
| | | | svn path=/trunk/; revision=35809
* Set *err before *err_info - that's how it's done in most other modules.Guy Harris2011-02-041-4/+4
| | | | svn path=/trunk/; revision=35807
* Set *err before *err_info - that's how it's done in most other modules.Guy Harris2011-02-041-1/+1
| | | | svn path=/trunk/; revision=35806
* Set *err before *err_info - that's how it's done in most other modules.Guy Harris2011-02-041-1/+1
| | | | svn path=/trunk/; revision=35805
* Fix indentation.Guy Harris2011-02-041-1/+1
| | | | svn path=/trunk/; revision=35804
* Put more data into the "additional error information" messages.Guy Harris2011-02-041-11/+8
| | | | | | | | | Get rid of debugging printouts that are equivalent to the "additional error information" messages. Return additional error info for all WTAP_ERR_BAD_RECORD errors. svn path=/trunk/; revision=35800