亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
成人在线综合网| 亚洲日本欧美天堂| 成人va在线观看| 国产精品无码永久免费888| 色综合久久中文综合久久97| 一区二区三区**美女毛片| 欧美一级黄色片| 美女精品自拍一二三四| 国产精品欧美精品| 91豆麻精品91久久久久久| 青青草成人在线观看| 国产亚洲精品久| 欧美日韩国产精品成人| 亚洲伊人伊色伊影伊综合网| 精品国产乱码久久久久久浪潮| 不卡的电影网站| 亚洲国产精品一区二区尤物区| 精品国产网站在线观看| 在线观看日韩高清av| 国产最新精品免费| 亚洲成av人片一区二区| 久久精品综合网| 51久久夜色精品国产麻豆| 国产高清不卡一区| 午夜精品久久久久久久99水蜜桃| 亚洲国产精品高清| 欧美电影免费观看高清完整版在线 | 欧美一级午夜免费电影| 国产成人在线观看免费网站| 亚洲精品欧美综合四区| 国产无人区一区二区三区| 欧美精品1区2区3区| 91丨porny丨中文| 国产成人精品免费网站| 麻豆成人在线观看| 亚洲成a人片在线不卡一二三区| 国产情人综合久久777777| 91精品国产乱| 日韩亚洲电影在线| 日韩片之四级片| 欧美成人a∨高清免费观看| 欧美一区二区三区视频| 欧美一区二区三区啪啪| 日韩欧美国产高清| 精品久久一区二区| 久久久久久影视| 亚洲国产精品av| 国产精品成人在线观看| 亚洲欧洲另类国产综合| 亚洲美女屁股眼交3| 夜夜嗨av一区二区三区网页| 亚洲电影激情视频网站| 免费不卡在线观看| 国产乱子伦视频一区二区三区 | 欧美激情综合五月色丁香| 国产欧美日韩不卡免费| 国产精品美女久久久久久久久久久| 国产精品天天看| 伊人婷婷欧美激情| 无吗不卡中文字幕| 精品一区二区三区欧美| 福利一区在线观看| 欧美亚洲高清一区| 日韩欧美国产综合一区| 欧美国产激情二区三区| 亚洲黄色av一区| 日本午夜一本久久久综合| 久久99精品国产麻豆不卡| 风间由美一区二区av101 | 国产夜色精品一区二区av| 欧美国产一区二区| 亚洲精品欧美激情| 麻豆一区二区三区| 成人性生交大合| 欧美猛男男办公室激情| 2020国产精品| 亚洲激情一二三区| 蜜桃视频在线观看一区| 成人精品国产免费网站| 欧美三级视频在线| 欧美激情中文不卡| 亚洲成国产人片在线观看| 韩日精品视频一区| 91激情在线视频| 久久综合国产精品| 亚洲精品国产视频| 日本欧洲一区二区| 91网站黄www| 欧美成人性战久久| 一区二区三区欧美日韩| 国产精一区二区三区| 欧美日韩精品一区二区三区四区 | av午夜精品一区二区三区| 欧美喷潮久久久xxxxx| 中文av一区二区| 奇米777欧美一区二区| 91毛片在线观看| 欧美大片一区二区| 亚洲国产精品嫩草影院| 国产成人午夜片在线观看高清观看| 欧美色图在线观看| 国产精品国产自产拍在线| 另类小说综合欧美亚洲| 91久久国产最好的精华液| 国产精品麻豆网站| 国产伦理精品不卡| 日韩女优av电影| 午夜精品久久久久久久久久| 91在线视频网址| 日本一区二区三区久久久久久久久不| 日韩成人精品在线观看| 色婷婷av一区二区三区软件 | 欧美日韩在线播放一区| 1区2区3区国产精品| 极品少妇一区二区| 欧美精品乱人伦久久久久久| 亚洲欧美国产高清| 成人精品一区二区三区中文字幕| 精品免费一区二区三区| 一区2区3区在线看| 色综合久久综合| 亚洲精品美国一| 不卡一二三区首页| 国产精品网友自拍| 国产.精品.日韩.另类.中文.在线.播放| 欧美电影免费观看高清完整版在线观看| 视频一区视频二区中文| 欧美色涩在线第一页| 亚洲国产一区在线观看| 在线亚洲免费视频| 亚洲一区二区三区中文字幕| 色94色欧美sute亚洲13| 综合久久一区二区三区| 99精品视频在线播放观看| 综合欧美一区二区三区| 色噜噜夜夜夜综合网| 中文字幕中文字幕一区二区| 福利一区二区在线观看| 国产亚洲欧美中文| 波多野结衣中文字幕一区二区三区| 国产欧美一区二区精品性色超碰| 国产黄人亚洲片| 亚洲国产高清在线观看视频| 国产99久久久国产精品免费看| 久久久精品影视| 成人黄色777网| 亚洲欧美精品午睡沙发| 91高清在线观看| 午夜精品久久久久久不卡8050| 4hu四虎永久在线影院成人| 美女视频一区二区三区| www久久久久| av在线不卡观看免费观看| 亚洲精品视频免费观看| 欧美日韩午夜精品| 蜜臀av性久久久久蜜臀aⅴ| 精品国产乱码久久久久久蜜臀| 国产jizzjizz一区二区| 国产亚洲欧美日韩在线一区| jiyouzz国产精品久久| 亚洲一区二区四区蜜桃| 欧美一区二区三区在线观看视频| 久久超碰97中文字幕| 国产欧美一区在线| 欧美在线一二三四区| 美脚の诱脚舐め脚责91| 国产午夜精品理论片a级大结局| 99久久精品免费观看| 亚洲成人精品一区| 久久午夜羞羞影院免费观看| 99久久99久久精品免费观看| 亚洲丶国产丶欧美一区二区三区| 亚洲精品在线观看网站| 成人亚洲一区二区一| 午夜激情久久久| 麻豆精品久久久| 欧美精品一二三区| 国产专区欧美精品| 一区二区三区中文免费| 日韩视频免费观看高清完整版 | 国产剧情一区二区三区| 亚洲黄色录像片| 久久久美女艺术照精彩视频福利播放| av在线播放不卡| 久88久久88久久久| 一区二区三区四区在线| 久久午夜色播影院免费高清| 成人激情开心网| 日韩av中文字幕一区二区| 欧美国产成人精品| 91精品国产综合久久久久久漫画| 国产成人一区在线| 日产精品久久久久久久性色| 中文字幕在线观看一区| 精品福利在线导航| 精品视频全国免费看| 成人精品免费视频| 国产真实精品久久二三区| 亚洲福利电影网| 亚洲欧洲综合另类在线|