Commit Graph

21 Commits

Author SHA1 Message Date
Ulf Lamping e4e8df5e1d remove all calls to exit() from the capture_opts.c and replace them by 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-10 02:05:30 +00:00
Ulf Lamping c98e18c555 some improvements in the console output handling
svn path=/trunk/; revision=17238
2006-02-10 01:18:24 +00:00
Ulf Lamping 0ce310bd86 minor changes to the usage output
svn path=/trunk/; revision=17009
2006-01-12 00:09:15 +00:00
Ulf Lamping 4f3c493e1d cleanup of exit_main() declaration
svn path=/trunk/; revision=16960
2006-01-05 22:27:25 +00:00
Jörg Mayer 056c408531 __attribute__ noreturn can only be used in function declations.
svn path=/trunk/; revision=16938
2006-01-03 23:43:24 +00:00
Ulf Lamping a2fe0e2b0a add the GCC specific attribute "noreturn" to exit_main()
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-31 10:51:15 +00:00
Ulf Lamping d5265fd7a4 From Jaap Keuter:
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-31 10:22:57 +00:00
Jörg Mayer b06bd208d0 warning: function declaration isn't a prototype
svn path=/trunk/; revision=16852
2005-12-18 23:18:06 +00:00
Ulf Lamping fb6554117f some minor fixes: logging and comments fixed
svn path=/trunk/; revision=16819
2005-12-16 07:43:24 +00:00
Ulf Lamping 27b13556ec use capture_opts_trim_iface() instead of duplicated code
various minor code cleanup

svn path=/trunk/; revision=16805
2005-12-15 00:45:29 +00:00
Ulf Lamping 79217bab2e HUGE STEP (hopefully toward the right direction):
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-13 22:48:58 +00:00
Ulf Lamping 7e3a24418c rename pcap-....c/.h files to capture-pcap-....c/.h
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-06 00:07:13 +00:00
Ulf Lamping 792584c211 no more usage of Ethereal.lib in dumpcap any longer :-)
use capture_opts_trim()
output of command line usage and version "enhanced"

svn path=/trunk/; revision=16684
2005-12-05 21:28:34 +00:00
Jörg Mayer d8c09f7f2e We need AF_INET6 on linux, so include netdb.h if available.
Add dumpcap to svn:ignore.


svn path=/trunk/; revision=16676
2005-12-04 23:50:57 +00:00
Ulf Lamping e829856c0c move the complete functionality of the capture info dialog from 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-04 02:04:18 +00:00
Ulf Lamping f856dbafa8 split some parts of the packet counting functions into their own files capture_info(.c/.h),
so we can use it from the main program

svn path=/trunk/; revision=16668
2005-12-03 22:38:50 +00:00
Ulf Lamping d2a024af60 split capture.h into capture.h, capture_loop.h and capture_opts.h and place the parts into the corresponding files
svn path=/trunk/; revision=16664
2005-12-03 19:32:54 +00:00
Ulf Lamping a11d07e3f4 fix OPTINIT string, help output and add an exit_main function
svn path=/trunk/; revision=16643
2005-12-01 20:19:30 +00:00
Ulf Lamping 61dc6ad226 dumpcap.c doesn't need to link with file.c!
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-28 20:51:27 +00:00
Guy Harris 4e4c2942e7 Add support for building dumpcap, and fix dumpcap to build on UN*X.
svn path=/trunk/; revision=16618
2005-11-28 11:40:28 +00:00
Ulf Lamping fc61a1de25 first steps towards a separated capture tool, working title "dumpcap"
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
2005-11-28 08:54:52 +00:00