Commit Graph

16805 Commits

Author SHA1 Message Date
Stig Bjørlykke d9aff2d872 Fixed an indent to avoid a warning: for loop has empty body [-Wempty-body]
svn path=/trunk/; revision=48294
2013-03-14 08:41:11 +00:00
Anders Broman b539916835 [-Wmissing-prototypes]
explicit casts.

svn path=/trunk/; revision=48293
2013-03-14 07:37:13 +00:00
Martin Kaiser 3fa84d8af5 From Weston Schmidt
fix DSM-CC CRC calculation
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8466

svn path=/trunk/; revision=48292
2013-03-14 07:01:37 +00:00
Anders Broman 44be81ba93 From beroset:
changed implicit casts to explicit and substituted se_new for se_alloc

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416

svn path=/trunk/; revision=48288
2013-03-14 06:45:23 +00:00
Anders Broman 672a54c156 From beroset:
converted implicit casts to explicit casts, moved nested structure definition outside, and changed se_alloc to se_new.

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416

svn path=/trunk/; revision=48287
2013-03-14 06:31:31 +00:00
Anders Broman fad318ad44 From beroset:
changed implicit casts to explicit casts and corrected one erroneous cast (from void* to void**)

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416

svn path=/trunk/; revision=48286
2013-03-14 06:26:55 +00:00
Martin Kaiser 455139f4be dissect more descriptors in the AIT
svn path=/trunk/; revision=48285
2013-03-13 23:26:09 +00:00
Martin Kaiser 8772db463a actx is used, remove _U_
svn path=/trunk/; revision=48284
2013-03-13 22:54:46 +00:00
Anders Broman 04766017df - [-Wmissing-prototypes]
- explicit casts.

svn path=/trunk/; revision=48282
2013-03-13 21:14:20 +00:00
Alexis La Goutte 1d74daaec3 Remove unused bgp_route_refresh struct
svn path=/trunk/; revision=48278
2013-03-13 15:02:17 +00:00
Alexis La Goutte e22e3eeb0e From chaitanya via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8354 Add support for WAPI parameter set IE dissection
Need to add support for WAPI parameter set IE in management frames.
We already have WAI frames dissection support in place.

From me:
Small changes...
- Add links to WAPI specs
- Replace tabs by space
- Remove whitespaces

svn path=/trunk/; revision=48276
2013-03-13 14:49:46 +00:00
Anders Broman 27fc641a79 - [-Wmissing-prototypes]
- explicit casts.

svn path=/trunk/; revision=48274
2013-03-12 23:09:37 +00:00
Martin Kaiser f58e2cc90a dissect Application Signalling Descriptor
svn path=/trunk/; revision=48273
2013-03-12 22:04:09 +00:00
Anders Broman 221b249acd svn path=/trunk/; revision=48272 2013-03-12 21:58:04 +00:00
Martin Kaiser 7c10fd2724 use correct data type in the cast
this fixes
packet-afs.c: In function 'dissect_afs':
packet-afs.c:1539:35: error: expected expression before ')' token


svn path=/trunk/; revision=48266
2013-03-12 20:14:45 +00:00
Anders Broman 455f5c8243 - [-Wmissing-prototypes]
- explicit casts.

svn path=/trunk/; revision=48265
2013-03-12 20:00:50 +00:00
Anders Broman 97bb558394 Introduce a preference to select how Websocket text should be dissected.
svn path=/trunk/; revision=48264
2013-03-12 19:16:35 +00:00
Anders Broman 30a9b4855d Detect HTTP/1.1 heuristically.
svn path=/trunk/; revision=48263
2013-03-12 19:15:39 +00:00
Jaap Keuter 827eb58b04 From David Arnold:
Replace use of INCLUDES with AM_CPPFLAGS in all Makefiles to placate recent autotools.

svn path=/trunk/; revision=48261
2013-03-12 06:53:39 +00:00
Anders Broman 2cc00294c7 Use explicit casts.
svn path=/trunk/; revision=48260
2013-03-12 06:41:00 +00:00
Anders Broman d0efafbcb1 From beroset:
remove C++ incompatibilities from UAT_VS_DEF macro and all uses

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416

svn path=/trunk/; revision=48259
2013-03-12 06:40:13 +00:00
Ronnie Sahlberg d249e6111a SPC-3 and later has a 16-bit allocation length for the INQUIRY allocation
length.

While SPC-2 only has one byte for allocation length

Change this to treat allocation length as a 16 bit quantity starting one byte prior to the current single byte that wireshark dissects.
This makes it correct for SPC-3 and later  and still works for SPC-2 since that first byte is reserverd, == must be 0, in SPC-2 and prior.
  

svn path=/trunk/; revision=48258
2013-03-12 01:25:06 +00:00
Chris Maynard 7be1086254 Fix Coverity CID 990224 and 990225: Unused pointer value.
svn path=/trunk/; revision=48256
2013-03-11 20:43:52 +00:00
Anders Broman dd33c46501 Improve heuristics for gmtrailer.
svn path=/trunk/; revision=48255
2013-03-11 19:32:33 +00:00
Anders Broman 9a5368a705 Dissect GRE Key and Service Selection.
svn path=/trunk/; revision=48254
2013-03-11 19:31:59 +00:00
Anders Broman 5257351bfb Dissect Contractor Number digits.
svn path=/trunk/; revision=48253
2013-03-11 19:30:59 +00:00
Anders Broman 01c1661412 From: Erik Hugne
tipc: update link header according to spec
The bcastsequence gap have been removed, and the sequence field is now 13 bits.

svn path=/trunk/; revision=48238
2013-03-11 06:34:34 +00:00
Evan Huus ee744dd8c7 Allocate zeroed memory instead of manually zeroing some of the fields. We were
missing a few anyways.

Fixes the rest of https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8456

Also, add modelines.

svn path=/trunk/; revision=48236
2013-03-10 22:02:07 +00:00
Evan Huus 7d1520c217 Use col_append_sep_str instead of col_set_str. Fixes another piece of
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8456

Fix suggested by Jakub in comment #5.

svn path=/trunk/; revision=48235
2013-03-10 21:42:16 +00:00
Anders Broman 812efccdae Off by one error in name length.
svn path=/trunk/; revision=48234
2013-03-10 18:32:59 +00:00
Evan Huus bbb4058954 Remove slab.h and replace its last remaining usage with glib slices.
Take the opportunity to deduplicate some code that was common to both an
if block and its else block.

svn path=/trunk/; revision=48227
2013-03-10 14:52:14 +00:00
Evan Huus f5c82262b4 Add two missing NULL checks, fixes most of
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8456

svn path=/trunk/; revision=48224
2013-03-10 13:40:50 +00:00
Anders Broman 97c4bc6292 Use explicit casts.
svn path=/trunk/; revision=48212
2013-03-09 10:09:58 +00:00
Alexis La Goutte f6019d9d88 Make checkAPIs Happy
svn path=/trunk/; revision=48211
2013-03-09 09:45:28 +00:00
Alexis La Goutte a4eb0a12ed From Jose Pico via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8377 NEW FEATURE IMPLEMENTED: SMB2 SUPPORT FOR EXPORT->OBJECTS->SMB
Added functionality:
- SMB2 support for Export->Objects->SMB
- support for SMB_COM_CREATE, SMB_COM_OPEN, SMB_COM_READ and SMB_COM_WRITE commands
- Ability to choose between File Id and full file name as identifier for file re-building. Implemented as an option under Edit->Preferences->Protocols->SMB and Edit->Preferences->Protocols->SMB2.

Other minor changes and fixes:
- Full filename in file
- Inclusion of IP of SMB server when treeid name (i.e. hostname) is not known
- UTF-8 filenames encoding before passing them to Export Object Window
- Re-written insert_chunk function of export_object_smb.c to make it easier to debug
- Fixed of an error in insert_chunk function of export_object_smb.c (the verification of next free_chunk was always skipped after deleting one free_chunk).
- Removed duplicated code by inserting the function feed_eo_smb in packet-smb.c and packet-smb2.c
- Changed the label of Export->Objects->SMB menu into Export->Objects->SMB/SMB2

svn path=/trunk/; revision=48210
2013-03-09 08:44:14 +00:00
Evan Huus e5d5bb67bc Put items in the tree we just created, mark an unused param as _U_.
Fixes GCC build.

svn path=/trunk/; revision=48209
2013-03-09 03:31:27 +00:00
Michael Mann 88205d4b72 RTPS Cleanup, Part 2
1. Convert more proto_tree_add_text to proto_tree_add_<something else>/expert_info.  checkAPIs.pl is happy (for packet-rtps.c), but the raw number is a bit deceiving because of macros and wrappers. 
2. Fixed the offending "uses snprintf + strlen to assemble strings" in packet-rtps.c.  The exact same code is used in packet-rtps2.c, so just proper refactoring will fix it.  There is still too much unnecessary use of g_snprintf/g_strlcpy/strlen, but that's for a later date.
3. Removed most of the "useless" wrapper functions.  Again, the number of proto_tree_add_text is deceiving, so the number of hfs that really need to be created is much larger.  
4. Whitespace cleanup.   Removed a lot of whitespace so I could see more code on the screen, to help determine duplication between packet-rtps.c and packet-rtps2.c  Comments/descriptions of fields remain untouched.

The more I trim, the more I think this should all be in a single dissector file, which will be the goal of the next update.  Trying to patch this in somewhat manageable chunks.

Also need to submit sample traces generated for (fuzz)testing.

svn path=/trunk/; revision=48206
2013-03-09 00:21:56 +00:00
Evan Huus 3721df7b19 From Steve Magnani via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8414
Fix minor cut-and-paste error in USB-Video dissector caught by cppcheck.

svn path=/trunk/; revision=48205
2013-03-09 00:10:14 +00:00
Guy Harris 0d4763b3e7 Dissect the DCCP header by stepping through it a field at a time and
adding the fields to the protocol tree as we fetch them, rather than
fetching a bunch of them up front.  That way, if the packet was cut
short by a snapshot length, we'll dissect what we have.

Create the top-level tree item at the beginning, with an unknown length,
and set the length when we're done.  If we're putting details into that
item, update the item as we process each field; also update the Info
column as we process each field.

Don't use tvb_bytes_exist() to do our own tvbuff bounds-checking; let
the tvbuffs themselves do that.  Do not use it to do header-length
checking; check the actual header length value instead.

Do not fail if the *captured* data in the tvbuff is too short; we're
selected by an IP protocol number, which we can expect to definitively
identify us, not by a transport-layer port number, which is often an
unreliable identifier.

Do header length checks as we go along, and bail as soon as we identify
the header length as wrong.  (We do the first check once we get the X
bit, so we know whether the generic header is 12 or 16 bytes long.) 
Treat a too-*large* header as a protocol violation, not a malformed
packet indication.

Use tvb_get_ntoh24() and tvb_get_ntoh48() to fetch the sequence number,
rather than fetching it in pieces and putting them together ourselves.

Correctly pluralize "byte".

Don't use tvb_length_remaining() to check whether we have a payload, use
tvb_reported_length_remaining(), so we base it on whether the packet
actually had the data, not on whether we actually captured it.

svn path=/trunk/; revision=48201
2013-03-08 19:56:41 +00:00
Anders Broman 1b788d4061 Update to V11.5.0 (2012-12).
svn path=/trunk/; revision=48195
2013-03-08 17:55:53 +00:00
Anders Broman 4237d33ab8 Add new SIP headers.
svn path=/trunk/; revision=48192
2013-03-08 16:53:14 +00:00
Evan Huus 826c14b456 From Steve Magnani via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8414
Dissector for USBVIDEO.

svn path=/trunk/; revision=48190
2013-03-08 14:25:55 +00:00
Pascal Quantin d915e3c04f Prettify a bit dissection of sr-ProhibitTimer-r9 and drxShortCycleTimer
svn path=/trunk/; revision=48188
2013-03-08 08:19:26 +00:00
Anders Broman 2cc8731bec From beroset:
remove C++ incompatibilities

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416

svn path=/trunk/; revision=48185
2013-03-08 06:06:56 +00:00
Evan Huus c6c7efd1a7 From Max Baker via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8431
Add a few member variables to the USB conversation structure, necessary
for a USB PTP dissector.

svn path=/trunk/; revision=48184
2013-03-07 23:57:43 +00:00
Martin Kaiser 24fe8f7fb2 correctly mark the payload for unknown extension tags
(fixes a bug introduced by my previous commit)

svn path=/trunk/; revision=48181
2013-03-07 22:06:18 +00:00
Guy Harris f7e497a522 Properly pluralize "octet" for the Extended Capabilities tag.
If we don't decode a tag, just say "Undecoded" on the top-level item;
the tag name or number is already on that item, and the length is
underneath it.

svn path=/trunk/; revision=48180
2013-03-07 21:42:01 +00:00
Martin Kaiser d96c8ee09d dissect Supplementary Audio Descriptor as defined in EN300468
svn path=/trunk/; revision=48176
2013-03-07 19:14:11 +00:00
Martin Kaiser faed099b43 use defines for extension tags
svn path=/trunk/; revision=48175
2013-03-07 19:05:45 +00:00
Pascal Quantin aec6d0a755 From Ed Beroset via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 :
Remove C++ incompatibilities from ssl and ssh files

svn path=/trunk/; revision=48174
2013-03-07 18:37:58 +00:00
Pascal Quantin 85048f5a96 From Ed Beroset via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 :
Remove C++ incompatibilities from packet-nfs.c

svn path=/trunk/; revision=48172
2013-03-07 18:09:23 +00:00
Chris Maynard cfcd6deca1 Avoid a potential divide-by-zero condition.
#BACKPORT(1.8)

svn path=/trunk/; revision=48159
2013-03-07 02:04:41 +00:00
Guy Harris 9bfeb4963f Make the GTP and GTP' dissectors new-style dissectors, so that they can
reject packets that don't look enough like GTP/GTP' packets.  This fixes
bug 1706, and fixes some other cases where non-GTP/GTP' packets are
being dissected as GTP/GTP'.

svn path=/trunk/; revision=48118
2013-03-06 00:02:18 +00:00
Guy Harris 049428d5a1 Use XDLC_IS_INFORMATION() to determine whether there's a payload to hand
to the X.25 dissector or not.

svn path=/trunk/; revision=48097
2013-03-05 20:50:25 +00:00
Martin Kaiser 47a8a496f1 fix
packet-bssgp.c: In function 'de_bssgp_unconfim_send_state_var':
packet-bssgp.c:3318:13: error: variable 'state_var' set but not used [-Werror=unused-but-set-variable]


svn path=/trunk/; revision=48095
2013-03-05 20:17:29 +00:00
Guy Harris dcf054dd5e Fix some variable names to better indicate what they do.
Fix indentation.

Fix a proto_tree_add_uint_format_value() call not to include the name of
the field - proto_tree_add_uint_format_value() will add that for you.

Have dte_address_util() take the offset of the address as an argument;
it's not always at the same offset from the beginning of the facility.

Have it return the pointer to the generated string directly, rather than
through a pointer argument.

Create only one subtree for each facility, and give it a text description
of the facility code rather than the numerical value of the facility
code.  Make the top-level item for the facility cover all the bytes of
the facility, including code, length if present, and parameters.

Dissect the end-to-end transit delay and priorities facilities
completely.  Also, fix an incorrect use of "transmit delay" to say
"transit delay".

Get rid of the last of the spaces preceding colons in "Field: value"
descriptions and in a "default:" case label.

Do the data vs. non-data packet thing ith

	if (PACKET_IS_DATA(pkt_type)) {
		...
	} else {
		...
	}

rather than, in effect, doing the "else" with a break; that makes the
code a bit clearer.

Put the logical channel number into the protocol tree in common code for
the default case, rather than doing it separately for data and non-data
packets.  Clean up the dissection of non-data packets to add entries
before updating the columns, so that we don't throw an exception
updating the columns before we get to add items that wouldn't throw
exceptions.  Clear the Info column early in the dissection, in case we
throw an exception before getting to set it and thus leave behind the
column information for the protocol atop which we're running.

svn path=/trunk/; revision=48093
2013-03-05 19:31:13 +00:00
Anders Broman f6ce72ee04 From Joseph Chai:
Add aditional IE dissection.
From me patch cleanup and add set fence for multiple DTAP messages in one frame.

svn path=/trunk/; revision=48087
2013-03-05 17:38:44 +00:00
Anders Broman 95c478c47c Unused parameter.
svn path=/trunk/; revision=48084
2013-03-05 06:17:25 +00:00
Michael Mann dd8c596851 RTPS Cleanup, Part 1
1. Cleanup COL_INFO processing
2. Add expert_info for "octet_to_next_header" ranges
3. Check "RTPS" all at once
4. Remove some unnecessary function declaration.

Next is probably consolidating packet-rtps.c and packet-rtps2.c as there seems to be a lot of duplicative functionality.

svn path=/trunk/; revision=48082
2013-03-05 05:52:23 +00:00
Guy Harris 9b01892eca Use hf_gtp_ext_hdr_next for all "next header" fields, and get rid of
hf_gtp_next.

Don't do "dummy" dissection of extension headers that we don't actually
dissect - we label them by next extension header type, and dissect them
in the default case, which should suffice (until somebody adds
dissection for those types).

svn path=/trunk/; revision=48075
2013-03-05 00:17:56 +00:00
Guy Harris 958574da78 If the length value is bad, an exception will be thrown; we don't need
the item for the length, as we aren't explicitly checking it and
attaching expert info items to it.

svn path=/trunk/; revision=48070
2013-03-04 22:01:29 +00:00
Evan Huus 1cece569c8 From Jiri Novak via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8424
Extend RTP dissector with ED-137 extension

From me: Don't try to dissect a non-existent payload (see comment #9
on the bug).

svn path=/trunk/; revision=48069
2013-03-04 22:00:48 +00:00
Guy Harris 029c5bdbac Give 3GPP TS numbers for GTP v0, GTP v1, and GTP'.
Give URLs for the 3gpp.org pages for all those specs.

Add #defines for all the GTP v1 extension header types we handle.

"gtp_prime" is a Boolean; make it a gboolean.

Dissect the first 4 octets of the header one field at a time, so that if
the packet is cut short by a snapshot length we at least dissect what's
there.

32.295 isn't entirely clear on what the 20-byte header for GTP' v0 is;
assume it's the same as the header for GTP v0.

Once we've fetched the length field from the fixed-length portion of the
header, set the length of the tvbuff to the sum of the offset past the
fixed-length portion and the length field, to catch running past that
value.

Use GTP_E_MASK|GTP_S_MASK|GTP_PN_MASK as the mask for testing for the
presence of those fields, to make it a bit clearer what's being checked
for.

Don't actually add those fields to the protocol tree unless the flag for
the field is set.

We only need one chunk of code to handle extension headers.

Make that chunk a loop, and put the header in as an FT_NONE item, with
the length, header data, and next header under it.  Put the initial next
header field in as well.  (We treat this like IPv6 extension headers,
with the next header field being part of the previous header, rather
than like a set of TLVs, with the next header field being the type value
of its header.)

Fail if the extension header length is zero.

Use the reported length when processing IEs or T-PDU payload.

svn path=/trunk/; revision=48068
2013-03-04 21:40:36 +00:00
Pascal Quantin 0efdddc61f From Josef Zila via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8408 :
Add configurable TCP and UDP ports for MEMCACHE dissector

svn path=/trunk/; revision=48064
2013-03-04 17:48:56 +00:00
Alexis La Goutte 42dce2d033 Add 802.11 Tag RSNI IE (65)
(Not tested...)

svn path=/trunk/; revision=48063
2013-03-04 17:16:35 +00:00
Alexis La Goutte 512a68479c From chaitanya via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8432 BE (3) AC is wrongly named as "Video" in (qos_acs)
In the array of WME AC names, the name for tid 3 is wrongly named as "Video" it should be "Best Effort" instead.

#BACKPORT(1.8,1.6)

svn path=/trunk/; revision=48062
2013-03-04 17:16:26 +00:00
Alexis La Goutte ea4c5708b2 Add 802.11 Tag Antenna (64)
svn path=/trunk/; revision=48061
2013-03-04 17:16:17 +00:00
Alexis La Goutte 95dff87ead Add 802.11 Tag BSS Average Access Delay IE (63)
svn path=/trunk/; revision=48060
2013-03-04 17:16:07 +00:00
Alexis La Goutte 430c8b13e3 Add 802.11 BSS AC Access Delay IE (68)
(Only display the value in decimal don't yet display the Average Access Delay , See 8.4.2.41 BSS Average Access Delay element )

svn path=/trunk/; revision=48057
2013-03-04 17:15:40 +00:00
Alexis La Goutte 5a43ae12f6 Fix typo about BSS AC/AVG Access Delay
svn path=/trunk/; revision=48056
2013-03-04 17:15:24 +00:00
Alexis La Goutte 089f1832af Enhance HT Control (proto_tree_add_uint/boolean/* => proto_tree_add_item
svn path=/trunk/; revision=48055
2013-03-04 17:15:09 +00:00
Alexis La Goutte 559aa015d6 Remove expert_info for unknown/undecode Atheros frame...
svn path=/trunk/; revision=48054
2013-03-04 17:14:58 +00:00
Alexis La Goutte e16ea8d71e From 802.11-2012.pdf
Enhance Extended Capabilities IE (127)
* Update list of supported bits...
* ...

svn path=/trunk/; revision=48053
2013-03-04 17:14:49 +00:00
Alexis La Goutte f725d4c261 Fix typo about length of BSS Available Admission Capacity IE
svn path=/trunk/; revision=48052
2013-03-04 17:14:37 +00:00
Anders Broman e12ac388b0 Use explicit casts.
svn path=/trunk/; revision=48048
2013-03-04 07:25:57 +00:00
Anders Broman 37a86e4de6 Use explicit casts.
svn path=/trunk/; revision=48045
2013-03-04 06:48:36 +00:00
Anders Broman 04ec1e0984 Use explicit casts.
svn path=/trunk/; revision=48043
2013-03-03 21:22:25 +00:00
Pascal Quantin 0d9dfe4b26 Fixed two wrong encoding parameters found by fix-encoding-args.pl and a typo error
svn path=/trunk/; revision=48041
2013-03-03 19:32:22 +00:00
Michael Mann 78fe8ac7e9 Replace proto_tree_add_text "error messages" with expert_add_info_format
svn path=/trunk/; revision=48032
2013-03-03 07:29:28 +00:00
Guy Harris 607bb97056 The general convention for "interpreted" fields, where we display a more
human-friendly version of the value followed by the raw value, is to put
the human-friendly name first, with the raw value after it in
parentheses.  Follow that convention for the command code.

svn path=/trunk/; revision=48029
2013-03-03 01:31:49 +00:00
Guy Harris 4d978fd997 proto_tree_add_uint_format_value() puts the field name into the textual
representation for you; the format string should not include the field
name.

Add protocol items to the SliMP3 tree, not to the top-level tree.

If we're fetching a 16-bit value from the protocol tree and multiplying
it by 2, it won't necessarily fit in a guint16; make the variables used
for that guints.

The sequence field of the MP3 data ack packet isn't being fetched from
the packet, so just use proto_tree_add_item() for it (rather than using
a value fetched for a previous field).

Use %u to format unsigned values.

svn path=/trunk/; revision=48028
2013-03-03 01:17:26 +00:00
Pascal Quantin 2eb92f7b86 Revert file committed by mistake in r48023
svn path=/trunk/; revision=48026
2013-03-02 23:22:19 +00:00
Pascal Quantin 5a37615eeb Remove a useless pointer
svn path=/trunk/; revision=48024
2013-03-02 22:59:50 +00:00
Pascal Quantin 0a17799d61 From Ed Beroset via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 :
Remove C++ incompatibilities from most of the dcerpc code

svn path=/trunk/; revision=48023
2013-03-02 22:54:39 +00:00
Michael Mann 1658b20e44 Convert at least enough proto_tree_add_text to proto_tree_add_item/expert_info to passify checkAPIs.pl.
Removed check_col calls.

svn path=/trunk/; revision=48016
2013-03-02 21:05:32 +00:00
Guy Harris 47b4b15d80 Move the setting of pt to where it was before the changes, so it's
before the point at which it's added to the protocol tree.

Put the ATM channel in the ATM tree rather than the top-level tree.

Fix the name for the CPI field (copy-and-pasteo).

svn path=/trunk/; revision=48015
2013-03-02 21:01:08 +00:00
Anders Broman 4f5d04e115 From beroset:
remove C++ incompatibilities

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416

svn path=/trunk/; revision=48013
2013-03-02 19:21:38 +00:00
Evan Huus 105dbc4027 Pass the same offset to tvb_ensure_bytes_exist and fragment_add.
One minor part of https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8380

svn path=/trunk/; revision=48010
2013-03-02 16:23:21 +00:00
Michael Mann f473d9a3d7 General cleanup including:
1. Convert proto_tree_add_text to proto_tree_add_item/expert info
2. Change to "new style" dissector
3. Use standard malformed packet interface

Reviewed by Francesco Fondelli

svn path=/trunk/; revision=48009
2013-03-02 16:00:43 +00:00
Anders Broman 9991973c37 Use explicit casts.
svn path=/trunk/; revision=48008
2013-03-02 14:51:04 +00:00
Pascal Quantin 240af26981 Fix a copy/paste error and factorize dissection of extension header length and next extension header
svn path=/trunk/; revision=48007
2013-03-02 13:12:24 +00:00
Anders Broman c5ee81098c From beroset:
remove C++ incompatibilities

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416

svn path=/trunk/; revision=48006
2013-03-02 12:10:56 +00:00
Anders Broman 599d2e8a9c From Lakshmi Narayana Madala :
GTP dissector enhanced to support UDP Port extension header.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8418

svn path=/trunk/; revision=48004
2013-03-02 11:33:46 +00:00
Balint Reczey 1ebdb2e521 Export libwireshark symbols using WS_DLL_PUBLIC define
Also remove old WS_VAR_IMPORT define and related Makefile magic
everywhere in the project.

svn path=/trunk/; revision=47992
2013-03-01 23:53:11 +00:00
Evan Huus 0e67f0c7a1 From Steve Magnani via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8338
Centralize logic related to per-interface conversations, and expose it for use
by class-specific dissectors.

Class-specific descriptor dissectors also need to know the interface in whose
context they are called to work.

This is a prerequisite for a USB Video Class dissector, which needs to decode
many class-specific descriptors.

svn path=/trunk/; revision=47990
2013-03-01 22:57:13 +00:00
Anders Broman 8dbab6179d From beroset:
remove C++ incompatibilities from packet-xml.c

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416

svn path=/trunk/; revision=47988
2013-03-01 20:36:59 +00:00
Evan Huus b780fc1b7a Revert r47839, it is not needed with r47979.
svn path=/trunk/; revision=47980
2013-03-01 19:10:04 +00:00
Evan Huus 2c420806b5 Add a much better workaround for bug #8382 and some expert info.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8382

svn path=/trunk/; revision=47979
2013-03-01 19:08:30 +00:00
Pascal Quantin b9f723bb18 From Ed Beroset via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 :
Remove C++ incompatibilities from packet-smb.C

svn path=/trunk/; revision=47977
2013-03-01 18:35:51 +00:00
Evan Huus ba18b3d7d9 Addendum to r47962, caught by Jakub Zawadzki via
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8379

Respect the offset given us by TCP when fetching PDU len.

svn path=/trunk/; revision=47974
2013-03-01 13:24:24 +00:00
Chris Maynard 3478c66464 Fix Coverity CID 280396: Logically dead code.
svn path=/trunk/; revision=47973
2013-03-01 07:02:08 +00:00
Chris Maynard 181751aa74 Fix Coverity CID 280371: Logically dead code.
svn path=/trunk/; revision=47972
2013-03-01 06:52:25 +00:00
Chris Maynard 8a6d78e053 Fix Coverity CID 280369: Logically dead code.
svn path=/trunk/; revision=47970
2013-03-01 06:29:18 +00:00
Anders Broman ffeae7cfbf From beroset:
remove C++ incompatibilities from packet-pw-atm.c

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416

svn path=/trunk/; revision=47968
2013-03-01 06:01:51 +00:00
Chris Maynard d4adb608c1 Fix Coverity CID 280367: Logically dead code.
svn path=/trunk/; revision=47967
2013-03-01 05:46:07 +00:00
Chris Maynard 0e1d169409 Fix Coverity CID 280365: Logically dead code.
#BACKPORT (1.8, 1.6)

svn path=/trunk/; revision=47966
2013-03-01 05:40:49 +00:00
Chris Maynard f9bc424a05 Fix Coverity CID 280362: Logically dead code.
#BACKPORT (1.8, 1.6)

svn path=/trunk/; revision=47965
2013-03-01 05:29:12 +00:00
Chris Maynard 595a6d4504 Fix Coverity CID 280391: Logically dead code.
svn path=/trunk/; revision=47964
2013-03-01 05:04:03 +00:00
Chris Maynard 069c1d3fa8 Fix Coverity CID 988967: Logically dead code.
svn path=/trunk/; revision=47963
2013-03-01 04:53:26 +00:00
Evan Huus ade06ecf1c From Sebastiano Di Paola via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8379
New dissector for the honeypot-feeds protocol.

From me: Misc. tweaks to expert info layout and remove a few unneeded initializers.

svn path=/trunk/; revision=47962
2013-03-01 02:07:58 +00:00
Evan Huus b8c73d01b3 Re-add statement accidentally removed in r47950 that was resulting in a
variable being used uninitialized.

svn path=/trunk/; revision=47959
2013-02-28 23:39:47 +00:00
Michael Mann 7eac6729d8 Replace proto_tree_add_text with proto_tree_add_item/expert_info
svn path=/trunk/; revision=47956
2013-02-28 23:01:31 +00:00
Pascal Quantin 8ed55b8eef Fix dissection of feedback with large CID
svn path=/trunk/; revision=47955
2013-02-28 22:22:52 +00:00
Michael Mann 4d1022a5ac Use proto_tree_add_item (or similar) instead of proto_item_add_text.
svn path=/trunk/; revision=47950
2013-02-28 20:17:33 +00:00
Michael Mann 7cf5c59d6e Convert proto_item_add_text to proto_item_add_item.
General whitespace cleanup, add modelines.

svn path=/trunk/; revision=47949
2013-02-28 20:07:15 +00:00
Guy Harris 6c29b9edd6 Update a comment.
svn path=/trunk/; revision=47947
2013-02-28 18:13:41 +00:00
Anders Broman e8af5b4e67 Dissect japan ISUP Charging Info IE.
svn path=/trunk/; revision=47946
2013-02-28 17:56:02 +00:00
Pascal Quantin 7adefca1bb From Hadriel Kaplan via https://www.wireshark.org/lists/wireshark-dev/201302/msg00216.html :
Fix dissection of method name in case of RAck header

svn path=/trunk/; revision=47936
2013-02-28 08:13:40 +00:00
Guy Harris fb8f5b815a Combine all the flags fields into one field, and get rid of the
commented-out/#if-ed-out "Data1" field, as it's the same field.

Give the flags in that field names including "flags".

Shuffle the fields around to put "Flags" (a/k/a Data1) where Data1 was,
and put the bits in that field after it.

Update the URL for the spec at IBM.

Reformat the entries in hf_netb[] to use the same style.

svn path=/trunk/; revision=47933
2013-02-28 04:29:43 +00:00
Chris Maynard 764cb1f99a Fix Coverity CID 719419: Dereference after null check.
svn path=/trunk/; revision=47932
2013-02-28 03:15:57 +00:00
Chris Maynard e91a73e2c0 Fix Coverity CID 280377: Dead default in switch.
svn path=/trunk/; revision=47931
2013-02-28 02:48:16 +00:00
Chris Maynard 97cc60f8fa Fix Coverity CID 280366: Dead default in switch.
svn path=/trunk/; revision=47930
2013-02-28 02:37:14 +00:00
Guy Harris c522bb09c2 The LDAP dissector uses register_frame_end_routine(), so it needs to
include packet-frame.h.

svn path=/trunk/; revision=47928
2013-02-28 00:09:26 +00:00
Pascal Quantin 7fdbff4822 Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8378 :
A detailed diagnostic information contains either a SMS-SUBMIT-REPORT or a SMS-DELIVERY-REPORT. Set P2P direction accordingly.

svn path=/trunk/; revision=47927
2013-02-27 23:08:17 +00:00
Guy Harris 8c15ade43b Include <epan/show_exception.h>, as show_exception() is called.
svn path=/trunk/; revision=47926
2013-02-27 23:07:25 +00:00
Guy Harris 53fffe0414 Get rid of unnecessary includes of "packet-frame.h".
svn path=/trunk/; revision=47925
2013-02-27 23:02:18 +00:00
Guy Harris 6b629c4d92 Move show_exception() and show_reported_bounds_error() to
epan/show_exception.c, as it's used outside
epan/dissectors/packet-frame.c.  Update their callers to include
<epan/show_exception.h> to get their declaration.

Add a CATCH_NONFATAL_ERRORS macro that catches all exceptions that, if
there's more stuff in the packet to dissect after the dissector call
that threw the exception, doesn't mean you shouldn't go ahead and
dissect that stuff.  Use it in all those cases, including ones where
BoundsError was inappropriately being caught (you want those passed up
to the top level, so that the packet is reported as having been cut
short in the capture process).

Add a CATCH_BOUNDS_ERRORS macro that catches all exceptions that
correspond to running past the end of the data for a tvbuff; use it
rather than explicitly catching those exceptions individually, and
rather than just catching all exceptions (the only place that
DissectorError should be caught, for example, is at the top level, so
dissector bugs show up in the protocol tree).

Don't catch and then immediately rethrow exceptions without doing
anything else; just let the exceptions go up to the final catcher.

Use show_exception() to report non-fatal errors, rather than doing it
yourself.
 
If a dissector is called from Lua, catch all non-fatal errors and use
show_exception() to report them rather than catching only
ReportedBoundsError and adding a proto_malformed item.

Don't catch exceptions when constructing a trailer tvbuff in
packet-ieee8023.c - just construct it after the payload has been
dissected, and let whatever exceptions that throws be handled at the top
level.

Avoid some TRY/CATCH/ENDTRY cases by using checks such as
tvb_bytes_exist() before even looking in the tvbuff.

svn path=/trunk/; revision=47924
2013-02-27 22:43:54 +00:00
Guy Harris 97a0ad8eab For subvectors, make a top-level item to cover the entire subvector, and
put the length, identifier, and value as visible sub-items underneath
it.  If the length is bad, add an expert info indication under the item
for the length, rather than using proto_malformed.  Add checks for the
lengths of each type of subvector.

Add some more subvector types from IEEE 802.5-1998, and use the names
from that spec.

svn path=/trunk/; revision=47923
2013-02-27 22:07:44 +00:00
Guy Harris cb2d1c52a9 When decompressing, put an entry into the protocol tree that covers all
the compressed data, put the entries for particular parts of that data
under that entry, and, when we have a problem decompressing, add an
expert info item to that entry, rather than just adding text or using
proto_malformed.  Do so for *all* decompression problems; in particular,
check for decompressed_entry() returning NULL, which it can do.

tvb_new_child_real_data() won't throw an exception, so don't bother
checking for that.

If, after the first pass, we can't find the uncompressed data for a
frame, report it as a dissector bug.

Check whether we have room for a byte in the uncompressed data buffer
*before* copying it.

Other cleanups.

svn path=/trunk/; revision=47922
2013-02-27 22:04:40 +00:00
Pascal Quantin b5bbd0712e From J. Schoenwaelder via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8410 :
Fix dissection of flowDurationMicroseconds in Netflow dissector

svn path=/trunk/; revision=47921
2013-02-27 21:19:37 +00:00
Anders Broman e1c43d0095 Dissect Japan ISUP Charge rate transfer (flexible charging) .
svn path=/trunk/; revision=47919
2013-02-27 20:02:38 +00:00
Chris Maynard a4e2819e27 Use ENC_NA for single byte fields, as that appears to be the generally agreed upon convention. Add modelines.
#BACKPORT(1.8) + r47915


svn path=/trunk/; revision=47918
2013-02-27 16:18:16 +00:00
Michael Mann d48920d42a Protocol is ENC_BIG_ENDIAN, adjust accordingly.
Bug 8407 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8407)

svn path=/trunk/; revision=47915
2013-02-27 16:08:48 +00:00
Anders Broman 7465ad1572 Fix
- warning: unused parameter 'item'.
- warning: format not a string literal and no format arguments.

svn path=/trunk/; revision=47912
2013-02-27 05:53:46 +00:00
Michael Mann f89cb20e2b Replace proto_tree_add_text with proto_tree_add_item + expert_info. Not enough to pacify checkAPIs.pl standards, but its a vast improvement.
svn path=/trunk/; revision=47910
2013-02-27 03:58:23 +00:00
Michael Mann 07a9b935de Increase use of proto_tree_add_item (mostly replacing proto_tree_add_text)
svn path=/trunk/; revision=47909
2013-02-27 03:37:45 +00:00
Michael Mann a38cf513de Replace proto_tree_add_text with proto_tree_add_item + expert_info
svn path=/trunk/; revision=47908
2013-02-27 03:35:04 +00:00
Pascal Quantin 24b42dd6e1 Fix warning: 'rrc_sub_handle' may be used uninitialized in this function
svn path=/trunk/; revision=47904
2013-02-26 19:14:14 +00:00
Michael Mann 8c0d526f58 SNMP dissector should handle aes256 (better version than r47690)
svn path=/trunk/; revision=47902
2013-02-26 11:38:39 +00:00
Bill Meier 96a24cc79f Fix spelling/typos found using a list of commonly misspelled words.
The misspellings were mostly in comments but some were
in text strings visible to the user.


svn path=/trunk/; revision=47899
2013-02-26 04:42:26 +00:00
Jeff Morriss b320eb3d97 Revert r44559: go back to using g_malloc()'d memory for SCTP reassembly. That
way we don't keep two copies of the fragments in memory until the file is
closed.

wmem is probably a better alternative to this.

svn path=/trunk/; revision=47897
2013-02-26 02:36:05 +00:00
Bill Meier d449c31d1d its ==> it's & it's ==> its as needed.
svn path=/trunk/; revision=47892
2013-02-26 01:22:18 +00:00
Bill Meier 1823aa007c it's ==> its & its ==> it's as needed.
svn path=/trunk/; revision=47891
2013-02-26 01:06:19 +00:00
Bill Meier 88a5865b64 No need for 'if (...initialized) {...}' in proto_reg_handoff...()
svn path=/trunk/; revision=47890
2013-02-26 01:00:25 +00:00
Pascal Quantin 0037adc30e Dissect more feedback options
svn path=/trunk/; revision=47887
2013-02-25 22:36:24 +00:00
Evan Huus bdca315497 From Alex Badea via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8395
Support AES-GCM ipsec encryption using CTR (since libgcrypt doesn't support
GCM). Using CTR instead gets us decryption, but does not verify authentication.

svn path=/trunk/; revision=47886
2013-02-25 22:19:15 +00:00
Chris Maynard 8692843ee3 Fix Coverity CID 986569: Unused pointer value.
svn path=/trunk/; revision=47881
2013-02-25 19:28:24 +00:00
Evan Huus 32c23fba25 From Michal Labedzki via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8396
Add Bluetooth HCRP dissector.

From me: rename a preference to be a bit clearer.

svn path=/trunk/; revision=47878
2013-02-25 17:55:32 +00:00
Pascal Quantin d7b294a17f Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8397 :
Prevent an out of bounds access when trying to call RRC sub dissectors and fallback to DATA dissector

svn path=/trunk/; revision=47876
2013-02-25 16:39:43 +00:00
Chris Maynard d19ec95482 Fix some typos.
svn path=/trunk/; revision=47873
2013-02-25 16:19:15 +00:00
Jaap Keuter 1b205127f8 Fix for bug 7939:
Register application/json-rpc and application/jsonrequest media types for JSON.

svn path=/trunk/; revision=47872
2013-02-25 06:48:35 +00:00
Gerald Combs 977730ed7c The IEEE may not care what's in an SSID but Pango is much more picky.
If the SSID isn't valid UTF-8 truncate it and indicate that we did so.
(As bug 5738 points out this is part of a more general problem but in
the meantime this keeps us from crashing.)

Don't try to decrypt too-long SSIDs.

I feel compelled to change my SSID at home to a series of carriage
returns, linefeeds, and SNOWMAN (U+2603).

svn path=/trunk/; revision=47871
2013-02-25 04:16:37 +00:00
Pascal Quantin 1c9c5621c8 Fix display type
svn path=/trunk/; revision=47870
2013-02-24 22:39:46 +00:00
Pascal Quantin 959e3e3e2c Various enhancements to ROHC dissector:
- fix dissection of type 0 packets with large CID
- add dissection of type 1 and 2 packets (extension 3 dissection to be done)
- add dissection of UDP checksum

svn path=/trunk/; revision=47869
2013-02-24 22:06:53 +00:00
Anders Broman 8fdfd9b612 Add application/x-tia-p25-issi and application/x-tia-p25-sndcp
fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6248

svn path=/trunk/; revision=47864
2013-02-24 19:51:23 +00:00
Alexis La Goutte d337d0574d Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=47862
2013-02-24 19:13:46 +00:00
Alexis La Goutte bb0bb441d2 Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=47861
2013-02-24 19:13:36 +00:00
Alexis La Goutte c5a461e2f8 Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=47860
2013-02-24 19:13:27 +00:00
Alexis La Goutte 88c86c1f81 Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=47859
2013-02-24 19:13:18 +00:00
Alexis La Goutte 3972e6ba82 From Mark Phillips via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8368
Minor corrections to the VHT IE decode

* Correct the Rx, Tx and Basic MCS map decodes. The number of Spatial streams should run from 1-8 (not 0-7).
* Change Several misstyped Mhz into MHz

From me:
Remove comma for big number (use space)
Add Octets unit in some hf description

svn path=/trunk/; revision=47858
2013-02-24 19:10:11 +00:00
Alexis La Goutte ac0692bfb8 Fix AP / Sta CF Pollable value_string (the value is shifted !)
svn path=/trunk/; revision=47857
2013-02-24 19:09:55 +00:00
Alexis La Goutte 961f9d1f70 Remove some "duplicate" TFS in 802.11 field capability Add in use / not in use in common TFS
svn path=/trunk/; revision=47856
2013-02-24 19:09:04 +00:00
Jakub Zawadzki 26c04f86b0 Use AF_ defines from <epan/aftypes.h>
svn path=/trunk/; revision=47850
2013-02-24 09:38:22 +00:00
Pascal Quantin 622bd16abf Add dissection of uncompressed IP-ID
svn path=/trunk/; revision=47844
2013-02-23 22:26:29 +00:00
Martin Kaiser 09143deee5 add instruction byte for "get challenge"
svn path=/trunk/; revision=47841
2013-02-23 19:02:12 +00:00
Pascal Quantin 3d854528ce Enhance dissection of uncompressed profile and type 0 packets.
Always restore saved private data when returning from dissector.

svn path=/trunk/; revision=47840
2013-02-23 18:45:14 +00:00
Evan Huus 4c4abaf771 Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8382
Don't pass a length longer than the strlen of the string into
format_text(). This can happen if the length we ask for from the
tvb overflows, for example.

svn path=/trunk/; revision=47839
2013-02-23 15:22:40 +00:00
Alexis La Goutte cafb554d29 From 802.11k-2008 : Amendment 1: Radio Resource Measurement of Wireless LANs Add Radio Measurement flag from Capability Information Field
svn path=/trunk/; revision=47838
2013-02-23 11:21:29 +00:00
Alexis La Goutte d336579317 Update x11-dissectors with last mesa trunk ( snb-magic-14719-g2fa9e4c ) and xcbproto trunk ( 1.8-2-gc0d65da )
svn path=/trunk/; revision=47837
2013-02-23 11:21:20 +00:00
Alexis La Goutte 0885b65773 Replace by proto_tree_add_item and use FT_NONE type for fixed parameters
svn path=/trunk/; revision=47835
2013-02-23 11:21:02 +00:00
Michael Mann 5a781022bc Convert proto_tree_add_text to proto_tree_add_item and expert_info.
svn path=/trunk/; revision=47832
2013-02-23 03:48:04 +00:00
Chris Maynard 3520b5dfac Trivial: Fix some typos.
svn path=/trunk/; revision=47831
2013-02-23 01:57:15 +00:00
Chris Maynard 0f93d115e6 Fix Coverity CID 986498: Unused pointer value.
svn path=/trunk/; revision=47830
2013-02-23 00:45:05 +00:00
Jakub Zawadzki ac463593c4 No need for static dissector_handle_t.
svn path=/trunk/; revision=47827
2013-02-22 23:53:08 +00:00
Pascal Quantin 13729e9c11 When dissecting a feedback, if no context info is present use private data if available
svn path=/trunk/; revision=47826
2013-02-22 17:34:56 +00:00
Alexis La Goutte 2fda9a32c2 Enhance dissection of A-MSDU Frame (Make length filterable...)
svn path=/trunk/; revision=47824
2013-02-22 16:51:33 +00:00
Alexis La Goutte 2bdc84cfc5 Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=47823
2013-02-22 16:51:24 +00:00
Alexis La Goutte 5416f1093e Add 802.11 BSS Available Admission Capacity (67)
svn path=/trunk/; revision=47822
2013-02-22 16:51:15 +00:00
Alexis La Goutte 61f4e1f932 Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=47821
2013-02-22 16:51:06 +00:00
Alexis La Goutte 1f323f1f4c Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=47820
2013-02-22 16:50:58 +00:00
Alexis La Goutte 0157943ca1 Enhance 802.11 dissector when IE Tag is unknown (Add also a Expert info)
svn path=/trunk/; revision=47819
2013-02-22 16:50:49 +00:00
Alexis La Goutte 00adc6c0a2 Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=47818
2013-02-22 16:50:40 +00:00
Alexis La Goutte 0b8125d9cb From 802.11-2012.pdf Update Information Element (IE Tag) List
svn path=/trunk/; revision=47817
2013-02-22 16:50:08 +00:00
Chris Maynard 2f791fb573 From Edwin Groothuis via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8375 : Move packet-pres.c from DISSECTOR_SRC to ASN1_DISSECTOR_SRC.
svn path=/trunk/; revision=47814
2013-02-22 01:45:10 +00:00
Chris Maynard 2aac1e8390 From Edwin Groothuis via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8376 : #include "config.h".
svn path=/trunk/; revision=47813
2013-02-22 01:34:53 +00:00
Evan Huus 91b9ecd0a0 Trivial cleanups:
- use a gboolean instead of an int where appropriate
- comment out an unnecessary variable assignment
- move some other assignments to before the address of the variable is taken;
  this makes the data flow more natural and cleans up some cppcheck warnings

svn path=/trunk/; revision=47811
2013-02-21 22:24:06 +00:00
Michael Mann e094c21301 Minor Bluetooth fixes
1. Allow to DecodeBy payload over AVCTP
2. Fix L2CAP CID payload recognize after disc
3. Removed unneeded _U_
4. Fall back to control channel in AVRCP
5. Fix time-tracking for passthrough and capability AVRCP commands

From Michal Labedzki, bug 8367 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8367)

svn path=/trunk/; revision=47810
2013-02-21 22:00:32 +00:00
Michael Mann bfeeba6f5e Fix AVCTP, AVRCP, HCI AVL and L2CP for multiple interfaces/adapters
From Michal Labedzki, bug 8367 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8367)

svn path=/trunk/; revision=47809
2013-02-21 21:35:19 +00:00
Evan Huus b58c95cf10 Fix some issues potentially similar in nature to the one found in
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8364

There are probably some still left.

svn path=/trunk/; revision=47808
2013-02-21 21:18:46 +00:00
Jakub Zawadzki c5a71b1006 String passed to val_to_str() must have int format specifier (%u, %d, %x, and so on...).
Fix some cases (easy to grep) by call to val_to_str_const().

svn path=/trunk/; revision=47807
2013-02-21 21:04:59 +00:00
Pascal Quantin a3fca22472 Dissect Feedback type 1/2 packets for UDP and Uncompressed profiles
svn path=/trunk/; revision=47806
2013-02-21 19:18:29 +00:00
Evan Huus df5e22e57a From Chris Maynard via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8364
Pacify the fuzz-bots for now, though a better fix is needed.

svn path=/trunk/; revision=47805
2013-02-21 18:53:18 +00:00
Evan Huus c1f3dd7242 From Michal Labedzki via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8366
Add support for bluetooth MCAP Protocol.

svn path=/trunk/; revision=47804
2013-02-21 18:43:26 +00:00
Martin Kaiser 38a73a32f3 include the wsutil/wsgcrypt.h instead of including gcrypt.h directly
svn path=/trunk/; revision=47802
2013-02-21 18:23:29 +00:00
Alexis La Goutte b9a0eaedae Fix indent (Tab => 4 Spaces) Remove whitespace And Modelines info
svn path=/trunk/; revision=47800
2013-02-21 15:32:29 +00:00
Alexis La Goutte 38655fbd2f Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=47799
2013-02-21 15:32:15 +00:00
Alexis La Goutte 84e31e29b7 Replace proto_tree_add_text/uint/boolean by proto_tree_add_item Use bitmask (remove tvb_get_bits(..))
svn path=/trunk/; revision=47798
2013-02-21 15:32:07 +00:00
Alexis La Goutte 964d9adf42 Fix indent (Tab => 4 Spaces) and Add Modelines
svn path=/trunk/; revision=47797
2013-02-21 15:31:58 +00:00
Alexis La Goutte 7523dc8af7 Fix Modelines
svn path=/trunk/; revision=47796
2013-02-21 15:31:50 +00:00
Alexis La Goutte 95e415ea5a From report of Jim Young via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8345 Malformed IEEE80211 frame triggers DISSECTOR_ASSERT
In some cases these malformed frames trigger a DISSECTOR_ASSERT() in proto.c's proto_item_set_len().  This happens when packet-ieee80211.c's dissect_ieee80211_mgt() calls packet-ieee80211.c's get_tagged_parameter_tree() with a "size" parameter value of -1.

From me:
Replace by proto_tree_add_item with -1 length (and use FT_NONE ftype)

svn path=/trunk/; revision=47795
2013-02-21 15:20:25 +00:00
Alexis La Goutte fbbe22d170 Fix CheckAPI about trailing space
svn path=/trunk/; revision=47794
2013-02-21 12:31:16 +00:00
Alexis La Goutte d2b0c28f71 From Paul via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8319 CAPWAP Header dissector returns invalid length
The problem is when Wireshark dissect CAPWAP packets from Cisco without preference "Cisco Wireless Controller Support"

In this case the whole packet decoded wrong, not only Wireless Specific Information field in CAPWAP header

I suggest following patch to dissect_capwap_header function to always return correct length of CAPWAP header based on HLEN header field

From me:
Add expert info to display a warning about Calculate length and Header length are different (and suggest to activate Cisco Wireless Controller Support Preference)

svn path=/trunk/; revision=47793
2013-02-21 10:50:28 +00:00
Pascal Quantin a7b6cf24e7 From Harald Welte via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8365 :
Add GSMTAP support for UMTS RRC captures

svn path=/trunk/; revision=47792
2013-02-21 10:08:53 +00:00
Jaap Keuter f5791fbd2d I'm pretty sure that reassembled IPv6 data does not fit in a uint32.
svn path=/trunk/; revision=47791
2013-02-21 07:37:10 +00:00
Chris Maynard f1aaac47c0 Misc. fixes while looking at bug 8364 (which this patch does NOT address):
1) hf_reload_dmflags is 8 bytes, not 64 bytes.
2) Swap dissection order of dmflags and length.
3) Register ett_reload_self_tuning_data and ett_reload_diagnosticrequest.
#BACKPORT(1.8)

svn path=/trunk/; revision=47789
2013-02-21 03:54:17 +00:00
Martin Kaiser 642478b43a fix dead assignment
http://www.wireshark.org/download/automated/analysis/scan-build-2013-02-20-2/report-OsH7hZ.html#EndPath

svn path=/trunk/; revision=47782
2013-02-20 22:56:29 +00:00
Martin Kaiser 27051346f9 TABs -> spaces
add modelines

svn path=/trunk/; revision=47781
2013-02-20 22:53:26 +00:00
Evan Huus d7865654fc From Chris Maynard via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8360
Bail out if length is less than the minimum required length.

svn path=/trunk/; revision=47776
2013-02-20 20:49:36 +00:00
Evan Huus 4b8a9dfefa Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8359
Prevent an infinite loop if we don't recognize the param type and
the length is 0.

svn path=/trunk/; revision=47775
2013-02-20 20:41:33 +00:00
Anders Broman 63093db8d2 From Michael Mann:
Add text/parameters
Fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5714
If we need something better we should make a  text/parameters dissector I suppose.

svn path=/trunk/; revision=47772
2013-02-20 19:50:12 +00:00
Chris Maynard 1455b36647 Fix Coverity CID 751720: Logically dead code.
In fixing this bug, also fix another:  Be sure to use tvb_length() and not tvb_reported_length() in get_utp_version(), since this is essentially where the heuristics are being applied to decide whether to accept the packet or not.

svn path=/trunk/; revision=47761
2013-02-20 02:15:20 +00:00
Guy Harris 021069a56b Clean up white space - get rid of 4-space tabs.
Reformat the hf[] array to be consistent, and get rid of some bogus
blurbs (probably copy-and-pasteos).

svn path=/trunk/; revision=47759
2013-02-20 01:37:08 +00:00
Guy Harris 0aef9fc00d Improve a comment - what matters is that tvb_new_real_data() can throw
an exception, not how it happens to be implemented currently.

svn path=/trunk/; revision=47755
2013-02-20 00:56:44 +00:00
Chris Maynard 552e98b7a3 Fix Coverity CID 984638: Unused pointer value.
svn path=/trunk/; revision=47754
2013-02-20 00:53:19 +00:00
Guy Harris 29715ccc8f How can I get a new tvbuff that starts at an offset within a given
tvbuff and runs to the end of the tvbuff?  Let me count the ways....

Replace a bunch of different ways of doing that (some incorrect, in that
they're not properly handling tvbuffs where the captured and reported
lengths are different) with tvb_new_subset_remaining().

svn path=/trunk/; revision=47751
2013-02-19 23:17:07 +00:00
Anders Broman 9736ff7cb5 Remove experiment with global code
svn path=/trunk/; revision=47747
2013-02-19 18:53:47 +00:00
Anders Broman fc2b80ac0b Add the remaining asn1 files "CODE global" not handled yet.
svn path=/trunk/; revision=47746
2013-02-19 18:44:06 +00:00
Guy Harris f910cb502c calc_checksum() should be passed the length of the block to be
checksummed, which is the length of the TPDU, not that length + 1.

Calculate the TPDU length correctly - use
tvb_reported_length_remaining(), not tvb_length_remaining() (we want the
*actual* length, not the amount of captured data we have), and take the
offset handed to the dissector routine into account.  Don't take the
length indicator into account for TPDUs with user data, as they run to
the end of the lower-level packet containing the TPDU(s).  The CLTP UD
TPDU contains user data.

Note that this dissects both COTP *and* CLTP (that's why it's
"packet-ositp.c", not "packet-cotp.c").

Separate some groups of #includes with blank lines.

svn path=/trunk/; revision=47745
2013-02-19 07:06:55 +00:00
Chris Maynard 2a02a5d367 According to wikipedia, the A6M was outdated by 1944. Let it rest in peace.
svn path=/trunk/; revision=47744
2013-02-19 04:48:34 +00:00
Guy Harris c037516c5e Whitespace tweaks.
svn path=/trunk/; revision=47743
2013-02-19 03:55:14 +00:00
Chris Maynard 3010f6a0cc Don't call expert_add_info_format() from within an if (tree) {} block.
Misc. whitespace changes, remove tabs, add modelines to match current scheme.

svn path=/trunk/; revision=47742
2013-02-19 01:56:42 +00:00
Michael Mann 425ede28b4 Bugfix OSITP - Incorrect TP4 checksum calculation (ATN extended checksum) in case of multiple TPDU's per frame.
Bug 8293 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8293)

svn path=/trunk/; revision=47741
2013-02-19 01:34:15 +00:00
Guy Harris ef715a28ae For each dynamic-payload hash table, keep a Boolean indicating whether
it's been used in an rtp_set_address() or srtp_set_address() call and,
if that Boolean is set, don't free the hash table; this fixes a case
where the hash table was freed while it was in use.

svn path=/trunk/; revision=47740
2013-02-18 22:37:07 +00:00
Michael Mann 5effa93ce0 Use tcp_dissect_pdus for better dissection on TCP. Adjusted UDP dissection accordingly.
Various cleanup to use proto_tree_add_item more often.

svn path=/trunk/; revision=47739
2013-02-18 22:12:07 +00:00
Anders Broman b38062ff8f Dissect more supplementarry services
svn path=/trunk/; revision=47738
2013-02-18 19:34:04 +00:00
Guy Harris 6a420594ab Enums aren't guaranteed to be able to hold a value that doesn't fit in
an int, so don't use enums for special values of the PLP length field.

In addition, use G_GINT64_CONSTANT() to tag them as appropriate for a
guint64.

svn path=/trunk/; revision=47737
2013-02-18 19:31:46 +00:00
Evan Huus e606c22ee3 From Alex Gaertner via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8313
Misc. fixes to the SML dissector:
- one more define added
- removed data_handle (unused)
- removed "check = tvb_get_guint8(tvb, temp_offset);" (value hasn't changed)
- added PI_NOTE 
- CRC fixed, calculation now correct if CRC is transmitted as UINT8

From me:
- clean up indentation
- change modelines to actually match the indentation most commonly used

svn path=/trunk/; revision=47736
2013-02-18 18:19:38 +00:00
Alexis La Goutte 18a87fc0d6 Fix small typo in TPC Report IE
svn path=/trunk/; revision=47734
2013-02-18 17:24:30 +00:00
Alexis La Goutte e9463ef07f Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=47733
2013-02-18 17:24:21 +00:00
Alexis La Goutte e5fc3c8c4b From 802.11-2012.pdf Update Reason Code and Status Code fields
svn path=/trunk/; revision=47732
2013-02-18 17:24:07 +00:00
Alexis La Goutte 8e4e16aeac Display Power Constraint in DEC (and fix a small typo)
svn path=/trunk/; revision=47731
2013-02-18 17:23:57 +00:00
Jaap Keuter 0b0f6947cc Fix for bug 8321:
Feed the tap before trying to dissect the payload. This prevents a malformed 
payload from blocking the tap, resulting in incorrect RTP statistics.

svn path=/trunk/; revision=47729
2013-02-18 06:19:04 +00:00
Michael Mann 0a135e8eb0 Bugfix data combined via ssl_desegment_app_data not visible via "Follow SSL Stream"
From Joe McEachern, bug 6434 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6434)

svn path=/trunk/; revision=47725
2013-02-18 00:58:21 +00:00
Michael Mann 4e27a8a034 Improve SSH state machine so IGNORED messages don't upset the dissection by throwing the "packet count" off.
Bug 5064 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5064)

svn path=/trunk/; revision=47723
2013-02-17 23:00:57 +00:00
Chris Maynard 7735035230 Fix Coverity CID 981983: Unused pointer value.
Additionally:
1) Remove check_col()'s
2) Don't call expert_add_info_format() from within an if (tree) {} block.
3) tvb_reported_length_remaining() can return -1; be sure to handle it.
4) Misc. whitespace changes.

svn path=/trunk/; revision=47722
2013-02-17 22:44:47 +00:00
Michael Mann fd44f9a339 Remove C++ incompatibilities in c1222 dissector.
Also addresses an implicit cast in the epan/uat.h file

Bug 8342 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8342)

svn path=/trunk/; revision=47721
2013-02-17 22:15:16 +00:00
Pascal Quantin 73ef143f95 Update ITU-T E.212 to bulletin 1019 (01.I.2013)
svn path=/trunk/; revision=47720
2013-02-17 21:48:18 +00:00
Guy Harris 61f7b3e031 Squelch some more warnings.
svn path=/trunk/; revision=47717
2013-02-17 20:00:53 +00:00
Guy Harris 947da615c4 Squelch some warnings.
svn path=/trunk/; revision=47716
2013-02-17 19:58:56 +00:00
Michael Mann aa8b665141 Support for SCU/SCP Role Selection and Asynchronous Operations Window Negotiation
From Stefan Allers.  Bug 8347 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8347)

svn path=/trunk/; revision=47715
2013-02-17 19:36:08 +00:00
Anders Broman ad636a9492 Try to fix merge problem.
svn path=/trunk/; revision=47714
2013-02-17 19:35:17 +00:00
Anders Broman 9341c04a12 Add a preferense to the Q.932 dissector wether facility messages should be dissected as QSIG or ETSI.
Add the ISUP Supplementary services dissector.

svn path=/trunk/; revision=47713
2013-02-17 19:28:59 +00:00
Michael Mann 0b916ad1b4 Bugfix DoS in CIMD dissector. Bug 8346 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8346)
svn path=/trunk/; revision=47708
2013-02-17 19:07:14 +00:00
Michael Mann 823493b927 Only allow one packet to act as an SDP response. This should probably be caught at a higher layer (SIP), but the safety net should be there.
Also, cleanup SIP "response error" range.

Fixes crash in bug 8343 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8343)

svn path=/trunk/; revision=47705
2013-02-17 18:25:22 +00:00
Evan Huus 010c8f9d61 Use wmem memory to build most of the diameter hf and ett arrays.
Cleans up many valgrind errors, since we were losing our pointers to
the arrays before shutdown.

svn path=/trunk/; revision=47702
2013-02-17 15:06:35 +00:00
Evan Huus 0e5478cdcd From Alyssa Milburn via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8341
With small additional changes by me

Make many of the length and offset fields in the websocket dissector unsigned.
This fixes a case where we could attempt to malloc (unsigned)-1 bytes of memory.
Also fix one small copy-paste string typo.

svn path=/trunk/; revision=47700
2013-02-17 14:39:16 +00:00
Evan Huus 808d171623 Add missing G_GUINT64_CONSTANT for 32-bit platforms.
svn path=/trunk/; revision=47696
2013-02-16 17:43:16 +00:00
Evan Huus 90ec697e89 From Alex Gaertner via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8313
New dissector for the SML protocol.

svn path=/trunk/; revision=47695
2013-02-16 16:48:30 +00:00
Evan Huus 0f8735b8a3 From Dirk via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8287
Request-response tracking and response-time calculation for HTTP.

svn path=/trunk/; revision=47694
2013-02-16 14:59:00 +00:00
Pascal Quantin 9dc510fc8e Fix typo error
svn path=/trunk/; revision=47693
2013-02-16 13:55:10 +00:00