forked from osmocom/wireshark
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
This commit is contained in:
parent
dbe55501fc
commit
33aa290b25
File diff suppressed because it is too large
Load Diff
|
@ -1286,11 +1286,10 @@ fVTCloseError(tvbuff_t *tvb, proto_tree *tree, guint offset);
|
||||||
* @param tree
|
* @param tree
|
||||||
* @param offset
|
* @param offset
|
||||||
* @param label
|
* @param label
|
||||||
* @param src
|
|
||||||
* @return modified offset
|
* @return modified offset
|
||||||
*/
|
*/
|
||||||
static guint
|
static guint
|
||||||
fApplicationTypes (tvbuff_t *tvb, proto_tree *tree, guint offset, guint8 *label, const value_string *src);
|
fApplicationTypes (tvbuff_t *tvb, proto_tree *tree, guint offset, guint8 *label);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* BACnetActionCommand ::= SEQUENCE {
|
* BACnetActionCommand ::= SEQUENCE {
|
||||||
|
@ -1376,31 +1375,6 @@ fCalendaryEntry (tvbuff_t *tvb, proto_tree *tree, guint offset);
|
||||||
static guint
|
static guint
|
||||||
fClientCOV (tvbuff_t *tvb, proto_tree *tree, guint offset);
|
fClientCOV (tvbuff_t *tvb, proto_tree *tree, guint offset);
|
||||||
|
|
||||||
/**
|
|
||||||
* BACnetCOVSubscription ::= SEQUENCE {
|
|
||||||
* Recipient [0] BACnetRecipientProcess,
|
|
||||||
* MOnitoredPropertyReference [1] BACnetObjectPropertyReference,
|
|
||||||
* IssueConfirmedNotifications [2] BOOLEAN,
|
|
||||||
* TimeRemaining [3] Unsigned,
|
|
||||||
* COVIncrement [4] REAL,
|
|
||||||
* }
|
|
||||||
* @param tvb
|
|
||||||
* @param tree
|
|
||||||
* @param offset
|
|
||||||
* @return modified offset
|
|
||||||
*/
|
|
||||||
static guint
|
|
||||||
fCOVSubscription (tvbuff_t *tvb, proto_tree *tree, guint offset);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* BACnetDailySchedule ::= SEQUENCE {
|
|
||||||
* day-schedule [0] SENQUENCE OF BACnetTimeValue
|
|
||||||
* }
|
|
||||||
* @param tvb
|
|
||||||
* @param tree
|
|
||||||
* @param offset
|
|
||||||
* @return modified offset
|
|
||||||
*/
|
|
||||||
static guint
|
static guint
|
||||||
fDailySchedule (tvbuff_t *tvb, proto_tree *tree, guint offset);
|
fDailySchedule (tvbuff_t *tvb, proto_tree *tree, guint offset);
|
||||||
|
|
||||||
|
@ -1933,7 +1907,7 @@ fTimeSpan (tvbuff_t *tvb, proto_tree *tree, guint offset, guint8 *label);
|
||||||
* @return modified offset
|
* @return modified offset
|
||||||
*/
|
*/
|
||||||
static guint
|
static guint
|
||||||
fPropertyIdentifier (tvbuff_t *tvb, proto_tree *tree, guint offset, proto_item **tt);
|
fPropertyIdentifier (tvbuff_t *tvb, proto_tree *tree, guint offset);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* listOfEventSummaries ::= SEQUENCE OF SEQUENCE {
|
* listOfEventSummaries ::= SEQUENCE OF SEQUENCE {
|
||||||
|
|
|
@ -107,6 +107,7 @@ dissect_bvlc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||||
guint16 bvlc_length;
|
guint16 bvlc_length;
|
||||||
guint16 packet_length;
|
guint16 packet_length;
|
||||||
guint npdu_length;
|
guint npdu_length;
|
||||||
|
guint length_remaining;
|
||||||
guint16 bvlc_result;
|
guint16 bvlc_result;
|
||||||
tvbuff_t *next_tvb;
|
tvbuff_t *next_tvb;
|
||||||
|
|
||||||
|
@ -121,6 +122,7 @@ dissect_bvlc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||||
bvlc_type = tvb_get_guint8(tvb, offset);
|
bvlc_type = tvb_get_guint8(tvb, offset);
|
||||||
bvlc_function = tvb_get_guint8(tvb, offset+1);
|
bvlc_function = tvb_get_guint8(tvb, offset+1);
|
||||||
packet_length = tvb_get_ntohs(tvb, offset+2);
|
packet_length = tvb_get_ntohs(tvb, offset+2);
|
||||||
|
length_remaining = tvb_length_remaining(tvb, offset);
|
||||||
if (bvlc_function > 0x08) {
|
if (bvlc_function > 0x08) {
|
||||||
/* We have a constant header length of BVLC of 4 in every
|
/* We have a constant header length of BVLC of 4 in every
|
||||||
* BVLC-packet forewarding an NPDU. Beware: Changes in the
|
* BVLC-packet forewarding an NPDU. Beware: Changes in the
|
||||||
|
@ -159,6 +161,12 @@ dissect_bvlc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||||
bvlc_function, val_to_str (bvlc_function,
|
bvlc_function, val_to_str (bvlc_function,
|
||||||
bvlc_function_names, "Unknown"));
|
bvlc_function_names, "Unknown"));
|
||||||
offset ++;
|
offset ++;
|
||||||
|
if (length_remaining != packet_length)
|
||||||
|
proto_tree_add_uint_format(bvlc_tree, hf_bvlc_length, tvb, offset,
|
||||||
|
2, bvlc_length,
|
||||||
|
"BVLC-Length: %d of %d bytes (invalid length - expected %d bytes)",
|
||||||
|
bvlc_length, packet_length, length_remaining);
|
||||||
|
else
|
||||||
proto_tree_add_uint_format(bvlc_tree, hf_bvlc_length, tvb, offset,
|
proto_tree_add_uint_format(bvlc_tree, hf_bvlc_length, tvb, offset,
|
||||||
2, bvlc_length, "BVLC-Length: %d of %d bytes BACnet packet length",
|
2, bvlc_length, "BVLC-Length: %d of %d bytes BACnet packet length",
|
||||||
bvlc_length, packet_length);
|
bvlc_length, packet_length);
|
||||||
|
|
Loading…
Reference in New Issue