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

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

?? pppmuxadapter.c

?? 這是全套的PPP協議的源碼
?? C
?? 第 1 頁 / 共 4 頁
字號:
*/LOCAL STATUS muxAdptrStackDataDestruct    (    PFW_OBJ * pfw,    void * pStackData,	/* reference to this component's Stack data */    void * profileData    )    {    MUX_ADPTR_STACK_DATA * pMuxAdptrStackData =		(MUX_ADPTR_STACK_DATA *)pStackData;    if (pMuxAdptrStackData->destAddr != NULL)	{	pfwFree(pMuxAdptrStackData->destAddr);	pMuxAdptrStackData->destAddr = NULL;	}    return OK;    }/******************************************************************************** muxAdptrStackInterfaceBind - bind our interfaces** RETURNS: OK on success and ERROR otherwise*/LOCAL STATUS muxAdptrInterfaceBind    (    PFW_PLUGIN_OBJ * pluginObj    )    {    int id;    MUX_ADPTR_COMPONENT * pComponent = (MUX_ADPTR_COMPONENT *)pluginObj;    if ((id = pfwInterfaceRegister(pluginObj->pfwObj,		    "ADAPTER_DESTINATION_AND_PROTOCOL_SET_INTERFACE")) ==0)	{	printf("MUX ADAPTER: Failed to register %s \n",		"ADAPTER_DESTINATION_AND_PROTOCOL_SET_INTERFACE");	return ERROR;	}    pComponent->adapterInterface.interfaceObj.id = id;    pComponent->adapterInterface.interfaceObj.pluginObj = pluginObj;    pComponent->adapterInterface.destAddrAndProtocolSet =destAddrAndProtocolSet;    pfwInterfaceBind(&pComponent->adapterInterface.interfaceObj);    if ((id = pfwInterfaceRegister(pluginObj->pfwObj,		    "ADAPTER_INFO_GET_INTERFACE")) ==0)	{	printf("MUX ADAPTER: Failed to register %s \n","ADAPTER_INFO_GET_INTERFACE");	return ERROR;	}    pComponent->adapterInfoGetInterface.interfaceObj.id = id;    pComponent->adapterInfoGetInterface.interfaceObj.pluginObj = pluginObj;    pComponent->adapterInfoGetInterface.adapterPortIdGet = adapterPortIdGet;    return (pfwInterfaceBind(&pComponent->adapterInfoGetInterface.interfaceObj));    }/******************************************************************************** muxAdptrStackDataConstruct - initialize component stack data** This function is called by the framework at the time this component* is included in a stack for the purpose of initializing the stack Data** RETURNS: OK on success and ERROR otherwise*/LOCAL STATUS muxAdptrStackDataConstruct    (    PFW_OBJ * pfw,    void * pStackData, 	/* reference to this component's Stack data */    void * pProfileData     )    {    MUX_ADPTR_STACK_DATA * pMuxAdptrData = (MUX_ADPTR_STACK_DATA *)pStackData;    /* start with a clean slate */    bzero ((void *)pMuxAdptrData, sizeof(MUX_ADPTR_STACK_DATA));    pMuxAdptrData->collectPppAttributesEvent = NULL;    pMuxAdptrData->bindInfoCache = NULL;    pMuxAdptrData->txBlocked = FALSE;    pMuxAdptrData->txBlockedEvent = NULL;    pMuxAdptrData->txUnblockedEvent = NULL;    return OK;    }/******************************************************************************** muxAdptrStackAdd - initialize a stack via the MUX** This is the first interface invoked by the framework to initialize a * stack which will use MUX. The profileData for this connection contained in* the componentState parameter has the device name & unit number and* protocol types that should be bound to the specified device* ** RETURNS: OK on success and ERROR otherwise*/LOCAL STATUS muxAdptrStackAdd    (    PFW_PLUGIN_OBJ_STATE * pComponentState, /* our state for this connection */    PFW_PLUGIN_OBJ_CALLBACKS * callbacks    )    {    int i;    int slot;    void * cookie = NULL;    UINT32 muxSvcType;    char muxSvcName[25];    int svcNameLen = strlen("PPP");    MUX_ADPTR_COMPONENT * pComponent = 		(MUX_ADPTR_COMPONENT *)pComponentState->pluginObj;    MUX_ADPTR_PROFILE_DATA * pMuxAdptrProfileData =		(MUX_ADPTR_PROFILE_DATA *)pComponentState->profileData;    MUX_ADPTR_STACK_DATA * pMuxAdptrStackData =		(MUX_ADPTR_STACK_DATA *)pComponentState->stackData;    pMuxAdptrStackData->portId = 0;    /*      * if we are going to send L2 frames simply add the provided L2 type     * to the list of services that we'll bind to the device.     */    if (pMuxAdptrProfileData->muxL2SvcType != 0x0)	{	pMuxAdptrProfileData->muxSvcType[pMuxAdptrProfileData->muxNumSvcs++] = 					pMuxAdptrProfileData->muxL2SvcType;	}    /* we must have atleast one protocol to bind to the MUX */    if (pMuxAdptrProfileData->muxNumSvcs <= 0)	{	logMsg("MUX_ADAPTER: No protocols to bind\n", 1,2,3,4,5,6);	return ERROR;	}    bzero((void *)muxSvcName,sizeof(muxSvcName));    strcpy(muxSvcName,"PPP");    if (pMuxAdptrStackData->collectPppAttributesEvent == NULL)	{	if ((pMuxAdptrStackData->collectPppAttributesEvent =	     pfwEventObjGet(pComponentState->pluginObj->pfwObj,	     "COLLECT_PPP_ATTRIBUTES_EVENT")) != NULL)            {	    pfwEventStackSubscribe(pComponentState,pMuxAdptrStackData->collectPppAttributesEvent,	    muxPPPAttributesEventHandler);	    }        }    /* get BLOCKED and UNBLOCKED events */    if ((pMuxAdptrStackData->txBlockedEvent = 			pfwEventObjGet(pComponentState->pluginObj->pfwObj,					"PPP_SUB_LAYER_TX_BLOCKED")) == NULL)	{	logMsg("MUX_ADAPTER: Failed to get PPP_SUB_LAYER_TX_BLOCKED event\n",	    1,2,3,4,5,6);	}    if ((pMuxAdptrStackData->txUnblockedEvent = 			pfwEventObjGet(pComponentState->pluginObj->pfwObj,					"PPP_SUB_LAYER_TX_UNBLOCKED")) == NULL)	{	logMsg("MUX_ADAPTER: Failed to get PPP_SUB_LAYER_TX_UNBLOCKED event\n",	    1,2,3,4,5,6);	}    /* get stack resolve Interface from framing component */    i = pfwInterfaceIdGet(pComponentState->pluginObj->pfwObj,			    "FRAMING_COMPONENT_STACK_RESOLVE_INTERFACE");    if (i == 0 ||	pfwInterfaceObjAndStateGetViaStackObj(pComponentState->stackObj,	    i,&pMuxAdptrStackData->resolverInterface) != OK)	{#ifdef CANNOT_PROCEED_WITHOUT_RESOLVER_INTERFACE	printf ("MUX Adapter: could not find %s for this stack 0x%x\n",		    "FRAMING_COMPONENT_STACK_RESOLVE_INTERFACE",		    (UINT32)pComponentState->stackObj);	return ERROR;#else	pMuxAdptrStackData->resolverInterface.interfaceObj = NULL;	/*	 * without this interface frames received will always be passed to	 * the upper layers of this stackObj	 */	pMuxAdptrStackData->resolverInterface.state = pComponentState;#endif /* CANNOT_PROCEED_WITHOUT_RESOLVER_INTERFACE */	}    for ( i = 0; i < pMuxAdptrProfileData->muxNumSvcs; i++)	{	muxSvcType = pMuxAdptrProfileData->muxSvcType[i];        if (semTake(pComponent->muxAdptrMutex,WAIT_FOREVER) != OK)            return ERROR;	/* attempt to find binding information for this protocol */	slot = muxAdptrBindInfoFind (pComponent,				    pMuxAdptrProfileData->muxDevName,				    pMuxAdptrProfileData->muxDevUnit,				    muxSvcType);	if (slot == pComponent->muxMaxBinds)	    {	    logMsg ("muxAdptrStackAdd: No more Binds\n",1,2,3,4,5,6);            semGive (pComponent->muxAdptrMutex);	    return ERROR;	    }	if (slot < 0)            {	    logMsg("MUX_ADPTR: Slot < 0\n",1,2,3,4,5,6);            semGive (pComponent->muxAdptrMutex);	    return ERROR;            }	    	/* 	 * check cookie and refCount to tell if this is already bound; 	 * if so save bind entry reference in stack data	 *	 * NOTE: if this protocol is already bound to the named device	 * on a different framework stack and if the interface	 * FRAMING_COMPONENT_STACK_RESOLVE_INTERFACE was not provided	 * we cannot continue.	 */	if ((pComponent->bindInfo[slot].cookie != NULL) &&	    (pComponent->bindInfo[slot].refCount > 0))	    {	    if (pComponent->bindInfo[slot].stackObjResolver.interfaceObj == NULL)		{		logMsg("MUX_ADPTR: Protocol 0x%x already bound to Device %s,\		Unit %d, on stackObj %p and did not supply\		FRAMING_COMPONENT_STACK_RESOLVE_INTERFACE\n",			muxSvcType,(int)pMuxAdptrProfileData->muxDevName,			pMuxAdptrProfileData->muxDevUnit,			(int)pComponentState->stackObj,5,6);		MUX_ADPTR_STACK_ADD_ERROR(pComponentState);                semGive (pComponent->muxAdptrMutex);		return ERROR;		}	    pComponent->bindInfo[slot].refCount++;	    pMuxAdptrStackData->bindInfoIndex[i] = slot;            pMuxAdptrStackData->portId = pComponent->bindInfo[slot].portId;            semGive (pComponent->muxAdptrMutex);	    continue;	    }	/* need to bind */	sprintf(&muxSvcName[svcNameLen],"-0x%lx", (long unsigned int) muxSvcType);	if (muxTkDrvCheck(pMuxAdptrProfileData->muxDevName))	    {	    if (muxSvcType == pMuxAdptrProfileData->muxL2SvcType)		{		logMsg ("MUX_ADPTR: muxL2SvcType=0x%x cannot bind to NPT driver\			%s%d\n", (int)pMuxAdptrProfileData->muxL2SvcType,			(int)pMuxAdptrProfileData->muxDevName,			pMuxAdptrProfileData->muxDevUnit,4,5,6);		semGive (pComponent->muxAdptrMutex);		return ERROR;		}	    cookie = muxTkBind ( pMuxAdptrProfileData->muxDevName,			pMuxAdptrProfileData->muxDevUnit,			muxAdptrRecvRtn,muxAdptrShutdownRtn,			muxAdptrTxRestartRtn,#if ((defined STACK_NAME) && (STACK_NAME == STACK_NAME_V4_V6))			(FUNCPTR) muxAdptrErrorRtn,#else			muxAdptrErrorRtn,#endif /* ((defined STACK_NAME) && (STACK_NAME == STACK_NAME_V4_V6)) */			muxSvcType,muxSvcName, &pComponent->bindInfo[slot],			NULL,NULL);	    }	else 	    {	    cookie = muxBind ( pMuxAdptrProfileData->muxDevName,			pMuxAdptrProfileData->muxDevUnit,			muxAdptrEndRecvRtn,muxAdptrEndShutdownRtn,			muxAdptrEndTxRestartRtn, muxAdptrEndErrorRtn,			muxSvcType,muxSvcName,&pComponent->bindInfo[slot]);	    }	if(cookie == NULL)	    {	    logMsg("MUX_ADAPTER: Failed to bind protocol 0x%x\n", muxSvcType		    ,2,3,4,5,6);            semGive (pComponent->muxAdptrMutex);	    return ERROR;	    }	else	    {	    if (0 == pMuxAdptrStackData->portId)	        {	        pMuxAdptrStackData->portId = (ULONG) cookie;	        }	    /* save the bind information in the bindInfo table */	    pMuxAdptrStackData->bindInfoIndex[i] = slot;	    sllInit(&pComponent->bindInfo[slot].txBlockedList);	    pComponent->bindInfo[slot].refCount = 1;            semGive (pComponent->muxAdptrMutex);	    pComponent->bindInfo[slot].stackObjResolver = 					pMuxAdptrStackData->resolverInterface;	    pComponent->bindInfo[slot].cookie = cookie;	    pComponent->bindInfo[slot].pluginObj = (PFW_PLUGIN_OBJ *)pComponent;	    pComponent->bindInfo[slot].portId = pMuxAdptrStackData->portId;	    pComponent->bindInfo[slot].netSvcType = muxSvcType;	    pComponent->bindInfo[slot].unitNo = pMuxAdptrProfileData->muxDevUnit;	    strcpy (pComponent->bindInfo[slot].devName, 	                   pMuxAdptrProfileData->muxDevName);	    /* 	     * when muxL2SvcType is set we always use the resulting bindCookie	     * when sending frames. Also destAddrAndProtocolSet() is made	     * inactive.	     */	    if (muxSvcType == pMuxAdptrProfileData->muxL2SvcType)		pMuxAdptrStackData->bindInfoCache = &pComponent->bindInfo[slot];	    }	}    /* save callbacks and state */    pMuxAdptrStackData->callbacks = callbacks;    pMuxAdptrStackData->state = pComponentState;    /* DONE processing stack add request*/    /* Get pfwRFC2233CountPair and set pfwRFC2233CountTest */    RFC2233_COUNT_PAIR_GET(pComponentState,                            pMuxAdptrStackData->pfwAuxIfId,                            pMuxAdptrStackData->pfwRFC2233CountPair, 			   pMuxAdptrStackData->pfwRFC2233CountTest);    MUX_STACK_ADD_DONE(pComponentState);    return OK;    }/******************************************************************************** muxAdptrStackDel - detach this component from the stack ** This interface is invoked as part of a pfwStackDelete() call. In here* we unbind the protocols bound to the mux as part of this stack instance.** RETURNS: OK on success and ERROR otherwise*/LOCAL STATUS muxAdptrStackDel    (    PFW_PLUGIN_OBJ_STATE * pComponentState   /* our state for this connection */    )    {    int i;    MUX_ADPTR_BIND_INFO * pBindInfo = NULL;    MUX_ADPTR_COMPONENT * pComponent = 		    (MUX_ADPTR_COMPONENT *)pComponentState->pluginObj;    MUX_ADPTR_PROFILE_DATA * pMuxAdptrProfileData =		(MUX_ADPTR_PROFILE_DATA *)pComponentState->profileData;    MUX_ADPTR_STACK_DATA * pMuxAdptrStackData =		(MUX_ADPTR_STACK_DATA *)pComponentState->stackData;    for ( i = 0; i < pMuxAdptrProfileData->muxNumSvcs; i++)	{	pBindInfo = &pComponent->bindInfo[pMuxAdptrStackData->bindInfoIndex[i]];        if (semTake (pComponent->muxAdptrMutex,WAIT_FOREVER) != OK)            return ERROR;	muxAdptrBindInfoClear(pBindInfo,pMuxAdptrStackData);        semGive (pComponent->muxAdptrMutex);	}    if (pMuxAdptrStackData->resolverInterface.interfaceObj != NULL)	pfwInterfaceReferenceDelete(			pMuxAdptrStackData->resolverInterface.interfaceObj);    if (pMuxAdptrStackData->pfwRFC2233CountTest)	pfwInterfaceReferenceDelete(		       pMuxAdptrStackData->pfwRFC2233CountPair.interfaceObj);    /* DONE processing stack Delete request*/    MUX_STACK_DELETE_DONE(pComponentState);    return OK;    }/******************************************************************************** muxAdptrSend - MUX adapter send interface** This interface is invoked by the framework when a packet has to be sent * out to the network through us. In here we strip the destination address* protocol information from the incoming packet and call muxSend()/muxTkSend()* with the stripped out information to send the packet to the driver** RETURNS: OK on success and ERROR otherwise*/LOCAL STATUS muxAdptrSend    (    PFW_PLUGIN_OBJ_STATE * pComponentState, /* our state for this stack */    M_BLK_ID * pMblkId			/* packet to send */    )    {    MUX_ADPTR_PROFILE_DATA * pMuxAdptrProfileData =		(MUX_ADPTR_PROFILE_DATA *)pComponentState->profileData;    MUX_ADPTR_STACK_DATA * pMuxAdptrStackData =		(MUX_ADPTR_STACK_DATA *)pComponentState->stackData;    void * cookie = NULL;    M_BLK_ID pMblk = NULL;    STATUS status;    UINT pktLength;    M_BLK_ID auxMblkId;    pktLength = 0;    if ((pMblkId == NULL) || ((pMblk = *pMblkId) == NULL))	{        RFC2233_COUNTER_UPDATE(pMuxAdptrStackData->pfwRFC2233CountTest, 				pMuxAdptrStackData->pfwRFC2233CountPair,                               M2_ctrId_ifOutErrors, 1);	return ERROR;	}    auxMblkId = pMblk;    while (auxMblkId != NULL)        {        pktLength += auxMblkId->mBlkHdr.mLen;        auxMblkId = auxMblkId->mBlkHdr.mNext;        }    /* we must be bound to atleast one protocol for this connection */    if (pMuxAdptrProfileData->muxNumSvcs <= 0)	{	MUX_FREE_PKT(pMblk);        RFC2233_COUNTER_UPDATE(pMuxAdptrStackData->pfwRFC2233CountTest, 				pMuxAdptrStackData->pfwRFC2233CountPair,                               M2_ctrId_ifOutDiscards, 1);	return ERROR;	}    /* cant proceed with a NULL cookie */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产一区二区精品久久91| 日韩中文字幕区一区有砖一区| 欧美视频一区在线| 懂色av一区二区三区蜜臀| 国产精品一区二区三区99| 国产一区二区三区在线看麻豆| 蜜桃av噜噜一区| 久久 天天综合| 国产资源精品在线观看| 国产一区91精品张津瑜| 国产电影精品久久禁18| 成人免费视频播放| 成人激情综合网站| 欧美在线观看一区二区| 欧美日韩国产影片| 欧美精品一区男女天堂| 国产亚洲人成网站| 一区二区三区在线视频免费 | 国产欧美日韩在线看| 2020国产精品| 国产精品久久久久一区二区三区共| 国产精品福利一区二区三区| 亚洲黄色av一区| 美女视频黄久久| 成人午夜免费av| 欧美三级视频在线观看| 日韩一区二区视频| 中文字幕中文字幕一区二区| 亚洲一区二区中文在线| 日韩av电影免费观看高清完整版 | 欧美精品vⅰdeose4hd| 日韩欧美黄色影院| 国产精品色哟哟| 亚洲成人在线免费| 国产不卡在线一区| 51精品久久久久久久蜜臀| 欧美韩国一区二区| 日日夜夜免费精品| caoporen国产精品视频| 日韩欧美高清一区| 亚洲男同性恋视频| 国产盗摄视频一区二区三区| 在线观看不卡一区| 欧美国产在线观看| 麻豆精品一区二区三区| 色女孩综合影院| 久久久久久久久久电影| 亚洲国产日日夜夜| 成人av电影观看| 日韩精品一区二区三区在线观看 | 丝袜a∨在线一区二区三区不卡| 激情小说亚洲一区| 欧美日韩你懂得| 亚洲精品大片www| 国产精品亚洲а∨天堂免在线| 欧美日韩情趣电影| 亚洲精品免费在线| 成人三级伦理片| 国产亚洲一区字幕| 精品亚洲国产成人av制服丝袜| 色吧成人激情小说| 1024精品合集| 成人av电影免费观看| 亚洲国产电影在线观看| 国内精品视频666| 26uuu精品一区二区三区四区在线| 亚洲成av人影院| 色婷婷久久综合| 亚洲美女视频在线| heyzo一本久久综合| 亚洲国产精品传媒在线观看| 韩国女主播成人在线观看| 欧美精品99久久久**| 亚洲va欧美va人人爽午夜| 在线观看日韩一区| 亚洲精品免费看| 91久久精品一区二区三| 亚洲人成7777| 成人精品高清在线| 亚洲免费在线播放| 欧美色国产精品| 亚洲.国产.中文慕字在线| 欧美日韩免费观看一区三区| 一区二区免费在线播放| 色呦呦网站一区| 一区二区成人在线| 欧美一区二区三区四区久久| 亚洲国产你懂的| 91精品国产一区二区人妖| 日本欧美加勒比视频| 91麻豆精品久久久久蜜臀| 老汉av免费一区二区三区| 亚洲精品一线二线三线| 波多野结衣中文字幕一区| 亚洲欧美一区二区三区久本道91| 欧洲人成人精品| 蜜臀久久99精品久久久久宅男| 欧美tk丨vk视频| 成人免费高清视频在线观看| 亚洲日本在线a| 日韩视频在线一区二区| 国产精品综合网| 亚洲精品乱码久久久久| 91精品在线免费观看| 国产精品一区二区不卡| 亚洲色图在线视频| 欧美久久久久中文字幕| 国内精品免费**视频| 亚洲精品国产第一综合99久久 | 亚洲午夜三级在线| 日韩视频中午一区| 色综合久久88色综合天天免费| 午夜精品一区二区三区免费视频 | 欧美在线一区二区三区| 久久精品999| 亚洲美女在线一区| 久久久久久久久久久久久久久99| 欧美亚洲动漫制服丝袜| 国产在线看一区| 午夜精品久久久久久久99樱桃 | 洋洋成人永久网站入口| 久久在线免费观看| 欧美日韩亚州综合| 国产精品一区二区不卡| 日韩黄色在线观看| 1024成人网| 国产精品区一区二区三| 精品成人一区二区三区| 欧美在线free| 99久久精品久久久久久清纯| 精品一区二区久久久| 偷偷要91色婷婷| 一个色综合av| 中文字幕佐山爱一区二区免费| 欧美电视剧免费全集观看| 欧美日韩一本到| 91亚洲永久精品| 成人av网站免费| 成人中文字幕在线| 国产美女娇喘av呻吟久久| 日韩制服丝袜av| 亚洲一二三区不卡| 一个色在线综合| 一区二区三区产品免费精品久久75| 中文字幕乱码久久午夜不卡 | 日韩精品一区二区三区中文不卡 | 久久国产精品一区二区| 亚洲福利视频一区| 一区二区三区资源| 一区二区在线看| 亚洲精品视频免费观看| 一区二区三区国产豹纹内裤在线| 亚洲免费在线视频一区 二区| 亚洲欧美在线视频| 亚洲欧美视频在线观看视频| 中文字幕综合网| 一区二区三区高清| 亚州成人在线电影| 麻豆精品在线看| 国产成人99久久亚洲综合精品| 国产91丝袜在线播放| 成熟亚洲日本毛茸茸凸凹| 97se亚洲国产综合自在线观| 91在线高清观看| 欧美性极品少妇| 日韩三级在线观看| 久久免费美女视频| 国产精品电影一区二区三区| 亚洲丝袜另类动漫二区| 亚洲午夜国产一区99re久久| 亚洲h在线观看| 精品一区二区三区免费| 国产福利一区二区| 91蝌蚪porny九色| 欧美三级一区二区| 久久久高清一区二区三区| 国产精品久久久一本精品| 一区二区三区高清| 精品亚洲成a人在线观看| 成人av网站大全| 欧美一区二区性放荡片| 久久精品男人的天堂| 亚洲制服丝袜av| 韩国女主播成人在线| 91伊人久久大香线蕉| 日韩欧美一级在线播放| 成人免费在线视频观看| 日本不卡在线视频| 成人动漫av在线| 91精品国产乱码久久蜜臀| 国产欧美一区二区精品忘忧草| 亚洲欧美日韩一区二区| 久久超级碰视频| 一本色道亚洲精品aⅴ| 欧美videofree性高清杂交| 亚洲欧美视频一区| 韩国av一区二区三区四区| 色拍拍在线精品视频8848| 国产视频不卡一区| 五月天激情综合网|