packet-dcerpc-netlogon: use SEC_CHAN_* values from packet-dcerpc-misc

Signed-off-by: Stefan Metzmacher <metze@samba.org>
This commit is contained in:
Stefan Metzmacher 2020-11-13 15:20:46 +01:00 committed by A Wireshark GitLab Utility
parent 0fd55dbf54
commit 833a825c7c
3 changed files with 10 additions and 16 deletions

View File

@ -25,6 +25,13 @@ int misc_dissect_struct_policy_handle(tvbuff_t *tvb _U_, int offset _U_, packet_
extern const value_string misc_netr_SchannelType_vals[];
int misc_dissect_enum_netr_SchannelType(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_, int hf_index _U_, guint1632 *param _U_);
int misc_dissect_struct_KRB5_EDATA_NTSTATUS(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, dcerpc_info* di _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_);
#ifndef REG_NONE
/*
* REG_NONE and others might already be defined,
* via WinNT.h, which might be injected via
* wsutil/wsgcrypt.h => gcrypt.h before in the Windows build
*/
#define REG_NONE (0)
#define REG_SZ (1)
#define REG_EXPAND_SZ (2)
@ -37,6 +44,7 @@ int misc_dissect_struct_KRB5_EDATA_NTSTATUS(tvbuff_t *tvb _U_, int offset _U_, p
#define REG_FULL_RESOURCE_DESCRIPTOR (9)
#define REG_RESOURCE_REQUIREMENTS_LIST (10)
#define REG_QWORD (11)
#endif /* ! REG_NONE */
extern const value_string misc_winreg_Type_vals[];
int misc_dissect_enum_winreg_Type(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_, int hf_index _U_, guint32 *param _U_);
#endif /* __PACKET_DCERPC_MISC_H */

View File

@ -26,6 +26,7 @@
#include "packet-windows-common.h"
#include "packet-dcerpc-lsa.h"
#include "packet-ntlmssp.h"
#include "packet-dcerpc-misc.h"
/* for keytab format */
#include <epan/asn1.h>
#include "packet-kerberos.h"
@ -8256,15 +8257,6 @@ dissect_response_secchan_verf(tvbuff_t *tvb, int offset, packet_info *pinfo ,
return dissect_secchan_verf(tvb,offset,pinfo,tree,drep,1);
}
/* Secure channel types */
static const value_string sec_chan_type_vals[] = {
{ SEC_CHAN_WKSTA, "Workstation" },
{ SEC_CHAN_DOMAIN, "Domain trust" },
{ SEC_CHAN_BDC, "Backup domain controller" },
{ 0, NULL }
};
void
proto_register_dcerpc_netlogon(void)
{
@ -8818,7 +8810,7 @@ proto_register_dcerpc_netlogon(void)
{ &hf_netlogon_secure_channel_type,
{ "Sec Chan Type", "netlogon.sec_chan_type", FT_UINT16, BASE_DEC,
VALS(sec_chan_type_vals), 0x0, "Secure Channel Type", HFILL }},
VALS(misc_netr_SchannelType_vals), 0x0, "Secure Channel Type", HFILL }},
{ &hf_netlogon_restart_state,
{ "Restart State", "netlogon.restart_state", FT_UINT16, BASE_DEC,

View File

@ -60,12 +60,6 @@
#define NETLOGON_NETRLOGONSAMLOGONWITHFLAGS 0x2d
#define NETLOGON_NETRSERVERGETTRUSTINFO 0x2e
/* Secure channel types */
#define SEC_CHAN_WKSTA 2
#define SEC_CHAN_DOMAIN 4
#define SEC_CHAN_BDC 6
/* needed to decrypt PAC_LOGON_INFO in kerberos */
int