Age | Commit message (Collapse) | Author | Files | Lines |
|
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@17690 f5534014-38df-0310-8fa8-9805f1628bb7
|
|
doing anything with the output file, so that
1) if the attempt to open the capture device fails, we don't
bother creating any output files;
2) we could relinquish privileges permanently as soon as we
finish opening the capture device, so we don't have to give
them up temporarily when opening the output file, reclaim
them to open the input device, and then give them up
permanently;
(we already do that in Tethereal).
While we're at it, set the capture filter immediately after opening the
capture device, so we quit before opening capture devices if that fails.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@17468 f5534014-38df-0310-8fa8-9805f1628bb7
|
|
primary and secondary error messages and let the parent worry about how
to display them. This means dumpcap doesn't need stub routines for
generating the formatting tags for the primary and secondary messages.
Have a separate message for capture filter errors, so that the parent
can check whether the capture filter looks like a display filter and
report the appropriate message. This means that dumpcap doesn't need a
stub routine for compiling display filters (a stub routine also means
that Ethereal won't do the check for capture filters that look like
display filters!).
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@17465 f5534014-38df-0310-8fa8-9805f1628bb7
|
|
bypass Wiretap; that means we don't have to run the packet through
wtap_process_pcap_packet() and then undo that conversion in Wiretap if
we're just going to write it out, shortening the code path.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@17461 f5534014-38df-0310-8fa8-9805f1628bb7
|
|
Don't warn about a live capture format other than libpcap format if
you're not capturing to a file.
Do warn about a maximum capture file specification if you're not
capturing to a file.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@17456 f5534014-38df-0310-8fa8-9805f1628bb7
|
|
capture file.
We don't support saving live captures in any format other than libpcap
format (and probably don't want to - we really want to avoid using
Wiretap in that case, as it requires us to Wiretapify captured packets,
which adds extra processing to the capture path); reject attempts to do
that.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@17436 f5534014-38df-0310-8fa8-9805f1628bb7
|
|
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@17397 f5534014-38df-0310-8fa8-9805f1628bb7
|
|
dumpcap in addition to the things already done now
various dumpcap related code cleanup: mainly #include's and capture engine related stuff
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@17327 f5534014-38df-0310-8fa8-9805f1628bb7
|
|
status return values (0,1 or 2).
This way makes it much easier to debug, e.g. to set a common breakpoint if a command line parameter fails.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@17240 f5534014-38df-0310-8fa8-9805f1628bb7
|
|
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@17207 f5534014-38df-0310-8fa8-9805f1628bb7
|
|
in epan/privileges.c.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@17181 f5534014-38df-0310-8fa8-9805f1628bb7
|
|
(e.g., set-UID or set-GID), and don't load user plugs if it is.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@17174 f5534014-38df-0310-8fa8-9805f1628bb7
|
|
nothing if no coloring rule matched or none was set)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@17068 f5534014-38df-0310-8fa8-9805f1628bb7
|
|
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@17012 f5534014-38df-0310-8fa8-9805f1628bb7
|
|
fix -F command option handling (output list of available formats if missing of invalid)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@17011 f5534014-38df-0310-8fa8-9805f1628bb7
|
|
can be used by dumpcap (capture_loop.c) as well
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@16972 f5534014-38df-0310-8fa8-9805f1628bb7
|
|
tethereal internally converted the stdout capture filename "-" into "" which doesn't make any real sense and only complicated things.
To make things even more confusing, wiretap expected "" for dump output and "-" for offline reading ...
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@16962 f5534014-38df-0310-8fa8-9805f1628bb7
|
|
non-human-readable and non-machine-readable garbage from that
combination.
Use an exit code of 1 for command-line argument syntax errors in some
more cases.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@16961 f5534014-38df-0310-8fa8-9805f1628bb7
|
|
errors.
Display output errors with either 'the file "XXX"' or 'the standard
output".
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@16943 f5534014-38df-0310-8fa8-9805f1628bb7
|
|
pipe"; there's not much point in writing to the standard output if
you're *not* writing to a pipe, but....
"-b" doesn't necessarily imply a ring buffer - you can just request that
Tethereal keep switching files forever.
Standardize on an exit status of 1 for all those errors (there's a
sort-of convention, adhered to by many apps, that an exit status of 1
means a command-line argument error (as in "illegal flag" or "you
combined two flags that don't make sense together") and an exit status
of 2 is for other "run-time" errors.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@16942 f5534014-38df-0310-8fa8-9805f1628bb7
|
|
version/usage messages.
Put newlines at the end of various version strings.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@16870 f5534014-38df-0310-8fa8-9805f1628bb7
|
|
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@16819 f5534014-38df-0310-8fa8-9805f1628bb7
|
|
warnings.
Include "wiretap/libpcap.h" in "capture_loop.h", to get its declarations
of data structures for headers in libpcap files. This lets us remove
the includes of "wiretap/libpcap.h from files including
"capture_loop.h".
Make "log_func_ignore()" in "tethereal.c" static, and declare some of
its arguments unused. Also get rid of an unused variable.
Include <pcap.h> before including "wiretap/wtap-capture.h", to declare
"struct pcap_pkthdr".
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@16791 f5534014-38df-0310-8fa8-9805f1628bb7
|
|
remove a lot of redundant code from tethereal and use (move) stuff from capture_loop.c instead.
concentrate common capture related code in capture_opts.c, e.g. trying to find the right interface to capture from (command line option, preference, first usable) instead of duplicating this code over several files.
remove redundant code from dumpcap.c
this also implements command line option -D (and indexed interfaces at -i) for Ethereal and Dumpcap (as we have it in Tethereal already for a while)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@16787 f5534014-38df-0310-8fa8-9805f1628bb7
|
|
this way, the capture prefix will "logically" group the files together and file browsers will also group them
we may want to move the files into a subdir capture later
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@16691 f5534014-38df-0310-8fa8-9805f1628bb7
|
|
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@16688 f5534014-38df-0310-8fa8-9805f1628bb7
|
|
'cmdarg_err("', this is:
a) smaller
b) makes it possible to use some functions for Ethereal too
c) is the wrong name now, as some outputs are not command line related :-(
use capture_opts_trim()
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@16685 f5534014-38df-0310-8fa8-9805f1628bb7
|
|
character :-)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@16642 f5534014-38df-0310-8fa8-9805f1628bb7
|
|
made the CaptureSetup wiki page more prominent
added some "headings" so some of the help subtopics are easier for "human grep" IMHO
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@16592 f5534014-38df-0310-8fa8-9805f1628bb7
|
|
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@16542 f5534014-38df-0310-8fa8-9805f1628bb7
|
|
necessary there.
Add a "cmdarg_err()" routine to report command-line option errors; it
creates a console if necessary, and prints the command name and the
trailing newline. Also add "cmdarg_err_cont()", which also creates a
console if necessary, and prints a trailing newline but no command name;
it's used to continue the message. Use those, rather than
"g_warning()", for errors.
That means that we no longer need to pass the command name to various
command-line argument parsing routines.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@16526 f5534014-38df-0310-8fa8-9805f1628bb7
|
|
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@16407 f5534014-38df-0310-8fa8-9805f1628bb7
|
|
necessary for the switch to GTK 2.6 (at least on WIN32).
to do this, I've added file_util.h to wiretap (would file_compat.h be a better name?), and provide compat_macros like eth_open() instead of open(). While at it, move other file related things there, like #include <io.h>, definition of O_BINARY and alike, so it's all in one place.
deleted related things from config.h.win32
As of these massive changes, I'm almost certain that this will break the Unix build. I'll keep an eye on the buildbot so hopefully everything is working again soon.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@16403 f5534014-38df-0310-8fa8-9805f1628bb7
|
|
remove Byte(s) from the dropdown list of filesizes, this doesn't make sense
replace 1000 with 1024, as all (modern?) file managers are based on 1024 bytes for a kilobyte (the old KB vs. KiB controversy)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@16149 f5534014-38df-0310-8fa8-9805f1628bb7
|
|
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@16137 f5534014-38df-0310-8fa8-9805f1628bb7
|
|
problems, and use the first routine in it in multiple places.
Get rid of DISSECTOR_SUPPORT_INCLUDES - just add its contents to
ETHEREAL_COMMON_INCLUDES.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@16109 f5534014-38df-0310-8fa8-9805f1628bb7
|
|
Windows, and add the URL for the CaptureSetup page to the Tethereal
error.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@16103 f5534014-38df-0310-8fa8-9805f1628bb7
|
|
libpcap callback routine (if it's not getting defined, <pcap.h> doesn't
work).
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15952 f5534014-38df-0310-8fa8-9805f1628bb7
|
|
a capture device open fails.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15951 f5534014-38df-0310-8fa8-9805f1628bb7
|
|
don't do this check in Ethereal either and we will recognize problems at next write anyway ...
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15805 f5534014-38df-0310-8fa8-9805f1628bb7
|
|
has a checkbox "Compress with gzip"
currently limited to Ethereal and all the variants of libpcap filetypes only.
We might want to add output compression support to the other tools as well (tethereal, mergecap, ...).
We might also want to add support for the other filetypes, but this is only possible if the filetype functions doesn't use special output operations like fseek.
One bug is still left: if the input and output filetypes while saving are the same, Ethereal currently optimizes this by simply copy the binary file instead of using wiretap (so it will be faster but it will ignore the compress setting).
Don't know a good workaround for this, as I don't know a way to find out if the input file is currently compressed or not. One idea might be to use a heuristic on the filesize (compared to the packet size summmary). Another workaround I see is to remove this optimization, which is of course not the way I like to do it ...
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15804 f5534014-38df-0310-8fa8-9805f1628bb7
|
|
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15676 f5534014-38df-0310-8fa8-9805f1628bb7
|
|
we are.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15675 f5534014-38df-0310-8fa8-9805f1628bb7
|
|
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15637 f5534014-38df-0310-8fa8-9805f1628bb7
|
|
lines.
Clean up indentation.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15569 f5534014-38df-0310-8fa8-9805f1628bb7
|
|
- automatic adjustment depending on file format
- manual adjustment through menu items
save the setting in the recent file
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15534 f5534014-38df-0310-8fa8-9805f1628bb7
|
|
I've done more than a day to change the timestamp resolution from microseconds to nanoseconds. As I really don't want to loose those changes, I'm going to check in the changes I've done so far. Hopefully someone else will give me a helping hand with the things left ...
What's done: I've changed the timestamp resolution from usec to nsec in almost any place in the sources. I've changed parts of the implementation in nstime.s/.h and a lot of places elsewhere.
As I don't understand the editcap source (well, I'm maybe just too tired right now), hopefully someone else might be able to fix this soon.
Doing all those changes, we get native nanosecond timestamp resolution in Ethereal. After fixing all the remaining issues, I'll take a look how to display this in a convenient way...
As I've also changed the wiretap timestamp resolution from usec to nsec we might want to change the wiretap version number...
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15520 f5534014-38df-0310-8fa8-9805f1628bb7
|
|
implementing the "-z" command-line arguments, it doesn't deal with *all*
issues for stats.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15483 f5534014-38df-0310-8fa8-9805f1628bb7
|
|
the length locally. within cf_read().
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15454 f5534014-38df-0310-8fa8-9805f1628bb7
|
|
(so if the file's gzipped, it's *NOT* the size of the file after
uncompressing), and an approximation of the amount of that data read
sequentially so far.
Use those for various progress bars and the like.
Make the fstat() in the Ascend trace reader directly use wth->fd, as
it's inside Wiretap; that gets rid of the last caller of wtap_fd() (as
we're no longer directly using fstat() or lseek() in Ethereal), so get
rid of wtap_fd().
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15437 f5534014-38df-0310-8fa8-9805f1628bb7
|