ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/include/ether.h
Revision: 1.2
Committed: 2000-04-10T18:53:30Z (24 years, 1 month ago) by cebix
Content type: text/plain
Branch: MAIN
CVS Tags: snapshot-13072000
Changes since 1.1: +1 -1 lines
Log Message:
- updated copyright info: 1999->2000

File Contents

# Content
1 /*
2 * ether.h - Ethernet device driver
3 *
4 * Basilisk II (C) 1997-2000 Christian Bauer
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20
21 #ifndef ETHER_H
22 #define ETHER_H
23
24 extern int16 EtherOpen(uint32 pb, uint32 dce);
25 extern int16 EtherControl(uint32 pb, uint32 dce);
26 extern void EtherReadPacket(uint8 **src, uint32 &dest, uint32 &len, uint32 &remaining);
27
28 // System specific and internal functions/data
29 extern void EtherInit(void);
30 extern void EtherExit(void);
31 extern void EtherReset(void);
32 extern void EtherInterrupt(void);
33
34 extern int16 ether_add_multicast(uint32 pb);
35 extern int16 ether_del_multicast(uint32 pb);
36 extern int16 ether_attach_ph(uint16 type, uint32 handler);
37 extern int16 ether_detach_ph(uint16 type);
38 extern int16 ether_write(uint32 wds);
39
40 extern uint8 ether_addr[6]; // Ethernet address (set by EtherInit())
41 extern bool net_open; // Flag: initialization succeeded, network device open (set by EtherInit())
42
43 // Ethernet driver data in MacOS RAM
44 enum {
45 ed_DeferredTask = 0, // Deferred Task struct
46 ed_Code = 20, // DT code is stored here
47 ed_Result = 30, // Result for DT
48 ed_DCE = 34, // DCE for DT (must come directly behind ed_Result)
49 ed_RHA = 38, // Read header area
50 ed_ReadPacket = 52, // ReadPacket/ReadRest routines
51 SIZEOF_etherdata = 76
52 };
53
54 extern uint32 ether_data; // Mac address of driver data in MacOS RAM
55
56 #endif