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

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專(zhuān)輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? muxtklib.c

?? vxworks的完整的源代碼
?? C
?? 第 1 頁(yè) / 共 4 頁(yè)
字號(hào):
   if ((index = muxTkBibEntryGet (pEnd)) < 0)        {	if (muxTkDebug)	    logMsg ("muxTkBind: No more Bind entries", 1, 2, 3, 4, 5, 6);	return (NULL);        }    else	{        tkFlag = TK_DRV_CHECK(&muxBindBase[index]);	}    /* Allocate a new protocol structure and bind the protocol to the END. */    pNewProto = (NET_PROTOCOL *)KHEAP_ALLOC(sizeof (NET_PROTOCOL));    if (pNewProto == NULL)        {        /* free BIB entry */        bzero ((void *)&muxBindBase[index], sizeof(MUX_BIND_ENTRY));        logMsg ("muxBind cannot allocate protocol node", 0, 0, 0, 0, 0, 0);        errnoSet (S_muxLib_ALLOC_FAILED);        return (NULL);        }    bzero ( (char *)pNewProto, sizeof(NET_PROTOCOL));    /* bind the protocol to the END */    if (type != MUX_PROTO_OUTPUT)	{	/* populate all fields in the new protocol node */	pNewProto->stackShutdownRtn = stackShutdownRtn;	pNewProto->stackTxRestartRtn = stackTxRestartRtn;	pNewProto->stackErrorRtn = stackErrorRtn;        }    pNewProto->type = type;    /* Indicate that muxTkBind() was used. */    pNewProto->nptFlag = TRUE;    if (tkFlag != TRUE && type != MUX_PROTO_OUTPUT)        {        /* Use a wrapper receive routine when sending data with END devices. */        pNewProto->stackRcvRtn = muxEndRcvRtn;        }    else        {        pNewProto->stackRcvRtn = stackRcvRtn;        }    /*     * For all input protocols bound using muxTkBind,     * install the BIB entry pointer as the call back ID.     */    pNewProto->pSpare = &muxBindBase[index];    if (type != MUX_PROTO_OUTPUT)        {	/* copy the protocol name or generate one if not available */	if (pProtoName != NULL)	    {	    strncpy (pNewProto->name, pProtoName, 32);	    }	else	    {	    sprintf (pNewProto->name, "Protocol %d",		     lstCount (&pEnd->protocols));	    }        }    /* Insert the protocol in the END_OBJ protocol list */    switch (type)        {        case MUX_PROTO_OUTPUT:        case MUX_PROTO_PROMISC:            lstAdd (&pEnd->protocols, &pNewProto->node);            break;        default:            /* Add a standard or snarf protocol after any existing ones. */            lstInsert(&pEnd->protocols, pFinal, &pNewProto->node);            break;        }    if (type == MUX_PROTO_OUTPUT)	{	/* For an OUTPUT protocol place the filter in the END object itself. */        pEnd->outputFilter = pNewProto;        pEnd->pOutputFilterSpare = pNetCallbackId;	muxBindBase[index].pEnd->outputFilter->stackRcvRtn = muxEndRcvRtn;	pEnd->outputFilter->stackRcvRtn = stackRcvRtn;	}    muxBindBase[index].netStackRcvRtn = stackRcvRtn;    /* fill the rest of the BIB entry */    muxTkBibEntryFill (index, type, pNetCallbackId);    if (type == MUX_PROTO_SNARF)     /* Increase the count. */	(pEnd->snarfCount)++;    pNewProto->pNptCookie = &muxBindBase[index];    return (&muxBindBase[index]);    }/******************************************************************************* muxTkReceive - receive a packet from a NPT driver** This is the routine that the NPT driver calls to hand a packet to the MUX.* This routine forwards the received 'mBlk' chain to the network service* sublayer by calling its registered stackRcvRtn().** Typically, a driver includes an interrupt handling routine to process* received packets.  It should keep processing to a minimum during interrupt* context and then arrange for processing of the received packet within* task context.** Once the frame has been validated, the driver should pass it to the MUX* with the 'receiveRtn' member of its END_OBJ structure.  This routine has* the same prototype as (and typically is) muxTkReceive().** Depending on the protocol type (for example, MUX_PROTO_SNARF or* MUX_PROTO_PROMISC), this routine either forwards the received packet chain* unmodified or it changes the data pointer in the 'mBlk' to strip off the* frame header before forwarding the packet.** .IP <pCookie>* Expects the END_OBJ pointer returned by the driver's endLoad() or* nptLoad() function** .IP <pMblk>* Expects a pointer to the 'mBlk' structure containing the packet that has* been received** .IP <netSvcOffset>* Expects an offset into the frame to the point where the data field (the* network service layer header) begins** .IP <netSvcType>* Expects the network service type of the service for which the packet is* destined (typically this value can be found in the header of the received* frame)** .IP <uniPromiscuous>* Expects a boolean set to TRUE when driver is in promiscuous mode and* receives a unicast or a multicast packet not intended for this device.* When TRUE the packet is not handed over to network services other than* those registered as SNARF or PROMISCUOUS.** .IP <pSpareData>* Expects a pointer to any spare data the driver needs to pass up to the* network service layer, or NULL** RETURNS: OK or ERROR.** ERRNO: S_muxLib_NO_DEVICE*/STATUS muxTkReceive    (    void *    pCookie,		/* cookie passed in endLoad() call */    M_BLK_ID  pMblk,		/* a buffer passed to us. */    long      netSvcOffset,	/* offset to network datagram in the packet */    long      netSvcType,	/* network service type */    BOOL      uniPromiscuous,	/* TRUE when driver is in promiscuous mode */     void *    pSpareData	/* out of band data */    )    {    NET_PROTOCOL *      pProto;    END_OBJ *           pEnd;    long                type;    M_BLK_ID            pMblkOrig;    int 		count;    pEnd = (END_OBJ *)pCookie;    if (pEnd == NULL)        {        errnoSet (S_muxLib_NO_DEVICE);        if (pMblk)            netMblkClChainFree (pMblk);        return (ERROR);        }    /* Grab a new block and parse out the header information. */    count = lstCount (&pEnd->protocols);    if (count <= 0)        {        if (pMblk)            netMblkClChainFree (pMblk);        return (FALSE);        }    pProto = (NET_PROTOCOL *)lstFirst (&pEnd->protocols);    if (pProto == NULL)        {        if (pMblk)            netMblkClChainFree (pMblk);        return (ERROR);        }    /* Ignore incoming data if an output protocol is the only entry. */    if (count == 1 && pProto->type == MUX_PROTO_OUTPUT)        {        if (pMblk)            netMblkClChainFree (pMblk);        return (ERROR);        }    /*     * Loop through the protocol list.     * If a protocol's receive routine returns TRUE, that means it has     * consumed the packet.     * The protocol's receive routine should always return FALSE if other     * protocols have to see the packet.     * SNARF protocols have the priority over every other protocol.     * PROMISC protocols have the least priority.     */    type = netSvcType;    for (; pProto != NULL; pProto = (NET_PROTOCOL *)lstNext (&pProto->node))        {        MUX_ID muxId = (MUX_ID)(pProto->pSpare);	void * pNetCallbackId = NULL;        if (pProto->type == MUX_PROTO_OUTPUT)            continue;        if (muxId)            pNetCallbackId = muxId->pNetCallbackId;        if (pProto->type == MUX_PROTO_SNARF)            {            if ((pProto->stackRcvRtn) && (*pProto->stackRcvRtn) 		 (pNetCallbackId, type, pMblk, pSpareData) == TRUE)                return (OK);            }        else if (pProto->type == type && !uniPromiscuous)            {            /* Make sure the entire Link Hdr is in the first M_BLK */            pMblkOrig = pMblk;            if (pMblk->mBlkHdr.mLen < netSvcOffset &&                (pMblk = m_pullup (pMblk, netSvcOffset)) == NULL)                {                pMblk = pMblkOrig;                break;                }              /* remove the MAC header and set the packet length accordingly */             pMblk->mBlkHdr.mData += netSvcOffset;            pMblk->mBlkHdr.mLen  -= netSvcOffset;            pMblk->mBlkPktHdr.len  -= netSvcOffset;            if ((pProto->stackRcvRtn) &&                (((*pProto->stackRcvRtn) (pNetCallbackId, type, pMblk,                                          pSpareData)) == TRUE))                {                return (OK);                }            }        else if (pProto->type == MUX_PROTO_PROMISC)            {            if ((pProto->stackRcvRtn) &&                (((*pProto->stackRcvRtn) (pNetCallbackId, type, pMblk,                                          pSpareData)) == TRUE))                {                return (OK);                }            }        }    /* if the flow comes here then pMblk is not freed */    if (pMblk)        netMblkClChainFree (pMblk);    return (OK);    }/******************************************************************************* _muxTkSend - A private function common to both muxTkSend and muxTkPollSend** This routine does all of the processing required prior to a muxTkSend() or* muxTkPollSend() and calls the driver's send() or pollSend() routine; a* pointer to which is passed as the last argument. All other arguments are* the same as muxTkSend() or muxTkPollSend()** RETURNS: OK or ERROR** SEE ALSO: muxTkSend(), muxTkPollSend, muxSend(), muxPollSend** NOMANUAL */LOCAL STATUS _muxTkSend    (    MUX_ID    muxId,		/* cookie returned by muxTkBind */    M_BLK_ID  pNBuff,		/* data to be sent */    char *    dstMacAddr,	/* destination MAC address */    USHORT    netType,		/* network protocol that is calling us: redundant? */    void *    pSpareData,	/* spare data passed on each send */    FUNCPTR   sendRtn		/* the driver's send routine: poll or regular */    )    {    LL_HDR_INFO    llHdrInfo;     END_OBJ *      pEnd = muxId->pEnd;    NET_PROTOCOL * pOut = NULL;    /* we need these two M_BLKs for endAddressForm */    M_BLK srcAddr = {{NULL,NULL,NULL,0,MT_IFADDR,0,0}, {NULL,0}, NULL};    M_BLK dstAddr = {{NULL,NULL,NULL,0,MT_IFADDR,0,0}, {NULL,0}, NULL};    if (pEnd == NULL)        return (ERROR);    /* bump MIB2 statistic */    if (pNBuff != NULL &&           (pNBuff->mBlkHdr.mFlags & M_BCAST ||              pNBuff->mBlkHdr.mFlags & M_MCAST))        {        if (pEnd->flags & END_MIB_2233)            {            /*             * Do nothing as ifOutNUcastPkts is updated by the             * m2PktCountRtn function specified in the END objects             * M2_ID.             */            }        else /* (RFC1213 style counters supported) XXX */            {            ++(pEnd->mib2Tbl.ifOutNUcastPkts);            }        }    if (pEnd->outputFilter)        {        pOut = pEnd->outputFilter;        if (pOut->stackRcvRtn (pEnd->pOutputFilterSpare, netType, pNBuff,                                pSpareData) == TRUE)            {            return (OK);            }        }    if (!TK_DRV_CHECK(muxId))	{	M_BLK_ID  pSrcAddr = &srcAddr;	M_BLK_ID  pDstAddr = &dstAddr;	M_BLK_ID  pMacFrame = NULL;	char      srcMacAddr[64];        /* copy END MAC addr into a temporary buffer */        bzero (srcMacAddr, 64);        if (pEnd->flags & END_MIB_2233)            bcopy(END_ALT_HADDR(pEnd),srcMacAddr,END_ALT_HADDR_LEN(pEnd));        else            bcopy(END_HADDR(pEnd),srcMacAddr,END_HADDR_LEN(pEnd));	pDstAddr->mBlkHdr.mData = dstMacAddr;	pDstAddr->mBlkHdr.mLen = END_HADDR_LEN(pEnd);	pDstAddr->mBlkHdr.reserved = netType;	pSrcAddr->mBlkHdr.mData = srcMacAddr; 	pSrcAddr->mBlkHdr.mLen = END_HADDR_LEN(pEnd);	if (pEnd->pFuncTable->formAddress &&	    ((pMacFrame = pEnd->pFuncTable->formAddress (pNBuff, pSrcAddr,							 pDstAddr, FALSE))	      != NULL))	    {	    STATUS status;	    /*	     * if we get here, we send the fully formed MAC frame to 	     * the END driver	     */	    status = sendRtn (pEnd, pMacFrame);	    if (status != OK)		{		/*		 * resurrect the network layer packet		 */		if (pMacFrame == pNBuff)		    {		    if (pEnd->pFuncTable->packetDataGet (pNBuff, &llHdrInfo)			== ERROR)                        {                        if (pNBuff)                            netMblkClChainFree (pNBuff);                        return ERROR;                        }		    /* point to the network pkt header, and adjust the length */		    pNBuff->mBlkHdr.mData += llHdrInfo.dataOffset;		    pNBuff->mBlkHdr.mLen  -= llHdrInfo.dataOffset;		    if(pNBuff->mBlkHdr.mFlags & M_PKTHDR)			pNBuff->mBlkPktHdr.len -= llHdrInfo.dataOffset;		    #if 0		    logMsg("_muxTkSendError\n",1,2,3,4,5,6);		    #endif		    }                else		    {		    if(pMacFrame)			{			netMblkClFree(pMacFrame);			}                    pNBuff->mBlkHdr.mFlags |= M_PKTHDR;                    }		}	    return(status);	    }	else

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国内精品久久久久影院色| 国产一区二区导航在线播放| 成人免费在线播放视频| 久久色.com| 2020国产精品| 91免费看片在线观看| 国产一区二区不卡| 国产亚洲欧美日韩俺去了| 久久影院电视剧免费观看| 日本韩国欧美在线| 色菇凉天天综合网| 欧美综合在线视频| 666欧美在线视频| 日韩一区二区三区观看| 91精品视频网| 欧美大片在线观看一区二区| 2024国产精品| 国产精品妹子av| 亚洲精品国产第一综合99久久| 中文字幕在线观看不卡| 亚洲综合一二区| 免费一级片91| 国产福利一区二区三区在线视频| 成人一道本在线| 在线视频国产一区| 欧美精品欧美精品系列| 26uuu亚洲综合色欧美| 中文字幕乱码日本亚洲一区二区| 中文字幕日韩欧美一区二区三区| 一区二区三区欧美日| 亚洲欧美成人一区二区三区| 天天操天天综合网| 亚洲三级电影网站| 丝袜国产日韩另类美女| 久久成人久久鬼色| 99精品久久只有精品| 欧美日韩国产片| 久久久久久久久久电影| 综合电影一区二区三区 | 久久这里只有精品首页| 久久综合久久99| 亚洲天堂网中文字| 日韩精品欧美精品| 国产成人综合网站| 日本黄色一区二区| 欧美tickling网站挠脚心| 国产精品久久久久影视| 亚洲国产日韩综合久久精品| 激情综合网天天干| 色婷婷综合五月| 久久综合色鬼综合色| 亚洲欧美成aⅴ人在线观看| 免费观看成人av| 91丨九色丨尤物| 午夜精品久久久久久不卡8050 | 狠狠色丁香久久婷婷综合_中| 亚洲一区自拍偷拍| 国内精品伊人久久久久av一坑| 成人av资源下载| 欧美剧情片在线观看| 国产欧美一区二区在线| 五月激情综合婷婷| 99免费精品在线| 2020日本不卡一区二区视频| 亚洲一线二线三线视频| 国产在线日韩欧美| 欧美区在线观看| 亚洲日本一区二区三区| 国产在线精品一区在线观看麻豆| 欧美中文字幕一区二区三区亚洲| 欧美激情一区二区三区| 久久精品国产秦先生| 欧美视频在线不卡| 亚洲视频精选在线| 成人在线一区二区三区| 欧美xxxxxxxx| 日本在线不卡视频一二三区| 色999日韩国产欧美一区二区| 中文在线资源观看网站视频免费不卡| 男女男精品视频网| 56国语精品自产拍在线观看| 亚洲综合无码一区二区| 91视频精品在这里| 中文一区二区完整视频在线观看 | 国产美女娇喘av呻吟久久| 亚洲综合激情网| 久久久精品黄色| 精品在线免费视频| 欧美成人aa大片| 日韩国产欧美视频| 欧美日韩高清一区| 亚洲福利视频导航| 欧美日本韩国一区| 性做久久久久久免费观看| 久久精品人人做| 精品亚洲成av人在线观看| 日韩三级在线观看| 蜜桃精品视频在线| 日韩一二在线观看| 日韩不卡一区二区三区| 欧美日韩精品一区视频| 亚洲超碰97人人做人人爱| 在线亚洲免费视频| 亚洲一区二区3| 欧美在线观看视频在线| 亚洲影院在线观看| 欧美人牲a欧美精品| 日韩国产欧美一区二区三区| 日韩小视频在线观看专区| 日韩高清一区在线| 日韩午夜在线影院| 国产资源在线一区| 欧美经典一区二区三区| 成人激情午夜影院| 亚洲素人一区二区| 中文字幕一区二区三区四区不卡| 欧美日韩一区二区三区在线| 中文字幕高清不卡| 蜜桃视频一区二区三区| 精品国产乱码久久久久久久| 国产成人亚洲综合a∨婷婷| 亚洲欧洲性图库| 欧美午夜精品免费| 丝袜诱惑制服诱惑色一区在线观看| 日韩欧美高清dvd碟片| 国产乱子伦视频一区二区三区| 国产精品免费人成网站| 色欧美88888久久久久久影院| 亚洲午夜成aⅴ人片| 日韩一级高清毛片| 成人免费视频国产在线观看| 亚洲三级电影全部在线观看高清| 欧美日韩国产美女| 国产综合久久久久久久久久久久| 国产精品进线69影院| 91官网在线观看| 麻豆成人免费电影| 中文字幕中文字幕中文字幕亚洲无线| 欧美综合欧美视频| 国产呦萝稀缺另类资源| 亚洲精品亚洲人成人网| 日韩午夜激情电影| av中文字幕不卡| 乱一区二区av| 亚洲视频免费在线观看| 91精品欧美福利在线观看| 成人app下载| 石原莉奈在线亚洲二区| 国产精品久久久一本精品| 欧美高清性hdvideosex| 成人黄色av电影| 另类小说图片综合网| 一区二区三区在线视频免费观看| 欧美va日韩va| 欧美视频第二页| 国产成人精品三级麻豆| 日韩制服丝袜av| 亚洲欧洲精品天堂一级| 欧美电影精品一区二区| 在线观看视频欧美| 国产99精品国产| 久久99日本精品| 亚洲成人av中文| 亚洲日穴在线视频| 国产亚洲午夜高清国产拍精品| 欧美日本免费一区二区三区| 成人avav在线| 国产高清成人在线| 六月婷婷色综合| 丝袜美腿成人在线| 一区二区三区四区视频精品免费| 国产亚洲短视频| 欧美一级二级在线观看| 日本韩国一区二区三区视频| 岛国精品在线播放| 狠狠久久亚洲欧美| 免费精品99久久国产综合精品| 亚洲精品老司机| 国产精品理论片| 26uuu亚洲综合色欧美| 正在播放一区二区| 欧美少妇xxx| 欧美午夜在线一二页| 91在线一区二区三区| 国产高清精品网站| 国模无码大尺度一区二区三区| 天天色天天操综合| 亚洲不卡一区二区三区| 亚洲天堂精品在线观看| 国产精品福利一区二区三区| 国产亚洲欧美中文| 久久先锋影音av| 欧美成人精品高清在线播放| 欧美一区二区三区视频在线观看 | 久久久久久**毛片大全| 欧美本精品男人aⅴ天堂| 日韩限制级电影在线观看| 欧美一激情一区二区三区| 欧美日韩精品一区二区在线播放| 精品视频色一区|