root / slirp / main.h @ f97572e5
History | View | Annotate | Download (1.3 kB)
1 | f0cbd3ec | bellard | /*
|
---|---|---|---|
2 | f0cbd3ec | bellard | * Copyright (c) 1995 Danny Gasparovski.
|
3 | 5fafdf24 | ths | *
|
4 | 5fafdf24 | ths | * Please read the file COPYRIGHT for the
|
5 | f0cbd3ec | bellard | * terms and conditions of the copyright.
|
6 | f0cbd3ec | bellard | */
|
7 | f0cbd3ec | bellard | |
8 | f0cbd3ec | bellard | #ifdef HAVE_SYS_SELECT_H
|
9 | f0cbd3ec | bellard | #include <sys/select.h> |
10 | f0cbd3ec | bellard | #endif
|
11 | f0cbd3ec | bellard | |
12 | f0cbd3ec | bellard | #define TOWRITEMAX 512 |
13 | f0cbd3ec | bellard | |
14 | f0cbd3ec | bellard | extern struct timeval tt; |
15 | f0cbd3ec | bellard | extern int link_up; |
16 | f0cbd3ec | bellard | extern int slirp_socket; |
17 | f0cbd3ec | bellard | extern int slirp_socket_unit; |
18 | f0cbd3ec | bellard | extern int slirp_socket_port; |
19 | f0cbd3ec | bellard | extern u_int32_t slirp_socket_addr;
|
20 | f0cbd3ec | bellard | extern char *slirp_socket_passwd; |
21 | f0cbd3ec | bellard | extern int ctty_closed; |
22 | f0cbd3ec | bellard | |
23 | f0cbd3ec | bellard | /*
|
24 | f0cbd3ec | bellard | * Get the difference in 2 times from updtim()
|
25 | f0cbd3ec | bellard | * Allow for wraparound times, "just in case"
|
26 | f0cbd3ec | bellard | * x is the greater of the 2 (current time) and y is
|
27 | f0cbd3ec | bellard | * what it's being compared against.
|
28 | f0cbd3ec | bellard | */
|
29 | f0cbd3ec | bellard | #define TIME_DIFF(x,y) (x)-(y) < 0 ? ~0-(y)+(x) : (x)-(y) |
30 | f0cbd3ec | bellard | |
31 | f0cbd3ec | bellard | extern char *slirp_tty; |
32 | f0cbd3ec | bellard | extern char *exec_shell; |
33 | f0cbd3ec | bellard | extern u_int curtime;
|
34 | f0cbd3ec | bellard | extern fd_set *global_readfds, *global_writefds, *global_xfds;
|
35 | f0cbd3ec | bellard | extern struct in_addr ctl_addr; |
36 | f0cbd3ec | bellard | extern struct in_addr special_addr; |
37 | 8dbca8dd | bellard | extern struct in_addr alias_addr; |
38 | f0cbd3ec | bellard | extern struct in_addr our_addr; |
39 | f0cbd3ec | bellard | extern struct in_addr loopback_addr; |
40 | f0cbd3ec | bellard | extern struct in_addr dns_addr; |
41 | f0cbd3ec | bellard | extern char *username; |
42 | f0cbd3ec | bellard | extern char *socket_path; |
43 | f0cbd3ec | bellard | extern int towrite_max; |
44 | f0cbd3ec | bellard | extern int ppp_exit; |
45 | f0cbd3ec | bellard | extern int tcp_keepintvl; |
46 | f0cbd3ec | bellard | extern uint8_t client_ethaddr[6]; |
47 | f0cbd3ec | bellard | |
48 | f0cbd3ec | bellard | #define PROTO_SLIP 0x1 |
49 | f0cbd3ec | bellard | #ifdef USE_PPP
|
50 | f0cbd3ec | bellard | #define PROTO_PPP 0x2 |
51 | f0cbd3ec | bellard | #endif
|
52 | f0cbd3ec | bellard | |
53 | f0cbd3ec | bellard | void if_encap(const uint8_t *ip_data, int ip_data_len); |