Commit Graph

128 Commits

Author SHA1 Message Date
Jeff Morriss 3551a86c36 We always HAVE_CONFIG_H so don't bother checking whether we have it or not.
svn path=/trunk/; revision=45015
2012-09-20 01:29:52 +00:00
Irene Rüngeler bb1e018dc7 Fix for bug #7634. Print 'unspecified' in case a string is NULL.
svn path=/trunk/; revision=44512
2012-08-15 08:08:17 +00:00
Jakub Zawadzki bf81b42e1e Update Free Software Foundation address.
(COPYING will be updated in next commit)

svn path=/trunk/; revision=43536
2012-06-28 22:56:06 +00:00
ruengeler ea68381088 Remove lines that are not needed.
svn path=/trunk/; revision=42208
2012-04-23 13:47:45 +00:00
ruengeler 0819722ad8 Fix bug #7178 reported by aparan
svn path=/trunk/; revision=42206
2012-04-23 12:34:16 +00:00
Guy Harris fa64659e93 Closing a capture file has nothing to do with the list of interfaces on
which to do a live capture; don't clear the latter list when closing the
capture file.

collect_ifaces() should clear out the existing list of interfaces before
filling that list up with the interfaces selected by the user.  In
addition, when it frees up interfaces in that list, it should free up
the strings attached to those interfaces.

svn path=/trunk/; revision=41517
2012-03-13 03:48:27 +00:00
Guy Harris 3af7f28931 capture_opts_add_iface_opt() is not used outside capture_opts.c; make it
static.

svn path=/trunk/; revision=41494
2012-03-12 02:53:21 +00:00
Guy Harris 6f3ee54d62 Add a comment to indicate what collect_ifaces() does.
svn path=/trunk/; revision=41490
2012-03-11 20:01:11 +00:00
Guy Harris 1a5e1acdf3 Actually, you only have monitor mode support if you have pcap_create() -
without pcap_create() and pcap_activate() you don't have any API to turn
it on.

svn path=/trunk/; revision=40725
2012-01-25 19:40:22 +00:00
Jeff Morriss 91b873184f monitor_mode_enabled is only available on WIN32 or if we HAVE_PCAP_CREATE.
svn path=/trunk/; revision=40717
2012-01-25 14:29:09 +00:00
Michael Tüxen 14b1a44c0f Third try. This time pipes and stdin are supported and the
test scripts are passed.

Use a global list containing all interfaces and only change
properties of the entries when changes are made in the GUI.
Do not misuse the list of interfaces specified on the command
line anymore.

This patch does not provide any new functionality, it just
provides the base for future extensions like removing
remote interface, mulitple airpcap devices and multiple
pipes.

This patch was provided by Irene Ruengeler.

svn path=/trunk/; revision=40715
2012-01-25 13:04:32 +00:00
Michael Tüxen 4fece25e7f We need a 3rd try. (After learning how to run the testuite on Windows locally).
svn path=/trunk/; revision=40695
2012-01-24 17:12:56 +00:00
Michael Tüxen 08d6785412 Second try. This time pipes and stdin are supported.
Use a global list containing all interfaces and only change
properties of the entries when changes are made in the GUI.
Do not misuse the list of interfaces specified on the command
line anymore.

This patch does not provide any new functionality, it just
provides the base for future extensions like removing
remote interface, mulitple airpcap devices and multiple
pipes.

This patch was provided by Irene Ruengeler.


svn path=/trunk/; revision=40693
2012-01-24 16:05:26 +00:00
Guy Harris 3864d5d19d Add an additional DONT_HAVE_PCAP return value from get_interface_list()
and capture_interface_list().  Return it if, on Windows, we ask for the
interface list but don't have WinPcap installed.  Handle it like
CANT_GET_INTERFACE_LIST.

svn path=/trunk/; revision=40334
2011-12-29 22:49:49 +00:00
Michael Tüxen c219f2eea5 Back out infrastructure change. We missed supporting
stdin and pipes.




svn path=/trunk/; revision=39498
2011-10-20 19:44:40 +00:00
Michael Tüxen 95ae2fe13a Use a global list containing all interfaces and only change
properties of the entries when changes are made in the GUI.
Do not misuse the list of interfaces specified on the command
line anymore.

This patch does not provide any new functionality, it just
provides the base for future extensions like removing
remote interface, mulitple airpcap devices and multiple
pipes.

This patch was provided by Irene Ruengeler.

svn path=/trunk/; revision=39495
2011-10-20 18:17:54 +00:00
Gerald Combs db240c2b5e Replace "-Q" with "WIRESHARK_QUIT_AFTER_CAPTURE" as discussed in bug 6256.
svn path=/trunk/; revision=38784
2011-08-29 21:16:29 +00:00
Michael Tüxen f98587d686 Undo the checking of command line interfaces. It might the a pipe...
svn path=/trunk/; revision=38146
2011-07-21 17:30:42 +00:00
Michael Tüxen 91df20357a Make sure that the interfaces listed in ifaces really exist.
Some protection code in capture / options.
Obtained from Irene Ruengeler.


svn path=/trunk/; revision=38142
2011-07-21 15:23:46 +00:00
Gerald Combs 8cbaab380e Having a non-NULL capture_opts->save_file might make us crash less.
svn path=/trunk/; revision=37983
2011-07-11 22:51:46 +00:00
Gerald Combs 5467d67f2a In version_info.c, assume we always have the "matches" operator. In
capture_opts.c, assume our output filename has been passed through
arg_list_utf_16to8().

svn path=/trunk/; revision=37974
2011-07-11 19:15:57 +00:00
Guy Harris 4bdb1926c5 Oops, indented one of the "Promiscuous" ones.
svn path=/trunk/; revision=37850
2011-06-30 23:34:53 +00:00
Guy Harris 88f7858de3 Line up the colons.
svn path=/trunk/; revision=37849
2011-06-30 22:41:54 +00:00
Guy Harris bf89288f87 It's not made from semolina. :-)
svn path=/trunk/; revision=37848
2011-06-30 22:21:16 +00:00
Michael Tüxen 185305aea6 Cleanup.
svn path=/trunk/; revision=37840
2011-06-30 06:31:52 +00:00
Michael Tüxen 52abc59011 Code cleanup.
svn path=/trunk/; revision=37820
2011-06-28 16:57:42 +00:00
Michael Tüxen 421dafd2de Get rid of old non-interface specific settings which are now interface
specifc. This finalizes the change of the infrastructure.
This patch is based on work by Irene Ruengeler.

svn path=/trunk/; revision=37794
2011-06-27 00:09:03 +00:00
Gerald Combs 8d88f3a790 Make pcap-ng the default. Add a compile-time option to prefer pcap-ng or
pcap.  Add a "-P" capture option which tries to use pcap instead of
pcap-ng ("-P" seemed to be the best option but we may want to use a
different letter).

Update the documentation and release notes.

svn path=/trunk/; revision=37696
2011-06-17 17:52:31 +00:00
Michael Tüxen 29c8afa6d3 Really print the rpcap username when logging, not
the rpcap password.
This only affects remote capturing.

svn path=/trunk/; revision=37681
2011-06-16 07:33:24 +00:00
Michael Tüxen 8f8f0e9ad6 Get rid of has_cfilter to simplify the handling of multiple interfaces.
svn path=/trunk/; revision=37478
2011-05-31 14:49:21 +00:00
Michael Tüxen d37d757dbc It is not an error (anymore) to specify multiple capture filters.
This was
wireshark -i lo0 -f sctp -i en0 -f udp -k
will work.

svn path=/trunk/; revision=37287
2011-05-19 11:58:18 +00:00
Michael Tüxen 70ae440e15 Make remote capturing settings a per interface thing. You can now
configure that you want to capture on multiple remote interfaces
on mulitple hosts.
Improve some #ifdef mess in dumpcap.

svn path=/trunk/; revision=37178
2011-05-16 15:19:54 +00:00
Michael Tüxen 122452f864 Make pcap samping a per interface setting.
Use consistent naming of variables on capture_options.
Make pcap sampling independent of remote capturing, since
it seems to work local pcap devices using winpcap (at
least that is what the documentation says).

svn path=/trunk/; revision=37176
2011-05-16 14:12:35 +00:00
Michael Tüxen 448fdb60b3 * Fix a bug when printing a pointer.
* Remove number_of_ifaces, since ifaces->len can be used instead.

svn path=/trunk/; revision=37174
2011-05-16 00:55:04 +00:00
Michael Tüxen cfe3d2d0da Get -L and -d working with multiple interface. Internally get some functions
using the array of interface data.
Improve output of -L by printing the interface name.

svn path=/trunk/; revision=37120
2011-05-13 11:28:51 +00:00
Michael Tüxen a80b7e5fea Use the same default value for the snaplen in the new array as in the
old way.

svn path=/trunk/; revision=37113
2011-05-13 06:04:28 +00:00
Michael Tüxen 2d6cd58f91 Add support for handling multiple interfaces as command line
parameters. An array of interface specific data is handled
in addition to the current way.
This change should not have any effect right now, it will
be used by dumpcap when supporting multiple interfaces
(and tshark/wireshark... in the future).


svn path=/trunk/; revision=37082
2011-05-12 16:54:16 +00:00
Michael Tüxen 93377f5236 Another whitespace cleanup.
svn path=/trunk/; revision=37076
2011-05-12 12:06:19 +00:00
Michael Tüxen 4b303018d1 Clean up some indentation. A purely whitespace change.
svn path=/trunk/; revision=37073
2011-05-12 10:58:14 +00:00
Guy Harris fb3f152076 Back out Jeff Morris's change to make the autostop file size 64-bit - it
didn't change the GUI code for setting the autostop file size, and that
broke the build.

svn path=/trunk/; revision=36552
2011-04-11 01:30:36 +00:00
Guy Harris 4ad4d3e678 Jeff Morris's change to make the autostop file size 64-bit. Fixes bug
5691.

svn path=/trunk/; revision=36551
2011-04-11 00:01:08 +00:00
Guy Harris 4fdcc5c180 Rename ws_stat to ws_stat64, and make it take a pointer to a ws_statb64
as an argument, along the lines of ws_fstat64, and, on Windows, make it
use _wstati64, to handle 64-bit file sizes.

svn path=/trunk/; revision=36547
2011-04-10 20:59:10 +00:00
Chris Maynard 42d40ee494 Use fprintf_stderr() instead of printf() so "wireshark -D" works (on Windows).
svn path=/trunk/; revision=36387
2011-03-28 22:10:41 +00:00
Michael Tüxen 5da016099a Make HAVE_PCAP_REMOTE and HAVE_PCAP_SETSAMPLING independent
as in other places of the code. Such that this is consistently
used. While there, clean up some whitespaces.

This fix was provided by Irene Ruengeler which testing
remote capturing (with multiple interfaces).

svn path=/trunk/; revision=36112
2011-03-01 17:29:09 +00:00
Stephen Fisher 390927ce12 Follow up to rev 34073: Since "-b files:0" is no longer necessary to
override the default of turning on a multiple file ring buffer, require
a positive integer to be specified for the files value.


svn path=/trunk/; revision=34082
2010-09-08 18:47:14 +00:00
Sake Blok f17c5ac01f As mentioned on the users-mailinglist[1], it could be useful to have groups read access to the ringbuffer that dumpcap creates. That way, a group of people can access the capture files without having to use root access.
[1]  http://www.wireshark.org/lists/wireshark-users/201008/msg00235.html

svn path=/trunk/; revision=33978
2010-08-28 11:05:51 +00:00
Gerald Combs 8598c522b2 Set RINGBUFFER_MAX_NUM_FILES to 100000. Use it to generate file names.
Add RINGBUFFER_WARN_NUM_FILES and use it to print a warning. Print
warnings when we change the number of ringbuffer files.

svn path=/trunk/; revision=32998
2010-05-27 18:00:46 +00:00
Guy Harris 80fda10f18 Make -q not a capture option again - it's used by tshark even when not
capturing, and thus even when we build without pcap.

svn path=/trunk/; revision=32988
2010-05-27 01:13:49 +00:00
Guy Harris 7a630c61a1 Add a -q flag to dumpcap, to squelch its reporting of the packet count,
and add support for SIGINFO, so, if your OS supports SIGINFO, you can
get the packet count by typing ^T.

svn path=/trunk/; revision=32958
2010-05-26 00:19:27 +00:00
Guy Harris 9307251bb8 Um, no, the problem with the Leopard x86 build is that we first do a
build without libpcap, to make sure that works, and then do a build with
libpcap, to put into a binary release.  It's the former that's failing;
I'll back out the previous change and then work on that.

svn path=/trunk/; revision=32801
2010-05-14 00:49:28 +00:00