aboutsummaryrefslogtreecommitdiffstats
path: root/tethereal.c
AgeCommit message (Collapse)AuthorFilesLines
2004-05-09From Lars Roland: add support for building a libethereal.dll with MSVC:Guy Harris1-1/+5
add a config.nmake option to control whether to build libethereal.dll or not; remove "./wiretap" from PATH to prevent problems due to wrongly-loaded files; build dissector.lib with MSVC; move "print.c" and "ps.c" to the dissector helpers, as "print.c" imports variables from packet-frame.c and packet-data.c, which are in libethereal; move "g711.c" out of the dissector helpers, as they're used only by Ethereal in a tap, not in Tethereal or in any dissector; add a .def file for libethereal; arrange to declare global variables exported from libethereal with "__declspec(dllimport)" when building programs that import those variables; update the NSIS installer. Make the "configure" script define ETH_VAR_IMPORT as "extern". svn path=/trunk/; revision=10834
2004-04-24some code cleanup of the printing systemUlf Lamping1-2/+2
svn path=/trunk/; revision=10682
2004-04-22added some options and enhancements to the print output:Ulf Lamping1-1/+2
-ps: added formatting hints for ghostscript, so pdf conversion will be much better -ps: print a thin line at the top and bottom of each page -ps/text: add an option to start a new page for every packet (formfeed) svn path=/trunk/; revision=10660
2004-04-20changed postscript output:Ulf Lamping1-2/+2
reduced print margin to 1/2 inch and font size to 8 point, include filename in page header, wrap too long lines svn path=/trunk/; revision=10652
2004-04-16Add a "report_failure()" routine to allow dissectors to report arbitraryGuy Harris1-8/+18
errors to the user. Use that, rather than "g_warning()", in the Diameter dissector to report errors reading the dictionary. Make the format argument to "simple_dialog()" a "const" pointer. Fix up the read-error message in Tethereal to end with a newline. If a simple dialog is requested before the main window or the capture-control window is popped up, queue it up and pop the queued messages up once the main or capture-control window is displayed. svn path=/trunk/; revision=10616
2004-04-16make print dialog "Packet Format" options somewhat similar to theUlf Lamping1-3/+3
Ethereal panes, thus better understandable svn path=/trunk/; revision=10611
2004-03-23Make "epan_init()" take, as additional arguments, pointers to routinesGuy Harris1-7/+11
that dissectors should call to report file open and read errors, and have "report_open_failure()" and "report_read_failure()" call through those pointers, rather than being defined and exported by the application using libethereal - instead, the application would define those functions and pass pointers to them to 'epan_init()". Move "report_err.h" to the epan directory, as the functions it declares are now part of the libethereal API. svn path=/trunk/; revision=10470
2004-03-18From Lars Roland: Move timestamp_type into libethereal and provide accessorOlivier Biot1-6/+8
methods for getting and setting the timestamp type. This is a move towards a real libethereal shared library. svn path=/trunk/; revision=10402
2004-02-23Move cvsversion.h from BUILT_INCLUDES to BUILT_SOURCES. This tells automakeGerald Combs1-2/+2
to create cvsversion.h before any "all" or "check" targets are built. Clean up a few CVS version strings that I missed last week. svn path=/trunk/; revision=10199
2004-02-21Add routines that can be called from dissectors to report file open andGuy Harris1-1/+25
read errors; there are separate implementations for Ethereal (pops up an alert box) and Tethereal (prints an error message). Use those routines in the ASN.1 dissector. svn path=/trunk/; revision=10152
2004-02-20Add support for a "version.conf" file in the main directory which canGerald Combs1-2/+2
be used to adjust version preferences. It understands two configuration directives: "enable", which can be 0 or 1, and "format", which can be any strftime()-compatible string, e.g. "V12-powered on %A %Y-%m-%d %H:%M:%S". If no configuration file is present, the configuration defaults to enable: 1 format: CVS %Y%m%d%H%M%S svn path=/trunk/; revision=10139
2004-01-31Fix the spelling of "cumulative" (and variables whose names derive fromGuy Harris1-4/+4
that spelling). svn path=/trunk/; revision=9917
2004-01-25Have the Wiretap open, read, and seek-and-read routines return, inGuy Harris1-25/+56
addition to an error code, an error info string, for WTAP_ERR_UNSUPPORTED, WTAP_ERR_UNSUPPORTED_ENCAP, and WTAP_ERR_BAD_RECORD errors. Replace the error messages logged with "g_message()" for those errors with g_strdup()ed or g_strdup_printf()ed strings returned as the error info string, and change the callers of those routines to, for those errors, put the info string into the printed message or alert box for the error. Add messages for cases where those errors were returned without printing an additional message. Nobody uses the error code from "cf_read()" - "cf_read()" puts up the alert box itself for failures; get rid of the error code, so it just returns a success/failure indication. Rename "file_read_error_message()" to "cf_read_error_message()", as it handles read errors from Wiretap, and have it take an error info string as an argument. (That handles a lot of the work of putting the info string into the error message.) Make some variables in "ascend-grammar.y" static. Check the return value of "erf_read_header()" in "erf_seek_read()". Get rid of an unused #define in "i4btrace.c". svn path=/trunk/; revision=9852
2004-01-25Add another check for output errors when printing.Guy Harris1-1/+5
svn path=/trunk/; revision=9829
2004-01-25There's no need to keep a "FILE *" for the file being printed to in aGuy Harris1-3/+43
"capture_file" structure. Keep it locally, instead. Check for errors when printing packets. Report failure to open a print destination and failure to write to a print destination differently. Don't have the "print preamble" and "print final" routines return success/failure indications - revert to the old scheme where they didn't, and have the callers use "ferror()" to check for errors. Report write errors when printing dissections in Tethereal. Report print errors as errors, not warnings. svn path=/trunk/; revision=9828
2004-01-24Add a new "file_open_error_message()" routine in "epan/filesystem.c", toGuy Harris1-74/+62
translate UNIX errno values to a somewhat friendly message format string. Rename "file_open_error_message()" in "file.c" to "cf_open_error_message()", make "cf_open_error_message()" use the new "file_open_error_message()" for UNIX errno values, have "do_capture()" in "capture.c" use "file_open_error_message()" to report errors from "open()", and make "cf_open_error_message()" static as nothing outside "file.c" uses it. Do similar stuff in "tethereal.c". svn path=/trunk/; revision=9821
2004-01-19The current year is 2004Jörg Mayer1-1/+3
svn path=/trunk/; revision=9731
2004-01-19move timestamp format options from "View->Options" dialog intoUlf Lamping1-6/+6
menuitems under "View->Time Display Format". renamed timestamp enum items e.g. from ABSOLUTE to TS_ABSOLUTE, to prevent conflicting definitions with MSVC svn path=/trunk/; revision=9729
2004-01-18Update the Win32 information given when we fail to open a capture deviceGuy Harris1-3/+5
to note that the 3.0 and later versions of WinPcap don't support PPP/WAN captures even on Windows OT. svn path=/trunk/; revision=9709
2004-01-18Output the result of -h to stdout, not stderrJörg Mayer1-19/+23
svn path=/trunk/; revision=9702
2004-01-18Nice rendering of the CVS version as "(cvs 200401181200003000)".Olivier Biot1-4/+12
The make-version.pl script only defines CVSVERSION if this was a build from CVS. svn path=/trunk/; revision=9701
2004-01-16In case of CVS sources, add the date of the last change to the versionJörg Mayer1-3/+5
number. 2do: Add support to Makefile.nmake Enforce the generation of cvsversion.h on each run of make svn path=/trunk/; revision=9679
2004-01-11Rename DISSECTOR_HELPER_{SRC,OBJECTS} toGuy Harris1-1/+2
DISSECTOR_SUPPORT_{SRC,OBJECTS}. Add some additional files, required by dissectors, to those lists. Extract the stuff to get version information strings for libraries and the OS, which is *not* needed by dissectors, from "util.c", which contains routines that *are* needed by dissectors, and put it into a separate file. Make "dftest" link only with the dissector support stuff, not with all of the Ethereal common files. svn path=/trunk/; revision=9645
2004-01-09We don't need to keep the progress bar quantum or next step in theGuy Harris1-3/+1
capture_file structure - just make it local to the routine scanning through the packets. svn path=/trunk/; revision=9616
2004-01-09use the same packet range things for "Print" dialog, as already implementedUlf Lamping1-2/+5
in the "Save As" dialog and some other minor changes svn path=/trunk/; revision=9612
2004-01-05removed some MSVC warnings (level 3)Ulf Lamping1-2/+2
svn path=/trunk/; revision=9561
2004-01-03Apply the patches from Tadaaki Nagao for a global version of disabledRichard Sharpe1-4/+19
protocols ... svn path=/trunk/; revision=9538
2003-12-18"pcap_compile_nopcap()" has a different signature in recent NetBSDGuy Harris1-7/+15
libpcap than in tcpdump.org libpcap; it's been deprecated for that reason. "pcap_open_dead()" has been in libpcap since 0.6, so only for 0.5[.x] will you have "pcap_compile_nopcap()" but not "pcap_open_dead()" - for now, we use "pcap_open_dead()" rather than "pcap_compile_nopcap()", and don't do the check for capture filters in systems with libpcaps that lack "pcap_open_dead()". svn path=/trunk/; revision=9341
2003-12-17Set "print_args" regardless of whether we're printing the packet detailGuy Harris1-7/+7
or not - it's used if we're printing the hex data. svn path=/trunk/; revision=9324
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