aboutsummaryrefslogtreecommitdiffstats
path: root/capture_opts.h
AgeCommit message (Collapse)AuthorFilesLines
2007-08-30Change the "--enable-setuid-install" option to install dumpcap and TSharkGerald Combs1-0/+4
setuid instead of Wireshark. Remove the "DANGEROUS" notices, but leave it disabled by default. Whine if the user runs Wireshark or TShark as root. Add a preference to disable the whining. Add a "setuid-root" script that can be used to switch dumpcap and TShark's setuid-ness on and off for development and testing. Update the release notes and README.packaging. svn path=/trunk/; revision=22733
2007-08-22gcc 4 doesn't like my macro for getting the interface description: it says ↵Jeff Morriss1-10/+2
there's an invalid lvalue in it. I don't see what's wrong with it, but replace the macro with a function. Also: don't include the .xpm files in gtk/main.c if we're building without PCAP (as they're not used in that configuration). svn path=/trunk/; revision=22588
2007-08-22Fix bug http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1757 :Jeff Morriss1-0/+14
Try to call get_interface_descriptive_name() as little as possible (storing the result in capture_opts) to avoid a performance hit during live capture (especially if you have lots of interfaces) and to avoid leaking memory. One issue with this is that capture_opts.c cannot (without adding significant dependencies) set the iface_descr so readers of that field (only gtk/main.c and tshark.c) use a macro to (set if not already set and) get the value of that field. svn path=/trunk/; revision=22587
2007-08-02Add a "-S" flag to dumpcap, which prints out interface statistics. UseGerald Combs1-0/+4
this in the GUI rather than calling pcap_stats() directly. This gets rid of the last pcap_open_live() call in the GUI code. Update README.packaging. svn path=/trunk/; revision=22443
2007-07-20Remove the "-I" flag from dumpcap, and add a "-M" flag used to specifyGerald Combs1-2/+2
that "-D" and "-L" should produce machine-readable output. Use this to move an indirect get_pcap_linktype() call from the GUI to dumpcap. svn path=/trunk/; revision=22367
2007-06-11One more step in privilege separation.Gerald Combs1-4/+4
Add a capture_interface_list(), which works similar to get_interface_list() except that it forks dumpcap instead of calling the pcap routines directly. Use it in the GUI. Add a "-I" flag to dumpcap, which prints out verbose interface information. Tested under Windows and Linux. svn path=/trunk/; revision=22071
2006-08-26Go back to setting the capture filter to an empty string when we start;Guy Harris1-38/+39
that obviates the need to check for a null capture filter string, and fixes bug 1055. Keep track of whether it was set from the command line, though, so we can catch attempts to set the filter more than once, and attempts to set it when we're not capturing. Clean up white space. svn path=/trunk/; revision=19047
2006-05-21name changeRonnie Sahlberg1-2/+2
svn path=/trunk/; revision=18197
2006-04-03In Tethereal, don't save to a temporary file if "-w" isn't specified,Guy Harris1-7/+8
even if doing a live capture; just print the packets without saving them. In dumpcap: default to the capturing the entire packet; don't do the "Press any key" stuff when debugging on UN*X; do console logging (to the standard error) even when we're running as the capture child (the sync pipe should only be the standard output, not the standard error). svn path=/trunk/; revision=17786
2006-02-11the point of no return ...Ulf Lamping1-1/+1
using dumpcap as the capture child for Ethereal. dumpcap is a plain console application now, even for Win32 (so no WinMain, create_console and special piping stuff reguired). The undocumented command line option -Z will switch dumpcap into "child mode", using binary instead of plain text output messages to communicate with a parent Ethereal. Ethereal's main.c no longer needs to distinguish between child mode or not, so some simplifying here. capture_sync.c has to call dumpcap in a "hidden window" mode using CreateProcess instead of spawnvp, otherwise an uggly console window would appear. The handles created by _pipe doesn't seem to be inheritable for this function, using CreatePipe instead. The file capture_loop.c is only needed by dumpcap, removed from Ethereal link objects. Some debugging aid added and other minor cleanup done. svn path=/trunk/; revision=17256
2006-02-10remove all calls to exit() from the capture_opts.c and replace them by ↵Ulf Lamping1-3/+3
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. svn path=/trunk/; revision=17240
2006-01-07move output_to_pipe flag from tethereal's loop_data into capture_opts, so it ↵Ulf Lamping1-0/+1
can be used by dumpcap (capture_loop.c) as well svn path=/trunk/; revision=16972
2005-12-18warning: function declaration isn't a prototypeJörg Mayer1-1/+1
svn path=/trunk/; revision=16852
2005-12-13HUGE STEP (hopefully toward the right direction):Ulf Lamping1-4/+19
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) svn path=/trunk/; revision=16787
2005-12-05add capture_opts_trim(), as this sequence is used three times now (will ↵Ulf Lamping1-0/+5
replace the other appearances later) ... svn path=/trunk/; revision=16683
2005-12-03split capture.h into capture.h, capture_loop.h and capture_opts.h and place ↵Ulf Lamping1-0/+112
the parts into the corresponding files svn path=/trunk/; revision=16664