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

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

?? mpframinglayer.c

?? 這是全套的PPP協議的源碼
?? C
?? 第 1 頁 / 共 3 頁
字號:
/* mpFramingLayer.c - MP Framing Layer source file *//* Copyright 1999 Wind River Systems, Inc. */#include "copyright_wrs.h"/*modification history--------------------01m,03mar03,ijm in mpFramingLayerReceive, free packet if pfwReceive                returns ERROR, SPR# 8614801l,30jan03,ijm fix for SPR# 86001, cannot re-establish bundle if peer                does not end connection gracefully01k,28jan03,ijm removed redundant netMblkClChainFree in mpFraminglayerSend 01j,26oct02,ijm subscribed to PPP_LINK_RESET_EVENT instead of MP_LINK_DOWN01i,06aug02,jr  fixed build warnings 01h,18apr02,ak  replaced LCP_DOWN event with MP_LINK_DOWN event01g,23feb02,jr  setting the pointers to NULL after freeing01f,19feb01,ak  input parameter validation in all the functions01e,19dec01,ak	support for dynamic assignment of Member Stack to Manager Stack	01d,17oct01,ak  deleting component semaphore in mpFramingLayerDelete()01c,19sep01,ak	fixed bug in deleting the MpSendQTask and MpReceiveQTask01b,23mar01,sd	added profile handler function for mpFramingLayer_localUsername01a,20feb01,sd	created*//*DESCRIPTIONThis module implements the MP_FRAMING_LAYER component. It implements the standard plug-in object functions in accordance with theWindNet PPP architecture.This component implements Multilink Point to Point protocol. It is implemented as an operational layer, but with no components in it.It is placed as the upper most layer in the framing plane and this layer is included only in Manager Stack. It implements packetType () function for de-multiplexing control and data packets. This pluginObj does not have any profile parameters.It subscribes for LCP_UP / PPP_LINK_RESET and PPP_AUTH_SUCCESSFUL / PPP_AUTH_UNSUCCESSFUL events. It raises MEMBER_LINK_ADDED and MEMBER_LINK_REMOVED events.INCLUDES: mp.h mpFramingLayerP.h mpFramingLayer.h*//* includes */#include "taskLib.h"#include "netBufLib.h"#include "ppp/mp.h"#include "private/ppp/mpFramingLayerP.h"#include "ppp/pppFramingLayer.h"#include "string.h"#include "ppp/kppp.h"#include "ppp/mpAPI.h"#include "stdio.h"/* typedefs */typedef struct mpFramingLayerParams	{	char * name;	PFW_PARAMETER_HANDLER handler;	} MP_FRAMING_LAYER_PARAMS;/* externs */IMPORT STATUS mpSendQueueCreate (MP_FRAMING_LAYER	*, unsigned int);IMPORT STATUS mpReceiveQueueCreate (MP_FRAMING_LAYER *, unsigned int);IMPORT void mpSendQueueDelete (MP_FRAMING_LAYER	*);IMPORT void mpReceiveQueueDelete (MP_FRAMING_LAYER	*);IMPORT void mpSendTask (MP_FRAMING_LAYER *);IMPORT void mpReceiveTask (MP_FRAMING_LAYER *);IMPORT void reassemble_and_dispatch_mp_packet (PFW_PLUGIN_OBJ_STATE	*,							 PFW_STACK_OBJ *, M_BLK_ID );	IMPORT STATUS mp_send_ppp_packet (PFW_PLUGIN_OBJ_STATE *, M_BLK_ID ,							 PFW_PACKET_TYPE);IMPORT	STATUS mpLinkAssign (PFW_STACK_OBJ *, PFW_STACK_OBJ	*);IMPORT PFW_STACK_OBJ * mp_open_bundle_or_add_to_the_existing_bundle 	(PFW_PLUGIN_OBJ_STATE *, MP_UPCALL_FUNCTIONS *, void *); IMPORT STATUS mp_remove_port_from_bundle (PFW_PLUGIN_OBJ_STATE	*,							 PFW_STACK_OBJ *);IMPORT SL_LIST * mpBAPLinkInfoListGet (PFW_PLUGIN_OBJ_STATE *);/* locals and forwards */LOCAL STATUS mpFramingLayerReceive (PFW_PLUGIN_OBJ_STATE 	*, PFW_STACK_OBJ *,						 	M_BLK_ID );/* layer component interface  */LOCAL STATUS mpFramingLayerProfileDataConstruct (PFW_OBJ *, void * pProfileData);LOCAL STATUS mpFramingLayerStackAdd (PFW_PLUGIN_OBJ_STATE *, 							PFW_PLUGIN_OBJ_CALLBACKS *);LOCAL STATUS mpFramingLayerStackDelete (PFW_PLUGIN_OBJ_STATE *);LOCAL STATUS mpFramingLayerSend (PFW_PLUGIN_OBJ_STATE *, M_BLK_ID *);LOCAL STATUS mpFramingLayerStackDataConstruct (PFW_OBJ *, void * stackData,						    void * profileData);LOCAL STATUS mpFramingLayerInterfaceBind (PFW_PLUGIN_OBJ * pluginObj);LOCAL PFW_PACKET_TYPE mpFramingLayerPacketType (void *);/* parameter handlers */LOCAL STATUS mpFraming_smallPacketLength (PFW_OBJ *, PFW_PARAMETER_OPERATION_TYPE,						void *, char *);LOCAL STATUS mpFraming_localUserName (PFW_OBJ *, PFW_PARAMETER_OPERATION_TYPE,						void *, char *);LOCAL STATUS mpFraming_disableAuthOnBundle (PFW_OBJ *,					PFW_PARAMETER_OPERATION_TYPE, void *, char *);LOCAL MP_FRAMING_LAYER_PARAMS mpFramingLayerParams[] =    {	{"mpFraming_smallPacketLength", mpFraming_smallPacketLength},	{"mpFraming_localUserName", mpFraming_localUserName},	{"mpFraming_disableAuthOnBundle", mpFraming_disableAuthOnBundle},    }; LOCAL int numMpFramingLayerParams = NELEMENTS (mpFramingLayerParams);/* event handlers */LOCAL STATUS mpFramingLayerLcpUpEventHandler (PFW_PLUGIN_OBJ_STATE *, void *);LOCAL STATUS mpFramingLayerMpLinkDownEventHandler (PFW_PLUGIN_OBJ_STATE *, void *);#if 0 /* not supported in this release */LOCAL STATUS mpFramingLayerLcpEchoReplyReceivedEventHandler 										(PFW_PLUGIN_OBJ_STATE *, void *);#endif/******************************************************************************** mpFramingLayerCreate - create MP_FRAMING_LAYER component* * This routine creates the MP_FRAMING_LAYER. It initializes the PFW_PLUGIN_OBJ * data structure representing the MP_FRAMING_LAYER component. It registers the * component with the framework. It adds the plugin object specific configuration* parameters and adds the component to the framework. It creates send and * receive queues, if the queue depths are valid and also publishes the events* MP_MEMBER_ADDED and MP_MEMBER_DROPPED. ** RETURNS: OK/ERROR*/STATUS mpFramingLayerCreate	(	PFW_OBJ * pfw,					/* framework reference */	UINT	  mpSendQueueDepth,		/* depth of send queue */	UINT	  mpReceiveQueueDepth,	/* depth of receive queue */	UINT 	  mpSendTaskPriority,	/* priority of send task */	UINT 	  mpReceiveTaskPriority	/* priority of receive task */	)	{	MP_FRAMING_LAYER	*pMpFramingLayer = NULL;	PFW_LAYER_OBJ		*pLayerObj = NULL;	UINT				loopCount = 0; 	if (pfw == NULL)		{		pfwPrintError (__FILE__, "mpFramingLayerCreate", __LINE__, 0, 0, \					   "NULL Framework reference");		return ERROR;		}	/* allocate memory for the MP Framing layer object */		if ((pMpFramingLayer = pfwMalloc (pfw, sizeof (MP_FRAMING_LAYER))) == NULL)		{		pfwPrintError (__FILE__, "mpFramingLayerInit", __LINE__, pfw, 0, \				"Unable to allocate memory");		return (ERROR);		}	bzero ((void*) pMpFramingLayer, sizeof(MP_FRAMING_LAYER));	/* initialize the MP Framing Layer Plugin Object functions */	pLayerObj = &pMpFramingLayer->layer;	strcpy (pLayerObj->pluginObj.name, "MP_FRAMING_LAYER");	pLayerObj->pluginObj.profileDataSize = 								sizeof (MP_FRAMING_LAYER_PROFILE_DATA);	pLayerObj->pluginObj.stackDataSize = sizeof (MP_FRAMING_LAYER_STACK_DATA);	pLayerObj->pluginObj.profileDataConstruct = 										mpFramingLayerProfileDataConstruct;		pLayerObj->pluginObj.profileDataCopy = NULL;	pLayerObj->pluginObj.profileDataDestruct = NULL;		pLayerObj->pluginObj.stackDataConstruct = mpFramingLayerStackDataConstruct;		pLayerObj->pluginObj.stackDataDestruct = NULL;		pLayerObj->pluginObj.stackAdd = mpFramingLayerStackAdd;	pLayerObj->pluginObj.stackDelete = mpFramingLayerStackDelete;	pLayerObj->pluginObj.stackDataShow = NULL;		pLayerObj->pluginObj.send = mpFramingLayerSend;	pLayerObj->pluginObj.receive = NULL;	pLayerObj->pluginObj.interfaceBind = mpFramingLayerInterfaceBind;	pLayerObj->pluginObj.pfwObj = pfw;	/* initialize the MP Framing layer, layer obj members */	pLayerObj->planeId = FRAMING_PLANE;	pLayerObj->position = 3;	pLayerObj->type = OPERATIONAL_LAYER;	pLayerObj->packetType = mpFramingLayerPacketType;	pLayerObj->componentAdd = NULL;	pLayerObj->componentDelete = NULL;						pLayerObj->addDynamicComponentToStack = NULL;			pLayerObj->deleteDynamicComponentFromStack = NULL;		/* add the MP Framing Layer to the Framework */	if (pfwLayerAdd ( pLayerObj) == ERROR)		{		pfwPrintError (__FILE__, "mpFramingLayerCreate", __LINE__, pfw,0, \					  "MP framing layer could not be added to the stack");		return (ERROR);		}	/* add configurable parameters to the framework */	for (loopCount = 0; loopCount < numMpFramingLayerParams; loopCount++)		{		if (pfwParameterAdd ((PFW_PLUGIN_OBJ *)pLayerObj,			mpFramingLayerParams [loopCount].name,			mpFramingLayerParams [loopCount].handler) == ERROR)			{			pfwPrintError (__FILE__, "mpFramingLayerCreate", __LINE__, pfw,0, \							"Error in registering a profile parameter");			return (ERROR);			}		}	/* create a semaphore for the send queue */    if ((pMpFramingLayer->sendSem = semBCreate (SEM_Q_PRIORITY, SEM_EMPTY))																	== NULL)		{		pfwPrintError (__FILE__, "mpFraminglayerCreate", __LINE__, pfw, NULL,  \		       "Unable to create the send task semaphore");		return ERROR;		}	/* start the send queue task */	if (mpSendQueueDepth > 0)		{		mpSendQueueCreate (pMpFramingLayer, mpSendQueueDepth);		if ((pMpFramingLayer->mpSendQTaskId = taskSpawn ("tMpSendQ", 						mpSendTaskPriority,  						VX_FP_TASK | VX_DEALLOC_STACK,						0x4000, (FUNCPTR) mpSendTask, (int) pMpFramingLayer,						0, 0, 0, 0, 0, 0, 0, 0, 0)) == ERROR)			{			pfwPrintError (__FILE__, "mpFraminglayerCreate", __LINE__, pfw,  \				NULL, "Spawning MP send task failed");			return ERROR;			}			}	/* create a semaphore for the receive queue */    if ((pMpFramingLayer->receiveSem = semBCreate (SEM_Q_PRIORITY, SEM_EMPTY))																	== NULL)		{		pfwPrintError (__FILE__, "mpFraminglayerCreate", __LINE__, pfw, NULL,  \		       "Unable to create the receive task semaphore");		return ERROR;		}		/* start the receive queue task */	if (mpReceiveQueueDepth > 0)		{		mpReceiveQueueCreate (pMpFramingLayer, mpReceiveQueueDepth);		if ((pMpFramingLayer->mpReceiveQTaskId = taskSpawn ("tMpRxQ", 						mpReceiveTaskPriority, 						VX_FP_TASK | VX_DEALLOC_STACK,						0x4000, (FUNCPTR) mpReceiveTask, (int) pMpFramingLayer,						0, 0, 0, 0, 0, 0, 0, 0, 0)) == ERROR)			{			pfwPrintError (__FILE__, "mpFraminglayerCreate", __LINE__, pfw,  \				NULL, "Spawning MP receive task failed");			return ERROR;			}		}	/* Create the component semaphore */	pMpFramingLayer->componentSem = semMCreate (SEM_Q_PRIORITY | SEM_DELETE_SAFE												| SEM_INVERSION_SAFE);	/* publish the events that we will Raise */	if (pfwEventPublish (pfw, "MP_MEMBER_ADDED_EVENT") == NULL)		return ERROR;	if (pfwEventPublish (pfw, "MP_MEMBER_DROPPED_EVENT") == NULL)		return ERROR;	if (pfwEventPublish (pfw, "MP_BUNDLE_CLOSED_EVENT") == NULL)		return ERROR;	if (pfwEventPublish (pfw, "MP_BUNDLE_OPENED_EVENT") == NULL)		return ERROR;		return OK;	}/******************************************************************************** mpFramingLayerDelete - delete the MP_FRAMING_LAYER component.** This function is called with the framework object to delete the * MP_FRAMING_LAYER component from the framework. The plug-in component object * allocated by mpFramingLayerCreate () is freed if there are no references to * this object from a Stack or Profile object in the framework.** RETURNS: OK/ERROR*/STATUS mpFramingLayerDelete	(	PFW_OBJ *pfw		/* framework reference */	)	{	PFW_LAYER_OBJ 		* pLayerObj = NULL;	PFW_PLUGIN_OBJ 		* pluginObj = NULL;	MP_FRAMING_LAYER 	* mpFramingComponent = NULL;		if (pfw == NULL)		return ERROR;	pluginObj = pfwPluginObjGet (pfw, "MP_FRAMING_LAYER");	mpFramingComponent = (MP_FRAMING_LAYER *) pluginObj;	taskDelete (mpFramingComponent->mpSendQTaskId);	taskDelete (mpFramingComponent->mpReceiveQTaskId);	semDelete (mpFramingComponent->sendSem);	semDelete (mpFramingComponent->receiveSem);	mpSendQueueDelete (mpFramingComponent);	mpReceiveQueueDelete (mpFramingComponent);	semDelete (mpFramingComponent->componentSem);	pLayerObj = pfwLayerObjGet (pfw, "MP_FRAMING_LAYER");	if (pLayerObj == NULL)		return ERROR;	/* delete the layer */	if (pfwLayerDelete (pLayerObj) == OK)		{	        pfwFree (pLayerObj); 	        pLayerObj = NULL;  		return OK;		}	return ERROR;	}/******************************************************************************** mpFramingLayerStackDataConstruct - called by the framework to initialize the *										stack data** This function is called when a stack is created to initialize the stack data * of the MP_FRAMING_LAYER component. This function initializes the * mpFramingStackData structure. The structure members are set to their initial * values. ** RETURNS: OK/ERROR*/LOCAL STATUS mpFramingLayerStackDataConstruct	(	PFW_OBJ * pfw,			/* the framework object */	void 	* stackData,	/* pointer to stackData */ 	void 	* profileData	/* pointer to profileData */	)	{	MP_FRAMING_LAYER_STACK_DATA * pStackData = 								(MP_FRAMING_LAYER_STACK_DATA *) stackData;	if ((pfw == NULL) || (stackData == NULL) || (profileData == NULL))		return ERROR;	bzero ((void *)pStackData, sizeof (MP_FRAMING_LAYER_STACK_DATA));	/* get the network pool id */	if ((pStackData->netPoolId = pfwNetPoolIdGet (pfw)) == NULL)		return ERROR;	/* initialze the stack data members */	pStackData->bundle_state = MP_BUNDLE_CLOSED_STATE;	/* assign the event objects */	if ((pStackData->pMpBundleClosedEventObj = pfwEventObjGet (pfw,										"MP_BUNDLE_CLOSED_EVENT")) == NULL) 		{		pfwPrintError (__FILE__, "mpFramingLayerStackDataConstruct", __LINE__, \				   pfw, NULL, "Failed to get MP_BUNDLE_CLOSED_EVENT event obj");		return ERROR;		}		if ((pStackData->pMpBundleOpenedEventObj = pfwEventObjGet (pfw,										"MP_BUNDLE_OPENED_EVENT")) == NULL) 		{		pfwPrintError (__FILE__, "mpFramingLayerStackDataConstruct", __LINE__, \

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
中文字幕人成不卡一区| 亚洲日本电影在线| 国产精品久久毛片| 日产欧产美韩系列久久99| 国产一区二区女| 欧美三级电影一区| 亚洲色图视频网| 国产一区二区三区免费观看| 欧美午夜视频网站| 中文字幕日韩精品一区| 国产精品一区免费在线观看| 欧美久久婷婷综合色| 亚洲精品大片www| 成人aaaa免费全部观看| 2021中文字幕一区亚洲| 欧美aⅴ一区二区三区视频| 欧美日韩国产综合久久| 一区二区三区中文字幕电影 | 日韩av不卡在线观看| 在线精品国精品国产尤物884a| 亚洲国产电影在线观看| 久久精品99国产精品日本| 欧美精品 国产精品| 亚洲福利视频三区| 欧美午夜电影在线播放| 亚洲一区二区三区四区在线观看 | 亚洲精品国产成人久久av盗摄| 波多野洁衣一区| 欧美国产日韩精品免费观看| 国产精品888| 国产三区在线成人av| 国产一区二区三区四| 久久色在线视频| 国产精品一区二区久激情瑜伽| 久久亚洲免费视频| 国产成人aaa| 国产精品蜜臀在线观看| 不卡一区二区三区四区| 亚洲欧美日韩系列| 欧美日韩国产影片| 丝袜美腿一区二区三区| 7777精品伊人久久久大香线蕉最新版| 亚洲午夜日本在线观看| 欧美日韩www| 久久精品噜噜噜成人88aⅴ| 日韩精品一区二区三区老鸭窝 | 97久久精品人人做人人爽50路| 最新日韩在线视频| 欧美三级在线视频| 美女在线视频一区| 久久久亚洲高清| 99re在线精品| 日日欢夜夜爽一区| 精品日韩在线观看| www.亚洲国产| 视频一区二区三区中文字幕| 精品精品国产高清一毛片一天堂| 国产高清一区日本| 一区二区三区中文字幕| 欧美tickle裸体挠脚心vk| 成人av中文字幕| 五月天精品一区二区三区| 久久久www免费人成精品| 色综合久久中文综合久久97| 水野朝阳av一区二区三区| 久久一区二区视频| 91麻豆国产福利精品| 蜜臀av性久久久久蜜臀aⅴ四虎| 国产喂奶挤奶一区二区三区| 91国偷自产一区二区三区成为亚洲经典| 日韩有码一区二区三区| 国产欧美一区视频| 欧美男生操女生| www..com久久爱| 麻豆视频一区二区| 夜色激情一区二区| 久久伊人蜜桃av一区二区| 欧美日韩精品免费| av成人免费在线观看| 麻豆国产欧美日韩综合精品二区 | 中文字幕亚洲综合久久菠萝蜜| 欧美日韩dvd在线观看| 波多野结衣一区二区三区| 麻豆精品一区二区综合av| 亚洲人成小说网站色在线| 久久综合网色—综合色88| 91麻豆精品国产91久久久久久 | 欧美成人一区二区三区在线观看| 色吊一区二区三区| 粉嫩嫩av羞羞动漫久久久 | 国产精品乱子久久久久| 精品免费日韩av| 欧美综合色免费| 丁香六月久久综合狠狠色| 日本中文字幕一区| 亚洲小说欧美激情另类| 最新高清无码专区| 亚洲国产精品成人久久综合一区| 日韩视频中午一区| 欧美男同性恋视频网站| 色婷婷国产精品综合在线观看| 成人一区二区三区中文字幕| 蜜桃91丨九色丨蝌蚪91桃色| 亚洲国产精品久久一线不卡| 18欧美亚洲精品| 国产欧美精品一区aⅴ影院| 精品国产百合女同互慰| 日韩一区二区电影| 69久久99精品久久久久婷婷| 欧美三级三级三级爽爽爽| 欧美又粗又大又爽| 91高清视频免费看| 欧美在线free| 欧美性猛片aaaaaaa做受| 日本黄色一区二区| 色吧成人激情小说| 色av综合在线| 欧美日韩一区高清| 欧美高清一级片在线| 欧美一卡2卡三卡4卡5免费| 欧美精品v国产精品v日韩精品| 欧美日韩一区三区| 7777精品久久久大香线蕉| 5566中文字幕一区二区电影| 欧美精选午夜久久久乱码6080| 在线不卡a资源高清| 欧美一区二区三区日韩视频| 日韩一区二区在线播放| 精品国偷自产国产一区| 国产亚洲制服色| 国产精品久久久久久妇女6080| 自拍偷自拍亚洲精品播放| 亚洲国产综合91精品麻豆| 亚洲午夜激情网站| 蜜臀av性久久久久蜜臀aⅴ四虎| 寂寞少妇一区二区三区| 国产成人综合视频| 色综合久久久久综合体桃花网| 91视频xxxx| 日韩欧美一区二区三区在线| 久久久91精品国产一区二区精品 | 欧美第一区第二区| 久久久99久久精品欧美| 亚洲视频一区在线| 视频一区国产视频| 成人中文字幕合集| 欧美日本在线视频| 久久久精品综合| 一区二区三区在线视频免费| 日本三级韩国三级欧美三级| 国产成人精品一区二区三区四区 | 欧美国产欧美综合| 亚洲国产另类精品专区| 黄网站免费久久| 欧美视频在线不卡| 国产欧美一区二区精品秋霞影院 | 欧美大片日本大片免费观看| 中文字幕的久久| 丝袜a∨在线一区二区三区不卡| 夫妻av一区二区| 5858s免费视频成人| 中文一区在线播放| 日韩电影免费一区| 91免费观看在线| 欧美精品一区二区三区久久久| 亚洲欧美日韩国产综合| 九一九一国产精品| 欧美三级中文字幕在线观看| 国产精品一区三区| 91精品国产综合久久精品app| 欧美极品aⅴ影院| 日韩影院精彩在线| 在线观看日韩国产| 国产精品美女久久久久久久| 日韩电影在线观看网站| 色呦呦网站一区| 中文字幕av一区二区三区高| 久久精品噜噜噜成人av农村| 欧美日韩国产色站一区二区三区| 国产精品久久久久久久久快鸭 | 日韩伦理av电影| 国产精品一区在线观看乱码 | 欧美绝品在线观看成人午夜影视 | 欧美激情一区二区三区四区| 天天免费综合色| 在线观看亚洲精品| 成人欧美一区二区三区视频网页| 国产精品女主播av| 91片在线免费观看| 本田岬高潮一区二区三区| 成人在线综合网| 国产日韩精品一区二区三区| 日韩不卡一区二区| 欧美日韩大陆一区二区| 亚洲永久免费av| 欧美亚洲图片小说| 一级中文字幕一区二区| 在线观看欧美精品| 亚洲图片欧美色图| 欧美精品黑人性xxxx|