aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormorriss <morriss@f5534014-38df-0310-8fa8-9805f1628bb7>2008-03-15 22:41:57 +0000
committermorriss <morriss@f5534014-38df-0310-8fa8-9805f1628bb7>2008-03-15 22:41:57 +0000
commit5731404a76e855e4e9fc668bcbca581efa4157d6 (patch)
treef47ad51a0b89e8928364c8ae55f70a5d16d8dfdf
parent88726ce48212e915edeed59cdb7c0a51e5f61662 (diff)
From http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1539 :
Hexadecimal and octal are unsigned. Don't let dissectors register signed fields (FT_INT*) to be displayed in hexadecimal (including HEX_DEC and DEC_HEX) or octal. Fix dissectors that do that mostly by changing the fields to unsigned though in PANA it appears the fields are meant to be signed so change those fields to be displayed in decimal. This fixes an assertion crash in hfinfo_numeric_format() if/when someone tries to create a filter using one of these mixed signed/unsigned fields (because that routine does not know how to present the user with a signed value in hex). Also add FT_*INT64 to the "make sure it's not BASE_NONE" check. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@24643 f5534014-38df-0310-8fa8-9805f1628bb7
-rw-r--r--epan/dissectors/packet-acn.c228
-rw-r--r--epan/dissectors/packet-dlm3.c102
-rw-r--r--epan/dissectors/packet-dua.c4
-rw-r--r--epan/dissectors/packet-ieee80211.c14
-rw-r--r--epan/dissectors/packet-pana.c4
-rw-r--r--epan/dissectors/packet-pcnfsd.c2
-rw-r--r--epan/dissectors/packet-ptp.c702
-rw-r--r--epan/dissectors/packet-scsi-ssc.c72
-rw-r--r--epan/proto.c25
9 files changed, 585 insertions, 568 deletions
diff --git a/epan/dissectors/packet-acn.c b/epan/dissectors/packet-acn.c
index 9573bccac0..cc27225d72 100644
--- a/epan/dissectors/packet-acn.c
+++ b/epan/dissectors/packet-acn.c
@@ -27,13 +27,13 @@
*/
/*
- Todo:
+ Todo:
Add reading of DDL files so we can futher explode DMP packets
For some of the Set/Get properties where we have a range of data
it would be better to show the block of data rather and
address-data pair on each line...
- Build CID to "Name" table from file so we can display real names
+ Build CID to "Name" table from file so we can display real names
rather than CIDs
*/
@@ -60,7 +60,7 @@
* ANSI BSR E1.31
*/
-#define ACTUAL_ADDRESS 0
+#define ACTUAL_ADDRESS 0
/* forward reference */
static gboolean dissect_acn_heur( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree );
static guint32 acn_add_channel_owner_info_block(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree _U_, int offset);
@@ -173,44 +173,44 @@ static int hf_acn_dmx_count = -1;
/* Try heuristic ACN decode */
static gboolean global_acn_heur = FALSE;
static gboolean global_acn_dmx_enable = FALSE;
-static gint global_acn_dmx_display_view = 0;
-static gint global_acn_dmx_display_line_format = 0;
+static gint global_acn_dmx_display_view = 0;
+static gint global_acn_dmx_display_line_format = 0;
static gboolean global_acn_dmx_display_zeros = FALSE;
static gboolean global_acn_dmx_display_leading_zeros = FALSE;
static const value_string acn_protocol_id_vals[] = {
- { ACN_PROTOCOL_ID_SDT, "SDT Protocol" },
- { ACN_PROTOCOL_ID_DMP, "DMP Protocol" },
- { ACN_PROTOCOL_ID_DMX, "DMX Protocol" },
+ { ACN_PROTOCOL_ID_SDT, "SDT Protocol" },
+ { ACN_PROTOCOL_ID_DMP, "DMP Protocol" },
+ { ACN_PROTOCOL_ID_DMX, "DMX Protocol" },
{ 0, NULL },
};
static const value_string acn_dmp_adt_r_vals[] = {
- { 0, "Relative" },
- { 1, "Absolute" },
+ { 0, "Relative" },
+ { 1, "Absolute" },
{ 0, NULL },
};
static const value_string acn_dmp_adt_v_vals[] = {
- { 0, "Actual" },
- { 1, "Virtual" },
+ { 0, "Actual" },
+ { 1, "Virtual" },
{ 0, NULL },
};
static const value_string acn_dmp_adt_d_vals[] = {
- { ACN_DMP_ADT_D_NS, "Non-range, single data item" },
- { ACN_DMP_ADT_D_RS, "Range, single data item" },
- { ACN_DMP_ADT_D_RE, "Range, array of equal size data items" },
- { ACN_DMP_ADT_D_RM, "Range, series of mixed size data items" },
+ { ACN_DMP_ADT_D_NS, "Non-range, single data item" },
+ { ACN_DMP_ADT_D_RS, "Range, single data item" },
+ { ACN_DMP_ADT_D_RE, "Range, array of equal size data items" },
+ { ACN_DMP_ADT_D_RM, "Range, series of mixed size data items" },
{ 0, NULL },
};
static const value_string acn_dmp_adt_a_vals[] = {
- { ACN_DMP_ADT_A_1, "1 octet" },
- { ACN_DMP_ADT_A_2, "2 octets" },
- { ACN_DMP_ADT_A_4, "4 octets" },
- { ACN_DMP_ADT_A_R, "reserved" },
+ { ACN_DMP_ADT_A_1, "1 octet" },
+ { ACN_DMP_ADT_A_2, "2 octets" },
+ { ACN_DMP_ADT_A_4, "4 octets" },
+ { ACN_DMP_ADT_A_R, "reserved" },
{ 0, NULL },
};
@@ -272,35 +272,35 @@ static const value_string acn_ip_address_type_vals[] = {
};
static const value_string acn_refuse_code_vals[] = {
- { ACN_REFUSE_CODE_NONSPECIFIC, "Nonspecific" },
- { ACN_REFUSE_CODE_ILLEGAL_PARAMS, "Illegal Parameters" },
- { ACN_REFUSE_CODE_LOW_RESOURCES, "Low Resources" },
- { ACN_REFUSE_CODE_ALREADY_MEMBER, "Already Member" },
- { ACN_REFUSE_CODE_BAD_ADDR_TYPE, "Bad Address Type" },
- { ACN_REFUSE_CODE_NO_RECIP_CHAN, "No Reciprocal Channel" },
+ { ACN_REFUSE_CODE_NONSPECIFIC, "Nonspecific" },
+ { ACN_REFUSE_CODE_ILLEGAL_PARAMS, "Illegal Parameters" },
+ { ACN_REFUSE_CODE_LOW_RESOURCES, "Low Resources" },
+ { ACN_REFUSE_CODE_ALREADY_MEMBER, "Already Member" },
+ { ACN_REFUSE_CODE_BAD_ADDR_TYPE, "Bad Address Type" },
+ { ACN_REFUSE_CODE_NO_RECIP_CHAN, "No Reciprocal Channel" },
{ 0, NULL },
};
static const value_string acn_reason_code_vals[] = {
- { ACN_REASON_CODE_NONSPECIFIC, "Nonspecific" },
- { ACN_REASON_CODE_NO_RECIP_CHAN, "No Reciprocal Channel" },
- { ACN_REASON_CODE_CHANNEL_EXPIRED, "Channel Expired" },
- { ACN_REASON_CODE_LOST_SEQUENCE, "Lost Sequence" },
- { ACN_REASON_CODE_SATURATED, "Saturated" },
- { ACN_REASON_CODE_TRANS_ADDR_CHANGING, "Transport Address Changing" },
- { ACN_REASON_CODE_ASKED_TO_LEAVE, "Asked to Leave" },
+ { ACN_REASON_CODE_NONSPECIFIC, "Nonspecific" },
+ { ACN_REASON_CODE_NO_RECIP_CHAN, "No Reciprocal Channel" },
+ { ACN_REASON_CODE_CHANNEL_EXPIRED, "Channel Expired" },
+ { ACN_REASON_CODE_LOST_SEQUENCE, "Lost Sequence" },
+ { ACN_REASON_CODE_SATURATED, "Saturated" },
+ { ACN_REASON_CODE_TRANS_ADDR_CHANGING, "Transport Address Changing" },
+ { ACN_REASON_CODE_ASKED_TO_LEAVE, "Asked to Leave" },
{ ACN_REASON_CODE_NO_RECIPIENT, "No Recipient"},
{ 0, NULL },
};
static const value_string acn_dmp_reason_code_vals[] = {
- { ACN_DMP_REASON_CODE_NONSPECIFIC, "Nonspecific" },
- { ACN_DMP_REASON_CODE_NOT_A_PROPERTY, "Not a Property" },
- { ACN_DMP_REASON_CODE_WRITE_ONLY, "Write Only" },
- { ACN_DMP_REASON_CODE_NOT_WRITABLE, "Not Writable" },
- { ACN_DMP_REASON_CODE_DATA_ERROR, "Data Error" },
- { ACN_DMP_REASON_CODE_MAPS_NOT_SUPPORTED, "Maps not Supported" },
- { ACN_DMP_REASON_CODE_SPACE_NOT_AVAILABLE, "Space not Available" },
+ { ACN_DMP_REASON_CODE_NONSPECIFIC, "Nonspecific" },
+ { ACN_DMP_REASON_CODE_NOT_A_PROPERTY, "Not a Property" },
+ { ACN_DMP_REASON_CODE_WRITE_ONLY, "Write Only" },
+ { ACN_DMP_REASON_CODE_NOT_WRITABLE, "Not Writable" },
+ { ACN_DMP_REASON_CODE_DATA_ERROR, "Data Error" },
+ { ACN_DMP_REASON_CODE_MAPS_NOT_SUPPORTED, "Maps not Supported" },
+ { ACN_DMP_REASON_CODE_SPACE_NOT_AVAILABLE, "Space not Available" },
{ ACN_DMP_REASON_CODE_PROP_NOT_MAPABLE, "Property not Mapable"},
{ ACN_DMP_REASON_CODE_MAP_NOT_ALLOCATED, "Map not Allocated"},
{ ACN_DMP_REASON_CODE_SUBSCRIPTION_NOT_SUPPORTED, "Subscription not Supported"},
@@ -323,13 +323,13 @@ static const enum_val_t dmx_display_line_format[] = {
/******************************************************************************/
/* Test to see if it is an ACN Packet */
-static gboolean is_acn(tvbuff_t *tvb)
+static gboolean is_acn(tvbuff_t *tvb)
{
static char acn_packet_id[] = "ASC-E1.17\0\0\0"; /* must be 12 bytes */
guint8 *packet_id;
/* Get the fields in octets 2 - 12 octet */
- packet_id = tvb_get_ephemeral_string(tvb, 4, 12);
+ packet_id = tvb_get_ephemeral_string(tvb, 4, 12);
if (memcmp(packet_id, &acn_packet_id, 12) == 0) {
return TRUE;
}
@@ -716,7 +716,7 @@ acn_add_dmp_address(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int
default: /* and ACN_DMP_ADT_A_R, this reserved....so it has no meaning yet */
return offset;
} /* of switch (A) */
-
+
if (adt->flags & ACN_DMP_ADT_FLAG_V) {
proto_tree_add_text(tree, tvb, start_offset, bytes_used, "Virtual Address first: 0x%X, inc: %d, count: %d", adt->address, adt->increment, adt->count);
} else {
@@ -724,7 +724,7 @@ acn_add_dmp_address(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int
}
break;
} /* of switch (D) */
-
+
return offset;
}
@@ -754,7 +754,7 @@ acn_add_dmp_data(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int of
/* */
/* There are a few exceptions however */
/* 1) if the address type is ACN_DMP_ADT_D_NS or ACN_DMP_ADT_D_RS and */
- /* or ACN_DMP_ADT_D_RE */
+ /* or ACN_DMP_ADT_D_RE */
/* then number of bytes is <= count + 4. Each value is at least one byte */
/* and another address/data pair is at least 4 bytes so if the remaining */
/* bytes is less than the count plus 4 then the remaining data */
@@ -781,14 +781,14 @@ acn_add_dmp_data(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int of
}
break;
}
-
+
if (!ok_to_process) {
data_size = adt->data_length;
ti = proto_tree_add_item(tree, hf_acn_data, tvb, offset, data_size, FALSE);
offset += data_size;
proto_item_set_text(ti, "Data and more Address-Data Pairs (further dissection not possible)");
return offset;
- }
+ }
A = ACN_DMP_ADT_EXTRACT_A(adt->flags);
switch (D) {
@@ -813,7 +813,7 @@ acn_add_dmp_data(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int of
switch (data_size) {
case 1:
- data_value = tvb_get_guint8(tvb, offset);
+ data_value = tvb_get_guint8(tvb, offset);
proto_tree_add_int_format(tree, hf_acn_data8, tvb, offset, 1, data_value, "%s %2.2X", buffer, data_value);
break;
case 2:
@@ -866,7 +866,7 @@ acn_add_dmp_data(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int of
switch (data_size) {
case 1:
- data_value = tvb_get_guint8(tvb, offset);
+ data_value = tvb_get_guint8(tvb, offset);
proto_tree_add_int_format(tree, hf_acn_data8, tvb, offset, 1, data_value, "%s %2.2X", buffer, data_value);
break;
case 2:
@@ -920,7 +920,7 @@ acn_add_dmp_data(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int of
switch (data_size) {
case 1:
- data_value = tvb_get_guint8(tvb, offset);
+ data_value = tvb_get_guint8(tvb, offset);
proto_tree_add_int_format(tree, hf_acn_data8, tvb, offset, 1, data_value, "%s %2.2X", buffer, data_value);
break;
case 2:
@@ -961,7 +961,7 @@ acn_add_dmp_data(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int of
proto_item_set_text(ti, "Mixed size data items");
break;
} /* of switch (D) */
-
+
return offset;
}
@@ -1003,7 +1003,7 @@ acn_add_dmp_reason_codes(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree
}
/* Get reason */
- data_value = tvb_get_guint8(tvb, offset);
+ data_value = tvb_get_guint8(tvb, offset);
/* convert to string */
name = val_to_str(data_value, acn_dmp_reason_code_vals, "reason not valid (%d)");
/* Add item */
@@ -1029,7 +1029,7 @@ acn_add_dmp_reason_codes(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree
}
/* Get reason */
- data_value = tvb_get_guint8(tvb, offset);
+ data_value = tvb_get_guint8(tvb, offset);
/* convert to string */
name = val_to_str(data_value, acn_dmp_reason_code_vals, "reason not valid (%d)");
/* Add item */
@@ -1058,7 +1058,7 @@ acn_add_dmp_reason_codes(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree
return offset;
}
/* Get reason */
- data_value = tvb_get_guint8(tvb, offset);
+ data_value = tvb_get_guint8(tvb, offset);
/* convert to string */
name = val_to_str(data_value, acn_dmp_reason_code_vals, "reason not valid (%d)");
/* Add item */
@@ -1068,7 +1068,7 @@ acn_add_dmp_reason_codes(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree
} /* of (x=0;x<adt->count;x++) */
break;
} /* of switch (D) */
-
+
return offset;
}
@@ -1099,7 +1099,7 @@ dissect_acn_dmp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int off
proto_item *ti, *pi;
proto_tree *pdu_tree = NULL;
proto_tree *flag_tree = NULL;
-
+
/* this pdu */
const gchar *name;
acn_dmp_adt_type adt = {0,0,0,0,0,0};
@@ -1111,10 +1111,10 @@ dissect_acn_dmp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int off
pdu_offsets.start = pdu_start;
/* get PDU flags and length flag first */
- octet = tvb_get_guint8(tvb, offset++);
+ octet = tvb_get_guint8(tvb, offset++);
pdu_flags = octet & 0xf0;
length1 = octet & 0x0f; /* bottom 4 bits only */
- length2 = tvb_get_guint8(tvb, offset++);
+ length2 = tvb_get_guint8(tvb, offset++);
/* if length flag is set, then we have a 20 bit length else we have a 12 bit */
/* flvh = flags, length, vector, header */
@@ -1130,7 +1130,7 @@ dissect_acn_dmp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int off
/* offset should now be pointing to vector (if one exists) */
/* Add pdu item and tree */
- ti = proto_tree_add_item(tree, hf_acn_pdu, tvb, pdu_start, pdu_length, FALSE);
+ ti = proto_tree_add_item(tree, hf_acn_pdu, tvb, pdu_start, pdu_length, FALSE);
pdu_tree = proto_item_add_subtree(ti, ett_acn_dmp_pdu);
/* Add flag item and tree */
@@ -1273,7 +1273,7 @@ dissect_acn_dmp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int off
address_count = adt.count;
break;
/*case ACN_DMP_ADT_D_RM: */
- default:
+ default:
/* OUCH */
return pdu_start + pdu_length;
break;
@@ -1396,7 +1396,7 @@ dissect_acn_sdt_wrapped_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
guint32 pdu_start;
guint32 pdu_length;
guint32 pdu_flvh_length; /* flags, length, vector, header */
- acn_pdu_offsets pdu_offsets = {0,0,0,0,0};
+ acn_pdu_offsets pdu_offsets = {0,0,0,0,0};
guint8 octet;
guint32 length1;
guint32 length2;
@@ -1419,10 +1419,10 @@ dissect_acn_sdt_wrapped_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
pdu_offsets.start = pdu_start;
/* get PDU flags and length flag first */
- octet = tvb_get_guint8(tvb, offset++);
+ octet = tvb_get_guint8(tvb, offset++);
pdu_flags = octet & 0xf0;
length1 = octet & 0x0f; /* bottom 4 bits only */
- length2 = tvb_get_guint8(tvb, offset++);
+ length2 = tvb_get_guint8(tvb, offset++);
/* if length flag is set, then we have a 20 bit length else we have a 12 bit */
/* flvh = flags, length, vector, header */
@@ -1438,7 +1438,7 @@ dissect_acn_sdt_wrapped_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
/* offset should now be pointing to vector (if one exists) */
/* Add pdu item and tree */
- ti = proto_tree_add_item(tree, hf_acn_pdu, tvb, pdu_start, pdu_length, FALSE);
+ ti = proto_tree_add_item(tree, hf_acn_pdu, tvb, pdu_start, pdu_length, FALSE);
pdu_tree = proto_item_add_subtree(ti, ett_acn_sdt_pdu);
/* Add flag item and tree */
@@ -1549,7 +1549,7 @@ dissect_acn_sdt_client_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
guint32 pdu_start;
guint32 pdu_length;
guint32 pdu_flvh_length; /* flags, length, vector, header */
- acn_pdu_offsets pdu_offsets = {0,0,0,0,0};
+ acn_pdu_offsets pdu_offsets = {0,0,0,0,0};
guint8 octet;
guint32 length1;
guint32 length2;
@@ -1576,10 +1576,10 @@ dissect_acn_sdt_client_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
pdu_offsets.start = pdu_start;
/* get PDU flags and length flag first */
- octet = tvb_get_guint8(tvb, offset++);
+ octet = tvb_get_guint8(tvb, offset++);
pdu_flags = octet & 0xf0;
length1 = octet & 0x0f; /* bottom 4 bits only */
- length2 = tvb_get_guint8(tvb, offset++);
+ length2 = tvb_get_guint8(tvb, offset++);
/* if length flag is set, then we have a 20 bit length else we have a 12 bit */
/* flvh = flags, length, vector, header */
@@ -1595,7 +1595,7 @@ dissect_acn_sdt_client_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
/* offset should now be pointing to vector (if one exists) */
/* Add pdu item and tree */
- ti = proto_tree_add_item(tree, hf_acn_pdu, tvb, pdu_start, pdu_length, FALSE);
+ ti = proto_tree_add_item(tree, hf_acn_pdu, tvb, pdu_start, pdu_length, FALSE);
pdu_tree = proto_item_add_subtree(ti, ett_acn_sdt_client_pdu);
/* Add flag item and tree */
@@ -1735,7 +1735,7 @@ ltos(guint8 level, gchar *string, guint8 base, gchar leading_char, guint8 min_ch
i = 0;
/* do our convert, comes out backwords! */
- do {
+ do {
string[i++] = "0123456789ABCDEF"[level % base];
} while ((level /= base) > 0);
@@ -1767,7 +1767,7 @@ dissect_acn_dmx_data_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, in
guint32 pdu_start;
guint32 pdu_length;
guint32 pdu_flvh_length; /* flags, length, vector, header */
- acn_pdu_offsets pdu_offsets = {0,0,0,0,0};
+ acn_pdu_offsets pdu_offsets = {0,0,0,0,0};
guint8 octet;
guint32 length1;
guint32 length2;
@@ -1809,10 +1809,10 @@ dissect_acn_dmx_data_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, in
pdu_offsets.start = pdu_start;
/* get PDU flags and length flag first */
- octet = tvb_get_guint8(tvb, offset++);
+ octet = tvb_get_guint8(tvb, offset++);
pdu_flags = octet & 0xf0;
length1 = octet & 0x0f; /* bottom 4 bits only */
- length2 = tvb_get_guint8(tvb, offset++);
+ length2 = tvb_get_guint8(tvb, offset++);
/* if length flag is set, then we have a 20 bit length else we have a 12 bit */
/* flvh = flags, length, vector, header */
@@ -1828,7 +1828,7 @@ dissect_acn_dmx_data_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, in
/* offset should now be pointing to vector (if one exists) */
/* Add pdu item and tree */
- ti = proto_tree_add_item(tree, hf_acn_pdu, tvb, pdu_start, pdu_length, FALSE);
+ ti = proto_tree_add_item(tree, hf_acn_pdu, tvb, pdu_start, pdu_length, FALSE);
pdu_tree = proto_item_add_subtree(ti, ett_acn_dmx_data_pdu);
/* Add flag item and tree */
@@ -1896,19 +1896,19 @@ dissect_acn_dmx_data_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, in
switch (vector) {
case ACN_DMP_VECTOR_SET_PROPERTY:
- dmx_start_code = tvb_get_ntohs(tvb, data_offset);
+ dmx_start_code = tvb_get_ntohs(tvb, data_offset);
proto_tree_add_item(pdu_tree, hf_acn_dmx_start_code, tvb, data_offset, 2, FALSE);
data_offset += 2;
proto_tree_add_item(pdu_tree, hf_acn_dmx_increment, tvb, data_offset, 2, FALSE);
data_offset += 2;
- dmx_count = tvb_get_ntohs(tvb, data_offset);
+ dmx_count = tvb_get_ntohs(tvb, data_offset);
proto_tree_add_item(pdu_tree, hf_acn_dmx_count, tvb, data_offset, 2, FALSE);
data_offset += 2;
buf_ptr = buffer;
switch (global_acn_dmx_display_line_format) {
- case ACN_PREF_DMX_DISPLAY_16PL:
+ case ACN_PREF_DMX_DISPLAY_16PL:
perline = 16;
halfline = 8;
break;
@@ -1938,7 +1938,7 @@ dissect_acn_dmx_data_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, in
/* add a snippet to info (this may be slow) */
if(check_col(pinfo->cinfo,COL_INFO)){
- col_append_fstr(pinfo->cinfo,COL_INFO, ", Sc %02x, [%02x %02x %02x %02x %02x %02x...]",
+ col_append_fstr(pinfo->cinfo,COL_INFO, ", Sc %02x, [%02x %02x %02x %02x %02x %02x...]",
dmx_start_code,
tvb_get_guint8(tvb, data_offset),
tvb_get_guint8(tvb, data_offset+1),
@@ -2006,7 +2006,7 @@ dissect_acn_dmx_data_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, in
number of dmx values - 4 bytes (0-512)
dmx values 0-512 bytes (data)
*/
-
+
break;
}
return pdu_start + pdu_length;
@@ -2024,7 +2024,7 @@ dissect_acn_dmx_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int off
guint32 pdu_start;
guint32 pdu_length;
guint32 pdu_flvh_length; /* flags, length, vector, header */
- acn_pdu_offsets pdu_offsets = {0,0,0,0,0};
+ acn_pdu_offsets pdu_offsets = {0,0,0,0,0};
guint8 octet;
guint32 length1;
guint32 length2;
@@ -2052,10 +2052,10 @@ dissect_acn_dmx_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int off
pdu_offsets.start = pdu_start;
/* get PDU flags and length flag first */
- octet = tvb_get_guint8(tvb, offset++);
+ octet = tvb_get_guint8(tvb, offset++);
pdu_flags = octet & 0xf0;
length1 = octet & 0x0f; /* bottom 4 bits only */
- length2 = tvb_get_guint8(tvb, offset++);
+ length2 = tvb_get_guint8(tvb, offset++);
/* if length flag is set, then we have a 20 bit length else we have a 12 bit */
/* flvh = flags, length, vector, header */
@@ -2072,7 +2072,7 @@ dissect_acn_dmx_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int off
/* offset should now be pointing to vector (if one exists) */
/* Add pdu item and tree */
- ti = proto_tree_add_item(tree, hf_acn_pdu, tvb, pdu_start, pdu_length, FALSE);
+ ti = proto_tree_add_item(tree, hf_acn_pdu, tvb, pdu_start, pdu_length, FALSE);
pdu_tree = proto_item_add_subtree(ti, ett_acn_dmx_pdu);
/* Add flag item and tree */
@@ -2130,15 +2130,15 @@ dissect_acn_dmx_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int off
proto_tree_add_item(pdu_tree, hf_acn_dmx_source_name, tvb, data_offset, 32, FALSE);
data_offset += 32;
- priority = tvb_get_guint8(tvb, data_offset);
+ priority = tvb_get_guint8(tvb, data_offset);
proto_tree_add_item(pdu_tree, hf_acn_dmx_priority, tvb, data_offset, 1, FALSE);
data_offset += 1;
- sequence = tvb_get_guint8(tvb, data_offset);
+ sequence = tvb_get_guint8(tvb, data_offset);
proto_tree_add_item(pdu_tree, hf_acn_dmx_sequence_number, tvb, data_offset, 1, FALSE);
data_offset += 1;
- universe = tvb_get_ntohs(tvb, data_offset);
+ universe = tvb_get_ntohs(tvb, data_offset);
proto_tree_add_item(pdu_tree, hf_acn_dmx_universe , tvb, data_offset, 2, FALSE);
data_offset += 2;
@@ -2166,7 +2166,7 @@ dissect_acn_sdt_base_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, in
guint32 pdu_start;
guint32 pdu_length;
guint32 pdu_flvh_length; /* flags, length, vector, header */
- acn_pdu_offsets pdu_offsets = {0,0,0,0,0};
+ acn_pdu_offsets pdu_offsets = {0,0,0,0,0};
guint8 octet;
guint32 length1;
guint32 length2;
@@ -2191,16 +2191,16 @@ dissect_acn_sdt_base_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, in
pdu_offsets.start = pdu_start;
/* get PDU flags and length flag first */
- octet = tvb_get_guint8(tvb, offset++);
+ octet = tvb_get_guint8(tvb, offset++);
pdu_flags = octet & 0xf0;
length1 = octet & 0x0f; /* bottom 4 bits only */
- length2 = tvb_get_guint8(tvb, offset++);
+ length2 = tvb_get_guint8(tvb, offset++);
/* if length flag is set, then we have a 20 bit length else we have a 12 bit */
/* flvh = flags, length, vector, header */
if (pdu_flags & ACN_PDU_FLAG_L) {
length3 = tvb_get_guint8(tvb, offset);
- offset++;
+ offset++;
pdu_length = length3 | (length2 << 8) | (length1 << 16);
pdu_flvh_length = 3;
} else {
@@ -2210,7 +2210,7 @@ dissect_acn_sdt_base_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, in
/* offset should now be pointing to vector (if one exists) */
/* Add pdu item and tree */
- ti = proto_tree_add_item(tree, hf_acn_pdu, tvb, pdu_start, pdu_length, FALSE);
+ ti = proto_tree_add_item(tree, hf_acn_pdu, tvb, pdu_start, pdu_length, FALSE);
pdu_tree = proto_item_add_subtree(ti, ett_acn_sdt_base_pdu);
/* Add flag item and tree */
@@ -2267,7 +2267,7 @@ dissect_acn_sdt_base_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, in
case ACN_SDT_VECTOR_UNKNOWN:
break;
case ACN_SDT_VECTOR_REL_WRAP:
- case ACN_SDT_VECTOR_UNREL_WRAP:
+ case ACN_SDT_VECTOR_UNREL_WRAP:
proto_tree_add_item(pdu_tree, hf_acn_channel_number, tvb, data_offset, 2, FALSE);
data_offset += 2;
proto_tree_add_item(pdu_tree, hf_acn_total_sequence_number, tvb, data_offset, 4, FALSE);
@@ -2406,7 +2406,7 @@ dissect_acn_root_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int of
guint32 pdu_start;
guint32 pdu_length;
guint32 pdu_flvh_length; /* flags, length, vector, header */
- acn_pdu_offsets pdu_offsets = {0,0,0,0,0};
+ acn_pdu_offsets pdu_offsets = {0,0,0,0,0};
guint8 octet;
guint32 length1;
guint32 length2;
@@ -2431,10 +2431,10 @@ dissect_acn_root_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int of
pdu_offsets.start = pdu_start;
/* get PDU flags and length flag first */
- octet = tvb_get_guint8(tvb, offset++);
+ octet = tvb_get_guint8(tvb, offset++);
pdu_flags = octet & 0xf0;
length1 = octet & 0x0f; /* bottom 4 bits only */
- length2 = tvb_get_guint8(tvb, offset++);
+ length2 = tvb_get_guint8(tvb, offset++);
/* if length flag is set, then we have a 20 bit length else we have a 12 bit */
/* flvh = flags, length, vector, header */
@@ -2450,7 +2450,7 @@ dissect_acn_root_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int of
/* offset should now be pointing to vector (if one exists) */
/* Add pdu item and tree */
- ti = proto_tree_add_item(tree, hf_acn_pdu, tvb, pdu_start, pdu_length, FALSE);
+ ti = proto_tree_add_item(tree, hf_acn_pdu, tvb, pdu_start, pdu_length, FALSE);
pdu_tree = proto_item_add_subtree(ti, ett_acn_root_pdu);
/* Add flag item and tree */
@@ -2482,13 +2482,13 @@ dissect_acn_root_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int of
/* Get Protocol ID (vector) */
protocol_id = tvb_get_ntohl(tvb, vector_offset);
proto_tree_add_uint(pdu_tree, hf_acn_protocol_id, tvb, vector_offset, 4, protocol_id);
-
+
/* process based on protocol_id */
switch (protocol_id) {
case ACN_PROTOCOL_ID_DMX:
if (global_acn_dmx_enable) {
proto_item_append_text(ti,": Root DMX");
-
+
/* Set header offset */
if (pdu_flags & ACN_PDU_FLAG_H) {
/* use new values */
@@ -2501,7 +2501,7 @@ dissect_acn_root_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int of
header_offset = last_pdu_offsets->header;
}
/* offset should now be pointing to data (if one exists) */
-
+
/* get Header (CID) 16 bytes */
tvb_get_guid(tvb, header_offset, &guid, FALSE);
proto_item_append_text(ti, ", Src: %s", guid_to_str(&guid));
@@ -2514,7 +2514,7 @@ dissect_acn_root_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int of
proto_tree_add_item(pdu_tree, hf_acn_cid, tvb, header_offset, 16, FALSE);
header_offset += 16;
-
+
/* Adjust data */
if (pdu_flags & ACN_PDU_FLAG_D) {
/* use new values */
@@ -2527,7 +2527,7 @@ dissect_acn_root_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int of
data_offset = last_pdu_offsets->data;
data_length = last_pdu_offsets->data_length;
}
- end_offset = data_offset + data_length;
+ end_offset = data_offset + data_length;
/* adjust for what we used */
while (data_offset < end_offset) {
@@ -2597,7 +2597,7 @@ dissect_acn(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
guint32 data_offset = 0;
guint32 old_offset;
guint32 end_offset;
- acn_pdu_offsets pdu_offsets = {0,0,0,0,0};
+ acn_pdu_offsets pdu_offsets = {0,0,0,0,0};
/* if (!is_acn(tvb)) { */
/* return 0; */
@@ -2685,22 +2685,22 @@ void proto_register_acn(void)
},
{ &hf_acn_data8,
{ "Addr", "acn.dmp_data8",
- FT_INT8, BASE_DEC_HEX, NULL, 0x0,
+ FT_UINT8, BASE_DEC_HEX, NULL, 0x0,
"Data8", HFILL }
},
{ &hf_acn_data16,
{ "Addr", "acn.dmp_data16",
- FT_INT16, BASE_DEC_HEX, NULL, 0x0,
+ FT_UINT16, BASE_DEC_HEX, NULL, 0x0,
"Data16", HFILL }
},
{ &hf_acn_data24,
{ "Addr", "acn.dmp_data24",
- FT_INT24, BASE_DEC_HEX, NULL, 0x0,
+ FT_UINT24, BASE_DEC_HEX, NULL, 0x0,
"Data24", HFILL }
},
{ &hf_acn_data32,
{ "Addr", "acn.dmp_data32",
- FT_INT32, BASE_DEC_HEX, NULL, 0x0,
+ FT_UINT32, BASE_DEC_HEX, NULL, 0x0,
"Data32", HFILL }
},
@@ -3059,32 +3059,32 @@ void proto_register_acn(void)
&global_acn_heur);
prefs_register_bool_preference(acn_module, "dmx_enable",
- "Streaming DMX",
+ "Streaming DMX",
"Enable Streaming DMX extension dissector (ANSI BSR E1.31)",
&global_acn_dmx_enable);
prefs_register_enum_preference(acn_module, "dmx_display_view",
- "DMX, display format",
- "Display format",
+ "DMX, display format",
+ "Display format",
&global_acn_dmx_display_view,
- dmx_display_view,
+ dmx_display_view,
TRUE);
prefs_register_bool_preference(acn_module, "dmx_display_zeros",
- "DMX, display zeros",
+ "DMX, display zeros",
"Display zeros instead of dots",
&global_acn_dmx_display_zeros);
prefs_register_bool_preference(acn_module, "dmx_display_leading_zeros",
- "DMX, display leading zeros",
+ "DMX, display leading zeros",
"Display leading zeros on levels",
&global_acn_dmx_display_leading_zeros);
prefs_register_enum_preference(acn_module, "dmx_display_line_format",
- "DMX, display line format",
- "Display line format",
+ "DMX, display line format",
+ "Display line format",
&global_acn_dmx_display_line_format,
- dmx_display_line_format,
+ dmx_display_line_format,
TRUE);
}
diff --git a/epan/dissectors/packet-dlm3.c b/epan/dissectors/packet-dlm3.c
index 1778d5cca8..e0a617c003 100644
--- a/epan/dissectors/packet-dlm3.c
+++ b/epan/dissectors/packet-dlm3.c
@@ -29,9 +29,9 @@
Actual implementation for the protocol is in linux kernel.
See files under linux/fs/dlm/ */
-/*
- * #defines are mostly copied from
- * *.[ch] files in linux/fs/dlm/ and linux/include/linux/dlm.h
+/*
+ * #defines are mostly copied from
+ * *.[ch] files in linux/fs/dlm/ and linux/include/linux/dlm.h
*
* dlm_internal.h:
* -----------------------------------------------------------------------
@@ -139,7 +139,7 @@
/* see asm-generic/errno-base.h about LINUX_* */
-#define LINUX_EAGAIN 11
+#define LINUX_EAGAIN 11
#define LINUX_ENOMEM 12
#define LINUX_INVAL 22
@@ -214,7 +214,7 @@ static int hf_dlm3_m_parent_remid = -1;
static int hf_dlm3_##NAME##_altpr = -1; \
static int hf_dlm3_##NAME##_altcw = -1; \
static int hf_dlm3_##NAME##_forceunlock = -1; \
- static int hf_dlm3_##NAME##_timeout = -1
+ static int hf_dlm3_##NAME##_timeout = -1
DLM3_DEFINE_HF_EXFLAGS(m_exflags);
/* bit fields for dlm_message::sbflags */
@@ -306,7 +306,7 @@ static gint ett_dlm3_rl_name = -1;
static guint dlm3_tcp_port = TCP_PORT_DLM3;
static guint dlm3_sctp_port = SCTP_PORT_DLM3;
-/*
+/*
* Value strings
*/
static const value_string dlm3_cmd[] = {
@@ -454,10 +454,10 @@ dissect_dlm3_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
proto_tree_add_uint(tree,
hf_dlm3_m_type, tvb, offset, 4, m_type);
if (check_col(pinfo->cinfo, COL_INFO))
- col_append_fstr(pinfo->cinfo, COL_INFO,
+ col_append_fstr(pinfo->cinfo, COL_INFO,
": %s",
- val_to_str(m_type,
- dlm3_msg,
+ val_to_str(m_type,
+ dlm3_msg,
"Unknown"));
offset += 4;
@@ -487,17 +487,17 @@ dissect_dlm3_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
hf_dlm3_m_parent_remid, tvb, offset, 4, TRUE);
offset += 4;
- proto_tree_add_bitmask(tree, tvb, offset,
+ proto_tree_add_bitmask(tree, tvb, offset,
hf_dlm3_m_exflags, ett_dlm3_m_exflags,
m_exflags_fields, TRUE);
offset += 4;
- proto_tree_add_bitmask(tree, tvb, offset,
+ proto_tree_add_bitmask(tree, tvb, offset,
hf_dlm3_m_sbflags, ett_dlm3_sbflags,
m_sbflags_fields, TRUE);
offset += 4;
- proto_tree_add_bitmask(tree, tvb, offset,
+ proto_tree_add_bitmask(tree, tvb, offset,
hf_dlm3_m_flags, ett_dlm3_m_flags,
m_flags_fields, TRUE);
@@ -527,7 +527,7 @@ dissect_dlm3_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
offset += 4;
- proto_tree_add_bitmask(tree, tvb, offset,
+ proto_tree_add_bitmask(tree, tvb, offset,
hf_dlm3_m_asts, ett_dlm3_m_asts,
m_asts_fields, TRUE);
offset += 4;
@@ -537,10 +537,10 @@ dissect_dlm3_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
offset += 4;
if ((length - offset) > 0) {
sub_item = proto_tree_add_item(tree,
- hf_dlm3_m_extra,
- tvb,
- offset,
- -1,
+ hf_dlm3_m_extra,
+ tvb,
+ offset,
+ -1,
TRUE);
}
}
@@ -548,7 +548,7 @@ dissect_dlm3_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
static void
-dissect_dlm3_rcom_lock(tvbuff_t *tvb, proto_tree *tree,
+dissect_dlm3_rcom_lock(tvbuff_t *tvb, proto_tree *tree,
guint length, int offset)
{
proto_item *sub_item;
@@ -558,7 +558,7 @@ dissect_dlm3_rcom_lock(tvbuff_t *tvb, proto_tree *tree,
guint32 exflags;
- if ((length - offset) < ( 4 * 8 + 4 + 1 * 4 + 2 * 2
+ if ((length - offset) < ( 4 * 8 + 4 + 1 * 4 + 2 * 2
+ DLM3_RESNAME_MAXLEN ))
return;
@@ -583,23 +583,23 @@ dissect_dlm3_rcom_lock(tvbuff_t *tvb, proto_tree *tree,
hf_dlm3_rl_parent_remid, tvb, offset, 4, TRUE);
offset += 4;
- proto_tree_add_bitmask(tree, tvb, offset,
+ proto_tree_add_bitmask(tree, tvb, offset,
hf_dlm3_rl_exflags, ett_dlm3_rl_exflags,
rl_exflags_fields, TRUE);
exflags = tvb_get_letohl(tvb, offset);
offset += 4;
- proto_tree_add_bitmask(tree, tvb, offset,
+ proto_tree_add_bitmask(tree, tvb, offset,
hf_dlm3_rl_flags, ett_dlm3_rl_flags,
rl_flags_fields, TRUE);
offset += 4;
- proto_tree_add_item(tree,
+ proto_tree_add_item(tree,
hf_dlm3_rl_lvbseq, tvb, offset, 4, TRUE);
offset += 4;
- proto_tree_add_item(tree,
+ proto_tree_add_item(tree,
hf_dlm3_rl_result, tvb, offset, 4, TRUE);
offset += 4;
@@ -615,7 +615,7 @@ dissect_dlm3_rcom_lock(tvbuff_t *tvb, proto_tree *tree,
hf_dlm3_rl_status, tvb, offset, 1, TRUE);
offset += 1;
- proto_tree_add_bitmask(tree, tvb, offset,
+ proto_tree_add_bitmask(tree, tvb, offset,
hf_dlm3_rl_asts, ett_dlm3_rl_asts,
rl_asts_fields, TRUE);
@@ -631,10 +631,10 @@ dissect_dlm3_rcom_lock(tvbuff_t *tvb, proto_tree *tree,
offset += 2;
sub_item = proto_tree_add_item(tree,
- hf_dlm3_rl_name, tvb, offset,
+ hf_dlm3_rl_name, tvb, offset,
DLM3_RESNAME_MAXLEN, TRUE);
- sub_tree = proto_item_add_subtree(sub_item,
+ sub_tree = proto_item_add_subtree(sub_item,
ett_dlm3_rl_name);
sub_offset = offset;
proto_tree_add_item(sub_tree,
@@ -649,14 +649,14 @@ dissect_dlm3_rcom_lock(tvbuff_t *tvb, proto_tree *tree,
offset += DLM3_RESNAME_MAXLEN;
if (((length - offset) > 0) && (exflags & DLM3_LKF_VALBLK))
proto_tree_add_item(tree,
- hf_dlm3_rl_lvb, tvb, offset,
- -1,
+ hf_dlm3_rl_lvb, tvb, offset,
+ -1,
TRUE);
}
static void
-dissect_dlm3_rcom_config(tvbuff_t *tvb, proto_tree *tree,
+dissect_dlm3_rcom_config(tvbuff_t *tvb, proto_tree *tree,
guint length, int offset)
{
if ((length - offset) < ( 4 + 4 + 8 ))
@@ -693,10 +693,10 @@ dissect_dlm3_rcom(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
proto_tree_add_uint(tree,
hf_dlm3_rc_type, tvb, offset, 4, rc_type);
if (check_col(pinfo->cinfo, COL_INFO))
- col_append_fstr(pinfo->cinfo, COL_INFO,
+ col_append_fstr(pinfo->cinfo, COL_INFO,
": %s",
- val_to_str(rc_type,
- dlm3_rcom,
+ val_to_str(rc_type,
+ dlm3_rcom,
"Unknown"));
offset += 4;
@@ -723,19 +723,19 @@ dissect_dlm3_rcom(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
/* Decode rc_buf */
sub_item = proto_tree_add_item(tree,
- hf_dlm3_rc_buf,
- tvb,
- offset,
- -1,
+ hf_dlm3_rc_buf,
+ tvb,
+ offset,
+ -1,
TRUE);
offset += 0;
if (rc_type == DLM3_RCOM_LOCK) {
- sub_tree = proto_item_add_subtree(sub_item,
+ sub_tree = proto_item_add_subtree(sub_item,
ett_dlm3_rcom_lock);
dissect_dlm3_rcom_lock(tvb, sub_tree, length, offset);
} else if (rc_type == DLM3_RCOM_STATUS_REPLY) {
- sub_tree = proto_item_add_subtree(sub_item,
+ sub_tree = proto_item_add_subtree(sub_item,
ett_dlm3_rcom_config);
dissect_dlm3_rcom_config(tvb, sub_tree, length, offset);
}
@@ -769,7 +769,7 @@ dissect_dlm3(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
if ((h_cmd != DLM3_MSG) && (h_cmd != DLM3_RCOM))
return 0;
- if ((h_cmd == DLM3_MSG) && (length < ((4 + 4 + 4 + 2 + 1 + 1)
+ if ((h_cmd == DLM3_MSG) && (length < ((4 + 4 + 4 + 2 + 1 + 1)
+ (4 * 12 + 4 * 6))))
return 0;
else if ((h_cmd == DLM3_RCOM) && (length < 4 + 4 + 8 + 8 + 8))
@@ -783,13 +783,13 @@ dissect_dlm3(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
if (check_col(pinfo->cinfo, COL_INFO))
col_clear(pinfo->cinfo, COL_INFO);
if (check_col(pinfo->cinfo, COL_INFO))
- col_set_str(pinfo->cinfo, COL_INFO,
+ col_set_str(pinfo->cinfo, COL_INFO,
"DLM3");
if (check_col(pinfo->cinfo, COL_INFO))
- col_set_str(pinfo->cinfo, COL_INFO,
- val_to_str(h_cmd,
- dlm3_cmd,
+ col_set_str(pinfo->cinfo, COL_INFO,
+ val_to_str(h_cmd,
+ dlm3_cmd,
"packet-dlm3.c internal bug"));
if (parent_tree) {
@@ -800,14 +800,14 @@ dissect_dlm3(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
tree = proto_item_add_subtree(item, ett_dlm3);
sub_item = proto_tree_add_uint(tree,
- hf_dlm3_h_version, tvb, offset, 4,
+ hf_dlm3_h_version, tvb, offset, 4,
h_version);
sub_tree = proto_item_add_subtree(sub_item, ett_dlm3_version);
proto_tree_add_uint(sub_tree,
- hf_dlm3_h_major_version, tvb, offset + 0, 2,
+ hf_dlm3_h_major_version, tvb, offset + 0, 2,
(h_version & 0xFFFF0000) >> 16);
proto_tree_add_uint(sub_tree,
- hf_dlm3_h_minor_version, tvb, offset + 2, 2,
+ hf_dlm3_h_minor_version, tvb, offset + 2, 2,
(h_version & 0x0000FFFF));
@@ -964,7 +964,7 @@ dissect_dlm3(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
#define DLM3_REGISTER_HF_ASTS(NAME,SIZE) \
{ &hf_dlm3_##NAME##_asts, \
{ "Asynchronous Traps", "dlm3." #NAME ".asts", \
- FT_INT##SIZE, BASE_HEX, NULL, 0x0, \
+ FT_UINT##SIZE, BASE_HEX, NULL, 0x0, \
NULL, HFILL}}, \
{ &hf_dlm3_##NAME##_asts_comp, \
{ "Completion", "dlm3." #NAME ".asts.comp", \
@@ -1041,15 +1041,15 @@ proto_register_dlm3(void)
NULL, HFILL}},
{ &hf_dlm3_m_sbflags_demoted,
{ "Demoted for deadlock resolution", "dlm3.m.sbflags.demoted",
- FT_BOOLEAN, 32, NULL, DLM3_SBF_DEMOTED,
+ FT_BOOLEAN, 32, NULL, DLM3_SBF_DEMOTED,
NULL, HFILL}},
{ &hf_dlm3_m_sbflags_valnotvalid,
{ "Lock Value Block Is Invalid", "dlm3.m.sbflags.valnotvalid",
- FT_BOOLEAN, 32, NULL, DLM3_SBF_VALNOTVALID,
+ FT_BOOLEAN, 32, NULL, DLM3_SBF_VALNOTVALID,
NULL, HFILL}},
{ &hf_dlm3_m_sbflags_altmode,
{ "Try to Grant in Alternative Mode", "dlm3.m.sbflags.altmode",
- FT_BOOLEAN, 32, NULL, DLM3_SBF_ALTMODE,
+ FT_BOOLEAN, 32, NULL, DLM3_SBF_ALTMODE,
NULL, HFILL}},
/* dlm_message::flags */
@@ -1132,7 +1132,7 @@ proto_register_dlm3(void)
{ &hf_dlm3_rf_unused,
{ "Unsed area", "dlm3.rf.lsflags.unused",
- FT_UINT64, BASE_HEX, NULL, 0x0,
+ FT_UINT64, BASE_HEX, NULL, 0x0,
NULL, HFILL}},
/* rcom_lock */
diff --git a/epan/dissectors/packet-dua.c b/epan/dissectors/packet-dua.c
index b1f2283a69..8be4d407ba 100644
--- a/epan/dissectors/packet-dua.c
+++ b/epan/dissectors/packet-dua.c
@@ -324,7 +324,7 @@ dissect_protocol_data_parameter(tvbuff_t *parameter_tvb, proto_item *parameter_i
}
call_dissector(data_handle, protocol_data_tvb, pinfo, tree);
-
+
proto_item_append_text(parameter_item, " (%u byte%s)", protocol_data_length, plurality(protocol_data_length, "", "s"));
}
@@ -716,7 +716,7 @@ proto_register_dua(void)
/* Setup list of header fields */
static hf_register_info hf[] = {
- { &hf_int_interface_id, { "Integer interface identifier", "dua.int_interface_identifier", FT_INT32, BASE_HEX, NULL, 0x0, "", HFILL } },
+ { &hf_int_interface_id, { "Integer interface identifier", "dua.int_interface_identifier", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL } },
{ &hf_text_interface_id, { "Text interface identifier", "dua.text_interface_identifier", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL } },
{ &hf_info_string, { "Info string", "dua.info_string", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL } },
{ &hf_dlci_reserved, { "Reserved", "dua.dlci_reserved", FT_UINT16, BASE_DEC, NULL, RESERVED_BIT_MASK, "", HFILL } },
diff --git a/epan/dissectors/packet-ieee80211.c b/epan/dissectors/packet-ieee80211.c
index 559021f917..8cd9e99be4 100644
--- a/epan/dissectors/packet-ieee80211.c
+++ b/epan/dissectors/packet-ieee80211.c
@@ -9168,19 +9168,19 @@ proto_register_ieee80211 (void)
/*** Begin: Maximum Transmit Power Fixed Field - Dustin Johnson ***/
{&ff_max_tx_pwr,
{"Maximum Transmit Power", "wlan_mgt.fixed.maxtxpwr",
- FT_INT8, BASE_HEX, 0, 0, "Maximum Transmit Power", HFILL }},
+ FT_UINT8, BASE_HEX, 0, 0, "Maximum Transmit Power", HFILL }},
/*** End: Maximum Transmit Power Fixed Field - Dustin Johnson ***/
/*** Begin: Transmit Power Used Fixed Field - Dustin Johnson ***/
{&ff_tx_pwr_used,
{"Transmit Power Used", "wlan_mgt.fixed.txpwr",
- FT_INT8, BASE_HEX, 0, 0, "Transmit Power Used", HFILL }},
+ FT_UINT8, BASE_HEX, 0, 0, "Transmit Power Used", HFILL }},
/*** End: Transmit Power Used Fixed Field - Dustin Johnson ***/
/*** Begin: Transmit Power Used Fixed Field - Dustin Johnson ***/
{&ff_transceiver_noise_floor,
{"Transceiver Noise Floor", "wlan_mgt.fixed.tnoisefloor",
- FT_INT8, BASE_HEX, 0, 0, "Transceiver Noise Floor", HFILL }},
+ FT_UINT8, BASE_HEX, 0, 0, "Transceiver Noise Floor", HFILL }},
/*** End: Transceiver Noise Floor Fixed Field - Dustin Johnson ***/
/*** Begin: Channel Width Fixed Field - Dustin Johnson ***/
@@ -10162,11 +10162,11 @@ proto_register_ieee80211 (void)
/*** Begin: Power Capability Tag - Dustin Johnson ***/
{&hf_tag_power_capability_min,
{"Minimum Transmit Power", "wlan_mgt.powercap.min",
- FT_INT8, BASE_HEX, NULL, 0, "Minimum Transmit Power", HFILL }},
+ FT_UINT8, BASE_HEX, NULL, 0, "Minimum Transmit Power", HFILL }},
{&hf_tag_power_capability_max,
{"Maximum Transmit Power", "wlan_mgt.powercap.max",
- FT_INT8, BASE_HEX, NULL, 0, "Maximum Transmit Power", HFILL }},
+ FT_UINT8, BASE_HEX, NULL, 0, "Maximum Transmit Power", HFILL }},
/*** End: Power Capability Tag - Dustin Johnson ***/
/*** Begin: Supported Channels Tag - Dustin Johnson ***/
@@ -10254,7 +10254,7 @@ proto_register_ieee80211 (void)
{&hf_tag_measure_request_threshold_offset_signed,
{"Threshold/Offset", "wlan_mgt.measure.req.threshold",
- FT_INT8, BASE_HEX, 0, 0, "Threshold/Offset", HFILL }},
+ FT_UINT8, BASE_HEX, 0, 0, "Threshold/Offset", HFILL }},
{&hf_tag_measure_request_report_mac,
{"MAC on wich to gather data", "wlan_mgt.measure.req.reportmac",
@@ -10262,7 +10262,7 @@ proto_register_ieee80211 (void)
{&hf_tag_measure_request_group_id,
{"Group ID", "wlan_mgt.measure.req.groupid",
- FT_INT8, BASE_HEX, VALS(&hf_tag_measure_request_group_id_flags), 0, "Group ID", HFILL }},
+ FT_UINT8, BASE_HEX, VALS(&hf_tag_measure_request_group_id_flags), 0, "Group ID", HFILL }},
/*** End: Measurement Request Tag - Dustin Johnson***/
/*** Start: Measurement Report Tag - Dustin Johnson***/
diff --git a/epan/dissectors/packet-pana.c b/epan/dissectors/packet-pana.c
index 846b57f614..166084f080 100644
--- a/epan/dissectors/packet-pana.c
+++ b/epan/dissectors/packet-pana.c
@@ -857,7 +857,7 @@ proto_register_pana(void)
},
{ &hf_pana_avp_data_int64,
{ "Value", "pana.avp.data.int64",
- FT_INT64, BASE_HEX, NULL, 0x0,
+ FT_INT64, BASE_DEC, NULL, 0x0,
NULL, HFILL }
},
{ &hf_pana_avp_data_uint32,
@@ -867,7 +867,7 @@ proto_register_pana(void)
},
{ &hf_pana_avp_data_int32,
{ "Value", "pana.avp.data.int32",
- FT_INT32, BASE_HEX, NULL, 0x0,
+ FT_INT32, BASE_DEC, NULL, 0x0,
NULL, HFILL }
},
{ &hf_pana_avp_data_bytes,
diff --git a/epan/dissectors/packet-pcnfsd.c b/epan/dissectors/packet-pcnfsd.c
index 5dc24022a9..d1962ec9b6 100644
--- a/epan/dissectors/packet-pcnfsd.c
+++ b/epan/dissectors/packet-pcnfsd.c
@@ -402,7 +402,7 @@ proto_register_pcnfsd(void)
"Home Directory", "pcnfsd.homedir", FT_STRING, BASE_DEC,
NULL, 0, "Home Directory", HFILL }},
{ &hf_pcnfsd_def_umask, {
- "def_umask", "pcnfsd.def_umask", FT_INT32, BASE_OCT,
+ "def_umask", "pcnfsd.def_umask", FT_UINT32, BASE_OCT,
NULL, 0, "def_umask", HFILL }},
{ &hf_pcnfsd_username, {
"User name", "pcnfsd.username", FT_STRING, BASE_DEC,
diff --git a/epan/dissectors/packet-ptp.c b/epan/dissectors/packet-ptp.c
index c227a17a09..dcf80acddd 100644
--- a/epan/dissectors/packet-ptp.c
+++ b/epan/dissectors/packet-ptp.c
@@ -11,11 +11,11 @@
* - Included the "startingBoundaryHops" field in
* ptp_management messages.
* - Christian Schaer 07.07.2006 <scc@zhwin.ch>
- * - Added support for PTP version 2
- * - Markus Renz 2007-06-01
- * updated support for PTPv2
+ * - Added support for PTP version 2
+ * - Markus Renz 2007-06-01
+ * updated support for PTPv2
* - Markus Renz added Management for PTPv2, update to Draft 2.2
- *
+ *
* $Id$
*
* Wireshark - Network traffic analyzer
@@ -742,9 +742,9 @@ static gint ett_ptp_time2 = -1;
/*Offsets for PTP_PDelayResponse (=PDRS) messages*/
-#define PTP_V2_PDRS_REQUESTRECEIPTTIMESTAMP_OFFSET 34
-#define PTP_V2_PDRS_REQUESTRECEIPTTIMESTAMPSECONDS_OFFSET 34
-#define PTP_V2_PDRS_REQUESTRECEIPTTIMESTAMPNANOSECONDS_OFFSET 40
+#define PTP_V2_PDRS_REQUESTRECEIPTTIMESTAMP_OFFSET 34
+#define PTP_V2_PDRS_REQUESTRECEIPTTIMESTAMPSECONDS_OFFSET 34
+#define PTP_V2_PDRS_REQUESTRECEIPTTIMESTAMPNANOSECONDS_OFFSET 40
#define PTP_V2_PDRS_REQUESTINGPORTIDENTITY_OFFSET 44 /* ++ */
#define PTP_V2_PDRS_REQUESTINGSOURCEPORTID_OFFSET 52 /* ++ */
@@ -852,14 +852,14 @@ static gint ett_ptp_time2 = -1;
#define PTP_V2_MM_ID_LOG_MIN_PDELAY_REQ_INTERVAL 0x6001
/* Management DataField for DefaultDS */
-#define PTP_V2_MM_RESERVED1 PTP_V2_MM_TLV_DATAFIELD_OFFSET + 1
-#define PTP_V2_MM_NUMBERPORTS PTP_V2_MM_TLV_DATAFIELD_OFFSET + 2
+#define PTP_V2_MM_RESERVED1 PTP_V2_MM_TLV_DATAFIELD_OFFSET + 1
+#define PTP_V2_MM_NUMBERPORTS PTP_V2_MM_TLV_DATAFIELD_OFFSET + 2
#define PTP_V2_MM_PRIORITY1 PTP_V2_MM_TLV_DATAFIELD_OFFSET + 4
#define PTP_V2_MM_CLOCKQUALITY PTP_V2_MM_TLV_DATAFIELD_OFFSET + 5
#define PTP_V2_MM_PRIORITY2 PTP_V2_MM_TLV_DATAFIELD_OFFSET + 9
#define PTP_V2_MM_CLOCKIDENTITY PTP_V2_MM_TLV_DATAFIELD_OFFSET + 10
-#define PTP_V2_MM_DOMAINNUMBER PTP_V2_MM_TLV_DATAFIELD_OFFSET + 18
-#define PTP_V2_MM_RESERVED2 PTP_V2_MM_TLV_DATAFIELD_OFFSET + 19
+#define PTP_V2_MM_DOMAINNUMBER PTP_V2_MM_TLV_DATAFIELD_OFFSET + 18
+#define PTP_V2_MM_RESERVED2 PTP_V2_MM_TLV_DATAFIELD_OFFSET + 19
#define PTP_V2_TRANSPORTSPECIFIC_V1COMPATIBILITY_BITMASK 0x10
@@ -946,7 +946,7 @@ static const value_string ptp_v2_managementID_vals[] = {
{PTP_V2_MM_ID_DELAY_MECHANISM ,"DELAY_MECHANISM"},
{PTP_V2_MM_ID_LOG_MIN_PDELAY_REQ_INTERVAL ,"LOG_MIN_PDELAY_REQ_INTERVAL"},
{0 ,NULL} };
-
+
/*same again but better readable text for info column*/
static const value_string ptp_v2_managementID_infocolumn_vals[] = {
{PTP_V2_MM_ID_NULL_MANAGEMENT ,"Null management"},
@@ -1013,7 +1013,7 @@ static const value_string ptp_v2_TLV_type_vals[] = {
{PTP_V2_TLV_TYPE_SECURITY_ASSOCIATION_UPDATE ,"Security association update"},
{PTP_V2_TLV_TYPE_CUM_FREQ_SCALE_FACTOR_OFFSET ,"Cum. freq. scale factor offset"},
{0 , NULL} };
-
+
static const value_string ptp2_networkProtocol_vals[] = {
{0x0000, "Reserved"},
@@ -1026,8 +1026,8 @@ static const value_string ptp2_networkProtocol_vals[] = {
{0x0007, "Reserved"},
{0xFFFE, "Unknown Protocol"},
{0xFFFF, "Reserved"},
- {0, NULL } };
-
+ {0, NULL } };
+
static const value_string ptp_v2_messageid_vals[] = {
{PTP_V2_SYNC_MESSAGE, "Sync Message"},
@@ -1040,7 +1040,7 @@ static const value_string ptp_v2_messageid_vals[] = {
{PTP_V2_ANNOUNCE_MESSAGE, "Announce Message"},
{PTP_V2_SIGNALLING_MESSAGE, "Signalling Message"},
{PTP_V2_MANAGEMENT_MESSAGE, "Management Message"},
- {0, NULL }
+ {0, NULL }
};
static const value_string ptp_v2_clockaccuracy_vals[] = {
@@ -1066,7 +1066,7 @@ static const value_string ptp_v2_clockaccuracy_vals[] = {
{0x80, "For use by alternate PTP profiles"},
{0xFE, "Accuracy Unknown"},
{0xFF, "reserved"},
- {0, NULL }
+ {0, NULL }
};
static const value_string ptp_v2_timesource_vals[] = {
@@ -1079,7 +1079,7 @@ static const value_string ptp_v2_timesource_vals[] = {
{0x90, "OTHER"},
{0xA0, "INTERNAL_OSCILLATOR"},
{0xFF, "reserved"},
- {0, NULL }
+ {0, NULL }
};
static const value_string ptp_v2_mm_action_vals[] = {
@@ -1088,7 +1088,7 @@ static const value_string ptp_v2_mm_action_vals[] = {
{0x2, "RESPONSE"},
{0x3, "COMMAND"},
{0x4, "ACKNOWLEDGE"},
- {0, NULL }
+ {0, NULL }
};
static const value_string ptp2_severityCode_vals[] = {
@@ -1102,9 +1102,9 @@ static const value_string ptp2_severityCode_vals[] = {
{0x07, "Debug: debug-level messages"},
{0x08, "Reserved"},
{0xFF, "Reserved"},
- {0, NULL}
+ {0, NULL}
};
-
+
static const value_string ptp2_portState_vals[] = {
{0x01, "INITIALIZING"},
{0x02, "FAULTY"},
@@ -1115,14 +1115,14 @@ static const value_string ptp2_portState_vals[] = {
{0x07, "PASSIVE"},
{0x08, "UNCALIBRATED"},
{0x09, "SLAVE"},
- {0, NULL}
+ {0, NULL}
};
static const value_string ptp2_delayMechanism_vals[] = {
{0x01, "E2E"},
{0x02, "P2P"},
{0xFE, "DISABLED"},
- {0, NULL}
+ {0, NULL}
};
static const value_string ptp2_managementErrorId_vals[] = {
@@ -1136,7 +1136,7 @@ static const value_string ptp2_managementErrorId_vals[] = {
{0x0007, "Reserved"},
{0xFFFE, "GENERAL_ERROR"},
{0xFFFF, "Reserved"},
- {0, NULL}
+ {0, NULL}
};
/**********************************************************/
@@ -1370,7 +1370,7 @@ static gint ett_ptp_v2_faultRecord = -1;
static gint ett_ptp_v2_ptptext = -1;
static gint ett_ptp_v2_timeInterval = -1;
-/* static gint ett_ptp_v2_timesource = -1;
+/* static gint ett_ptp_v2_timesource = -1;
static gint ett_ptp_v2_priority = -1; */
static gint ett_ptp_v2_transportspecific = -1;
@@ -2125,23 +2125,23 @@ void
dissect_ptp_v2_text(tvbuff_t *tvb, guint16 *cur_offset, proto_tree *tree, int hf_ptp_v2_mm_ptptext, int hf_ptp_v2_mm_ptptext_length)
{
guint8 length = 0;
- proto_item *ptptext_ti;
+ proto_item *ptptext_ti;
proto_tree *ptptext_subtree;
-
+
length = tvb_get_guint8 (tvb, *cur_offset);
-
- if (tree)
+
+ if (tree)
{
ptptext_ti = proto_tree_add_item(tree, hf_ptp_v2_mm_ptptext, tvb,
*cur_offset+1, length, FALSE);
-
- ptptext_subtree = proto_item_add_subtree(ptptext_ti, ett_ptp_v2_ptptext);
- /* subtree */
+
+ ptptext_subtree = proto_item_add_subtree(ptptext_ti, ett_ptp_v2_ptptext);
+ /* subtree */
proto_tree_add_item(ptptext_subtree, hf_ptp_v2_mm_ptptext_length, tvb,
*cur_offset, 1, FALSE);
proto_tree_add_item(ptptext_subtree, hf_ptp_v2_mm_ptptext, tvb,
*cur_offset+1, length, FALSE);
-
+
*cur_offset = *cur_offset + length + 1;
}
}
@@ -2150,22 +2150,22 @@ void
dissect_ptp_v2_timeInterval(tvbuff_t *tvb, guint16 *cur_offset, proto_tree *tree, char* name, int hf_ptp_v2_timeInterval_ns, int hf_ptp_v2_timeInterval_subns)
{
- double time;
+ double time;
gint64 time_ns;
guint16 time_subns;
- proto_item *ptptimeInterval_ti;
+ proto_item *ptptimeInterval_ti;
proto_tree *ptptimeInterval_subtree;
time_ns = tvb_get_ntohl(tvb, *cur_offset);
time_subns = tvb_get_ntohs(tvb, *cur_offset+6);
-
+
time_ns = time_ns << 16;
if(time_ns & 0x800000){
time_ns = time_ns | G_GINT64_CONSTANT(0xFFFFFFFFFF000000);
time_ns = time_ns | tvb_get_ntohs(tvb, *cur_offset+4);
-
+
time = ((1.0*time_ns) + (time_subns/65536.0));
}
else
@@ -2173,20 +2173,20 @@ dissect_ptp_v2_timeInterval(tvbuff_t *tvb, guint16 *cur_offset, proto_tree *tree
time_ns = time_ns | tvb_get_ntohs(tvb, *cur_offset+4);
time = time_ns + (time_subns/65536.0);
}
-
+
ptptimeInterval_ti = proto_tree_add_text(tree, tvb, *cur_offset, 8,
"%s: %f nanoseconds", name, time);
-
+
ptptimeInterval_subtree = proto_item_add_subtree(ptptimeInterval_ti, ett_ptp_v2_timeInterval);
-
+
proto_tree_add_uint64_format_value(ptptimeInterval_subtree,
hf_ptp_v2_timeInterval_ns, tvb, *cur_offset, 6, time_ns, "Ns: %" G_GINT64_MODIFIER "d nanoseconds", time_ns);
proto_tree_add_double_format(ptptimeInterval_subtree,
- hf_ptp_v2_timeInterval_subns, tvb, *cur_offset+6, 2, (time_subns/65536.0),
+ hf_ptp_v2_timeInterval_subns, tvb, *cur_offset+6, 2, (time_subns/65536.0),
"SubNs: %f nanoseconds", (time_subns/65536.0));
-
- *cur_offset = *cur_offset + 8;
+
+ *cur_offset = *cur_offset + 8;
}
/* Code to actually dissect the PTPv2 packets */
@@ -2202,7 +2202,7 @@ dissect_ptp_v2(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* Set up structures needed to add the protocol subtree and manage it */
proto_item *ti, *transportspecific_ti, *flags_ti, *managementData_ti, *clockType_ti, *protocolAddress_ti;
- proto_tree *ptp_tree, *ptp_transportspecific_tree, *ptp_flags_tree, *ptp_managementData_tree,
+ proto_tree *ptp_tree, *ptp_transportspecific_tree, *ptp_flags_tree, *ptp_managementData_tree,
*ptp_clockType_tree, *ptp_protocolAddress_tree;
/* Make entries in Protocol column and Info column on summary display */
@@ -2223,26 +2223,26 @@ dissect_ptp_v2(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* Get TLV Type */
tlv_type = tvb_get_ntohs (tvb, PTP_V2_MM_TLV_TYPE_OFFSET);
/* For management there are PTP_V2_TLV_TYPE_MANAGEMENT and PTP_V2_TLV_TYPE_MANAGEMENT_ERROR_STATUS TLVs */
- switch(tlv_type)
+ switch(tlv_type)
{
case PTP_V2_TLV_TYPE_MANAGEMENT:
/* Get the managementId */
ptp_v2_mm_managementId = tvb_get_ntohs(tvb, PTP_V2_MM_TLV_MANAGEMENTID_OFFSET);
- col_add_fstr(pinfo->cinfo, COL_INFO, "Management Message (%s)", val_to_str(ptp_v2_mm_managementId,
+ col_add_fstr(pinfo->cinfo, COL_INFO, "Management Message (%s)", val_to_str(ptp_v2_mm_managementId,
ptp_v2_managementID_infocolumn_vals, "Unknown management Id %u"));
break;
case PTP_V2_TLV_TYPE_MANAGEMENT_ERROR_STATUS:
/* Get the managementErrorId */
ptp_v2_mm_managementId = tvb_get_ntohs(tvb, PTP_V2_MM_TLV_MANAGEMENTERRORID_OFFSET);
- col_add_fstr(pinfo->cinfo, COL_INFO, "Management Error Message (%s)", val_to_str(ptp_v2_mm_managementId,
+ col_add_fstr(pinfo->cinfo, COL_INFO, "Management Error Message (%s)", val_to_str(ptp_v2_mm_managementId,
ptp2_managementErrorId_vals, "Unknown Error Id %u"));
break;
default:
col_set_str(pinfo->cinfo, COL_INFO, val_to_str(ptp_v2_messageid, ptp_v2_messageid_vals, "Unknown PTP Message (%u)"));
break;
- }
+ }
}
- else
+ else
{
col_set_str(pinfo->cinfo, COL_INFO, val_to_str(ptp_v2_messageid, ptp_v2_messageid_vals, "Unknown PTP Message (%u)"));
}
@@ -2258,7 +2258,7 @@ dissect_ptp_v2(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
hf_ptp_v2_transportspecific, tvb, PTP_V2_TRANSPORT_SPECIFIC_MESSAGE_ID_OFFSET, 1, FALSE);
ptp_transportspecific_tree = proto_item_add_subtree(transportspecific_ti, ett_ptp_v2_transportspecific);
-
+
if (ptpv2_oE == TRUE)
{
proto_tree_add_item(ptp_transportspecific_tree,
@@ -2290,44 +2290,44 @@ dissect_ptp_v2(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree_add_item(ptp_flags_tree,
hf_ptp_v2_flags_security, tvb, PTP_V2_FLAGS_OFFSET, 2, FALSE);
-
+
proto_tree_add_item(ptp_flags_tree,
hf_ptp_v2_flags_specific2, tvb, PTP_V2_FLAGS_OFFSET, 2, FALSE);
-
+
proto_tree_add_item(ptp_flags_tree,
hf_ptp_v2_flags_specific1, tvb, PTP_V2_FLAGS_OFFSET, 2, FALSE);
-
+
proto_tree_add_item(ptp_flags_tree,
- hf_ptp_v2_flags_unicast, tvb, PTP_V2_FLAGS_OFFSET, 2, FALSE);
-
+ hf_ptp_v2_flags_unicast, tvb, PTP_V2_FLAGS_OFFSET, 2, FALSE);
+
proto_tree_add_item(ptp_flags_tree,
- hf_ptp_v2_flags_twostep, tvb, PTP_V2_FLAGS_OFFSET, 2, FALSE);
-
+ hf_ptp_v2_flags_twostep, tvb, PTP_V2_FLAGS_OFFSET, 2, FALSE);
+
proto_tree_add_item(ptp_flags_tree,
hf_ptp_v2_flags_alternatemaster, tvb, PTP_V2_FLAGS_OFFSET, 2, FALSE);
proto_tree_add_item(ptp_flags_tree,
hf_ptp_v2_flags_frequencytraceable, tvb, PTP_V2_FLAGS_OFFSET, 2, FALSE);
-
+
proto_tree_add_item(ptp_flags_tree,
hf_ptp_v2_flags_timetraceable, tvb, PTP_V2_FLAGS_OFFSET, 2, FALSE);
proto_tree_add_item(ptp_flags_tree,
hf_ptp_v2_flags_ptptimescale, tvb, PTP_V2_FLAGS_OFFSET, 2, FALSE);
-
+
proto_tree_add_item(ptp_flags_tree,
hf_ptp_v2_flags_utcoffsetvalid, tvb, PTP_V2_FLAGS_OFFSET, 2, FALSE);
proto_tree_add_item(ptp_flags_tree,
- hf_ptp_v2_flags_li59, tvb, PTP_V2_FLAGS_OFFSET, 2, FALSE);
-
+ hf_ptp_v2_flags_li59, tvb, PTP_V2_FLAGS_OFFSET, 2, FALSE);
+
proto_tree_add_item(ptp_flags_tree,
- hf_ptp_v2_flags_li61, tvb, PTP_V2_FLAGS_OFFSET, 2, FALSE);
+ hf_ptp_v2_flags_li61, tvb, PTP_V2_FLAGS_OFFSET, 2, FALSE);
temp = PTP_V2_CORRECTIONNS_OFFSET;
-
- dissect_ptp_v2_timeInterval(tvb, &temp, ptp_tree, "correction", hf_ptp_v2_correction, hf_ptp_v2_correctionsubns);
-
+
+ dissect_ptp_v2_timeInterval(tvb, &temp, ptp_tree, "correction", hf_ptp_v2_correction, hf_ptp_v2_correctionsubns);
+
proto_tree_add_item(ptp_tree,
hf_ptp_v2_clockidentity, tvb, PTP_V2_CLOCKIDENTITY_OFFSET, 8, FALSE);
@@ -2348,16 +2348,16 @@ dissect_ptp_v2(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
timeStamp = tvb_get_ntohl(tvb, PTP_V2_AN_ORIGINTIMESTAMPSECONDS_OFFSET);
timeStamp = timeStamp << 16;
timeStamp = timeStamp | tvb_get_ntohs(tvb, PTP_V2_AN_ORIGINTIMESTAMPSECONDS_OFFSET+4);
-
+
proto_tree_add_text(ptp_tree, tvb, PTP_V2_AN_ORIGINTIMESTAMPSECONDS_OFFSET, 6,
"originTimestamp (seconds): %" G_GINT64_MODIFIER "u", timeStamp);
-
+
proto_tree_add_item(ptp_tree, hf_ptp_v2_an_origintimestamp_nanoseconds, tvb,
PTP_V2_AN_ORIGINTIMESTAMPNANOSECONDS_OFFSET, 4, FALSE);
-
+
proto_tree_add_item(ptp_tree, hf_ptp_v2_an_origincurrentutcoffset, tvb,
PTP_V2_AN_ORIGINCURRENTUTCOFFSET_OFFSET, 2, FALSE);
-
+
proto_tree_add_item(ptp_tree, hf_ptp_v2_an_priority1, tvb,
PTP_V2_AN_PRIORITY_1_OFFSET, 1, FALSE);
@@ -2375,56 +2375,56 @@ dissect_ptp_v2(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree_add_item(ptp_tree, hf_ptp_v2_an_grandmasterclockidentity, tvb,
PTP_V2_AN_GRANDMASTERCLOCKIDENTITY_OFFSET, 8, FALSE);
-
+
proto_tree_add_item(ptp_tree, hf_ptp_v2_an_localstepsremoved, tvb,
PTP_V2_AN_LOCALSTEPSREMOVED_OFFSET, 2, FALSE);
proto_tree_add_item(ptp_tree,
hf_ptp_v2_an_timesource, tvb, PTP_V2_AN_TIMESOURCE_OFFSET, 1, FALSE);
-
+
break;
}
-
+
case PTP_V2_SYNC_MESSAGE:
case PTP_V2_DELAY_REQ_MESSAGE:{
timeStamp = tvb_get_ntohl(tvb, PTP_V2_SDR_ORIGINTIMESTAMPSECONDS_OFFSET);
timeStamp = timeStamp << 16;
timeStamp = timeStamp | tvb_get_ntohs(tvb, PTP_V2_SDR_ORIGINTIMESTAMPSECONDS_OFFSET+4);
-
+
proto_tree_add_text(ptp_tree, tvb, PTP_V2_SDR_ORIGINTIMESTAMPSECONDS_OFFSET, 6,
"originTimestamp (seconds): %" G_GINT64_MODIFIER "u", timeStamp);
proto_tree_add_item(ptp_tree, hf_ptp_v2_sdr_origintimestamp_nanoseconds, tvb,
PTP_V2_SDR_ORIGINTIMESTAMPNANOSECONDS_OFFSET, 4, FALSE);
-
+
break;
}
-
+
case PTP_V2_FOLLOWUP_MESSAGE:{
timeStamp = tvb_get_ntohl(tvb, PTP_V2_FU_PRECISEORIGINTIMESTAMPSECONDS_OFFSET);
timeStamp = timeStamp << 16;
timeStamp = timeStamp | tvb_get_ntohs(tvb, PTP_V2_FU_PRECISEORIGINTIMESTAMPSECONDS_OFFSET+4);
-
+
proto_tree_add_text(ptp_tree, tvb, PTP_V2_FU_PRECISEORIGINTIMESTAMPSECONDS_OFFSET, 6,
"preciseOriginTimestamp (seconds): %" G_GINT64_MODIFIER "u", timeStamp);
proto_tree_add_item(ptp_tree, hf_ptp_v2_fu_preciseorigintimestamp_nanoseconds, tvb,
PTP_V2_FU_PRECISEORIGINTIMESTAMPNANOSECONDS_OFFSET, 4, FALSE);
-
+
break;
}
-
+
case PTP_V2_DELAY_RESP_MESSAGE:{
timeStamp = tvb_get_ntohl(tvb, PTP_V2_DR_RECEIVETIMESTAMPSECONDS_OFFSET);
timeStamp = timeStamp << 16;
timeStamp = timeStamp | tvb_get_ntohs(tvb, PTP_V2_DR_RECEIVETIMESTAMPSECONDS_OFFSET+4);
-
+
proto_tree_add_text(ptp_tree, tvb, PTP_V2_DR_RECEIVETIMESTAMPSECONDS_OFFSET, 6,
"receiveTimestamp (seconds): %" G_GINT64_MODIFIER "u", timeStamp);
proto_tree_add_item(ptp_tree, hf_ptp_v2_dr_receivetimestamp_nanoseconds, tvb,
PTP_V2_DR_RECEIVETIMESTAMPNANOSECONDS_OFFSET, 4, FALSE);
-
+
proto_tree_add_item(ptp_tree, hf_ptp_v2_dr_requestingportidentity, tvb,
PTP_V2_DR_REQUESTINGPORTIDENTITY_OFFSET, 8, FALSE);
@@ -2433,32 +2433,32 @@ dissect_ptp_v2(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
break;
}
-
+
case PTP_V2_PATH_DELAY_REQ_MESSAGE:{
timeStamp = tvb_get_ntohl(tvb, PTP_V2_PDRQ_ORIGINTIMESTAMPSECONDS_OFFSET);
timeStamp = timeStamp << 16;
timeStamp = timeStamp | tvb_get_ntohs(tvb, PTP_V2_PDRQ_ORIGINTIMESTAMPSECONDS_OFFSET+4);
-
+
proto_tree_add_text(ptp_tree, tvb, PTP_V2_PDRQ_ORIGINTIMESTAMPSECONDS_OFFSET, 6,
"originTimestamp (seconds): %" G_GINT64_MODIFIER "u", timeStamp);
proto_tree_add_item(ptp_tree, hf_ptp_v2_pdrq_origintimestamp_nanoseconds, tvb,
PTP_V2_PDRQ_ORIGINTIMESTAMPNANOSECONDS_OFFSET, 4, FALSE);
-
+
break;
}
-
+
case PTP_V2_PATH_DELAY_RESP_MESSAGE:{
timeStamp = tvb_get_ntohl(tvb, PTP_V2_PDRS_REQUESTRECEIPTTIMESTAMPSECONDS_OFFSET);
timeStamp = timeStamp << 16;
timeStamp = timeStamp | tvb_get_ntohs(tvb, PTP_V2_PDRS_REQUESTRECEIPTTIMESTAMPSECONDS_OFFSET+4);
-
+
proto_tree_add_text(ptp_tree, tvb, PTP_V2_PDRS_REQUESTRECEIPTTIMESTAMPSECONDS_OFFSET, 6,
"requestreceiptTimestamp (seconds): %" G_GINT64_MODIFIER "u", timeStamp);
proto_tree_add_item(ptp_tree, hf_ptp_v2_pdrs_requestreceipttimestamp_nanoseconds, tvb,
PTP_V2_PDRS_REQUESTRECEIPTTIMESTAMPNANOSECONDS_OFFSET, 4, FALSE);
-
+
proto_tree_add_item(ptp_tree, hf_ptp_v2_pdrs_requestingportidentity, tvb,
PTP_V2_PDRS_REQUESTINGPORTIDENTITY_OFFSET, 8, FALSE);
@@ -2467,18 +2467,18 @@ dissect_ptp_v2(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
break;
}
-
+
case PTP_V2_PATH_DELAY_FOLLOWUP_MESSAGE:{
timeStamp = tvb_get_ntohl(tvb, PTP_V2_PDFU_RESPONSEORIGINTIMESTAMPSECONDS_OFFSET);
timeStamp = timeStamp << 16;
timeStamp = timeStamp | tvb_get_ntohs(tvb, PTP_V2_PDFU_RESPONSEORIGINTIMESTAMPSECONDS_OFFSET+4);
-
+
proto_tree_add_text(ptp_tree, tvb, PTP_V2_PDFU_RESPONSEORIGINTIMESTAMPSECONDS_OFFSET, 6,
"responseOriginTimestamp (seconds): %" G_GINT64_MODIFIER "u", timeStamp);
proto_tree_add_item(ptp_tree, hf_ptp_v2_pdfu_responseorigintimestamp_nanoseconds, tvb,
PTP_V2_PDFU_RESPONSEORIGINTIMESTAMPNANOSECONDS_OFFSET, 4, FALSE);
-
+
proto_tree_add_item(ptp_tree, hf_ptp_v2_pdfu_requestingportidentity, tvb,
PTP_V2_PDFU_REQUESTINGPORTIDENTITY_OFFSET, 8, FALSE);
@@ -2486,28 +2486,28 @@ dissect_ptp_v2(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree_add_item(ptp_tree, hf_ptp_v2_pdfu_requestingsourceportid, tvb,
PTP_V2_PDFU_REQUESTINGSOURCEPORTID_OFFSET, 2, FALSE);
- break;
+ break;
}
-
+
case PTP_V2_SIGNALLING_MESSAGE:{
-
+
guint16 tlv_type, tlv_length;
-
+
proto_tree_add_item(ptp_tree, hf_ptp_v2_sig_targetportidentity, tvb,
PTP_V2_SIG_TARGETPORTIDENTITY_OFFSET, 8, FALSE);
proto_tree_add_item(ptp_tree, hf_ptp_v2_sig_targetportid, tvb,
PTP_V2_SIG_TARGETPORTID_OFFSET, 2, FALSE);
-
+
proto_tree_add_item(ptp_tree, hf_ptp_v2_mm_tlvType, tvb,
PTP_V2_SIG_TARGETPORTID_OFFSET+2, 2, FALSE);
-
+
proto_tree_add_item(ptp_tree, hf_ptp_v2_mm_lengthField, tvb,
PTP_V2_SIG_TARGETPORTID_OFFSET+4, 2, FALSE);
-
+
tlv_type = tvb_get_ntohs (tvb, PTP_V2_MM_TLV_TYPE_OFFSET);
tlv_length = tvb_get_ntohs (tvb, PTP_V2_MM_TLV_LENGTHFIELD_OFFSET);
-
+
if (tlv_length <= 2)
{
/* no data */
@@ -2517,7 +2517,7 @@ dissect_ptp_v2(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree_add_text(ptp_tree, tvb, PTP_V2_SIG_TARGETPORTID_OFFSET+6, tlv_length, "Data");
break;
}
-
+
case PTP_V2_MANAGEMENT_MESSAGE:
{
guint16 tlv_type, tlv_length;
@@ -2533,96 +2533,96 @@ dissect_ptp_v2(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree_add_item(ptp_tree, hf_ptp_v2_mm_boundaryhops, tvb,
PTP_V2_MM_BOUNDARYHOPS_OFFSET, 1, FALSE);
-
+
proto_tree_add_item(ptp_tree, hf_ptp_v2_mm_action, tvb,
PTP_V2_MM_ACTION_OFFSET, 1, FALSE);
-
+
/* management TLV */
proto_tree_add_item(ptp_tree, hf_ptp_v2_mm_tlvType, tvb,
PTP_V2_MM_TLV_TYPE_OFFSET, 2, FALSE);
-
+
proto_tree_add_item(ptp_tree, hf_ptp_v2_mm_lengthField, tvb,
PTP_V2_MM_TLV_LENGTHFIELD_OFFSET, 2, FALSE);
-
+
tlv_type = tvb_get_ntohs (tvb, PTP_V2_MM_TLV_TYPE_OFFSET);
tlv_length = tvb_get_ntohs (tvb, PTP_V2_MM_TLV_LENGTHFIELD_OFFSET);
-
+
/* For management there are PTP_V2_TLV_TYPE_MANAGEMENT and PTP_V2_TLV_TYPE_MANAGEMENT_ERROR_STATUS TLVs */
switch(tlv_type) {
case PTP_V2_TLV_TYPE_MANAGEMENT:
{
guint16 ptp_v2_managementId;
guint16 Offset = PTP_V2_MM_TLV_DATAFIELD_OFFSET;
-
+
proto_tree_add_item(ptp_tree, hf_ptp_v2_mm_managementId, tvb,
PTP_V2_MM_TLV_MANAGEMENTID_OFFSET, 2, FALSE);
-
+
ptp_v2_managementId = tvb_get_ntohs (tvb, PTP_V2_MM_TLV_MANAGEMENTID_OFFSET);
-
+
if (tlv_length <= 2)
{
/* no data */
break;
- }
-
+ }
+
managementData_ti = proto_tree_add_text(ptp_tree, tvb, Offset, tlv_length, "Data");
-
+
/* data field of the management message (subtree)*/
ptp_managementData_tree = proto_item_add_subtree(managementData_ti, ett_ptp_v2_managementData);
-
+
switch(ptp_v2_managementId) {
- case PTP_V2_MM_ID_NULL_MANAGEMENT:
+ case PTP_V2_MM_ID_NULL_MANAGEMENT:
{
/* no data in NULL management */
break;
}
- case PTP_V2_MM_ID_CLOCK_DESCRIPTION:
+ case PTP_V2_MM_ID_CLOCK_DESCRIPTION:
{
guint16 N = 0, S = 0;
clockType_ti = proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_clockType, tvb,
Offset, 2, FALSE);
-
+
ptp_clockType_tree = proto_item_add_subtree(clockType_ti, ett_ptp_v2_clockType);
/* ClockType Subtree */
proto_tree_add_item(ptp_clockType_tree, hf_ptp_v2_mm_clockType_ordinaryClock, tvb,
Offset, 2, FALSE);
-
+
proto_tree_add_item(ptp_clockType_tree, hf_ptp_v2_mm_clockType_boundaryClock, tvb,
Offset, 2, FALSE);
-
+
proto_tree_add_item(ptp_clockType_tree, hf_ptp_v2_mm_clockType_p2p_transparentClock, tvb,
Offset, 2, FALSE);
-
+
proto_tree_add_item(ptp_clockType_tree, hf_ptp_v2_mm_clockType_e2e_transparentClock, tvb,
Offset, 2, FALSE);
-
+
proto_tree_add_item(ptp_clockType_tree, hf_ptp_v2_mm_clockType_managementNode, tvb,
Offset, 2, FALSE);
-
+
proto_tree_add_item(ptp_clockType_tree, hf_ptp_v2_mm_clockType_reserved, tvb,
Offset, 2, FALSE);
Offset +=2;
-
- dissect_ptp_v2_text (tvb, &Offset, ptp_managementData_tree,
- hf_ptp_v2_mm_physicalLayerProtocol, hf_ptp_v2_mm_physicalLayerProtocol_length);
-
+
+ dissect_ptp_v2_text (tvb, &Offset, ptp_managementData_tree,
+ hf_ptp_v2_mm_physicalLayerProtocol, hf_ptp_v2_mm_physicalLayerProtocol_length);
+
proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_physicalAddressLength, tvb,
Offset, 2, FALSE);
-
+
S = tvb_get_ntohs (tvb, Offset);
- Offset +=2;
-
+ Offset +=2;
+
proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_physicalAddress, tvb,
Offset, S, FALSE);
Offset += S;
-
+
N = tvb_get_ntohs (tvb, Offset+2);
-
+
protocolAddress_ti = proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_protocolAddress, tvb,
- Offset+4, N, FALSE);
-
+ Offset+4, N, FALSE);
+
ptp_protocolAddress_tree = proto_item_add_subtree(protocolAddress_ti, ett_ptp_v2_protocolAddress);
- /* physicalLayerProtocol subtree */
+ /* physicalLayerProtocol subtree */
proto_tree_add_item(ptp_protocolAddress_tree, hf_ptp_v2_mm_protocolAddress_networkProtocol, tvb,
Offset, 2, FALSE);
@@ -2633,95 +2633,95 @@ dissect_ptp_v2(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
Offset+4, N, FALSE);
N = N + 4;
Offset += N;
-
+
proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_manufacturerIdentity, tvb,
Offset, 3, FALSE);
-
+
Offset += 3;
proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_reserved, tvb,
Offset, 1, FALSE);
Offset += 1;
- dissect_ptp_v2_text (tvb, &Offset, ptp_managementData_tree,
- hf_ptp_v2_mm_productDescription, hf_ptp_v2_mm_productDescription_length);
- dissect_ptp_v2_text (tvb, &Offset, ptp_managementData_tree,
+ dissect_ptp_v2_text (tvb, &Offset, ptp_managementData_tree,
+ hf_ptp_v2_mm_productDescription, hf_ptp_v2_mm_productDescription_length);
+ dissect_ptp_v2_text (tvb, &Offset, ptp_managementData_tree,
hf_ptp_v2_mm_revisionData, hf_ptp_v2_mm_revisionData_length);
- dissect_ptp_v2_text (tvb, &Offset, ptp_managementData_tree,
- hf_ptp_v2_mm_userDescription, hf_ptp_v2_mm_userDescription_length);
-
+ dissect_ptp_v2_text (tvb, &Offset, ptp_managementData_tree,
+ hf_ptp_v2_mm_userDescription, hf_ptp_v2_mm_userDescription_length);
+
proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_profileIdentity, tvb,
Offset, 6, FALSE);
Offset += 6;
/* Wenn Offset nicht gerade folgt noch ein pad Bit */
if ( (Offset - PTP_V2_MM_TLV_DATAFIELD_OFFSET) % 2 )
- {
+ {
proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_pad, tvb,
Offset, 1, FALSE);
}
break;
}
- case PTP_V2_MM_ID_USER_DESCRIPTION:
+ case PTP_V2_MM_ID_USER_DESCRIPTION:
{
-
- dissect_ptp_v2_text (tvb, &Offset, ptp_managementData_tree,
+
+ dissect_ptp_v2_text (tvb, &Offset, ptp_managementData_tree,
hf_ptp_v2_mm_userDescription, hf_ptp_v2_mm_userDescription_length);
/* Wenn Offset nicht gerade folgt noch ein pad Bit */
if ( (Offset - PTP_V2_MM_TLV_DATAFIELD_OFFSET) % 2 )
- {
+ {
proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_pad, tvb,
Offset, 1, FALSE);
- }
+ }
break;
}
- case PTP_V2_MM_ID_SAVE_IN_NON_VOLATILE_STORAGE:
+ case PTP_V2_MM_ID_SAVE_IN_NON_VOLATILE_STORAGE:
{
/* no data */
break;
}
- case PTP_V2_MM_ID_RESET_NON_VOLATILE_STORAGE:
+ case PTP_V2_MM_ID_RESET_NON_VOLATILE_STORAGE:
{
/* no data */
break;
}
- case PTP_V2_MM_ID_INITIALIZE:
+ case PTP_V2_MM_ID_INITIALIZE:
{
proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_initializationKey, tvb,
Offset, 2, FALSE);
break;
}
- case PTP_V2_MM_ID_FAULT_LOG:
+ case PTP_V2_MM_ID_FAULT_LOG:
{
guint16 i, num = 0;
- proto_item *ptpError_ti;
+ proto_item *ptpError_ti;
proto_tree *ptpError_subtree;
-
+
num = tvb_get_ntohs (tvb, Offset);
-
+
proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_numberOfFaultRecords, tvb,
Offset, 2, FALSE);
Offset +=2;
-
+
for (i = 1; i <= num; i++)
- {
+ {
ptpError_ti = proto_tree_add_text(ptp_managementData_tree, tvb, Offset, tvb_get_ntohs (tvb, Offset), "Fault record");
-
+
/* (subtree)*/
ptpError_subtree = proto_item_add_subtree(ptpError_ti, ett_ptp_v2_faultRecord);
-
+
proto_tree_add_item(ptpError_subtree, hf_ptp_v2_mm_faultRecordLength, tvb,
Offset, 2, FALSE);
Offset +=2;
-
+
timeStamp = tvb_get_ntohl(tvb, Offset);
timeStamp = timeStamp << 16;
timeStamp = timeStamp | tvb_get_ntohs(tvb, Offset+4);
-
+
proto_tree_add_text(ptpError_subtree, tvb, Offset, 6,
"Fault time (seconds): %" G_GINT64_MODIFIER "u", timeStamp);
-
+
Offset +=6;
proto_tree_add_item(ptpError_subtree, hf_ptp_v2_mm_faultTime_ns, tvb,
Offset, 4, FALSE);
@@ -2729,47 +2729,47 @@ dissect_ptp_v2(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree_add_item(ptpError_subtree, hf_ptp_v2_mm_severityCode, tvb,
Offset, 1, FALSE);
Offset +=1;
-
- dissect_ptp_v2_text (tvb, &Offset, ptpError_subtree,
+
+ dissect_ptp_v2_text (tvb, &Offset, ptpError_subtree,
hf_ptp_v2_mm_faultName, hf_ptp_v2_mm_faultName_length);
-
- dissect_ptp_v2_text (tvb, &Offset, ptpError_subtree,
+
+ dissect_ptp_v2_text (tvb, &Offset, ptpError_subtree,
hf_ptp_v2_mm_faultValue, hf_ptp_v2_mm_faultValue_length);
-
- dissect_ptp_v2_text (tvb, &Offset, ptpError_subtree,
- hf_ptp_v2_mm_faultDescription, hf_ptp_v2_mm_faultDescription_length);
+
+ dissect_ptp_v2_text (tvb, &Offset, ptpError_subtree,
+ hf_ptp_v2_mm_faultDescription, hf_ptp_v2_mm_faultDescription_length);
}
-
+
/* Wenn Offset nicht gerade folgt noch ein pad Bit */
if ( (Offset - PTP_V2_MM_TLV_DATAFIELD_OFFSET) % 2 )
- {
+ {
proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_pad, tvb,
Offset, 1, FALSE);
- }
+ }
break;
}
- case PTP_V2_MM_ID_FAULT_LOG_RESET:
+ case PTP_V2_MM_ID_FAULT_LOG_RESET:
{
/* no data */
break;
}
- case PTP_V2_MM_ID_DEFAULT_DATA_SET:
+ case PTP_V2_MM_ID_DEFAULT_DATA_SET:
{
proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_TSC, tvb,
PTP_V2_MM_TLV_DATAFIELD_OFFSET, 1, FALSE);
-
+
proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_dds_SO, tvb,
PTP_V2_MM_TLV_DATAFIELD_OFFSET, 1, FALSE);
-
+
proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_reserved, tvb,
PTP_V2_MM_RESERVED1, 1, FALSE);
-
+
proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_numberPorts, tvb,
PTP_V2_MM_NUMBERPORTS, 2, FALSE);
-
+
proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_priority1, tvb,
PTP_V2_MM_PRIORITY1, 1, FALSE);
-
+
proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_clockclass, tvb,
PTP_V2_MM_CLOCKQUALITY, 1, FALSE);
@@ -2778,61 +2778,61 @@ dissect_ptp_v2(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_clockvariance, tvb,
PTP_V2_MM_CLOCKQUALITY+2, 2, FALSE);
-
+
proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_priority2, tvb,
PTP_V2_MM_PRIORITY2, 1, FALSE);
-
+
proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_clockidentity, tvb,
PTP_V2_MM_CLOCKIDENTITY, 8, FALSE);
-
- proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_domainNumber, tvb,
+
+ proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_domainNumber, tvb,
PTP_V2_MM_DOMAINNUMBER, 1, FALSE);
-
+
proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_reserved, tvb,
PTP_V2_MM_RESERVED2, 1, FALSE);
break;
}
- case PTP_V2_MM_ID_CURRENT_DATA_SET:
+ case PTP_V2_MM_ID_CURRENT_DATA_SET:
{
proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_stepsRemoved, tvb,
Offset, 2, FALSE);
Offset +=2;
-
- dissect_ptp_v2_timeInterval(tvb, &Offset, ptp_managementData_tree,
+
+ dissect_ptp_v2_timeInterval(tvb, &Offset, ptp_managementData_tree,
"Offset from Master", hf_ptp_v2_mm_offset_ns, hf_ptp_v2_mm_offset_subns);
- dissect_ptp_v2_timeInterval(tvb, &Offset, ptp_managementData_tree,
- "Mean path delay", hf_ptp_v2_mm_pathDelay_ns, hf_ptp_v2_mm_pathDelay_subns);
+ dissect_ptp_v2_timeInterval(tvb, &Offset, ptp_managementData_tree,
+ "Mean path delay", hf_ptp_v2_mm_pathDelay_ns, hf_ptp_v2_mm_pathDelay_subns);
break;
}
- case PTP_V2_MM_ID_PARENT_DATA_SET:
+ case PTP_V2_MM_ID_PARENT_DATA_SET:
{
- proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_parentIdentity, tvb,
+ proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_parentIdentity, tvb,
Offset, 8, FALSE);
- proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_parentPort, tvb,
+ proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_parentPort, tvb,
Offset+8, 2, FALSE);
Offset +=10;
-
- proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_parentStats, tvb,
+
+ proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_parentStats, tvb,
Offset, 1, FALSE);
Offset +=1;
-
+
proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_reserved, tvb,
Offset, 1, FALSE);
Offset +=1;
-
+
proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_observedParentOffsetScaledLogVariance, tvb,
Offset, 2, FALSE);
- Offset +=2;
-
+ Offset +=2;
+
proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_observedParentClockPhaseChangeRate, tvb,
Offset, 4, FALSE);
Offset +=4;
-
+
proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_grandmasterPriority1, tvb,
Offset, 1, FALSE);
Offset +=1;
-
+
proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_grandmasterclockclass, tvb,
Offset, 1, FALSE);
@@ -2842,22 +2842,22 @@ dissect_ptp_v2(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_grandmasterclockvariance, tvb,
Offset+2, 2, FALSE);
Offset += 4;
-
+
proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_grandmasterPriority2, tvb,
Offset, 1, FALSE);
Offset +=1;
-
+
proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_grandmasterIdentity, tvb,
PTP_V2_MM_CLOCKIDENTITY, 8, FALSE);
-
+
break;
}
- case PTP_V2_MM_ID_TIME_PROPERTIES_DATA_SET:
+ case PTP_V2_MM_ID_TIME_PROPERTIES_DATA_SET:
{
proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_currentUtcOffset, tvb,
Offset, 2, FALSE);
Offset +=2;
-
+
proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_LI_61, tvb,
Offset, 1, FALSE);
proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_LI_59, tvb,
@@ -2871,60 +2871,60 @@ dissect_ptp_v2(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_FTRA, tvb,
Offset, 1, FALSE);
Offset +=1;
-
- proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_timesource, tvb,
+
+ proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_timesource, tvb,
Offset, 1, FALSE);
-
+
break;
}
- case PTP_V2_MM_ID_PORT_DATA_SET:
+ case PTP_V2_MM_ID_PORT_DATA_SET:
{
- proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_clockidentity, tvb,
+ proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_clockidentity, tvb,
Offset, 8, FALSE);
Offset +=8;
-
- proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_PortNumber, tvb,
+
+ proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_PortNumber, tvb,
Offset, 2, FALSE);
Offset +=2;
-
- proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_portState, tvb,
+
+ proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_portState, tvb,
Offset, 1, FALSE);
Offset +=1;
-
- proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_logMinDelayReqInterval, tvb,
+
+ proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_logMinDelayReqInterval, tvb,
Offset, 1, FALSE);
Offset +=1;
-
- dissect_ptp_v2_timeInterval(tvb, &Offset, ptp_managementData_tree,
+
+ dissect_ptp_v2_timeInterval(tvb, &Offset, ptp_managementData_tree,
"Peer mean path delay", hf_ptp_v2_mm_peerMeanPathDelay_ns, hf_ptp_v2_mm_peerMeanPathDelay_subns);
-
- proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_logAnnounceInterval, tvb,
+
+ proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_logAnnounceInterval, tvb,
Offset, 1, FALSE);
Offset +=1;
-
- proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_announceReceiptTimeout, tvb,
+
+ proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_announceReceiptTimeout, tvb,
Offset, 1, FALSE);
Offset +=1;
-
- proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_logSyncInterval, tvb,
+
+ proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_logSyncInterval, tvb,
Offset, 1, FALSE);
Offset +=1;
-
- proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_delayMechanism, tvb,
+
+ proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_delayMechanism, tvb,
Offset, 1, FALSE);
Offset +=1;
-
- proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_logMinPdelayReqInterval, tvb,
+
+ proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_logMinPdelayReqInterval, tvb,
Offset, 1, FALSE);
Offset +=1;
-
- proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_versionNumber, tvb,
+
+ proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_versionNumber, tvb,
Offset, 1, FALSE);
Offset +=1;
-
+
break;
}
- case PTP_V2_MM_ID_PRIORITY1:
+ case PTP_V2_MM_ID_PRIORITY1:
{
proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_priority1, tvb,
Offset, 1, FALSE);
@@ -2932,7 +2932,7 @@ dissect_ptp_v2(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
Offset+1, 1, FALSE);
break;
}
- case PTP_V2_MM_ID_PRIORITY2:
+ case PTP_V2_MM_ID_PRIORITY2:
{
proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_priority2, tvb,
Offset, 1, FALSE);
@@ -2940,15 +2940,15 @@ dissect_ptp_v2(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
Offset+1, 1, FALSE);
break;
}
- case PTP_V2_MM_ID_DOMAIN:
+ case PTP_V2_MM_ID_DOMAIN:
{
- proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_domainNumber, tvb,
+ proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_domainNumber, tvb,
Offset, 1, FALSE);
proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_reserved, tvb,
Offset+1, 1, FALSE);
break;
}
- case PTP_V2_MM_ID_SLAVE_ONLY:
+ case PTP_V2_MM_ID_SLAVE_ONLY:
{
proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_SO, tvb,
Offset, 1, FALSE);
@@ -2956,67 +2956,67 @@ dissect_ptp_v2(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
Offset+1, 1, FALSE);
break;
}
- case PTP_V2_MM_ID_LOG_ANNOUNCE_INTERVAL:
+ case PTP_V2_MM_ID_LOG_ANNOUNCE_INTERVAL:
{
proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_logAnnounceInterval, tvb,
Offset, 1, FALSE);
-
+
proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_reserved, tvb,
Offset+1, 1, FALSE);
break;
}
- case PTP_V2_MM_ID_ANNOUNCE_RECEIPT_TIMEOUT:
+ case PTP_V2_MM_ID_ANNOUNCE_RECEIPT_TIMEOUT:
{
proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_announceReceiptTimeout, tvb,
Offset, 1, FALSE);
-
+
proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_reserved, tvb,
Offset+1, 1, FALSE);
break;
}
- case PTP_V2_MM_ID_LOG_SYNC_INTERVAL:
+ case PTP_V2_MM_ID_LOG_SYNC_INTERVAL:
{
proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_logSyncInterval, tvb,
Offset, 1, FALSE);
-
+
proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_reserved, tvb,
Offset+1, 1, FALSE);
break;
}
- case PTP_V2_MM_ID_VERSION_NUMBER:
+ case PTP_V2_MM_ID_VERSION_NUMBER:
{
- proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_versionNumber, tvb,
+ proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_versionNumber, tvb,
Offset, 1, FALSE);
-
+
proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_reserved, tvb,
Offset+1, 1, FALSE);
break;
}
- case PTP_V2_MM_ID_ENABLE_PORT:
+ case PTP_V2_MM_ID_ENABLE_PORT:
{
/* no data */
break;
}
- case PTP_V2_MM_ID_DISABLE_PORT:
+ case PTP_V2_MM_ID_DISABLE_PORT:
{
/* no data */
break;
}
- case PTP_V2_MM_ID_TIME:
+ case PTP_V2_MM_ID_TIME:
{
timeStamp = tvb_get_ntohl(tvb, Offset);
timeStamp = timeStamp << 16;
timeStamp = timeStamp | tvb_get_ntohs(tvb, Offset+4);
-
+
proto_tree_add_text(ptp_managementData_tree, tvb, Offset, 6,
"current time (seconds): %" G_GINT64_MODIFIER "u", timeStamp);
-
+
Offset +=6;
proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_currentTime_ns, tvb,
Offset, 4, FALSE);
break;
}
- case PTP_V2_MM_ID_CLOCK_ACCURACY:
+ case PTP_V2_MM_ID_CLOCK_ACCURACY:
{
proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_clockAccuracy, tvb,
Offset, 1, FALSE);
@@ -3024,148 +3024,148 @@ dissect_ptp_v2(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
Offset+1, 1, FALSE);
break;
}
- case PTP_V2_MM_ID_UTC_PROPERTIES:
+ case PTP_V2_MM_ID_UTC_PROPERTIES:
{
proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_currentUtcOffset, tvb,
Offset, 2, FALSE);
Offset +=2;
-
+
proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_LI_61, tvb,
Offset, 1, FALSE);
proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_LI_59, tvb,
Offset, 1, FALSE);
proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_UTCV, tvb,
Offset, 1, FALSE);
- Offset +=1;
-
+ Offset +=1;
+
proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_reserved, tvb,
Offset, 1, FALSE);
break;
}
- case PTP_V2_MM_ID_TRACEABILITY_PROPERTIES:
+ case PTP_V2_MM_ID_TRACEABILITY_PROPERTIES:
{
proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_TTRA, tvb,
Offset, 1, FALSE);
proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_FTRA, tvb,
Offset, 1, FALSE);
Offset +=1;
-
+
proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_reserved, tvb,
Offset, 1, FALSE);
break;
}
- case PTP_V2_MM_ID_TIMESCALE_PROPERTIES:
+ case PTP_V2_MM_ID_TIMESCALE_PROPERTIES:
{
proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_TTRA, tvb,
Offset, 1, FALSE);
proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_FTRA, tvb,
Offset, 1, FALSE);
Offset +=1;
-
- proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_timesource, tvb,
+
+ proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_timesource, tvb,
Offset, 1, FALSE);
break;
}
- case PTP_V2_MM_ID_UNICAST_NEGOTIATION_ENABLE:
+ case PTP_V2_MM_ID_UNICAST_NEGOTIATION_ENABLE:
{
proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_ucEN, tvb,
Offset, 1, FALSE);
Offset +=1;
-
+
proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_reserved, tvb,
Offset, 1, FALSE);
break;
}
- case PTP_V2_MM_ID_PATH_TRACE_LIST:
+ case PTP_V2_MM_ID_PATH_TRACE_LIST:
{
guint16 i = 0;
/* one or more ClockIdentity */
for (i = 1; i <= (tlv_length / 8); i++)
{
- proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_clockidentity, tvb,
+ proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_clockidentity, tvb,
Offset, 8, FALSE);
- }
-
+ }
+
break;
}
- case PTP_V2_MM_ID_PATH_TRACE_ENABLE:
+ case PTP_V2_MM_ID_PATH_TRACE_ENABLE:
{
proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_ptEN, tvb,
Offset, 1, FALSE);
Offset +=1;
-
+
proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_reserved, tvb,
Offset, 1, FALSE);
-
+
break;
}
- case PTP_V2_MM_ID_GRANDMASTER_CLUSTER_TABLE:
+ case PTP_V2_MM_ID_GRANDMASTER_CLUSTER_TABLE:
{
/* ToDo */
break;
}
- case PTP_V2_MM_ID_UNICAST_MASTER_TABLE:
+ case PTP_V2_MM_ID_UNICAST_MASTER_TABLE:
{
/* ToDo */
break;
}
- case PTP_V2_MM_ID_UNICAST_MASTER_MAX_TABLE_SIZE:
+ case PTP_V2_MM_ID_UNICAST_MASTER_MAX_TABLE_SIZE:
{
/* ToDo */
break;
}
- case PTP_V2_MM_ID_ACCEPTABLE_MASTER_TABLE:
+ case PTP_V2_MM_ID_ACCEPTABLE_MASTER_TABLE:
{
/* ToDo */
break;
}
- case PTP_V2_MM_ID_ACCEPTABLE_MASTER_TABLE_ENABLED:
+ case PTP_V2_MM_ID_ACCEPTABLE_MASTER_TABLE_ENABLED:
{
/* ToDo */
break;
}
- case PTP_V2_MM_ID_ACCEPTABLE_MASTER_MAX_TABLE_SIZE:
+ case PTP_V2_MM_ID_ACCEPTABLE_MASTER_MAX_TABLE_SIZE:
{
/* ToDo */
break;
}
- case PTP_V2_MM_ID_ALTERNATE_TIME_OFFSET_ENABLE:
+ case PTP_V2_MM_ID_ALTERNATE_TIME_OFFSET_ENABLE:
{
proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_keyField, tvb,
Offset, 1, FALSE);
Offset +=1;
-
+
proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_atEN, tvb,
Offset, 1, FALSE);
Offset +=1;
break;
}
- case PTP_V2_MM_ID_ALTERNATE_TIME_OFFSET_NAME:
+ case PTP_V2_MM_ID_ALTERNATE_TIME_OFFSET_NAME:
{
proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_keyField, tvb,
Offset, 1, FALSE);
Offset +=1;
-
- dissect_ptp_v2_text (tvb, &Offset, ptp_managementData_tree,
+
+ dissect_ptp_v2_text (tvb, &Offset, ptp_managementData_tree,
hf_ptp_v2_mm_displayName, hf_ptp_v2_mm_displayName_length);
-
+
/* Wenn Offset nicht gerade folgt noch ein pad Bit */
if ( (Offset - PTP_V2_MM_TLV_DATAFIELD_OFFSET) % 2 )
- {
+ {
proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_pad, tvb,
Offset, 1, FALSE);
}
break;
}
- case PTP_V2_MM_ID_ALTERNATE_TIME_OFFSET_MAX_KEY:
+ case PTP_V2_MM_ID_ALTERNATE_TIME_OFFSET_MAX_KEY:
{
proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_maxKey, tvb,
Offset, 1, FALSE);
Offset +=1;
-
+
proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_reserved, tvb,
Offset, 1, FALSE);
@@ -3176,107 +3176,107 @@ dissect_ptp_v2(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_transmitAlternateMulticastSync, tvb,
Offset, 1, FALSE);
Offset +=1;
-
+
proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_numberOfAlternateMasters, tvb,
Offset, 1, FALSE);
Offset +=1;
-
+
proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_logAlternateMulticastSyncInterval, tvb,
Offset, 1, FALSE);
Offset +=1;
-
+
proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_reserved, tvb,
Offset, 1, FALSE);
break;
}
- case PTP_V2_MM_ID_ALTERNATE_TIME_OFFSET_PROPERTIES:
+ case PTP_V2_MM_ID_ALTERNATE_TIME_OFFSET_PROPERTIES:
{
proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_keyField, tvb,
Offset, 1, FALSE);
Offset +=1;
-
+
proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_currentOffset, tvb,
Offset, 4, FALSE);
Offset +=4;
-
+
proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_jumpSeconds, tvb,
Offset, 4, FALSE);
Offset +=4;
-
+
timeStamp = tvb_get_ntohl(tvb, Offset);
timeStamp = timeStamp << 16;
timeStamp = timeStamp | tvb_get_ntohs(tvb, Offset+4);
-
+
proto_tree_add_text(ptp_managementData_tree, tvb, Offset, 6,
"Time of next jump (seconds): %" G_GINT64_MODIFIER "u", timeStamp);
Offset +=6;
-
+
proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_reserved, tvb,
Offset, 1, FALSE);
break;
}
- case PTP_V2_MM_ID_TC_DEFAULT_DATA_SET:
+ case PTP_V2_MM_ID_TC_DEFAULT_DATA_SET:
{
proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_clockidentity, tvb,
Offset, 8, FALSE);
- Offset +=8;
-
+ Offset +=8;
+
proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_numberPorts, tvb,
Offset, 2, FALSE);
- Offset +=2;
-
- proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_delayMechanism, tvb,
+ Offset +=2;
+
+ proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_delayMechanism, tvb,
Offset, 1, FALSE);
Offset +=1;
-
- proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_primaryDomain, tvb,
- Offset, 1, FALSE);
-
+
+ proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_primaryDomain, tvb,
+ Offset, 1, FALSE);
+
break;
}
- case PTP_V2_MM_ID_TC_PORT_DATA_SET:
+ case PTP_V2_MM_ID_TC_PORT_DATA_SET:
{
- proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_clockidentity, tvb,
+ proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_clockidentity, tvb,
Offset, 8, FALSE);
Offset +=8;
-
- proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_PortNumber, tvb,
+
+ proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_PortNumber, tvb,
Offset, 2, FALSE);
Offset +=2;
-
- proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_faultyFlag, tvb,
+
+ proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_faultyFlag, tvb,
Offset, 1, FALSE);
Offset +=1;
-
- proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_logMinPdelayReqInterval, tvb,
+
+ proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_logMinPdelayReqInterval, tvb,
Offset, 1, FALSE);
Offset +=1;
-
- dissect_ptp_v2_timeInterval(tvb, &Offset, ptp_managementData_tree,
+
+ dissect_ptp_v2_timeInterval(tvb, &Offset, ptp_managementData_tree,
"Peer mean path delay", hf_ptp_v2_mm_peerMeanPathDelay_ns, hf_ptp_v2_mm_peerMeanPathDelay_subns);
break;
}
- case PTP_V2_MM_ID_PRIMARY_DOMAIN:
+ case PTP_V2_MM_ID_PRIMARY_DOMAIN:
{
- proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_primaryDomain, tvb,
+ proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_primaryDomain, tvb,
Offset, 1, FALSE);
proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_reserved, tvb,
Offset+1, 1, FALSE);
break;
}
- case PTP_V2_MM_ID_DELAY_MECHANISM:
- {
- proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_delayMechanism, tvb,
+ case PTP_V2_MM_ID_DELAY_MECHANISM:
+ {
+ proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_delayMechanism, tvb,
Offset, 1, FALSE);
proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_reserved, tvb,
Offset+1, 1, FALSE);
break;
}
- case PTP_V2_MM_ID_LOG_MIN_PDELAY_REQ_INTERVAL:
+ case PTP_V2_MM_ID_LOG_MIN_PDELAY_REQ_INTERVAL:
{
- proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_logMinPdelayReqInterval, tvb,
+ proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_logMinPdelayReqInterval, tvb,
Offset, 1, FALSE);
proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_reserved, tvb,
@@ -3295,39 +3295,39 @@ dissect_ptp_v2(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
/* there is only one error TLV */
guint16 Offset = PTP_V2_MM_TLV_MANAGEMENTERRORID_OFFSET;
-
+
proto_tree_add_item(ptp_tree, hf_ptp_v2_mm_managementErrorId, tvb,
Offset, 2, FALSE);
Offset +=2;
-
+
proto_tree_add_item(ptp_tree, hf_ptp_v2_mm_managementId, tvb,
Offset, 2, FALSE);
- Offset +=2;
-
+ Offset +=2;
+
proto_tree_add_item(ptp_tree, hf_ptp_v2_mm_reserved, tvb,
Offset, 4, FALSE);
- Offset +=4;
-
+ Offset +=4;
+
/* optional Field! */
if (Offset - PTP_V2_MM_TLV_MANAGEMENTERRORID_OFFSET + 2 < tlv_length)
{
- dissect_ptp_v2_text (tvb, &Offset, ptp_tree,
+ dissect_ptp_v2_text (tvb, &Offset, ptp_tree,
hf_ptp_v2_mm_displayData, hf_ptp_v2_mm_displayData_length);
}
-
+
/* Wenn Offset nicht gerade folgt noch ein pad Bit */
if ( (Offset - PTP_V2_MM_TLV_MANAGEMENTERRORID_OFFSET) % 2 )
- {
+ {
proto_tree_add_item(ptp_tree, hf_ptp_v2_mm_pad, tvb,
Offset, 1, FALSE);
- }
+ }
break;
}
default:
{
break;
}
- } /* switch TLV Type */
+ } /* switch TLV Type */
} /* case Management Message */
} /* switch message ID*/
} /* tree */
@@ -4121,10 +4121,10 @@ proto_register_ptp(void)
FT_INT32, BASE_DEC, NULL, 0x0,
"", HFILL }
},
-
-
-
-
+
+
+
+
/* PTPv2 fields **********************************************************/
/*Common fields for all frames*/
{ &hf_ptp_v2_transportspecific,
@@ -4206,7 +4206,7 @@ proto_register_ptp(void)
{ "PTP_LI_59", "ptp.v2.flags.li59",
FT_BOOLEAN, 16, NULL, PTP_V2_FLAGS_LI59_BITMASK,
"", HFILL }
- },
+ },
{ &hf_ptp_v2_flags_utcoffsetvalid,
{ "PTP_UTC_REASONABLE", "ptp.v2.flags.utcreasonable",
FT_BOOLEAN, 16, NULL, PTP_V2_FLAGS_UTC_OFFSET_VALID_BITMASK,
@@ -4216,17 +4216,17 @@ proto_register_ptp(void)
{ "PTP_TIMESCALE", "ptp.v2.flags.timescale",
FT_BOOLEAN, 16, NULL, PTP_V2_FLAGS_PTP_TIMESCALE_BITMASK,
"", HFILL }
- },
+ },
{ &hf_ptp_v2_flags_timetraceable,
{ "TIME_TRACEABLE", "ptp.v2.flags.timetraceable",
FT_BOOLEAN, 16, NULL, PTP_V2_FLAGS_TIME_TRACEABLE_BITMASK,
"", HFILL }
- },
+ },
{ &hf_ptp_v2_flags_frequencytraceable,
{ "FREQUENCY_TRACEABLE", "ptp.v2.flags.frequencytraceable",
FT_BOOLEAN, 16, NULL, PTP_V2_FLAGS_FREQUENCY_TRACEABLE_BITMASK,
"", HFILL }
- },
+ },
{ &hf_ptp_v2_correction,
{ "correction", "ptp.v2.correction.ns",
FT_UINT64, BASE_DEC, NULL, 0x00,
@@ -4239,7 +4239,7 @@ proto_register_ptp(void)
},
{ &hf_ptp_v2_clockidentity,
{ "ClockIdentity", "ptp.v2.clockidentity",
- FT_INT64, BASE_HEX, NULL, 0x00,
+ FT_UINT64, BASE_HEX, NULL, 0x00,
"", HFILL }
},
{ &hf_ptp_v2_sourceportid,
@@ -4286,7 +4286,7 @@ proto_register_ptp(void)
},
{ &hf_ptp_v2_an_timesource,
{ "TimeSource", "ptp.v2.timesource",
- FT_UINT8, BASE_HEX, VALS(ptp_v2_timesource_vals), 0x00,
+ FT_UINT8, BASE_HEX, VALS(ptp_v2_timesource_vals), 0x00,
"", HFILL }
},
{ &hf_ptp_v2_an_localstepsremoved,
@@ -4296,7 +4296,7 @@ proto_register_ptp(void)
},
{ &hf_ptp_v2_an_grandmasterclockidentity,
{ "grandmasterClockIdentity", "ptp.v2.an.grandmasterclockidentity",
- FT_INT64, BASE_HEX, NULL, 0x00,
+ FT_UINT64, BASE_HEX, NULL, 0x00,
"", HFILL }
},
{ &hf_ptp_v2_an_grandmasterclockclass,
@@ -4377,7 +4377,7 @@ proto_register_ptp(void)
},
{ &hf_ptp_v2_dr_requestingportidentity,
{ "requestingSourcePortIdentity", "ptp.v2.dr.requestingsourceportidentity",
- FT_INT64, BASE_HEX, NULL, 0x00,
+ FT_UINT64, BASE_HEX, NULL, 0x00,
"", HFILL }
},
{ &hf_ptp_v2_dr_requestingsourceportid,
@@ -4421,7 +4421,7 @@ proto_register_ptp(void)
},
{ &hf_ptp_v2_pdrs_requestingportidentity,
{ "requestingSourcePortIdentity", "ptp.v2.pdrs.requestingportidentity",
- FT_INT64, BASE_HEX, NULL, 0x00,
+ FT_UINT64, BASE_HEX, NULL, 0x00,
"", HFILL }
},
{ &hf_ptp_v2_pdrs_requestingsourceportid,
@@ -4448,7 +4448,7 @@ proto_register_ptp(void)
},
{ &hf_ptp_v2_pdfu_requestingportidentity,
{ "requestingSourcePortIdentity", "ptp.v2.pdfu.requestingportidentity",
- FT_INT64, BASE_HEX, NULL, 0x00,
+ FT_UINT64, BASE_HEX, NULL, 0x00,
"", HFILL }
},
{ &hf_ptp_v2_pdfu_requestingsourceportid,
@@ -4460,7 +4460,7 @@ proto_register_ptp(void)
/*Fields for PTP_Signalling (=sig) messages*/
{ &hf_ptp_v2_sig_targetportidentity,
{ "targetPortIdentity", "ptp.v2.sig.targetportidentity",
- FT_INT64, BASE_HEX, NULL, 0x00,
+ FT_UINT64, BASE_HEX, NULL, 0x00,
"", HFILL }
},
{ &hf_ptp_v2_sig_targetportid,
@@ -4472,7 +4472,7 @@ proto_register_ptp(void)
/*Fields for PTP_Management (=mm) messages*/
{ &hf_ptp_v2_mm_targetportidentity,
{ "targetPortIdentity", "ptp.v2.mm.targetportidentity",
- FT_INT64, BASE_HEX, NULL, 0x00,
+ FT_UINT64, BASE_HEX, NULL, 0x00,
"", HFILL }
},
{ &hf_ptp_v2_mm_targetportid,
@@ -4642,7 +4642,7 @@ proto_register_ptp(void)
{ "initialization key", "ptp.v2.mm.initializationKey",
FT_UINT16, BASE_DEC, NULL, 0x00,
"", HFILL }
- },
+ },
{ &hf_ptp_v2_mm_numberOfFaultRecords,
{ "number of fault records", "ptp.v2.mm.ptp.v2.mm.numberOfFaultRecords",
FT_UINT16, BASE_DEC, NULL, 0x00,
@@ -4766,7 +4766,7 @@ proto_register_ptp(void)
},
{ &hf_ptp_v2_mm_clockidentity,
{ "Clock identity", "ptp.v2.mm.clockidentity",
- FT_INT64, BASE_HEX, NULL, 0x00,
+ FT_UINT64, BASE_HEX, NULL, 0x00,
"", HFILL }
},
{ &hf_ptp_v2_mm_domainNumber,
@@ -4786,7 +4786,7 @@ proto_register_ptp(void)
},
{ &hf_ptp_v2_mm_parentIdentity,
{ "parent ClockIdentity", "ptp.v2.mm.parentclockidentity",
- FT_INT64, BASE_HEX, NULL, 0x00,
+ FT_UINT64, BASE_HEX, NULL, 0x00,
"", HFILL }
},
{ &hf_ptp_v2_mm_parentPort,
@@ -4836,7 +4836,7 @@ proto_register_ptp(void)
},
{ &hf_ptp_v2_mm_grandmasterIdentity,
{ "Grandmaster clock identity", "ptp.v2.mm.grandmasterclockidentity",
- FT_INT64, BASE_HEX, NULL, 0x00,
+ FT_UINT64, BASE_HEX, NULL, 0x00,
"", HFILL }
},
{ &hf_ptp_v2_mm_currentUtcOffset,
@@ -4876,7 +4876,7 @@ proto_register_ptp(void)
},
{ &hf_ptp_v2_mm_timesource,
{ "TimeSource", "ptp.v2.mm.timesource",
- FT_UINT8, BASE_HEX, VALS(ptp_v2_timesource_vals), 0x00,
+ FT_UINT8, BASE_HEX, VALS(ptp_v2_timesource_vals), 0x00,
"", HFILL }
},
{ &hf_ptp_v2_mm_offset_ns,
@@ -5024,7 +5024,7 @@ proto_register_ptp(void)
{ "Jump seconds", "ptp.v2.mm.jumpSeconds",
FT_INT32, BASE_DEC, NULL, 0x00,
"", HFILL }
- },
+ },
{ &hf_ptp_v2_mm_numberOfAlternateMasters,
{ "Number of alternate masters", "ptp.v2.mm.numberOfAlternateMasters",
FT_UINT8, BASE_DEC, NULL, 0x00,
@@ -5042,7 +5042,7 @@ proto_register_ptp(void)
},
};
-
+
/* Setup protocol subtree array */
static gint *ett[] = {
&ett_ptp,
@@ -5054,7 +5054,7 @@ proto_register_ptp(void)
&ett_ptp_v2_flags,
&ett_ptp_v2_correction,
&ett_ptp_v2_time,
- &ett_ptp_v2_time2,
+ &ett_ptp_v2_time2,
&ett_ptp_v2_managementData,
&ett_ptp_v2_clockType,
&ett_ptp_v2_physicalLayerProtocol,
diff --git a/epan/dissectors/packet-scsi-ssc.c b/epan/dissectors/packet-scsi-ssc.c
index a4508570e1..a35c7c8e1a 100644
--- a/epan/dissectors/packet-scsi-ssc.c
+++ b/epan/dissectors/packet-scsi-ssc.c
@@ -1,7 +1,7 @@
/* based on SSC3 spec */
-/* TODO:
- * dissect READPOSITION data
- * dissect REPORTDENSITYSUPPORT data
+/* TODO:
+ * dissect READPOSITION data
+ * dissect REPORTDENSITYSUPPORT data
*/
/* packet-scsi-ssc.c
* Dissector for the SCSI SSC commandset
@@ -1379,7 +1379,7 @@ proto_register_scsi_ssc(void)
{"Count", "scsi.ssc.space6.count", FT_INT24, BASE_DEC, NULL, 0x0,
"", HFILL}},
{ &hf_scsi_ssc_space6_code,
- {"Code", "scsi.ssc.space6.code", FT_INT8, BASE_HEX,
+ {"Code", "scsi.ssc.space6.code", FT_UINT8, BASE_HEX,
VALS(space6_code_vals), 0x0f,
"", HFILL}},
{ &hf_scsi_ssc_space16_count,
@@ -1389,100 +1389,100 @@ proto_register_scsi_ssc(void)
{"Transfer Length", "scsi.ssc.rdwr10.xferlen", FT_UINT16, BASE_DEC, NULL,
0x0, "", HFILL}},
{ &hf_scsi_ssc_erase_flags,
- {"Flags", "scsi.ssc.erase_flags", FT_UINT8, BASE_HEX,
+ {"Flags", "scsi.ssc.erase_flags", FT_UINT8, BASE_HEX,
NULL, 0x0, "", HFILL}},
{ &hf_scsi_ssc_fcs,
- {"FCS", "scsi.ssc.fcs", FT_BOOLEAN, 8,
+ {"FCS", "scsi.ssc.fcs", FT_BOOLEAN, 8,
NULL, 0x08, "", HFILL}},
{ &hf_scsi_ssc_lcs,
- {"LCS", "scsi.ssc.lcs", FT_BOOLEAN, 8,
+ {"LCS", "scsi.ssc.lcs", FT_BOOLEAN, 8,
NULL, 0x04, "", HFILL}},
{ &hf_scsi_ssc_erase_immed,
- {"IMMED", "scsi.ssc.erase_immed", FT_BOOLEAN, 8,
+ {"IMMED", "scsi.ssc.erase_immed", FT_BOOLEAN, 8,
NULL, 0x02, "", HFILL}},
{ &hf_scsi_ssc_long,
- {"LONG", "scsi.ssc.long", FT_BOOLEAN, 8,
+ {"LONG", "scsi.ssc.long", FT_BOOLEAN, 8,
NULL, 0x01, "", HFILL}},
{ &hf_scsi_ssc_partition,
- {"Partition", "scsi.ssc.partition", FT_UINT8, BASE_HEX,
+ {"Partition", "scsi.ssc.partition", FT_UINT8, BASE_HEX,
NULL, 0x0, "", HFILL}},
{ &hf_scsi_ssc_lbi,
- {"Logical Block Identifier", "scsi.ssc.lbi", FT_UINT64, BASE_HEX,
+ {"Logical Block Identifier", "scsi.ssc.lbi", FT_UINT64, BASE_HEX,
NULL, 0x0, "", HFILL}},
{ &hf_scsi_ssc_verify,
- {"VERIFY", "scsi.ssc.verify", FT_BOOLEAN, 8,
+ {"VERIFY", "scsi.ssc.verify", FT_BOOLEAN, 8,
NULL, 0x02, "", HFILL}},
{ &hf_scsi_ssc_immed,
- {"IMMED", "scsi.ssc.immed", FT_BOOLEAN, 8,
+ {"IMMED", "scsi.ssc.immed", FT_BOOLEAN, 8,
NULL, 0x01, "", HFILL}},
{ &hf_scsi_ssc_formatmedium_flags,
- {"Flags", "scsi.ssc.formatmedium_flags", FT_UINT8, BASE_HEX,
+ {"Flags", "scsi.ssc.formatmedium_flags", FT_UINT8, BASE_HEX,
NULL, 0x0, "", HFILL}},
{ &hf_scsi_ssc_format,
- {"Format", "scsi.ssc.format", FT_UINT8, BASE_HEX,
+ {"Format", "scsi.ssc.format", FT_UINT8, BASE_HEX,
VALS(format_vals), 0x0f, "", HFILL}},
{ &hf_scsi_ssc_loadunload_immed_flags,
- {"Immed", "scsi.ssc.loadunload_immed_flags", FT_UINT8, BASE_HEX,
+ {"Immed", "scsi.ssc.loadunload_immed_flags", FT_UINT8, BASE_HEX,
NULL, 0x0, "", HFILL}},
{ &hf_scsi_ssc_loadunload_flags,
- {"Flags", "scsi.ssc.loadunload_flags", FT_UINT8, BASE_HEX,
+ {"Flags", "scsi.ssc.loadunload_flags", FT_UINT8, BASE_HEX,
NULL, 0x0, "", HFILL}},
{ &hf_scsi_ssc_hold,
- {"HOLD", "scsi.ssc.hold", FT_BOOLEAN, 8,
+ {"HOLD", "scsi.ssc.hold", FT_BOOLEAN, 8,
NULL, 0x08, "", HFILL}},
{ &hf_scsi_ssc_eot,
- {"EOT", "scsi.ssc.eot", FT_BOOLEAN, 8,
+ {"EOT", "scsi.ssc.eot", FT_BOOLEAN, 8,
NULL, 0x04, "", HFILL}},
{ &hf_scsi_ssc_reten,
- {"RETEN", "scsi.ssc.reten", FT_BOOLEAN, 8,
+ {"RETEN", "scsi.ssc.reten", FT_BOOLEAN, 8,
NULL, 0x02, "", HFILL}},
{ &hf_scsi_ssc_load,
- {"LOAD", "scsi.ssc.load", FT_BOOLEAN, 8,
+ {"LOAD", "scsi.ssc.load", FT_BOOLEAN, 8,
NULL, 0x01, "", HFILL}},
{ &hf_scsi_ssc_locate_flags,
- {"Flags", "scsi.ssc.locate_flags", FT_UINT8, BASE_HEX,
+ {"Flags", "scsi.ssc.locate_flags", FT_UINT8, BASE_HEX,
NULL, 0x0, "", HFILL}},
{ &hf_scsi_ssc_bt,
- {"BT", "scsi.ssc.bt", FT_BOOLEAN, 8,
+ {"BT", "scsi.ssc.bt", FT_BOOLEAN, 8,
NULL, 0x04, "", HFILL}},
{ &hf_scsi_ssc_cp,
- {"CP", "scsi.ssc.cp", FT_BOOLEAN, 8,
+ {"CP", "scsi.ssc.cp", FT_BOOLEAN, 8,
NULL, 0x02, "", HFILL}},
{ &hf_scsi_ssc_dest_type,
- {"Dest Type", "scsi.ssc.dest_type", FT_UINT8, BASE_HEX,
+ {"Dest Type", "scsi.ssc.dest_type", FT_UINT8, BASE_HEX,
VALS(dest_type_vals), 0x18, "", HFILL}},
{ &hf_scsi_ssc_bam_flags,
- {"Flags", "scsi.ssc.bam_flags", FT_UINT8, BASE_HEX,
+ {"Flags", "scsi.ssc.bam_flags", FT_UINT8, BASE_HEX,
NULL, 0x0, "", HFILL}},
{ &hf_scsi_ssc_bam,
- {"BAM", "scsi.ssc.bam", FT_BOOLEAN, 8,
+ {"BAM", "scsi.ssc.bam", FT_BOOLEAN, 8,
NULL, 0x01, "", HFILL}},
{ &hf_scsi_ssc_read6_flags,
- {"Flags", "scsi.ssc.read6_flags", FT_UINT8, BASE_HEX,
+ {"Flags", "scsi.ssc.read6_flags", FT_UINT8, BASE_HEX,
NULL, 0x0, "", HFILL}},
{ &hf_scsi_ssc_sili,
- {"SILI", "scsi.ssc.sili", FT_BOOLEAN, 8,
+ {"SILI", "scsi.ssc.sili", FT_BOOLEAN, 8,
NULL, 0x02, "", HFILL}},
{ &hf_scsi_ssc_fixed,
- {"FIXED", "scsi.ssc.fixed", FT_BOOLEAN, 8,
+ {"FIXED", "scsi.ssc.fixed", FT_BOOLEAN, 8,
NULL, 0x01, "", HFILL}},
{ &hf_scsi_ssc_bytord,
- {"BYTORD", "scsi.ssc.bytord", FT_BOOLEAN, 8,
+ {"BYTORD", "scsi.ssc.bytord", FT_BOOLEAN, 8,
NULL, 0x04, "", HFILL}},
{ &hf_scsi_ssc_bytcmp,
- {"BYTCMP", "scsi.ssc.bytcmp", FT_BOOLEAN, 8,
+ {"BYTCMP", "scsi.ssc.bytcmp", FT_BOOLEAN, 8,
NULL, 0x02, "", HFILL}},
{ &hf_scsi_ssc_verify16_immed,
- {"IMMED", "scsi.ssc.verify16_immed", FT_BOOLEAN, 8,
+ {"IMMED", "scsi.ssc.verify16_immed", FT_BOOLEAN, 8,
NULL, 0x04, "", HFILL}},
{ &hf_scsi_ssc_medium_type,
- {"Medium Type", "scsi.ssc.medium_type", FT_BOOLEAN, 8,
+ {"Medium Type", "scsi.ssc.medium_type", FT_BOOLEAN, 8,
NULL, 0x02, "", HFILL}},
{ &hf_scsi_ssc_media,
- {"Media", "scsi.ssc.media", FT_BOOLEAN, 8,
+ {"Media", "scsi.ssc.media", FT_BOOLEAN, 8,
NULL, 0x01, "", HFILL}},
{ &hf_scsi_ssc_capacity_prop_value,
- {"Capacity Proportion Value", "scsi.ssc.cpv", FT_UINT16, BASE_DEC,
+ {"Capacity Proportion Value", "scsi.ssc.cpv", FT_UINT16, BASE_DEC,
NULL, 0, "", HFILL}},
};
diff --git a/epan/proto.c b/epan/proto.c
index 17fd2be65e..ef0fd973f1 100644
--- a/epan/proto.c
+++ b/epan/proto.c
@@ -3932,14 +3932,31 @@ static void tmp_fld_check_assert(header_field_info *hfinfo) {
switch (hfinfo->type) {
- case FT_UINT8:
- case FT_UINT16:
- case FT_UINT24:
- case FT_UINT32:
case FT_INT8:
case FT_INT16:
case FT_INT24:
case FT_INT32:
+ case FT_INT64:
+ /* Hexadecimal and octal are, in printf() and everywhere else,
+ * unsigned so don't allow dissectors to register a signed
+ * field to be displayed unsigned. (Else how would we
+ * display values negative values?)
+ *
+ * If you want to take out this check, be sure to fix
+ * hfinfo_numeric_format() so that it does not assert out
+ * when trying to construct a hexadecimal representation of
+ * FT_INT*.
+ */
+ DISSECTOR_ASSERT(hfinfo->display != BASE_HEX &&
+ hfinfo->display != BASE_HEX_DEC &&
+ hfinfo->display != BASE_DEC_HEX &&
+ hfinfo->display != BASE_OCT);
+ /* FALL THROUGH */
+ case FT_UINT8:
+ case FT_UINT16:
+ case FT_UINT24:
+ case FT_UINT32:
+ case FT_UINT64:
/* Require integral types (other than frame number, which is
always displayed in decimal) to have a number base */
DISSECTOR_ASSERT(hfinfo->display != BASE_NONE);