xref: /haiku/headers/private/net/ether_driver.h (revision 9eb55bc1d104b8fda80898f8b25c94d8000c8255)
1 /*
2  * ether_driver.h
3  *
4  * Ethernet driver: handles NE2000 and 3C503 cards
5  */
6 /*
7 	Copyright 1999, Be Incorporated.   All Rights Reserved.
8 	This file may be used under the terms of the Be Sample Code License.
9 */
10 #ifndef _ETHER_DRIVER_H
11 #define _ETHER_DRIVER_H
12 
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16 
17 #include <Drivers.h>
18 
19 /*
20  * ioctls: belongs in a public header file
21  * somewhere, so that the net_server and other ethernet drivers can use.
22  */
23 enum {
24 	ETHER_GETADDR = B_DEVICE_OP_CODES_END,	/* get ethernet address */
25 	ETHER_INIT,								/* set irq and port */
26 	ETHER_NONBLOCK,							/* set/unset nonblocking mode */
27 	ETHER_ADDMULTI,							/* add multicast addr */
28 	ETHER_REMMULTI,							/* rem multicast addr */
29 	ETHER_SETPROMISC,						/* set promiscuous */
30 	ETHER_GETFRAMESIZE						/* get frame size */
31 };
32 
33 
34 /*
35  * 48-bit ethernet address, passed back from ETHER_GETADDR
36  */
37 typedef struct {
38 	unsigned char ebyte[6];
39 } ether_address_t;
40 
41 
42 /*
43  *	info passed to ETHER_INIT
44  */
45 
46 typedef struct ether_init_params {
47 	short port;
48 	short irq;
49 	unsigned long mem;
50 } ether_init_params_t;
51 
52 #ifdef __cplusplus
53 }
54 #endif
55 
56 
57 #endif /* _ETHER_DRIVER_H */
58