2 * Copyright (c) 1995 Danny Gasparovski.
4 * Please read the file COPYRIGHT for the
5 * terms and conditions of the copyright.
11 #ifdef HAVE_SYS_SELECT_H
12 #include <sys/select.h>
15 #define TOWRITEMAX 512
16 #define min(x,y) ((x) < (y) ? (x) : (y))
18 extern struct timeval tt
;
20 extern int slirp_socket
;
21 extern int slirp_socket_unit
;
22 extern int slirp_socket_port
;
23 extern u_int32_t slirp_socket_addr
;
24 extern char *slirp_socket_passwd
;
25 extern int ctty_closed
;
28 * Get the difference in 2 times from updtim()
29 * Allow for wraparound times, "just in case"
30 * x is the greater of the 2 (current time) and y is
31 * what it's being compared against.
33 #define TIME_DIFF(x,y) (x)-(y) < 0 ? ~0-(y)+(x) : (x)-(y)
35 extern char *slirp_tty
;
36 extern char *exec_shell
;
38 extern fd_set
*global_readfds
, *global_writefds
, *global_xfds
;
39 extern struct in_addr ctl_addr
;
40 extern struct in_addr special_addr
;
41 extern struct in_addr our_addr
;
42 extern struct in_addr loopback_addr
;
43 extern struct in_addr dns_addr
;
44 extern char *username
;
45 extern char *socket_path
;
46 extern int towrite_max
;
48 extern int so_options
;
49 extern int tcp_keepintvl
;
50 #define PROTO_SLIP 0x1
55 void if_encap(const uint8_t *ip_data
, int ip_data_len
);