亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? reg_perfcount.c

?? samba-3.0.22.tar.gz 編譯smb服務(wù)器的源碼
?? C
?? 第 1 頁 / 共 3 頁
字號:
	return True;}/******************************************************************************************************************************************/static void _reg_perfcount_init_data_block(PERF_DATA_BLOCK *block, prs_struct *ps, TDB_CONTEXT *names){	wpstring temp;	time_t tm; 	memset(temp, 0, sizeof(temp));	rpcstr_push((void *)temp, "PERF", sizeof(temp), STR_TERMINATE);	memcpy(block->Signature, temp, strlen_w(temp) *2);	if(ps->bigendian_data == RPC_BIG_ENDIAN)		block->LittleEndian = 0;	else		block->LittleEndian = 1;	block->Version = 1;	block->Revision = 1;	block->TotalByteLength = 0;	block->NumObjectTypes = 0;	block->DefaultObject = -1;	block->objects = NULL;	tm = time(NULL);	make_systemtime(&(block->SystemTime), gmtime(&tm));	_reg_perfcount_init_data_block_perf(block, names);	memset(temp, 0, sizeof(temp));	rpcstr_push((void *)temp, global_myname(), sizeof(temp), STR_TERMINATE);	block->SystemNameLength = (strlen_w(temp) * 2) + 2;	block->data = TALLOC_ZERO_ARRAY(ps->mem_ctx, uint8, block->SystemNameLength + (8 - (block->SystemNameLength % 8)));	memcpy(block->data, temp, block->SystemNameLength);	block->SystemNameOffset = sizeof(PERF_DATA_BLOCK) - sizeof(block->objects) - sizeof(block->data); 	block->HeaderLength = block->SystemNameOffset + block->SystemNameLength;	/* Make sure to adjust for 64-bit alignment for when we finish writing the system name,	   so that the PERF_OBJECT_TYPE struct comes out 64-bit aligned */	block->HeaderLength += 8 - (block->HeaderLength % 8);	return;}/******************************************************************************************************************************************/static uint32 _reg_perfcount_perf_data_block_fixup(PERF_DATA_BLOCK *block, prs_struct *ps){	int obj, cnt, inst, pad, i;	PERF_OBJECT_TYPE *object;	PERF_INSTANCE_DEFINITION *instance;	PERF_COUNTER_DEFINITION *counter;	PERF_COUNTER_BLOCK *counter_data;	char *temp = NULL, *src_addr, *dst_addr;	block->TotalByteLength = 0;	object = block->objects;	for(obj = 0; obj < block->NumObjectTypes; obj++)	{		object[obj].TotalByteLength = 0;		object[obj].DefinitionLength = 0;		instance = object[obj].instances;		counter = object[obj].counters;		for(cnt = 0; cnt < object[obj].NumCounters; cnt++)		{			object[obj].TotalByteLength += counter[cnt].ByteLength;			object[obj].DefinitionLength += counter[cnt].ByteLength;		}		if(object[obj].NumInstances != PERF_NO_INSTANCES)		{			for(inst = 0; inst < object[obj].NumInstances; inst++)			{				instance = &(object[obj].instances[inst]);				object[obj].TotalByteLength += instance->ByteLength;				counter_data = &(instance->counter_data);				counter = &(object[obj].counters[object[obj].NumCounters - 1]);				counter_data->ByteLength = counter->CounterOffset + counter->CounterSize + sizeof(counter_data->ByteLength);				temp = TALLOC_REALLOC_ARRAY(ps->mem_ctx, 							    temp, 							    char, 							    counter_data->ByteLength- sizeof(counter_data->ByteLength));				memset(temp, 0, counter_data->ByteLength - sizeof(counter_data->ByteLength));				src_addr = (char *)counter_data->data;				for(i = 0; i < object[obj].NumCounters; i++)				{					counter = &(object[obj].counters[i]);					dst_addr = temp + counter->CounterOffset - sizeof(counter_data->ByteLength);					memcpy(dst_addr, src_addr, counter->CounterSize);				        src_addr += counter->CounterSize;				}				/* Make sure to be 64-bit aligned */				if((pad = (counter_data->ByteLength % 8)))				{					pad = 8 - pad;				}				counter_data->data = TALLOC_REALLOC_ARRAY(ps->mem_ctx,									 counter_data->data,									 uint8,									 counter_data->ByteLength - sizeof(counter_data->ByteLength) + pad);				memset(counter_data->data, 0, counter_data->ByteLength - sizeof(counter_data->ByteLength) + pad);				memcpy(counter_data->data, temp, counter_data->ByteLength - sizeof(counter_data->ByteLength));				counter_data->ByteLength += pad;				object[obj].TotalByteLength += counter_data->ByteLength;			}		}		else		{			/* Need to be 64-bit aligned at the end of the counter_data block, so pad counter_data to a 64-bit boundary,			   so that the next PERF_OBJECT_TYPE can start on a 64-bit alignment */			if((pad = (object[obj].counter_data.ByteLength % 8)))			{				pad = 8 - pad;				object[obj].counter_data.data = TALLOC_REALLOC_ARRAY(ps->mem_ctx, 										     object[obj].counter_data.data,										     uint8, 										     object[obj].counter_data.ByteLength + pad);				memset((void *)(object[obj].counter_data.data + object[obj].counter_data.ByteLength), 0, pad);				object[obj].counter_data.ByteLength += pad;			}			object[obj].TotalByteLength += object[obj].counter_data.ByteLength;		}		object[obj].HeaderLength = sizeof(*object) - (sizeof(counter) + sizeof(instance) + sizeof(PERF_COUNTER_BLOCK));		object[obj].TotalByteLength += object[obj].HeaderLength;		object[obj].DefinitionLength += object[obj].HeaderLength;				block->TotalByteLength += object[obj].TotalByteLength;	}	return block->TotalByteLength;}/******************************************************************************************************************************************/uint32 reg_perfcount_get_perf_data_block(uint32 base_index, 					 prs_struct *ps, 					 PERF_DATA_BLOCK *block,					 char *object_ids){	uint32 buffer_size = 0, last_counter;	const char *fname = counters_directory( NAMES_DB );	TDB_CONTEXT *names;	int retval;		names = tdb_open_log(fname, 0, TDB_DEFAULT, O_RDONLY, 0444);	if(names == NULL)	{		DEBUG(1, ("reg_perfcount_get_perf_data_block: unable to open [%s].\n", fname));		return 0;	}	_reg_perfcount_init_data_block(block, ps, names);	last_counter = reg_perfcount_get_last_counter(base_index);    	if(object_ids == NULL)	{		/* we're getting a request for "Global" here */		retval = _reg_perfcount_assemble_global(block, ps, base_index, names);	}	else	{		/* we're getting a request for a specific set of PERF_OBJECT_TYPES */		retval = _reg_perfcount_assemble_global(block, ps, base_index, names);	}	buffer_size = _reg_perfcount_perf_data_block_fixup(block, ps);	tdb_close(names);	return buffer_size + block->HeaderLength;}/******************************************************************************************************************************************/static BOOL _reg_perfcount_marshall_perf_data_block(prs_struct *ps, PERF_DATA_BLOCK block, int depth){	int i;	prs_debug(ps, depth, "", "_reg_perfcount_marshall_perf_data_block");	depth++;	if(!prs_align(ps))		return False;	for(i = 0; i < 4; i++)	{		if(!prs_uint16("Signature", ps, depth, &block.Signature[i]))			return False;	}	if(!prs_uint32("Little Endian", ps, depth, &block.LittleEndian))		return False;	if(!prs_uint32("Version", ps, depth, &block.Version))		return False;	if(!prs_uint32("Revision", ps, depth, &block.Revision))		return False;	if(!prs_uint32("TotalByteLength", ps, depth, &block.TotalByteLength))		return False;	if(!prs_uint32("HeaderLength", ps, depth, &block.HeaderLength))		return False;	if(!prs_uint32("NumObjectTypes", ps, depth, &block.NumObjectTypes))		return False;	if(!prs_uint32("DefaultObject", ps, depth, &block.DefaultObject))		return False;	if(!spoolss_io_system_time("SystemTime", ps, depth, &block.SystemTime))		return False;	if(!prs_uint32("Padding", ps, depth, &block.Padding))		return False;	if(!prs_align_uint64(ps))		return False;	if(!prs_uint64("PerfTime", ps, depth, &block.PerfTime))		return False;	if(!prs_uint64("PerfFreq", ps, depth, &block.PerfFreq))		return False;	if(!prs_uint64("PerfTime100nSec", ps, depth, &block.PerfTime100nSec))		return False;	if(!prs_uint32("SystemNameLength", ps, depth, &block.SystemNameLength))		return False;	if(!prs_uint32("SystemNameOffset", ps, depth, &block.SystemNameOffset))		return False;	/* hack to make sure we're 64-bit aligned at the end of this whole mess */	if(!prs_uint8s(False, "SystemName", ps, depth, block.data, 		       block.HeaderLength - block.SystemNameOffset)) 		return False;	return True;}/******************************************************************************************************************************************/static BOOL _reg_perfcount_marshall_perf_counters(prs_struct *ps,						  PERF_OBJECT_TYPE object,						  int depth){	int cnt;	PERF_COUNTER_DEFINITION counter;	prs_debug(ps, depth, "", "_reg_perfcount_marshall_perf_counters");	depth++;    	for(cnt = 0; cnt < object.NumCounters; cnt++)	{		counter = object.counters[cnt];		if(!prs_align(ps))			return False;		if(!prs_uint32("ByteLength", ps, depth, &counter.ByteLength))			return False;		if(!prs_uint32("CounterNameTitleIndex", ps, depth, &counter.CounterNameTitleIndex))			return False;		if(!prs_uint32("CounterNameTitlePointer", ps, depth, &counter.CounterNameTitlePointer))			return False;		if(!prs_uint32("CounterHelpTitleIndex", ps, depth, &counter.CounterHelpTitleIndex))			return False;		if(!prs_uint32("CounterHelpTitlePointer", ps, depth, &counter.CounterHelpTitlePointer))			return False;		if(!prs_uint32("DefaultScale", ps, depth, &counter.DefaultScale))			return False;		if(!prs_uint32("DetailLevel", ps, depth, &counter.DetailLevel))			return False;		if(!prs_uint32("CounterType", ps, depth, &counter.CounterType))			return False;		if(!prs_uint32("CounterSize", ps, depth, &counter.CounterSize))			return False;		if(!prs_uint32("CounterOffset", ps, depth, &counter.CounterOffset))			return False;	}	return True;}/******************************************************************************************************************************************/static BOOL _reg_perfcount_marshall_perf_counter_data(prs_struct *ps, 						      PERF_COUNTER_BLOCK counter_data, 						      int depth){	prs_debug(ps, depth, "", "_reg_perfcount_marshall_perf_counter_data");	depth++;    	if(!prs_align_uint64(ps))		return False;    	if(!prs_uint32("ByteLength", ps, depth, &counter_data.ByteLength))		return False;	if(!prs_uint8s(False, "CounterData", ps, depth, counter_data.data, counter_data.ByteLength - sizeof(uint32)))		return False;	if(!prs_align_uint64(ps))		return False;	return True;}/******************************************************************************************************************************************/static BOOL _reg_perfcount_marshall_perf_instances(prs_struct *ps,						   PERF_OBJECT_TYPE object, 						   int depth){	PERF_INSTANCE_DEFINITION instance;	int inst;	prs_debug(ps, depth, "", "_reg_perfcount_marshall_perf_instances");	depth++;	for(inst = 0; inst < object.NumInstances; inst++)	{		instance = object.instances[inst];		if(!prs_align(ps))			return False;		if(!prs_uint32("ByteLength", ps, depth, &instance.ByteLength))			return False;		if(!prs_uint32("ParentObjectTitleIndex", ps, depth, &instance.ParentObjectTitleIndex))			return False;		if(!prs_uint32("ParentObjectTitlePointer", ps, depth, &instance.ParentObjectTitlePointer))			return False;		if(!prs_uint32("UniqueID", ps, depth, &instance.UniqueID))			return False;		if(!prs_uint32("NameOffset", ps, depth, &instance.NameOffset))			return False;		if(!prs_uint32("NameLength", ps, depth, &instance.NameLength))			return False;		if(!prs_uint8s(False, "InstanceName", ps, depth, instance.data,			       instance.ByteLength - instance.NameOffset))			return False;		if(_reg_perfcount_marshall_perf_counter_data(ps, instance.counter_data, depth) == False)			return False;	}		return True;}/******************************************************************************************************************************************/static BOOL _reg_perfcount_marshall_perf_objects(prs_struct *ps, PERF_DATA_BLOCK block, int depth){	int obj;	PERF_OBJECT_TYPE object;    	prs_debug(ps, depth, "", "_reg_perfcount_marshall_perf_objects");	depth++;	for(obj = 0; obj < block.NumObjectTypes; obj++)	{		object = block.objects[obj];		if(!prs_align(ps))			return False;		if(!prs_uint32("TotalByteLength", ps, depth, &object.TotalByteLength))			return False;		if(!prs_uint32("DefinitionLength", ps, depth, &object.DefinitionLength))			return False;		if(!prs_uint32("HeaderLength", ps, depth, &object.HeaderLength))			return False;		if(!prs_uint32("ObjectNameTitleIndex", ps, depth, &object.ObjectNameTitleIndex))			return False;		if(!prs_uint32("ObjectNameTitlePointer", ps, depth, &object.ObjectNameTitlePointer))			return False;		if(!prs_uint32("ObjectHelpTitleIndex", ps, depth, &object.ObjectHelpTitleIndex))			return False;		if(!prs_uint32("ObjectHelpTitlePointer", ps, depth, &object.ObjectHelpTitlePointer))			return False;		if(!prs_uint32("DetailLevel", ps, depth, &object.DetailLevel))			return False;		if(!prs_uint32("NumCounters", ps, depth, &object.NumCounters))			return False;		if(!prs_uint32("DefaultCounter", ps, depth, &object.DefaultCounter))			return False;		if(!prs_uint32("NumInstances", ps, depth, &object.NumInstances))			return False;		if(!prs_uint32("CodePage", ps, depth, &object.CodePage))			return False;		if(!prs_align_uint64(ps))			return False;		if(!prs_uint64("PerfTime", ps, depth, &object.PerfTime))			return False;		if(!prs_uint64("PerfFreq", ps, depth, &object.PerfFreq))			return False;		/* Now do the counters */		/* If no instances, encode counter_data */		/* If instances, encode instace plus counter data for each instance */		if(_reg_perfcount_marshall_perf_counters(ps, object, depth) == False)			return False;		if(object.NumInstances == PERF_NO_INSTANCES)		{			if(_reg_perfcount_marshall_perf_counter_data(ps, object.counter_data, depth) == False)				return False;		}		else		{			if(_reg_perfcount_marshall_perf_instances(ps, object, depth) == False)				return False;		}	}	return True;}/******************************************************************************************************************************************/static BOOL _reg_perfcount_marshall_hkpd(prs_struct *ps, PERF_DATA_BLOCK block){	int depth = 0;	if(_reg_perfcount_marshall_perf_data_block(ps, block, depth) == True)	{		if(_reg_perfcount_marshall_perf_objects(ps, block, depth) == True)			return True;	}	return False;}/******************************************************************************************************************************************/WERROR reg_perfcount_get_hkpd(prs_struct *ps, uint32 max_buf_size, uint32 *outbuf_len, char *object_ids){	/*	 * For a detailed description of the layout of this structure,	 * see http://msdn.microsoft.com/library/default.asp?url=/library/en-us/perfmon/base/performance_data_format.asp	 */	PERF_DATA_BLOCK block;	uint32 buffer_size, base_index;     	buffer_size = 0;	base_index = reg_perfcount_get_base_index();	ZERO_STRUCT(block);	buffer_size = reg_perfcount_get_perf_data_block(base_index, ps, &block, object_ids);	if(buffer_size < max_buf_size)	{		*outbuf_len = buffer_size;		if(_reg_perfcount_marshall_hkpd(ps, block) == True)			return WERR_OK;		else			return WERR_NOMEM;	}	else	{		*outbuf_len = max_buf_size;		_reg_perfcount_marshall_perf_data_block(ps, block, 0);		return WERR_INSUFFICIENT_BUFFER;	}}    

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
99久久久精品| 国产色综合久久| 91一区一区三区| 久久99精品久久久久久久久久久久| 中文字幕在线不卡视频| 国产欧美精品区一区二区三区 | 国产欧美日韩亚州综合 | 日韩av中文在线观看| 亚洲欧美一区二区三区国产精品| 久久精品男人的天堂| 欧美白人最猛性xxxxx69交| 欧美日韩在线免费视频| 一本一道综合狠狠老| 成人的网站免费观看| 91麻豆高清视频| 91丝袜高跟美女视频| 91久久国产最好的精华液| 成人毛片在线观看| 成人av动漫在线| www.av精品| 91国偷自产一区二区三区观看| 99精品久久免费看蜜臀剧情介绍| 91视频www| 色婷婷综合久久久中文一区二区| 不卡一区二区中文字幕| 91在线一区二区三区| 91在线看国产| 欧美日韩不卡一区二区| 欧美日韩国产大片| 欧美精品xxxxbbbb| 日韩精品专区在线| 国产精品三级久久久久三级| 一区二区免费看| 秋霞电影网一区二区| 国产精品影视网| 91论坛在线播放| 欧美精品乱码久久久久久| 亚洲精品一区在线观看| 综合分类小说区另类春色亚洲小说欧美| 91精品国产入口在线| 26uuu精品一区二区在线观看| 日本一区二区三区电影| 亚洲va国产va欧美va观看| 久久97超碰国产精品超碰| 一本大道av伊人久久综合| 午夜精品久久久久久久99水蜜桃| 精品一区二区在线观看| 91一区在线观看| 精品国精品自拍自在线| 玉米视频成人免费看| 国产美女av一区二区三区| 91亚洲男人天堂| 久久综合久久久久88| 亚洲乱码国产乱码精品精小说 | 精东粉嫩av免费一区二区三区| 91在线观看美女| 久久先锋影音av| 毛片av中文字幕一区二区| 91在线观看下载| 久久青草国产手机看片福利盒子 | 国产精品久久三| 国模套图日韩精品一区二区| 欧美三级在线播放| 中文在线免费一区三区高中清不卡| 久久国产乱子精品免费女| 在线免费精品视频| 国产欧美一区二区在线观看| 丝袜美腿亚洲一区| 91国在线观看| 亚洲欧洲精品成人久久奇米网| 日韩电影在线观看一区| 欧美性高清videossexo| 中文字幕av一区二区三区免费看 | 国产综合色视频| 欧美日韩国产一级片| 一区二区三区高清| 91年精品国产| 综合色中文字幕| 99re热这里只有精品视频| 久久久久国产精品厨房| 国产传媒久久文化传媒| 久久久久成人黄色影片| 国产福利精品一区| 久久久久久电影| 国产成人精品亚洲午夜麻豆| 国产日韩欧美在线一区| 国产在线视频一区二区| 精品国产免费视频| 国产久卡久卡久卡久卡视频精品| 久久久久久一级片| av午夜一区麻豆| 最近日韩中文字幕| 一本久久精品一区二区 | 久久久激情视频| 国产盗摄一区二区三区| 国产精品久久午夜| 欧美亚洲高清一区二区三区不卡| 亚洲激情自拍视频| 欧美三级韩国三级日本一级| 午夜电影网亚洲视频| 欧美一级二级在线观看| 国产毛片精品视频| 亚洲欧美国产毛片在线| 欧美日韩一区国产| 韩国女主播成人在线| 国产精品久线在线观看| 欧美日韩黄色一区二区| 久久精品国产一区二区| 国产精品情趣视频| 欧美剧情片在线观看| 国产精品影音先锋| 亚洲午夜精品17c| 日韩精品资源二区在线| 91小视频在线免费看| 狠狠色综合色综合网络| 国产精品电影一区二区| 欧美一区二区播放| 91在线观看污| 国产乱码精品一区二区三区五月婷| 日韩一区中文字幕| 欧美精品一区二区三区久久久| 一本大道久久a久久精品综合| 麻豆精品在线观看| 伊人一区二区三区| 午夜精品免费在线| 久久综合久久99| 欧美体内she精高潮| www.成人网.com| 国产美女主播视频一区| 日韩高清欧美激情| 亚洲乱码国产乱码精品精可以看| 久久免费精品国产久精品久久久久| 欧美午夜寂寞影院| 91视频.com| 暴力调教一区二区三区| 国产一区二区中文字幕| 日韩专区一卡二卡| 亚洲九九爱视频| 国产精品传媒视频| 国产精品高潮呻吟| 国产欧美日韩亚州综合| 久久影视一区二区| 26uuu国产电影一区二区| 日韩一区二区三区三四区视频在线观看 | 日本美女一区二区三区视频| 亚洲黄一区二区三区| 亚洲精品乱码久久久久久黑人| 国产精品激情偷乱一区二区∴| 国产欧美精品国产国产专区 | 色先锋aa成人| 91论坛在线播放| 在线视频欧美精品| 欧美亚洲动漫精品| 欧美电影一区二区三区| 欧美高清视频一二三区| 精品理论电影在线观看| 国产片一区二区| 国产欧美日韩精品在线| 国产日韩在线不卡| 国产精品电影一区二区| 亚洲女同一区二区| 午夜天堂影视香蕉久久| 另类的小说在线视频另类成人小视频在线 | 床上的激情91.| 色哟哟一区二区在线观看| 欧美日韩在线三级| 久久久久久97三级| 综合分类小说区另类春色亚洲小说欧美| 国产精品久久久爽爽爽麻豆色哟哟| 亚洲狼人国产精品| 成人免费av资源| 精品视频在线视频| 久久久久久久综合色一本| 岛国av在线一区| 欧美视频一二三区| 久久综合久久综合久久综合| 亚洲一区二区三区四区的| 精品一区二区三区不卡| 91视频你懂的| 久久久不卡影院| 性做久久久久久免费观看| 成人午夜视频网站| 日韩免费福利电影在线观看| 136国产福利精品导航| 精彩视频一区二区| 欧美美女直播网站| 国产精品三级av| 免费成人在线观看视频| 91视频免费播放| 欧美国产97人人爽人人喊| 日韩**一区毛片| 欧美日韩国产高清一区| 亚洲精品国产a| 成人一区二区三区| 国产亚洲精品7777| 国内精品国产三级国产a久久| 这里是久久伊人| 亚洲成av人片在www色猫咪| 色婷婷精品久久二区二区蜜臀av | 欧美在线观看你懂的|