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

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


## diffname alphapc/etherif.h 1999/0415
## diff -e /dev/null /n/emeliedump/1999/0415/sys/src/brazil/alphapc/etherif.h
0a
enum {
	MaxEther	= 24,
	Ntypes		= 8,
};

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

	int	ctlrno;
	int	tbdf;			/* type+busno+devno+funcno */
	int	mbps;			/* Mbps */
	uchar	ea[Eaddrlen];

	void	(*attach)(Ether*);	/* filled in by reset routine */
	void	(*transmit)(Ether*);
	void	(*interrupt)(Ureg*, void*);
	long	(*ifstat)(Ether*, void*, long, ulong);
	void	*ctlr;

	Queue*	oq;

	Netif;
};

extern Block* etheriq(Ether*, Block*, int);
extern void addethercard(char*, int(*)(Ether*));
extern ulong ethercrc(uchar*, int);

#define NEXT(x, l)	(((x)+1)%(l))
#define PREV(x, l)	(((x) == 0) ? (l)-1: (x)-1)
#define	HOWMANY(x, y)	(((x)+((y)-1))/(y))
#define ROUNDUP(x, y)	(HOWMANY((x), (y))*(y))
.
## diffname alphapc/etherif.h 2001/0727
## diff -e /n/emeliedump/1999/0415/sys/src/brazil/alphapc/etherif.h /n/emeliedump/2001/0727/sys/src/9/alphapc/etherif.h
18a
	long 	(*ctl)(Ether*, void*, long); /* custom ctl messages */
.
13a
	int	encry;
.
12a
	int	minmtu;
	int 	maxmtu;
.
## diffname alphapc/etherif.h 2001/1211
## diff -e /n/emeliedump/2001/0727/sys/src/9/alphapc/etherif.h /n/emeliedump/2001/1211/sys/src/9/alphapc/etherif.h
16d
## diffname alphapc/etherif.h 2002/1130
## diff -e /n/emeliedump/2001/1211/sys/src/9/alphapc/etherif.h /n/emeliedump/2002/1130/sys/src/9/alphapc/etherif.h
31a
extern int parseether(uchar*, char*);
.
21a
/* START NEW, from ../pc */
	void	(*power)(Ether*, int);	/* power on/off */
	void	(*shutdown)(Ether*);	/* shutdown hardware before reboot */
/* END NEW */
.
17a
	void	(*detach)(Ether*);	/* NEW, from ../pc */
.
## diffname alphapc/etherif.h 2003/0209
## diff -e /n/emeliedump/2002/1130/sys/src/9/alphapc/etherif.h /n/emeliedump/2003/0209/sys/src/9/alphapc/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.