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

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

?? if_il.c

?? open bsd vax module -if function
?? C
?? 第 1 頁 / 共 2 頁
字號(hào):
/* * Copyright (c) 1982, 1986 Regents of the University of California. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright *    notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright *    notice, this list of conditions and the following disclaimer in the *    documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software *    must display the following acknowledgement: *	This product includes software developed by the University of *	California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors *    may be used to endorse or promote products derived from this software *    without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * *	@(#)if_il.c	7.8 (Berkeley) 12/16/90 */#include "il.h"#if NIL > 0/* * Interlan Ethernet Communications Controller interface */#include "../include/pte.h"#include "sys/param.h"#include "sys/systm.h"#include "sys/mbuf.h"#include "sys/buf.h"#include "sys/protosw.h"#include "sys/socket.h"#include "sys/vmmac.h"#include "sys/ioctl.h"#include "sys/errno.h"#include "sys/syslog.h"#include "net/if.h"#include "net/netisr.h"#include "net/route.h"#ifdef INET#include "netinet/in.h"#include "netinet/in_systm.h"#include "netinet/in_var.h"#include "netinet/ip.h"#include "netinet/if_ether.h"#endif#ifdef NS#include "netns/ns.h"#include "netns/ns_if.h"#endif#include "../include/cpu.h"#include "../include/mtpr.h"#include "if_il.h"#include "if_ilreg.h"#include "if_uba.h"#include "../uba/ubareg.h"#include "../uba/ubavar.h"int	ilprobe(), ilattach(), ilrint(), ilcint();struct	uba_device *ilinfo[NIL];u_short ilstd[] = { 0 };struct	uba_driver ildriver =	{ ilprobe, 0, ilattach, 0, ilstd, "il", ilinfo };#define	ILUNIT(x)	minor(x)int	ilinit(),iloutput(),ilioctl(),ilreset(),ilwatch(),ilstart();int	ildebug = 0;/* * Ethernet software status per interface. * * Each interface is referenced by a network interface structure, * is_if, which the routing code uses to locate the interface. * This structure contains the output queue for the interface, its address, ... * We also have, for each interface, a UBA interface structure, which * contains information about the UNIBUS resources held by the interface: * map registers, buffered data paths, etc.  Information is cached in this * structure for use by the if_uba.c routines in running the interface * efficiently. */struct ether_addr {	u_char	addr[6];};struct	il_softc {	struct	arpcom is_ac;		/* Ethernet common part */#define	is_if	is_ac.ac_if		/* network-visible interface */#define	is_addr	is_ac.ac_enaddr		/* hardware Ethernet address */	struct	ifuba is_ifuba;		/* UNIBUS resources */	int	is_flags;#define	ILF_RCVPENDING	0x2		/* start rcv in ilcint */#define	ILF_STATPENDING	0x4		/* stat cmd pending */#define	ILF_RUNNING	0x8		/* board is running */#define	ILF_SETADDR	0x10		/* physical address is changed */	short	is_lastcmd;		/* can't read csr, so must save it */	short	is_scaninterval;	/* interval of stat collection */#define	ILWATCHINTERVAL	60		/* once every 60 seconds */	union {	    struct	il_stats isu_stats;	/* holds on-board statistics */	    struct	ether_addr isu_maddrs[63];	/* multicast addrs */	}	is_isu;#define is_stats	is_isu.isu_stats#define is_maddrs	is_isu.isu_maddrs	struct	il_stats is_sum;	/* summation over time */	int	is_ubaddr;		/* mapping registers of is_stats */} il_softc[NIL];ilprobe(reg)	caddr_t reg;{	register int br, cvec;		/* r11, r10 value-result */	register struct ildevice *addr = (struct ildevice *)reg;	register i;#ifdef lint	br = 0; cvec = br; br = cvec;	i = 0; ilrint(i); ilcint(i); ilwatch(i);#endif	addr->il_csr = ILC_OFFLINE|IL_CIE;	DELAY(100000);	i = addr->il_csr;		/* clear CDONE */	if (cvec > 0 && cvec != 0x200)		cvec -= 4;	return (1);}/* * Interface exists: make available by filling in network interface * record.  System will initialize the interface when it is ready * to accept packets.  A STATUS command is done to get the ethernet * address and other interesting data. */ilattach(ui)	struct uba_device *ui;{	register struct il_softc *is = &il_softc[ui->ui_unit];	register struct ifnet *ifp = &is->is_if;	register struct ildevice *addr = (struct ildevice *)ui->ui_addr;	ifp->if_unit = ui->ui_unit;	ifp->if_name = "il";	ifp->if_mtu = ETHERMTU;	ifp->if_flags = IFF_BROADCAST;	/*	 * Reset the board and map the statistics	 * buffer onto the Unibus.	 */	addr->il_csr = ILC_RESET;	(void)ilwait(ui, "reset");		is->is_ubaddr = uballoc(ui->ui_ubanum, (caddr_t)&is->is_stats,	    sizeof (struct il_stats), 0);	addr->il_bar = is->is_ubaddr & 0xffff;	addr->il_bcr = sizeof (struct il_stats);	addr->il_csr = ((is->is_ubaddr >> 2) & IL_EUA)|ILC_STAT;	(void)ilwait(ui, "status");	ubarelse(ui->ui_ubanum, &is->is_ubaddr);	if (ildebug)		printf("il%d: module=%s firmware=%s\n", ui->ui_unit,			is->is_stats.ils_module, is->is_stats.ils_firmware); 	bcopy((caddr_t)is->is_stats.ils_addr, (caddr_t)is->is_addr, 	    sizeof (is->is_addr));	printf("il%d: hardware address %s\n", ui->ui_unit,		ether_sprintf(is->is_addr));	ifp->if_init = ilinit;	ifp->if_output = ether_output;	ifp->if_ioctl = ilioctl;	ifp->if_reset = ilreset;	ifp->if_start = ilstart;	is->is_ifuba.ifu_flags = UBA_CANTWAIT;	if_attach(ifp);}ilwait(ui, op)	struct uba_device *ui;	char *op;{	register struct ildevice *addr = (struct ildevice *)ui->ui_addr;	while ((addr->il_csr&IL_CDONE) == 0)		;	if (addr->il_csr&IL_STATUS) {		printf("il%d: %s failed, csr=%b\n", ui->ui_unit, op,			addr->il_csr, IL_BITS);		return (-1);	}	return (0);}/* * Reset of interface after UNIBUS reset. * If interface is on specified uba, reset its state. */ilreset(unit, uban)	int unit, uban;{	register struct uba_device *ui;	if (unit >= NIL || (ui = ilinfo[unit]) == 0 || ui->ui_alive == 0 ||	    ui->ui_ubanum != uban)		return;	printf(" il%d", unit);	il_softc[unit].is_if.if_flags &= ~IFF_RUNNING;	il_softc[unit].is_flags &= ~ILF_RUNNING;	ilinit(unit);}/* * Initialization of interface; clear recorded pending * operations, and reinitialize UNIBUS usage. */ilinit(unit)	int unit;{	register struct il_softc *is = &il_softc[unit];	register struct uba_device *ui = ilinfo[unit];	register struct ildevice *addr;	register struct ifnet *ifp = &is->is_if;	int s;	/* not yet, if address still unknown */	if (ifp->if_addrlist == (struct ifaddr *)0)		return;	if (is->is_flags & ILF_RUNNING)		return;	if ((ifp->if_flags & IFF_RUNNING) == 0) {		if (if_ubainit(&is->is_ifuba, ui->ui_ubanum,		    sizeof (struct il_rheader), (int)btoc(ETHERMTU)) == 0) { 			printf("il%d: can't initialize\n", unit);			is->is_if.if_flags &= ~IFF_UP;			return;		}		is->is_ubaddr = uballoc(ui->ui_ubanum, (caddr_t)&is->is_isu,		    sizeof (is->is_isu), 0);	}	ifp->if_watchdog = ilwatch;	is->is_scaninterval = ILWATCHINTERVAL;	ifp->if_timer = is->is_scaninterval;	addr = (struct ildevice *)ui->ui_addr;	/*	 * Turn off source address insertion (it's faster this way),	 * and set board online.  Former doesn't work if board is	 * already online (happens on ubareset), so we put it offline	 * first.	 */	s = splimp();	addr->il_csr = ILC_RESET;	if (ilwait(ui, "hardware diag")) { 		is->is_if.if_flags &= ~IFF_UP; 		splx(s); 		return; 	}	addr->il_csr = ILC_CISA;	while ((addr->il_csr & IL_CDONE) == 0)		;	/*	 * If we must reprogram this board's physical ethernet	 * address (as for secondary XNS interfaces), we do so	 * before putting it on line, and starting receive requests.	 * If you try this on an older 1010 board, it will total	 * wedge the board.	 */	if (is->is_flags & ILF_SETADDR) {		bcopy((caddr_t)is->is_addr, (caddr_t)&is->is_isu,							sizeof is->is_addr);		addr->il_bar = is->is_ubaddr & 0xffff;		addr->il_bcr = sizeof is->is_addr;		addr->il_csr = ((is->is_ubaddr >> 2) & IL_EUA)|ILC_LDPA;		if (ilwait(ui, "setaddr"))			return;		addr->il_bar = is->is_ubaddr & 0xffff;		addr->il_bcr = sizeof (struct il_stats);		addr->il_csr = ((is->is_ubaddr >> 2) & IL_EUA)|ILC_STAT;		if (ilwait(ui, "verifying setaddr"))			return;		if (bcmp((caddr_t)is->is_stats.ils_addr, (caddr_t)is->is_addr,						sizeof (is->is_addr)) != 0) {			printf("il%d: setaddr didn't work\n", ui->ui_unit);			return;		}	}#ifdef MULTICAST	if (is->is_if.if_flags & IFF_PROMISC) {		addr->il_csr = ILC_PRMSC;		if (ilwait(ui, "all multi"))			return;	} else if (is->is_if.if_flags & IFF_ALLMULTI) {	too_many_multis:		addr->il_csr = ILC_ALLMC;		if (ilwait(ui, "all multi"))			return;	else {		int i;		register struct ether_addr *ep = is->is_maddrs;		struct ether_multi *enm;		struct ether_multistep step;		/*		 * Step through our list of multicast addresses.  If we have		 * too many multicast addresses, or if we have to listen to		 * a range of multicast addresses, turn on reception of all		 * multicasts.		 */		i = 0;		ETHER_FIRST_MULTI(step, &is->is_ac, enm);		while (enm != NULL) {			if (++i > 63 && k != 0) {				break;			}			*ep++ = *(struct ether_addr *)enm->enm_addrlo;			ETHER_NEXT_MULTI(step, enm);		}		if (i = 0) {			/* no multicasts! */		} else if (i <= 63) {			addr->il_bar = is->is_ubaddr & 0xffff;			addr->il_bcr = i * sizeof (struct ether_addr);			addr->il_csr = ((is->is_ubaddr >> 2) & IL_EUA)|						LC_LDGRPS;			if (ilwait(ui, "load multi"))				return;		} else {

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
99精品视频在线观看免费| 日韩国产欧美视频| 国产精品一区三区| 日韩一区二区在线看| 亚洲一二三区视频在线观看| 91网站最新地址| 欧美激情中文不卡| 91精品国产乱码久久蜜臀| 亚洲高清免费视频| 色欧美片视频在线观看在线视频| 欧美国产国产综合| 成人黄色一级视频| 中文字幕一区二区三区色视频 | 91丨九色丨黑人外教| 中文字幕精品一区二区精品绿巨人| 国产一区二区三区在线看麻豆| 精品黑人一区二区三区久久| 激情六月婷婷久久| 日本一区二区三区国色天香| 成人三级伦理片| 亚洲人123区| 欧美日韩一级黄| 久久精品国产一区二区三 | 亚洲精品中文字幕乱码三区| 久久久不卡影院| 国产精品一区不卡| 亚洲乱码日产精品bd| 4hu四虎永久在线影院成人| 麻豆91免费观看| 国产精品美女久久福利网站| 91黄色免费版| 国内一区二区在线| 亚洲女子a中天字幕| 91精品国产综合久久精品性色| 国产在线精品一区二区| 亚洲日本乱码在线观看| 日韩欧美一卡二卡| 99免费精品在线观看| 免费在线欧美视频| 亚洲视频在线观看一区| 精品国产乱码久久久久久老虎 | 久久久天堂av| 欧美人体做爰大胆视频| av在线一区二区三区| 老司机一区二区| 一区二区三区精品视频在线| 久久久亚洲欧洲日产国码αv| 欧美专区亚洲专区| 国产成人精品免费在线| 婷婷久久综合九色国产成人| 国产日韩欧美a| 日韩一级欧美一级| 欧美日韩国产精品自在自线| 成人性生交大片| 国产一区免费电影| 日日摸夜夜添夜夜添国产精品 | 在线一区二区观看| 国产精品美女视频| 精品日韩99亚洲| 91精品国产一区二区人妖| 91丨porny丨在线| 成人av网站在线观看免费| 国产a区久久久| 国产乱国产乱300精品| 精品一区二区三区在线观看国产 | 精品一区二区精品| 精品亚洲成a人在线观看| 免费亚洲电影在线| 免费成人在线观看视频| 视频一区二区不卡| 美女一区二区三区在线观看| 毛片av中文字幕一区二区| 男女性色大片免费观看一区二区 | 1024国产精品| 日韩美女精品在线| 亚洲综合色噜噜狠狠| 亚洲国产一区二区a毛片| 亚洲一区国产视频| 麻豆精品一区二区综合av| 久草在线在线精品观看| 高清国产一区二区| 97aⅴ精品视频一二三区| 在线视频中文字幕一区二区| 欧美日韩精品一区二区| 日韩三级视频在线看| 国产亲近乱来精品视频| 亚洲欧美一区二区视频| 亚洲电影一级片| 国产精品亚洲第一| 色999日韩国产欧美一区二区| 欧美嫩在线观看| 国产欧美日韩一区二区三区在线观看| 中文字幕亚洲一区二区av在线 | 不卡一区二区中文字幕| 7777精品伊人久久久大香线蕉完整版 | 亚洲免费观看高清| 精品在线亚洲视频| 色哟哟在线观看一区二区三区| 欧美日本韩国一区二区三区视频 | 中文字幕在线一区免费| 午夜精品一区二区三区免费视频 | 欧美一区二区黄色| 亚洲欧洲精品天堂一级| 日本欧美加勒比视频| 成人黄色在线视频| 欧美成人vps| 亚洲国产综合人成综合网站| 国产精品99久久久久| 在线成人午夜影院| 亚洲综合图片区| 成人av在线资源| 久久嫩草精品久久久久| 国内精品自线一区二区三区视频| 欧美在线观看视频在线| 国产精品护士白丝一区av| 国产一区 二区 三区一级| 8v天堂国产在线一区二区| 一区二区欧美精品| 97超碰欧美中文字幕| 国产欧美va欧美不卡在线| 国产在线播放一区| 国产色综合久久| 高清不卡一区二区| 久久综合久色欧美综合狠狠| 蜜臀久久久99精品久久久久久| 欧美日韩精品专区| 爽好多水快深点欧美视频| 欧美肥妇bbw| 久久99这里只有精品| 精品99久久久久久| 国产成人啪午夜精品网站男同| 国产无人区一区二区三区| 国产成人日日夜夜| 国产精品素人视频| 91女厕偷拍女厕偷拍高清| 亚洲欧美日韩国产一区二区三区 | 2014亚洲片线观看视频免费| 国产尤物一区二区| 国产精品久久毛片| 欧美最猛性xxxxx直播| 免费看黄色91| 久久久久久**毛片大全| 色欧美乱欧美15图片| 亚洲欧美综合另类在线卡通| 一区二区三区欧美视频| 日韩一区二区三区免费观看| av电影在线观看一区| 久久91精品国产91久久小草| 亚洲一二三区在线观看| 日韩欧美在线影院| av亚洲精华国产精华精| 日韩综合在线视频| 日本一二三不卡| 日韩一区二区三区三四区视频在线观看 | 91麻豆精品国产无毒不卡在线观看| 亚洲欧洲一区二区在线播放| 在线免费观看日韩欧美| 国产福利精品导航| 麻豆成人av在线| 麻豆91在线看| 日韩成人一级片| 亚洲一区二区三区爽爽爽爽爽| 国产精品理论片在线观看| 中文一区在线播放| 国产亚洲精品bt天堂精选| 日韩久久免费av| 91精品国产色综合久久不卡蜜臀 | 亚洲天堂福利av| 欧美高清在线一区二区| 国产亚洲精久久久久久| 国产亚洲综合色| 欧美精品一区二区精品网| 日韩精品一区二区三区中文不卡 | 欧美一级理论片| 综合av第一页| 色8久久精品久久久久久蜜| 亚洲小说欧美激情另类| 成人91在线观看| 国产精品久久久久久一区二区三区 | 亚洲欧洲三级电影| 国产欧美精品日韩区二区麻豆天美| 欧美一卡2卡3卡4卡| 日韩欧美亚洲国产精品字幕久久久| 在线免费视频一区二区| 国产精品99久久不卡二区| 国产乱子伦一区二区三区国色天香| 午夜影院在线观看欧美| 蜜桃视频在线一区| 国产一区二区日韩精品| 国产在线精品免费av| 国产成人精品亚洲午夜麻豆| 成人动漫视频在线| 国产精品99久久久久久有的能看| 亚洲无线码一区二区三区| 最新国产精品久久精品| 久久精品一区二区| 欧美国产乱子伦| 中文av一区特黄| 中文天堂在线一区| 日本一区二区电影|