aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap
AgeCommit message (Collapse)AuthorFilesLines
2013-06-21Fix some pointer-signedness (well, signedness of what the pointer pointsGuy Harris3-10/+10
to) warnings. svn path=/trunk/; revision=50104
2013-06-19Clarify (a V1.0 file might have a single zero byte at the end of theGuy Harris1-2/+7
page, which doesn't look like an "unused space" record because there aren't two bytes of record type, just one byte). svn path=/trunk/; revision=50027
2013-06-18Slight stylistic cleanup - most routines, when defined, have no spaceGuy Harris2-2/+2
between the routine name and the opening parenthesis, so remove it from the definition of the seek-read routine. svn path=/trunk/; revision=50026
2013-06-18Note that NetScaler trace files are page-oriented, with records notGuy Harris1-4/+16
split across page boundaries, rather than being a byte stream, and that the last page may be short. Fix some comments. svn path=/trunk/; revision=50025
2013-06-18Don't limit the on-the-wire length of packets to 64KB, there are larger packetsEvan Huus1-16/+3
out there (especially over USB) and we should be able to load them as long as they are snapped to a sane length. Also validate that packets do not specify a snapshot length larger than the one in the file header, though only make it a warning, as this is not necessarily a fatally corrupt packet. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8808 svn path=/trunk/; revision=49999
2013-06-17Put the code to fill in the struct wtap_pkthdr and to read the packetGuy Harris1-33/+31
data into a common routine, and use it in both the read and seek-read routines. svn path=/trunk/; revision=49996
2013-06-17Merge more of the read and seek-read code paths.Guy Harris1-29/+25
svn path=/trunk/; revision=49990
2013-06-17Merge "read record header" and "read packet data" routines into a singleGuy Harris26-989/+604
routine, used both by read and seek-read routines. svn path=/trunk/; revision=49988
2013-06-16Make the libwiretap Buffer routines usable from C++, and fix the C++ UIGuy Harris1-0/+8
code to handle the API changes for the seek-read routines. svn path=/trunk/; revision=49950
2013-06-16Have the seek-read routines take a Buffer rather than a guint8 pointerGuy Harris51-989/+647
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-15Pull some of the code to set the struct wtap_pkthdr intoGuy Harris1-47/+50
parse_netscreen_hex_dump(). svn path=/trunk/; revision=49944
2013-06-15Fill in at least some of the struct wtap_pkthdr in both the read andGuy Harris1-7/+14
seek-read routines. svn path=/trunk/; revision=49943
2013-06-14Rename radcom_process_rec_header() to radcom_process_rec_header() andGuy Harris1-102/+77
move the code to file in a struct wtap_pkthdr there. svn path=/trunk/; revision=49942
2013-06-10Allign the error messages.Anders Broman1-0/+1
svn path=/trunk/; revision=49870
2013-06-09libwireshark's add_new_ipv4() and add_new_ipv6() now silently ignoreGuy Harris1-16/+3
requests to add an entry with a zero-length name; we don't have to ignore them ourselves. svn path=/trunk/; revision=49854
2013-06-09Don't treat zero-length names in the NRB as errors, just silently ignoreGuy Harris1-11/+17
them. Works around the problem reported in bug 8763. svn path=/trunk/; revision=49851
2013-06-07Use g_try_malloc() for some memory allocations, and return an "out ofGuy Harris1-5/+21
memory" indication if it fails. Further fixes bug 8752. Also, clean up indentation. svn path=/trunk/; revision=49834
2013-06-07Prevent attempts to allocate huge amounts of memory by imposing anGuy Harris1-23/+141
artificial 16MB limit on blocks. Do some sanity checks when reading options, to make sure we don't read past the end of the block. Make some variables unsigned so as not to get inappropriate sign-extension (which, in practice, should never happen due to the 16MB block size limit, although if the limit is raised above 2^31-1, the limit won't protect you). Fixes bug 8752. svn path=/trunk/; revision=49833
2013-06-06From Mark C. Brown via ↵Pascal Quantin2-0/+4
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8777 : Add support for 10Gbe HP-UX drivers IOCXGBE and IQXGBE svn path=/trunk/; revision=49820
2013-06-06Pull all the code that reads and processes the packet header intoGuy Harris1-266/+282
visual_process_packet_header() and call it in both the read and seek-read routines. Pull the post-processing code that guesses the encapsulation based on the first few bytes in the packet into visual_fill_in_chdlc_encapsulation() and call it in both the read and seek-routines. Add some length checks. svn path=/trunk/; revision=49812
2013-06-06Pull the code for setting the struct wtap_pkthdr into aGuy Harris1-122/+112
snoop_process_record_header() routine, and call it in both the read and seek-read routines. svn path=/trunk/; revision=49803
2013-06-06Set the entire struct wtap_pkthdr, not just the pseudo-header, in theGuy Harris1-95/+93
seek-read routine. Pull the code to do that into netxray_set_pseudo_header(), and rename it netxray_set_phdr(). svn path=/trunk/; revision=49800
2013-06-05The check for network_size < 4 is necessary only for those packets whereGuy Harris1-8/+27
we're lopping 4 bytes off of the network_size. Add a comment discussing the aformentioned lopping-off. svn path=/trunk/; revision=49782
2013-06-05Move the code that fills in the struct wtap_pkthdr (other than theGuy Harris1-65/+69
pseudo-header) into a process_packet_header() routine, and call it in both the read and seek-read routines. svn path=/trunk/; revision=49779
2013-06-04From Anthony Coddington:Anders Broman1-4/+12
ERF wiretap export multiple extension header fix. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8765 svn path=/trunk/; revision=49749
2013-06-04Fix an unintialized-value-used warning that Valgrind detected in the captureJeff Morriss1-6/+6
file attached to https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8760 : When searching for a signature, don't search past the end of the record. svn path=/trunk/; revision=49742
2013-06-04Get rid of trailing white space and a few tabs.Jeff Morriss1-22/+22
svn path=/trunk/; revision=49741
2013-06-04Fix the wiretap fuzz failure reported in ↵Jeff Morriss1-1/+7
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8760 : Check that the record length we got out of the file is at least as big as stats block trailer; if not, declare the file bad. svn path=/trunk/; revision=49739
2013-06-03file_skip() only needs to return a Boolean; if anybody cares what theGuy Harris3-6/+6
seek offset is after calling it, they can use file_tell(). (Some routines were already assuming it returned a gboolean.) svn path=/trunk/; revision=49733
2013-06-03Initialize the whole hdr_info structure to please gcc 4.3.2Pascal Quantin1-2/+1
svn path=/trunk/; revision=49710
2013-06-03Put back a fix that earlier checkins lost.Guy Harris1-1/+2
svn path=/trunk/; revision=49709
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-03When reading sequentially, skip past any ignored data at the end of theGuy Harris1-5/+15
packet. svn path=/trunk/; revision=49704
2013-06-02Pass the read_rec_data routines a wtap_pkthdr pointer, and have themGuy Harris1-33/+37
fill in that structure, so that it's filled in by both the read and seek-read routines. svn path=/trunk/; revision=49703
2013-06-02Pull the code to Fill in the wtap_pkthdr structure into a commonGuy Harris1-12/+16
routine, and use it in both the read and seek-read routines. svn path=/trunk/; revision=49702
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
2013-06-02Pull code to read and process packet headers intoGuy Harris1-134/+121
peekclassic_process_record_header_() routines, used in both the read and seek-read routines. svn path=/trunk/; revision=49700
2013-06-02Pull code to read process packet headers into aGuy Harris1-39/+49
packetlogger_process_header() routine, used in both the read and seek-read routines. svn path=/trunk/; revision=49699
2013-06-02Initialize the frame_table_size field of the private data to 0 and theGuy Harris1-0/+9
frame_table field to NULL before trying to allocate the frame table, so that if we fail before we allocate the frame table, the attempt to free the private data doesn't crash due to the frame_table field containing a bogus pointer. svn path=/trunk/; revision=49697
2013-06-01When allocating the frame table for a NetMon file, use g_try_malloc(),Guy Harris1-1/+5
and fail with ENOMEM if that fails (and the frame table is not empty - g_try_malloc() will return NULL if you ask it to allocate zero bytes). Have an error message for ENOMEM on an open that attempts to tell the user what the problem is without making their head explode. svn path=/trunk/; revision=49673
2013-06-01Move the record header processing code into a common routine, and readGuy Harris1-101/+123
that header in both the read and seek-read routines. svn path=/trunk/; revision=49671
2013-05-30From Chris Bontje via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8644 :Pascal Quantin3-3/+9
SEL RTAC (Real Time Automation Controller) EIA-232 Serial-Line Dissection svn path=/trunk/; revision=49635
2013-05-18Fix "set but not used" compile warning turning errorJörg Mayer1-2/+0
svn path=/trunk/; revision=49405
2013-05-18Fill in the struct wtap_pkthdr in the seek-read routine.Guy Harris1-23/+35
svn path=/trunk/; revision=49404
2013-05-18In libpcap_process_header(), fill in what phdr points to, not wth->phdr.Guy Harris1-3/+3
svn path=/trunk/; revision=49403
2013-05-18Fill in the struct wtap_pkthdr in the seek-read routine.Guy Harris1-11/+17
svn path=/trunk/; revision=49402
2013-05-18In the pcapng seek-read routine, *don't* fill in wth->phdr; seek-readGuy Harris4-102/+103
routines are passed a separate struct wtap_pkthdr to be filled in. Get rid of the pseudo_header member of the wblock structure - the pseudo-header is part of the struct wtap_pkthdr. Get rid of the union wtap_pseudo_header * argument to pcap_process_pseudo_header() - it's passed a pointer to a struct pcap_pkthdr, and that structure contains the union in question. Have libpcap_read_header() take a FILE_T argument, rather than using only the "sequential" handle of the wtap it's handed. Have the libpcap read routine return the offset of the beginning of the pcap record, and have the seek-read routine read the header and fill in the struct wtap_pkthdr handed to it. svn path=/trunk/; revision=49401
2013-05-18Use g_array_index() to get at elements of the encapsulation table array;Guy Harris1-9/+7
this avoids some compiler warnings from clang about alignment. svn path=/trunk/; revision=49398
2013-05-18Put the code to read trace record headers into a common routine used byGuy Harris1-55/+65
both the read and the seek-read routines. Have the read routine return the offset of the record header as the record's offset, so that the seek-read routine can read that header. svn path=/trunk/; revision=49397
2013-05-17Don't pass globals as arguments to k12text_set_headers(), just use theGuy Harris1-7/+5
globals directly. If we ever manage to make them *not* globals (which might only be possible with newer versions of Flex), then we can do better. Get rid of an unused variable. Squelch a 64-bit-to-32-bit conversion warning. svn path=/trunk/; revision=49396