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

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


## diffname carrera/etherif.h 1997/1210
## diff -e /dev/null /n/emeliedump/1997/1210/sys/src/brazil/carrera/etherif.h
0a
enum {
	MaxEther	= 1,
	Ntypes		= 8,
};

typedef struct Ether Ether;
typedef struct Endev Endev;

struct Ether {
	ISAConf;			/* hardware info */
	int	ctlrno;
	int	tbdf;			/* type+busno+devno+funcno */
	int	mbps;			/* Mbps */

	Netif;

	Endev*	dev;
	void	*ctlr;
	Queue*	oq;
};

struct Endev {
	char*	name;

	int	(*reset)(Ether*);
	void	(*attach)(Ether*);
	void	(*transmit)(Ether*);
	void	(*interrupt)(Ureg*, void*);
	long	(*ifstat)(Ether*, void*, long, ulong);
	void	(*promiscuous)(void*, int);
	void	(*multicast)(void*, uchar*, int);

	int	vid;
	int	did;
};

/*
 * devether.c
 */
extern Block* etheriq(Ether*, Block*, int);
extern ulong ethercrc(uchar*, int);

extern Endev* endev[];

#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 carrera/etherif.h 2001/0527 # deleted
## diff -e /n/emeliedump/1997/1210/sys/src/brazil/carrera/etherif.h /n/emeliedump/2001/0527/sys/src/9/carrera/etherif.h
1,48d

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].