VirtualBox

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

最後變更 在這個檔案從1050是 1033,由 vboxsync 提交於 18 年 前

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.

  • 屬性 svn:eol-style 設為 native
檔案大小: 1.5 KB
 
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 */
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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