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

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

?? muxtklib.c

?? vxworks的完整的源代碼
?? C
?? 第 1 頁(yè) / 共 4 頁(yè)
字號(hào):
/* 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 */

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久在线观看免费| 黑人巨大精品欧美一区| 亚洲视频综合在线| 国产精品久久福利| 国产精品美女www爽爽爽| 国产精品免费视频观看| 国产精品网站在线播放| 国产精品成人一区二区艾草| 亚洲图片激情小说| 亚洲激情自拍视频| 亚洲图片欧美视频| 亚洲成人黄色小说| 久久激情综合网| 狠狠色丁香久久婷婷综| 国产精品一区二区久久精品爱涩 | 91精品福利视频| 色88888久久久久久影院野外| 欧美这里有精品| 8x8x8国产精品| 精品国产电影一区二区| 国产女人aaa级久久久级| 国产精品全国免费观看高清| 亚洲精品视频在线| 五月婷婷综合在线| 久久99精品国产.久久久久| 国产精品一二一区| 97久久久精品综合88久久| 欧美色视频在线| 欧美大片在线观看一区二区| 久久精品欧美一区二区三区不卡| 中文字幕av一区 二区| 亚洲乱码国产乱码精品精的特点 | 精品一区二区三区免费视频| 从欧美一区二区三区| 欧亚洲嫩模精品一区三区| 91精品在线麻豆| 国产亚洲欧美日韩日本| 亚洲欧美区自拍先锋| 美女任你摸久久| 波多野结衣中文一区| 欧美日韩国产大片| 国产婷婷色一区二区三区| 亚洲精品成a人| 国产在线精品国自产拍免费| 色婷婷久久久久swag精品 | 欧美韩国日本不卡| 亚洲高清视频的网址| 国产精品中文字幕欧美| 一本高清dvd不卡在线观看| 精品乱码亚洲一区二区不卡| 综合亚洲深深色噜噜狠狠网站| 日本欧美韩国一区三区| 福利电影一区二区三区| 4438x亚洲最大成人网| 国产精品女上位| 老司机一区二区| 91久久线看在观草草青青| 精品免费一区二区三区| 一区二区欧美精品| 国产成人av电影| 欧美一区二区三区播放老司机| 国产精品久久久久影院亚瑟 | 久久精品一二三| 亚洲成av人片在线观看无码| 福利视频网站一区二区三区| 欧美一区二区三区啪啪| 亚洲精品网站在线观看| 风间由美一区二区av101| 91精品国产高清一区二区三区蜜臀 | 99久久伊人精品| 欧美精品一区二区三区视频| 亚洲高清免费观看 | 欧美日韩精品一区二区三区四区 | 精品美女被调教视频大全网站| 亚洲一区在线视频观看| 成人av网址在线观看| 精品久久久久一区| 日韩黄色免费电影| 欧美中文字幕亚洲一区二区va在线 | 欧美欧美欧美欧美首页| 亚洲欧美成人一区二区三区| 极品少妇一区二区三区精品视频| 欧美日韩国产综合视频在线观看| 亚洲激情中文1区| 成年人国产精品| 国产日韩影视精品| 国产精选一区二区三区| 欧美mv日韩mv| 美腿丝袜亚洲色图| 欧美精品123区| 日韩激情中文字幕| 欧美片在线播放| 偷偷要91色婷婷| 欧美丝袜丝交足nylons| 一区二区三区四区精品在线视频| 99视频有精品| 亚洲欧美日韩国产中文在线| 97se亚洲国产综合自在线| 国产精品视频第一区| 国产v日产∨综合v精品视频| 久久久青草青青国产亚洲免观| 激情欧美一区二区| 久久久国产一区二区三区四区小说 | 国产精品一二三在| 国产日韩欧美制服另类| 高清av一区二区| 中文字幕巨乱亚洲| www.视频一区| 一区二区三区中文免费| 91国偷自产一区二区三区成为亚洲经典 | 精品国产一区二区三区忘忧草| 久久精品99国产精品日本| 欧美大片拔萝卜| 国产麻豆9l精品三级站| 国产精品乱人伦中文| 91免费在线播放| 亚洲高清一区二区三区| 欧美一级一区二区| 国内成+人亚洲+欧美+综合在线| 久久久久九九视频| 99久久久精品免费观看国产蜜| 亚洲欧美日本韩国| 777午夜精品免费视频| 激情图区综合网| 中文子幕无线码一区tr| 色天使色偷偷av一区二区| 五月婷婷久久综合| 久久午夜老司机| 成人va在线观看| 欧美日韩成人综合在线一区二区| 一区二区三区成人| 7777精品久久久大香线蕉| 国产一区二区看久久| 成人免费在线视频观看| 欧美日韩不卡在线| 国产成人精品1024| 一区二区免费看| 欧美成人性战久久| 91啪在线观看| 蜜桃91丨九色丨蝌蚪91桃色| 国产精品无遮挡| 欧美精品在欧美一区二区少妇| 久久99精品国产91久久来源| 亚洲三级电影网站| 欧美一区二区三区免费观看视频 | 日韩免费性生活视频播放| 成人自拍视频在线观看| 亚洲成人777| 日本一区二区三区在线观看| 欧美在线短视频| 国产高清亚洲一区| 丝袜美腿亚洲一区二区图片| 欧美国产综合色视频| 7777精品伊人久久久大香线蕉经典版下载 | 久久国产尿小便嘘嘘尿| 亚洲欧洲日产国码二区| 91精品国产综合久久精品app| 国产v日产∨综合v精品视频| 天天综合天天做天天综合| 国产精品素人视频| 日韩一级片网站| 欧美中文一区二区三区| 国产宾馆实践打屁股91| 日本亚洲三级在线| 亚洲人成在线观看一区二区| 久久综合九色综合久久久精品综合| 99国产麻豆精品| 国产精品12区| 免费观看久久久4p| 一区二区高清免费观看影视大全| 国产亚洲欧美日韩在线一区| 91精品国产综合久久香蕉麻豆| 91影视在线播放| 成人蜜臀av电影| 国产精品自产自拍| 青青草97国产精品免费观看无弹窗版 | 亚洲国产aⅴ成人精品无吗| 欧美极品另类videosde| 欧美zozozo| 欧美一区二区三区免费视频 | 亚洲人快播电影网| 欧美国产欧美综合| 精品国产一区二区三区不卡| 欧美女孩性生活视频| 在线欧美日韩国产| 91在线观看一区二区| 粉嫩蜜臀av国产精品网站| 激情图区综合网| 精品一区二区在线看| 蜜桃视频在线观看一区| 五月天精品一区二区三区| 亚洲综合在线电影| 亚洲日本一区二区| 国产精品三级av| 国产精品免费看片| 中文字幕中文字幕在线一区| 亚洲国产精华液网站w| 国产视频视频一区| 国产日韩精品一区二区浪潮av| 久久久国产精品麻豆|