ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/BeOS/SheepNet/sheep_net.h
Revision: 1.3
Committed: 2002-01-15T14:58:36Z (22 years, 10 months ago) by cebix
Content type: text/plain
Branch: MAIN
CVS Tags: nigel-build-19, nigel-build-12, nigel-build-13, nigel-build-16, nigel-build-17, nigel-build-15, snapshot-15012002
Changes since 1.2: +2 -2 lines
Log Message:
- documentation updates
- 2001 -> 2002
- version 0.9 -> 1.0

File Contents

# Content
1 /*
2 * sheep_net.h - Net server add-on for SheepShaver and Basilisk II
3 *
4 * SheepShaver (C) 1997-2002 Marc Hellwig and Christian Bauer
5 * Basilisk II (C) 1997-2002 Christian Bauer
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21
22 #ifndef SHEEP_NET_H
23 #define SHEEP_NET_H
24
25 // Net buffer dimensions
26 #define READ_PACKET_COUNT 10
27 #define WRITE_PACKET_COUNT 10
28
29 // Net packet
30 struct net_packet {
31 uint32 cmd; // Command
32 uint32 length; // Data length
33 uint32 card; // Network card ID
34 uint32 reserved;
35 uint8 data[1584];
36 };
37
38 // Net buffer (shared area)
39 struct net_buffer {
40 uint8 ether_addr[6]; // Ethernet address
41 uint8 filler1[2];
42 sem_id read_sem; // Semaphore for read packets
43 uint32 read_ofs;
44 uint32 read_packet_size;
45 uint32 read_packet_count;
46 sem_id write_sem; // Semaphore for write packets
47 uint32 write_ofs;
48 uint32 write_packet_size;
49 uint32 write_packet_count;
50 uint8 filler[24];
51 net_packet read[READ_PACKET_COUNT];
52 net_packet write[WRITE_PACKET_COUNT];
53 };
54
55 // Packet commands
56 #define SHEEP_PACKET 0
57 #define ADD_MULTICAST 1
58 #define REMOVE_MULTICAST 2
59 #define ACTIVATE_SHEEP_NET 8
60 #define DEACTIVATE_SHEEP_NET 9
61 #define SHUTDOWN_SHEEP_NET 10
62
63 #define IN_USE 1
64
65 #endif