aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-mswsp.c
diff options
context:
space:
mode:
authorNoel Power <noel.power@suse.com>2017-01-12 05:52:23 -0500
committerMichael Mann <mmann78@netscape.net>2017-02-10 03:45:21 +0000
commitb18245a60c5dc3532d144699dd00f36d84c4e176 (patch)
tree8aa4a53e0552ad147eead3313ba9d450ae6e35ce /epan/dissectors/packet-mswsp.c
parente0fafa54758c8d0e19df39728df0792d512c068c (diff)
mswsp: Numerous bugfixes
1. Fix display of CTableColumn.StatusUsed & CTableColumn.LengthUsed Both StatusUsed and LenghtUsed members were displayed as 2 byte length values instead of single byte values. 2. Fix minor spelling mistake 3. display correct address(s) for array of address values 4. Use correct minimum CTableColumn size This is followup patch for patch already provided for bug 13299. The previous minimum value neglated to take into account the CFullPropSpec structure (which is on the wire) but is represtented as a string in the internal CTableColumn structure. Note: this doesn't make any difference to the effectiveness of the previous patch but should avoid confusion if someone later actually investigates the correct minimum size. 5. Fix CPMCREATEQUERY message parsing Following a query and subsequent clarification from dochelp@microsoft.com the MS-WSP specification document was found to be incorrect. CPMCreateQueryIn | ---> CSortSet should instead eventually point to CSortSet via the following msg structure CPMCreateQueryIn | ---> CInGroupSortAggregSets | ---> CInGroupSortAggregSet | ---> CSortSet Change-Id: I7da6c7db817113f5542f25f078626030ad30d737 Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-on: https://code.wireshark.org/review/20031 Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-mswsp.c')
-rw-r--r--epan/dissectors/packet-mswsp.c31
1 files changed, 11 insertions, 20 deletions
diff --git a/epan/dissectors/packet-mswsp.c b/epan/dissectors/packet-mswsp.c
index fd0fb5df91..b31289bc41 100644
--- a/epan/dissectors/packet-mswsp.c
+++ b/epan/dissectors/packet-mswsp.c
@@ -295,7 +295,7 @@ struct CTableColumn {
char name[PROP_LENGTH];
};
/* minimum size in bytes on the wire CTableColumn can be */
-#define MIN_CTABLECOL_SIZE 8
+#define MIN_CTABLECOL_SIZE 32
/* 2.2.3.10 */
@@ -471,7 +471,6 @@ static int hf_mswsp_msg_cpmcreatequery_size = -1;
static int hf_mswsp_msg_cpmcreatequery_ccolumnsetpresent = -1;
static int hf_mswsp_msg_cpmcreatequery_crestrictionpresent = -1;
static int hf_mswsp_msg_cpmcreatequery_csortpresent = -1;
-static int hf_mswsp_msg_cpmcreatequery_csortset_xxx = -1;
static int hf_mswsp_msg_cpmcreatequery_ccategpresent = -1;
static int hf_mswsp_msg_cpmcreatequery_ccateg_count = -1;
static int hf_mswsp_msg_cpmcreatequery_trueseq = -1;
@@ -3293,7 +3292,7 @@ static int parse_CTableColumn(tvbuff_t *tvb, int offset, proto_tree *parent_tree
used = tvb_get_guint8(tvb, offset);
col->statusused = used;
- proto_tree_add_uint(tree, hf_mswsp_ctablecolumn_statused, tvb, offset, 2, used);
+ proto_tree_add_uint(tree, hf_mswsp_ctablecolumn_statused, tvb, offset, 1, used);
offset += 1;
if (used) {
@@ -3305,12 +3304,12 @@ static int parse_CTableColumn(tvbuff_t *tvb, int offset, proto_tree *parent_tree
}
used = tvb_get_guint8(tvb, offset);
- proto_tree_add_uint(tree, hf_mswsp_ctablecolumn_lenused, tvb, offset, 2, used);
+ proto_tree_add_uint(tree, hf_mswsp_ctablecolumn_lenused, tvb, offset, 1, used);
col->lengthused = used;
offset += 1;
if (used) {
- offset = parse_padding(tvb, offset, 2, pad_tree, "padding_Lenght");
+ offset = parse_padding(tvb, offset, 2, pad_tree, "padding_Length");
col->lengthoffset = tvb_get_letohs(tvb, offset);
proto_tree_add_uint(tree, hf_mswsp_ctablecolumn_lenoffset, tvb, offset, 2, col->lengthoffset);
@@ -4874,7 +4873,7 @@ static int parse_CInGroupSortAggregSet(tvbuff_t *tvb, int offset, proto_tree *pa
offset = parse_CBaseStorageVariant(tvb, offset, tree, pad_tree, &id, "inGroupId");
}
- offset = parse_CSortAggregSet(tvb, offset, tree, pad_tree, "SortAggregSet");
+ offset = parse_CSortSet(tvb, offset, tree, pad_tree, "SortSet");
proto_item_set_end(item, tvb, offset);
return offset;
@@ -5283,17 +5282,19 @@ static int parse_VariantColVector(tvbuff_t *tvb, int offset, proto_tree *tree, g
sub_tree = proto_tree_add_subtree(tree, tvb, buf_offset, 0, ett_CRowVariant_Vector, NULL, "values");
for (i = 0; i < count; i++) {
guint64 item_address = 0;
+ gint address_of_address = 0;
int size;
union vt_single value;
int len;
if (is_64bit) {
size = 8;
- item_address = tvb_get_letoh64(tvb, buf_offset + (i * size));
- proto_tree_add_uint64_format(sub_tree, hf_mswsp_rowvariant_item_address64, tvb, buf_offset, size, item_address, "address[%d] 0x%" G_GINT64_MODIFIER "x", i, item_address);
+ address_of_address = buf_offset + (i * size);
+ item_address = tvb_get_letoh64(tvb, address_of_address);
+ proto_tree_add_uint64_format(sub_tree, hf_mswsp_rowvariant_item_address64, tvb, address_of_address, size, item_address, "address[%d] 0x%" G_GINT64_MODIFIER "x", i, item_address);
} else {
size = 4;
item_address = tvb_get_letohl(tvb, buf_offset + (i * size));
- proto_tree_add_uint_format(sub_tree, hf_mswsp_rowvariant_item_address32, tvb, buf_offset, size, (guint32)item_address, "address[%d] 0x%x", i, (guint32)item_address);
+ proto_tree_add_uint_format(sub_tree, hf_mswsp_rowvariant_item_address32, tvb, address_of_address, size, (guint32)item_address, "address[%d] 0x%x", i, (guint32)item_address);
}
strbuf = wmem_strbuf_new(wmem_packet_scope(), "");
if (vt_list_type->size == -1) {
@@ -5609,11 +5610,8 @@ static int dissect_CPMCreateQuery(tvbuff_t *tvb, packet_info *pinfo, proto_tree
if (CSortSetPresent) {
offset = parse_padding(tvb, offset, 4, tree, "paddingCSortSetPresent");
+ offset = parse_CInGroupSortAggregSets(tvb, offset, tree, pad_tree, "GroupSortAggregSets");
- proto_tree_add_item(tree, hf_mswsp_msg_cpmcreatequery_csortset_xxx, tvb, offset, 8, ENC_LITTLE_ENDIAN);
- offset += 8;
-
- offset = parse_CSortSet(tvb, offset, tree, pad_tree, "SortSet");
}
CCategorizationSetPresent = tvb_get_guint8(tvb, offset);
@@ -7313,13 +7311,6 @@ proto_register_mswsp(void)
}
},
{
- &hf_mswsp_msg_cpmcreatequery_csortset_xxx,
- {
- "XXX - (undocumented bytes)", "mswsp.cpmcreatequery.csortset.xxx",
- FT_UINT64, BASE_HEX, NULL, 0, NULL, HFILL
- }
- },
- {
&hf_mswsp_msg_cpmcreatequery_ccategpresent,
{
"CCategorizationSetPresent", "mswsp.cpmcreatequery.ccategpresent",