aboutsummaryrefslogtreecommitdiffstats
path: root/tethereal.c
AgeCommit message (Collapse)AuthorFilesLines
2003-12-11Fix a typo.Guy Harris1-2/+2
svn path=/trunk/; revision=9240
2003-12-09print system enhanced, more print ranges and expanded statesUlf Lamping1-3/+3
svn path=/trunk/; revision=9222
2003-12-09-Tpdml and -Tps force -V. Thus, -V is no longer required when using -Tpdml.Gilbert Ramirez1-8/+4
Eventually, -Tps will not force -V, and will print summaries when -V is not selected. However, work still has to be done there. svn path=/trunk/; revision=9218
2003-12-06Add the ability to print packet dissections in PDML (an XML-based format)Gilbert Ramirez1-5/+34
to tethereal. It could be added to Ethereal, but the GUI changes to allow the user to select PDML as a print format have not been added. Provide a python module (EtherealXML.py) to help parse PDML. Provide a sample app (msnchat) which uses tethereal and EtherealXML.py to reconstruct MSN Chat sessions from packet capture files. It produces a nice HTML report of the chat sessions. Document tethereal's PDML and EtherealXML.py usage in doc/README.xml-output Update tethereal's manpage to reflect the new [-T pdml|ps|text] option svn path=/trunk/; revision=9180
2003-12-02From Didier Gautheron: for each column format type, save the first andGuy Harris1-1/+14
last columns, if any, with that format, and use that to speed up processing of columns with a particular format and checking whether we're displaying a column with a particular format. svn path=/trunk/; revision=9147
2003-11-27From Michael Lum: fix the usage message to say "-z", not "-Z".Guy Harris1-3/+3
svn path=/trunk/; revision=9104
2003-11-01Based on a patch from Brian Fundakowski Feldman, add support for settingGuy Harris1-49/+141
link-layer type when capturing, using the "pcap_set_datalink()" and related APIs. svn path=/trunk/; revision=8848
2003-10-30On UNIX, give up set-UID and set-GID privileges before opening captureGuy Harris1-1/+31
files and immediately after opening capture devices, so we run without privileges as much as possible. svn path=/trunk/; revision=8837
2003-10-10Not all versions of libpcap have "pcap_compile_nopcap()"; use it only ifGuy Harris1-4/+6
we have it. Not all versions of libpcap have DLT_LINUX_SLL, either; use DLT_EN10MB instead. svn path=/trunk/; revision=8670
2003-10-10Part two of different-filter-syntax-hackaround: Warn in case of captureJörg Mayer1-4/+7
filter usage where display filter syntax is required. svn path=/trunk/; revision=8669
2003-10-09In case of a parse error in the capture syntax, check whether it isJörg Mayer1-3/+19
valid display filter syntax. In case it is, warn about a possbile confusion of the two filter types. svn path=/trunk/; revision=8652
2003-09-25From Matthijs Melchior: check whether the ring buffer timeout hasGuy Harris1-11/+23
expired *before* writing a packet, rather than *after* writing a packet, so that if you get no packets for a sufficiently long period that the timeout expires before you get a new packet, the new packet is in the beginning of a new file (as you might get more packets right after that, and want them to be in the new file, rather than have the first packet at the end of one file and the rest of the packets in another file). svn path=/trunk/; revision=8536
2003-09-19From Lars Roland: initialize the flags.ref_time field of a frame_dataGuy Harris1-1/+2
structure. svn path=/trunk/; revision=8496
2003-09-15Rename various capture file routines to have names starting with "cf_".Guy Harris1-3/+3
svn path=/trunk/; revision=8479
2003-09-10When saving packets, we have a "Save only marked packets" option; labelGuy Harris1-2/+2
the option to print only marked packets similarly, rather than as "Suppress unmarked packets" (for consistency, and because the latter isn't unlike a double negative). svn path=/trunk/; revision=8451
2003-09-10Have "get_interface_list()" return a list of "if_info_t" structuresGuy Harris1-16/+14
containing a pointer to an interface name and possibly a pointer to an interface description (although that pointer might be null if no description is available), rather than having the Windows version glue together the name and description into a single string. Supply for the Linux "any" device the same description that libpcap's "pcap_findalldevs()" returns. svn path=/trunk/; revision=8440
2003-09-07Support string dissector tables in the Tethereal "decode as" stuff.Guy Harris1-11/+34
Make the Ethereal "decode as" stuff not blow up with string dissector tables. Selectors for uint dissector tables are unsigned, not signed. svn path=/trunk/; revision=8408
2003-09-06From Graham Bloice, with changes from me: list the interface index inGuy Harris1-3/+58
"-D" output, and support interface indices as arguments to "-i", tcpdump-style. svn path=/trunk/; revision=8402
2003-09-03And for Cal,Ronnie Sahlberg1-1/+4
Ethereal presents a column to display culmulative bytes into the capture. A new column type is added : Culmulative Bytes. While PacketLength column type specifies the number of bytes in the current packet, Culmulative Bytes specifies the culmulative number of bytes from the start of the capture. svn path=/trunk/; revision=8359
2003-08-07From Michael Lum: add the ability to have a preferences file containingGuy Harris1-9/+46
a list of disabled protocols, and to save that list from the Edit > Protocols dialog box. Add checks for read errors in "read_prefs()". Clean up white space. svn path=/trunk/; revision=8144
2003-07-25Fix signed/unsigned comparison warnings.Gilbert Ramirez1-4/+6
svn path=/trunk/; revision=8084
2003-06-30From Lionel Ains:Guy Harris1-69/+138
don't assume that a dissector handle has a protocol associated with it (there's none for the "OSI network layer" dissector, for example, as that dissector hands off to one of several protocols based on the NLPID); rename a few functions to have names that better explain what they do; have separate functions to show all the layer types (dissector tables) and to show all the protocols supported for a layer type, and have both of them take, as an argument, the standard I/O stream to which they should write; improve the parser for the "-d" option to give more information on errors; fix up some comments. svn path=/trunk/; revision=7949
2003-06-22Ringbuffer rework.Laurent Deniel1-8/+19
Almost completely rewritten in order to: - be able to use a unlimited number of ringbuffer files 0 specified with -b argument or in the GUI, means that the number of file is unlimited. else the maximum number of ring buffer files is arbitrarily set to 1024. - close the current file and open (truncating it) the next file at switch - set the final file name once open (or reopen) - avoid the deletion of files that could not be truncated (can't arise now) and do not erase empty files The idea behind that is to remove the limitation of the maximum # of ringbuffer files being less than the maximum # of open fd per process and to be able to reduce the amount of virtual memory usage (having only one file open at most) or the amount of file system usage (by truncating the files at switch and not the capture stop, and by closing them which makes possible their move or deletion after a switch). svn path=/trunk/; revision=7912
2003-06-13Make it compile without libpcap.Guy Harris1-2/+10
svn path=/trunk/; revision=7870
2003-06-05From Lionel Ains: "-d" flag for decode-as support in Tethereal.Guy Harris1-12/+277
Add a new routine to iterate through all dissector tables, calling a routine for each table, to support having the "-d" code list all dissector tables. Get rid of "dissector_handle_get_dissector_name()"; it was put in there for "-d", but turns out not to be necessary for that. Clean up the usage message a bit (using the convention, adhered to by at least some UNIX utilities, of listing all the flags with no arguments in a single lump, and then listing the ones with arguments individually, and also putting "-v" and "-h" in a separate lump, as Ethereal does). svn path=/trunk/; revision=7788
2003-05-16Squelch some compiler complaints.Guy Harris1-2/+2
svn path=/trunk/; revision=7682
2003-05-15Implement a ring buffer switch duration:Laurent Deniel1-5/+79
when the new "Rotate capture file every n second(s)" checkbox or the -b <# of file>[:<duration>] argument are used, [t]ethereal will skip to the next ring buffer file if the specified duration has elapsed (even if the specified capture size is not reached). This is useful when you want to have separate capture files per hour or day for instance. I let the autostop filesize parameter mandatory (i.e. the "rotate capture file after n kilobytes") but this could be no longer strictly necessary when that new feature is used ... Another point: it might be interesting to really truncate the file at the switch and not the closure ... According to user comments and my own real case tests, I might plan to enhance this point and others (still ring buffer related) in the future. svn path=/trunk/; revision=7678
2003-05-14A correct programming practice is to save errno and restore its valueLaurent Deniel1-1/+3
in all signal handlers that could modify it (i.e. by calling system calls or worst standard C library functions). Else the following code for instance is buggy if a signal arises between the tests: if (system_call() == -1) { if (errno == Exxx) { ... } else { ... } } And MANY (open source or not) programs are broken that way ... svn path=/trunk/; revision=7664
2003-05-04Add support for asynchronous DNS updates using the GNU ADNS library.Gerald Combs1-1/+6
Support can be enabled at configure time by using "--with-adns=DIR". If support is enabled, async queries happen whenever host name resolution is enabled. Do we need a separate preference for async queries? Currently, only IPv4 reverse queries are supported. I can add IPv4 forward lookup support, but I don't have any way to test IPv6 queries. svn path=/trunk/; revision=7640
2003-04-23Allow taps to have menu item registration routines; the menu itemGuy Harris1-2/+5
registration routines, for taps with menu items (taps that can be run from the "Tools->Statistics" menu), create the menu item for the tap. "make-tapreg-dotc" constructs a "register_all_tap_menus()" function that calls all the tap menu item registration routines it finds, and Ethereal calls that routine after the main window has been constructed (so that the main menu exists, as the menu items are added to it). (Tethereal doesn't call it.) Get rid of the "menu" and "menu_init" arguments to "register_ethereal_tap"; the menu item is registered in the tap's menu item registration routine, not in its main registration routine. Have the RTP GUI tap register its menu item that way, rather than by having it compiled into "gtk/menu.c". (We're not ready yet to have taps whose menu items are under a submenu register themselves in that fashion, as "register_tap_menu_item()" can't yet create submenus.) svn path=/trunk/; revision=7540
2003-04-16Pull the stuff done in "dissect_packet()" to initialize a column_infoGuy Harris1-2/+2
structure into its own routine; rename "col_init()" to "col_setup()", and call the new routine "col_init()". svn path=/trunk/; revision=7467
2003-04-16Add the notion of a "fence" to columns. A dissector can set the fenceGuy Harris1-2/+2
to "protect" what's currently in the column, so that attempts to clear the column will only clear stuff after the fence and attempts to overwrite the column will append stuff after the fence. This, for example, allows a dissector to arrange that the Info column contain information for its protocol and for protocols running atop it. svn path=/trunk/; revision=7466
2003-03-12Change the version messages to put the "compiled with" stuff on aGuy Harris1-8/+12
separate line, and to put the "running with" info on a separate line from that, to make the output narrower. svn path=/trunk/; revision=7344
2003-03-08Put the code to get version numbers of various libraries with whichGuy Harris1-70/+2
Ethereal/Tethereal was linked into a common routine, and use that in both Ethereal and Tethereal. Add to that routine code to get OS version information. svn path=/trunk/; revision=7320
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