diff --git a/packet-dcerpc-netlogon.c b/packet-dcerpc-netlogon.c index ea75aa0dd4..de5d4bad74 100644 --- a/packet-dcerpc-netlogon.c +++ b/packet-dcerpc-netlogon.c @@ -3,7 +3,7 @@ * Copyright 2001, Tim Potter * 2002 structure and command dissectors by Ronnie Sahlberg * - * $Id: packet-dcerpc-netlogon.c,v 1.60 2002/11/04 09:06:15 sahlberg Exp $ + * $Id: packet-dcerpc-netlogon.c,v 1.61 2002/11/04 11:52:36 sahlberg Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs @@ -4531,7 +4531,6 @@ netlogon_dissect_DSROLE_PRIMARY_DOMAIN_INFO_EX(tvbuff_t *tvb, int offset, return offset; } - static int netlogon_dissect_DSROLE_PRIMARY_DOMAIN_INFO_EX_ARRAY(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, @@ -4543,33 +4542,6 @@ netlogon_dissect_DSROLE_PRIMARY_DOMAIN_INFO_EX_ARRAY(tvbuff_t *tvb, int offset, return offset; } -static int -netlogon_dissect_DSROLE_PRIMARY_DOMAIN_INFO(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, - char *drep) -{ - guint32 level; - - offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, - hf_netlogon_level, &level); - - ALIGN_TO_4_BYTES; - switch(level){ - case 1: - offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep, - netlogon_dissect_DSROLE_PRIMARY_DOMAIN_INFO_EX_ARRAY, NDR_POINTER_UNIQUE, - "DSROLE_PRIMARY_DOMAIN_INFO_EX_ARRAY:", -1, 0); - break; - case 2: - offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep, - netlogon_dissect_DSROLE_PRIMARY_DOMAIN_INFO_EX_ARRAY, NDR_POINTER_UNIQUE, - "DSROLE_PRIMARY_DOMAIN_INFO_EX_ARRAY:", -1, 0); - break; - } - - return offset; -} - static int netlogon_dissect_element_865_byte(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, @@ -5370,15 +5342,16 @@ netlogon_dissect_function_24_rqst(tvbuff_t *tvb, int offset, return offset; } - static int netlogon_dissect_function_24_reply(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, char *drep) { - /*XXX This is a guess, it might be a different struct */ + offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, + hf_netlogon_entries, NULL); + offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep, - netlogon_dissect_DSROLE_PRIMARY_DOMAIN_INFO, NDR_POINTER_REF, - "DSROLE_PRIMARY_DOMAIN_INFO:", -1, 0); + netlogon_dissect_DSROLE_PRIMARY_DOMAIN_INFO_EX_ARRAY, NDR_POINTER_UNIQUE, + "DSROLE_PRIMARY_DOMAIN_INFO_EX_ARRAY:", -1, 0); offset = dissect_ntstatus(tvb, offset, pinfo, tree, drep, hf_netlogon_rc, NULL); @@ -5514,9 +5487,12 @@ static int netlogon_dissect_dsrrolegetprimarydomaininformation_reply(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, char *drep) { + offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, + hf_netlogon_entries, NULL); + offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep, - netlogon_dissect_DSROLE_PRIMARY_DOMAIN_INFO, NDR_POINTER_REF, - "DSROLE_PRIMARY_DOMAIN_INFO:", -1, 0); + netlogon_dissect_DSROLE_PRIMARY_DOMAIN_INFO_EX_ARRAY, NDR_POINTER_UNIQUE, + "DSROLE_PRIMARY_DOMAIN_INFO_EX_ARRAY:", -1, 0); offset = dissect_ntstatus(tvb, offset, pinfo, tree, drep, hf_netlogon_rc, NULL);