ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/Windows/router/router.h
Revision: 1.2
Committed: 2006-04-23T15:36:51Z (18 years, 6 months ago) by gbeauche
Content type: text/plain
Branch: MAIN
CVS Tags: nigel-build-19
Changes since 1.1: +1 -2 lines
Log Message:
Some clean-ups. Rewrite ethernet config interpreter. This implies some
prefs items changes but it should now be simpler to add other ethernet
emulation means (slirp, tap-win32).

# Basilisk II driver mode
	ether {guid}
becomes
	ether b2ether
	etherguid {guid}

# Basilisk II Router mode
	routerenabled true
becomes
	ether router

File Contents

# Content
1 /*
2 * router.h - ip router
3 *
4 * Basilisk II (C) 1997-2001 Christian Bauer
5 *
6 * Windows platform specific code copyright (C) Lauri Pesonen
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 */
22
23 #ifndef _ROUTER_H_
24 #define _ROUTER_H_
25
26 extern bool is_router_shutting_down;
27 extern CRITICAL_SECTION router_section;
28
29 // Increased by one for each ip packet sent to the emulated enet interface.
30 extern uint16 next_ip_ident_number;
31
32 // Used by incoming icmp packets and internal icmp messages. Host byte order.
33 extern uint32 macos_ip_address;
34
35 // The magic constant
36 extern const uint8 router_mac_addr[6];
37
38 // Used by internal icmp messages. Host byte order.
39 extern uint32 router_ip_address;
40
41 // False under NT/Win2k if the user has no admin rights
42 extern bool raw_sockets_available;
43
44
45
46 // Interface exposed to ether_windows module.
47 bool router_init(void);
48 void router_final(void);
49
50 // Both of these return true if the ethernet module should drop the packet.
51 bool router_write_packet(uint8 *packet, int len);
52 bool router_read_packet(uint8 *packet, int len);
53
54 #endif // _ROUTER_H_