Commit Graph

92 Commits

Author SHA1 Message Date
Anders Broman 8aea738cda Add the abillity to read and write option comments unedited.
This is POC we may want to have more efficient use of the frame data
structure etc. But this allows for work to be done on the GUI to actually add comments.

svn path=/trunk/; revision=40969
2012-02-11 12:34:39 +00:00
Jeff Morriss 509c2203eb Revert 40772: the abort() needs to be pushed higher (into packet.c?) so
checkapi remains happy; thus far my attempts at that aren't working.

svn path=/trunk/; revision=40773
2012-01-30 19:23:25 +00:00
Jeff Morriss 0a8b301218 If WIRESHARK_ABORT_ON_DISSECTOR_BUG is set, abort() out if we happened to
catch a DissectorError exception.

(I found this useful when debugging a "More than 1000000 items in the tree"
DissectorError.)

svn path=/trunk/; revision=40772
2012-01-30 17:51:22 +00:00
Jörg Mayer 2097912587 Rename crypt-xxx to xxx
svn path=/trunk/; revision=40511
2012-01-15 12:29:44 +00:00
Bill Meier 72825137b4 Use __except(EXCEPTION_EXECUTE_HANDLER) rather than __except(TRUE);
Strictly speaking, it appears that __except(EXCEPTION_EXECUTE_HANDLER)
 rather than __exept(TRUE) should be used altho in actuality there's
 no difference since TRUE (as defined by GLIB) == EXCEPTION_EXECUTE_HANDLER.


svn path=/trunk/; revision=40022
2011-11-28 16:23:55 +00:00
Jörg Mayer ffc843e501 Another case of written to only variable.
svn path=/trunk/; revision=39967
2011-11-21 12:13:36 +00:00
Bill Meier 94f36ca4ff Use ENC_NA as encoding for proto_tree_add_item() calls which directly reference an hf item (in hf[] with types:
FT_NONE
   FT_BYTES
   FT_IPV6
   FT_IPXNET
   FT_OID

Note: Encoding field set to ENC_NA only if the field was previously TRUE|FALSE|ENC_LITTLE_ENDIAN|ENC_BIG_ENDIAN

svn path=/trunk/; revision=39260
2011-10-04 22:44:31 +00:00
Stig Bjørlykke 0eefc553b2 From Edwin Groothuis via bug 6179:
Added Time Shift functionality.

From me:
Renamed to use "Time Shift" everywhere + some other minor cleanups.

svn path=/trunk/; revision=38510
2011-08-13 17:39:38 +00:00
Bill Meier 2bf572bc41 Remove unneeded #includes: proto.h,tvbuff.h,value_string.h,stdlib.h,...
svn path=/trunk/; revision=38413
2011-08-08 17:59:32 +00:00
Jakub Zawadzki c07ecbb90f Use orginal nsstime_t structures (without copying).
svn path=/trunk/; revision=36829
2011-04-23 09:13:16 +00:00
Stephen Fisher 2a028a16ba From Edwin Groothuis via bug #5833: Make number of bits in Frame header
optional


svn path=/trunk/; revision=36652
2011-04-15 17:53:23 +00:00
Guy Harris a595f69ce4 The lack of _WITH_PHDR in WTAP_ENCAP_BLUETOOTH_H4 means there's no
pseudo-header, and hence there's no direction indication. Don't set
pinfo->p2p_dir for it.  Use WTAP_ENCAP_BLUETOOTH_H4_WITH_PHDR, not
WTAP_ENCAP_BLUETOOTH_H4, for capture files where we have the direction.

Don't assume pinfo->p2p_dir is either P2P_DIR_SENT or P2P_DIR_RECV when
setting the info column in various Bluetooth dissectors; it might be
unknown.

In the HCI H4 dissector, put the direction into the info column
regardless of whether we have a type match or not; the dissectors for
HCI packet types appear to assume it's been set (as they put a blank at
the beginning of the stuff they append to the direction).

svn path=/trunk/; revision=35933
2011-02-12 19:59:41 +00:00
Guy Harris a8bc4a0d13 Rename the routines that handle dissector tables with unsigned integer
keys to have _uint in their names, to match the routines that handle
dissector tables with string keys.  (Using _port can confuse people into
thinking they're intended solely for use with TCP/UDP/etc. ports when,
in fact, they work better for things such as Ethernet types, where the
binding of particular values to particular protocols are a lot
stronger.)

svn path=/trunk/; revision=35224
2010-12-20 05:35:29 +00:00
Bill Meier 7b85f43d0e Do some constifying [or other] based upon gcc -Wwrite-strings warnings.
svn path=/trunk/; revision=33198
2010-06-09 18:12:17 +00:00
Bill Meier 1afe329456 Changes to use consistent indentation.
svn path=/trunk/; revision=31470
2010-01-08 21:07:51 +00:00
Guy Harris 9a4bc11689 Oops, back out my little test change.
svn path=/trunk/; revision=31320
2009-12-19 03:21:28 +00:00
Guy Harris 8e236e55de For fields of type FT_ABSOLUTE_TIME, have the "display" value be one of
ABSOLUTE_TIME_LOCAL or ABSOLUTE_TIME_UTC, indicating whether to display
the date/time in local time or UTC. (int)ABSOLUTE_TIME_LOCAL ==
(int)BASE_NONE, so there's no source or binary compatiblity issue,
although we might want to eliminate BASE_NONE at some point and have the
BASE_ values used with integral types start at 0, so that you can't
specify BASE_NONE for an integral field.

svn path=/trunk/; revision=31319
2009-12-19 03:17:44 +00:00
Stig Bjørlykke 47be3577a7 Introduce "Ignore Packet" in the packet list.
This will remove the package from the dissection functions without
removing it from the capture file.

svn path=/trunk/; revision=31287
2009-12-17 01:18:14 +00:00
Stephen Fisher c241b33233 From enhancement bug #4272: Patch to add new filterable field -
frame.time_epoch


svn path=/trunk/; revision=31110
2009-11-29 09:26:01 +00:00
Gerald Combs 4c6f3e96de Show the number of bits captured and on the wire. Use unsigned ints.
svn path=/trunk/; revision=31074
2009-11-25 19:18:41 +00:00
Kovarththanan Rajaratnam 3ea9409792 Store 'color_filter' as const in 'frame_data'
svn path=/trunk/; revision=30051
2009-09-21 18:48:53 +00:00
Kovarththanan Rajaratnam a65d590002 Store the packet encapsulation type as gint8. Saves 3 bytes per packet
svn path=/trunk/; revision=29767
2009-09-07 13:54:46 +00:00
Kovarththanan Rajaratnam b3b9be09c7 We track all protocols that appear in each packet in the frame dissector. This is an expensive operation because we:
* Disable the TRY_TO_FAKE_THIS_ITEM optimization
* Use GString to store the protocols

We should only do this if the 'hf_frame_protocols' is referenced (unlikely)

svn path=/trunk/; revision=29733
2009-09-06 07:55:17 +00:00
Kovarththanan Rajaratnam 4df25480b7 The frame dissector disables the TRY_TO_FAKE_THIS_ITEM() optimization by marking the protocol tree as permamently visible. It only needs to disable the optimization temporarily while it creates the protocol item it intends to use proto_item_append_string() on
svn path=/trunk/; revision=29730
2009-09-06 06:33:13 +00:00
Kovarththanan Rajaratnam 96b2c411dd The frame dissector contains a kludge to workaround the fact that the Protocol Hierarchy stats tap always needs the protocol node to appear even though no color, display filter etc. reference it. This is no longer needed due to r29380.
svn path=/trunk/; revision=29428
2009-08-15 08:05:10 +00:00
Bill Meier 41a9e1c16f (Trivial) Fix two typos.
svn path=/trunk/; revision=29271
2009-08-03 14:17:31 +00:00
Anders Broman 0b0ff6cdcf Get rid of check_col() in some of the more frequently used dissectors.
svn path=/trunk/; revision=29170
2009-07-22 21:33:47 +00:00
Stig Bjørlykke b228488bc0 From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
    for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
    FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero

svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
Stephen Fisher 18f3436e85 Add support for reading Apple's Bluetooth PacketLogger capture files to
wiretap.  Modify various other locations to accommodate the fact that
PacketLogger files do not specify the direction of packets. 


svn path=/trunk/; revision=27463
2009-02-16 07:24:04 +00:00
Jaap Keuter 3b71d3fccb Group time related fields.
Drop packet length in favor of frame length.
Clean up code / indentations / header fields.
Improve docsis preference description.

svn path=/trunk/; revision=27329
2009-01-29 22:43:49 +00:00
Jaap Keuter 497c59bc2f Add initializer for force_docsis_encap preference.
svn path=/trunk/; revision=27328
2009-01-29 19:07:50 +00:00
Jaap Keuter 322d89cf15 From Duncan Salerno:
Added LAPDm protocol dissector, GSM Um layer, and wiretap support for dct3trace
captures, generated by gammu (many available at http://wiki.thc.org/gsm).

svn path=/trunk/; revision=27176
2009-01-07 07:21:31 +00:00
Jaap Keuter bd9ac16336 From Jim Young:
The attached patch augments the epan/dissectors/packet-frame.c module to optionally generate MD5 hashes of each packet.  These MD5 hashes are calculated in the same 
manner as the MD5 hash used for duplicate packet removal by the editcap utility.  

The ability to generate the MD5 hashes can be enabled or disabled by a new boolean preferences option: frame.generate_md5_hash.  By default MD5 hash generation is disabled.

To help identify frames with matching MD5 hashes this patch also includes a new
display filter: frame.md5_hash.

svn path=/trunk/; revision=27150
2009-01-04 12:08:17 +00:00
Bill Meier c544c20956 Fix various typos and spelling errors (mostly in text strings)
svn path=/trunk/; revision=27050
2008-12-18 19:08:49 +00:00
Bill Meier 8afa208ffb Windows build: #include winsock2.h only when needed.
#include winsock2.h pulls in about 90 distinct .h files
and about 140 total .h files. 
Currently winsock2.h is (mostly unnecessarily) included
for each dissector via packet.h/wtap.h.
This patch removes #include winsock2.h from wtap.h and 
then includes winsock2.h (or windows.h) in the 
few specific places required. 
With this patch, my Windows Wireshark build takes 
about 30% less time.


svn path=/trunk/; revision=26535
2008-10-24 00:42:09 +00:00
Jeff Morriss a2ab3791f4 Fix http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2549 : make the frame dissector catch exceptions generated by post dissectors.
svn path=/trunk/; revision=25339
2008-05-21 14:18:37 +00:00
Stig Bjørlykke ef625890aa From Shane Kearns (bug 2237):
Added support for Symbian OS btsnoop.

The bluetooth HCI layer in Symbian OS can be configured to log all packets to a
file.  The log format, "btsnoop" is based on the RFC1761 "snoop" format - but
differences in the header make it incompatible.

The btsnoop format supports logging of these formats:
"H1" (raw HCI packets without framing)
"H4" (HCI UART packets including packet type header)
"H5" (HCI 3 wire UART packets including framing)
"BCSP" (HCI bluecore serial protocol including framing)

"H1" and "H4" are section numbers in the original v1 bluetooth specifications,
but still used colloquially - wireshark's existing support for Linux bluez HCI
logs uses the "H4" name.

In practice, the "H1" format is used for H5,BCSP and USB HCI logs, as the HCI
packet logs are mainly useful for debugging higher layers, bluetooth profiles
and bluetooth applications.

From me:
Deleted some unused prototypes.
Mark an unused parameter.

svn path=/trunk/; revision=24263
2008-02-03 21:11:53 +00:00
Jaap Keuter f37c29c2f5 Use proto functions i.s.o. manipulating node data directly.
svn path=/trunk/; revision=23940
2007-12-23 14:18:27 +00:00
Jeff Morriss 3fa633d626 When reassembly is off, catch ReportedBoundsError when calling a subdissector
on the first fragment of a fragmented message.  This allows us to continue
dissecting chunks even if one of the first chunks in the frame was fragmented.
(It's useful to keep doing this partial dissection just so we have some idea
what's in that chunk.)

(One could rightfully argue that you should only see a fragmented chunk
bundled with another chunk when retransmitting but, well, I'm staring at
traces of an implementation--to remain nameless to protect the guilty--which
is sometimes fragmenting and then bundling the fragments into one packet.)

svn path=/trunk/; revision=23471
2007-11-16 22:04:27 +00:00
Jeff Morriss 0f82a3e7e8 From Paolo Abeni via bug 1751:
http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1751

The patch adds support to wiretap for a new libpcap DLT for bluetooth captures.
This DLT carries the direction information, which now can be displayed
correctly.
The hci H4 dissector is updated to handle also the newly introduced wtap encap.

svn path=/trunk/; revision=23208
2007-10-16 17:19:16 +00:00
Gerald Combs d1a745f27b Add support for PPI (the Per-Packet Information header), described at
http://www.cacetech.com/documents/PPI_Header_format_1.0.pdf .

svn path=/trunk/; revision=22094
2007-06-13 22:36:58 +00:00
Guy Harris 230c951306 From Stephen Donnelly of Endace:
The code for reading ERF files has not been significantly
	updated since 2004.  This patch brings it up to date with a
	number of changes.

	1) Increase number of decodable ERF types from 7 to 12. This
	   covers newer DAG card models and firmware updates.

	2) Fix timestamp conversion. Was calculating only microsecond
	   precision, now displaying with nanosecond resolution.  Hardware
	   precision is 7.5 to 30 ns depending on model.

	3) Allow the user to specify HDLC encapsulation as 'chdlc',
	   'ppp_serial', 'frelay' or 'mtp2'.  This is needed because the
	   ERF HDLC capture formats do not include information on what
	   protocol is used at the next level.  This is currently done via
	   an environment variable 'ERF_HDLC_ENCAP' and is analagous to the
	   existing 'ERF_ATM_ENCAP' variable.

	   If the user does not specify an HDLC encapsulation it tries to
	   guess, and falls back to MTP2 for backwards compatibility with
	   Florent's existing behaviour.

	   I know environment variables are ugly, suggestions are welcome.

	4) When reading HDLC captures as MTP2, use
	   WTAP_ENCAP_MTP2_WITH_PHDR rather than WTAP_ENCAP_MTP2.  This
	   allows us to put the 'Multi-Channel ERF' record 'channel
	   number' field into the MTP2 pseudo header > 'link_number'
	   field.  This is then displayed in Frame information, and can
	   be filtered on.  (Would be nice if it could be made a display
	   column?)

	Because the ERF record does not specify whether Annex A is used
	or not, we pass MTP2_ANNEX_A_USED_UNKNOWN and allow the existing
	user preference to decide.

Move the MTP2_ANNEX_A_ definitions into Wiretap, make the annex_a_used
field a guint8, and change MTP2_ANNEX_A_USED_UNKNOWN to 2 so it fits in
a guint8.  (This means that if you can save an ERF MTP2 file as a
libpcap file, the pseudo-header will have MTP2_ANNEX_A_USED_UNKNOWN in
it.)

svn path=/trunk/; revision=22067
2007-06-08 17:06:13 +00:00
Guy Harris 5a43799a17 Use G_GINT64_MODIFIER, rather than the PRI[douxX]64 macros, for GLib
routines and routines using those routines.  GLib might use different
modifiers for 64-bit quantities than the platform's C library does.

svn path=/trunk/; revision=21990
2007-05-29 18:52:42 +00:00
Jaap Keuter b80cb43018 From bug 1492: Fortify layer name presentation.
Some code cleanups.

svn path=/trunk/; revision=21752
2007-05-12 19:54:55 +00:00
Jeff Morriss ab97c31bb2 Fix warnings of the form "long long unsigned int format, guint64 arg": use
the PRI macros instead of %llu, etc.

svn path=/trunk/; revision=21454
2007-04-17 10:11:41 +00:00
Jeff Morriss 00cf2ec89c Frame numbers are unsigned, print them as such
svn path=/trunk/; revision=21443
2007-04-16 04:52:51 +00:00
Stephen Fisher ab8f589336 Fix about 100 simple to fix warnings from gcc 4.0 in epan/dissectors
svn path=/trunk/; revision=21233
2007-03-27 22:50:11 +00:00
Stephen Fisher 6d8d2854c8 From Sake Blok:
Fix for bug #491: Unexpected frame.time_delta behavior

This patch ... fixes bug 491. It does this by changing the
behaviour of the frame.time_delta field so it reflects the delta
time between captured packets (tshark already did this).  To keep
the delta time between displayed packets, the field 
frame.time_delta_displayed is created.


svn path=/trunk/; revision=21154
2007-03-23 18:08:17 +00:00
Gerald Combs 5ddc9ab395 Clarify the description of frame.time_delta. This partially addresses
bug 491.

svn path=/trunk/; revision=20870
2007-02-20 01:32:14 +00:00
Ulf Lamping 5fef4e745b add STATUS_STACK_OVERFLOW to the possible Win32 exception codes - unfortunately, this exception seems to corrupt the stack at least in a way that the TRY / CATCH pair later causes an access violation ...
svn path=/trunk/; revision=20764
2007-02-10 10:28:59 +00:00