/* DO NOT EDIT
	This file was automatically generated by Pidl
	from iwbemlevel1login.idl and iwbemlevel1login.cnf.

	Pidl is a perl based IDL compiler for DCE/RPC idl files.
	It is maintained by the Samba team, not the Wireshark team.
	Instructions on how to download and install Pidl can be
	found at https://wiki.wireshark.org/Pidl
*/


#include "config.h"
#include <string.h>
#include <wsutil/array.h>
#include <epan/packet.h>
#include <epan/tfs.h>

#include "packet-dcerpc.h"
#include "packet-dcerpc-nt.h"
#include "packet-windows-common.h"
#include "packet-dcerpc-iwbemlevel1login.h"
void proto_register_dcerpc_IWbemLevel1Login(void);
void proto_reg_handoff_dcerpc_IWbemLevel1Login(void);

/* Ett declarations */
static int ett_IWbemLevel1Login_EstablishPosition_orpcthis;
static int ett_IWbemLevel1Login_EstablishPosition_orpcthat;
static int ett_IWbemLevel1Login_RequestChallenge_orpcthis;
static int ett_IWbemLevel1Login_RequestChallenge_orpcthat;
static int ett_IWbemLevel1Login_WBEMLogin_orpcthis;
static int ett_IWbemLevel1Login_WBEMLogin_orpcthat;
static int ett_IWbemLevel1Login_NTLMLogin_orpcthis;
static int ett_IWbemLevel1Login_NTLMLogin_orpcthat;
static int ett_dcerpc_IWbemLevel1Login;
static int ett_IWbemLevel1Login_ORPCTHIS;
static int ett_IWbemLevel1Login_ORPCTHAT;
static int ett_IWbemLevel1Login_IWbemServices;


/* Header field declarations */
static int hf_IWbemLevel1Login_EstablishPosition_LocaleVersion;
static int hf_IWbemLevel1Login_EstablishPosition_orpcthat;
static int hf_IWbemLevel1Login_EstablishPosition_orpcthis;
static int hf_IWbemLevel1Login_EstablishPosition_reserved1;
static int hf_IWbemLevel1Login_EstablishPosition_reserved2;
static int hf_IWbemLevel1Login_IWbemServices_count;
static int hf_IWbemLevel1Login_IWbemServices_services;
static int hf_IWbemLevel1Login_NTLMLogin_lFlags;
static int hf_IWbemLevel1Login_NTLMLogin_orpcthat;
static int hf_IWbemLevel1Login_NTLMLogin_orpcthis;
static int hf_IWbemLevel1Login_NTLMLogin_pCtx;
static int hf_IWbemLevel1Login_NTLMLogin_ppNamespace;
static int hf_IWbemLevel1Login_NTLMLogin_wszNetworkResource;
static int hf_IWbemLevel1Login_NTLMLogin_wszPreferredLocale;
static int hf_IWbemLevel1Login_RequestChallenge_orpcthat;
static int hf_IWbemLevel1Login_RequestChallenge_orpcthis;
static int hf_IWbemLevel1Login_RequestChallenge_reserved1;
static int hf_IWbemLevel1Login_RequestChallenge_reserved2;
static int hf_IWbemLevel1Login_RequestChallenge_reserved3;
static int hf_IWbemLevel1Login_WBEMLogin_orpcthat;
static int hf_IWbemLevel1Login_WBEMLogin_orpcthis;
static int hf_IWbemLevel1Login_WBEMLogin_ppNamespace;
static int hf_IWbemLevel1Login_WBEMLogin_reserved1;
static int hf_IWbemLevel1Login_WBEMLogin_reserved2;
static int hf_IWbemLevel1Login_WBEMLogin_reserved3;
static int hf_IWbemLevel1Login_WBEMLogin_reserved4;
static int hf_IWbemLevel1Login_opnum;
static int hf_IWbemLevel1Login_werror;

static int proto_dcerpc_IWbemLevel1Login;
/* Version information */


static e_guid_t uuid_dcerpc_IWbemLevel1Login = {
	0xf309ad18, 0xd86a, 0x11d0,
	{ 0xa0, 0x75, 0x00, 0xc0, 0x4f, 0xb6, 0x88, 0x20 }
};
static uint16_t ver_dcerpc_IWbemLevel1Login = 0;

static unsigned IWbemLevel1Login_dissect_element_IWbemServices_count(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_);
static unsigned IWbemLevel1Login_dissect_element_IWbemServices_services(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_);
static unsigned IWbemLevel1Login_dissect_element_EstablishPosition_orpcthis(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_);
static unsigned IWbemLevel1Login_dissect_element_EstablishPosition_reserved1(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_);
static unsigned IWbemLevel1Login_dissect_element_EstablishPosition_reserved1_(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_);
static unsigned IWbemLevel1Login_dissect_element_EstablishPosition_reserved2(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_);
static unsigned IWbemLevel1Login_dissect_element_EstablishPosition_orpcthat(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_);
static unsigned IWbemLevel1Login_dissect_element_EstablishPosition_orpcthat_(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_);
static unsigned IWbemLevel1Login_dissect_element_EstablishPosition_LocaleVersion(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_);
static unsigned IWbemLevel1Login_dissect_element_EstablishPosition_LocaleVersion_(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_);
static unsigned IWbemLevel1Login_dissect_element_RequestChallenge_orpcthis(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_);
static unsigned IWbemLevel1Login_dissect_element_RequestChallenge_reserved1(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_);
static unsigned IWbemLevel1Login_dissect_element_RequestChallenge_reserved1_(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_);
static unsigned IWbemLevel1Login_dissect_element_RequestChallenge_reserved2(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_);
static unsigned IWbemLevel1Login_dissect_element_RequestChallenge_reserved2_(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_);
static unsigned IWbemLevel1Login_dissect_element_RequestChallenge_orpcthat(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_);
static unsigned IWbemLevel1Login_dissect_element_RequestChallenge_orpcthat_(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_);
static unsigned IWbemLevel1Login_dissect_element_RequestChallenge_reserved3(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_);
static unsigned IWbemLevel1Login_dissect_element_RequestChallenge_reserved3_(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_);
static unsigned IWbemLevel1Login_dissect_element_RequestChallenge_reserved3__(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_);
static unsigned IWbemLevel1Login_dissect_element_WBEMLogin_orpcthis(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_);
static unsigned IWbemLevel1Login_dissect_element_WBEMLogin_reserved1(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_);
static unsigned IWbemLevel1Login_dissect_element_WBEMLogin_reserved1_(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_);
static unsigned IWbemLevel1Login_dissect_element_WBEMLogin_reserved2(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_);
static unsigned IWbemLevel1Login_dissect_element_WBEMLogin_reserved2_(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_);
static unsigned IWbemLevel1Login_dissect_element_WBEMLogin_reserved2__(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_);
static unsigned IWbemLevel1Login_dissect_element_WBEMLogin_reserved3(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_);
static unsigned IWbemLevel1Login_dissect_element_WBEMLogin_reserved4(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_);
static unsigned IWbemLevel1Login_dissect_element_WBEMLogin_reserved4_(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_);
static unsigned IWbemLevel1Login_dissect_element_WBEMLogin_orpcthat(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_);
static unsigned IWbemLevel1Login_dissect_element_WBEMLogin_orpcthat_(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_);
static unsigned IWbemLevel1Login_dissect_element_WBEMLogin_ppNamespace(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_);
static unsigned IWbemLevel1Login_dissect_element_WBEMLogin_ppNamespace_(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_);
static unsigned IWbemLevel1Login_dissect_element_WBEMLogin_ppNamespace__(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_);
static unsigned IWbemLevel1Login_dissect_element_NTLMLogin_orpcthis(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_);
static unsigned IWbemLevel1Login_dissect_element_NTLMLogin_wszNetworkResource(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_);
static unsigned IWbemLevel1Login_dissect_element_NTLMLogin_wszNetworkResource_(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_);
static unsigned IWbemLevel1Login_dissect_element_NTLMLogin_wszPreferredLocale(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_);
static unsigned IWbemLevel1Login_dissect_element_NTLMLogin_wszPreferredLocale_(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_);
static unsigned IWbemLevel1Login_dissect_element_NTLMLogin_lFlags(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_);
static unsigned IWbemLevel1Login_dissect_element_NTLMLogin_pCtx(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_);
static unsigned IWbemLevel1Login_dissect_element_NTLMLogin_pCtx_(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_);
static unsigned IWbemLevel1Login_dissect_element_NTLMLogin_orpcthat(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_);
static unsigned IWbemLevel1Login_dissect_element_NTLMLogin_orpcthat_(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_);
static unsigned IWbemLevel1Login_dissect_element_NTLMLogin_ppNamespace(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_);
static unsigned IWbemLevel1Login_dissect_element_NTLMLogin_ppNamespace_(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_);
static unsigned IWbemLevel1Login_dissect_element_NTLMLogin_ppNamespace__(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_);
	#include "packet-dcom.h"
/* EstablishPosition */
static unsigned
IWbemLevel1Login_dissect_element_EstablishPosition_orpcthis(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
{
	proto_item *sub_item;
	proto_tree *sub_tree;
	sub_item = proto_tree_add_item(tree, hf_IWbemLevel1Login_EstablishPosition_orpcthis, tvb, offset, 0, ENC_NA);
	sub_tree = proto_item_add_subtree(sub_item, ett_IWbemLevel1Login_EstablishPosition_orpcthis);
	offset = dissect_dcom_this(tvb, offset, pinfo, sub_tree, di, drep);
	return offset;
}
static unsigned
IWbemLevel1Login_dissect_element_EstablishPosition_orpcthat_(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
{
	proto_item *sub_item;
	proto_tree *sub_tree;
	sub_item = proto_tree_add_item(tree, hf_IWbemLevel1Login_EstablishPosition_orpcthat, tvb, offset, 0, ENC_NA);
	sub_tree = proto_item_add_subtree(sub_item, ett_IWbemLevel1Login_EstablishPosition_orpcthat);
	offset = dissect_dcom_that(tvb, offset, pinfo, sub_tree, di, drep);
	return offset;
}
/* RequestChallenge */
static unsigned
IWbemLevel1Login_dissect_element_RequestChallenge_orpcthis(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
{
	proto_item *sub_item;
	proto_tree *sub_tree;
	sub_item = proto_tree_add_item(tree, hf_IWbemLevel1Login_RequestChallenge_orpcthis, tvb, offset, 0, ENC_NA);
	sub_tree = proto_item_add_subtree(sub_item, ett_IWbemLevel1Login_RequestChallenge_orpcthis);
	offset = dissect_dcom_this(tvb, offset, pinfo, sub_tree, di, drep);
	return offset;
}
static unsigned
IWbemLevel1Login_dissect_element_RequestChallenge_orpcthat_(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
{
	proto_item *sub_item;
	proto_tree *sub_tree;
	sub_item = proto_tree_add_item(tree, hf_IWbemLevel1Login_RequestChallenge_orpcthat, tvb, offset, 0, ENC_NA);
	sub_tree = proto_item_add_subtree(sub_item, ett_IWbemLevel1Login_RequestChallenge_orpcthat);
	offset = dissect_dcom_that(tvb, offset, pinfo, sub_tree, di, drep);
	return offset;
}
/* WBEMLogin */
static unsigned
IWbemLevel1Login_dissect_element_WBEMLogin_orpcthis(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
{
	proto_item *sub_item;
	proto_tree *sub_tree;
	sub_item = proto_tree_add_item(tree, hf_IWbemLevel1Login_WBEMLogin_orpcthis, tvb, offset, 0, ENC_NA);
	sub_tree = proto_item_add_subtree(sub_item, ett_IWbemLevel1Login_WBEMLogin_orpcthis);
	offset = dissect_dcom_this(tvb, offset, pinfo, sub_tree, di, drep);
	return offset;
}
static unsigned
IWbemLevel1Login_dissect_element_WBEMLogin_orpcthat_(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
{
	proto_item *sub_item;
	proto_tree *sub_tree;
	sub_item = proto_tree_add_item(tree, hf_IWbemLevel1Login_WBEMLogin_orpcthat, tvb, offset, 0, ENC_NA);
	sub_tree = proto_item_add_subtree(sub_item, ett_IWbemLevel1Login_WBEMLogin_orpcthat);
	offset = dissect_dcom_that(tvb, offset, pinfo, sub_tree, di, drep);
	return offset;
}
/* NTLMLogin */
static unsigned
IWbemLevel1Login_dissect_element_NTLMLogin_orpcthis(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
{
	proto_item *sub_item;
	proto_tree *sub_tree;
	sub_item = proto_tree_add_item(tree, hf_IWbemLevel1Login_NTLMLogin_orpcthis, tvb, offset, 0, ENC_NA);
	sub_tree = proto_item_add_subtree(sub_item, ett_IWbemLevel1Login_NTLMLogin_orpcthis);
	offset = dissect_dcom_this(tvb, offset, pinfo, sub_tree, di, drep);
	return offset;
}
static unsigned
IWbemLevel1Login_dissect_element_NTLMLogin_orpcthat_(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
{
	proto_item *sub_item;
	proto_tree *sub_tree;
	sub_item = proto_tree_add_item(tree, hf_IWbemLevel1Login_NTLMLogin_orpcthat, tvb, offset, 0, ENC_NA);
	sub_tree = proto_item_add_subtree(sub_item, ett_IWbemLevel1Login_NTLMLogin_orpcthat);
	offset = dissect_dcom_that(tvb, offset, pinfo, sub_tree, di, drep);
	return offset;
}
static unsigned
IWbemLevel1Login_dissect_element_IWbemServices_services_(tvbuff_t *tvb, unsigned offset, unsigned length _U_, packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep _U_)
;
static unsigned
IWbemLevel1Login_dissect_element_IWbemServices_services(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
{
	offset = dissect_ndr_ucarray_block(tvb, offset, pinfo, tree, di, drep, &IWbemLevel1Login_dissect_element_IWbemServices_services_);
	return offset;
}
static unsigned
IWbemLevel1Login_dissect_element_IWbemServices_services_(tvbuff_t *tvb, unsigned offset, unsigned length _U_, packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep _U_)
{
	proto_item *sub_item;
	proto_tree *sub_tree;
	sub_item = proto_tree_add_item(tree, hf_IWbemLevel1Login_WBEMLogin_ppNamespace, tvb, offset, 0, ENC_NA);
	sub_tree = proto_item_add_subtree(sub_item, ett_IWbemLevel1Login_IWbemServices);
	offset = dissect_dcom_OBJREF(tvb, offset, pinfo, sub_tree, di, drep, hf_IWbemLevel1Login_WBEMLogin_ppNamespace, NULL);
	return offset;
}


/* IDL: struct { */
/* IDL: } */

unsigned
IWbemLevel1Login_dissect_struct_ORPCTHIS(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_, int hf_index _U_, uint32_t param _U_)
{
	proto_item *item = NULL;
	unsigned old_offset;

	old_offset = offset;

	if (parent_tree) {
		item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, ENC_NA);
	}


	proto_item_set_len(item, offset-old_offset);


	return offset;
}


/* IDL: struct { */
/* IDL: } */

unsigned
IWbemLevel1Login_dissect_struct_ORPCTHAT(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_, int hf_index _U_, uint32_t param _U_)
{
	proto_item *item = NULL;
	unsigned old_offset;

	old_offset = offset;

	if (parent_tree) {
		item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, ENC_NA);
	}


	proto_item_set_len(item, offset-old_offset);


	return offset;
}


/* IDL: struct { */
/* IDL: 	uint32 count; */
/* IDL: 	[size_is(count)] uint8 services[*]; */
/* IDL: } */

static unsigned
IWbemLevel1Login_dissect_element_IWbemServices_count(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
{
	offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, di, drep, hf_IWbemLevel1Login_IWbemServices_count, 0);

	return offset;
}

unsigned
IWbemLevel1Login_dissect_struct_IWbemServices(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_, int hf_index _U_, uint32_t param _U_)
{
	proto_item *item = NULL;
	proto_tree *tree = NULL;
	bool oldalign = di->no_align;
	unsigned old_offset;

	di->no_align = true;

	old_offset = offset;

	if (parent_tree) {
		item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, ENC_NA);
		tree = proto_item_add_subtree(item, ett_IWbemLevel1Login_IWbemServices);
	}

	offset = IWbemLevel1Login_dissect_element_IWbemServices_count(tvb, offset, pinfo, tree, di, drep);

	offset = IWbemLevel1Login_dissect_element_IWbemServices_services(tvb, offset, pinfo, tree, di, drep);


	proto_item_set_len(item, offset-old_offset);


	di->no_align = oldalign;

	return offset;
}

/* IDL: WERROR iwbemlevel1login_opnum0( */
/* IDL:  */
/* IDL: ); */

static unsigned
IWbemLevel1Login_dissect_iwbemlevel1login_opnum0_response(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
{
	uint32_t status;

	di->dcerpc_procedure_name="iwbemlevel1login_opnum0";
	offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_IWbemLevel1Login_werror, &status);

	if (status != 0)
		col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str_ext(pinfo->pool, status, &WERR_errors_ext, "Unknown DOS error 0x%08x"));

	return offset;
}

static unsigned
IWbemLevel1Login_dissect_iwbemlevel1login_opnum0_request(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
{
	di->dcerpc_procedure_name="iwbemlevel1login_opnum0";
	return offset;
}

/* IDL: WERROR iwbemlevel1login_opnum1( */
/* IDL:  */
/* IDL: ); */

static unsigned
IWbemLevel1Login_dissect_iwbemlevel1login_opnum1_response(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
{
	uint32_t status;

	di->dcerpc_procedure_name="iwbemlevel1login_opnum1";
	offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_IWbemLevel1Login_werror, &status);

	if (status != 0)
		col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str_ext(pinfo->pool, status, &WERR_errors_ext, "Unknown DOS error 0x%08x"));

	return offset;
}

static unsigned
IWbemLevel1Login_dissect_iwbemlevel1login_opnum1_request(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
{
	di->dcerpc_procedure_name="iwbemlevel1login_opnum1";
	return offset;
}

/* IDL: WERROR iwbemlevel1login_opnum2( */
/* IDL:  */
/* IDL: ); */

static unsigned
IWbemLevel1Login_dissect_iwbemlevel1login_opnum2_response(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
{
	uint32_t status;

	di->dcerpc_procedure_name="iwbemlevel1login_opnum2";
	offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_IWbemLevel1Login_werror, &status);

	if (status != 0)
		col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str_ext(pinfo->pool, status, &WERR_errors_ext, "Unknown DOS error 0x%08x"));

	return offset;
}

static unsigned
IWbemLevel1Login_dissect_iwbemlevel1login_opnum2_request(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
{
	di->dcerpc_procedure_name="iwbemlevel1login_opnum2";
	return offset;
}

static unsigned
IWbemLevel1Login_dissect_element_EstablishPosition_reserved1(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
{
	offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, IWbemLevel1Login_dissect_element_EstablishPosition_reserved1_, NDR_POINTER_UNIQUE, "Pointer to Reserved1 (uint16)",hf_IWbemLevel1Login_EstablishPosition_reserved1);

	return offset;
}

static unsigned
IWbemLevel1Login_dissect_element_EstablishPosition_reserved1_(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
{
	char *data;

	offset = dissect_ndr_cvstring(tvb, offset, pinfo, tree, di, drep, sizeof(uint16_t), hf_IWbemLevel1Login_EstablishPosition_reserved1, false, &data);
	proto_item_append_text(tree, ": %s", data);

	return offset;
}

static unsigned
IWbemLevel1Login_dissect_element_EstablishPosition_reserved2(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
{
	offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, di, drep, hf_IWbemLevel1Login_EstablishPosition_reserved2, 0);

	return offset;
}

static unsigned
IWbemLevel1Login_dissect_element_EstablishPosition_orpcthat(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
{
	offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, IWbemLevel1Login_dissect_element_EstablishPosition_orpcthat_, NDR_POINTER_REF, "Pointer to Orpcthat (ORPCTHAT)",hf_IWbemLevel1Login_EstablishPosition_orpcthat);

	return offset;
}

static unsigned
IWbemLevel1Login_dissect_element_EstablishPosition_LocaleVersion(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
{
	offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, IWbemLevel1Login_dissect_element_EstablishPosition_LocaleVersion_, NDR_POINTER_REF, "Pointer to LocaleVersion (uint32)",hf_IWbemLevel1Login_EstablishPosition_LocaleVersion);

	return offset;
}

static unsigned
IWbemLevel1Login_dissect_element_EstablishPosition_LocaleVersion_(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
{
	offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, di, drep, hf_IWbemLevel1Login_EstablishPosition_LocaleVersion, 0);

	return offset;
}

/* IDL: WERROR EstablishPosition( */
/* IDL: [in] ORPCTHIS orpcthis, */
/* IDL: [charset(UTF16)] [in] [unique(1)] uint16 *reserved1, */
/* IDL: [in] uint32 reserved2, */
/* IDL: [out] [ref] ORPCTHAT *orpcthat, */
/* IDL: [out] [ref] uint32 *LocaleVersion */
/* IDL: ); */

static unsigned
IWbemLevel1Login_dissect_EstablishPosition_response(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
{
	uint32_t status;

	di->dcerpc_procedure_name="EstablishPosition";
	offset = IWbemLevel1Login_dissect_element_EstablishPosition_orpcthat(tvb, offset, pinfo, tree, di, drep);
	offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);

	offset = IWbemLevel1Login_dissect_element_EstablishPosition_LocaleVersion(tvb, offset, pinfo, tree, di, drep);
	offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);

	offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_IWbemLevel1Login_werror, &status);

	if (status != 0)
		col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str_ext(pinfo->pool, status, &WERR_errors_ext, "Unknown DOS error 0x%08x"));

	return offset;
}

static unsigned
IWbemLevel1Login_dissect_EstablishPosition_request(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
{
	di->dcerpc_procedure_name="EstablishPosition";
	offset = IWbemLevel1Login_dissect_element_EstablishPosition_orpcthis(tvb, offset, pinfo, tree, di, drep);
	offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
	offset = IWbemLevel1Login_dissect_element_EstablishPosition_reserved1(tvb, offset, pinfo, tree, di, drep);
	offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
	offset = IWbemLevel1Login_dissect_element_EstablishPosition_reserved2(tvb, offset, pinfo, tree, di, drep);
	offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
	return offset;
}

static unsigned
IWbemLevel1Login_dissect_element_RequestChallenge_reserved1(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
{
	offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, IWbemLevel1Login_dissect_element_RequestChallenge_reserved1_, NDR_POINTER_UNIQUE, "Pointer to Reserved1 (uint16)",hf_IWbemLevel1Login_RequestChallenge_reserved1);

	return offset;
}

static unsigned
IWbemLevel1Login_dissect_element_RequestChallenge_reserved1_(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
{
	char *data;

	offset = dissect_ndr_cvstring(tvb, offset, pinfo, tree, di, drep, sizeof(uint16_t), hf_IWbemLevel1Login_RequestChallenge_reserved1, false, &data);
	proto_item_append_text(tree, ": %s", data);

	return offset;
}

static unsigned
IWbemLevel1Login_dissect_element_RequestChallenge_reserved2(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
{
	offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, IWbemLevel1Login_dissect_element_RequestChallenge_reserved2_, NDR_POINTER_UNIQUE, "Pointer to Reserved2 (uint16)",hf_IWbemLevel1Login_RequestChallenge_reserved2);

	return offset;
}

static unsigned
IWbemLevel1Login_dissect_element_RequestChallenge_reserved2_(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
{
	char *data;

	offset = dissect_ndr_cvstring(tvb, offset, pinfo, tree, di, drep, sizeof(uint16_t), hf_IWbemLevel1Login_RequestChallenge_reserved2, false, &data);
	proto_item_append_text(tree, ": %s", data);

	return offset;
}

static unsigned
IWbemLevel1Login_dissect_element_RequestChallenge_orpcthat(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
{
	offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, IWbemLevel1Login_dissect_element_RequestChallenge_orpcthat_, NDR_POINTER_REF, "Pointer to Orpcthat (ORPCTHAT)",hf_IWbemLevel1Login_RequestChallenge_orpcthat);

	return offset;
}

static unsigned
IWbemLevel1Login_dissect_element_RequestChallenge_reserved3(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
{
	offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, IWbemLevel1Login_dissect_element_RequestChallenge_reserved3_, NDR_POINTER_REF, "Pointer to Reserved3 (uint8)",hf_IWbemLevel1Login_RequestChallenge_reserved3);

	return offset;
}

static unsigned
IWbemLevel1Login_dissect_element_RequestChallenge_reserved3_(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
{
	offset = dissect_ndr_ucvarray(tvb, offset, pinfo, tree, di, drep, IWbemLevel1Login_dissect_element_RequestChallenge_reserved3__);

	return offset;
}

static unsigned
IWbemLevel1Login_dissect_element_RequestChallenge_reserved3__(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
{
	offset = PIDL_dissect_uint8(tvb, offset, pinfo, tree, di, drep, hf_IWbemLevel1Login_RequestChallenge_reserved3, 0);

	return offset;
}

/* IDL: WERROR RequestChallenge( */
/* IDL: [in] ORPCTHIS orpcthis, */
/* IDL: [charset(UTF16)] [in] [unique(1)] uint16 *reserved1, */
/* IDL: [charset(UTF16)] [in] [unique(1)] uint16 *reserved2, */
/* IDL: [out] [ref] ORPCTHAT *orpcthat, */
/* IDL: [length_is(16)] [out] [ref] [size_is(16)] uint8 *reserved3 */
/* IDL: ); */

static unsigned
IWbemLevel1Login_dissect_RequestChallenge_response(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
{
	uint32_t status;

	di->dcerpc_procedure_name="RequestChallenge";
	offset = IWbemLevel1Login_dissect_element_RequestChallenge_orpcthat(tvb, offset, pinfo, tree, di, drep);
	offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);

	offset = IWbemLevel1Login_dissect_element_RequestChallenge_reserved3(tvb, offset, pinfo, tree, di, drep);
	offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);

	offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_IWbemLevel1Login_werror, &status);

	if (status != 0)
		col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str_ext(pinfo->pool, status, &WERR_errors_ext, "Unknown DOS error 0x%08x"));

	return offset;
}

static unsigned
IWbemLevel1Login_dissect_RequestChallenge_request(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
{
	di->dcerpc_procedure_name="RequestChallenge";
	offset = IWbemLevel1Login_dissect_element_RequestChallenge_orpcthis(tvb, offset, pinfo, tree, di, drep);
	offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
	offset = IWbemLevel1Login_dissect_element_RequestChallenge_reserved1(tvb, offset, pinfo, tree, di, drep);
	offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
	offset = IWbemLevel1Login_dissect_element_RequestChallenge_reserved2(tvb, offset, pinfo, tree, di, drep);
	offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
	return offset;
}

static unsigned
IWbemLevel1Login_dissect_element_WBEMLogin_reserved1(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
{
	offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, IWbemLevel1Login_dissect_element_WBEMLogin_reserved1_, NDR_POINTER_UNIQUE, "Pointer to Reserved1 (uint16)",hf_IWbemLevel1Login_WBEMLogin_reserved1);

	return offset;
}

static unsigned
IWbemLevel1Login_dissect_element_WBEMLogin_reserved1_(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
{
	char *data;

	offset = dissect_ndr_cvstring(tvb, offset, pinfo, tree, di, drep, sizeof(uint16_t), hf_IWbemLevel1Login_WBEMLogin_reserved1, false, &data);
	proto_item_append_text(tree, ": %s", data);

	return offset;
}

static unsigned
IWbemLevel1Login_dissect_element_WBEMLogin_reserved2(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
{
	offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, IWbemLevel1Login_dissect_element_WBEMLogin_reserved2_, NDR_POINTER_UNIQUE, "Pointer to Reserved2 (uint8)",hf_IWbemLevel1Login_WBEMLogin_reserved2);

	return offset;
}

static unsigned
IWbemLevel1Login_dissect_element_WBEMLogin_reserved2_(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
{
	offset = dissect_ndr_ucvarray(tvb, offset, pinfo, tree, di, drep, IWbemLevel1Login_dissect_element_WBEMLogin_reserved2__);

	return offset;
}

static unsigned
IWbemLevel1Login_dissect_element_WBEMLogin_reserved2__(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
{
	offset = PIDL_dissect_uint8(tvb, offset, pinfo, tree, di, drep, hf_IWbemLevel1Login_WBEMLogin_reserved2, 0);

	return offset;
}

static unsigned
IWbemLevel1Login_dissect_element_WBEMLogin_reserved3(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
{
	offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, di, drep, hf_IWbemLevel1Login_WBEMLogin_reserved3, 0);

	return offset;
}

static unsigned
IWbemLevel1Login_dissect_element_WBEMLogin_reserved4(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
{
	offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, IWbemLevel1Login_dissect_element_WBEMLogin_reserved4_, NDR_POINTER_REF, "Pointer to Reserved4 (uint8)",hf_IWbemLevel1Login_WBEMLogin_reserved4);

	return offset;
}

static unsigned
IWbemLevel1Login_dissect_element_WBEMLogin_reserved4_(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
{
	offset = PIDL_dissect_uint8(tvb, offset, pinfo, tree, di, drep, hf_IWbemLevel1Login_WBEMLogin_reserved4, 0);

	return offset;
}

static unsigned
IWbemLevel1Login_dissect_element_WBEMLogin_orpcthat(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
{
	offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, IWbemLevel1Login_dissect_element_WBEMLogin_orpcthat_, NDR_POINTER_REF, "Pointer to Orpcthat (ORPCTHAT)",hf_IWbemLevel1Login_WBEMLogin_orpcthat);

	return offset;
}

static unsigned
IWbemLevel1Login_dissect_element_WBEMLogin_ppNamespace(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
{
	offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, IWbemLevel1Login_dissect_element_WBEMLogin_ppNamespace_, NDR_POINTER_REF, "Pointer to PpNamespace (IWbemServices)",hf_IWbemLevel1Login_WBEMLogin_ppNamespace);

	return offset;
}

static unsigned
IWbemLevel1Login_dissect_element_WBEMLogin_ppNamespace_(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
{
	offset = dissect_ndr_embedded_pointer(tvb, offset, pinfo, tree, di, drep, IWbemLevel1Login_dissect_element_WBEMLogin_ppNamespace__, NDR_POINTER_UNIQUE, "Pointer to PpNamespace (IWbemServices)",hf_IWbemLevel1Login_WBEMLogin_ppNamespace);

	return offset;
}

static unsigned
IWbemLevel1Login_dissect_element_WBEMLogin_ppNamespace__(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
{
	offset = IWbemLevel1Login_dissect_struct_IWbemServices(tvb,offset,pinfo,tree,di,drep,hf_IWbemLevel1Login_WBEMLogin_ppNamespace,0);

	return offset;
}

/* IDL: WERROR WBEMLogin( */
/* IDL: [in] ORPCTHIS orpcthis, */
/* IDL: [charset(UTF16)] [in] [unique(1)] uint16 *reserved1, */
/* IDL: [in] [length_is(16)] [size_is(16)] [unique(1)] uint8 *reserved2, */
/* IDL: [in] int32 reserved3, */
/* IDL: [in] [ref] uint8 *reserved4, */
/* IDL: [out] [ref] ORPCTHAT *orpcthat, */
/* IDL: [out] [ref] IWbemServices **ppNamespace */
/* IDL: ); */

static unsigned
IWbemLevel1Login_dissect_WBEMLogin_response(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
{
	uint32_t status;

	di->dcerpc_procedure_name="WBEMLogin";
	offset = IWbemLevel1Login_dissect_element_WBEMLogin_orpcthat(tvb, offset, pinfo, tree, di, drep);
	offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);

	offset = IWbemLevel1Login_dissect_element_WBEMLogin_ppNamespace(tvb, offset, pinfo, tree, di, drep);
	offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);

	offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_IWbemLevel1Login_werror, &status);

	if (status != 0)
		col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str_ext(pinfo->pool, status, &WERR_errors_ext, "Unknown DOS error 0x%08x"));

	return offset;
}

static unsigned
IWbemLevel1Login_dissect_WBEMLogin_request(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
{
	di->dcerpc_procedure_name="WBEMLogin";
	offset = IWbemLevel1Login_dissect_element_WBEMLogin_orpcthis(tvb, offset, pinfo, tree, di, drep);
	offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
	offset = IWbemLevel1Login_dissect_element_WBEMLogin_reserved1(tvb, offset, pinfo, tree, di, drep);
	offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
	offset = IWbemLevel1Login_dissect_element_WBEMLogin_reserved2(tvb, offset, pinfo, tree, di, drep);
	offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
	offset = IWbemLevel1Login_dissect_element_WBEMLogin_reserved3(tvb, offset, pinfo, tree, di, drep);
	offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
	offset = IWbemLevel1Login_dissect_element_WBEMLogin_reserved4(tvb, offset, pinfo, tree, di, drep);
	offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
	return offset;
}

static unsigned
IWbemLevel1Login_dissect_element_NTLMLogin_wszNetworkResource(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
{
	offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, IWbemLevel1Login_dissect_element_NTLMLogin_wszNetworkResource_, NDR_POINTER_UNIQUE, "Pointer to WszNetworkResource (uint16)",hf_IWbemLevel1Login_NTLMLogin_wszNetworkResource);

	return offset;
}

static unsigned
IWbemLevel1Login_dissect_element_NTLMLogin_wszNetworkResource_(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
{
	char *data;

	offset = dissect_ndr_cvstring(tvb, offset, pinfo, tree, di, drep, sizeof(uint16_t), hf_IWbemLevel1Login_NTLMLogin_wszNetworkResource, false, &data);
	proto_item_append_text(tree, ": %s", data);

	return offset;
}

static unsigned
IWbemLevel1Login_dissect_element_NTLMLogin_wszPreferredLocale(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
{
	offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, IWbemLevel1Login_dissect_element_NTLMLogin_wszPreferredLocale_, NDR_POINTER_UNIQUE, "Pointer to WszPreferredLocale (uint16)",hf_IWbemLevel1Login_NTLMLogin_wszPreferredLocale);

	return offset;
}

static unsigned
IWbemLevel1Login_dissect_element_NTLMLogin_wszPreferredLocale_(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
{
	char *data;

	offset = dissect_ndr_cvstring(tvb, offset, pinfo, tree, di, drep, sizeof(uint16_t), hf_IWbemLevel1Login_NTLMLogin_wszPreferredLocale, false, &data);
	proto_item_append_text(tree, ": %s", data);

	return offset;
}

static unsigned
IWbemLevel1Login_dissect_element_NTLMLogin_lFlags(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
{
	offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, di, drep, hf_IWbemLevel1Login_NTLMLogin_lFlags, 0);

	return offset;
}

static unsigned
IWbemLevel1Login_dissect_element_NTLMLogin_pCtx(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
{
	offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, IWbemLevel1Login_dissect_element_NTLMLogin_pCtx_, NDR_POINTER_UNIQUE, "Pointer to PCtx (uint8)",hf_IWbemLevel1Login_NTLMLogin_pCtx);

	return offset;
}

static unsigned
IWbemLevel1Login_dissect_element_NTLMLogin_pCtx_(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
{
	offset = PIDL_dissect_uint8(tvb, offset, pinfo, tree, di, drep, hf_IWbemLevel1Login_NTLMLogin_pCtx, 0);

	return offset;
}

static unsigned
IWbemLevel1Login_dissect_element_NTLMLogin_orpcthat(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
{
	offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, IWbemLevel1Login_dissect_element_NTLMLogin_orpcthat_, NDR_POINTER_REF, "Pointer to Orpcthat (ORPCTHAT)",hf_IWbemLevel1Login_NTLMLogin_orpcthat);

	return offset;
}

static unsigned
IWbemLevel1Login_dissect_element_NTLMLogin_ppNamespace(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
{
	offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, IWbemLevel1Login_dissect_element_NTLMLogin_ppNamespace_, NDR_POINTER_REF, "Pointer to PpNamespace (IWbemServices)",hf_IWbemLevel1Login_NTLMLogin_ppNamespace);

	return offset;
}

static unsigned
IWbemLevel1Login_dissect_element_NTLMLogin_ppNamespace_(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
{
	offset = dissect_ndr_embedded_pointer(tvb, offset, pinfo, tree, di, drep, IWbemLevel1Login_dissect_element_NTLMLogin_ppNamespace__, NDR_POINTER_UNIQUE, "Pointer to PpNamespace (IWbemServices)",hf_IWbemLevel1Login_NTLMLogin_ppNamespace);

	return offset;
}

static unsigned
IWbemLevel1Login_dissect_element_NTLMLogin_ppNamespace__(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
{
	offset = IWbemLevel1Login_dissect_struct_IWbemServices(tvb,offset,pinfo,tree,di,drep,hf_IWbemLevel1Login_NTLMLogin_ppNamespace,0);

	return offset;
}

/* IDL: WERROR NTLMLogin( */
/* IDL: [in] ORPCTHIS orpcthis, */
/* IDL: [charset(UTF16)] [in] [unique(1)] uint16 *wszNetworkResource, */
/* IDL: [charset(UTF16)] [in] [unique(1)] uint16 *wszPreferredLocale, */
/* IDL: [in] int32 lFlags, */
/* IDL: [in] [unique(1)] uint8 *pCtx, */
/* IDL: [out] [ref] ORPCTHAT *orpcthat, */
/* IDL: [out] [ref] IWbemServices **ppNamespace */
/* IDL: ); */

static unsigned
IWbemLevel1Login_dissect_NTLMLogin_response(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
{
	uint32_t status;

	di->dcerpc_procedure_name="NTLMLogin";
	offset = IWbemLevel1Login_dissect_element_NTLMLogin_orpcthat(tvb, offset, pinfo, tree, di, drep);
	offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);

	offset = IWbemLevel1Login_dissect_element_NTLMLogin_ppNamespace(tvb, offset, pinfo, tree, di, drep);
	offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);

	offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_IWbemLevel1Login_werror, &status);

	if (status != 0)
		col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str_ext(pinfo->pool, status, &WERR_errors_ext, "Unknown DOS error 0x%08x"));

	return offset;
}

static unsigned
IWbemLevel1Login_dissect_NTLMLogin_request(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
{
	di->dcerpc_procedure_name="NTLMLogin";
	offset = IWbemLevel1Login_dissect_element_NTLMLogin_orpcthis(tvb, offset, pinfo, tree, di, drep);
	offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
	offset = IWbemLevel1Login_dissect_element_NTLMLogin_wszNetworkResource(tvb, offset, pinfo, tree, di, drep);
	offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
	offset = IWbemLevel1Login_dissect_element_NTLMLogin_wszPreferredLocale(tvb, offset, pinfo, tree, di, drep);
	offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
	offset = IWbemLevel1Login_dissect_element_NTLMLogin_lFlags(tvb, offset, pinfo, tree, di, drep);
	offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
	offset = IWbemLevel1Login_dissect_element_NTLMLogin_pCtx(tvb, offset, pinfo, tree, di, drep);
	offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
	return offset;
}


static const dcerpc_sub_dissector IWbemLevel1Login_dissectors[] = {
	{ 0, "iwbemlevel1login_opnum0",
	   IWbemLevel1Login_dissect_iwbemlevel1login_opnum0_request, IWbemLevel1Login_dissect_iwbemlevel1login_opnum0_response},
	{ 1, "iwbemlevel1login_opnum1",
	   IWbemLevel1Login_dissect_iwbemlevel1login_opnum1_request, IWbemLevel1Login_dissect_iwbemlevel1login_opnum1_response},
	{ 2, "iwbemlevel1login_opnum2",
	   IWbemLevel1Login_dissect_iwbemlevel1login_opnum2_request, IWbemLevel1Login_dissect_iwbemlevel1login_opnum2_response},
	{ 3, "EstablishPosition",
	   IWbemLevel1Login_dissect_EstablishPosition_request, IWbemLevel1Login_dissect_EstablishPosition_response},
	{ 4, "RequestChallenge",
	   IWbemLevel1Login_dissect_RequestChallenge_request, IWbemLevel1Login_dissect_RequestChallenge_response},
	{ 5, "WBEMLogin",
	   IWbemLevel1Login_dissect_WBEMLogin_request, IWbemLevel1Login_dissect_WBEMLogin_response},
	{ 6, "NTLMLogin",
	   IWbemLevel1Login_dissect_NTLMLogin_request, IWbemLevel1Login_dissect_NTLMLogin_response},
	{ 0, NULL, NULL, NULL }
};

void proto_register_dcerpc_IWbemLevel1Login(void)
{
	static hf_register_info hf[] = {
	{ &hf_IWbemLevel1Login_EstablishPosition_LocaleVersion,
	  { "LocaleVersion", "IWbemLevel1Login.EstablishPosition.LocaleVersion", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
	{ &hf_IWbemLevel1Login_EstablishPosition_orpcthat,
	  { "Orpcthat", "IWbemLevel1Login.EstablishPosition.orpcthat", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
	{ &hf_IWbemLevel1Login_EstablishPosition_orpcthis,
	  { "Orpcthis", "IWbemLevel1Login.EstablishPosition.orpcthis", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
	{ &hf_IWbemLevel1Login_EstablishPosition_reserved1,
	  { "Reserved1", "IWbemLevel1Login.EstablishPosition.reserved1", FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }},
	{ &hf_IWbemLevel1Login_EstablishPosition_reserved2,
	  { "Reserved2", "IWbemLevel1Login.EstablishPosition.reserved2", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
	{ &hf_IWbemLevel1Login_IWbemServices_count,
	  { "Count", "IWbemLevel1Login.IWbemServices.count", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
	{ &hf_IWbemLevel1Login_IWbemServices_services,
	  { "Services", "IWbemLevel1Login.IWbemServices.services", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
	{ &hf_IWbemLevel1Login_NTLMLogin_lFlags,
	  { "LFlags", "IWbemLevel1Login.NTLMLogin.lFlags", FT_INT32, BASE_DEC, NULL, 0, NULL, HFILL }},
	{ &hf_IWbemLevel1Login_NTLMLogin_orpcthat,
	  { "Orpcthat", "IWbemLevel1Login.NTLMLogin.orpcthat", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
	{ &hf_IWbemLevel1Login_NTLMLogin_orpcthis,
	  { "Orpcthis", "IWbemLevel1Login.NTLMLogin.orpcthis", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
	{ &hf_IWbemLevel1Login_NTLMLogin_pCtx,
	  { "PCtx", "IWbemLevel1Login.NTLMLogin.pCtx", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
	{ &hf_IWbemLevel1Login_NTLMLogin_ppNamespace,
	  { "PpNamespace", "IWbemLevel1Login.NTLMLogin.ppNamespace", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
	{ &hf_IWbemLevel1Login_NTLMLogin_wszNetworkResource,
	  { "WszNetworkResource", "IWbemLevel1Login.NTLMLogin.wszNetworkResource", FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }},
	{ &hf_IWbemLevel1Login_NTLMLogin_wszPreferredLocale,
	  { "WszPreferredLocale", "IWbemLevel1Login.NTLMLogin.wszPreferredLocale", FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }},
	{ &hf_IWbemLevel1Login_RequestChallenge_orpcthat,
	  { "Orpcthat", "IWbemLevel1Login.RequestChallenge.orpcthat", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
	{ &hf_IWbemLevel1Login_RequestChallenge_orpcthis,
	  { "Orpcthis", "IWbemLevel1Login.RequestChallenge.orpcthis", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
	{ &hf_IWbemLevel1Login_RequestChallenge_reserved1,
	  { "Reserved1", "IWbemLevel1Login.RequestChallenge.reserved1", FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }},
	{ &hf_IWbemLevel1Login_RequestChallenge_reserved2,
	  { "Reserved2", "IWbemLevel1Login.RequestChallenge.reserved2", FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }},
	{ &hf_IWbemLevel1Login_RequestChallenge_reserved3,
	  { "Reserved3", "IWbemLevel1Login.RequestChallenge.reserved3", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
	{ &hf_IWbemLevel1Login_WBEMLogin_orpcthat,
	  { "Orpcthat", "IWbemLevel1Login.WBEMLogin.orpcthat", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
	{ &hf_IWbemLevel1Login_WBEMLogin_orpcthis,
	  { "Orpcthis", "IWbemLevel1Login.WBEMLogin.orpcthis", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
	{ &hf_IWbemLevel1Login_WBEMLogin_ppNamespace,
	  { "PpNamespace", "IWbemLevel1Login.WBEMLogin.ppNamespace", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
	{ &hf_IWbemLevel1Login_WBEMLogin_reserved1,
	  { "Reserved1", "IWbemLevel1Login.WBEMLogin.reserved1", FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }},
	{ &hf_IWbemLevel1Login_WBEMLogin_reserved2,
	  { "Reserved2", "IWbemLevel1Login.WBEMLogin.reserved2", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
	{ &hf_IWbemLevel1Login_WBEMLogin_reserved3,
	  { "Reserved3", "IWbemLevel1Login.WBEMLogin.reserved3", FT_INT32, BASE_DEC, NULL, 0, NULL, HFILL }},
	{ &hf_IWbemLevel1Login_WBEMLogin_reserved4,
	  { "Reserved4", "IWbemLevel1Login.WBEMLogin.reserved4", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
	{ &hf_IWbemLevel1Login_opnum,
	  { "Operation", "IWbemLevel1Login.opnum", FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
	{ &hf_IWbemLevel1Login_werror,
	  { "Windows Error", "IWbemLevel1Login.werror", FT_UINT32, BASE_HEX|BASE_EXT_STRING, &WERR_errors_ext, 0, NULL, HFILL }},
	};


	static int *ett[] = {
		&ett_IWbemLevel1Login_EstablishPosition_orpcthis,
		&ett_IWbemLevel1Login_EstablishPosition_orpcthat,
		&ett_IWbemLevel1Login_RequestChallenge_orpcthis,
		&ett_IWbemLevel1Login_RequestChallenge_orpcthat,
		&ett_IWbemLevel1Login_WBEMLogin_orpcthis,
		&ett_IWbemLevel1Login_WBEMLogin_orpcthat,
		&ett_IWbemLevel1Login_NTLMLogin_orpcthis,
		&ett_IWbemLevel1Login_NTLMLogin_orpcthat,
		&ett_dcerpc_IWbemLevel1Login,
		&ett_IWbemLevel1Login_ORPCTHIS,
		&ett_IWbemLevel1Login_ORPCTHAT,
		&ett_IWbemLevel1Login_IWbemServices,
	};

	proto_dcerpc_IWbemLevel1Login = proto_register_protocol("IWBEMLEVEL1LOGIN (pidl)", "IWBEMLEVEL1LOGIN", "IWbemLevel1Login");
	proto_register_field_array(proto_dcerpc_IWbemLevel1Login, hf, array_length (hf));
	proto_register_subtree_array(ett, array_length(ett));
}

void proto_reg_handoff_dcerpc_IWbemLevel1Login(void)
{
	dcerpc_init_uuid(proto_dcerpc_IWbemLevel1Login, ett_dcerpc_IWbemLevel1Login,
		&uuid_dcerpc_IWbemLevel1Login, ver_dcerpc_IWbemLevel1Login,
		IWbemLevel1Login_dissectors, hf_IWbemLevel1Login_opnum);
}
