Commit Graph

49194 Commits

Author SHA1 Message Date
Guy Harris a582b7201a In a Simple Packet Block, the captured length isn't the block length
minus the lengths of the two length fields and the packet length field,
it's the minimum of that and the packet length, as there might be
padding.

Fixes one problem found by the file in bug 9200.

While we're at it, pcapng_read_packet_block() and
pcapng_read_simple_packet_block() return an integer, not a Boolean;
return 0, not FALSE (they have the same value, but returning 0 makes it
clearer that the return value isn't restricted to TRUE or FALSE).

svn path=/trunk/; revision=52241
2013-09-28 18:03:20 +00:00
Guy Harris 12912b657b There's no interface ID in a Simple Packet Block.
Fixes one problem found by the file in bug 9200.

svn path=/trunk/; revision=52238
2013-09-28 17:44:50 +00:00
Anders Broman 8157963907 Start dissect multipart messages.
svn path=/trunk/; revision=52237
2013-09-28 08:58:06 +00:00
Evan Huus ca52337c43 Fix various warnings in (hopefully) the right ways.
svn path=/trunk/; revision=52236
2013-09-28 02:41:49 +00:00
Michael Mann e5379de126 1. Remove PITEM_FINFO from add_tlv_subtree and add_protocol_subtree (as well as some other minor cleanup) and adjust the calling functions accordingly.
2. Converted several add_protocol_subtree calls to add_tlv_subtree to get true filterability.  Many of the add_protocol_subtree are effectively being (ab)used as proto_tree_add_text with different highlighting.

3. Convert tvb_new_subset into tvb_new_subset_length.

Still looks like some of the remaining "protocols" need more specific filters, and should just be regular FT_BYTES fields.

svn path=/trunk/; revision=52235
2013-09-28 00:45:44 +00:00
Jörg Mayer 21bcd56a69 Fix a typo (a missed replace)
svn path=/trunk/; revision=52234
2013-09-27 22:30:34 +00:00
Jörg Mayer 1306b0f349 Hack for
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9127

With 6 unknown bytes leading to the two known values for the
last two bytes this cannot yet be properly dissected. Dissect
the one known case. More traces with additional properties
required to get more sense into the first 6 bytes.

svn path=/trunk/; revision=52233
2013-09-27 20:33:29 +00:00
Martin Mathieson 9e93af2470 And also where it is declared. Doesn't VSC++ warn about anything?
svn path=/trunk/; revision=52232
2013-09-27 16:40:50 +00:00
Martin Mathieson e8488209f8 Temporarily make an uncalled function non-static, until it gets called
svn path=/trunk/; revision=52231
2013-09-27 16:38:45 +00:00
Martin Mathieson e4186e832d Remove unused parameter
svn path=/trunk/; revision=52230
2013-09-27 16:29:05 +00:00
Martin Mathieson f655b556f7 Another step towards DRX support in LTE MAC
svn path=/trunk/; revision=52229
2013-09-27 16:18:09 +00:00
Jörg Mayer 703dad7c53 Fix:
/home/jmayer/work/wireshark/svn/trunk/epan/dissectors/packet-openflow.c: In function ‘dissect_openflow_v_1_3’:
/home/jmayer/work/wireshark/svn/trunk/epan/dissectors/packet-openflow.c:1125:18: error: variable ‘version’ set but not used [-Werror=unused-but-set-variable]
     guint8 type, version;

Remove some trailing whitespace.

svn path=/trunk/; revision=52228
2013-09-27 08:06:44 +00:00
Gerald Combs 4ddecad2ba Have ChmodBPF kludge^Wcreate as many BPF devices as possible at startup.
The welcome screen in the Qt port runs "dumpcap -S" to draw sparklines.
On OS X this means that it holds open a BPF device for each interface.
Trying to capture using another instance of Wireshark (or tcpdump, or
tshark, or...) will trigger the creation of an additional BPF device but
we won't have permission to use it. Forcing device creation at startup
works around this.

svn path=/trunk/; revision=52227
2013-09-27 03:33:26 +00:00
Anders Broman 1662d89793 Fix:
packet-openflow.c:577:31: error: "/*" within comment
packet-openflow.c:655:24: error: "/*" within comment
cc1: warnings being treated as errors
packet-openflow.c: In function 'dissect_openflow_features_reply_v1_3':
packet-openflow.c:671: warning: unused parameter 'pinfo'
packet-openflow.c:671: warning: unused parameter 'length'
packet-openflow.c: In function 'dissect_openflow_multipart_request_v1_3':
packet-openflow.c:809: warning: unused parameter 'pinfo'
packet-openflow.c:809: warning: unused parameter 'length'
packet-openflow.c: At top level:
packet-openflow.c:1033: warning: return type defaults to 'int'
packet-openflow.c:1119: warning: return type defaults to 'int'

svn path=/trunk/; revision=52226
2013-09-26 21:21:54 +00:00
Anders Broman 408ba7bade From beroset@mindspring.com:
c1222 dissector has wrong tag value for BER-encoding of calling_AE_qualifier

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

svn path=/trunk/; revision=52225
2013-09-26 21:15:44 +00:00
Anders Broman 578ead425b From beroset@mindspring.com:
removed obsolete references to se_alloc

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

svn path=/trunk/; revision=52224
2013-09-26 21:08:49 +00:00
Anders Broman a8a0450aa7 Start refactoring to dissect each version separatly.
svn path=/trunk/; revision=52223
2013-09-26 21:05:04 +00:00
Anders Broman 179b14827b Add a few AVP:s
svn path=/trunk/; revision=52222
2013-09-26 21:04:10 +00:00
Chris Maynard f216d4e440 When a line of text wraps to the next line, the character that caused the line to wrap was not being printed.
#BACKPORT(1.10,1.8)

svn path=/trunk/; revision=52221
2013-09-26 17:27:53 +00:00
Guy Harris 5ee2b14a10 Do all checks against the reported length; a packet that wasn't captured
in its entirety due to a snapshot length being specified is not
malformed.

Instead of checking for the the sum of the offset and the value length
being less than the offset, check whether the TLV length is <= 4 and, if
so, just quit at that point (that also handles the "value is zero
length" case).  That makes sure that valuelength isn't negative; given
that length is < 65536, valuelength < 65532, so that won't cause offset
to overflow, so that means offset won't go backwards.

svn path=/trunk/; revision=52220
2013-09-25 22:53:53 +00:00
Anders Broman 9973f5f880 From beroset@mindspring.com:
oid_subid2encoded generates faulty encodings for 3-, 4- and 5-byte subid values

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

svn path=/trunk/; revision=52219
2013-09-25 21:15:25 +00:00
Anders Broman 49b08e6694 From Masayuki Takemura:
According to 3GPP R8/R9/R10/R11, the mobility option "3GPP Specific PMIPv6 error
code" is 1 octet length.

However, in the source file packet-mip6.c, the length of the option is set to 4 octets (around line 1744):

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

svn path=/trunk/; revision=52218
2013-09-25 21:11:25 +00:00
Anders Broman 0fdbb8ca25 Dissect bssmap_reroute_cmd and bssmap_reroute_complete and
add new IE dissection to bssmap_cl3_info.

svn path=/trunk/; revision=52217
2013-09-25 21:06:05 +00:00
Anders Broman 19fdb497d4 Add the abillity to let vendor AVP subdisectors add Message type to the info column.
svn path=/trunk/; revision=52216
2013-09-25 20:58:37 +00:00
Michael Mann 376c5792a1 Minor correction to dissection of DLR frames in Ethernet/IP dissector. Bug 9186 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9186)
From Joakim Wiberg

svn path=/trunk/; revision=52215
2013-09-25 19:13:10 +00:00
Evan Huus eb64e871ba Prevent offset overflow in DTP dissector. Fixes
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9184

Also add modelines.

svn path=/trunk/; revision=52214
2013-09-25 16:57:21 +00:00
Evan Huus 95bc2da1e8 Require the NTLMSSP response contents to be long enough before we try to memcpy
it. Fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9182

svn path=/trunk/; revision=52213
2013-09-25 16:41:09 +00:00
Jörg Mayer 31f9c281ad Beginning to work on bug 9127 (Juniper proprietary TLV in RSVP):
- Print hexdump of unknown or vendor specific toplevel TLVs
- Try to print the name of type 204 (something still missing)

svn path=/trunk/; revision=52212
2013-09-25 10:11:07 +00:00
Gerald Combs 80d1fde12a Delete extra_split if we're not using it. This keeps its handle from
showing up in the main window. Make it local to layoutPanes().

svn path=/trunk/; revision=52211
2013-09-25 00:26:36 +00:00
Evan Huus 71e0d23701 From Chris Bontje via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9180
A few enhancements to the SEL Fast Message (selfm) Dissector:
- Final piece of dissection for standard Fast Meter messages to display pad byte
  (if present) and single-byte checksum footer.
- Enhancement to digital word display to show 1-byte bit patterns on proto_item
  without requiring user to expand tree.

svn path=/trunk/; revision=52210
2013-09-24 22:42:27 +00:00
Michael Mann f92832c8f4 Prevent crashing as a result of tree removal in r52208. Tree removal + this patch should be the "quick" fix to bug 5349 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5349). I knew the tree check was preventing some dissection/column data/etc, but from the comments in bug 5349, the tree check was also protecting this (and maybe other) crashes (due to missed NULL checking).
I want to follow up with some massive cleanup (remove PITEM_FINFO calls), but this with r52208 should be good enough to backport to 1.8 and 1.10 to fix bug 5349.  Cleanup shouldn't need to be backported.

svn path=/trunk/; revision=52209
2013-09-24 21:06:05 +00:00
Guy Harris 9e24ed6e97 You are in a twisty little maze of code paths, all different. Get rid
of the if (tree) tests in dissect_mac_header_generic_decoder(), as some
of the stuff done inside there should be done even if we're not building
a protocol tree, e.g. CRC stuff and calling subdissectors.

Get rid of a gratuitous pair of curly braces, and fix the indentation of
one line, while we're at it.

svn path=/trunk/; revision=52208
2013-09-24 20:32:19 +00:00
Guy Harris 84ac86916b Stuff used when checking the CRC needs to be done regardless of whether
we're building a protocol tree or not.

svn path=/trunk/; revision=52207
2013-09-24 19:57:41 +00:00
Guy Harris ff7b1d8a65 Get rid of unused variable.
svn path=/trunk/; revision=52206
2013-09-24 19:56:56 +00:00
Guy Harris d08e9702c8 Fix copy-and-pasteo(?).
svn path=/trunk/; revision=52205
2013-09-24 19:09:10 +00:00
Guy Harris 36fd921839 One advantage of making as many things as possible static is that, if
they're not being used, the compiler can be made to warn about that.

In this case, Broadcast_Control_Pointer_IE() was used because of a
missing case in a switch statement; put that case in.

svn path=/trunk/; revision=52204
2013-09-24 19:07:22 +00:00
Michael Mann 1ac3997acb Wimax dissector improvements:
1. Remove message type field from all MAC Management "sub"dissectors and place it in Mac Management subdissector itself.  This may cause backwards-compatibility issues (malformed packets) with third-party subdissectors of the MAC Management dissector, but it didn't make sense to have so many filters for a single enumerated value, especially when the various "protocol" filters covers many of them.

2. Removed some if(tree) checks as column info and calling other dissectors are sometimes executed underneath.  Some of this is in preparation for addressing bug 5349.

3. Make all dissector functions (and a few others) static, and use register_dissector() when necessary.

4. Convert generic decoder CRC errors into expert info, rather than have it be a "protocol" filter (it just looks funny that way)


In general, these dissectors seem "over-protocolized". I understand the need for all of the dissectors, but I don't know if they all need "protocol" status.

svn path=/trunk/; revision=52203
2013-09-24 18:45:39 +00:00
Pascal Quantin 019e64f58d Upgrade RRC dissector to v11.7.0
svn path=/trunk/; revision=52202
2013-09-24 17:56:17 +00:00
Jörg Mayer 9a495ec37e On Win it's nmake, not make
svn path=/trunk/; revision=52201
2013-09-24 16:50:21 +00:00
Jeff Morriss 31267e5a21 From Wido Kelling via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9176 :
Fix decoding of the Auto-Negotiation bits in LLDP (they were off by one).

svn path=/trunk/; revision=52199
2013-09-24 01:12:44 +00:00
Jeff Morriss 221f85fd67 From robionekenobi via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9173 :
This enhancement add the missing structure CAUT, some missing integer
converted to Strings and some field that were unknown to a better explanation. 

Sorted alphabetically the MQCFINT_Parse VALS structure to better find what is
missing in this VALS structure

svn path=/trunk/; revision=52198
2013-09-24 01:04:10 +00:00
Jeff Morriss 6d255f8633 From Peter Wu via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6596 :
Allow reading SSL keylog files with carriage returns.

svn path=/trunk/; revision=52197
2013-09-24 00:31:49 +00:00
Jörg Mayer d456079b7e Beginnings of win cmake support (not yet working), created by Graham Bloice,
some smaller changes by me.
- README.cmake
  Document how to (one day) run on Windows
- CMakeLists.txt
  Use MSVC compiler flags for MSVC instead of gcc flags
- FindWSWinLibs.cmake
  New: Creates HINTS for finding includes and libraries
  inside the Wireshark support library installation.
- FindXXX.cmake
  Make use of HINTS generated by FindWSWinLibs.cmake

This has not really been tested on Windows as my installation seems to have
automagically downloaded some fixes and is in an inconsistent state since.
Will probably need to reinstall.

svn path=/trunk/; revision=52194
2013-09-23 21:45:55 +00:00
Pascal Quantin d74564d6cf Ensure to release an existing DRX configuration when receiving a RRC Connection Setup message
svn path=/trunk/; revision=52193
2013-09-23 21:21:58 +00:00
Pascal Quantin 15ba18d1df Upgrade LPPa dissector to v11.3.0
svn path=/trunk/; revision=52192
2013-09-23 20:20:36 +00:00
Anders Broman db64bbc559 Add dissection of new IEs in UL_UNITDATA
svn path=/trunk/; revision=52191
2013-09-23 19:02:33 +00:00
Martin Mathieson eb7cb19709 Another step towards tracking UE DRX state
svn path=/trunk/; revision=52190
2013-09-23 17:34:18 +00:00
Michael Mann d09b1dbe8f DTP Dissector Enhancements
1) Corrections to the naming and terminology of DTP, its TLVs, types and values

2) Improvements to the dissection of Trunk Status and Trunk Type TLVs whose values and meaning have not been properly decoded so far

3) Improvements to the dissection of the Domain TLV (now using proto_tree_add_item() to display its value; this also allows for filtering operations)

4) Minor cleanups to the code (mainly renaming the macro names to make them more consistent)


From Peter Paluch, Bug 9156 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9156)

svn path=/trunk/; revision=52189
2013-09-23 15:54:29 +00:00
Evan Huus 2a1175c963 Tiny indentation fix.
svn path=/trunk/; revision=52188
2013-09-23 12:09:58 +00:00
Evan Huus f1ba7e1095 The pointer into proto_tree_add_oid can be NULL if the length is 0. Exposed
because wmem_alloc(pool, 0) returns NULL (like pretty much every other
malloc-style function) where ep_ or se_ alloc did not.

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

svn path=/trunk/; revision=52187
2013-09-23 12:09:20 +00:00