aboutsummaryrefslogtreecommitdiffstats
path: root/ringbuffer.c
Commit message (Collapse)AuthorAgeFilesLines
* Only handle as a suffix stuff following a "." in the last component of aGuy Harris2004-02-251-3/+16
| | | | | | pathname. svn path=/trunk/; revision=10233
* Don't unlink ringbuffer files if we haven't yet allocated the array ofGuy Harris2004-02-251-4/+6
| | | | | | | ringbuffer files - yes, we can fail before that's done, so we have to check for that. svn path=/trunk/; revision=10232
* Ringbuffer rework.Laurent Deniel2003-06-221-298/+180
| | | | | | | | | | | | | | | | | | | | | | | | | | | Almost completely rewritten in order to: - be able to use a unlimited number of ringbuffer files 0 specified with -b argument or in the GUI, means that the number of file is unlimited. else the maximum number of ring buffer files is arbitrarily set to 1024. - close the current file and open (truncating it) the next file at switch - set the final file name once open (or reopen) - avoid the deletion of files that could not be truncated (can't arise now) and do not erase empty files The idea behind that is to remove the limitation of the maximum # of ringbuffer files being less than the maximum # of open fd per process and to be able to reduce the amount of virtual memory usage (having only one file open at most) or the amount of file system usage (by truncating the files at switch and not the capture stop, and by closing them which makes possible their move or deletion after a switch). svn path=/trunk/; revision=7912
* From Graeme Hewson:Gerald Combs2002-09-221-15/+62
| | | | | | | | | | | | | It can sometimes happen that capturing is stopped just after Ethereal has switched to a new ring buffer. The result is that no frames are displayed. The patch to ringbuffer.c displays the previous ring buffer if the current buffer is empty on close. The patch to capture.c fixes a bug where an error return from ringbuf_wtap_dump_close was ignored, and tidies up the code around the call. svn path=/trunk/; revision=6315
* Removed trailing whitespaces from .h and .c files using theJörg Mayer2002-08-281-24/+24
| | | | | | | winapi_cleanup tool written by Patrik Stridvall for the wine project. svn path=/trunk/; revision=6117
* Replace the types from sys/types.h and netinet/in.h by their glib.hJörg Mayer2002-08-021-5/+1
| | | | | | | | equivalents for the toplevel directory. The removal of winsock2.h will hopefully not cause any problems under MSVC++, as those files using struct timeval still include wtap.h, which still includes winsock2.h. svn path=/trunk/; revision=5932
* From Graeme Hewson: flush the output after every frame if Tethereal isGuy Harris2002-06-231-3/+16
| | | | | | | writing a capture to a FIFO, and improve the error checking for ring buffers. svn path=/trunk/; revision=5745
* Check whether "fflush()" succeeds, and clean up and return an error ifGuy Harris2002-05-041-7/+37
| | | | | | | | | | it fails. "wtap_dump_close()" allows you to pass a null pointer as the second argument, so an error value isn't returned; use that in the cleanup routine, as we don't care whether the closes fail. svn path=/trunk/; revision=5386
* Make the bytes-written information from Wiretap a long, as we allowGuy Harris2001-12-041-0/+393
files to get that big. From Thomas Wittwer and Matthias Nyffenegger: Support for "ring buffer mode", wherein there's a ring buffer of N capture files; as each capture file reaches its maximum size (the ring buffer works only with a maximum capture file size specified), Ethereal rolls over to the next capture file in the ring buffer, replacing whatever packets might be in it with new packets. svn path=/trunk/; revision=4324