aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap
AgeCommit message (Collapse)AuthorFilesLines
2001-07-15Fixes, from Scott Renfro, for some calls to "localtime()" that didn'tGuy Harris2-15/+30
check whether the call succeeded (it doesn't always do so on Windows, for example). svn path=/trunk/; revision=3722
2001-07-13From Joerg Mayer:Guy Harris10-29/+35
* gcc 3.0 warning fixes: - text2pcap.c: The number of characters to scan should probably not be 0 - wiretap/csids.c: using preincrement on a variable used on both sides of an assignment might be undefined by the C99(?) standard * turn on additional warnings for epan and wiretap too - epan/configure.in - wiretap/configure.in * Fix some warnings (missing includes, signed/unsigned, missing initializers) found by turning on the warnings - all other files :-) svn path=/trunk/; revision=3709
2001-07-06Remove a comment that no longer applies - we no longer seek forward inGuy Harris1-18/+1
compressed Sniffer files by sequentially moving forward, and we no longer seek backward by seeking to the beginning and then seeking forward to the new position, we now seek to the beginning of the compressed block that contains the target position, if we're not already in that block, and then move to the appropriate position in that block. svn path=/trunk/; revision=3658
2001-07-05"wtap_file()" is no longer in Wiretap, so don't try to export it fromGuy Harris1-1/+0
the Wiretap DLL. svn path=/trunk/; revision=3655
2001-07-05"open_cap_file()" in Ethereal and Tethereal don't use the FILE_T theyGuy Harris2-9/+2
get from calling "wtap_file()", so get rid of the call and the (otherwise unused) variable to which its result gets assigned. That lets us get rid of "wtap_file()" in Wiretap. It also lets us get rid of the include of "zlib.h" in "file.h"; the #defines of "file_open()", "filed_open()", and "file_close()" are also unnecessary, so we get rid of those as well. However, that means we need to include <zlib.h> in "gtk/main.c" and "tethereal.c", so that the version number of libz is defined and can show up in the version string. svn path=/trunk/; revision=3652
2001-06-27Replace "--enable-pcap" with "--with-pcap", and if an argument isGuy Harris2-16/+59
specified to "--with-pcap", add that directory to the include file and library search paths, so that you can use "--with-pcap=DIR" to search for libpcap in a directory other than the standard ones (either because it was installed somewhere other than under "/usr" or "/usr/local", or because you want to use a special version you've installed rather than the standard one). svn path=/trunk/; revision=3611
2001-05-09Patch from Chris Jepeway to use, in NetXRay 2.x captures, a field fromGuy Harris1-3/+17
the file header to specify the time units; different files appear to have different time stamp units. svn path=/trunk/; revision=3407
2001-04-18Distribute wtap.defGilbert Ramirez1-2/+3
svn path=/trunk/; revision=3330
2001-04-18#define YY_NEVER_INTERACTIVE to avoid reference to isatty() on Win32,Gilbert Ramirez1-1/+3
and thus avoid a compiler warning when compiling ascend-scanner.c. svn path=/trunk/; revision=3322
2001-04-17As of GLib 1.2.9, you won't automatically get "-I/usr/local/include" andGuy Harris1-2/+29
"-L/usr/local/lib" added to CFLAGS and LDFLAGS merely as a result of running AM_PATH_GLIB, as 1.2.9 and later don't install headers directly under "/usr/local/include". Therefore, we have to put "-I/usr/local/include" into CFLAGS ourselves, just as we do in the top-level configure script, or we run the risk of not being able to find other packages (libpcap, zlib, etc.) if it's installed under "/usr/local". svn path=/trunk/; revision=3318
2001-04-17Fix the e-mail address for Joerg Mayer (and remove it from files heGuy Harris1-1/+1
wasn't involved with). svn path=/trunk/; revision=3311
2001-04-16GCC 2.95.1 on SPARC/Solaris, at least, is clever enough to figure outGuy Harris1-5/+1
that the loop in "lanalyzer_open()" is an infinite loop, so the "return 0;" at the end isn't necessary to suppress a compiler warning with that compiler - and Sun C not only figures it out, it warns that the "g_assert_not_reached()" and the "return 0;" are unreachable, so I'll take them out for now (and put them back if my older GCC at home still requires it to suppress warnings). svn path=/trunk/; revision=3310
2001-04-16The "data" member of a Buffer structure is a "u_char *"; when assigningGuy Harris1-3/+3
the result of a "g_malloc()" to it, cast it to "u_char *", not "char *". svn path=/trunk/; revision=3309
2001-04-12Improvement of 'make clean' targets.Gilbert Ramirez1-2/+3
svn path=/trunk/; revision=3297
2001-04-09Add support for "version 7" wandess output. Actually, I think it'sGerald Combs2-12/+74
simply PPP data that doesn't have a username associated with it, e.g. for a dedicated WAN link as opposed to a dialup link. svn path=/trunk/; revision=3274
2001-04-06Build with zlib.Gilbert Ramirez2-9/+7
Pre-compiled zlib provided at http://www.ethereal.com/distribution/win32/zlib-1.1.3-fixed.zip "fixed" because the pre-compiled version in the "extralibs" package from the Gimp/Win32 page has a fault zlib.lib in it. Add note about zlib in README.win32; more work needs to be done to this file to mention new packaging method. svn path=/trunk/; revision=3263
2001-04-05Use sed in the Win32 build to place the version in various files.Gilbert Ramirez2-4/+4
We us $(VERSION), defined in the top-level config.nmake, to replace @VERSION@ in various files. $(RC_VERSION) and $(WTAP_VERSION) are similarly used. svn path=/trunk/; revision=3258
2001-03-23Back out the guint64 stuff - it's not clear it's the right way to handleGuy Harris1-41/+20
this, as 1) we still need to handle platforms that don't support 64-bit integral data types, so we still needed the old stuff in some fashion anyway and 2) MSVC appears to treat structures as requiring 8-byte alignment in some cases, and "guint64"s require 8-byte alignment on at least some platforms, forcing structures containing those 64-bit time stamps to have a size that's a multiple of 8 bytes, which *isn't* the correct size for the data record header. svn path=/trunk/; revision=3177
2001-03-23The Win32 build builds wiretap as a DLL and requires WinPcap 2.1.Gilbert Ramirez3-6/+61
svn path=/trunk/; revision=3163
2001-03-15Add a new Wiretap encapsulation type for Cisco HDLC. Map the NetBSDGuy Harris3-11/+21
DLT_HDLC to it. Make a separate dissector for Cisco HDLC, and add a dissector for Cisco SLARP. Have the PPP dissector call the Cisco HDLC dissector if the address field is the Cisco HDLC unicast or multicast address. Use the Cisco HDLC dissector for the Cisco HDLC Wiretap encapsulation type. Add a new dissector table "chdlctype", for Cisco HDLC packet types (they're *almost* the same as Ethernet types, but 0x8035 is SLARP, not Reverse ARP, and 0x2000 is the Cisco Discovery protocol, for example), replacing "fr.chdlc". Have a "chdlctype()" routine, similar to "ethertype()", used both by the Cisco HDLC and Frame Relay dissectors. Have a "chdlc_vals[]" "value_string" table for Cisco HDLC types and protocol names. Split the packet type field in the Frame Relay dissector into separate SNAP and Cisco HDLC fields, and give them the Ethernet type and Cisco HDLC type "value_string" tables, respectively. svn path=/trunk/; revision=3133
2001-03-11Handle NetBSD Cisco HDLC as PPP, for now.Guy Harris1-5/+18
svn path=/trunk/; revision=3125
2001-03-10Obliging every capture file reader's "open()" routine to seek to theGuy Harris16-42/+26
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
2001-03-09Close the random stream, not just the sequential stream, if we got anGuy Harris1-1/+3
error trying to open a file. svn path=/trunk/; revision=3122
2001-03-09Include "etherpeek.h", which declares routines we define, not "snoop.h",Guy Harris1-2/+2
which declares routines we neither define nor use. svn path=/trunk/; revision=3121
2001-02-22Etherpeek version 5, 6, and 7 support, from Daniel Thompson.Guy Harris6-5/+367
svn path=/trunk/; revision=3066
2001-02-14Sigh. Microsoft Visual C++ 6.0 won't convert a "guint64" to a "double"Guy Harris1-2/+2
- it only allows you to convert a *signed* 64-bit integer to a "double". Cast the result of "pletohll()" to "gint64" before returning it from a function that returns a "double". svn path=/trunk/; revision=3033
2001-02-13You have to define "htolell()" on little-endian platforms, too....Guy Harris1-4/+5
svn path=/trunk/; revision=3028
2001-02-13Changes from Chris Jepeway toGuy Harris3-41/+111
in some places use "guint64", on plaforms where it's available, rather than floating point (we don't yet use it universally, as we'd have to provide code to do 64-bit arithmetic on platforms/compilers where 64-bit integral types aren't supported); use .838096 microseconds rather than 1 microseconds as the time stamp units for NetXRay 2.x format, as those capture files seem to use that time stamp (that's the Sniffer "PC" time stamp; perhaps when Network Associates assimilated Cinco, they changed the time stamp units). svn path=/trunk/; revision=3027
2001-01-27"autoheader" recognizes AC_CHECK_HEADERS as a macro that definesGuy Harris1-2/+2
HAVE_XXX_H if xxx.h is present, but doesn't recognize AC_CHECK_HEADER as such, and thus doesn't put anything about HAVE_XXX_H into "config.h.in", and thus HAVE_XXX_H doesn't get defined even if xxx.h is present. svn path=/trunk/; revision=2942
2001-01-25Finish up support for writing NetMon 2.x capture files.Guy Harris2-7/+22
(We really need to put in some rudimentary 64-bit integer support, for the benefit of platforms+compilers that don't support it; the floating-point calculations we're doing now appear not to get exactly the right answer, from an experiment at reading a NetMon 2.x file and writing it back out as NetMon 2.x with editcap.) svn path=/trunk/; revision=2939
2001-01-17Update a comment to reflect reality (we no longer skip all the extraGuy Harris1-2/+4
headers, we look at REC_HEADER2 records). svn path=/trunk/; revision=2911
2001-01-17Fixed potential buffer overflow in skip_header_records when processingJeff Foster1-17/+15
REC_HEADER2 encapsulation type. Modified skip_header_records to accept REC_HEADER3-REC_HEADER7. These header records would cause file read error if the capture file was compressed. svn path=/trunk/; revision=2910
2001-01-16Update a comment to reflect reality (we no longer skip all the extraGuy Harris1-3/+6
headers, we look at REC_HEADER2 records). svn path=/trunk/; revision=2904
2001-01-16Moved settingg wth->file_encap from sniffer_encap to precede theJeff Foster1-2/+6
skip_header_records call because skip_header_records function may set the field based upon the header records svn path=/trunk/; revision=2903
2001-01-16Code to get a putative network subtype from a type 7 record in anGuy Harris1-6/+86
"Internetwork analyzer" capture, from Jeff Foster. (It's not a replacement for the heuristics, as 1) at least one PPP capture doesn't have a type 7 record and 2) LAPB/X.25 and LAPD/ISDN might both be "HDLC" captures and we'd need to figure out how to tell them apart.) svn path=/trunk/; revision=2902
2001-01-10Fix up Gerald's e-mail address to be his "ethereal.com" address.Guy Harris1-1/+1
svn path=/trunk/; revision=2859
2001-01-08Code to handle Frame Relay Sniffer captures, from Jeff Foster.Guy Harris3-5/+14
Code to register the Frame Relay dissector to handle Frame Relay captures, from Paul Ionescu. svn path=/trunk/; revision=2845
2000-12-23Add support for the DLT_LINUX_SLL capture type in the current CVSGuy Harris3-4/+13
version of libpcap; that's used on Linux for captures on the "any" device (which captures from all interfaces simultaneously) and for captures on devices whose link-layer type libpcap doesn't (yet) support natively. The spanning tree code, when checking for GV{M,R,...}P packets, must first check whether the link-layer destination address is, in fact, an Ethernet-style address; on Linux cooked captures, there *is* no destination address, so it's of type AT_NONE, not AT_ETHER. svn path=/trunk/; revision=2772
2000-12-09Fix for pppdump buffer-overflow check.Gilbert Ramirez2-5/+16
From Daniel Thompson <daniel.thompson@st.com> svn path=/trunk/; revision=2748
2000-11-29Catch Sniffer packets where the record length for a record containing aGuy Harris1-1/+14
packet is too small to contain all the data that the frame header claims was captured for the packet; treat that as a bad record, and return an error. svn path=/trunk/; revision=2711
2000-11-22Generated Bison and Flex files test whether __STDC__ is definedGuy Harris1-0/+21
in order to check whether to use ANSI C features such as "const". GCC defines it as 1 even if extensions that render the implementation non-conformant are enabled; Sun's C compiler (and, I think, other AT&T-derived C compilers) define it as 0 if extensions that render the implementation non-conformant are enabled; Microsoft Visual C++ 6.0 doesn't define it at all if extensions that render the implementation non-conformant are enabled. We define it as 0 in "config.h.win32", so that those generated files will use those features (and thus not get type warnings when compiled with MSVC++). svn path=/trunk/; revision=2698
2000-11-22Change Ethereal homepage URL from etheral.zing.org to www.ethereal.com.Gilbert Ramirez1-2/+2
svn path=/trunk/; revision=2696
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 Harris8-11/+25
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 Ramirez5-5/+10
svn path=/trunk/; revision=2654
2000-11-15IEEE 802.11 support, from Johan Jorgensen of Axis Communications AB.Guy Harris3-5/+44
Add in stuff for a bunch of libpcap formats either in libpcap 0.5.2 or in the current CVS version; we don't implement all of them in Ethereal/Wiretap (those are "#if 0"ed out), but we do implement the IEEE 802.11 stuff (which isn't yet in libpcap or tcpdump, but the CVS version of libpcap *does* reserve 105 as the encapsulation type number for 802.11). svn path=/trunk/; revision=2646
2000-11-13Support for the BASE100 and GSC100BT subsystems by Jeff Foster.Olivier Abad2-62/+77
svn path=/trunk/; revision=2640
2000-11-13Improve the detection of the encapsulation used in a radcom file.Olivier Abad1-13/+11
svn path=/trunk/; revision=2639
2000-11-12"wtap_loop()" no longer has problems with packet offsets of 0, so weGuy Harris2-22/+73
don't need to work around that. The offset, for a given packet, at which "ascend_seek()" should start searching for that packet's header must be computed separately from the offset, for that packet, at which "ascend_seek()" should start searching for the *next* packet - if the file is a "wdd" capture, and the packet has a "Date:" header and a WD_DIALOUT_DISP header, the search for that packet should start at the beginning of the "Date:" header, but the search for the next packet should start after the WD_DIALOUT_DISP header, as if we start it after the "Date:" header, the search will stop at the packet's own WD_DIALOUT_DISP header, as a packet could have a WD_DIALOUT_DISP header but no "Date:" header. svn path=/trunk/; revision=2620
2000-11-12Not all packets in a "wdd" dump necessarily have a "Cause an attempt toGuy Harris3-21/+42
place call to" header (I presume this can happen if there was a call in progress when the packet was sent or received); don't require the Date: 01/12/1990. Time: 12:22:33 Cause an attempt to place call to 14082750382 to be present in every packet. (Only the date on the first packet is used, and only if it's present in the first packet; if the first packet doesn't have a date, we can't easily go back and fix up the previous packets, *especially* in programs such as Tethereal and editcap which make only one pass through the capture. We set the called number to a null string if that's the case; we could assume, in the sequential pass, that it's the phone number from the last call, and remember that for use when doing random access.) svn path=/trunk/; revision=2617