Commit Graph

141 Commits

Author SHA1 Message Date
Jeff Morriss 2552c750e5 We always HAVE_CONFIG_H so don't bother checking whether we have it or not.
svn path=/trunk/; revision=45017
2012-09-20 02:03:38 +00:00
Jeff Morriss aa5d9d78dd From Robert Bullen via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7683 :
The reassembled fragments tree in the Packet Details view is awesome, but it
lacks one thing: a field that exposes the reassembled data.

tcp.data already exists for exposing a single TCP segment's payload as a byte
array. It would be handy to have something similar for a single application
layer PDU when TCP segment reassembly is involved. I propose
tcp.reassembled.data, named and placed after the already existing field
tcp.reassembled.length.

My primary use case for this feature is outputting tcp.reassembled.data with
tshark for further processing with a script.

The attached patch implements this very feature. Because the reassembled
fragment tree code is general purpose, i.e. not specific to just TCP, any
dissector that relies upon it can add a similar field very cheaply. In that
vein I've also implemented ip.reassembled.data and ipv6.reassembled.data, which
expose reassembled fragment data as a single byte stream for IPv4 and IPv6,
respectively. All other protocols that use the reassembly code have been left
alone, other than inserting NULL into their initializer lists for the newly
introduced struct field reassemble.h:fragment_items.hf_reassembled_data.

svn path=/trunk/; revision=44802
2012-09-07 02:09:59 +00:00
Bill Meier 638d74d43f Use val_to_str_const() where appropriate;
Also (for a few files):
- create/use some extended value strings;
- remove unneeded #include files;
- remove unneeded variable initialization;
- re-order fcns slightly so prefs_reg_handoff...() at end, etc

svn path=/trunk/; revision=44438
2012-08-10 22:55:02 +00:00
Jeff Morriss 3ab1e68751 From Lori Tribble via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7556 :
The BACnet GetEnrollmentSummary-ACK has an optional parameter Notification
Class.  The Wireshark decoding does not correctly decode when this parameter is
missing.

The fix is to verify the context exists before attempting to decode this
parameter.


From me: replace the few remaining tabs in the file with spaces.

svn path=/trunk/; revision=44207
2012-08-02 14:21:57 +00:00
Bill Meier 7eb2b89e71 From Lori Tribble:
Attached is a patch which corrects the string construction issue in the
PropertyStates method.  This patch also corrects a spelling error for
'utcTimeSyncronization' and adds decode support for this property.

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6475#c8

svn path=/trunk/; revision=43868
2012-07-20 19:09:05 +00:00
Jakub Zawadzki b18e880040 Update FSF address - part II.
svn path=/trunk/; revision=43538
2012-06-28 23:18:38 +00:00
Bill Meier 1b17369504 Fix: code under 'if(tree)' (in)directly calls sub-dissector/col_...()/expert...() fcns
svn path=/trunk/; revision=43226
2012-06-12 21:22:46 +00:00
Anders Broman 859f794544 From Evan Huus:
Fix to
BACapp item length causes Buildbot crash output: randpkt-2011-04-13-1899.pcap

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

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

svn path=/trunk/; revision=42893
2012-05-29 07:31:38 +00:00
Chris Maynard c47744e353 Fix dead initialization warning reported by clang.
svn path=/trunk/; revision=42323
2012-04-28 18:05:27 +00:00
Anders Broman e966a129bd From Evan Huus:
Another case where a ridiculously large length field was causing a loop counter
to overflow. Had to pass pinfo all over the place to add expert info, but the
meat of the fix is on line 4960 (after patch applied).

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

svn path=/trunk/; revision=42203
2012-04-23 07:28:53 +00:00
Jakub Zawadzki 8a1dc57c03 Remove doubled semicolons and semicolons outside function.
svn path=/trunk/; revision=42053
2012-04-13 20:22:31 +00:00
Jakub Zawadzki cbfa8a5de6 val is unitinialized when fUnsigned32 return false.
svn path=/trunk/; revision=41961
2012-04-05 20:17:39 +00:00
Jeff Morriss 1731fc958e From Martin Kaiser via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6977 :
The attached (trivial) patch adds some missing breaks in switch-case blocks.

This fixes coverity defects #445, #446, #1316 and #1380.

svn path=/trunk/; revision=41727
2012-03-21 22:18:15 +00:00
Bill Meier 63e3176881 Always test tvb_reported_length_remaining() return val for '> 0' instead of '!=0'
Also: Whitespace cleanup.

svn path=/trunk/; revision=41094
2012-02-21 02:02:11 +00:00
Bill Meier 9799f94861 Fix some [-Wunused-but-set-variable] warnings;
Trailing whitespace cleanup.

svn path=/trunk/; revision=39771
2011-11-09 01:35:26 +00:00
Stig Bjørlykke f5c9ccd0c4 Fixed some coding errors:
packet-bacapp.c:6154: error: stray '\250' in program
packet-bacapp.c:7137: warning: cast to pointer from integer of different size

svn path=/trunk/; revision=39680
2011-10-30 17:03:24 +00:00
Anders Broman cd6fa1f722 Fix unused variable warnings.
svn path=/trunk/; revision=39679
2011-10-30 16:44:02 +00:00
Anders Broman 798fabed72 From Lori Tribble:
I found many new properties in BACnet that were not decoded correctly in
Wireshark.  I have attached a patch that adds decoding to the following
properties:

Fixed the following properties to decode:

In the Accumulator Object:
scale (187)
prescale (185)
logging-record (184)

In Access Door Object:
door-members (228)
masked-alarm-values (234)

In the Pulse Converter Object:
input-reference (181)

In the Group Object:
list-of-group-members (53)

In the Event Enrollment Object:
object-property-reference (78)

In the Command Object:
action (2)

In the Trend Log Multiple object:
log-buffer (131)

In the Event Log Object:
log-buffer (131)

In the Structured View object:
subordinate-list (211)

Added decoding for the following enumeration type properties:
  Logging-type (197)
  event-state (36)
  reliability (103)
  notify-type (208)
  door-status (231)
  lock-status (233)
  secured-status (235)
  maintenance-required (158)
  program-state (92)
  program-change (90)
  reason-for-halt (100)
  mode (160)
  silenced (163)
  operation-expected (161)
  tracking-value (164)
  file-access-method (41)

The above fixes also fixed the log-buffer decoding of the old trend log 
recorded as Wireshark bug: #6458

I believe this patch also fixes bug: #6235.  But the original bug did not
contain a capture file so I am not positive my capture represents the
originators issue.

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

svn path=/trunk/; revision=39676
2011-10-30 16:06:14 +00:00
Bill Meier 794757ae8f For proto_tree_add_item(..., proto_xxx, ...)use ENC_NA as the encoding arg.
Also: remove trailing whitespace for a number of files.

svn path=/trunk/; revision=39503
2011-10-21 02:10:19 +00:00
Bill Meier 67ee5049d4 Convert 'encoding' parameter of certain proto_tree_add_item() calls in non-autogenerated epan/dissectors:
Specifically:  Replace FALSE|0 and TRUE|1 by ENC_BIG_ENDIAN|ENC_LITTLE_ENDIAN as
  the encoding parameter for proto_tree_add_item() calls which directly reference
  an item in hf[] which has a type of:
     FT_BOOLEAN
     FT_IPv4
     FT_EUI64
     FT_GUID
     FT_UINT_STRING

Also: For type FT_ITv6 use ENC_NA. (This was missed in SVN #39260)

svn path=/trunk/; revision=39328
2011-10-10 00:39:31 +00:00
Bill Meier 4e57694d4a Convert 'encoding' parameter of certain proto_tree_add_item() calls in non-autogenerated epan/dissectors:
Specifically:  Replace FALSE|0 and TRUE|1 by ENC_BIG_ENDIAN|ENC_LITTLE_ENDIAN as
 the encoding parameter for proto_tree_add_item() calls which directly reference
 an item in hf[] which has a type of:
    FT_UINT8
    FT_UINT16
    FT_UINT24
    FT_UINT32
    FT_UINT64
    FT_INT8
    FT_INT16
    FT_INT24
    FT_INT32
    FT_INT64
    FT_FLOAT
    FT_DOUBLE


svn path=/trunk/; revision=39288
2011-10-06 03:35:44 +00:00
Bill Meier 4bbd01941d From Danny Breton: Property name time-synchronization-interval(204) is incorrectly shown as time-synchronization-recipents.
See: https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6336

svn path=/trunk/; revision=38977
2011-09-12 15:44:45 +00:00
Anders Broman 60ad46f2fe From Lori Tribble:
Fix problem with the decoding of the exception schedule.  It was eating one
too many closing tags before exiting and causing the rest of the information to
fail to decode correctly.

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

svn path=/trunk/; revision=38919
2011-09-07 14:42:08 +00:00
Anders Broman 966c4e2697 From Lori Tribble:
Fixes log-status and status-flags plus other BACnet decoding bugs

This patch fixes the log-status and status-flag decoding issues described in
this bug report.  This patch also fixes the following items:
1) date-list decoding
2) time-synchronization-recipients decoding
3) decoding of UTF-8 character strings (when using character set 0)
4) event-parameter decoding

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

svn path=/trunk/; revision=38914
2011-09-07 10:35:44 +00:00
Anders Broman 7e3d918027 "fix":
Error: Found non-ASCII characters on line 4135 of packet-bacapp.c
Error: Found non-ASCII characters on line 4163 of packet-bacapp.c
Error: Found non-ASCII characters on line 4198 of packet-bacapp.c

svn path=/trunk/; revision=38681
2011-08-23 05:06:54 +00:00
Anders Broman 01d1f950d3 From Steve Karg:
BACnet Dissector latest enumerations for properties, states, error codes, and vendor ids.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6249

svn path=/trunk/; revision=38678
2011-08-23 04:26:01 +00:00
Chris Maynard 7bc1f25843 Based on the information provided by Steve Karg via -dev, change all occurrences of ENC_LITTLE_ENDIAN to ENC_BIG_ENDIAN.
Ref: http://www.wireshark.org/lists/wireshark-dev/201107/msg00305.html


svn path=/trunk/; revision=38110
2011-07-19 13:19:49 +00:00
Guy Harris 93abdd9804 Use ENC_LITTLE_ENDIAN rather than TRUE in proto_tree_add_item() calls.
(Yes, that means that all but one call uses ENC_LITTLE_ENDIAN, and one
uses ENC_BIG_ENDIAN.  I guess that's how the protocol works....)

svn path=/trunk/; revision=38106
2011-07-19 03:20:02 +00:00
Chris Maynard b968cc5c0b From Michael Mann via bug 5769: In fDevice_Instance(), add field in proper
big-endian byte order.

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

svn path=/trunk/; revision=38105
2011-07-19 02:47:12 +00:00
Bill Meier 9851df836c From Yaniv Kaul: Some 'set but not used' compilation fixes;
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5858

From me: 2 corrections to the patch and sevral other minor changes.

svn path=/trunk/; revision=37350
2011-05-22 22:04:24 +00:00
Guy Harris 587f850bfd Make the tree items for strings look a little less ugly.
Note that the string value should be put into the protocol tree.

svn path=/trunk/; revision=37137
2011-05-14 00:50:22 +00:00
Anders Broman 2ad1c8df66 VALS(& -> VALS(
svn path=/trunk/; revision=37009
2011-05-06 12:28:11 +00:00
Jeff Morriss dcdbb29bed Remove some unused hf_ variables.
svn path=/trunk/; revision=36469
2011-04-05 02:35:32 +00:00
Jeff Morriss a148a936b1 From Felix Kraemer: fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5694 :
This patch adds the capability to create BACnet statistics trees. 
Find the respective menu items under 'Statistics->BACnet'.
Packets can be sorted by different criteria:
- Src/Dst IP adresses
- Instance ID
- Object Type
- Service

From me:
- Don't use C++/C99-style comments.
- Name variables for tick_stat_node() don't need to be static.
- Change updateBacnetInfoValue() to require 'data' to be ep_ allocated.  Change
  the couple of calls that did not send in ep_ allocated data to do so.
- Change one or two functions to be static.
- Do not use (memory-unsafe) g_sprintf().
- Use ep_strconcat() instead of leaking memory with g_strconcat().
- Put back one if(tree) that doesn't appear to do any harm.
- Remove variable declarations and #includes from the header file.

svn path=/trunk/; revision=36468
2011-04-05 02:18:28 +00:00
Bill Meier 747477c7ab Don't assign to a proto_item * if the value won't be used: Coverity 846 & 848;
Also: remove some unneeded #includes


svn path=/trunk/; revision=36464
2011-04-04 19:23:39 +00:00
Stig Bjørlykke 84bc28bd6a Introduce "Fragment count" filter element for all protocols doing reassembly.
svn path=/trunk/; revision=35705
2011-01-30 21:01:07 +00:00
Stephen Fisher fc7b0c019b Fix the dead initialization warnings found by clang's static analysis
("Value stored to 'xxx' during its initialization is never read")


svn path=/trunk/; revision=35598
2011-01-20 18:56:11 +00:00
Jaap Keuter 889e3dbe54 From Steve Karg:
Added a display filter on BACnet WhoIs Low Limit and High Limit.

svn path=/trunk/; revision=35503
2011-01-12 07:42:18 +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
Anders Broman c8726eda61 From Lori Tribble:
Enhancements to BACnet's bacapp dissector
Details:
1) Added the low and high instance parameters of the who-is command to the
summary view, if present.
2) Added dissecting of the property active-cov-subscriptions.
3) Added tag details to the decoded view of ProcessId.
4) Fixed the indent levels of the recipientProcess decoding.
5) Fixed the indent tree levels for ReadPropertyMultiple-ACK when decoding
error response.

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

svn path=/trunk/; revision=35170
2010-12-10 14:23:48 +00:00
Stig Bjørlykke 428129d60b Initialize a variable to remove a warning from clang.
svn path=/trunk/; revision=34786
2010-11-05 08:13:26 +00:00
Bill Meier 6d8ea4abd5 From Lori Tribble: Add vendor identifier dissector access to BACnet Private Transfer Msgs
BACnet has a private transfer service which is vendor specific.  The start of
 each request and response contains the vendor identifier.  I've added a way for
 vendors to provide their own dissectors by registering their vendor identifier.
 The packet-bacapp.c method fConfirmedPrivateTransfer has been modified to look
 for a vendor specified dissector.  If found it will be run.  If not found we
 default to running the standard dissection included in packet-bacapp.c.

 I modified the summary column display for private transfer messages so that the
 summary now displays the Vendor Identifier (V=xx) and the Service Number (SN=xx).

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

From me: Rename sub-dissector tablle to "bacapp.vendor_identifier"
         Change subdissector ui_name to "BACapp Vendor Identifier"

svn path=/trunk/; revision=34625
2010-10-22 18:13:42 +00:00
Jeff Morriss 0ff5638f37 Replace blurbs that match the name (case insensitive) with NULL.
svn path=/trunk/; revision=34227
2010-09-23 21:46:31 +00:00
Jeff Morriss 0c4308e2c6 Remove non-ASCII characters.
svn path=/trunk/; revision=33771
2010-08-11 13:42:28 +00:00
Anders Broman 90a6c7d484 From Herbert Lischka:
Resolves problems reported in bug #5090
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5090

I have 3 potentially risks of endless loop eliminated
the rest is cosmetic

svn path=/trunk/; revision=33765
2010-08-11 11:43:04 +00:00
Gerald Combs e1fff26bbe Future-proof a for loop.
svn path=/trunk/; revision=33752
2010-08-09 22:54:03 +00:00
Bill Meier dd678865b8 Fix another compile error.
(Note to self: take the time to read *all* the compiler error output before committing).

svn path=/trunk/; revision=33750
2010-08-09 18:53:18 +00:00
Bill Meier 349242d7bc Fix another compile error :(
svn path=/trunk/; revision=33749
2010-08-09 18:46:23 +00:00
Bill Meier 012503635f Fix a compile error.
svn path=/trunk/; revision=33748
2010-08-09 18:40:12 +00:00
Bill Meier 6de0c799d8 From Herbert Lischka: "corrected the dissection of reassembled UDP packets".
See: https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5051

From me:
- Move proto_register... and proto_reg_handoff.. to the end of the file;
- Define a function as static;
- Minor reformatting and whitespace cleanup.

svn path=/trunk/; revision=33747
2010-08-09 18:20:07 +00:00