Commit Graph

255 Commits

Author SHA1 Message Date
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
Jörg Mayer 735ba01eb1 Bill Meier: More spelling fixes
svn path=/trunk/; revision=16965
2006-01-06 03:26:45 +00:00
Jörg Mayer 368f7d87c7 Steve Karg:
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
2006-01-05 18:53:22 +00:00
Guy Harris 81b9490d4c Get rid of (valid) warning about uninitialized variable, and clean up
indentation.

svn path=/trunk/; revision=16386
2005-11-03 04:33:51 +00:00
Anders Broman 4a5c674c04 From Dave Richards
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
2005-10-04 05:15:23 +00:00
Anders Broman ad5fab657d From Steve Karg
svn path=/trunk/; revision=15666
2005-09-02 05:49:25 +00:00
Ronnie Sahlberg ec3ab9ec3e rename ep_tvb_get_string() to tvb_get_ephemeral_string() asnd update the documentation in README.developer
svn path=/trunk/; revision=15270
2005-08-10 13:41:13 +00:00
Anders Broman e6856b69f3 From David Richards:
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
2005-08-05 19:37:57 +00:00
Jörg Mayer 34493e8f9e char -> const char warning fixes
svn path=/trunk/; revision=15126
2005-07-28 07:53:38 +00:00
Ronnie Sahlberg 835df3a1d2 convert some uses of tvb_get_string() to ep_tvb_get_string()
there was at least one obvious memleak in one of the uses of tvb_get_string()



svn path=/trunk/; revision=15027
2005-07-24 02:43:41 +00:00
Jörg Mayer 19e90d9a5c Warning fix:
packet-bacapp.c:1264: warning: ISO C does not allow extra ';' outside of
a function


svn path=/trunk/; revision=14420
2005-05-23 12:32:37 +00:00
Jörg Mayer 83f9a803ac Warning fix:
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
2005-05-23 12:18:10 +00:00
Anders Broman 33aa290b25 From Steve Karg:
* 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
2005-05-23 05:52:28 +00:00
Guy Harris 25443a7a87 Change data types to match those of "iconv()", at least on OS X.
svn path=/trunk/; revision=14314
2005-05-05 11:03:46 +00:00
Gerald Combs 2e0f4b9750 Fix a couple of infinite loops. Make similar changes elsewhere to keep the
code consistent.

svn path=/trunk/; revision=14260
2005-05-02 00:57:44 +00:00
Ronnie Sahlberg 0f66df8509 BACAPP updates
svn path=/trunk/; revision=14188
2005-04-26 08:03:22 +00:00
Ronnie Sahlberg a5863ec066 From Steve Karg
updates to BACNet


svn path=/trunk/; revision=14075
2005-04-14 09:20:02 +00:00
Guy Harris ab32b090b7 Back out the BACnet application layer dissectin code - its use of
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
2005-03-07 01:22:55 +00:00
Guy Harris 722832f739 The length field in the "BACnet encoding rules" is limited to 32 bits
("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
2005-03-06 22:14:24 +00:00
Guy Harris a313c47a59 Get rid of an unused variable.
svn path=/trunk/; revision=13621
2005-03-06 04:41:00 +00:00
Guy Harris 39ad72864f No, they don't use BER for the variable portion of a PDU; update the
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
2005-03-06 02:24:49 +00:00
Guy Harris 476c8da086 Don't use "long" and "%l[doux]" for 64-bit quantities, use guint64 and %
followed by PRIu64.

Don't use C++/C99-style comments.

Use "tvb_reported_length()" to get packet lengths - don't use
"tvb_length()", and especially don't directly refer to the "length"
field of the tvbuff.

svn path=/trunk/; revision=13609
2005-03-06 01:53:56 +00:00
Guy Harris ea23bf66f9 From Herbert Lischka: implement some (not all) tags according to BACNET
application handbook.

svn path=/trunk/; revision=13605
2005-03-06 00:17:37 +00:00
Gilbert Ramirez 669db206cb Move dissectors to epan/dissectors directory.
Also move ncp222.py, x11-fields, process-x11-fields.pl,
make-reg-dotc, and make-reg-dotc.py.

Adjust #include lines in files that include packet-*.h
files.

svn path=/trunk/; revision=11410
2004-07-18 18:06:47 +00:00