diff options
author | Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au> | 2009-10-03 05:16:51 +0000 |
---|---|---|
committer | Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au> | 2009-10-03 05:16:51 +0000 |
commit | 343b961a4800f198a00e5b48625ca219956d917d (patch) | |
tree | 06fd530f70903ddee3fe02da8032adb3bf8f3e3d | |
parent | 7783d0f03e482c21a610d36e3b2a86a2276220d3 (diff) |
rename dissect_ndr_4or8 to dissect_ndr_uint3264 to match hte name of
the new datatype uint3264.
create a fake guint3264 type as well
svn path=/trunk/; revision=30264
-rw-r--r-- | epan/dissectors/packet-dcerpc-ndr.c | 4 | ||||
-rw-r--r-- | epan/dissectors/packet-dcerpc-nt.c | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-dcerpc-samr.c | 8 | ||||
-rw-r--r-- | epan/dissectors/packet-dcerpc.c | 38 | ||||
-rw-r--r-- | epan/dissectors/packet-dcerpc.h | 7 | ||||
-rw-r--r-- | epan/dissectors/pidl/samr.cnf | 4 |
6 files changed, 33 insertions, 30 deletions
diff --git a/epan/dissectors/packet-dcerpc-ndr.c b/epan/dissectors/packet-dcerpc-ndr.c index dc1e01afc6..0b49075d0f 100644 --- a/epan/dissectors/packet-dcerpc-ndr.c +++ b/epan/dissectors/packet-dcerpc-ndr.c @@ -218,9 +218,9 @@ dissect_ndr_uint32 (tvbuff_t *tvb, gint offset, packet_info *pinfo, data, which is 4 bytes in size in NDR but 8 bytes in NDR64. */ int -dissect_ndr_4or8 (tvbuff_t *tvb, gint offset, packet_info *pinfo, +dissect_ndr_uint3264 (tvbuff_t *tvb, gint offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, - int hfindex, guint64 *pdata) + int hfindex, guint3264 *pdata) { dcerpc_info *di; diff --git a/epan/dissectors/packet-dcerpc-nt.c b/epan/dissectors/packet-dcerpc-nt.c index 6dd870433c..7a9c42f423 100644 --- a/epan/dissectors/packet-dcerpc-nt.c +++ b/epan/dissectors/packet-dcerpc-nt.c @@ -1270,7 +1270,7 @@ dissect_ndr_nt_SID(tvbuff_t *tvb, int offset, packet_info *pinfo, /* the SID contains a conformant array, first we must eat the 4-byte max_count before we can hand it off */ - offset = dissect_ndr_4or8 (tvb, offset, pinfo, tree, drep, + offset = dissect_ndr_uint3264 (tvb, offset, pinfo, tree, drep, hf_nt_count, NULL); offset = dissect_nt_sid(tvb, offset, tree, name, &sid_str, diff --git a/epan/dissectors/packet-dcerpc-samr.c b/epan/dissectors/packet-dcerpc-samr.c index f417464c7c..2677fffcdc 100644 --- a/epan/dissectors/packet-dcerpc-samr.c +++ b/epan/dissectors/packet-dcerpc-samr.c @@ -2127,7 +2127,7 @@ cnf_dissect_sec_desc_buf_(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_t /*just a run to handle conformant arrays, nothing to dissect */ return offset; } - offset = dissect_ndr_4or8 (tvb, offset, pinfo, tree, drep, + offset = dissect_ndr_uint3264 (tvb, offset, pinfo, tree, drep, hf_samr_sec_desc_buf_len, &len); dcv = (dcerpc_call_value *)di->call_data; if(dcv){ @@ -2168,7 +2168,7 @@ cnf_dissect_sec_desc_buf(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tr /*just a run to handle conformant arrays, nothing to dissect */ return offset; } - offset = dissect_ndr_4or8 (tvb, offset, pinfo, tree, drep, + offset = dissect_ndr_uint3264 (tvb, offset, pinfo, tree, drep, hf_samr_sec_desc_buf_len, &len); offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep, cnf_dissect_sec_desc_buf_, NDR_POINTER_UNIQUE, @@ -3785,7 +3785,7 @@ samr_dissect_DomainInfo(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U proto_item *item = NULL; proto_tree *tree = NULL; int old_offset; - guint32 level; + guint16 level; old_offset = offset; if (parent_tree) { @@ -3793,7 +3793,7 @@ samr_dissect_DomainInfo(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U tree = proto_item_add_subtree(item, ett_samr_samr_DomainInfo); } - offset = dissect_ndr_2or4(tvb, offset, pinfo, tree, drep, hf_index, &level); + offset = dissect_ndr_uint16(tvb, offset, pinfo, tree, drep, hf_index, &level); ALIGN_TO_8_BYTES; switch(level) { diff --git a/epan/dissectors/packet-dcerpc.c b/epan/dissectors/packet-dcerpc.c index 77567a3830..9c1909b3e3 100644 --- a/epan/dissectors/packet-dcerpc.c +++ b/epan/dissectors/packet-dcerpc.c @@ -1196,7 +1196,7 @@ dissect_ndr_ucarray(tvbuff_t *tvb, gint offset, packet_info *pinfo, /* conformant run, just dissect the max_count header */ old_offset=offset; di->conformant_run=0; - offset = dissect_ndr_4or8 (tvb, offset, pinfo, tree, drep, + offset = dissect_ndr_uint3264 (tvb, offset, pinfo, tree, drep, hf_dcerpc_array_max_count, &val); di->array_max_count = val; di->array_max_count_offset=offset-conformance_size; @@ -1237,15 +1237,15 @@ dissect_ndr_ucvarray(tvbuff_t *tvb, gint offset, packet_info *pinfo, /* conformant run, just dissect the max_count header */ old_offset=offset; di->conformant_run=0; - offset = dissect_ndr_4or8 (tvb, offset, pinfo, tree, drep, + offset = dissect_ndr_uint3264 (tvb, offset, pinfo, tree, drep, hf_dcerpc_array_max_count, &val); di->array_max_count = val; di->array_max_count_offset=offset-conformance_size; - offset = dissect_ndr_4or8 (tvb, offset, pinfo, tree, drep, + offset = dissect_ndr_uint3264 (tvb, offset, pinfo, tree, drep, hf_dcerpc_array_offset, &val); di->array_offset = val; di->array_offset_offset=offset-conformance_size; - offset = dissect_ndr_4or8 (tvb, offset, pinfo, tree, drep, + offset = dissect_ndr_uint3264 (tvb, offset, pinfo, tree, drep, hf_dcerpc_array_actual_count, &val); di->array_actual_count=val; di->array_actual_count_offset=offset-conformance_size; @@ -1291,11 +1291,11 @@ dissect_ndr_uvarray(tvbuff_t *tvb, gint offset, packet_info *pinfo, /* conformant run, just dissect the max_count header */ old_offset=offset; di->conformant_run=0; - offset = dissect_ndr_4or8 (tvb, offset, pinfo, tree, drep, + offset = dissect_ndr_uint3264 (tvb, offset, pinfo, tree, drep, hf_dcerpc_array_offset, &val); di->array_offset=val; di->array_offset_offset=offset-conformance_size; - offset = dissect_ndr_4or8 (tvb, offset, pinfo, tree, drep, + offset = dissect_ndr_uint3264 (tvb, offset, pinfo, tree, drep, hf_dcerpc_array_actual_count, &val); di->array_actual_count=val; di->array_actual_count_offset=offset-conformance_size; @@ -1345,13 +1345,13 @@ dissect_ndr_byte_array(tvbuff_t *tvb, int offset, packet_info *pinfo, /* NDR array header */ - offset = dissect_ndr_4or8(tvb, offset, pinfo, tree, drep, + offset = dissect_ndr_uint3264(tvb, offset, pinfo, tree, drep, hf_dcerpc_array_max_count, NULL); - offset = dissect_ndr_4or8(tvb, offset, pinfo, tree, drep, + offset = dissect_ndr_uint3264(tvb, offset, pinfo, tree, drep, hf_dcerpc_array_offset, NULL); - offset = dissect_ndr_4or8(tvb, offset, pinfo, tree, drep, + offset = dissect_ndr_uint3264(tvb, offset, pinfo, tree, drep, hf_dcerpc_array_actual_count, &len); if (tree && len) { @@ -1403,13 +1403,13 @@ dissect_ndr_cvstring(tvbuff_t *tvb, int offset, packet_info *pinfo, /* NDR array header */ - offset = dissect_ndr_4or8(tvb, offset, pinfo, string_tree, drep, + offset = dissect_ndr_uint3264(tvb, offset, pinfo, string_tree, drep, hf_dcerpc_array_max_count, NULL); - offset = dissect_ndr_4or8(tvb, offset, pinfo, string_tree, drep, + offset = dissect_ndr_uint3264(tvb, offset, pinfo, string_tree, drep, hf_dcerpc_array_offset, NULL); - offset = dissect_ndr_4or8(tvb, offset, pinfo, string_tree, drep, + offset = dissect_ndr_uint3264(tvb, offset, pinfo, string_tree, drep, hf_dcerpc_array_actual_count, &len); buffer_len = size_is * len; @@ -1592,10 +1592,10 @@ dissect_ndr_vstring(tvbuff_t *tvb, int offset, packet_info *pinfo, } /* NDR array header */ - offset = dissect_ndr_4or8(tvb, offset, pinfo, string_tree, drep, + offset = dissect_ndr_uint3264(tvb, offset, pinfo, string_tree, drep, hf_dcerpc_array_offset, NULL); - offset = dissect_ndr_4or8(tvb, offset, pinfo, string_tree, drep, + offset = dissect_ndr_uint3264(tvb, offset, pinfo, string_tree, drep, hf_dcerpc_array_actual_count, &len); buffer_len = size_is * len; @@ -1970,7 +1970,7 @@ dissect_ndr_pointer_cb(tvbuff_t *tvb, gint offset, packet_info *pinfo, proto_item *item; /* get the referent id */ - offset = dissect_ndr_4or8(tvb, offset, pinfo, NULL, drep, -1, &id); + offset = dissect_ndr_uint3264(tvb, offset, pinfo, NULL, drep, -1, &id); tvb_ensure_bytes_exist(tvb, offset-pointer_size, pointer_size); /* we got a NULL pointer */ @@ -2010,7 +2010,7 @@ dissect_ndr_pointer_cb(tvbuff_t *tvb, gint offset, packet_info *pinfo, proto_item *item; /* get the referent id */ - offset = dissect_ndr_4or8(tvb, offset, pinfo, NULL, drep, -1, &id); + offset = dissect_ndr_uint3264(tvb, offset, pinfo, NULL, drep, -1, &id); tvb_ensure_bytes_exist(tvb, offset-pointer_size, pointer_size); /* we got a NULL pointer */ @@ -2040,7 +2040,7 @@ dissect_ndr_pointer_cb(tvbuff_t *tvb, gint offset, packet_info *pinfo, proto_item *item; /* get the referent id */ - offset = dissect_ndr_4or8(tvb, offset, pinfo, NULL, drep, -1, &id); + offset = dissect_ndr_uint3264(tvb, offset, pinfo, NULL, drep, -1, &id); tvb_ensure_bytes_exist(tvb, offset-pointer_size, pointer_size); /* new pointer */ @@ -2062,7 +2062,7 @@ dissect_ndr_pointer_cb(tvbuff_t *tvb, gint offset, packet_info *pinfo, proto_item *item; /* get the referent id */ - offset = dissect_ndr_4or8(tvb, offset, pinfo, NULL, drep, -1, &id); + offset = dissect_ndr_uint3264(tvb, offset, pinfo, NULL, drep, -1, &id); tvb_ensure_bytes_exist(tvb, offset-pointer_size, pointer_size); /* we got a NULL pointer */ @@ -2093,7 +2093,7 @@ dissect_ndr_pointer_cb(tvbuff_t *tvb, gint offset, packet_info *pinfo, proto_item *item; /* get the referent id */ - offset = dissect_ndr_4or8(tvb, offset, pinfo, NULL, drep, -1, &id); + offset = dissect_ndr_uint3264(tvb, offset, pinfo, NULL, drep, -1, &id); tvb_ensure_bytes_exist(tvb, offset-pointer_size, pointer_size); /* we got a NULL pointer */ diff --git a/epan/dissectors/packet-dcerpc.h b/epan/dissectors/packet-dcerpc.h index 14996828c9..d3bcd9217c 100644 --- a/epan/dissectors/packet-dcerpc.h +++ b/epan/dissectors/packet-dcerpc.h @@ -188,9 +188,12 @@ int dissect_ndr_ctx_hnd (tvbuff_t *tvb, gint offset, packet_info *pinfo, int dissect_ndr_2or4 (tvbuff_t *tvb, gint offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, int hfindex, guint32 *pdata); -int dissect_ndr_4or8 (tvbuff_t *tvb, gint offset, packet_info *pinfo, + +typedef guint64 guint3264; + +int dissect_ndr_uint3264 (tvbuff_t *tvb, gint offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, - int hfindex, guint64 *pdata); + int hfindex, guint3264 *pdata); typedef int (dcerpc_dissect_fnct_t)(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep); diff --git a/epan/dissectors/pidl/samr.cnf b/epan/dissectors/pidl/samr.cnf index 460bdb0f25..31ed0cc050 100644 --- a/epan/dissectors/pidl/samr.cnf +++ b/epan/dissectors/pidl/samr.cnf @@ -429,7 +429,7 @@ cnf_dissect_sec_desc_buf_(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_t return offset; } - offset = dissect_ndr_4or8 (tvb, offset, pinfo, tree, drep, + offset = dissect_ndr_uint3264 (tvb, offset, pinfo, tree, drep, hf_samr_sec_desc_buf_len, &len); dcv = (dcerpc_call_value *)di->call_data; @@ -477,7 +477,7 @@ cnf_dissect_sec_desc_buf(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tr return offset; } - offset = dissect_ndr_4or8 (tvb, offset, pinfo, tree, drep, + offset = dissect_ndr_uint3264 (tvb, offset, pinfo, tree, drep, hf_samr_sec_desc_buf_len, &len); offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep, |