Commit graph

281 commits

Author SHA1 Message Date
Bill Meier
c78221d4ce Rename g_resolv_flags --> gbl_resolv_flags; Also: cleanup some whitespace & indentation.
svn path=/trunk/; revision=34487
2010-10-12 13:15:08 +00:00
Stig Bjørlykke
ac7c3787b5 Explain BPF in the tooltips for "Compile BPF".
svn path=/trunk/; revision=34363
2010-10-04 11:04:13 +00:00
Sake Blok
d2ea494622 Add a cast to make the OSX-PPC buildbot happy.
Removed debugging commenting-out that slipped through...


svn path=/trunk/; revision=34353
2010-10-03 19:28:05 +00:00
Sake Blok
f3e94f6753 Retry of SVN 34338, now tested on my WinXP dev VM:
Use pcap_open_dead instead of pcap_create for the compile BPF button. 



svn path=/trunk/; revision=34340
2010-10-03 12:04:18 +00:00
Sake Blok
a301593846 Reverting SVN 34338, looks like libpcap and winpcap are more different than I thought. I might have to set up a local windows build system again :(
svn path=/trunk/; revision=34339
2010-10-02 21:15:20 +00:00
Sake Blok
1e01a2889b Use pcap_open_dead instead of pcap_create for the compile BPF button. This makes the button available on systems which do not have libraries that have pcap_create (like Windows for example)
Change a couple of values into defined constants.


svn path=/trunk/; revision=34338
2010-10-02 20:26:09 +00:00
Bill Meier
b24ef36cc0 Fix a compilation error
svn path=/trunk/; revision=34335
2010-10-02 15:15:40 +00:00
Sake Blok
3664650ead Make capture filter syntax checking independent of pcap_create by using pcap_compile_nopcap
svn path=/trunk/; revision=34333
2010-10-02 14:47:41 +00:00
Sake Blok
2ca8b0aab7 Check for HAVE_PCAP_CREATE in a few more spots to fix building on systems with a pcap-library that does not support pcap_create
svn path=/trunk/; revision=34331
2010-10-02 12:24:28 +00:00
Sake Blok
9cde3f3f20 Add syntax checking to the capture filter text entry in the capture setup screen. Since capture filters are DLT dependent, it is not useful to do syntax checking in the capture filter dialog (unless we check each filter against every possible DLT)
svn path=/trunk/; revision=34330
2010-10-02 11:29:26 +00:00
Sake Blok
34fdc9c7a9 When a user selected a non-default DLT for the interface, change the DLT to the user-selected DLT before compiling the BPF code.
svn path=/trunk/; revision=34329
2010-10-02 11:07:50 +00:00
Sake Blok
98c8dc0319 pcap_activate needs to be called to set the DLT of the selected interface, otherwise the BPF filter is compiled with a DLT of NULL, which will make a filter like "ether host 00:00:00:00:00:00" fail to compile.
svn path=/trunk/; revision=34328
2010-10-02 10:28:18 +00:00
Jeff Morriss
b4c2ed1b86 Remove some unnecessary includes: a lot of things don't need globals.h and register.h
svn path=/trunk/; revision=34017
2010-08-30 16:10:01 +00:00
Bill Meier
66d340863f (Minor) Cleanup signal callbak signatures and related:
- Don't mark callback arg as _U_ if actually used (and vice-versa);
- Use Null as user_data in g_signal_callback if unused in callback;
- Use correct signature for certain event callbacks.

svn path=/trunk/; revision=33895
2010-08-23 19:29:08 +00:00
Bill Meier
fa5fecf047 Change ws_combo_box... to use a tree-store instead of a list-store;
This allows the dispay of the ws_combo_box choices as a tree.
Also: Rename ws_combo_box_append_text_and_pointer_with_sensitivity() to
             ws_combo_box_append_text_and_pointer_full().

svn path=/trunk/; revision=33538
2010-07-15 15:05:39 +00:00
Bill Meier
b139720101 Whitespace cleanup: consistent indentation; tabs==>spaces; etc
svn path=/trunk/; revision=33498
2010-07-13 01:38:54 +00:00
Bill Meier
c76f89bf35 GtkOptionMenu ==> GtkComboBox
svn path=/trunk/; revision=33497
2010-07-13 00:46:00 +00:00
Guy Harris
ba77133cbb I added PCAP_NETMASK_UNKNOWN in libpcap 1.1.0; it's not present in
1.0.0.  You're supposed to just use 0 in releases prior to 1.1.0 - in
1.1.0 and later, a netmask of PCAP_NETMASK_UNKNOWN will cause errors if
you try to use "ip broadcast" (as you need the netmask to check for
local broadcasts), but, prior to that, the netmask value is blindly used
even if the filter will always fail.

svn path=/trunk/; revision=33461
2010-07-07 01:55:34 +00:00
Jaap Keuter
b87d82d0b4 Add button to look at compiled BPF.
This allows to test and experiment with BPF expressions, before launching
the capture itself. 

svn path=/trunk/; revision=33459
2010-07-06 21:02:19 +00:00
Guy Harris
342d436705 If we don't know whether a device supports monitor mode, turn off
monitor mode in the checkbox before making the checkbox insensitive.

svn path=/trunk/; revision=32829
2010-05-16 08:14:29 +00:00
Guy Harris
e1e576c11b Support monitor mode in the capture preferences.
Use prefs_is_capture_device_hidden() to find out whether a device should
be hidden - don't scan the list of hidden devices ourselves.

svn path=/trunk/; revision=32820
2010-05-15 19:38:13 +00:00
Guy Harris
a41f89c8f5 Fix the tooltip for the "monitor mode" checkbox.
Speak of network adapters rather than network cards (most personal
computers these days have no network cards - the network adapters are on
the motherboard).

svn path=/trunk/; revision=32810
2010-05-14 17:36:17 +00:00
Guy Harris
0ad496957f Fix compilation when we don't have pcap_create().
svn path=/trunk/; revision=32805
2010-05-14 07:48:50 +00:00
Guy Harris
6aac80597f Support monitor mode from the GUI.
svn path=/trunk/; revision=32804
2010-05-14 05:15:40 +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
Guy Harris
0e54136213 See whether the Leopard x86 buildbot is upset because of the name
if_capabilities_t - it doesn't fail on Snow Leopard, even if I undefine
HAVE_PCAP_CREATE, and doesn't fail on the Leopard PPC buildbot, either.

svn path=/trunk/; revision=32799
2010-05-14 00:10:15 +00:00
Guy Harris
1c18115bd3 Fetch an indication of whether the interface supports capturing in
monitor mode at the same time that we fetch its list of link-layer
types.  Support fetching that list in monitor mode, as the list may be
different in regular and monitor mode.  If the interface supports
monitor mode, when printing the list of link-layer types, indicate
whether they're fetched in monitor mode or not, as tcpdump 4.1.x does.

svn path=/trunk/; revision=32789
2010-05-13 17:37:39 +00:00
Guy Harris
7dbbb8c572 Just check for pcap_create(); it first appeared in libpcap 1.0.0, and
pcap_set_buffer_size() did as well, so there aren't any libpcap releases
with pcap_create() but not pcap_set_buffer_size().

Only do one check for pcap_create.

svn path=/trunk/; revision=32695
2010-05-06 23:33:41 +00:00
Anders Broman
f9981411f1 Checking in Stigs changes from
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=475
BUT not activating the check for 
pcap_create()
pcap_set_buffer_size()
This should make it possible to build with support for setting the buffersize if not capturing 802.11 traffic.

The code for handling the 'B' option should be OK in any case.

svn path=/trunk/; revision=32688
2010-05-06 18:34:30 +00:00
Guy Harris
167ab3a98c In Wireshark and TShark, run dumpcap to get interface lists and lists of
link-layer header types for interfaces; if special privileges are
necessary to open capture devices, Wireshark and TShark shouldn't have
those privileges, but dumpcap should.

svn path=/trunk/; revision=32104
2010-03-04 01:12:04 +00:00
Bill Meier
02296387b0 Rename a number of variables for clarity.
svn path=/trunk/; revision=32007
2010-02-25 20:06:16 +00:00
Stig Bjørlykke
60ffce32e7 Check for valid linktype_history in capture_get_linktype().
svn path=/trunk/; revision=31438
2010-01-04 11:59:27 +00:00
Stig Bjørlykke
330a257c0a Set correct linktype when starting capture from the welcome page.
svn path=/trunk/; revision=31393
2009-12-30 19:21:21 +00:00
Anders Broman
7ce24f7744 Get rid of deprecated gtk_option_menu_new();
svn path=/trunk/; revision=29791
2009-09-08 13:49:19 +00:00
Bill Meier
1bc9f19f05 Add #include <stdio.h> in a few more places for Solaris.
svn path=/trunk/; revision=29577
2009-08-27 03:54:57 +00:00
Guy Harris
432cac16f3 "main_menu.[ch]" -> "menus.[ch]"; it handles not only the main menu, but
context menus.

Note why we have an empty hex dump pane context menu.

svn path=/trunk/; revision=28794
2009-06-21 19:16:37 +00:00
Stig Bjørlykke
a61e285004 Added a preference to capture in Pcap-NG from GUI.
svn path=/trunk/; revision=28740
2009-06-15 16:36:02 +00:00
Gerald Combs
0a069bc6a3 Migrate the Airpcap UI code from GtkCombos (deprecated) to GtkComboBoxes.
Consolidate some common code. Rename a bunch of variables. Remove some
unused code.

Fix an offset flag bug in airpcap_loader.c.

This had to be merged by hand with r28349. Hopefully none of those
changes were clobbered.

svn path=/trunk/; revision=28350
2009-05-13 16:14:28 +00:00
Guy Harris
54c159cb41 Turn on -Wshorten-64-to-32 by default, and fix some issues that turned
up (99 44/100% of which were assignments of double-precision
floating-point constants to floats).  Hopefully this will catch at least
some P64 issues on UN*X.

svn path=/trunk/; revision=28108
2009-04-21 16:57:52 +00:00
Stig Bjørlykke
62f60df6b4 From Jakub Zawadzki (bug 3331):
g_free() is NULL safe, so we don't need check against it.

svn path=/trunk/; revision=27718
2009-03-13 22:06:48 +00:00
Stephen Fisher
3e60203474 Fix a few more problems found by checkAPIs.pl
svn path=/trunk/; revision=26887
2008-12-01 07:31:07 +00:00
Stig Bjørlykke
f9c07203cb Still support GTK 2.4.0. No separator in combo box for GTK 2.4.0 :(
svn path=/trunk/; revision=26748
2008-11-11 12:46:16 +00:00
Stig Bjørlykke
053dd12cbd Rewrote interface type option_menu to gtk_combo_box, this fixes the bug
showing the correct type on connect failure or cancel in the remote
interface dialog.

Added list of recent remote hosts to interface type combo box.
Save the recent remote hosts in the recent file.
Fixed some indents.

svn path=/trunk/; revision=26747
2008-11-11 11:37:53 +00:00
Stig Bjørlykke
0132b9a092 Save the remote interfaces list to be able to show the remote IP addresses
without fetching a new list each time the interface changes.

Catch the "activate" signal on the text boxes in the remote interfaces dialog.

svn path=/trunk/; revision=26727
2008-11-07 15:52:14 +00:00
Stig Bjørlykke
7d8a21da5a Initialize the interface type value key to fix updating the local interface
list when changing from remote to local interfaces.

svn path=/trunk/; revision=26720
2008-11-06 22:36:43 +00:00
Stig Bjørlykke
2e3656d31a Fixed a check button text.
svn path=/trunk/; revision=26709
2008-11-06 15:33:44 +00:00
Stig Bjørlykke
2207381990 Changes in the "Capture Options" window:
- Moved all RPCAP settings to a "Remote Settings" dialog
- Rearranged "Buffer size" and "Wireless Settings" on win32
- Fall back to local interfaces when error listing remote interfaces
- Fixed setting correct sampling type when reopening the capture dialog
- Aligned some widgets in the "Capture Options" frame 
- Added some tooltips

svn path=/trunk/; revision=26687
2008-11-04 18:50:34 +00:00
Stig Bjørlykke
32d411be1d Do not set buffer size for remote interfaces or when using default value.
Do not get link-layer for remote interfaces.

svn path=/trunk/; revision=26683
2008-11-03 21:38:53 +00:00
Stig Bjørlykke
1655ca17d0 Do not use functions for remote capture on local interfaces.
This makes it possible to compile with remote capture features on unix.

svn path=/trunk/; revision=26681
2008-11-03 20:04:01 +00:00
Stig Bjørlykke
32b542de4f Use invisible event boxes so the preferences looks good when using themes.
svn path=/trunk/; revision=26502
2008-10-20 19:18:12 +00:00