static int hf_bacapp_service = -1;
static int hf_bacapp_NAK = -1;
static int hf_bacapp_SRV = -1;
+static int hf_Device_Instance_Range_Low_Limit = -1;
+static int hf_Device_Instance_Range_High_Limit = -1;
static int hf_BACnetRejectReason = -1;
static int hf_BACnetAbortReason = -1;
static int hf_BACnetApplicationTagNumber = -1;
return offset+tag_len+lvt;
}
+static guint
+fDevice_Instance (tvbuff_t *tvb, proto_tree *tree, guint offset, int hf)
+{
+ guint8 tag_no, tag_info;
+ guint32 lvt;
+ guint tag_len;
+ proto_item *ti;
+ proto_tree *subtree;
+
+ tag_len = fTagHeader (tvb, offset, &tag_no, &tag_info, &lvt);
+ ti = proto_tree_add_item(tree, hf, tvb, offset+tag_len, lvt, TRUE);
+ subtree = proto_item_add_subtree(ti, ett_bacapp_tag);
+ fTagHeaderTree (tvb, subtree, offset, &tag_no, &tag_info, &lvt);
+
+ return offset+tag_len+lvt;
+}
+
/* set split_val to zero when not needed */
static guint
fEnumeratedTagSplit (tvbuff_t *tvb, proto_tree *tree, guint offset, const gchar *label,
proto_tree* subtree;
/* beginning of new item - indent and label */
- tt = proto_tree_add_text(orgtree, tvb, offset, 1, "Recipient Process" );
+ tt = proto_tree_add_text(orgtree, tvb, offset, 1, "Recipient Process" );
tree = proto_item_add_subtree(tt, ett_bacapp_value);
while (tvb_reported_length_remaining(tvb, offset)) { /* exit loop if nothing happens inside */
tt = proto_tree_add_text(tree, tvb, offset, 1, "Recipient"); /* add tree label and indent */
subtree = proto_item_add_subtree(tt, ett_bacapp_value);
offset += fTagHeaderTree(tvb, subtree, offset, &tag_no, &tag_info, &lvt); /* show context open */
- offset = fRecipientProcess (tvb, pinfo, subtree, offset);
+ offset = fRecipientProcess (tvb, pinfo, subtree, offset);
offset += fTagHeaderTree (tvb, subtree, offset, &tag_no, &tag_info, &lvt); /* show context close */
subtree = tree; /* done with this level - return to previous tree */
break;
tag_len = fTagHeader (tvb, offset, &tag_no, &tag_info, &lvt);
switch (tag_no) {
- case 0: /* DeviceInstanceRangeLowLimit Optional */
+ case 0:
+ /* DeviceInstanceRangeLowLimit Optional */
fUnsigned32(tvb, offset+tag_len, lvt, &val);
if (col_get_writable(pinfo->cinfo))
col_append_fstr(pinfo->cinfo, COL_INFO, "%d ", val);
-
- offset = fUnsignedTag (tvb, tree, offset, "Device Instance Range Low Limit: ");
+ offset = fDevice_Instance (tvb, tree, offset,
+ hf_Device_Instance_Range_Low_Limit);
break;
- case 1: /* DeviceInstanceRangeHighLimit Optional but required if DeviceInstanceRangeLowLimit is there */
+ case 1:
+ /* DeviceInstanceRangeHighLimit Optional but
+ required if DeviceInstanceRangeLowLimit is there */
fUnsigned32(tvb, offset+tag_len, lvt, &val);
if (col_get_writable(pinfo->cinfo))
col_append_fstr(pinfo->cinfo, COL_INFO, "%d ", val);
-
- offset = fUnsignedTag (tvb, tree, offset, "Device Instance Range High Limit: ");
+ offset = fDevice_Instance (tvb, tree, offset,
+ hf_Device_Instance_Range_High_Limit);
break;
default:
return offset;
{ "SRV", "bacapp.SRV",
FT_BOOLEAN, 8, NULL, 0x01, "Server", HFILL }
},
+ { &hf_Device_Instance_Range_Low_Limit,
+ { "Device Instance Range Low Limit", "bacapp.who_is.low_limit",
+ FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }
+ },
+ { &hf_Device_Instance_Range_High_Limit,
+ { "Device Instance Range High Limit", "bacapp.who_is.high_limit",
+ FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }
+ },
{ &hf_BACnetRejectReason,
{ "Reject Reason", "bacapp.reject_reason",
FT_UINT8, BASE_DEC, VALS(BACnetRejectReason), 0x00, NULL, HFILL }