Commit Graph

31839 Commits

Author SHA1 Message Date
Guy Harris 8d949600af Use return rather than exit in main().
Return 2 for a capture error - we mainly use 1 for command-line syntax
errors (rather than, say, filter syntax errors or an invalid interface).

Now that TShark exits with an error status when given an invalid capture
filter or invalid interface, check for "error" rather than "success" as
an exit status.

svn path=/trunk/; revision=33006
2010-05-28 01:09:28 +00:00
Gerald Combs 69d7392467 Add cf_fake_continue_tail() which is called when real-time capture
updates are off and which sets the capture file state to a value that
won't cause an assertion when the user stops capturing. Fixes bug 4035.

svn path=/trunk/; revision=33005
2010-05-27 23:55:04 +00:00
Bill Meier ece0ada557 Fix bug #4735: tshark returns 0 on non-valid filter and interface.
See: https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4735

svn path=/trunk/; revision=33004
2010-05-27 23:46:01 +00:00
Jaap Keuter de3efcf4f5 From Steven McCoy:
AFI fields are 2 bytes i.s.o. 1.

From me, several more size changes and decode cleanup.

svn path=/trunk/; revision=33003
2010-05-27 21:54:58 +00:00
Gerald Combs f5df768724 fopen -> ws_fopen
svn path=/trunk/; revision=33002
2010-05-27 21:17:55 +00:00
Gerald Combs 8bdb1bff8d Protocol Help requires GLib 2.6+. Add newlines. Fixup whitespace.
svn path=/trunk/; revision=33001
2010-05-27 19:54:02 +00:00
Jeff Morriss 9078929e78 Copy the (no longer Win32-specific) description of the -B option to the Wireshark man page.
svn path=/trunk/; revision=33000
2010-05-27 19:13:26 +00:00
Jeff Morriss 8bfcba07ad Document the maximum number of files in a ring buffer, including a warning about using large numbers of files.
svn path=/trunk/; revision=32999
2010-05-27 19:11:53 +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
Gerald Combs 09c06a932d Add .11s to Sam Leffler's entry. We haven't used Alain Magloire's
snprintf.c for almost four years. Remove the entry.

svn path=/trunk/; revision=32997
2010-05-27 17:57:10 +00:00
Anders Broman f8f763c18b Add string_replace to exported functions.
svn path=/trunk/; revision=32996
2010-05-27 16:24:44 +00:00
Gerald Combs fa5f6cced7 From Edgar Gladkich:
This is an extension to the Wireshark context sensitive protocol help. Rows in
TreeView window are analyzed and suitable help file (as HTML) is opened in a
browser.

The help part (large file, 23 MB) of the Protocol Help can be downloaded under
www.inacon.com/dowload/stuff/protocol_help.tar.gz

This protocol help "light" provides descriptive content for the most frequently
used standard protocols, including IP, TCP or SMTP.

From me:

Changes:

Rename "ph_" in some function names to "proto_help_". Move the protocol
help code to its own module.

Make a bunch of functions static. Remove unused code.

Use browser_open_url() instead of a custom function.

Increase the logging levels. Don't clobber the normal log handler.

Update some Doxygen comments to match the format in the rest of the code
base.

Removed GTK version checks. We've been 2.x only for a while.

Move ph_replace_string to string_replace() in epan/strutil.[ch].

Fix a bunch of memory leaks.

Add a NULL pointer check.

Reformat the overview menu label.

Document the file format and locations.

Add Edgar to AUTHORS.

svn path=/trunk/; revision=32995
2010-05-27 15:51:25 +00:00
Bill Meier 812f7c0ba7 Reword two error messages as per Bug #4518.
See: https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4518

svn path=/trunk/; revision=32994
2010-05-27 15:47:34 +00:00
Anders Broman 1b49f4e316 From Pascal Quantin:
Prettify decoding of EPS NAS messages.

svn path=/trunk/; revision=32993
2010-05-27 14:05:20 +00:00
Jörg Mayer f7fd044835 Fix for the LUA part of bug
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4788

- Don't build the wslua stuff as a (static) library, build the
  stuff directly into epan instead.

The wspython remains to be done.

svn path=/trunk/; revision=32992
2010-05-27 10:49:33 +00:00
Anders Broman 4c3104dadf From Tamás Regõs:
Updated Experimental-Result-Code AVP 298.

svn path=/trunk/; revision=32991
2010-05-27 08:12:58 +00:00
Guy Harris 63a93f3f12 Data frames, not management frames, can have a mesh header.
svn path=/trunk/; revision=32990
2010-05-27 06:11:28 +00:00
Gerald Combs 8a0edc9501 Remove a couple of items from the "known bugs" list.
svn path=/trunk/; revision=32989
2010-05-27 03:24:04 +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
Gerald Combs b3a83551a3 Make sure our prefix length is > 0 before lopping off the last
character.  Fixes bug 4797.

svn path=/trunk/; revision=32987
2010-05-27 00:49:01 +00:00
Guy Harris 391b5127d6 Clean up the error reporting. An EOF from the sync pipe when capturing
is just an indication that the capture child exited; don't treat it as
an error, unless the child process exits with an abnormal status.
 
As tshark sends a "stop capture" indication to the child when it's
^C'ed, the child will exit and we'll get an EOF from the capture pipe;
don't make SIGINT etc. interrupt system calls, so they don't cause reads
from the capture pipe to get EINTR errors.

svn path=/trunk/; revision=32986
2010-05-27 00:48:08 +00:00
Gerald Combs e2c8894947 Another attempt at bug 4669: Properly set the previous-displayed-packet
timestamp when we're recalculating reference times.

Remove an unused variable. Add whitespace & comment fixups.

svn path=/trunk/; revision=32985
2010-05-26 23:29:56 +00:00
Anders Broman 9992de5a4a From Jakub Zawadzki:
One more change from wtap_seek_read to cf_read_frame.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4666

svn path=/trunk/; revision=32984
2010-05-26 21:39:24 +00:00
Jaap Keuter 6fda55130d From Brian Woodard:
User Defined CIGI packets with a packet size greater than 127 bytes are
displayed as Malformed. Instead, treat size as unsigned integers.

svn path=/trunk/; revision=32983
2010-05-26 21:23:45 +00:00
Jaap Keuter a541950ca8 From Hadar Shoham:
Change DHCPv6 option 17.8 to be the same as BOOTP option 43.8 
CableLabs specs treat 43.8\17.8 inconsistently as either binary (3 byte) 
or string (6 byte)

Additional cleanup and extension of interface ID presentation by me.

svn path=/trunk/; revision=32982
2010-05-26 21:10:02 +00:00
Gerald Combs 074b9660b6 Have new_packet_list_queue_draw() redraw the packet detail as well. Call
new_packet_list_queue_draw() whenever we mark/unmark frames. Fixes bug
4669.

svn path=/trunk/; revision=32981
2010-05-26 19:44:40 +00:00
Anders Broman 65ee4e797a From Jakub Zawadzki:
New functions: cf_read_frame_r, cf_read_frame

It's much easier to write:
 cf_read_frame (cf, fdata, &err, &err_info)
Than:
 wtap_seek_read (cf->wth, fdata->file_off, &cf->pseudo_header, cf->pd,
fdata->cap_len, &err, &err_info)

svn path=/trunk/; revision=32980
2010-05-26 19:11:23 +00:00
Jaap Keuter a59da6ffd8 Update name resolving description.
svn path=/trunk/; revision=32979
2010-05-26 19:06:17 +00:00
Bill Meier b07566f60e Reference the 'interlink' plugin dir as an example (rather than agentx
which is no longer a plugin).
Fix a typo.

svn path=/trunk/; revision=32978
2010-05-26 16:21:19 +00:00
Martin Mathieson 763a397ae3 Add a tooltip.
svn path=/trunk/; revision=32977
2010-05-26 15:51:47 +00:00
Martin Mathieson 13c9cf1d38 Add some tooltips.
svn path=/trunk/; revision=32976
2010-05-26 15:20:10 +00:00
Bill Meier 3d909801bc proto_registrar_dump_fields: output "" for blurb if blurb is a zero-length string.
svn path=/trunk/; revision=32975
2010-05-26 14:35:06 +00:00
Martin Mathieson 7c4ec2e051 Expert severity was still overlapping with bits length, so separate them.
svn path=/trunk/; revision=32974
2010-05-26 13:53:17 +00:00
Anders Broman f19eee998f Try to optimize a bit.
svn path=/trunk/; revision=32973
2010-05-26 11:51:41 +00:00
Anders Broman 2ed269439d Fix indentation.
svn path=/trunk/; revision=32972
2010-05-26 11:51:07 +00:00
Tomas Kukosa e2082dedb6 Export value_string_ext related functions
svn path=/trunk/; revision=32971
2010-05-26 07:39:03 +00:00
Stig Bjørlykke b9bf692c3e Untabify.
svn path=/trunk/; revision=32970
2010-05-26 07:19:42 +00:00
Guy Harris 5c27494bd6 Don't report EINTR - it might be from a ^C.
Do report the error string for other read errors, though.

svn path=/trunk/; revision=32969
2010-05-26 05:33:57 +00:00
Guy Harris b0bfae2a85 Don't send ^T output to the standard error if we're a capture child.
Make SIGINFO a restart-the-system-call signal, so reads etc. don't
return an error.

svn path=/trunk/; revision=32968
2010-05-26 04:29:36 +00:00
Jeff Morriss 12b5361a7b Remember the default value of each protocol preference.
If, when we're writing the preferences file, the current value of the
preference is the same as the default, write out the preference (since the
preference file is also the documentation for the preferences) but comment it
out (so that if, for example, you go back to an older version of Wireshark
you won't get warnings about non-existant preferences that you didn't
change--and thus probably don't care too much about).

It might be interesting to, in the future, add a UI to restore the default
values.

svn path=/trunk/; revision=32967
2010-05-26 03:31:30 +00:00
Gerald Combs d3be76c010 g_error -> expert_add_info_format. Fixup whitespace.
svn path=/trunk/; revision=32966
2010-05-26 02:46:50 +00:00
Guy Harris 26bf53f0b1 Use the right system call name.
svn path=/trunk/; revision=32965
2010-05-26 02:34:12 +00:00
Guy Harris d0ac88186d If dumpcap exits abnormally, report the error.
svn path=/trunk/; revision=32964
2010-05-26 02:32:19 +00:00
Guy Harris 347e7a0052 More <stdarg.h> cleanup; some are real bugs, some are just "don't do
va_start and va_end unless you're actually going to use the va_list"
(those bring the va_start and va_end closer to the use point, which
makes it a little more obvious that we're using <stdarg.h> correctly and
makes it a little harder to use it incorrectly).

svn path=/trunk/; revision=32963
2010-05-26 02:25:13 +00:00
Guy Harris 7da29cfe69 Put in a warning about the <stdarg.h> problem that I just found and
fixed in one place (and am now fixing in some other places).

svn path=/trunk/; revision=32962
2010-05-26 02:21:23 +00:00
Guy Harris ebc3739570 Once you've used a va_list, you can't use it again until you
reinitialize it with va_start().  (Yes, there are platforms where
reusing the va_arg fails, e.g. Mac OS X on x86-64.)

svn path=/trunk/; revision=32961
2010-05-26 02:01:49 +00:00
Jeff Morriss ea0c9d6b14 Reindent a bit
svn path=/trunk/; revision=32960
2010-05-26 01:51:41 +00:00
Guy Harris d3f8320039 Fix build without pcap.
svn path=/trunk/; revision=32959
2010-05-26 01:32:00 +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
Gerald Combs 237eef2ae7 r32323 broke packet detail tree expansion using the left/right keys on
X11. Add back the removed code and add checks for expandable items.

svn path=/trunk/; revision=32957
2010-05-25 23:55:33 +00:00