VirtualBox

source: vbox/trunk/src/VBox/Devices/Network/slirp/main.h@ 1052

Last change on this file since 1052 was 1033, checked in by vboxsync, 18 years ago

Big change to make slirp fully instantiatable (replace all global
variables with local ones, passing a reference to the state/config
structure to all places which are interested). You can now have as many
cards in the guest configured for NAT networking as you want.

  • Property svn:eol-style set to native
File size: 1.5 KB
Line 
1/*
2 * Copyright (c) 1995 Danny Gasparovski.
3 *
4 * Please read the file COPYRIGHT for the
5 * terms and conditions of the copyright.
6 */
7
8#ifdef HAVE_SYS_SELECT_H
9#include <sys/select.h>
10#endif
11
12#define TOWRITEMAX 512
13
14#ifndef VBOX
15extern struct timeval tt;
16extern int link_up;
17extern int slirp_socket;
18extern int slirp_socket_unit;
19extern int slirp_socket_port;
20extern u_int32_t slirp_socket_addr;
21extern char *slirp_socket_passwd;
22extern int ctty_closed;
23#endif /* !VBOX */
24
25/*
26 * Get the difference in 2 times from updtim()
27 * Allow for wraparound times, "just in case"
28 * x is the greater of the 2 (current time) and y is
29 * what it's being compared against.
30 */
31#define TIME_DIFF(x,y) (x)-(y) < 0 ? ~0-(y)+(x) : (x)-(y)
32
33#ifndef VBOX
34extern char *slirp_tty;
35extern char *exec_shell;
36extern u_int curtime;
37extern fd_set *global_readfds, *global_writefds, *global_xfds;
38extern struct in_addr ctl_addr;
39extern struct in_addr special_addr;
40extern struct in_addr alias_addr;
41extern struct in_addr our_addr;
42extern struct in_addr loopback_addr;
43extern struct in_addr dns_addr;
44extern char *username;
45extern char *socket_path;
46extern int towrite_max;
47extern int ppp_exit;
48extern int so_options;
49extern int tcp_keepintvl;
50extern uint8_t client_ethaddr[6];
51#endif /* !VBOX */
52
53#define PROTO_SLIP 0x1
54#ifdef USE_PPP
55#define PROTO_PPP 0x2
56#endif
57
58#ifdef VBOX
59void if_encap(PNATState pData, const uint8_t *ip_data, int ip_data_len);
60#else /* !VBOX */
61void if_encap(const uint8_t *ip_data, int ip_data_len);
62#endif /* !VBOX */
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette