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

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

?? muxlib.c

?? vxworks的完整的源代碼
?? C
?? 第 1 頁 / 共 5 頁
字號:
/* muxLib.c - MUX network interface library *//* Copyright 1984 - 2002 Wind River Systems, Inc. *//*modification history--------------------03z,10may02,wap  Remove unnecessary redeclaration of endList (SPR #74201)03y,07may02,kbw  man page edits03x,25apr02,vvv  return on muxTkBindUpdate error in muxBind (SPR #74042)03w,22apr02,wap  Don't call muxTkUnbindUpdate() on invalid/free()'ed pointer                 (SPR #74861)03v,05nov01,vvv  fixed compilation warnings03u,26oct01,vvv  added NULL check for END object in muxEndFlagsNotify		 (SPR #69540)03t,15oct01,rae  merge from truestack ver 03o, base 02n(?) (SPRs 69573,70722,                 64471, 64473, 64406, 32626, ROUTER_STACK, etc.)03s,14jun01,vvv  fixed compilation warnings03r,08jun01,vvv  added missing closing for-loop closing bracket in 		 muxReceive03q,10apr01,rae  muxReceive only calls interested protocols (SPR #65557)03p,09nov00,spm  removed pNptCookie from END_OBJ for binary compatibility03o,07nov00,spm  removed nptFlag from END_OBJ for T2 END binary compatibility03n,30oct00,kbw  putting back the NOMANUAL per request of dgross03m,30oct00,kbw  removing NOMANUAL assignemnt to muxReceive, OK'd by GNN03m,24oct00,niq  Merging in RFC2233 changes fron tor2_0.open_stack-f1 branch                 03n,24oct00,ann  fixed a bug in the EIOCGMCASTLIST part of                 muxIoctl                 03m,16may00,ann  merging from post R1 on openstack branch to                 incorporate RFC2233 implementation                 03k,10mar00,ead  fixed MIB-2 counter updates to use new                  RFC 2233 m2IfLib03l,17oct00,niq  Update pEnd->snarfCount only when protocol addition is                 complete03k,16oct00,spm  merged from version 03a of tor3_0_x branch (base version 02n):                 adds multiple SNARF protocol support, bug fixes and cleanup,                 and backward compatibility fixes03i,07jul99,pul  modify description for man page generation03h,30apr99,pul  muxIoctl: check for error before calling muxEndFlagsNotify 03g,29apr99,pul  muxPollSend: Call endpacketDataGet directly instead of 		 muxPacketDataGet 03f,29apr99,pul  Upgraded NPT phase3 code to tor2.0.003e,31mar99,spm  removed \040 codes from muxMCastAddrGet() entry (SPR #26268)03d,30mar99,pul  removed all references to muxSvcFunc and muxMCastFunc03c,25mar99,sj   detect if the end.flags actually changed before notifying all03b,25mar99,sj   muxDevUnload does not free pEnd->devObject.pDevice + misc03a,24mar99,sj   before calling Error,Restart or Shutdown callbacks check for              	 MUX_BIND or MUX_TK_BIND02z,19mar99,sj   no need to notify the protocol that changed the END flags02y,18mar99,sj   in muxLibInit return status returned by muxTkBibInit02x,18mar99,sj   added notification to protocols when END flags change02w,05mar99,sj   eliminated hooks; not cleanly though. next version will do that02v,03mar99,pul  fix for SPR# 2428502u,02mar99,pul  fixed the return value for muxUnbind(): SPR# 2429302t,13nov98,n_s  added muxDevStopAll function.  Added reboot hook in                 muxLibInit so that muxDevStop all is called prior to reboot.                  spr #2322902s,10nov98,sj   more doc changes for NPT02r,03nov98,sj   added check for NPT driver in muxSend + doc fixes02q,12oct98,pul  modified the NPT hooks for compatibility with SENS 02p,08oct98,sj   making DOC fixes for NPT02o,07oct98,sj   added npt hooks02n,09sep98,ham  corrected the comprison of ifTypes and MUX_MAX_IFTYPE.02m,09sep98,ham  cont'd SPR#22298.02l,08sep98,ham  moved MUX_MAX_TYPE to h/muxLib.h, SPR#22298.02k,21aug98,n_s  fixed ifInUnknownProtos update in muxReceive, ifOutNUcastPkts                 update in muxSend (). spr 21074.02j,16jul98,n_s  Added semGive () to ERROR condition for driver unload call in                 muxDevUnload ().02i,13jul98,n_s  fixed muxDevLoad () to limit device name strcpy () to                  END_NAME_MAX.  spr # 2164202h,13jul98,n_s  fixed muxBind () to clear malloc'd NET_PROTOCOL. spr # 2164402g,24jun98,n_s  fixed muxUnbind () to check NET_PROTOCOL node for type 02f,15jun98,n_s  fixed muxDevUnload () and muxUnbind (). spr # 2154202e,13feb98,n_s  fixed endFindByName () to handle multiple devices.                  spr # 21055.02d,02feb98,spm  removed unneeded '&' operator and corrected spacing02c,17jan98,gnn  fixed a bug in the output filter with passing LL_HDR_INFO.02b,17jan98,gnn  changed output routines so they can be BOOL like receive                 routines.02a,17jan98,kbw  made man page fixes01z,14dec97,kbw  made man page fixes01y,10dec97,kbw  made man page fixes01x,08dec97,gnn  END code review fixes.01w,21oct97,kbw  made man page fixes01v,08oct97,vin  fixed muxPacketAddrGet().01u,07oct97,vin  fixed a problem with calling muxIoctl, removed IFF_LOAN01t,03oct97,gnn  added error routine and cleaned up function prototypes01s,25sep97,gnn  SENS beta feedback fixes01r,25aug97,gnn  documenatation changs to make mangen happy.01q,25aug97,gnn  fixed a bug in the restart routine.01p,22aug97,gnn  updated polled mode support.01o,19aug97,gnn  changes due to new buffering scheme.01n,12aug97,gnn  changes necessitated by MUX/END update.01m,31jul97,kbw  fixed man page bug that broke build, comment in comment01l,31jul97,kbw  fixed man page problems found in beta review01k,15may97,gnn  removed many warnings.                 added code to handle MUX_PROTO_OUTPUT.01j,30apr97,jag  man edits for funtion muxBufInit()01i,17apr97,gnn  removed muxDevStart from muxDevLoad.01h,07apr97,gnn  added errnoSet calls                 added muxDevNameGet.                 modified the way muxDevLoad works.01g,12mar97,gnn  fixed a bug in muxReceive's calling API.01f,03feb97,gnn  Modified muxBuf code to be more generic and support other,                 non-TMD systems.01e,29jan97,gnn  Removed the code to start the tNetTask.01d,21jan97,gnn  Added muxBuf* code to handle buffering system.                 Added code to handle the new SNARF option.                 Removed all loaning and reference counting stuff.                 Removed TxBuf stuff.01e,23oct96,gnn  name changes to follow coding standards.                 removed some compiler warnings.01d,22oct96,gnn  added routines to start and stop drivers.                 added code to handle buffer loaning startup requests on                 both the protocol and device side.                 replaced netVectors with netBuffers.01c,23sep96,gnn	 moved some generic code to here from the driver.01b,22Apr96,gnn	 filling in with real code.01a,21Mar96,gnn	 written.*/ /*DESCRIPTIONThis library provides the routines that define the MUX interface, a facilitythat handles communication between the data link layer and the networkprotocol layer.  Using the MUX, the VxWorks network stack has decoupled thedata link and network layers.  Drivers and services no longer need knowledge of each other's internals.  This independence makes it much easier to add new drivers or services.  For example, if you add a new MUX-based "END" driver, all existing MUX-based services can use the new driver.  Likewise, if you add a new MUX-based service, any existing END can use the MUX to access the new service.  INCLUDE FILES: errno.h, lstLib.h, logLib.h, string.h, m2Lib.h, bufLib.h, if.h,end.h, muxLib.h, vxWorks.h, taskLib.h, stdio.h, errnoLib.h, if_ether.h,netLib.h, semLib.h, rebootLib.hTo use this feature, include the following component:INCLUDE_MUXSEE ALSO.I "VxWorks AE Network Programmer's Guide"*//* 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 "netinet/if_ether.h"#include "netLib.h"		/* Needed for netJobAdd */#include "bufLib.h"#include "semLib.h"#include "end.h"                /* Necessary for any END as well as the MUX */#include "muxLib.h"#include "muxTkLib.h"#include "private/muxLibP.h"#include "rebootLib.h"#include "memPartLib.h"#ifdef VIRTUAL_STACK #include "netinet/vsLib.h"#endif    /* VIRTUAL_STACK *//* defines */#define STREQ(A, B) (strcmp(A, B) == 0 ? 1 : 0)#define NET_TASK_NAME "tNetTask"#define TK_DRV_CHECK(pBib) ((((MUX_ID)pBib)->flags & BIB_TK_DRV) ? TRUE : FALSE)#define GET_IFMTU(a) (((a)->flags & END_MIB_2233) ? \	    (a)->pMib2Tbl->m2Data.mibIfTbl.ifMtu : (a)->mib2Tbl.ifMtu)/* externs *//* globals *//* locals */LOCAL muxLib muxLibState;LOCAL LIST endList;#ifndef	STANDALONE_AGENTLOCAL LIST addrResList[MUX_MAX_IFTYPE + 1]; /* IFT_xxx begins from 1 */#endif	/* STANDALONE_AGENT *//* forward declarations */LOCAL M_BLK_ID 	*pMuxPollMblkRing;LOCAL void 	**ppMuxPollDevices;LOCAL int 	muxPollDevCount;LOCAL int 	muxPollDevMax;IMPORT STATUS muxTkReceive (void *, M_BLK_ID, long, long, BOOL, void *);LOCAL void    muxEndFlagsNotify (void * pCookie, long endFlags); LOCAL STATUS  muxDevStopAllImmediate (void);/********************************************************************************* muxLibInit - initialize global state for the MUX** This routine initializes all global states for the MUX.** RETURNS: OK or ERROR.*/STATUS muxLibInit (void)    {#ifndef	STANDALONE_AGENT    int count;#endif 	/* STANDALONE_AGENT */    STATUS status = OK;    if (muxLibState.lock != NULL)        return (OK);    muxLibState.debug = FALSE;    muxLibState.lock = NULL;    muxLibState.mode = MUX_MODE_NORM;    muxLibState.priority = MUX_POLL_TASK_PRIORITY; /* Lame */    muxLibState.taskDelay = MUX_POLL_TASK_DELAY; /* Lame */    muxLibState.taskID = 0;    muxLibState.lock = semBCreate(SEM_Q_PRIORITY, SEM_FULL);    if (muxLibState.lock == NULL)        return (ERROR);#ifndef	STANDALONE_AGENT    /*     * Initialize our lists to empty.     * addrResList[0] will not be used because IFT_xxx begins from 1     */    for (count = 0; count <= MUX_MAX_IFTYPE; count++)        lstInit (&addrResList[count]);#endif 	/* STANDALONE_AGENT */        /* initialize END list */    lstInit (&endList);        /* Add hook to stop all ENDs when the system reboots */    if (rebootHookAdd ((FUNCPTR) muxDevStopAllImmediate) != OK)	{	return (ERROR);	}    /* Initialize BIB. */    status = muxTkBibInit();    if (muxLibState.debug)        logMsg ("End of muxLibInit\n", 0, 0, 0, 0, 0, 0);    return (status);    }    /******************************************************************************* * muxDevLoad - load a driver into the MUX* * The muxDevLoad() routine loads a network driver into the MUX.  Internally, * this routine calls the specified <endLoad> routine to initialize the* software state of the device.  After the device is initialized,* you must call muxDevStart() to start the device. * .IP <unit> 15* Expects the unit number of the device. * .IP <endLoad> * Expects a pointer to the network driver's endLoad() or nptLoad() entry* point. * .IP <pInitString> * Expects a pointer to an initialization string, typically a colon-delimited* list of options.  The muxDevLoad() routine passes this along blindly to * the <endLoad> function.* .IP <loaning> * Currently unused.* .IP <pBSP>* The MUX blindly passes this argument to the driver, which may or may not * use it.  Some BSPs use this parameter to pass in tables of functions that * the diver can use to deal with the particulars of the BSP. ** VXWORKS AE PROTECTION DOMAINS* Under VxWorks AE, you can call muxDevLoad() from within the kernel * protection domain only, and the data referenced in the <endLoad> and  * <pBSP> parameters must reside in the kernel protection domain.  In * addition, the returned void pointer is valid in the kernel protection * domain only. This restriction does not apply under non-AE versions of * VxWorks.  * * RETURNS: A cookie representing the new device, or NULL if an error occurred.** ERRNO: S_muxLib_LOAD_FAILED*/void * muxDevLoad    (    int       unit,                      /* unit number of device */    END_OBJ * (*endLoad) (char*, void*), /* load function of the driver  */    char *    pInitString,		 /* init string for this driver  */    BOOL      loaning,		         /* we loan buffers  */    void *    pBSP                       /* for BSP group  */    )    {    END_OBJ *     pNew;    END_TBL_ROW * pNode;    char          initString [END_INIT_STR_MAX];    char          devName [END_NAME_MAX];    BOOL          found = FALSE;    void *        pCookie = NULL;    if (muxLibState.debug)        logMsg ("Start of muxDevLoad\n", 0, 0, 0, 0, 0, 0);    bzero ( (char *)initString, END_INIT_STR_MAX);    bzero ( (char *)devName, END_NAME_MAX);    /* Let's mutually exclude here, wouldn't you say? */    semTake (muxLibState.lock, WAIT_FOREVER);        /*     * Loading a device is a two pass algorithm.     *     * This is Pass 1.     *     * In the first pass we ask the device what its name is.  If that name     * exists in our table then we add the new node to the end of the     * already existing list.  If not then we create a new row in the     * table, and place the new node as the zero'th (0) element in the node's     * list.     */    if (endLoad ( (char *)devName, NULL) != 0)        {        goto muxLoadErr;        }    if (endFindByName ( (char *)devName, unit) != NULL)        {        goto muxLoadErr;        }    for (pNode = (END_TBL_ROW *)lstFirst(&endList); pNode != NULL; 	pNode = (END_TBL_ROW *)lstNext(&pNode->node))	{	if (STREQ (pNode->name, (char *)devName))            {            found = TRUE;            break;            }	}    /*  If there is no row for this device then add it. */        if (!found)        {        pNode = KHEAP_ALLOC (sizeof(END_TBL_ROW));        if (pNode == NULL)            {            goto muxLoadErr;            }        bzero ((char *)pNode, sizeof(END_TBL_ROW));        strncpy(pNode->name, devName, END_NAME_MAX - 1);	pNode->name [END_NAME_MAX - 1] = EOS;        lstAdd(&endList, &pNode->node);        }    /*     * This is Pass 2.     *     * Now that we can determine a unique number we assign that number to     * the device and actually load it.     */        sprintf ( (char *)initString, "%d:%s", unit, pInitString);    pNew = (END_OBJ *)endLoad ( (char *)initString, pBSP);    if (pNew == NULL)        {        goto muxLoadErr;        }    /*      * Leave this stuff last to prevent a race condition.  The condition     * would be that the driver could call the receive routine 

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
黄一区二区三区| 这里只有精品电影| 97久久精品人人做人人爽| 国产iv一区二区三区| 国产91精品一区二区麻豆网站 | 日本麻豆一区二区三区视频| 亚洲午夜视频在线观看| 亚洲福利国产精品| 亚洲国产aⅴ成人精品无吗| 一区二区三区在线视频观看 | 色综合天天综合| 91啦中文在线观看| 欧美午夜精品理论片a级按摩| 欧美视频完全免费看| 欧美日韩激情一区二区| 日韩免费视频一区二区| 26uuuu精品一区二区| 日本一区二区三级电影在线观看| 中文字幕欧美日本乱码一线二线| 日韩美女视频一区| 亚洲va国产va欧美va观看| 日本欧美一区二区在线观看| 国内久久婷婷综合| 99久久婷婷国产综合精品电影| 91亚洲精华国产精华精华液| 欧美日韩美少妇| 精品久久五月天| 亚洲欧洲av一区二区三区久久| 亚洲一区二区不卡免费| 免费成人你懂的| 国产成人午夜电影网| 日本精品一区二区三区高清| 91麻豆精品国产91久久久| 精品处破学生在线二十三| 中文字幕在线不卡| 日韩av网站免费在线| 国产激情一区二区三区四区| 99re免费视频精品全部| 欧美日韩不卡一区| 国产婷婷精品av在线| 亚洲国产精品一区二区www在线| 麻豆免费精品视频| jizz一区二区| 日韩欧美国产wwwww| 亚洲伦理在线免费看| 久久精品国产第一区二区三区| 成人禁用看黄a在线| 7799精品视频| 亚洲欧美日韩国产另类专区| 久久精品99国产国产精| 91麻豆swag| 久久久影视传媒| 亚洲一区在线观看免费观看电影高清| 精品一区二区免费视频| 欧美中文字幕不卡| 国产片一区二区三区| 午夜精品成人在线视频| 成人高清视频免费观看| 日韩无一区二区| 亚洲一区二区三区四区在线观看| 国产美女久久久久| 制服丝袜成人动漫| 一级女性全黄久久生活片免费| 国产毛片精品国产一区二区三区| 欧美人牲a欧美精品| 亚洲欧美日韩系列| 国产福利一区二区三区视频在线| 欧美日韩一级黄| 亚洲人被黑人高潮完整版| 国产在线视频不卡二| 日韩一区二区在线看| 亚洲国产精品久久不卡毛片 | 69av一区二区三区| 日韩理论片中文av| 丁香网亚洲国际| 日韩免费一区二区| 视频一区中文字幕| 在线视频国内一区二区| 国产精品久久免费看| 国产精品综合久久| 精品国产一区二区三区四区四 | 91视频免费看| 国产精品情趣视频| 丁香网亚洲国际| 国产午夜精品久久久久久免费视| 麻豆传媒一区二区三区| 欧美精品日韩精品| 天天av天天翘天天综合网色鬼国产| 99国产精品视频免费观看| 国产无人区一区二区三区| 国产一区二区三区高清播放| 日韩欧美电影一二三| 另类欧美日韩国产在线| 欧美成人video| 精品一区精品二区高清| 精品久久国产字幕高潮| 老色鬼精品视频在线观看播放| 欧美精品黑人性xxxx| 日韩不卡一区二区三区| 欧美一区二区三区成人| 日本人妖一区二区| 欧美电影免费观看高清完整版在线观看 | 久久99久久99| 91精品国产综合久久精品图片 | 国内精品在线播放| 久久久国产一区二区三区四区小说 | 91精品免费观看| 日一区二区三区| 日韩你懂的在线观看| 韩国v欧美v日本v亚洲v| 国产视频911| 99在线热播精品免费| 亚洲精品亚洲人成人网| 欧美三级欧美一级| 蜜桃视频第一区免费观看| 精品国产一区二区三区不卡| 国产精品一线二线三线精华| 国产精品视频线看| 色婷婷综合在线| 亚洲成人av电影在线| 日韩一区二区三区视频| 国产在线一区观看| 欧美激情中文字幕一区二区| 93久久精品日日躁夜夜躁欧美| 夜夜嗨av一区二区三区网页| 欧美伦理视频网站| 国产精品一二三区| 亚洲精品视频在线观看免费| 7777精品久久久大香线蕉| 国产最新精品精品你懂的| 国产精品超碰97尤物18| 欧美日韩日本视频| 国产一区91精品张津瑜| 亚洲图片激情小说| 91麻豆精品国产91久久久| 国产乱码精品一区二区三区忘忧草 | 亚洲成人7777| 精品99999| 99re视频精品| 老司机精品视频一区二区三区| 久久九九国产精品| 在线免费不卡电影| 欧美美女网站色| 欧美一区二区三区电影| 国产伦精品一区二区三区免费| xf在线a精品一区二区视频网站| av一区二区三区在线| 日本免费新一区视频| 国产精品乱子久久久久| 9191精品国产综合久久久久久| 国产91丝袜在线播放0| 亚洲第一狼人社区| 久久久久久9999| 欧美揉bbbbb揉bbbbb| 丁香婷婷综合色啪| 奇米精品一区二区三区在线观看 | 日韩一区二区在线观看视频播放| 成人精品亚洲人成在线| 午夜精品久久久久久久99樱桃| 欧美国产成人精品| 欧美日韩国产欧美日美国产精品| 国产精品亚洲成人| 日精品一区二区| 亚洲精品自拍动漫在线| 久久午夜电影网| 91麻豆精品国产91久久久使用方法| 国产.欧美.日韩| 另类小说欧美激情| 亚洲国产中文字幕在线视频综合 | 亚洲超碰97人人做人人爱| 国产三级精品三级在线专区| 欧美精品日韩一区| 欧美专区亚洲专区| 92国产精品观看| 国产成人精品aa毛片| 精品影院一区二区久久久| 亚洲成a人v欧美综合天堂| 亚洲欧美日韩国产综合| 中文字幕免费一区| 久久噜噜亚洲综合| 欧美v日韩v国产v| 91精品国产综合久久婷婷香蕉| 91免费看片在线观看| 成人性生交大合| 国产精品一区二区男女羞羞无遮挡 | 欧美成人艳星乳罩| 56国语精品自产拍在线观看| www.亚洲国产| 国产91精品免费| 国产乱码精品1区2区3区| 九色综合狠狠综合久久| 无吗不卡中文字幕| 午夜不卡av在线| 偷窥国产亚洲免费视频| 午夜精品福利一区二区蜜股av | 蜜桃在线一区二区三区| 午夜免费久久看| 日日摸夜夜添夜夜添精品视频| 午夜精品在线看| 天堂精品中文字幕在线|