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

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


## diffname bitsy/etherif.h 2000/1128
## diff -e /dev/null /n/emeliedump/2000/1128/sys/src/9/bitsy/etherif.h
0a
enum {
	MaxEther	= 24,
	Ntypes		= 8,
};

typedef struct Ether Ether;
struct Ether {
	int	ctlrno;
	int	mbps;			/* Mbps */
	int	minmtu;
	int 	maxmtu;
	uchar	ea[Eaddrlen];
	int	encry;

	void	(*attach)(Ether*);	/* filled in by reset routine */
	void	(*transmit)(Ether*);
	void	(*interrupt)(Ureg*, void*);
	long	(*ifstat)(Ether*, void*, long, ulong);
	long 	(*ctl)(Ether*, void*, long); /* custom ctl messages */
	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 bitsy/etherif.h 2000/1205
## diff -e /n/emeliedump/2000/1128/sys/src/9/bitsy/etherif.h /n/emeliedump/2000/1205/sys/src/9/bitsy/etherif.h
8a
	int	tbdf;			/* type+busno+devno+funcno */
.
7a
	DevConf;

.
## diffname bitsy/etherif.h 2002/0615
## diff -e /n/emeliedump/2000/1205/sys/src/9/bitsy/etherif.h /n/emeliedump/2002/0615/sys/src/9/bitsy/etherif.h
18a
	void	(*detach)(Ether*);
.
## diffname bitsy/etherif.h 2002/0617
## diff -e /n/emeliedump/2002/0615/sys/src/9/bitsy/etherif.h /n/emeliedump/2002/0617/sys/src/9/bitsy/etherif.h
23a
	long	(*power)(Ether*, int);	/* power on/off */
.
## diffname bitsy/etherif.h 2002/0618
## diff -e /n/emeliedump/2002/0617/sys/src/9/bitsy/etherif.h /n/emeliedump/2002/0618/sys/src/9/bitsy/etherif.h
24c
	void	(*power)(Ether*, int);	/* power on/off */
.
## diffname bitsy/etherif.h 2002/0620
## diff -e /n/emeliedump/2002/0618/sys/src/9/bitsy/etherif.h /n/emeliedump/2002/0620/sys/src/9/bitsy/etherif.h
24a
	void	(*shutdown)(Ether*);	/* shutdown hardware before reboot */
.
## diffname bitsy/etherif.h 2003/0209
## diff -e /n/emeliedump/2002/0620/sys/src/9/bitsy/etherif.h /n/emeliedump/2003/0209/sys/src/9/bitsy/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.