aboutsummaryrefslogtreecommitdiffstats
path: root/dumpcap.c
AgeCommit message (Collapse)AuthorFilesLines
2006-02-12Move create_tempfile() to tempfile.c out of util.c. This means dumpcapGuy Harris1-26/+0
no longer needs util.c, so it no longer includes routines that use host_ip_af(), so it no longer needs to define its own host_ip_af(). That also means dumpcap.c no longer needs to include <sys/socket.h>. svn path=/trunk/; revision=17278
2006-02-12freebsd needs to define AF_INET6, seems to need sys/socket.hUlf Lamping1-0/+4
svn path=/trunk/; revision=17269
2006-02-11the point of no return ...Ulf Lamping1-175/+16
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-5/+9
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-02-10some improvements in the console output handlingUlf Lamping1-17/+96
svn path=/trunk/; revision=17238
2006-01-12minor changes to the usage outputUlf Lamping1-4/+4
svn path=/trunk/; revision=17009
2006-01-05cleanup of exit_main() declarationUlf Lamping1-5/+6
svn path=/trunk/; revision=16960
2006-01-03__attribute__ noreturn can only be used in function declations.Jörg Mayer1-0/+1
svn path=/trunk/; revision=16938
2005-12-31add the GCC specific attribute "noreturn" to exit_main()Ulf Lamping1-5/+8
add an error message if no interfaces could be found (and mention that it might be a privilege problem) svn path=/trunk/; revision=16924
2005-12-31From Jaap Keuter:Ulf Lamping1-12/+14
Even though dumpcap isn't finished I would like this patch applied in order to: 1. remove some compiler warnings 2. avoid a seg fault when running dumpcap without parameters as normal user. svn path=/trunk/; revision=16922
2005-12-18warning: function declaration isn't a prototypeJörg Mayer1-1/+1
svn path=/trunk/; revision=16852
2005-12-16some minor fixes: logging and comments fixedUlf Lamping1-9/+16
svn path=/trunk/; revision=16819
2005-12-15use capture_opts_trim_iface() instead of duplicated codeUlf Lamping1-47/+69
various minor code cleanup svn path=/trunk/; revision=16805
2005-12-13HUGE STEP (hopefully toward the right direction):Ulf Lamping1-96/+20
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-06rename pcap-....c/.h files to capture-pcap-....c/.hUlf Lamping1-1/+1
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 svn path=/trunk/; revision=16691
2005-12-05no more usage of Ethereal.lib in dumpcap any longer :-)Ulf Lamping1-27/+61
use capture_opts_trim() output of command line usage and version "enhanced" svn path=/trunk/; revision=16684
2005-12-04We need AF_INET6 on linux, so include netdb.h if available.Jörg Mayer1-0/+4
Add dumpcap to svn:ignore. svn path=/trunk/; revision=16676
2005-12-04move the complete functionality of the capture info dialog from ↵Ulf Lamping1-33/+9
capture_loop.c to capture_info.c and call it from capture.c (instead of capture_loop.c). This way, the capture child don't need to now any of the packet_counter things (no epan/packet.h and all alike). Currently the capture_info code will always open another wiretap file instance to build it's own counter values. This isn't optimized for now (next step: use data from cf_continue_tail() somehow). svn path=/trunk/; revision=16669
2005-12-03split some parts of the packet counting functions into their own files ↵Ulf Lamping1-3/+4
capture_info(.c/.h), so we can use it from the main program svn path=/trunk/; revision=16668
2005-12-03split capture.h into capture.h, capture_loop.h and capture_opts.h and place ↵Ulf Lamping1-0/+1
the parts into the corresponding files svn path=/trunk/; revision=16664
2005-12-01fix OPTINIT string, help output and add an exit_main functionUlf Lamping1-37/+34
svn path=/trunk/; revision=16643
2005-11-28dumpcap.c doesn't need to link with file.c!Ulf Lamping1-84/+27
this fortunately removes *a lot* of dependencies and make the resulting binary a lot smaller (and hopefully faster to load :-) some more cleanup (like replacing // by /**/) svn path=/trunk/; revision=16620
2005-11-28Add support for building dumpcap, and fix dumpcap to build on UN*X.Guy Harris1-2/+1
svn path=/trunk/; revision=16618
2005-11-28first steps towards a separated capture tool, working title "dumpcap"Ulf Lamping1-0/+846
personal backup only, not meant for public testing! I've copied main.c into dumpcap.c and carved out all things not needed currently won't work as a command line tool, capture_loop.c wants an input pipe console output is also very ugly and the whole code needs a lot of further cleanup shouldn't break the unix build as I've only changed the nmake files so far, but who knows ... svn path=/trunk/; revision=16615