summaryrefslogtreecommitdiff
path: root/wiretap/peektagged.c
AgeCommit message (Collapse)AuthorFilesLines
2013-06-17Merge "read record header" and "read packet data" routines into a singleGuy Harris1-17/+17
routine, used both by read and seek-read routines. svn path=/trunk/; revision=49988
2013-06-16Have the seek-read routines take a Buffer rather than a guint8 pointerGuy Harris1-15/+11
as the "where to put the packet data" argument. This lets more of the libwiretap code be common between the read and seek-read code paths, and also allows for more flexibility in the "fill in the data" path - we can expand the buffer as needed in both cases. svn path=/trunk/; revision=49949
2013-06-03Initialize the whole hdr_info structure to please gcc 4.3.2Pascal Quantin1-2/+1
svn path=/trunk/; revision=49710
2013-06-03Initialize some variables that GCC 4.7 complains about. I'm not 100% sureEvan Huus1-0/+3
that the complaints are valid, or that simply zeroing them is the right fix if they are, but at least it builds now. Should we be erroring if we don't see a sliceLength header? svn path=/trunk/; revision=49705
2013-06-02Move code to fill in the wtap_pkthdr into peektagged_process_header(),Guy Harris1-102/+87
so that it's filled in by both the read and seek-read routines. svn path=/trunk/; revision=49701
2012-12-29Give some more details, as per the Web page cited as a reference.Guy Harris1-4/+27
svn path=/trunk/; revision=46852
2012-12-29Oops, one instance of "airopeekv9" that wasn't supposed to have beenGuy Harris1-1/+1
changed was changed. svn path=/trunk/; revision=46851
2012-12-27Errors take precedence over EOF; use file_error() after operations thatGuy Harris1-12/+10
return an "EOF or error" indication - an EOF without an error will return 0. In iseries_seek_next_packet(), return an error code of WTAP_ERR_BAD_FILE and an appropriate error message if we don't find a packet header within the next ISERIES_MAX_TRACE_LEN lines, don't just return -1 and leave the error information unchanged. Setting an argument variable before returning has no effect, so don't do it (so that we don't leave the mistaken impression that it *is* doing something). Clean up indentation. svn path=/trunk/; revision=46819
2012-12-27Do not call wtap_file_read_unknown_bytes() orGuy Harris1-2/+8
wtap_file_read_expected_bytes() from an open routine - open routines are supposed to return -1 on error, 0 if the file doesn't appear to be a file of the specified type, or 1 if the file does appear to be a file of the specified type, but those macros will cause the caller to return FALSE on errors (so that, even if there's an I/O error, it reports "the file isn't a file of the specified type" rather than "we got an error trying to read the file"). When doing reads in an open routine before we've concluded that the file is probably of the right type, return 0, rather than -1, if we get WTAP_ERR_SHORT_READ - if we don't have enough data to check whether a file is of a given type, we should keep trying other types, not give up. For reads done *after* we've concluded the file is probably of the right type, if a read doesn't return the number of bytes we asked for, but returns an error of 0, return WTAP_ERR_SHORT_READ - the file is apparently cut short. For NetMon and NetXRay/Windows Sniffer files, use a #define for the magic number size, and use that for both magic numbers. svn path=/trunk/; revision=46803
2012-10-16Add wtap_pseudo_header union to wtap_pkthdr structure.Jakub Zawadzki1-7/+8
Use pkthdr instead of pseudo_header as argument for dissecting. svn path=/trunk/; revision=45601
2012-09-20We always HAVE_CONFIG_H so don't bother checking whether we have it or not.Jeff Morriss1-2/+0
svn path=/trunk/; revision=45015
2012-07-18Set the 802.11 "already decrypted" flag to FALSE for file formats otherGuy Harris1-0/+2
than Network Instruments Observer files, as we don't know whether they are already decrypted. svn path=/trunk/; revision=43796
2012-07-09Fix another comment.Guy Harris1-1/+1
svn path=/trunk/; revision=43632
2012-07-09Fix some comments.Guy Harris1-4/+4
svn path=/trunk/; revision=43631
2012-07-09The names "etherpeek" and "airopeek" are a bit misleading, as theGuy Harris1-0/+618
"etherpeek.c" file format is used by AiroPeek and the "airopeek9.c" file format is used by EtherPeek. Instead, use the names that WildPackets apparently uses for those formats - "classic" and "tagged". svn path=/trunk/; revision=43630