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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? testrad.c

?? Radius PNE 3.3 source code, running at more than vxworks6.x version.
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* testrad.c *//* Test file to test RADIUS authentication and accounting requests 	*//* Copyright 1984 - 2006 Wind River Systems, Inc. */#include "copyright_wrs.h"/*modification history____________________Date	Init	Comment10jan06,snd Fix for SPR 113557, In radius_send_authentication_request() and            radius_send_accounting_request(), we are calling a procedure            radius_server_get_ip_address(), to display the IP address 10jan06,snd Changed radius_MD_string() to cciHashBlock() from Network            Security libraries->CCI Routines20nov05,snd Changes for RWOS porting24oct05,snd Fix for SPR 114349, change parameters in             radius_ipv6_server_create() and changed example for            radius_find_ipv6_with_specified_parameters(), also            fixed diab errors18sep05,snd Changes for IPv6 support 04mar05,snd Fix for SPR 104025, added comments for explaining test 	    application in more detail052401	tk	Add SERVER_DESTROY_TEST flag to test server deletion.020801	tk	Add rad() and radany() functions.013101	tk	add run_auth_mservers and run_acct_mservers functions to test retransmission		multiple servers.  Add code in auth and acct request to display IP address		of server to send to.122100	md  	merged from visual source safe*//************************************************************************//*	Copyright (C) 1993 - 1999 RouterWare, Inc.   						*//*	Unpublished - rights reserved under the Copyright Laws of the		*//*	United States.  Use, duplication, or disclosure by the 				*//*	Government is subject to restrictions as set forth in 				*//*	subparagraph (c)(1)(ii) of the Rights in Technical Data and 		*//*	Computer Software clause at 252.227-7013.							*//*	RouterWare, Inc., 3961 MacArthur Suite 212 Newport Beach, CA 92660	*//************************************************************************/#if 0#define SERVER_DESTROY_TEST	/* to test server deletion */#endif#if 0#define INET6                   /* for IPv6 testing */#endif#include "testrad.h"#include "wrn/cci/cci.h"#include "netinet/in.h"#include <logLib.h>#include <sysLib.h>static int test_count = 0;/**********************************************************************************************************/void radius_send_test_authentication_request (	UINT test_request_counter, 	bool any_server,	RADIUS_SERVER_HANDLE	server_handle){	ULONG nas_address = htonl(0xC0A88602);	BYTE* bp_nas_address;	unsigned char	nas_id = 1;	BYTE* bp_nas_id = (BYTE*) (&nas_id);	RADIUS_ATTRIBUTE_LIST_HANDLE attribute_list_handle;	RADIUS_REQUEST_HANDLE request_handle;	RADIUS_REQUEST_CALLBACKS *p_callbacks;	BYTE* bp_username;	BYTE* bp_user_password = test_password;	char  *server;				/* the user password should match the password configured for the user in the			   RADIUS server */#if defined (__RADIUS_TEST_APP_USE_PAP__)	/* PAP authentication */#else		/* CHAP authentication */		int i;	int challenge[4];	/* for storing the 16 octet random challenge */	BYTE *bp_chap_challenge;							BYTE *bp_chap = (BYTE *)calloc (1, 17);	cci_t md5_result_length = 17;#endif/* #ifdef INET6 * server_handle = radius_find_ipv6_server_with_specified_parameters ("fe80::207:e9ff:fe0e:91ab%lnPci0", 1812, RADIUS_AUTHENTICATION_SERVER_TYPE); * #else * server_handle = radius_find_server_with_specified_parameters ("10.114.53.12", 1812, RADIUS_AUTHENTICATION_SERVER_TYPE); * #endif */    /* The request handle is the handle of request, you are sending now. 	 * This request handle is unique for each request and 	 * returned to the user, when either error_callback or normal_callback 	 * is invoked. This request handle is used to uniquely identify the 	 * Request for which the response has been received, in the callback	 * routine. Also, this unique Request Handle is used to save and 	 * retrieve all relevant data structures/memory  related to this 	 * request at a later point of time.	 */	/* Get a unique request handle for this request */	request_handle = radiustest_get_entry();	p_callbacks = (RADIUS_REQUEST_CALLBACKS*) malloc (sizeof (RADIUS_REQUEST_CALLBACKS));		p_callbacks->fptr_radius_normal_callback = radius_fake_response;	p_callbacks->fptr_radius_error_callback = radius_fake_error_callback;	attribute_list_handle = radius_create_attribute_list ();		bp_username = test_username_array [test_request_counter - 1];	radius_add_attribute_to_list (attribute_list_handle, RADIUS_USER_NAME, strlen ((char *)bp_username), bp_username);		radius_add_attribute_to_list (attribute_list_handle, RADIUS_NAS_IDENTIFIER, 10, (BYTE *)"vxWorksLAC");		#if defined (__RADIUS_TEST_APP_USE_PAP__)	radius_add_attribute_to_list (attribute_list_handle, RADIUS_USER_PASSWORD, strlen (bp_user_password), bp_user_password);#else /* CHAP */	srand( (unsigned)time( NULL ) );	for ( i = 0; i < 4; i ++)		{		challenge[i] = rand ();		}	bp_chap_challenge = (BYTE *) calloc (1, 1 + strlen ((char *)bp_user_password) + 16);	if (bp_chap_challenge == NULL)		{		exit (1);		}	memcpy (bp_chap_challenge, bp_nas_id, 1);	memcpy ((bp_chap_challenge + 1), bp_user_password, strlen ((char *)bp_user_password));	memcpy ((bp_chap_challenge + 1 +  strlen ((char *)bp_user_password)), (BYTE *)&challenge, 16);		radius_add_attribute_to_list (attribute_list_handle, RADIUS_CHAP_CHALLENGE, 16, (BYTE *)&challenge);		memcpy (bp_chap, bp_nas_id, 1);		cciHashBlock( CCI_DEF_PROVIDER_ID, CCI_HASH_MD5, (const cci_b*)bp_chap_challenge,(cci_t) 1 + strlen ((char *)bp_user_password) + 16, (cci_b*)bp_chap + 1, &md5_result_length);	radius_add_attribute_to_list (attribute_list_handle, RADIUS_CHAP_PASSWORD, 17, bp_chap);	free(bp_chap);	free(bp_chap_challenge);#endif	bp_nas_address = (BYTE*)(&nas_address);	radius_add_attribute_to_list (attribute_list_handle, RADIUS_NAS_IP_ADDRESS, 4, bp_nas_address);	/* Save attribute handle for this request in the radius_request[]	 * array using the unique id (request_handle)	 */	radius_request[request_handle] = attribute_list_handle;	radius_printf(RADIUS_DATA_PRINTF, "Auth: request_handle = %x\n", request_handle);	radius_printf(RADIUS_DATA_PRINTF, "Auth: attribute_handle = %x\n", attribute_list_handle);	/* display the server IP address */		server = radius_server_get_ip_address (server_handle);	radius_printf(RADIUS_DATA_PRINTF, "Sending authentication request to server %s\n", server);	free ((void *)server);	if (any_server == false)	    radius_server_request (server_handle, request_handle, p_callbacks, RADIUS_ACCESS_REQUEST, attribute_list_handle);	else	    radius_any_server_request (server_handle, request_handle, p_callbacks, RADIUS_ACCESS_REQUEST, attribute_list_handle);	/* Instructions on freeing data structures allocated to this request	 *	 * server_handle - Do not free this structure until the application	 * receives a normal/error callback response. This server_handle could	 * be reused for multiple requests and freed in the shutdown routine	 * for this test application. 	 *	 * attribute_list_handle - Do not free this until the application	 * receives a normal/error callback response. This handle could be 	 * saved for further re-use, in case there is a error callback received.	 * In case of normal callback, this attribute list handle is retrieved	 * using the request_handle returned in the normal callback response	 * and freed 	 */ 	free (p_callbacks);}		 /************************************************************************* This callback routine will be invoked by the RADIUS client, in cases* where a normal response is received for the RADIUS requests sent. This* routine returns the request_handle, to identify the request for which* the response was sent***********************************************************************/void radius_fake_response (RADIUS_REQUEST_HANDLE request_handle, enum RADIUS_CODE code, RADIUS_ATTRIBUTE_LIST_HANDLE response_attr_handle){	RADIUS_ATTRIBUTE_LIST_HANDLE	request_attr_handle;	radius_printf (RADIUS_DATA_PRINTF, "Callback Normal Case.\n");	radius_printf (RADIUS_DATA_PRINTF, "Request Handle: %d\t, RADIUS Code: %d\t, Attribute List handle: %x\n", request_handle, code, response_attr_handle);	/* The request handle is a unique id, identifying the request	 * for which response is received	 */	if ((request_attr_handle =  radiustest_get_attribute_handle(request_handle)) == (RADIUS_ATTRIBUTE_LIST_HANDLE) NULL)	{		printf("Error: Can't find request attribute list from request handle\n");	}	radiustest_free_attrib_lists (request_attr_handle, response_attr_handle);		radius_request[request_handle] = (RADIUS_ATTRIBUTE_LIST_HANDLE)NULL;		test_count++;	logMsg("Reply received count = %d\n", test_count, 0,0,0,0,0);}	/************************************************************************* Error callback routine for the RADIUS accounting and authentication* requests. This routine is invoked by the RADIUS client application* in cases where there are errors encountered*************************************************************************/void radius_fake_error_callback (RADIUS_REQUEST_HANDLE request_handle, enum RADIUS_ERROR_CALLBACK_CODE error_code){	RADIUS_ATTRIBUTE_LIST_HANDLE	request_attr_handle;	printf ("Callback Error Case.\n");	printf ("Request Handle: %d\t, Error Code: %d\n", request_handle, error_code);	/* The request handle is a unique id, identifying the request	 * for which response is received	 */	if ((request_attr_handle = radiustest_get_attribute_handle(request_handle)) == (RADIUS_ATTRIBUTE_LIST_HANDLE)NULL)	{		printf("Error: Can't find request attribute list from request handle\n");	}	radiustest_free_attrib_lists ((RADIUS_ATTRIBUTE_LIST_HANDLE)request_attr_handle, (RADIUS_ATTRIBUTE_LIST_HANDLE)NULL);	/* Free index in radius_request[] array */		radius_request[request_handle] = (RADIUS_ATTRIBUTE_LIST_HANDLE)NULL;		test_count++;	logMsg("Error reply received count!!!! = %d\n", test_count, 0,0,0,0,0);}	/************************************************************************** This following routine sends an accounting request to the RADIUS server.*************************************************************************/  /************************************************************************* *  Additional accounting request types can be specified here.  *  Note when the ACCT_DELAY_TIME type is set, the RADIUS client will treat *  this as a special case in that it will update the packet identifier *  and create a new authenticator for each retransmitted packet (RFC 2139).*  For other requests, the Client will assign the same identifier and *  authenticator to the retransmitted packets as the original request packet.  *************************************************************************//* comment out the accounting request types you don't want to test */#define	ACCT_DELAY_TIME bool radius_send_test_accounting_request (	enum RADIUS_ACCOUNTING_STATUS_TYPES type, 	UINT test_request_counter, 	bool any_server,	RADIUS_SERVER_HANDLE	server_handle){	RADIUS_ATTRIBUTE_LIST_HANDLE attribute_list_handle;	RADIUS_REQUEST_HANDLE request_handle;	RADIUS_REQUEST_CALLBACKS *p_callbacks;	BYTE bp_session_id[16];	BYTE* bp_username;	char  *server;	ULONG value;/* #ifdef INET6 * server_handle = radius_find_ipv6_server_with_specified_parameters ("fe80::207:e9ff:fe0e:91ab%lnPci0", 1813, RADIUS_ACCOUNTING_SERVER_TYPE); * #else * server_handle = radius_find_server_with_specified_parameters ("10.114.53.12", 1813, RADIUS_ACCOUNTING_SERVER_TYPE); * #endif */		sprintf ((char *)bp_session_id, "S-%d", test_request_counter);        /* The request handle is the handle of request, you are sending now. 	 * This request handle is unique for each request and 	 * returned to the user, when either error_callback or normal_callback 	 * is invoked. This request handle is used to uniquely identify the 	 * Request for which the response has been received, in the callback	 * routine. Also, this unique Request Handle is used to save and 	 * retrieve all relevant data structures/memory  related to this 	 * request at a later point of time.	 */	/* Get a unique request handle for this request */	request_handle = radiustest_get_entry();	attribute_list_handle = radius_create_attribute_list ();	p_callbacks = (RADIUS_REQUEST_CALLBACKS*) malloc (sizeof (RADIUS_REQUEST_CALLBACKS));		p_callbacks->fptr_radius_normal_callback = radius_fake_response;	p_callbacks->fptr_radius_error_callback = radius_fake_error_callback;		bp_username = test_username_array [test_request_counter - 1];	radius_add_attribute_to_list (attribute_list_handle, RADIUS_USER_NAME, strlen ((char *)bp_username), bp_username);	if (type == RADIUS_ACCOUNTING_START)		{		radius_util_serialize_ulong ((ULONG) RADIUS_ACCOUNTING_START, (BYTE*)&value);		radius_add_attribute_to_list (attribute_list_handle, RADIUS_ACCT_STATUS_TYPE, 4,  (BYTE*) &value);#ifdef	ACCT_DELAY_TIME		radius_util_serialize_ulong (0, (BYTE*)&value);		radius_add_attribute_to_list (attribute_list_handle, RADIUS_ACCT_DELAY_TIME, 4,  (BYTE*) &value);#endif		radius_add_attribute_to_list (attribute_list_handle, RADIUS_ACCT_SESSION_ID, 10, bp_session_id);		radius_util_serialize_ulong (0xCC1FBA62, (BYTE*)&value);		radius_add_attribute_to_list (attribute_list_handle, RADIUS_NAS_IP_ADDRESS, 4, (BYTE*) &value);		}	else /* RADIUS_ACCOUNTING_STOP */		{		radius_util_serialize_ulong ((ULONG) RADIUS_ACCOUNTING_STOP, (BYTE*)&value);		radius_add_attribute_to_list (attribute_list_handle, RADIUS_ACCT_STATUS_TYPE, 4, (BYTE*) &value);		radius_add_attribute_to_list (attribute_list_handle, RADIUS_ACCT_SESSION_ID, 10, bp_session_id);				radius_util_serialize_ulong (232, (BYTE*)&value);		radius_add_attribute_to_list (attribute_list_handle, RADIUS_ACCT_INPUT_OCTETS, 4, (BYTE*) &value);				radius_util_serialize_ulong ((ULONG) RADIUS_ACCOUNTING_TERMINATION_USER_REQUEST, (BYTE*)&value);		radius_add_attribute_to_list (attribute_list_handle, RADIUS_ACCT_TERMINATE_CAUSE, 4, (BYTE*) &value);		radius_util_serialize_ulong ((ULONG) 0xCC1FBA62,(BYTE*) &value);		radius_add_attribute_to_list (attribute_list_handle, RADIUS_NAS_IP_ADDRESS, 4, (BYTE*) &value);		}	/* Save attribute handle for this request in the radius_request[]	 * array using the unique id (request_handle)	 */	radius_request[request_handle] = attribute_list_handle;	radius_printf(RADIUS_DATA_PRINTF, "Acct: request_handle = %x\n", request_handle);	radius_printf(RADIUS_DATA_PRINTF, "Acct: attribute_handle = %x\n", attribute_list_handle);	/* display the server IP address */		server = radius_server_get_ip_address (server_handle);	radius_printf(RADIUS_DATA_PRINTF, "Sending accounting request to server %s\n", server);	free ((void *)server);			if (any_server == false)	    radius_server_request (server_handle, request_handle, p_callbacks, RADIUS_ACCOUNTING_REQUEST, attribute_list_handle);	else	    radius_any_server_request (server_handle, request_handle, p_callbacks, RADIUS_ACCOUNTING_REQUEST, attribute_list_handle);	/* Instructions on freeing data structures allocated to this request	 *	 * server_handle - Do not free this structure until the application	 * receives a normal/error callback response. This server_handle could	 * be reused for multiple requests and freed in the shutdown routine	 * for this test application. 	 *	 * attribute_list_handle - Do not free this until the application	 * receives a normal/error callback response. This handle could be 	 * saved for further re-use, in case there is a error callback received.	 * In case of normal callback, this attribute list handle is retrieved	 * using the request_handle returned in the normal callback response	 * and freed 	 */ 	free(p_callbacks);	return (true);}/************************************************************************* Routine to initialize radius test. The radius_request[] array is used* to store attribute list handles for each RADIUS request. * This routine initializes all the elements of the radius_request array to * NULL.************************************************************************/void radiustest_initialize(){	int	i=0;	while (i < RADIUS_MAX_REQUESTS)		{		radius_request[i++] = (RADIUS_ATTRIBUTE_LIST_HANDLE)NULL;		}}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人永久aaa| 久久精品国产亚洲一区二区三区| 欧美高清hd18日本| 欧洲av一区二区嗯嗯嗯啊| 成人sese在线| 99国产精品久久久久| 高清不卡一二三区| gogogo免费视频观看亚洲一| 国产不卡在线一区| 99视频在线观看一区三区| 一本久久a久久精品亚洲| 91色综合久久久久婷婷| 在线精品亚洲一区二区不卡| 欧美亚洲另类激情小说| 5566中文字幕一区二区电影| 91麻豆精品国产自产在线| 欧美电视剧免费全集观看| 精品99一区二区| 国产精品色呦呦| 一区二区三区四区在线免费观看| 亚洲精品一二三| 午夜精品福利一区二区三区av| 日本伊人精品一区二区三区观看方式| 免费在线观看日韩欧美| 国产精品一区二区久久不卡| 成人蜜臀av电影| 欧美日韩亚洲综合在线 欧美亚洲特黄一级| 欧亚洲嫩模精品一区三区| 日韩区在线观看| 国产精品国产三级国产有无不卡| 亚洲乱码一区二区三区在线观看| 亚洲va欧美va天堂v国产综合| 日本一区中文字幕| eeuss鲁一区二区三区| 欧美日韩高清一区二区三区| 精品国产网站在线观看| 中文字幕一区二区三区视频| 视频在线观看91| 成人午夜碰碰视频| 欧美一区二区福利视频| 自拍偷自拍亚洲精品播放| 青青草伊人久久| 91日韩在线专区| 久久免费看少妇高潮| 亚洲精品老司机| 国产福利一区二区| 制服丝袜成人动漫| 亚洲精品免费看| 国产宾馆实践打屁股91| 日韩欧美国产一区二区三区| 日韩毛片视频在线看| 国产精品一级黄| 欧美日韩免费不卡视频一区二区三区| 日本一区二区成人在线| 蜜臀av性久久久久av蜜臀妖精| 91浏览器打开| 国产精品久久免费看| 国产一区二区三区黄视频| 91精品国产乱码久久蜜臀| 一区二区在线电影| av资源网一区| 国产精品美女视频| 粉嫩蜜臀av国产精品网站| 欧美变态tickling挠脚心| 国产精品综合一区二区三区| 欧美日韩国产一二三| 亚洲黄色免费网站| 91美女蜜桃在线| 中文字幕日韩精品一区| 成人精品免费视频| 欧美激情中文字幕一区二区| 国产一区二区按摩在线观看| 精品福利一二区| 久久99精品久久久久久国产越南| 欧美人体做爰大胆视频| 亚洲成人在线网站| 欧美裸体bbwbbwbbw| 午夜日韩在线观看| 这里只有精品免费| 久久精工是国产品牌吗| 欧美一区欧美二区| 蜜桃视频第一区免费观看| 日韩一级视频免费观看在线| 美国毛片一区二区| 精品国产人成亚洲区| 国产一区二区视频在线播放| 久久久久久久久蜜桃| 国产精品99久久久久久久vr| 中文字幕欧美日本乱码一线二线| 国产不卡视频在线观看| 亚洲男人电影天堂| 欧美色综合网站| 日本伊人色综合网| 国产亚洲综合av| www.欧美日韩国产在线| 亚洲一区二区三区四区不卡 | 91精品黄色片免费大全| 美腿丝袜一区二区三区| 久久天天做天天爱综合色| 成人永久免费视频| 亚洲国产视频在线| 欧美成人精品福利| 99视频精品免费视频| 天使萌一区二区三区免费观看| 日韩欧美激情一区| 99久久婷婷国产精品综合| 天堂资源在线中文精品| 久久女同性恋中文字幕| 日本韩国欧美一区二区三区| 日韩电影在线观看电影| 亚洲一区二区偷拍精品| 欧美一区二区三区公司| 懂色av噜噜一区二区三区av| 亚洲激情一二三区| 久久香蕉国产线看观看99| 91麻豆国产精品久久| 免费观看在线色综合| 亚洲精品乱码久久久久| 精品成人佐山爱一区二区| 在线视频欧美精品| 国产在线视频一区二区三区| 尤物视频一区二区| 欧美极品少妇xxxxⅹ高跟鞋| 欧美日韩aaaaa| jlzzjlzz亚洲日本少妇| 国产一区二区在线免费观看| 亚洲最大成人综合| 国产精品久久久久三级| 精品动漫一区二区三区在线观看| 欧美伊人久久久久久午夜久久久久| 国产主播一区二区三区| 日韩成人精品在线| 亚洲一卡二卡三卡四卡无卡久久| 国产精品天天看| 337p日本欧洲亚洲大胆精品| 正在播放亚洲一区| 欧美日韩一级视频| 欧美性生活大片视频| 97久久超碰国产精品电影| 国产精品性做久久久久久| 蜜臀久久99精品久久久画质超高清 | 91影院在线免费观看| 国产在线视视频有精品| 麻豆精品视频在线观看免费| 亚洲电影第三页| 亚洲国产毛片aaaaa无费看| 亚洲人成网站在线| 国产精品欧美一级免费| 欧美国产一区二区在线观看| 日韩免费观看高清完整版| 在线播放91灌醉迷j高跟美女| 91极品视觉盛宴| 欧美午夜精品久久久久久孕妇| aaa欧美日韩| 99精品视频在线播放观看| 不卡大黄网站免费看| 99久久99久久综合| 91污在线观看| 在线欧美日韩精品| 欧美日韩一区高清| 91精品国产综合久久久久| 制服丝袜亚洲网站| 精品99一区二区| 欧美国产日韩在线观看| 亚洲欧洲另类国产综合| 中文字幕日韩一区二区| 亚洲老司机在线| 亚欧色一区w666天堂| 午夜国产不卡在线观看视频| 日韩有码一区二区三区| 久久国产福利国产秒拍| 国产美女久久久久| 一本大道久久a久久精品综合| 日本黄色一区二区| 日韩一区二区在线免费观看| 精品国产乱码久久久久久影片| 国产亚洲综合在线| 亚洲精品视频免费观看| 五月综合激情婷婷六月色窝| 蜜臀久久久久久久| 成人永久aaa| 欧美日韩国产高清一区二区| 2欧美一区二区三区在线观看视频 337p粉嫩大胆噜噜噜噜噜91av | 中文字幕亚洲一区二区av在线| 亚洲精品亚洲人成人网| 日本中文字幕一区二区有限公司| 国产一区二区主播在线| 91网站视频在线观看| 日韩欧美一二三区| 亚洲蜜臀av乱码久久精品| 奇米影视一区二区三区小说| 大胆亚洲人体视频| 欧美一区二区三区性视频| 国产精品美女久久久久aⅴ国产馆| 亚洲成av人片在线| 成人免费毛片片v| 777午夜精品免费视频| 中文字幕不卡在线| 麻豆精品一区二区三区| 在线观看不卡视频|