wireshark/epan/dissectors/pidl/dnsserver.cnf

95 lines
2.4 KiB
INI

#
# 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
#include "packet-smb-common.h"
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;
const char *dn;
int dn_len = 0;
guint16 bc;
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);
bc = tvb_captured_length_remaining(tvb, offset);
dn = get_unicode_or_ascii_string(tvb, &offset,
TRUE, &dn_len, TRUE, TRUE, &bc);
if (dn) {
proto_tree_add_string(tree, hf_dnsserver_DNS_RPC_NAME_name, tvb,
offset, dn_len,dn);
offset += dn_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