aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/pppdump.c
AgeCommit message (Collapse)AuthorFilesLines
2002-08-28Removed trailing whitespaces from .h and .c files using theJörg Mayer1-12/+12
winapi_cleanup tool written by Patrik Stridvall for the wine project. svn path=/trunk/; revision=6115
2002-07-16Don't allocate structures to remember how to re-access a packet's data,Guy Harris1-12/+27
or the array to hold pointers to those structures, if we're only reading the file sequentially. svn path=/trunk/; revision=5885
2002-07-15Clean up the setting of "id_offset" and "sd_offset"; this fixes a bug inGuy Harris1-68/+46
handling the first few packets in a file. svn path=/trunk/; revision=5875
2002-07-15Redo the way random access is handled. Save, for each packet, theGuy Harris1-120/+230
offset of the beginning of the first record containing data from that packet, and the offset from the first byte of data in that record of the first byte of data from that packet; to read a given packet, seek to the offset of the first record, and keep processing packets until we find one with the right direction. This fixes a problem where it wasn't correctly reading the packet, when doing random access, in cases where you have a sequence of records that stop in the middle of a packet. svn path=/trunk/; revision=5873
2002-07-14Clarify the octet-stuffed framing code, by adding comments and by usingGuy Harris1-5/+48
hex values rather than characters in a switch statement. svn path=/trunk/; revision=5869
2002-06-07Graeme Hewson noted that zlib has a bug wherein "gzseek()" doesn't setGuy Harris1-7/+3
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-29Fail somewhat more gracefully when confronted with a bad file.Guy Harris1-2/+4
svn path=/trunk/; revision=5584
2002-03-05Make "wtap_seek_read()" return TRUE on success and FALSE on error, likeGuy Harris1-8/+8
"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/+12
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-7/+11
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-03-02From Joerg Mayer: get rid of "-Wno-unused" flag in some configureGuy Harris1-2/+2
scripts, and check in changes to add _U_ to some unused arguments (some other should perhaps be used, so we leave the _U_ out so that the warnings serve as a reminder to check those). svn path=/trunk/; revision=4847
2001-12-17From Irfan Khan: fix a couple of bugs in the pppdump reader.Guy Harris1-6/+6
svn path=/trunk/; revision=4414
2001-12-13Get rid of newly-introduced signed/unsigned comparison warning.Gilbert Ramirez1-2/+2
svn path=/trunk/; revision=4392
2001-12-13Don't leak memory when closing a pppdump trace file.Gilbert Ramirez1-2/+6
The second argument to g_ptr_array_free() does not indicate to glib to free the objects that the pointers in the GPtrArray refer to, but simply whether or not the free the block of pointers. We have to free the objects ourselves. svn path=/trunk/; revision=4391
2001-11-13Hopefully the last time I have to change my e-mail address.Gilbert Ramirez1-2/+2
svn path=/trunk/; revision=4199
2001-10-04Use longs as file offsets, so that on platforms with 64-bit "long" weGuy Harris1-5/+5
can handle capture files bigger than 2GB. svn path=/trunk/; revision=3993
2001-03-10Obliging every capture file reader's "open()" routine to seek to theGuy Harris1-2/+1
beginning of the file before reading anything from the file is bogus - do that in the loop that tries each of the open routines, instead. (They may have to reset the seek pointer later if, for example, the capture file begins with the first packet, and the "open()" routine looks at that packet to try to guess whether the packet is in the file format in question.) Set "wth->data_offset" to 0 while you're at it, so capture file readers don't have to do that, either. svn path=/trunk/; revision=3123
2000-12-09Fix for pppdump buffer-overflow check.Gilbert Ramirez1-5/+14
From Daniel Thompson <daniel.thompson@st.com> svn path=/trunk/; revision=2748
2000-11-19Add an overflow check to process_data().Gerald Combs1-1/+6
svn path=/trunk/; revision=2675
2000-11-19"wtap_read()" must *always* set "*err" when it returns FALSE - if it'sGuy Harris1-1/+4
just an EOF, it should set "*err" to 0. Fix up a bunch of read routines for various capture file types to set "*err" appropriately. svn path=/trunk/; revision=2667
2000-11-17Add #include <string.h>, to get prototypes for mem* and str* functions.Gilbert Ramirez1-1/+2
svn path=/trunk/; revision=2654
2000-09-21Make sure to pass the sent/received direction from pppdump.c inGilbert Ramirez1-3/+7
pseudo_header. Use generic "p2p_phdr" instead of "lapd_phdr". Modify toshiba.c and packet-lapd.c to take that into account. Add frame.p2p_dir, a filterable field, 0=sent, 1=recvd Make p2p_dir available in packe_info, as I think it will be needed in VJ COMP and UNCOMP dissection. Rename WTAP_ENCAP_TR to WTAP_ENCAP_TOKEN_RING. Mention pppd-log support in man page. Mention atmsnoop in README. svn path=/trunk/; revision=2455
2000-09-19Oh well, get rid of the debug printf's.Gilbert Ramirez1-89/+1
svn path=/trunk/; revision=2450
2000-09-19Add support for reading pppd log files in wiretap.Gilbert Ramirez1-0/+664
svn path=/trunk/; revision=2448