ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/Windows/router/router.h
Revision: 1.1
Committed: 2004-12-05T16:48:36Z (19 years, 11 months ago) by gbeauche
Content type: text/plain
Branch: MAIN
CVS Tags: nigel-build-17
Log Message:
import NAT-Router code from original Basilisk II for Windows

File Contents

# User Rev Content
1 gbeauche 1.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     extern bool m_router_enabled;
48     void router_init(void);
49     void router_final(void);
50    
51     // Both of these return true if the ethernet module should drop the packet.
52     bool router_write_packet(uint8 *packet, int len);
53     bool router_read_packet(uint8 *packet, int len);
54    
55     #endif // _ROUTER_H_