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

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

?? etherlib.c

?? vxworks的完整的源代碼
?? C
?? 第 1 頁 / 共 3 頁
字號:
/* etherLib.c - Ethernet raw I/O routines and hooks *//* Copyright 1984 - 2000 Wind River Systems, Inc. */#include "copyright_wrs.h"/*modification history--------------------02w,16oct00,spm  fixed etherInputHookAdd and etherInputHookDelete (SPR #30166)02v,16oct00,spm  merged documentation updates from tor2_0_x branch (SPR #21383)02u,27may99,pul  etherInputHookAdd changes for NPT driver and 		 tagged Ethernet frames support02t,27apr99,sj   Merged post SENS1.1 fixes done for Tor2.002s,29mar99,dat  documentation, removed refs to obsolete drivers (26119)02r,16mar99,spm  recovered orphaned code from tor1_0_1.sens1_1 (SPR #25770)02q,15dec98,jmb  SENS merge, (01w-02p)02p,06oct98,spm  fixed buffer overrun in END input hook routine (SPR #22363)02o,27aug98,n_s  set unit number in fakeIF for endEtherInputHook. spr #22222.02n,14dec97,jdi  doc: cleanup.02m,08dec97,gnn  END code review fixes.02l,28oct97,gnn  fixed SPR 9606, caused by problems in the endEtherInputHook02k,27oct97,spm  corrected input hooks to handle mixed device types; added                 support for multiple hooks per END device02j,25oct97,kbw  making minor man page fixes02i,17oct97,vin  changes reflecting protocol recieveRtn changes.02h,09oct97,spm  fixed memory leak in END driver input hook handler02g,03oct97,gnn  removed necessity for endDriver global02f,25sep97,gnn  SENS beta feedback fixes02e,26aug97,spm  removed compiler warnings (SPR #7866)02d,19aug97,gnn  changes due to new buffering scheme.02c,12aug97,gnn  changes necessitated by MUX/END update.02b,02jun97,spm  corrected invalid mem width causing m_devget panic (SPR #8640)02a,15may97,gnn  removed some warnings.                 modified muxUnbind.01z,20mar97,spm  fixed memory leak in Ethernet hook routines01y,21jan97,gnn  changed MUX_PROTO_PROMISC to MUX_PROTO_SNARF.01x,17dec96,gnn  added code to handle the new etherHooks and END stuff.01w,22oct96,gnn  added etherTypeGet routine to heuristically figure out the                 proper ethertype for a packet given a pointer to it.                 This handles 802.3 addressing.01w,15apr96,hk   added awai-san's etherOutput() fix for SH.01v,01nov95,jdi  doc: updated list of supported drivers (SPR 4545).01u,20jan93,jdi  documentation cleanup for 5.1.01t,13nov92,dnw  added includes of unixLib.h and hostLib.h01s,15aug92,elh  fixed bug in etherAddrResolve.01r,26may92,rrr  the tree shuffle		  -changed includes to have absolute path from h/01q,19nov91,rrr  shut up some ansi warnings.01p,15oct91,elh  added ether{Input,Output}HookDelete01o,04oct91,rrr  passed through the ansification filter                  -changed functions to ansi style		  -changed includes to have absolute path from h/		  -changed copyright notice01n,30apr91,jdi	 documentation tweaks.01m,05apr91,jdi	 documentation -- removed header parens and x-ref numbers;		 doc review by dnw.01l,04feb91,jaa	 documentation cleanup.01k,05oct90,dnw  documentation tweaks.01j,11apr90,hjb  de-linted.01i,19mar90,jdi  documentation cleanup.01h,20aug88,gae  documentation.01g,22jun88,dnw  name tweaks.01f,30may88,dnw  changed to v4 names.01e,05jan88,rdc  added include of systm.h01d,18nov87,ecs  documentation.01c,11nov87,dnw  added etherAddOutputHook().		 changed calling sequence to input hook routine.01b,05nov87,jlf  moved from netsrc to src		 documentation01a,28aug87,dnw  written*//*DESCRIPTIONThis library provides utilities that give direct access to Ethernet packets.Raw packets can be output directly to an interface using etherOutput().Incoming and outgoing packets can be examined or processed using the hooksetherInputHookAdd() and etherOutputHookAdd().  The input hook can be used toreceive raw packets that are not part of any of the supported networkprotocols.  The input and output hooks can also be used to build networkmonitoring and testing tools.Normally, the network should be accessed through the higher-level socketinterface provided in sockLib.  The routines in etherLib should rarely,if ever, be necessary for applications.CAVEATAll VxWorks Ethernet drivers using the generic MUX/END model support boththe input hook and output hook routines. Both hook types are also supported by the following BSD model drivers:    if_cpm - Motorola CPM Ethernet driver    if_eex - Intel EtherExpress 16 network interface driver    if_ei - Intel 82596 Ethernet driver    if_eihk - Intel 82596 Ethernet driver (for hkv3500)    if_elc - SMC 8013WC Ethernet driver    if_elt - 3Com 3C509 Ethernet driver    if_ene - Novell/Eagle NE2000 network driver    if_esmc - Ampro Ethernet2 SMC-91c9x Ethernet driver    if_fei - Intel 82557 Ethernet driver    if_fn - Fujitsu MB86960 NICE Ethernet driver    if_ln - Advanced Micro Devices Am7990 LANCE Ethernet driver    if_mbc - Motorola 68EN302 Ethernet driver     if_sm - shared memory backplane network interface driver    if_sn - National Semiconductor DP83932B SONIC Ethernet driver    if_ultra - SMC Elite Ultra Ethernet driverThe following BSD drivers support only the input hook routines:    if_cs - Crystal Semiconductor CS8900 network interface driver    if_dc - DEC 21x4x Ethernet LAN network interface driver    if_nicEvb - National Semiconductor ST-NIC Ethernet driver (for evb403)    if_sl - Serial Line IP (SLIP) network interface driverThe following BSD drivers support only the output hook routines:    if_ulip - network interface driver for User Level IP (VxSim)The following BSD drivers do not support either the input hook oroutput hook routines:    if_loop - software loopback network interface driverINCLUDE FILES: etherLib.hSEE ALSO:.pG "Network"*/#include "vxWorks.h"#include "lstLib.h"#include "net/mbuf.h"#include "net/if.h"#include "net/route.h"#include "netinet/if_ether.h"#include "net/if_llc.h"#include "net/systm.h"#include "inetLib.h"#include "net/unixLib.h"#include "hostLib.h"#include "end.h"#include "muxLib.h"#include "netBufLib.h"#include "muxTkLib.h"#include "private/muxLibP.h"IMPORT unsigned char etherbroadcastaddr [];FUNCPTR etherInputHookRtn  = NULL;	/* NULL = none */FUNCPTR etherOutputHookRtn = NULL;	/* NULL = none */LOCAL BOOL endEtherInputHookRtn (void * pCookie, long type, M_BLK_ID pMblk,                                  LL_HDR_INFO * pLinkHdrInfo, void * pSpare);LOCAL BOOL nptEtherInputHookRtn (void * pCallBackId, long type, M_BLK_ID pMblk,                                  void * pSpareData);LOCAL BOOL etherInputHook (struct ifnet * pIf, char * buffer, int length);LOCAL BOOL etherOutputHook (struct ifnet * pIf, char * buffer, int length);/* locals */LOCAL LIST inputHookList;LOCAL LIST outputHookList;LOCAL BOOL etherInputHookActive = FALSE;typedef struct hook_entry    {    NODE node; 		/* Attachment point for linked list. */    FUNCPTR routine;    void * pCookie; 	/* For use with END devices, NULL for BSD devices. */    char name[8]; 	/* Device name (END devices only). */    int unit; 		/* Device unit number (END devices only). */    } HOOK_ENTRY;/* defints */#define STREQ(A, B) (strcmp(A, B) == 0 ? 1 : 0)/* RFC 894 Header. */typedef struct enet_hdr    {    char dst [6];    char src [6];    USHORT type;    } ENET_HDR;/********************************************************************************* etherOutput - send a packet on an Ethernet interface** This routine sends a packet on the specified Ethernet interface by* calling the interface's output routine directly.** The first argument <pIf> is a pointer to a variable of type `struct ifnet'* which contains some useful information about the network interface.  A* routine named ifunit() can retrieve this pointer from the system in the* following way:* .CS*     struct ifnet *pIf;*     ...*     pIf = ifunit ("ln0");* .CE* If ifunit() returns a non-NULL pointer, it is a valid pointer to* the named network interface device structure of type `struct ifnet'.* In the above example, <pIf> points to the data structure that* describes the first LANCE network interface device if ifunit() is* successful.** The second argument <pEtherHeader> should contain a valid Ethernet address* of the machine for which the message contained in the argument <pData> is* intended.  If the Ethernet address of this machine is fixed and well-known* to the user, filling in the structure `ether_header' can be accomplished by* using bcopy() to copy the six-byte Ethernet address into the `ether_dhost'* field of the structure `ether_header'.  Alternatively, users can make use of* the routine etherAddrResolve() which will use ARP (Address Resolution* Protocol) to resolve the Ethernet address for a specified Internet* address.** RETURNS: OK, or ERROR if the routine runs out of mbufs.** SEE ALSO:* etherAddrResolve()*/STATUS etherOutput    (    struct ifnet *pIf,                  /* interface on which to send */    struct ether_header *pEtherHeader,  /* Ethernet header to send    */    FAST char *pData,                   /* data to send               */    FAST int dataLength                 /* # of bytes of data to send */    )    {    FAST struct mbuf *m;	/* ptr to current mbuf piece */#if (CPU_FAMILY==SH)    FAST int i;#endif /* CPU_FAMILY==SH */    struct sockaddr dst;	/* destination address */    int oldLevel;    /* construct dst sockaddr required by interface output routine;     * all Ethernet drivers interpret address family AF_UNSPEC as raw     * Ethernet header (this is used by arp) */    dst.sa_family = AF_UNSPEC;    dst.sa_len = sizeof(dst);#if (CPU_FAMILY==SH)    for ( i=0; i<SIZEOF_ETHERHEADER; i+=2 )        *((UINT16 *)((int)&(dst.sa_data[0])+i)) =                                        *((UINT16 *)((int)pEtherHeader+i));#else /* CPU_FAMILY==SH */    *((struct ether_header *) dst.sa_data) = *pEtherHeader;#endif /* CPU_FAMILY==SH */    if ((m = bcopy_to_mbufs (pData, dataLength, 0, pIf, NONE)) == NULL)	return (ERROR);    /* call interface's output routine */    oldLevel = splnet ();    (* pIf->if_output) (pIf, m, &dst, (struct rtentry *)NULL);    splx (oldLevel);    return (OK);    }/********************************************************************************* etherInputHookAdd - add a routine to receive all Ethernet input packets** This routine adds a hook routine that will be called for every Ethernet* packet that is received.** The calling sequence of the input hook routine is:* .CS*     BOOL inputHook*          (*          struct ifnet *pIf,    /@ interface packet was received on @/*          char         *buffer, /@ received packet @/*          int          length   /@ length of received packet @/*          )* .CE* The hook routine should return TRUE if it has handled the input packet and* no further action should be taken with it.  It should return FALSE if it* has not handled the input packet and normal processing (for example, * Internet) should take place.** The packet is in a temporary buffer when the hook routine is called.* This buffer will be reused upon return from the hook.  If the hook* routine needs to retain the input packet, it should copy it elsewhere.** IMPLEMENTATION* A call to the function pointed to by the global function pointer* `etherInputHookRtn' should be invoked in the receive routine of every* network driver providing this service.  For example:* .CS*     ...*     #include "etherLib.h"*     ...*     xxxRecv ()*     ...*     /@ call input hook if any @/**         if ((etherInputHookRtn != NULL) &&*             (* etherInputHookRtn) (&ls->ls_if, (char *)eh, len))*             {*             return; /@ input hook has already processed this packet @/*             }* .CE** RETURNS: OK if the hook was added, or ERROR otherwise.*/STATUS etherInputHookAdd    (    FUNCPTR inputHook,   /* routine to receive Ethernet input */    char* pName,         /* name of device if MUX/END is being used */    int unit             /* unit of device if MUX/END is being used */    )    {    HOOK_ENTRY *pHookEnt;    HOOK_ENTRY *pHookCurr;    void * pBinding = NULL;  /* Existing END device binding, if any. */    BOOL tkDevice=FALSE;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品国产乱码久久久久久1区2区| 欧美亚州韩日在线看免费版国语版| 久久国产综合精品| 激情欧美日韩一区二区| 精彩视频一区二区| 国产精品99久久久久久久vr| 成人理论电影网| 欧美亚洲国产一卡| 国产日产欧美一区二区三区| 国产精品免费丝袜| 日韩av电影一区| 国产91精品精华液一区二区三区| 成人免费看片app下载| 欧美在线色视频| 国产日韩影视精品| 天涯成人国产亚洲精品一区av| 久久精品99国产精品日本| 成人激情小说网站| 欧美成人福利视频| 亚洲一二三区在线观看| 国产一区二区三区四| 一本久久a久久免费精品不卡| 宅男在线国产精品| 一区二区三区中文字幕在线观看| 免费不卡在线观看| 精品视频一区二区不卡| 中文字幕精品三区| 国产在线视频不卡二| 欧美一区二区精美| 日本在线不卡视频一二三区| 欧美色倩网站大全免费| 尤物在线观看一区| 色噜噜狠狠色综合中国| 久久精品水蜜桃av综合天堂| 视频在线观看91| 欧美精品在线一区二区三区| 曰韩精品一区二区| 欧美久久久久免费| 免费黄网站欧美| 337p粉嫩大胆色噜噜噜噜亚洲| 久久精品国产久精国产| 欧美一区二区私人影院日本| 日韩电影在线观看电影| 欧美一区二区三区在线看| 久久99最新地址| 国产精品全国免费观看高清 | 国产日韩欧美精品在线| 国产99久久久国产精品| 亚洲视频中文字幕| 欧美日韩一本到| 国产一区二区在线视频| 国产精品久久三| 91精品国模一区二区三区| 理论电影国产精品| 中文字幕人成不卡一区| 在线播放91灌醉迷j高跟美女| 精品午夜久久福利影院| 亚洲精品免费在线| 久久免费电影网| 在线视频国内一区二区| 国产一区二区三区视频在线播放| 中文字幕亚洲电影| 久久午夜色播影院免费高清| 欧美亚洲日本国产| 国产91精品在线观看| 日韩av一区二区在线影视| 亚洲视频一区二区在线| 精品国产伦一区二区三区观看体验| heyzo一本久久综合| 免费精品视频在线| 亚洲国产另类av| 一区二区日韩av| 国产精品色呦呦| 欧美激情一区二区| 久久麻豆一区二区| 久久美女艺术照精彩视频福利播放| 欧美影院一区二区| 欧美性大战久久久| 欧美在线999| 欧美精品乱人伦久久久久久| 91尤物视频在线观看| 91亚洲精品一区二区乱码| 久久97超碰色| 国产一区二区不卡| 国产精品1024久久| 加勒比av一区二区| 男男视频亚洲欧美| 久久精品二区亚洲w码| 亚洲一级片在线观看| 手机精品视频在线观看| 日本高清不卡视频| 国产精品久久久久久户外露出| 蜜臀久久久久久久| 欧美亚洲免费在线一区| 一区二区三区四区视频精品免费| 国产在线精品一区二区| 欧美一区二区久久久| 亚洲欧美偷拍卡通变态| 国产午夜精品福利| 国产精品99久| 日本一区二区免费在线| 国产激情视频一区二区三区欧美 | 久久久久久日产精品| 精品一区二区在线观看| 欧美白人最猛性xxxxx69交| 极品尤物av久久免费看| 国产欧美综合在线观看第十页| 狠狠狠色丁香婷婷综合激情 | caoporn国产一区二区| 国产精品青草综合久久久久99| 丁香婷婷综合激情五月色| 日韩久久一区二区| 欧美日韩夫妻久久| 国产精品一区二区在线播放| 国产人成亚洲第一网站在线播放| a在线欧美一区| 亚洲一区二区三区中文字幕在线| 欧美日韩亚洲国产综合| 久久99热狠狠色一区二区| 国产精品免费视频一区| 欧美日韩精品一二三区| 国内精品久久久久影院色| 亚洲视频精选在线| 精品国产精品网麻豆系列| 91啪九色porn原创视频在线观看| 亚洲国产精品一区二区www在线 | 国产精品久久久久久久久免费丝袜 | 国产亚洲综合色| 一本色道久久综合狠狠躁的推荐 | 偷偷要91色婷婷| 国产精品传媒在线| 精品国产乱子伦一区| 欧美视频精品在线观看| 成人av网站在线观看免费| 日韩高清电影一区| 亚洲图片你懂的| 国产精品午夜在线| 亚洲精品在线三区| 日韩欧美成人激情| 在线精品视频免费播放| 国产白丝网站精品污在线入口| 同产精品九九九| 婷婷久久综合九色国产成人| 亚洲日本中文字幕区| 综合色中文字幕| 国产精品国产三级国产三级人妇 | 一区二区三区四区蜜桃| 亚洲色图另类专区| 亚洲人123区| 亚洲一区二区三区四区在线| 亚洲日本免费电影| 亚洲线精品一区二区三区八戒| 亚洲精品成人在线| 婷婷一区二区三区| 免费精品视频在线| 国模冰冰炮一区二区| 成人av网站在线| 在线欧美日韩国产| 日韩免费一区二区| 亚洲国产精品二十页| 一区二区免费视频| 日韩电影在线免费观看| 国内精品视频666| 不卡视频一二三四| 欧美日韩国产123区| 欧美精品一区二区蜜臀亚洲| 国产日韩欧美麻豆| 亚洲一区免费在线观看| 免费高清不卡av| 色偷偷一区二区三区| 日韩视频一区在线观看| 亚洲蜜桃精久久久久久久| 免费成人在线网站| av福利精品导航| 日韩精品影音先锋| 亚洲一二三区在线观看| 国产精品一级二级三级| 91国偷自产一区二区三区观看 | 欧美日韩小视频| 中文字幕不卡在线播放| 蜜桃视频一区二区三区| 91原创在线视频| 国产精品美女久久福利网站| 日韩和欧美一区二区三区| 99re6这里只有精品视频在线观看| 538在线一区二区精品国产| 国产精品久线在线观看| 精品影院一区二区久久久| 欧美日韩视频在线观看一区二区三区 | av激情成人网| 国产日产欧美精品一区二区三区| 五月激情丁香一区二区三区| 色久综合一二码| ...xxx性欧美| 色国产精品一区在线观看| 久久精品人人做人人综合| 久久国产精品99久久人人澡| 欧美久久久久久久久久| 日韩精品一区第一页| 欧美久久久久久久久久|