root / slirp / main.h @ d8bcbabf
History | View | Annotate | Download (1.1 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 int slirp_socket; |
15 | f0cbd3ec | bellard | extern int slirp_socket_unit; |
16 | f0cbd3ec | bellard | extern int slirp_socket_port; |
17 | f0cbd3ec | bellard | extern u_int32_t slirp_socket_addr;
|
18 | f0cbd3ec | bellard | extern char *slirp_socket_passwd; |
19 | f0cbd3ec | bellard | extern int ctty_closed; |
20 | f0cbd3ec | bellard | |
21 | f0cbd3ec | bellard | /*
|
22 | f0cbd3ec | bellard | * Get the difference in 2 times from updtim()
|
23 | f0cbd3ec | bellard | * Allow for wraparound times, "just in case"
|
24 | f0cbd3ec | bellard | * x is the greater of the 2 (current time) and y is
|
25 | f0cbd3ec | bellard | * what it's being compared against.
|
26 | f0cbd3ec | bellard | */
|
27 | f0cbd3ec | bellard | #define TIME_DIFF(x,y) (x)-(y) < 0 ? ~0-(y)+(x) : (x)-(y) |
28 | f0cbd3ec | bellard | |
29 | f0cbd3ec | bellard | extern char *slirp_tty; |
30 | f0cbd3ec | bellard | extern char *exec_shell; |
31 | f0cbd3ec | bellard | extern u_int curtime;
|
32 | f0cbd3ec | bellard | extern fd_set *global_readfds, *global_writefds, *global_xfds;
|
33 | f0cbd3ec | bellard | extern struct in_addr loopback_addr; |
34 | f0cbd3ec | bellard | extern char *username; |
35 | f0cbd3ec | bellard | extern char *socket_path; |
36 | f0cbd3ec | bellard | extern int towrite_max; |
37 | f0cbd3ec | bellard | extern int ppp_exit; |
38 | f0cbd3ec | bellard | extern int tcp_keepintvl; |
39 | f0cbd3ec | bellard | |
40 | f0cbd3ec | bellard | #define PROTO_SLIP 0x1 |
41 | f0cbd3ec | bellard | #ifdef USE_PPP
|
42 | f0cbd3ec | bellard | #define PROTO_PPP 0x2 |
43 | f0cbd3ec | bellard | #endif
|
44 | f0cbd3ec | bellard | |
45 | 460fec67 | Jan Kiszka | void if_encap(Slirp *slirp, const uint8_t *ip_data, int ip_data_len); |
46 | e1c5a2b3 | aliguori | ssize_t slirp_send(struct socket *so, const void *buf, size_t len, int flags); |