diff options
Diffstat (limited to 'epan/dissectors/pidl/dnsserver/dnsserver.cnf')
-rw-r--r-- | epan/dissectors/pidl/dnsserver/dnsserver.cnf | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/epan/dissectors/pidl/dnsserver/dnsserver.cnf b/epan/dissectors/pidl/dnsserver/dnsserver.cnf new file mode 100644 index 00000000..ab89c333 --- /dev/null +++ b/epan/dissectors/pidl/dnsserver/dnsserver.cnf @@ -0,0 +1,84 @@ +# +# DNS_RPC_NAME +# +MANUAL dnsserver_dissect_struct_DNS_RPC_NAME +HF_FIELD hf_dnsserver_DNS_RPC_NAME_name "Name" "dnsserver.DNS_RPC_NAME.name" FT_STRING BASE_NONE NULL 0 "" "" "" + + +# +# DNS_RPC_NODE +# +MANUAL dnsserver_dissect_element_DNS_RPC_NODE_RecordCount +MANUAL dnsserver_dissect_element_DNS_RPC_NODE_records + + +NOEMIT dnsserver_dissect_element_DNS_RPC_NAME_NameLength +NOEMIT dnsserver_dissect_element_DNS_RPC_NAME_Name +NOEMIT dnsserver_dissect_element_DNS_RPC_NAME_Name_ + +CODE START + +int +dnsserver_dissect_struct_DNS_RPC_NAME(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, dcerpc_info* di, guint8 *drep _U_, int hf_index _U_, guint32 param _U_) +{ + proto_item *item = NULL; + proto_tree *tree = NULL; + int old_offset; + guint8 len; + + if(di->conformant_run){ + /*just a run to handle conformant arrays, nothing to dissect */ + return offset; + } + + + + old_offset = offset; + + if (parent_tree) { + item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE); + tree = proto_item_add_subtree(item, ett_dnsserver_DNS_RPC_NAME); + } + + offset = dissect_ndr_uint8(tvb, offset, pinfo, tree, di, drep, hf_dnsserver_DNS_RPC_NAME_NameLength, &len); + proto_tree_add_item(tree, hf_dnsserver_DNS_RPC_NAME_name, tvb, + offset, len, ENC_UTF_8); + offset += len; + + proto_item_set_len(item, offset-old_offset); + + return offset; +} + + +static guint16 node_record_count; + +static int +dnsserver_dissect_element_DNS_RPC_NODE_RecordCount(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di, guint8 *drep _U_) +{ + if(di->conformant_run){ + /*just a run to handle conformant arrays, nothing to dissect */ + return offset; + } + + offset = dissect_ndr_uint16(tvb, offset, pinfo, tree, di, drep, hf_dnsserver_DNS_RPC_NODE_RecordCount, &node_record_count); + + return offset; +} + +static int +dnsserver_dissect_element_DNS_RPC_NODE_records(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di, guint8 *drep _U_) +{ + if(di->conformant_run){ + /*just a run to handle conformant arrays, nothing to dissect */ + return offset; + } + + while(node_record_count--){ + offset = dnsserver_dissect_element_DNS_RPC_NODE_records_(tvb, offset, pinfo, tree, di, drep); + } + + return offset; +} + +CODE END |