aboutsummaryrefslogtreecommitdiffstats
path: root/tethereal.c
AgeCommit message (Collapse)AuthorFilesLines
2003-01-01Re-word-wrap the "you can't capture on PPP/WAN interfaces on NT"Guy Harris1-3/+3
message, to make the margins more even and to bring the second line under 80 characters. (It's amazing how long Herman Hollerith's legacy has lasted....) svn path=/trunk/; revision=6835
2002-12-31One more "#ifdef" (well, #ifndef, actually) for _WIN32.Guy Harris1-2/+5
svn path=/trunk/; revision=6834
2002-12-31#ifdef out all the pipe-opening stuff on Windows.Guy Harris1-1/+7
svn path=/trunk/; revision=6833
2002-12-31Clean up the comments a bit.Guy Harris1-39/+42
Use _WIN32 rather than WIN32 throughout (both of them appear to work - I don't know whether one is the "right" one to use and, if one is, which one it is - and they're both used in Ethereal, but let's at least be consistent within a given file). Update the capture device open failure message on Windows not to say Token Ring devices aren't supported - current versions of WinPcap do support it, and the Ethereal message was updated, but the Tethereal one wasn't. Fix up the Tethereal code to match the Ethereal code a bit more, so that we go to "error" on Windows if the capture device open fails, and so that the code actually compiles on Windows. Fix up the indentation while we're at it. svn path=/trunk/; revision=6829
2002-12-29From rmkml: support for capturing from a pipe in Tethereal.Guy Harris1-20/+385
Fix up the documentation of the "-i" flag in the Ethereal man page to note only that "netstat -i" and "ifconfig -a" *might* work, to specifically note that not all UNIXes support the "-a" flag to "ifconfig", and to note that pipe data must be in *standard* libpcap format. Document the support for pipes in the "-i" flag in Tethereal. svn path=/trunk/; revision=6822
2002-12-02Don't cast away constness, and fix variable and structure memberGuy Harris1-3/+3
qualifiers as necessary to ensure that we don't have to. "strcmp()", "strcasecmp()", and "memcmp()" don't return booleans; don't test their results as if they did. Use "guint8", not "guchar", for a pointer to (one or more) 8-bit bytes. Update Michael Tuexen's e-mail address. svn path=/trunk/; revision=6726
2002-11-10Add tethereal's tap objects to Makefile.nmake's "clean" target.Gerald Combs1-19/+1
Instead of setting MIBDIRS in tethereal.c and gtk/main.c, set it in packet-snmp.c. svn path=/trunk/; revision=6606
2002-11-09Add support for SIGINFO on systems that have it.Guy Harris1-5/+75
svn path=/trunk/; revision=6590
2002-11-01Fix for small bug that crashed tethereal if a tap filter was applied and ↵Ronnie Sahlberg1-2/+3
tethereal forgot to tell epan_dissect_new() to build a tree svn path=/trunk/; revision=6529
2002-10-31From Ronnie Sahlberg: have a registration interface for tap listeners,Guy Harris1-61/+35
and generate the table of stuff to register from tap source files, so Tethereal doesn't need to know what tap listeners exist. Get rid of "tap-xxx.h" files, as they're now empty. Add "tethereal-tap-register.c" to the .cvsignore file, as it's a new generated file. Update "Makefile.nmake" to generate "tethereal-tap-register.c". Clean up "Makefile.am" and "Makefile.nmake" a bit. svn path=/trunk/; revision=6525
2002-10-31Don't reset the packet count if we longjmp out of the capture loop, asGuy Harris1-4/+4
that causes us to report that no packets were captured if you ^C out of a capture. svn path=/trunk/; revision=6523
2002-10-25The versions of UCD SNMP that we now support all installGuy Harris1-13/+7
<ucd-snmp/version.h>, so get rid of the stuff to check for its presence and handle its absence. svn path=/trunk/; revision=6503
2002-10-24Don't include the header file to get the SNMP version unless we'reGuy Harris1-1/+11
building with an SNMP library. If we have Net-SNMP, include <net-snmp/version.h>, not <ucd-snmp/version.h>. Don't include any of the SNMP headers unless HAVE_SOME_SNMP is defined. Include <net-snmp/config_api.h> if we have Net-SNMP, to declare "read_premib_configs()" and "read_configs()". Supply the include directories for Net-SNMP in the Makefile.nmake for GTK 1.2 and GTK 2. svn path=/trunk/; revision=6493
2002-10-23From Wes Hardaker:Guy Harris1-7/+17
Define HAVE_SOME_SNMP if either HAVE_UCD_SNMP or HAVE_NET_SNMP is defined, and use HAVE_SOME_SNMP, rather than HAVE_UCD_SNMP, in most places when testing whether we have an SNMP library or not. Be more selective when including Net-SNMP header files. Fix up {gtk,gtk2}/main.c to do the same SNMP stuff that tethereal.c does - including the MIB stuff that gtk/main.c was doing but gtk2/main.c wasn't doing. Fix the copyright date in gtk/main.c. svn path=/trunk/; revision=6483
2002-10-23From Ronnie Sahlberg: add a tap for statistics for DCERPC interfaces.Guy Harris1-2/+37
svn path=/trunk/; revision=6479
2002-10-17From Ronnie Sahlberg: don't have the tap code do a dissection, leaveGuy Harris1-3/+3
that up to its callers, so only one dissection need be done when reading a capture file. svn path=/trunk/; revision=6442
2002-10-09Link to libsnmp under Win32.Gerald Combs1-3/+21
In gtk/main.c and tethereal.c set MIBDIRS to <get_program_path()>\snmp\mibs so that we can drop the MIB files there, instead of the default c:\usr\... path. Add NET_SNMP_DIR to config.nmake and modify Makefile.nmake to adjust CFLAGs, ethereal_LIBS and tethereal_LIBS accordingly. Define HAVE_UCD_SNMP in config.h.win32. I tested this by creating c:\program files\ethereal\snmp\mibs and dropping in the MIB files that come with Net-SNMP. Ethereal resolved system.sysDescr.0 to "iso.3.6.1.2.1.1.1.0" under Windows. Under Linux it resolved to "SNMPv2-MIB::sysDescr.0". Ethereal.nsi still needs to be updated. A compiled version of the Net-SNMP library can be found at http://www.ethereal.com/distribution/win32/development/ svn path=/trunk/; revision=6385
2002-09-27Update tethereal to put the filter string in the statistics table for RPC_STAT.Ronnie Sahlberg1-3/+3
Update gtk and gtk2 versions of RPC_STAT to allow a filter string to be specified on both the command line as well as the GUI. Update the documentation for ethereal to reflect this. svn path=/trunk/; revision=6343
2002-09-26Updated RPCSTAT for tethereal. The command now takes a filter string as an ↵Ronnie Sahlberg1-4/+9
optional extra parameter. This makes it possible to generate any types of stats based on user defined subsets of the capture. Try -z rpc,rtt,100003,3,nfs.fh.hash==0x12345678 NFS rtt statistics for a specific file. svn path=/trunk/; revision=6337
2002-09-06From Vassilii Khachaturov, cleanup of redundant code.Ronnie Sahlberg1-20/+2
svn path=/trunk/; revision=6202
2002-09-05New type of onc-rpc statistics.Ronnie Sahlberg1-3/+9
try: -z rpc,programs svn path=/trunk/; revision=6190
2002-09-05Added a mutex to protect a critical region in Gtk2 where the list can beRonnie Sahlberg1-6/+6
modified while the draw thread is walking it. Changed the cmdline switch to -z so the same one can be used both for ethereal and tethereal. Updated man pages to reflect the RPCSTAT feature. (Try this with Tools/Statistics/ONC-RPC/RTT and load a capture containing onc-rpc. ) svn path=/trunk/; revision=6189
2002-09-04Tap api. tap is a simple api that can be used for arbitrary extensions.Ronnie Sahlberg1-2/+29
One example extension is rpcstat. Try -Z rpc,rtt,100003,3 as argument to tethereal when reading a capture containing NFSv3 packets. tap-rpcstat.[ch] is intended to demonstrate the api and can be used to base other extensions on. svn path=/trunk/; revision=6175
2002-08-28Removed trailing whitespaces from .h and .c files using theJörg Mayer1-20/+20
winapi_cleanup tool written by Patrik Stridvall for the wine project. svn path=/trunk/; revision=6117
2002-08-20Add -S option to tethereal. It is the equivalent to Ethereals displayJörg Mayer1-7/+16
packets in real time feature. svn path=/trunk/; revision=6034
2002-08-02Replace the types from sys/types.h and netinet/in.h by their glib.hJörg Mayer1-23/+19
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
2002-08-01Fix a few more memleaks found by valgrind (all derivingJörg Mayer1-2/+4
from the get_persconffile_path mess). svn path=/trunk/; revision=5927
2002-07-17Get rid of some "unused variable" and "unused static function" warnings,Guy Harris1-4/+18
and some compile errors in Tethereal, when compiling without libpcap. If libpcap is missing (whether that's detected at compile time or, as on Windows, at run time), don't call any of the "capture_prefs" routines - the routine to create the capture preferences page wasn't called, so the other routines can try to refer to non-existent widgets and other items and crash. Get rid of the stub routines in "capture_prefs()" used when compiling without libpcap, as they're no longer called. svn path=/trunk/; revision=5888
2002-07-16From Graeme Hewson:Guy Harris1-74/+131
Allow "-" as the output file name in Wiretap, referring to the standard error. Optimize the capture loop. Fix some of the error-message printing code in Ethereal and Tethereal. Have Wiretap check whether it can seek on a file descriptor, and pass the results of that test to the file-type-specific "open for output" routine. Have the "open for output" routines for files where we need to seek when writing the file return an error if seeks don't work. svn path=/trunk/; revision=5884
2002-07-07From Liviu Daia <Liviu.Daia[AT]imar.ro>: move "col_init()" call afterGuy Harris1-3/+3
the command-line options are processed, so that we don't crash if you've set the "column.format" preference from the command line. Fix a grammaro in a comment. svn path=/trunk/; revision=5838
2002-06-30From Graeme Hewson:Guy Harris1-13/+43
pass a non-zero count to "pcap_dispatch()" when possible; fix the check after "test_for_fifo()"; if there's a maximum file size, we're definitely saving to a file, so don't bother checking "ld.pdh", as it won't be null; if writing to a FIFO, flush after "pcap_dispatch()" returns, rather than after every packet, so we don't do as many writes to the FIFO. svn path=/trunk/; revision=5805
2002-06-28SIGINT is, at least as I read some Microsoft documentation, notGuy Harris1-6/+44
supported in Win32 applications; use the native Win32 mechanism for catching ^C (and other events that would terminate a program running in a console window). That mechanism (and the signal mechanism in the MSVC++ C run-time) cause the handler to be run in a separate thread, so it can't just do a longjmp. Fortunately, WinPcap's packet-dispatch loop, unlike the libpcap loop on some UNIX platforms, can be interrupted by ^C, so we don't have to do the longjmp there - we can just set "ld.go" to FALSE to terminate the capture loop. svn path=/trunk/; revision=5776
2002-06-27Update tethereal to handle the "<description> : <device ID>" interfaceGerald Combs1-4/+14
names that are generated under Windows. Note in pcap-util.c that we may want to separate interface device names and descriptions in the future. svn path=/trunk/; revision=5770
2002-06-23Count packets that pass the read filter, if we have a read filter, notGuy Harris1-15/+25
packets that we get from libpcap; if there's a read filter in effect, only packets that pass the read filter get saved or printed, so that's the number of packets that should be compared against the argument to any "-c" flag, and the number that should be printed when we print packet counts. svn path=/trunk/; revision=5747
2002-06-23Add a routine to "epan/filesystem.c" to test whether a file is a FIFO.Guy Harris1-49/+24
Use that in Tethereal rather than duplicating a pile of macros. Get rid of the remaining uses of "stat()" in Tethereal - none of them are necessary (they were just cut-and-pasted from Ethereal). svn path=/trunk/; revision=5746
2002-06-23From Graeme Hewson: flush the output after every frame if Tethereal isGuy Harris1-27/+86
writing a capture to a FIFO, and improve the error checking for ring buffers. svn path=/trunk/; revision=5745
2002-06-07Add a Wiretap routine to process packets captured via libpcap, possiblyGuy Harris1-9/+18
extracting a pseudo-header, for the use of SunATM captures. Add support for SunATM capture. svn path=/trunk/; revision=5652
2002-06-04Get rid of the "data_src" member of the "frame_data" structure; put itGuy Harris1-6/+3
in the "packet_info" structure instead, as we don't need a pointer for every single frame in the capture file, just for each frame for which we currently have an open "epan_dissect_t". svn path=/trunk/; revision=5614
2002-05-22Command-line interface cleanups, from Graeme Hewson:Guy Harris1-9/+19
- Exit if an error is found in the options or arguments. - In print_usage(), improve the visibility of any getopt() error message by suppressing the version information when -h is not specified, and by adding an empty line. Ethereal: - If the -k option is specified, use the interface in the preferences file, if present. - Prevent the user from specifying any hidden options which are used internally in -S mode. Tethereal: - Fix a memory leak in the processing of the -f option. - In print_usage(), change "capture file type" to "output file type", which I think is clearer; move the -q flag from the non-libpcap case to the libpcap case. svn path=/trunk/; revision=5525
2002-05-14Use "-G fields" rather than "-G" in Makefiles.Guy Harris1-1/+6
Print an error and exit if an invalid option is given for the "-G" flag. svn path=/trunk/; revision=5466
2002-05-14Make the "-G" flag take an argument. If no arugment is specified, or ifGuy Harris1-7/+16
the argument is "fields", dump out a table of the fields, as we currently do; if the argument is "protocols", dump out a table of the protocols. svn path=/trunk/; revision=5462
2002-03-31From Joerg Mayer: get rid of unused arguments, and mark those that can'tGuy Harris1-7/+6
be eliminated (because the function is called through a pointer, and other functions called through the same pointer *do* use the argument) as unused. svn path=/trunk/; revision=5050
2002-03-23Update from Diana Eichert to remove the comments with her login name.Guy Harris1-3/+1
svn path=/trunk/; revision=5006
2002-03-22From Diana Eichert: add a "-q" flag to Tethereal to suppress packetGuy Harris1-8/+22
count display. Update the Tethereal man page to reflect the new option. Update both the Ethereal and Tethereal man pages to use the same style to describe options, e.g. -Z Cause Ethereal to draw the mark of Zorro on the display. rather than -Z Causes Ethereal to draw the mark of Zorro on the display. (some were using the first and some were using the second). Update the Ethereal man page to do the same for menu items. Update both the Ethereal and Tethereal man pages to better describe the "-N" flag (by noting that any form of name resolution *not* specified in the flag is turned *off*). svn path=/trunk/; revision=5005
2002-03-12Get rid of the "--enable-snmp" option; instead, use "--with-ucdsnmp".Guy Harris1-5/+3
Make the directory option to "--with-ucdsnmp" optional. Handle "--with-ucdsnmp" similar to the way "--with-pcap" is handled. Get rid of unnecessary #defines in "packet-cops.c". Get rid of no-longer-necessary include of "dlfcn.h" in "packet-snmp.c". svn path=/trunk/; revision=4930
2002-03-10Remove code to show the presence, and version number, of the CMU SNMPGuy Harris1-14/+3
library, as we no longer support linking with that library. svn path=/trunk/; revision=4917
2002-03-06Don't say "without SNMP"; that can confuse people into thinking it meansGuy Harris1-2/+2
Ethereal doesn't dissect SNMP if not linked with an SNMP library (and *did* confuse at least one person into thinking that). Say "without SNMP MIB support", instead, as you only lose the ability to read SNMP MIBs and interpret OIDs and variable bindings according to those MIBs. svn path=/trunk/; revision=4894
2002-02-28In follow.c, initialize data_out_file to NULL, as it used toGilbert Ramirez1-2/+1
be initialized in gtk/follow_dlg.c In gtk/follow_dlg.c, declare data_out_file as 'extern'. In tethereal.c, no longer define 'data_out_file', as the storage for it is now in follow.c. svn path=/trunk/; revision=4830
2002-02-27From Joerg Mayer: remove unused variables and declarations ofGuy Harris1-3/+1
non-existent functions. Remove the "filetype" argument from the "can_write_encap" functions for particular capture file types - the argument value is implicit, in that the routine being called is the routine for that particular file type. svn path=/trunk/; revision=4823
2002-02-24Put all the capture options into a structure.Guy Harris1-46/+66
Move the ringbuffer capture options from the "capture_file" structure to the structure for capture options, as they're a property of an in-progress capture, not a property of a particular capture file. svn path=/trunk/; revision=4799