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

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

?? muxtklib.c

?? vxwork源代碼
?? C
?? 第 1 頁 / 共 4 頁
字號:
   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

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
色综合一个色综合亚洲| 国产日韩精品久久久| 一区二区在线观看免费| 成人av动漫在线| 国产亚洲午夜高清国产拍精品| 日本欧美久久久久免费播放网| 色婷婷av久久久久久久| 中文字幕在线观看一区二区| 成人不卡免费av| 国产精品女同互慰在线看| 日韩国产精品久久久| 欧美二区在线观看| 1024亚洲合集| 91捆绑美女网站| 曰韩精品一区二区| 国产成人免费高清| 中文字幕一区二区在线播放| 91美女片黄在线| 亚洲一区二区三区影院| 欧美丰满一区二区免费视频| 日本在线不卡一区| 精品乱人伦小说| 国产91在线观看丝袜| 一色桃子久久精品亚洲| 99re热视频这里只精品| 亚洲精品成人天堂一二三| 欧洲av一区二区嗯嗯嗯啊| 亚洲v精品v日韩v欧美v专区| 4438x亚洲最大成人网| 免费看日韩精品| 久久午夜色播影院免费高清| 成人激情午夜影院| 亚洲美女视频在线| 欧美日韩视频在线第一区| 毛片av一区二区| 国产欧美综合在线| 一本一道久久a久久精品综合蜜臀| 亚洲观看高清完整版在线观看 | 视频一区二区国产| 日韩一区二区三区高清免费看看| 久久国产人妖系列| 最新不卡av在线| 91精品国产综合久久精品| 国产一区二区三区免费播放| 国产精品国产精品国产专区不片| 欧美午夜片在线看| 日本网站在线观看一区二区三区 | 色国产精品一区在线观看| 日韩福利电影在线| 国产精品全国免费观看高清 | 欧美嫩在线观看| 国产精品一二三四五| 亚洲欧美中日韩| 欧美一区二区三级| 99久久er热在这里只有精品15| 亚洲综合区在线| 久久久精品免费免费| 色婷婷久久综合| 国产精品69久久久久水密桃| 午夜精品久久久久久久99樱桃| 久久久精品tv| 欧美高清性hdvideosex| 成人国产精品视频| 韩国一区二区视频| 日本亚洲欧美天堂免费| 亚洲女同ⅹxx女同tv| 久久只精品国产| 日韩欧美中文一区| 日韩欧美一级片| 日韩一级大片在线| 欧美视频在线一区| 欧美在线观看视频一区二区三区| 成人网页在线观看| 粉嫩aⅴ一区二区三区四区| 国产一区不卡在线| 国产精品综合二区| 国产高清在线精品| 国产一区999| 国产精品亚洲成人| 大美女一区二区三区| 国产精品456露脸| 国产91丝袜在线播放| 国产999精品久久| 成人免费看黄yyy456| 99视频有精品| 99久久精品99国产精品| 91啪亚洲精品| 91久久精品国产91性色tv| 在线中文字幕一区| 欧美精品在线观看一区二区| 欧美日韩精品一区视频| 日韩一区二区影院| 精品成人私密视频| 国产精品网站在线| 亚洲免费看黄网站| 亚欧色一区w666天堂| 免费在线看一区| 精品一区二区三区影院在线午夜| 美女被吸乳得到大胸91| 国产中文一区二区三区| www.视频一区| 欧美性一级生活| 欧美一区二区大片| 久久久久久9999| 亚洲天堂2014| 日本va欧美va精品| 国产美女娇喘av呻吟久久| 884aa四虎影成人精品一区| 日韩一区二区三区在线视频| 国产人成亚洲第一网站在线播放 | 日韩精品三区四区| 国产麻豆成人精品| 91蜜桃传媒精品久久久一区二区| 欧美久久久久中文字幕| 久久久精品天堂| 一区二区三区四区视频精品免费| 日本特黄久久久高潮| 粉嫩av一区二区三区在线播放| 欧美影视一区二区三区| 7777精品久久久大香线蕉| 国产亚洲精久久久久久| 亚洲资源在线观看| 国产一区二区在线观看视频| 99国内精品久久| 欧美一区二区在线观看| 国产精品国产三级国产专播品爱网| 亚洲超丰满肉感bbw| 国产精品一级在线| 欧美日本不卡视频| 亚洲欧美怡红院| 九色|91porny| 色婷婷久久久综合中文字幕| 欧美mv日韩mv国产网站app| 亚洲欧美一区二区三区国产精品| 欧美a级理论片| 在线一区二区三区四区| 久久精品一区二区三区四区| 午夜精品久久久久久久久久| 国产91富婆露脸刺激对白| 制服丝袜亚洲精品中文字幕| 亚洲天堂网中文字| 国产精品自拍在线| 91精品啪在线观看国产60岁| 亚洲欧洲美洲综合色网| 激情都市一区二区| 欧美一区欧美二区| 一区二区三区精品视频在线| 成人免费视频播放| 精品国产一区二区精华| 午夜久久久久久久久久一区二区| 99国内精品久久| 国产精品色眯眯| 国产伦理精品不卡| 日韩一区二区三区四区五区六区| 亚洲一区二区三区国产| 色综合中文字幕国产| 久久奇米777| 奇米色一区二区三区四区| 欧美午夜精品一区二区三区| 亚洲精品自拍动漫在线| 91麻豆成人久久精品二区三区| 国产精品久久夜| 成人黄色国产精品网站大全在线免费观看 | 亚洲影视在线播放| 99久久国产综合色|国产精品| 日本一区二区免费在线 | 欧美激情一区二区三区四区| 精品一区二区影视| 26uuu精品一区二区| 精彩视频一区二区| 精品精品国产高清一毛片一天堂| 日日欢夜夜爽一区| 777欧美精品| 久久精品国产亚洲高清剧情介绍 | 久久久久97国产精华液好用吗| 丝袜美腿亚洲一区二区图片| 91精品国产综合久久香蕉麻豆 | 麻豆精品视频在线观看| 波多野结衣中文一区| 国产视频一区在线播放| 精品无人码麻豆乱码1区2区| 日韩精品一区二区三区四区视频| 久久福利资源站| 久久影视一区二区| 亚洲综合色噜噜狠狠| 欧美中文字幕一区| 亚洲精品国产精华液| 99久久精品国产麻豆演员表| 亚洲一二三区视频在线观看| 色久优优欧美色久优优| 亚洲精品国产高清久久伦理二区| 欧美久久久久久久久中文字幕| 性久久久久久久| 日韩欧美一级片| 捆绑变态av一区二区三区| 亚洲国产精品二十页| 99综合影院在线| 一区二区三区在线免费| 欧美tickle裸体挠脚心vk| 国产美女av一区二区三区|