Commit Graph

926 Commits

Author SHA1 Message Date
Guy Harris 8d56103f48 Don't include capture-related headers if we don't support capturing
network traffic.

svn path=/trunk/; revision=32802
2010-05-14 01:39:02 +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
Jeff Morriss 60b8391d5b Follow on to rev 32593: apparently delaying the start of resolv_update_cb() isn't always enough. Delaying it further is would require adding the function call to several cases of an already complicated if/then/else + #ifdef/#else, so instead just put in a NULL check before calling gdk_window_invalidate_rect().
svn path=/trunk/; revision=32743
2010-05-11 02:25:22 +00:00
Bill Meier 7e9418f687 Fix a gcc -Wshadow warning.
svn path=/trunk/; revision=32736
2010-05-10 16:39:53 +00:00
Guy Harris 547b9e48a2 The default capture buffer size is, in fact, *nominally* 1MB; however,
libpcap/WinPcap and the capture mechanism atop which they run might
either silently limit the buffer size to a smaller value or raise it to
a higher value - that's the part that's platform-dependent.

svn path=/trunk/; revision=32718
2010-05-08 00:39:07 +00:00
Guy Harris 0b62cc144e Don't define err_str twice if building on Win32 with AirPcap support.
svn path=/trunk/; revision=32717
2010-05-08 00:17:06 +00:00
Guy Harris 077ff72ac1 As with the list of data link types, so with the list of interfaces; move
the code to print the machine-readable format into dumpcap, and have the
code in capture_opts.c just print the human-readable format.

svn path=/trunk/; revision=32714
2010-05-07 19:24:32 +00:00
Guy Harris 13bf4a0c55 Add routines vfprintf_stderr() and fprintf_stderr() to print to the
standard error and, in Wireshark on Windows, create a console if
necessary.  Have the cmdarg_err routines use them.

Use *fprintf_stderr() to print the output of -L, rather than using
cmdarg_err_cont(), so that we don't get extra newlines in the output (it
should look similar to the output of tcpdump).

svn path=/trunk/; revision=32711
2010-05-07 08:40:02 +00:00
Guy Harris cc05b9250d For TShark and Wireshark, get the list of link-layer types for an
interface by running dumpcap, so that if you need privileges to open an
interface, and dumpcap has those privileges, neither TShark nor
Wireshark need them.

svn path=/trunk/; revision=32710
2010-05-07 08:06:25 +00:00
Guy Harris 1ec0105817 Add monitor mode support to Wireshark *on the command line*; support
through the GUI requires more work.

svn path=/trunk/; revision=32706
2010-05-07 01:55:13 +00:00
Guy Harris 4c5b8c5277 Instead, say that the default is platform-dependent.
svn path=/trunk/; revision=32701
2010-05-07 00:28:42 +00:00
Guy Harris 96f67d9517 Now that we support -B on various UN*X platforms as well as Windows, we
can no longer state what the default is (it's platform-dependent).

svn path=/trunk/; revision=32700
2010-05-07 00:16:52 +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
Stig Bjørlykke 54101a8630 Moved command line option for seconds type to -u.
Added this option to tshark.

svn path=/trunk/; revision=32685
2010-05-06 12:31:24 +00:00
Stig Bjørlykke 6efcb1adf0 Added an option to display seconds as hours, minutes and seconds
in the packet list, on this format: "1h 2m 3.456s".

svn path=/trunk/; revision=32683
2010-05-06 10:32:59 +00:00
Jeff Morriss 87b32b26eb Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4308 :
Make a function that checks if the user is running as root or if npf.sys isn't
loaded (on Windows) and call it *after* showing the main window so that the
popup (if any) shows up above the main window.

svn path=/trunk/; revision=32603
2010-04-29 19:30:54 +00:00
Jeff Morriss c9247a92f1 Delay starting the resolv_update_cb until the main window has been displayed
This avoids this error:

(lt-wireshark:16779): Gdk-CRITICAL **: gdk_window_invalidate_rect: assertion `window != NULL' failed

before the main window has been drawn if you've got a personal hosts file.

svn path=/trunk/; revision=32593
2010-04-29 00:09:01 +00:00
Stig Bjørlykke 32ce531601 Added Manual IP address resolve functions.
This can later be extended with ethernet and probably other addresses.

svn path=/trunk/; revision=32571
2010-04-27 06:51:16 +00:00
Gerald Combs cc5d7670bd Keep a copy of the interface description and capture filter around so that
we can use it in the main window title during and after capture. Add a
"-X" option for providing a description for stdin.

svn path=/trunk/; revision=32357
2010-04-01 21:55:01 +00:00
Bill Meier 538dd47d5d Fix various gcc -Wshadow warnings.
svn path=/trunk/; revision=31731
2010-01-29 19:09:01 +00:00
Bill Meier 7b01915b6b Fix various gcc -Wshadow warnings.
svn path=/trunk/; revision=31730
2010-01-29 16:13:26 +00:00
Anders Broman eef24f0765 From Jim Young:
Wireshark GUI not reporting filename after save of new capture file.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4406

svn path=/trunk/; revision=31587
2010-01-20 06:44:03 +00:00
Stig Bjørlykke ac458da257 Display the capture filter in the main window title when capturing.
svn path=/trunk/; revision=31512
2010-01-13 10:21:25 +00:00
Gerald Combs 6580e861df Rename splash_register_freq to info_update_freq. Use it to throttle name
resolution updates as well as splash screen updates.

svn path=/trunk/; revision=31351
2009-12-22 20:29:28 +00:00
Gerald Combs 4f30c2170e Change host_name_lookup_process to return TRUE if anything new has been
resolved since the last time it was called. Use this to redraw the packet
list and detail any time we have newly-resolved objects.

svn path=/trunk/; revision=31350
2009-12-22 20:01:06 +00:00
Stig Bjørlykke fe793ed781 Added Copy Profile functionality.
svn path=/trunk/; revision=31335
2009-12-21 12:32:31 +00:00
Gerald Combs 7871c54e99 Behave more gracefully if WinPcap isn't installed. Don't assert if
we call pcap_open or pcap_open_live when WinPcap isn't loaded - just
return NULL. Don't display the "NPF driver isn't running" dialog if
we're capturing from stdin or a file.

Fix a cut-and-paste error in capture_pcap_linktype_list.

svn path=/trunk/; revision=31275
2009-12-15 19:29:21 +00:00
Jaap Keuter 81b585cf8e From Valerio Messina:
As now, when Wireshark save capture files, it show "Loading" in status bar and
in the dialog box, warning many users of lost them packets. Saving work as expected.
Is simply a GUI use interaction problem.

svn path=/trunk/; revision=31269
2009-12-14 22:05:29 +00:00
Stig Bjørlykke 39f0b9efde Improved Apply/Prepare a filter from Packet List for custom columns:
- Add quotes for strings
- Use only protocol for protocol only columns

svn path=/trunk/; revision=31158
2009-12-03 14:01:18 +00:00
Stig Bjørlykke 2e06779073 Save preferences when adding and removing columns in the main window.
svn path=/trunk/; revision=31087
2009-11-26 09:11:55 +00:00
Jörg Mayer c34a88f0ae -G -> -J
-d -> -j
Update AUTHORS

svn path=/trunk/; revision=31037
2009-11-20 22:55:18 +00:00
Jörg Mayer 13a0a5edf9 Johanna Sochos <johanna.sochos@swissqual.com>
Add two new options to wireshark:
-G filter: Jump to the first frame matching filter
-d: make -G match the last frame matching filter

svn path=/trunk/; revision=31033
2009-11-20 18:52:01 +00:00
Stig Bjørlykke 542a34ced8 Implement new_packet_list_recreate(). This should be reimplemented to
avoid building a new table and redissecting all packets.

svn path=/trunk/; revision=31024
2009-11-19 21:11:41 +00:00
Stig Bjørlykke 9a7d0994d8 Add a custom column from the packet details popup menu.
This fixes bug 4246.

svn path=/trunk/; revision=31020
2009-11-19 18:22:26 +00:00
Stig Bjørlykke 7c5f1b80ac Introduce packet bytes bit view.
svn path=/trunk/; revision=30832
2009-11-05 10:16:49 +00:00
Stig Bjørlykke 98024a007f Invert check for getopt: NEED_GETOPT_H -> HAVE_GETOPT_H
Rename getopt.[ch] -> wsgetopt.[ch] to avoid name collision.

svn path=/trunk/; revision=30370
2009-10-06 16:01:18 +00:00
Kovarththanan Rajaratnam d1dda18cca Guard icon_list_create()
svn path=/trunk/; revision=30363
2009-10-06 13:51:56 +00:00
Stig Bjørlykke 727f0062a7 Mark some functions static.
Removed an unused tooltips.

svn path=/trunk/; revision=30362
2009-10-06 13:26:00 +00:00
Anders Broman ecc0cdb162 From GTK docs:
Warning
gtk_window_set_policy is deprecated and should not be used in newly-written code. Use gtk_window_set_resizable() instead.

Changes how a toplevel window deals with its size request and user resize attempts. There are really only two reasonable ways to call this function: 

1.gtk_window_set_policy (GTK_WINDOW (window), FALSE, TRUE, FALSE) means that the window is user-resizable. 

2.gtk_window_set_policy (GTK_WINDOW (window), FALSE, FALSE, TRUE) means that the window's size is program-controlled, and should simply match the current size request of the window's children. 

gtk_window_set_resizable () :
Sets whether the user can resize a window. Windows are user resizable by default.

svn path=/trunk/; revision=30311
2009-10-04 18:11:22 +00:00
Kovarththanan Rajaratnam 0ee2b7754d Rename init_cap_file() to cap_file_init()
svn path=/trunk/; revision=30073
2009-09-22 16:53:11 +00:00
Anders Broman 546014cdaf cf_change_time_formats() is not needed with new packet list.
svn path=/trunk/; revision=30034
2009-09-21 11:58:36 +00:00
Bill Meier cf84f1840a Indicate if "with new_packet_list" in version info (for now to minimize any confusion).
svn path=/trunk/; revision=29978
2009-09-18 00:31:27 +00:00
Kovarththanan Rajaratnam de23d92163 Add an option to col_fill_in() to allow us to disable column expression processing. This is rarely needed. It's only needed when the user right clicks on the packet list view to generate a display filter.
svn path=/trunk/; revision=29806
2009-09-08 19:00:54 +00:00
Kovarththanan Rajaratnam b90a11bee3 Make tshark and rawshark use build_column_format_array() instead of duplicating the code
svn path=/trunk/; revision=29803
2009-09-08 17:29:57 +00:00
Stig Bjørlykke 07b1329a7c Remove an obsolete gui_time_format setting.
svn path=/trunk/; revision=29724
2009-09-05 19:42:43 +00:00
Stig Bjørlykke 8024460bc0 Move reloading pane geometry to a point where we have the correct
main_first_pane and main_second_pane.

svn path=/trunk/; revision=29719
2009-09-05 18:13:48 +00:00
Stig Bjørlykke 45bdd7577b Apply user font when changing profile with new packet list.
svn path=/trunk/; revision=29712
2009-09-05 13:30:16 +00:00