Commit Graph

24 Commits

Author SHA1 Message Date
Guy Harris d94bd07f99 Rename WTAP_ERR_BAD_RECORD to WTAP_ERR_BAD_FILE; it really reports any
form of corruption/bogosity in a file, including in a file header as
well as in records in the file.  Change the error message
wtap_strerror() returns for it to reflect that.

Use it for some file header problems for which it wasn't already being
used - WTAP_ERR_UNSUPPORTED shouldn't be used for that, it should only
be used for files that we have no reason to believe are invalid but that
have a version number we don't know about or some other
non-link-layer-encapsulation-type value we don't know about.

svn path=/trunk/; revision=40175
2011-12-13 09:53:50 +00:00
Michael Tüxen 89599bbb9b Fix the capture info dialog. Reset the EOF state such that the
number get actually updated.

svn path=/trunk/; revision=37279
2011-05-19 04:56:04 +00:00
Guy Harris 6cbf6ce16c Add a new WTAP_ERR_DECOMPRESS error, and use that for errors discovered
by the gunzipping code.  Have it also supply a err_info string, and
report it.  Have file_error() supply an err_info string.

Put "the file" - or, for WTAP_ERR_DECOMPRESS, "the compressed file", to
suggest a decompression error - into the rawshark and tshark errors,
along the lines of what other programs print.

Fix a case in the Netscaler code where we weren't fetching the error
code on a read failure.

svn path=/trunk/; revision=36748
2011-04-21 09:41:52 +00:00
Stig Bjørlykke 75568093eb Rewrote error reporting to avoid using a 2048 bytes stack buffer.
Coverity 726.

svn path=/trunk/; revision=36245
2011-03-22 11:25:12 +00:00
Bill Meier 2e4f755e13 Define some vars & fcns as static;
Also: do some minor reformmating and cleanup of whitespace.

svn path=/trunk/; revision=34492
2010-10-12 19:26:07 +00:00
Anders Broman 3eadb385c3 From Alexey Neyman:
Implement dissector for IPMB (DLT_IPMB_LINUX, 209).

svn path=/trunk/; revision=25986
2008-08-12 04:44:35 +00:00
Guy Harris f441b8941e Add gtk/capture_globals.h, to declare global_capture_opts, so files that
don't need global_capture_opts don't need to have it declared and thus
don't need capture_options defined.

Include gtk/capture_globals in the files in question.

Change some more capture_opts references to refer to
global_capture_opts.

Change some global_capture_opts references in routines with a
capture_opts argument to refer to capture_opts.

The structure type is capture_options, not capture_opts; fix some
references.

Include <sys/types.h>, if it's present, in capture_opts.h, so we get
gid_t defined.

Clean up indentation.

svn path=/trunk/; revision=25574
2008-06-24 03:38:15 +00:00
Guy Harris 2a691a0aec Have capture_info_ui_create() and capture_info_open() take a pointer to
the capture_opts structure as an argument, rather than just a pointer to
the interface name.

Don't declare a global "capture_opts" pointer, as we don't define it any
more.

svn path=/trunk/; revision=25570
2008-06-24 01:23:33 +00:00
Guy Harris 9198a2a166 Fold the Prism and AVS header dissectors into packet-ieee80211.c, and
have them use least some of the radio-information fields, so that the
same field name can be used for multiple radio header types.  The AVS
header can supply the data rate in bits/second, so have that field be in
those units, and make it 64 bits to leave room for the future, Just In
Case.  Display it as Mb/s, however.

svn path=/trunk/; revision=23911
2007-12-18 08:01:11 +00:00
Jeff Morriss 25409eb349 If wtap_open_offline() fails, print the errno too
svn path=/trunk/; revision=23077
2007-10-05 22:39:06 +00:00
Stig Bjørlykke cb8dab02be And include packet-wlancap.h
svn path=/trunk/; revision=22752
2007-08-30 11:52:30 +00:00
Stig Bjørlykke d25d82405e Count IEEE 802.11 WLAN AVS packets.
svn path=/trunk/; revision=22750
2007-08-30 11:28:27 +00:00
Gerald Combs 0c4cb64c57 Add capture counts for PPI.
svn path=/trunk/; revision=22195
2007-06-26 19:38:44 +00:00
Ulf Lamping 59d6c8ea33 change all file offsets from long to gint64 so we can - theoretically - handle files > 2GB correct.
Please distclean Win32 builds!

svn path=/trunk/; revision=19814
2006-11-05 22:46:44 +00:00
Gerald Combs 8958bab6de Tethereal/tethereal -> TShark/tshark.
svn path=/trunk/; revision=18268
2006-05-31 17:38:42 +00:00
Anders Broman f68d6e4c8c Ethereal->Wireshark
svn path=/trunk/; revision=18235
2006-05-28 20:28:20 +00:00
Ronnie Sahlberg 89f022b12b name change
svn path=/trunk/; revision=18197
2006-05-21 05:12:17 +00:00
Guy Harris 8ac0325b2b Clean up indentation a bit.
In "capture_input_new_file()", don't call the callbacks unless we
succeed in opening the new file.  Have "capture_info_new_file()" return
a success/failure indication.

Improve the message logged when we fail to open the new file if we're
only opening it for the quick packet counts.  We really should put up an
alert box and give up on the capture at that point.

svn path=/trunk/; revision=17437
2006-03-01 01:46:52 +00:00
Guy Harris 41c941b49c Call capture_radiotap() when capturing on a device supplying Radiotap
headers.

Fix capture_radiotap() to check for padding between the 802.11 header
and the 802.11 payload and to call different capture routines depending
on whether it's present or not, and create capture_ieee80211_datapad()
to handle the case where it's present.

Fix capture_radiotap() to convert the Radiotap header length from
little-endian, and to do some sanity checking of that length.

Fix capture_ieee80211_common() to use the offset supplied to it to fetch
the frame control field, as that offset isn't necessarily 0.

svn path=/trunk/; revision=17083
2006-01-23 16:56:34 +00:00
Ulf Lamping 21a9b08144 don't try to close wtap, if we couldn't load the wiretap file
svn path=/trunk/; revision=16771
2005-12-13 01:17:36 +00:00
Guy Harris 0b1f2585c5 Clean up capture_enc(), export it, and use it in the capture window.
svn path=/trunk/; revision=16709
2005-12-06 22:56:37 +00:00
Guy Harris 2e6b1ac3b3 Declare "capture_info_packet()"'s as static, to match the definition.
Declare the "pd" argument to be "const guchar *", to match the way
packet data is declared elsewhere, and so that if the headers
"capture_info.c" includes don't define "u_char" it still compiles.

svn path=/trunk/; revision=16671
2005-12-04 04:20:18 +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