AF_IPN is no longer protocol #34 (assigned to AF_ISDN).
[vde.git] / vde-2 / src / slirpvde / main.h
blob2db4bfd8902668dec1dfe5b7b58fc504852d3165
1 /*
2 * Copyright (c) 1995 Danny Gasparovski.
3 *
4 * Please read the file COPYRIGHT for the
5 * terms and conditions of the copyright.
6 */
8 #ifndef SLIRP_MAIN_H_
9 #define SLIRP_MAIN_H_
11 #ifdef HAVE_SYS_SELECT_H
12 #include <sys/select.h>
13 #endif
15 #define TOWRITEMAX 512
16 #define min(x,y) ((x) < (y) ? (x) : (y))
18 extern struct timeval tt;
19 extern int link_up;
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;
37 extern u_int curtime;
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;
47 extern int ppp_exit;
48 extern int so_options;
49 extern int tcp_keepintvl;
50 #define PROTO_SLIP 0x1
51 #ifdef USE_PPP
52 #define PROTO_PPP 0x2
53 #endif
55 void if_encap(const uint8_t *ip_data, int ip_data_len);
57 #endif