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

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

?? muxtklib.c

?? vxwork源代碼
?? C
?? 第 1 頁 / 共 4 頁
字號:
/* muxTkLib.c - MUX toolkit Network Interface Library *//* Copyright 1984 - 2001 Wind River Systems, Inc. *//*modification history--------------------02k,05nov01,vvv  fixed compilation warning02j,15oct01,rae  merge from truestack ver 02m, base 02i (SPR #70512 etc)02i,09nov00,spm  removed pNptCookie from END_OBJ for binary compatibility;                 fixed handling of output protocols02h,29oct00,ham  doc: removed reference to old SENS docs(SPR #35134).02h,24oct00,niq  Merging in RFC2233 changes from tor2_0.open_stack-f1 branch                 02f,18oct00,ann  applyingthe fix for Jitterbug #25 regarding                 mac address not being filled correctly                 02e,16may00,ann merging from post R1 on openstack branch to                 incorporate RFC2233 implementation                 02c,10mar00,ead fixed MIB-2 counter updates to use new                 RFC 2233 m2IfLib02g,18oct00,niq  Correct the order in which protocols are inserted in the                 muxTkBind call02f,16oct00,spm  merged version 02g from tor3_0_x branch (base version 02b):                 adds multiple SNARF protocol support, code cleanup, and                 backward compatibility fixes; overrides 02d and 02e changes02e,25apr00,pul  fixing SPR 3058402d,17apr00,pul  fixed TSR 153280, TSR 156655 which are part of the NPT patch02c,12apr00,pul  modified _muxTkSend() to free an MBlk that could be allocated                 by the addressForm() routine when the driver send() routine                 returns an error02b,06oct99,pul  removing references to mCastMapFunc and rtRequestFunc02a,04oct99,pul  adding a new semaphore to protect the Bib entry traversal 	 	 + fixed SPR # 2842701z,07jul99,pul  To modify description for man page generation01y,07jun99,sj   resurrect network layer pkt in _muxTkSend if endSend fails 01x,29apr99,pul  Upgraded NPT phase3 code to tor2.0.001w,29mar99,pul  altered bind query, member name01v,29mar99,pul  altered muxTkPollReceive to return correct error.01u,26mar99,pul  removed all muxSvcFunc related stuff.01t,25mar99,sj   muxEndRcvRtn undoes MAC header strip after calling outputFilter01s,24mar99,sj   MUX_ID is installed as pSpare by muxTkBind + hook re-org01r,19mar99,sj   copy protocol type in to the BIB in muxTkBindUpdate01q,18mar99,sj   some clean up: collocated future release code at the end 01p,09mar99,sj   muxTkBind can bind to ENDs01o,05mar99,sj   eliminated hooks; not cleanly though. next version will do that01n,22feb99,sj 	 added muxTkSend and muxTkPollSend and muxTkPollReceive01m,26jan99,sj 	 moved BIB entry definition from here to muxLibP.h01l,10Nov98,sj 	 more doc fixes01k,09Nov98,sj 	 made logMsgs in muxTkLibInit conditional on muxTkDebug01j,09Nov98,sj 	 return OK from muxTkLibInit01i,08Nov98,sj   populate hooks only if not done already01h,06Nov98,sj   forward declaration for nptHookRtn01g,03Nov98,pul  modified muxMCastMapFuncGet to accept net svc type and net                 drv type 01f,03Nov98,pul  added muxMCastMapFuncGet, muxMCastMapFuncDel and comments01e,03Nov98,pul  moved definition of MUX_BIND_ENTRY and MUX_SVC_FUNCS here.		 modified muxTkLibInit to populate nptHook. Allocated                 muxBindBase array during muxTkBibInit().01d,02Nov98,sj   doc update01c,27Oct98,pul  removed muxTkSend for future release 01b,10Oct98,pul  Introduced hooks for ipProto module01a,05Oct98,pul  Written*//*DESCRIPTIONThis library provides additional APIs offered by the Network ProtocolToolkit (NPT) architecture.  These APIs extend the original release ofthe MUX interface.A NPT driver is an enhanced END but retains all of the END's functionality.NPT also introduces the term "network service sublayer" or simply "servicesublayer" which is the component that interfaces between the network service(or network protocol) and the MUX.  This service sublayer may be built into the network service or protocol rather than being a separate component.INTERNALThe muxLib routines for binding protocols to END drivers also use certainroutines from this library so that the BIB accurately reflects all bindingsbetween protocols and drivers. Since all information in the BIB is alsostored elsewhere, the BIB array should be removed to avoid the predefinedlimit it imposes on the number of active bindings.INCLUDE FILES: vxWorks.h, taskLib.h, stdio.h, errno.herrnoLib.h, lstlib.h,logLib.h, string.h, m2Lib.h, net/if.h, bufLib.h, semlib.h, end.h, muxLib.h,muxTkLib.h, netinet/if_ether.h, net/mbuf.h*//* includes */#include "vxWorks.h"#include "taskLib.h"#include "stdio.h"#include "errno.h"#include "errnoLib.h"#include "lstLib.h"#include "logLib.h"#include "string.h"#include "m2Lib.h"#include "net/if.h"             /* Needed for IFF_LOAN flag. */#include "bufLib.h"#include "semLib.h"#include "end.h"		/* Necessary for any END as well as the MUX */#include "muxLib.h"#include "private/muxLibP.h"#include "muxTkLib.h"#include "netinet/if_ether.h"#include "net/mbuf.h"#include "memPartLib.h"#ifdef VIRTUAL_STACK#include "netinet/vsLib.h"#endif    /* VIRTUAL_STACK *//* defines */#define STREQ(A, B) (strcmp ( (A), (B)) == 0)#define TK_DRV_CHECK(pBib) ((((MUX_ID)pBib)->flags & BIB_TK_DRV) ? TRUE : FALSE)#define TK_DRV_SET(pBib)   (((MUX_ID)pBib)->flags |= BIB_TK_DRV)#define TK_DRV_CLEAR(pBib) (((MUX_ID)pBib)->flags &= ~BIB_TK_DRV)#define DRV_ENTRY_CHECK(pBib) ((((MUX_ID)pBib)->flags & BIB_DRV_ENTRY) ? TRUE :\				    FALSE)#define PROTO_ENTRY_CHECK(pBib) ((((MUX_ID)pBib)->flags & BIB_PROTO_ENTRY) ?\				TRUE : FALSE)/* externs *//* globals */SEM_ID muxBibLock = NULL; /* To protect the traversal of Bib entries */int muxTkDebug = 0;int muxMaxBinds = 8;    /* Default (unless overridden by project facility). *//* locals */LOCAL MUX_ID muxBindBase;/* forward declarations */LOCAL int  muxTkBibEntryGet (END_OBJ * pEnd);LOCAL void muxTkBibEntryFill (int index, int netSvcType, void * netCallbackId);LOCAL void muxTkBibEntryFree (MUX_ID muxId);LOCAL int  muxEndRcvRtn (void *, long, M_BLK_ID, LL_HDR_INFO *, void *);/******************************************************************************* muxTkDrvCheck - checks if the device is an NPT or an END interface** This function returns 1 if the driver indicated by <pDevName> is of the* Toolkit (NPT) paradigm, and 0 (zero) if it is an END.  This routine is* called by the network service sublayer so that it can discover the driver* type before it binds to it via the MUX.** INTERNAL:* All network drivers having the same device name but different unit numbers* are of the same type (NPT or END), so passing just the device name as an* argument is sufficient** .IP <pDevName>* Expects a pointer to a string containing the name of the device** RETURNS: 1 for an NPT driver, 0 for an END or other driver, or ERROR (-1) * if no device is found with the given name** SEE ALSO: muxTkBind(), muxBind()*/int muxTkDrvCheck    (    char * pDevName	/* device name */    )    {    int    count;    BOOL   found = FALSE;    /* find the BIB entry for the device and return the tkFlag status */    semTake (muxBibLock, WAIT_FOREVER);    for (count = 0; count < muxMaxBinds; count++)        {        if (STREQ(muxBindBase[count].devName, pDevName))	    {	    found = TRUE;            break;	    }        }    semGive (muxBibLock);    if (found)	return (TK_DRV_CHECK(&muxBindBase[count]));    else	return (ERROR);    }/******************************************************************************* muxTkCookieGet - returns the cookie for a device** This routine returns the cookie for a device.** RETURNS: a cookie to the device or NULL if unsuccessful**/void *muxTkCookieGet    (    char *pName,		/* Device Name */    int unit			/* Device Unit */    )    {    int    count = 0;    END_OBJ *pEnd;    pEnd = endFindByName (pName, unit);    if (pEnd == NULL)	{	errnoSet (S_muxLib_NO_DEVICE);	return (NULL);	}    /* find the BIB entry for the device */    for (; (count < muxMaxBinds) && (muxBindBase[count].pEnd != pEnd); count++);    /* if there is a match, return it */    if (muxBindBase[count].pEnd == pEnd)	return (&muxBindBase[count]);    return (NULL);    }  /******************************************************************************** muxTkBind - bind an NPT protocol to a driver** A network protocol, network service, or service sublayer uses this routine* to bind to a specific driver.  This bind routine is valid both for END and* NPT drivers, but the specified stack routine parameters must use the NPT* function prototypes, and are somewhat different from those used with* muxBind().** The driver is specified by the <pName> and <unit> arguments, (for example,* ln and 0, ln and 1, or ei and 0).** .IP <pName> 20* Expects a pointer to a character string that contains the name of the* device that this network service wants to use to send and receive packets.* .IP <unit>* Expects the unit number of the device of the type indicated by <pName>.* .IP <stackRcvRtn>* Expects a pointer to the function that the MUX will call when it* wants to pass a packet up to the network service.  For a description of* how to write this routine, see the  * .I "WindNet TCP/IP Network Programmer's Guide"* .IP <stackShutdownRtn>* Expects a pointer to the function that the MUX will call to* shutdown the network service.  For a description of how to write such* a routine, see the * .I "WindNet TCP/IP Network Programmer's Guide"* .IP <stackTxRestartRtn>* Expects a pointer to the function that the MUX will call after packet* transmission has been suspended, to tell the network service that it can* continue transmitting packets.  For a description of how to write this* routine, see the * .I "WindNet TCP/IP Network Programmer's Guide"* .IP <stackErrorRtn>* Expects a pointer to the function that the MUX will call to give errors* to the network service.  For a description of how to write this routine,* see the section* .I "WindNet TCP/IP Network Programmer's Guide"* .IP <type>* Expects a value that indicates the protocol type.  The MUX uses this type* to prioritize a network service as well as to modify its capabilities.  For* example, a network service of type MUX_PROTO_SNARF has the highest priority* (see the description of protocol prioritizing provided in* .I "WindNet TCP/IP Network Programmer's Guide."* Aside from MUX_PROTO_SNARF and MUX_PROTO_PROMISC, valid network service* types include any of the values specified in RFC 1700, or can be* user-defined.** The <stackRcvRtn> is called whenever the MUX has a packet of the specified* type.  If the type is MUX_PROTO_PROMISC, the protocol is considered* promiscuous and will get all of the packets that have not been consumed* by any other protocol.  If the type is MUX_PROTO_SNARF, it will get all of* the packets that the MUX sees.** If the type is MUX_PROTO_OUTPUT, this network service is an output protocol* and all packets that are to be output on this device are first passed to* <stackRcvRtn> routine rather than being sent to the device.  This can be* used by a network service that needs to send packets directly to another* network service, or in a loop-back test.  If the <stackRcvRtn> returns OK,* the packet is consumed and as no longer available.  The <stackRcvRtn> for an* output protocol may return ERROR to indicate that it wants to look at the* packet without consuming it.* .IP <pProtoName>* Expects a pointer to a character string for the name of this* network service.  This string can be NULL, in which case a network service* name is assigned internally.* .IP <pNetCallbackId>* Expects a pointer to a structure defined by the protocol.  This argument* is passed up to the protocol as the first argument of all the callbacks.* This argument corresponds to the <pSpare> argument in muxBind()* .IP <pNetSvcInfo>* Reference to an optional structure specifying network service layer* information needed by the driver* .IP <pNetDrvInfo>* Reference to an optional structure specifying network driver information* needed by the network protocol, network service, or service sublayer** RETURNS: A cookie that uniquely represents the binding instance, or NULL* if the bind fails.** ERRNO: S_muxLib_NO_DEVICE, S_muxLib_END_BIND_FAILED, S_muxLib_NO_TK_DEVICE,* S_muxLib_NOT_A_TK_DEVICE, S_muxLib_ALREADY_BOUND, S_muxLib_ALLOC_FAILED** SEE ALSO: muxBind()**/void * muxTkBind    (    char * pName,		/* interface name, for example, ln, ei,... */    int    unit,		/* unit number */    BOOL   (*stackRcvRtn) (void*,long, M_BLK_ID, void *),                                /* receive function to be called. */    STATUS (*stackShutdownRtn) (void *),                                /* routine to call to shutdown the stack */    STATUS (*stackTxRestartRtn) (void *),                                /* routine to tell the stack it can transmit */    void   (*stackErrorRtn) (void*, END_ERR*),                                /* routine to call on an error. */    long   type,		/* protocol type from RFC1700 and many */                                /* other sources (for example, 0x800 is IP) */    char * pProtoName,          /* string name for protocol  */    void * pNetCallbackId,      /* returned to network service sublayer during recv */    void * pNetSvcInfo,         /* reference to netSrvInfo structure */    void * pNetDrvInfo          /* reference to netDrvInfo structure */    )    {    NET_PROTOCOL * pNewProto = NULL;    NET_PROTOCOL * pNode = NULL;    NODE *         pFinal = NULL;    /* Last snarf protocol, if any. */    END_OBJ *      pEnd;    int            index = 0;    FUNCPTR        ioctlRtn = NULL;    BOOL           tkFlag = FALSE;    if (muxTkDebug)	logMsg ("Start of muxTkBind\n", 1, 2, 3, 4, 5, 6);    /* Check to see if we have a valid device. */    pEnd = endFindByName (pName, unit);    if (pEnd == NULL)        {        errnoSet (S_muxLib_NO_DEVICE);        return (NULL);        }    if (muxTkDebug)	logMsg ("Found the END object\n", 1, 2, 3, 4, 5, 6);    /*     * Query for the END bind routine and call it if available;     * if the driver rejects the bind there's no need to proceed     */    if((ioctlRtn = pEnd->pFuncTable->ioctl) != NULL)        {	FUNCPTR   bindRtn = NULL;	END_QUERY endQuery = {END_BIND_QUERY, 4, {0,0,0,0} };	if ((*ioctlRtn) (pEnd,EIOCQUERY, &endQuery) == OK)	    {	    bindRtn = *(FUNCPTR *)endQuery.queryData;	    if ((*bindRtn) (pEnd, pNetSvcInfo,			    pNetDrvInfo, type) == ERROR)		{		if (muxTkDebug)		    logMsg ("muxTkBind: EndBind failed\n", 1, 2, 3, 4, 5, 6);		return (NULL);		}	    }	}    /* check if we are allowed to continue with this protocol type */    if (type == MUX_PROTO_OUTPUT)	{	/*	 * Check to see if this is an OUTPUT protocol and allow only	 * one output filter per END	 */        if (pEnd->outputFilter)            {            errnoSet (S_muxLib_ALREADY_BOUND);            return (NULL);            }	}    else	{        /*         * Get the appropriate place in the protocol list if necessary.         * For standard protocols, also check if the protocol number         * is available.         */         if (type != MUX_PROTO_PROMISC)            {            /* Get the first standard protocol and last snarf protocol, if any. */            if (pEnd->snarfCount)                {                pFinal = lstNth (&pEnd->protocols, pEnd->snarfCount);                pNode = (NET_PROTOCOL *)lstNext (pFinal);                }            else                pNode = (NET_PROTOCOL *)lstFirst (&pEnd->protocols);            }        if (type != MUX_PROTO_SNARF && type != MUX_PROTO_PROMISC)            {            for ( ; pNode != NULL;                  pNode = (NET_PROTOCOL *)lstNext (&pNode->node) )                {                if (pNode->type == type)                    {                    errnoSet (S_muxLib_ALREADY_BOUND);                    return (NULL);                    }                }            }	}   /* find an empty slot in the BIB */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
不卡一区二区三区四区| 久久人人97超碰com| 日韩午夜精品电影| 亚洲欧洲av色图| 国产一区二区三区最好精华液| 一本大道av一区二区在线播放| 2020国产成人综合网| 五月天亚洲婷婷| 色婷婷精品大在线视频| 国产精品免费视频网站| 国产一区二区免费视频| 日韩欧美在线123| 天天操天天干天天综合网| 91女人视频在线观看| 中文字幕欧美区| 国产精品自拍一区| 日韩欧美在线综合网| 日本中文一区二区三区| 欧美日韩高清一区二区不卡| 伊人夜夜躁av伊人久久| 91在线云播放| 一区二区三区在线高清| 91在线国产观看| 国产精品黄色在线观看| 成人国产精品免费观看视频| 久久久精品欧美丰满| 国产真实乱偷精品视频免| 欧美一区二区精品在线| 久久成人久久爱| 久久久久久久久久久电影| 国产精品一区二区不卡| 亚洲国产高清在线| 99精品国产99久久久久久白柏| 国产精品嫩草影院com| 91亚洲国产成人精品一区二区三| 自拍偷拍国产亚洲| 91浏览器打开| 亚洲成人黄色小说| 日韩网站在线看片你懂的| 国内精品国产成人| 欧美经典一区二区| 91丝袜呻吟高潮美腿白嫩在线观看| 亚洲欧美精品午睡沙发| 欧美日韩精品系列| 麻豆一区二区99久久久久| 2023国产一二三区日本精品2022| 国产麻豆精品95视频| 亚洲天天做日日做天天谢日日欢| 一本大道av伊人久久综合| 日韩精品一二区| 久久久精品中文字幕麻豆发布| av亚洲精华国产精华| 亚洲综合色丁香婷婷六月图片| 欧美精品粉嫩高潮一区二区| 国内成+人亚洲+欧美+综合在线 | 亚洲天堂网中文字| 欧美午夜免费电影| 国内久久婷婷综合| 亚洲黄色免费电影| 91精品国产色综合久久| 风间由美一区二区三区在线观看| 自拍偷拍国产精品| 日韩欧美激情一区| 99国产麻豆精品| 久久99久久精品| 亚洲精品日韩一| 精品国产sm最大网站免费看| 99久久精品免费| 男人操女人的视频在线观看欧美| 亚洲欧洲国产专区| 日韩欧美一级在线播放| 99视频有精品| 久久精品国产第一区二区三区| 国产精品色噜噜| 日韩免费看的电影| 日本国产一区二区| 成人a级免费电影| 老司机精品视频导航| 一区二区日韩电影| 国产精品久久久久9999吃药| 欧美乱妇15p| 91丨porny丨蝌蚪视频| 精品无人区卡一卡二卡三乱码免费卡| 国产精品久久久久9999吃药| 欧美va日韩va| 欧美日本国产视频| 色综合亚洲欧洲| 国产成人精品一区二| 美女在线观看视频一区二区| 亚洲综合色区另类av| 亚洲天堂av老司机| 国产欧美精品在线观看| 精品美女在线观看| 69精品人人人人| 欧美日韩中文字幕一区二区| 一本大道av一区二区在线播放| 国产盗摄精品一区二区三区在线 | 日韩黄色一级片| 一区二区三区免费在线观看| 国产精品久久午夜| 国产欧美日韩在线| 国产日韩欧美麻豆| 久久久久久一二三区| 精品处破学生在线二十三| 日韩一本二本av| 日韩一区二区麻豆国产| 欧美精品v国产精品v日韩精品| 色噜噜狠狠成人中文综合 | 国产一区二区三区免费在线观看| 日韩成人精品在线| 久久精品国产**网站演员| 天堂精品中文字幕在线| 亚洲bt欧美bt精品| 青草av.久久免费一区| 蜜桃久久久久久| 激情综合网av| 国产精品18久久久久久久久| 国产在线精品一区二区不卡了 | 亚洲成av人片一区二区三区 | 国产精品成人在线观看| 国产精品国产精品国产专区不片| 专区另类欧美日韩| 一区二区三区中文字幕电影 | 亚洲精品菠萝久久久久久久| 日韩一区中文字幕| 曰韩精品一区二区| 午夜精品一区二区三区免费视频 | 久久精品久久精品| 黄页网站大全一区二区| 高清国产一区二区| 91蜜桃婷婷狠狠久久综合9色| 在线视频中文字幕一区二区| 欧美日韩成人在线一区| 精品久久人人做人人爰| 日韩一区中文字幕| 青青草一区二区三区| 精品一区二区三区av| 99国产精品国产精品毛片| 欧美色窝79yyyycom| 精品99一区二区| 亚洲品质自拍视频网站| 人人精品人人爱| 成人av片在线观看| 欧美一级二级三级乱码| 欧美国产欧美综合| 日韩精品三区四区| 成人18精品视频| 欧美一区三区四区| 国产精品久久久久久久久动漫| 五月天激情综合网| 成人av网站在线观看免费| 欧美日本韩国一区| 国产精品三级电影| 奇米亚洲午夜久久精品| 99在线精品一区二区三区| 日韩视频永久免费| 亚洲一区二区三区中文字幕在线 | 婷婷综合久久一区二区三区| 国产福利一区二区三区视频| 欧美日韩一二区| 国产精品理论片| 国产一区福利在线| 在线不卡一区二区| 亚洲天堂久久久久久久| 韩国一区二区三区| 欧美午夜不卡在线观看免费| 欧美激情一区二区三区不卡 | 精品国产成人在线影院| 一区二区三区视频在线看| 国产激情精品久久久第一区二区| 欧美精品一级二级| 亚洲精品久久7777| 国产激情视频一区二区三区欧美 | 欧美另类一区二区三区| 亚洲欧美成aⅴ人在线观看| 国产精品456| 精品日韩在线观看| 免费人成在线不卡| 欧美精品v国产精品v日韩精品| 一区二区三区四区乱视频| 91尤物视频在线观看| 欧美激情在线免费观看| 国产精品一区在线观看乱码| 精品日产卡一卡二卡麻豆| 日韩国产欧美三级| 欧美一区二区视频网站| 亚洲6080在线| 欧美日韩一区二区在线观看| 亚洲久本草在线中文字幕| 99re亚洲国产精品| 亚洲欧美日韩久久精品| 91麻豆免费视频| 亚洲青青青在线视频| 99久久久精品免费观看国产蜜| 国产欧美日本一区视频| jlzzjlzz国产精品久久| 中文字幕在线不卡视频| av电影天堂一区二区在线| 亚洲精品中文字幕乱码三区| 91免费国产视频网站|