Plan 9 from Bell Labs’s /usr/web/sources/extra/9hist/pc/etherif.h

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


## diffname pc/etherif.h 1993/1113
## diff -e /dev/null /n/fornaxdump/1993/1113/sys/src/brazil/pc/etherif.h
0a
enum {
	MaxEther	= 4,
	Ntypes		= 8,
};

typedef struct Ether Ether;
struct Ether {
	ISAConf;			/* hardware info */

	void	(*attach)(Ether*);	/* filled in by reset routine */
	long	(*write)(Ether*, void*, long);
	void	(*interrupt)(Ether*);
	void	*private;

	Etherpkt tpkt;			/* transmit buffer */
	Etherpkt rpkt;			/* receive buffer */

	QLock	tlock;			/* lock for grabbing transmitter queue */
	Rendez	tr;			/* wait here for free xmit buffer */
	long	tlen;			/* length of data in tb for txfifo management */

	Netif;
};

#define NEXT(x, l)	(((x)+1)%(l))
#define	HOWMANY(x, y)	(((x)+((y)-1))/(y))
#define ROUNDUP(x, y)	(HOWMANY((x), (y))*(y))

extern void addethercard(char*, int(*)(Ether*));
.
## diffname pc/etherif.h 1993/1116
## diff -e /n/fornaxdump/1993/1113/sys/src/brazil/pc/etherif.h /n/fornaxdump/1993/1116/sys/src/brazil/pc/etherif.h
24a
typedef struct {
	uchar	bit16;			/* true if a 16 bit interface */
	uchar	ram;			/* true if card has shared memory */

	ulong	dp8390;			/* I/O address of 8390 */
	ulong	data;			/* I/O data port if no shared memory */
	uchar	nxtpkt;			/* software bndry */
	uchar	tstart;			/* 8390 ring addresses */
	uchar	pstart;
	uchar	pstop;
} Dp8390;

.
## diffname pc/etherif.h 1993/1118
## diff -e /n/fornaxdump/1993/1116/sys/src/brazil/pc/etherif.h /n/fornaxdump/1993/1118/sys/src/brazil/pc/etherif.h
35a

#define Dp8390BufSz	256

extern int dp8390reset(Ether*);
extern void dp8390getea(Ether*);
extern void dp8390setea(Ether*);
.
31c

	uchar	nxtpkt;			/* receive: software bndry */
	uchar	busy;			/* transmit: busy */
.
## diffname pc/etherif.h 1993/1119
## diff -e /n/fornaxdump/1993/1118/sys/src/brazil/pc/etherif.h /n/fornaxdump/1993/1119/sys/src/brazil/pc/etherif.h
33d
20c
	long	tlen;			/* length of data in tpkt */
.
## diffname pc/etherif.h 1993/1124
## diff -e /n/fornaxdump/1993/1119/sys/src/brazil/pc/etherif.h /n/fornaxdump/1993/1124/sys/src/brazil/pc/etherif.h
12c
	void	(*interrupt)(Ureg*, void*);
.
## diffname pc/etherif.h 1994/0128
## diff -e /n/fornaxdump/1993/1124/sys/src/brazil/pc/etherif.h /n/fornaxdump/1994/0128/sys/src/brazil/pc/etherif.h
42a
extern void *dp8390read(Dp8390*, void*, ulong, ulong);
extern void *dp8390write(Dp8390*, ulong, void*, ulong);
.
## diffname pc/etherif.h 1994/0130
## diff -e /n/fornaxdump/1994/0128/sys/src/brazil/pc/etherif.h /n/fornaxdump/1994/0130/sys/src/brazil/pc/etherif.h
44a
extern void dp8390getea(Ether*);
extern void dp8390setea(Ether*);
.
41,42d
## diffname pc/etherif.h 1994/0202
## diff -e /n/fornaxdump/1994/0130/sys/src/brazil/pc/etherif.h /n/fornaxdump/1994/0202/sys/src/brazil/pc/etherif.h
49,50d
24a
extern void etherrloop(Ether*, Etherpkt*, long);
extern void addethercard(char*, int(*)(Ether*));

/*
 * Stuff for the boards using the National Semiconductor DP8390
 * and SMC 83C90 Network Interface Controller.
 * Common code is in ether8390.c.
 */
.
## diffname pc/etherif.h 1994/0702
## diff -e /n/fornaxdump/1994/0202/sys/src/brazil/pc/etherif.h /n/fornaxdump/1994/0702/sys/src/brazil/pc/etherif.h
25c
extern void etherrloop(Ether*, Etherpkt*, long, int);
.
## diffname pc/etherif.h 1995/0129
## diff -e /n/fornaxdump/1994/0702/sys/src/brazil/pc/etherif.h /n/fornaxdump/1995/0129/sys/src/brazil/pc/etherif.h
2c
	MaxEther	= 8,
.
## diffname pc/etherif.h 1995/0721
## diff -e /n/fornaxdump/1995/0129/sys/src/brazil/pc/etherif.h /n/fornaxdump/1995/0721/sys/src/brazil/pc/etherif.h
25c
extern void etherrloop(Ether*, Etherpkt*, long);
.
13c
	void	*ctlr;
.
8a
	int	ctlrno;
.
## diffname pc/etherif.h 1996/0420
## diff -e /n/fornaxdump/1995/0721/sys/src/brazil/pc/etherif.h /n/fornaxdump/1996/0420/sys/src/brazil/pc/etherif.h
52d
## diffname pc/etherif.h 1996/0601
## diff -e /n/fornaxdump/1996/0420/sys/src/brazil/pc/etherif.h /n/fornaxdump/1996/0601/sys/src/brazil/pc/etherif.h
9a
	int	mbps;			/* Mbps */
.
## diffname pc/etherif.h 1996/0607
## diff -e /n/fornaxdump/1996/0601/sys/src/brazil/pc/etherif.h /n/fornaxdump/1996/0607/sys/src/brazil/pc/etherif.h
14a
	long	(*ifstat)(Ether*, void*, long, ulong);
.
2c
	MaxEther	= 24,
.
## diffname pc/etherif.h 1996/0622
## diff -e /n/fornaxdump/1996/0607/sys/src/brazil/pc/etherif.h /n/fornaxdump/1996/0622/sys/src/brazil/pc/etherif.h
56a
#define PREV(x, l)	(((x) == 0) ? (l)-1: (x)-1)
.
## diffname pc/etherif.h 1997/0327
## diff -e /n/fornaxdump/1996/0622/sys/src/brazil/pc/etherif.h /n/emeliedump/1997/0327/sys/src/brazil/pc/etherif.h
30,54d
28c
extern Block* etheriq(Ether*, Block*, int);
.
21,24d
18,19c
	Queue*	oq;
.
13c
	void	(*transmit)(Ether*);
.
10a
	uchar	ea[Eaddrlen];
.
9a
	int	tbdf;			/* type+busno+devno+funcno */
.
## diffname pc/etherif.h 1997/0415
## diff -e /n/emeliedump/1997/0327/sys/src/brazil/pc/etherif.h /n/emeliedump/1997/0415/sys/src/brazil/pc/etherif.h
26a
extern ulong ethercrc(uchar*, int);
.
## diffname pc/etherif.h 1998/0423
## diff -e /n/emeliedump/1997/0415/sys/src/brazil/pc/etherif.h /n/emeliedump/1998/0423/sys/src/brazil/pc/etherif.h
8a

.
## diffname pc/etherif.h 2000/0817
## diff -e /n/emeliedump/1998/0423/sys/src/brazil/pc/etherif.h /n/emeliedump/2000/0817/sys/src/9/pc/etherif.h
18a
	long 	(*ctl)(Ether*, void*, long); /* custom ctl messages */
.
13a
	int	encry;
.
## diffname pc/etherif.h 2000/0921
## diff -e /n/emeliedump/2000/0817/sys/src/9/pc/etherif.h /n/emeliedump/2000/0921/sys/src/9/pc/etherif.h
12a
	int	minmtu;
	int 	maxmtu;
.
## diffname pc/etherif.h 2001/1022
## diff -e /n/emeliedump/2000/0921/sys/src/9/pc/etherif.h /n/emeliedump/2001/1022/sys/src/9/pc/etherif.h
16d
## diffname pc/etherif.h 2002/0109
## diff -e /n/emeliedump/2001/1022/sys/src/9/pc/etherif.h /n/emeliedump/2002/0109/sys/src/9/pc/etherif.h
21a
	void	(*shutdown)(Ether*);	/* shutdown hardware before reboot */
.
## diffname pc/etherif.h 2002/0217
## diff -e /n/emeliedump/2002/0109/sys/src/9/pc/etherif.h /n/emeliedump/2002/0217/sys/src/9/pc/etherif.h
32a
extern int parseether(uchar*, char*);
.
## diffname pc/etherif.h 2002/0615
## diff -e /n/emeliedump/2002/0217/sys/src/9/pc/etherif.h /n/emeliedump/2002/0615/sys/src/9/pc/etherif.h
17a
	void	(*detach)(Ether*);
.
## diffname pc/etherif.h 2002/0620
## diff -e /n/emeliedump/2002/0615/sys/src/9/pc/etherif.h /n/emeliedump/2002/0620/sys/src/9/pc/etherif.h
22a
	void	(*power)(Ether*, int);	/* power on/off */
.
## diffname pc/etherif.h 2003/0209
## diff -e /n/emeliedump/2002/0620/sys/src/9/pc/etherif.h /n/emeliedump/2003/0209/sys/src/9/pc/etherif.h
12d

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.