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
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
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
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
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
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
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
- 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
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
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
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
--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
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
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
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
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
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
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
I fixed fBACnetPropertyValue in the BACnet packet-bacapp.c dissector
where an optional decoding for Priority wasn't being optional. A valid
packet with a confirmedEventNotification that did not have the optional
priority made this bug evident by indicating Malformed Packet.
Me:
Fixed some signedness warnings, #if 0'ed out unused functions.
svn path=/trunk/; revision=16957
1) Fixes context-tagged BACnet errors.
2) Fixes indeterminate tag data. If the tag length/value/type variable
was 6 or 7 you could not tell whether it was an open/close tag or had
length 6/7.
3) Don't make assumptions about property types for proprietary BACnet
object types.
svn path=/trunk/; revision=16104
here are the highlights of what's fixed:
1) Decoding of vendor-defined types
2) Decoding of some event notification parameters (not all)
3) Decoding of ABSTRACT-SYNTAX&Type
4) Decoding of BACnetTimeStamp
5) Some problems with context-tagged values (like booleans)
6) Continuation segments - don't try to decode them since you can't
start mid-PDU
7) Removed some excessive levels of subtrees
svn path=/trunk/; revision=15226
packet-bacapp.c:1266:1: warning: C++ style comments are not allowed in ISO C90
packet-bacapp.c:1266:1: warning: (this will be reported only once per input file)
svn path=/trunk/; revision=14418
* added additional value string enumerations from BACnet-2004
* removed vendor specific value string enumerations
* corrected some value strings enumerations that were incorrect
* refactored some common strings as strings + format
* refactored some value strings to use a reserved range and a
proprietary range by using val_to_split_str function which now correctly
shows the split range when a value is not matched.
* corrected some spelling errors
* converted some item text values to dissector registration
* added protocol tree for the BACnet tag headers
* added value strings tree display for some bit string BACnet properties
* added value strings tree display for some enumerated BACnet properties
* changed the conversion of signed, unsigned, and enumerated BACnet
values to use ntohx functions.
* added proper handling for large values of signed, unsigned, and
enumerated BACnet values.
* refactored BACnet Null and Boolean Tag tree
* refactored BACnet Real and Double Tag tree
* changed comments into functions for special tags
* changed some white space to match existing file style
* refactored tvb_reported_length to tvb_length_remaining to simplify
* corrected octet-string tree when length is zero
* refactored octet-string tree to use tvb_bytes_to_str
* corrected application tagged productions that were context tagged
* corrected context tagged productions that were application tagged
* corrected offset for BACnet character strings
* refactored some identical service request tree handling
* changed confirmed APDU to highlight the correct portion of the APDU
* changed some dissector registration values to display as decimal
* changed cast in call to iconv() to fix compiler warning
* corrected bit-wise AND in AtomicFile tree handling
packet-bvlc.c
* added error text in tree when encoded length doesn't match actual length
svn path=/trunk/; revision=14417
recursion instead of iteration means that packets with sufficiently
large lists can cause it to overflow the stack and crash.
svn path=/trunk/; revision=13643
("Data lengths larger than 2^32-1 are not encodable using primitive
tags"), so it doesn't need to be a "guint64" - but it *can* be that big,
so we should handle the 65536-2^32-1 case.
Don't gratuitously throw away the upper 24 bits of various lengths by
casting them to guint8.
Show signed values as such.
Don't use "match_strval()" - it returns a null pointer if it doesn't
find the value in the value_string table; instead, use "val_to_str()" so
we don't blow up if the value isn't found.
svn path=/trunk/; revision=13640
comment appropriately.
Make a bunch of routines static.
Don't just dissect stuff past the end of the variable portion as data -
the protocol spec doesn't appear to say there's anything after that.
Don't pass the offset to the routines to dissect the different types of
PDUs, just have them start at 0.
Use guint8 for 8-bit unsigned quantities.
Rename the routine to dissect Abort PDUs to match the other PDU
dissectors.
svn path=/trunk/; revision=13611