Commit graph

73 commits

Author SHA1 Message Date
Anders Broman
1e7878b53d From Steve Karg:
BACnet Action property not decoded correctly.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3766

svn path=/trunk/; revision=29173
2009-07-23 05:38:34 +00:00
Stig Bjørlykke
7e99557d05 Another try to fix the compiler warnings on win64.
svn path=/trunk/; revision=29161
2009-07-21 22:23:34 +00:00
Guy Harris
8300e59b2f More gsizery.
svn path=/trunk/; revision=29158
2009-07-21 09:05:16 +00:00
Guy Harris
a864f7d89a GLib documentation says the 3rd and 5th arguments to g_iconv are "gsize
*"s.

svn path=/trunk/; revision=29157
2009-07-21 08:53:39 +00:00
Anders Broman
f610ec3c46 size_t -> int to make the Win64 build bot happy.
svn path=/trunk/; revision=29156
2009-07-21 08:35:24 +00:00
Stig Bjørlykke
6dbdc38c53 Initialize bacapp_invoke_id to avoid a compiler warning.
svn path=/trunk/; revision=29155
2009-07-21 08:07:40 +00:00
Martin Mathieson
a2d0ad942f Stop using the C++ 'true' and 'false'.
I still get a compilation error...

packet-bacapp.c: In function `dissect_bacapp':
packet-bacapp.c:6350: warning: 'bacapp_invoke_id' might be used uninitialized in this function

... although I've followed the paths (including the setting of 'segment'), and it looks bogus to me.


svn path=/trunk/; revision=29154
2009-07-21 07:59:16 +00:00
Guy Harris
dafbc0abf3 Fix typo.
svn path=/trunk/; revision=29153
2009-07-21 07:44:04 +00:00
Guy Harris
b6953e2c26 Don't use tvb_length_remaining() - that just reports how much captured
data is available, not how big the packet really is.

Clean up white space.

Get rid of an unused parameter and two unused variables.

svn path=/trunk/; revision=29152
2009-07-21 07:28:47 +00:00
Anders Broman
3e1365cc15 From Herbert Lischka:
Added some new features to BACnet dissection:
- ListOfObjectPropertyReferences in scheduler
- RestartReason
- Properties for loop-object
- LogDeviceObjectProperty in trend-log object
- log-buffer entries in trend-log object

- reassemby of fragmented messages
- fallback changed if iconv-library is not here

Me: Moved includes from .h to .c as thats how we normaly do it.

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

svn path=/trunk/; revision=29151
2009-07-21 06:20: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
Gerald Combs
c12114d6e1 More size_t casts.
svn path=/trunk/; revision=27866
2009-03-27 16:17:31 +00:00
Bill Meier
d6a5a7c761 P64 changes: Fix some cases for which size_t is not required
svn path=/trunk/; revision=27822
2009-03-22 20:55:31 +00:00
Stig Bjørlykke
a2cf3593bb Removed some non-ASCII characters.
svn path=/trunk/; revision=27736
2009-03-16 10:14:44 +00:00
Jaap Keuter
055a9393b6 From Steve Karg:
BACnet TimeSync message of 12:20 was displayed as 12:20 AM.  
It should have displayed as 12:20 PM.

svn path=/trunk/; revision=27624
2009-03-06 19:25:49 +00:00
Jaap Keuter
3eddf57266 From Steve Karg:
The ConfirmedEventNotification decoding was only done as far as context tag 8,
so BACnetNotificationParameters 9, 10, and 11 displayed as malformed packet.  
Added context tag decoding for BACnetNotificationParameters 9, 10, and 11. 
Added missing breaks in several switch statements.
Corrected some dissector aborts.
Added several new enumerations from the latest BACnet 135-2008 standard, and
updated the list of BACnet Vendor IDs.

svn path=/trunk/; revision=27527
2009-02-23 20:01:00 +00:00
Anders Broman
5729f9040b From Steve Karg:
BACnet PrivateTransferError shows malformed packet.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3257

svn path=/trunk/; revision=27470
2009-02-17 05:56:12 +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
a8f30cbca1 Fix some typos and spelling (mostly in text strings)
svn path=/trunk/; revision=27037
2008-12-17 17:23:37 +00:00
Bill Meier
33c99f44fd Fix typos and spelling (mostly in text strings)
svn path=/trunk/; revision=27028
2008-12-17 00:08:38 +00:00
Stig Bjørlykke
d0e33bc3c5 Fix some "format not a string literal and no format arguments" warnings.
svn path=/trunk/; revision=26646
2008-10-31 14:07:23 +00:00
Jeff Morriss
485110f241 We require GLIB-2 now so there's no need to attempt to use regular iconv: use
the GLIB version instead.

Reindent some (does someone have their tabstops set to 4?).

Create and use some #defines instead of hard-coded values. For example,
replace 0x00 with ANSI_X34 in both the value_string and the case statement.
(This file could use a lot more of such changes.)

packet-bacapp.c appears to compile cleanly now so move it to
CLEAN_DISSECTOR_SOURCE.

svn path=/trunk/; revision=25758
2008-07-17 13:53:26 +00:00
Stig Bjørlykke
d58dd2088f From Rudolf Weidmann (bug 2583):
Fixed enumeration type for new-mode in change-of-life-safety.

svn path=/trunk/; revision=25409
2008-06-02 07:32:55 +00:00
Jaap Keuter
098f95fad9 From Steve Karg:
Corrected decode of a BACnet ReadRange request with no range specified (i.e. all) 
which showed ‘malformed packet’ in the decoder.

svn path=/trunk/; revision=25269
2008-05-10 06:25:07 +00:00
Jaap Keuter
a7da9f5519 From Steve Karg:
Received user request for enhancements.

Added a display filter for BACnet property ID.  
Added a display filter and names for BACnet Vendor ID.

svn path=/trunk/; revision=24832
2008-04-07 06:12:14 +00:00
Jaap Keuter
e2ee2bcab6 From Steve Karg:
Here is a modified patch that fixes the BACnet Schedule object Weekly_Schedule
decoding when an array index is used.  It also fixes the Priority_Array property 
when an array index is used.

svn path=/trunk/; revision=24653
2008-03-16 08:44:42 +00:00
Jeff Morriss
bb323055b2 match_strval() may return NULL so don't blindly pass its return value into col_add_*() or proto_add_*(); use val_to_str() (returning "Unknown (%d)" if no match is found) instead.
svn path=/trunk/; revision=24557
2008-03-04 21:05:21 +00:00
Anders Broman
2c4c5a086b From Alan McBride :
BACnet handling of readPropertyMultiple request / response.

svn path=/trunk/; revision=24537
2008-03-03 20:15:05 +00:00
Jeff Morriss
1b71f5f0ff From Evan via bug http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2293 : In
epan/dissectors/packet-bacapp.c the BACnetErrorCode array contains incorrect
enumeration mappings for BACnet error codes.  Attached is a version of the file
with the mappings straightened out.

svn path=/trunk/; revision=24435
2008-02-22 21:39:40 +00:00
Stig Bjørlykke
c6af1bfdd4 Removed some "statement not reached" warnings.
svn path=/trunk/; revision=24282
2008-02-07 12:14:40 +00:00
Jaap Keuter
1a9aa1ae62 From Alan McBride:
The decoding of a SubscribeCOVProperty packet is not properly decoding the
Monitored Property Identifier field. It leaves a number of decoded bytes at the
end as data.

svn path=/trunk/; revision=24245
2008-02-02 16:30:46 +00:00
Jaap Keuter
ddc87cf31b From Steve Karg:
Wireshark decodes a BACnet ReadRange Ack packet as malformed. The packet itself
is valid as checked with the BACnet 135-2004 specification.

svn path=/trunk/; revision=24039
2008-01-09 09:34:19 +00:00
Anders Broman
1950ffc214 Apply the small performance enhancment patches for:
- if offset is 0, tvb_length is the same as tvb_length_remaining, just faster.
Replace 
- col_append_fstr() with faster  col_append_str() 
- col_add_str() with col_set_str()
when it's safe

svn path=/trunk/; revision=23252
2007-10-23 05:50:00 +00:00
Jaap Keuter
770034f1d0 From Steve Karg:
Fix for bug 1807. This patch corrects the decoding of the NotificationParameters. 
I fuzz tested with these and other captures (Pass > 100).

svn path=/trunk/; revision=22766
2007-09-01 11:47:59 +00:00
Jaap Keuter
b002a79472 From Steve Karg:
Attached is a patch that fixes bug 1670 and related issues.
For the BACnet GetEventInformation-ACK request dissector:
1. Corrected BitString decoding for acknowledgedTransitions and eventEnable.
2. Corrected the ability to decode more than one event.
3. Grouped each item of the sequence using subtrees.  Added more informative
text to Priority and Timestamp.
4. Corrected eventState to use BACnetEventState enumeration instead of
BACnetEventStateFilter.

svn path=/trunk/; revision=22262
2007-07-06 22:36:58 +00:00
Jaap Keuter
9295f8a88c Fix for bug 1669:
Don't ditch the returned offset.

svn path=/trunk/; revision=22220
2007-06-28 19:03:47 +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
Jörg Mayer
f9836c56e8 warning fix: passing argument 2 of 'iconv' from incompatible pointer type
svn path=/trunk/; revision=21908
2007-05-23 15:42:48 +00:00
Guy Harris
1bc049906a Add some GCC warnings to the standard set, and add some others to the
--enable-extra-gcc-checks set.

If we turn on -pedantic, try turning on -Wno-long-long as well, so that
it's not *so* pedantic that it rejects the 64-bit integral data types
that we explicitly require.

Constify a bunch of stuff, and make some other changes, to get rid of
warnings.

Clean up some indentation.

svn path=/trunk/; revision=21526
2007-04-23 10:59:26 +00:00
Stephen Fisher
82b2c83149 Fix some more warnings
svn path=/trunk/; revision=21273
2007-03-29 18:09:13 +00:00
Ronnie Sahlberg
d8087438e9 ifdef out a function that is not yet used to get rid of a compiler warning
packet-bacapp.c:4269: warning: `fDeviceObjectPropertyReference' defined but not
used


svn path=/trunk/; revision=21068
2007-03-20 14:27:13 +00:00
Jaap Keuter
3e2faba8b4 From Steve Karg:
I added some text for enumerations that were added with addenda recently approved for the BACnet standard. 

svn path=/trunk/; revision=20453
2007-01-16 16:53:01 +00:00
Ronnie Sahlberg
3f2283a7e3 from Dave Richards
Here is a patch to fix a problem with notification parameters.  Fix is:

Remove premature return statements from fNotificationParameters.

The real problem is that the original code is inconsistent about putting
a break in all cases of the switch blocks and some were falling through
to the default case where there was a return.  I took the simple route
and removed the unnecessary returns - they were OK for default case but
not for the fall through.

Is there a standard about having breaks?  If it is desired to have a
consistent coding style I will further update the code to conform.
Otherwise, could someone please commit this change as it does fix the bug?

Thanks,

Dave Richards





svn path=/trunk/; revision=19797
2006-11-04 21:19:14 +00:00
Anders Broman
8774e7e28e From David Richards:
numerous changes, most notably:

1) BACnetStatusFlags is bit string, not enum, in NotificationParameters
2) Fixes many places where enclosing context tags were not handled properly.
3) Simplify tag decoding logic.  Change to explicit decoding in many 
instances rather
    than read tags in a loop and do a switch based on tag number.  Looping
    ignores out-of-order and other types of tagging errors.

svn path=/trunk/; revision=19410
2006-10-03 18:11:55 +00:00
Jörg Mayer
d9f56b9080 Steve Karg <skarg@users.sourceforge.net>
I made a small change in packet-bacapp.c to fix the following:
1. Corrected Signed value decoding for a one octet value.
2. Corrected Priority values to decode as Unsigned values.


svn path=/trunk/; revision=18918
2006-08-15 20:46:13 +00:00
Gerald Combs
c52c646842 Apply The Written Word's patch from bug 333, which changes HAVE_ICONV_H
to HAVE_ICONV.

svn path=/trunk/; revision=18758
2006-07-18 15:54:03 +00:00
Ronnie Sahlberg
feab79e328 change a whole bunch of ethereal into wireshark
svn path=/trunk/; revision=18196
2006-05-21 04:49:01 +00:00
Anders Broman
02821ce8e5 From Karsten P. Hoffmann:
The 'info'-part should display the invoke id of confirmed service as well, since it is much easier to match request and reply without typeing any filter rules or so. 

svn path=/trunk/; revision=17913
2006-04-19 19:28:11 +00:00
Jaap Keuter
12de0d5145 From Steve Karg:
1) BACnet signed values were being decoded incorrectly for negative
values since BACnet tries to be clever and minimizes the number of bytes
sent on the wire and drops the leading FF on negative values.  For
example, -200 is passed as FF 38 on the wire, but would display as 65336.
2) Since the BACnet unsigned values were decoded using a 64-bit entity,
I changed the decoding such that allows all 8 bytes to be decoded.  The
function can now decode 5, 6, and 7 byte values.
3) Corrected warning about signed/unsigned in a pointer parameter.

svn path=/trunk/; revision=17877
2006-04-16 22:03:04 +00:00
Jaap Keuter
0050f4e68d Patch that fixes bug 793 and a few other things mostly revolving around
BACnet schedules.  Could someone please take care of this?

1) fDate - correctly handle wild card year
2) fTime - rename local variables cut-and-pasted from fDate
3) fCalendarEntry - do single-pass decoding rather than while loop since the structure cannot be repeated.
4) fDailySchedule - correctly handle enclosing context tags.
5) fWeeklySchedule - correctly handle enclosing context tags
6) fAcknowledgeAlarmRequest - fix function name spelling and tags 3 and 5 are timeStamp, not time.
7) fSpecialEvent - handle context tags correctly.
8) fReadRangeRequest - Add cases from 2004 spec

Dave Richards


svn path=/trunk/; revision=17667
2006-03-19 12:28:21 +00:00