Sparc32: convert iommu to qdev
[qemu-kvm/fedora.git] / slirp / main.h
blob28d92d886687eae8d2df5ed8d01679c884cf71d0
1 /*
2 * Copyright (c) 1995 Danny Gasparovski.
4 * Please read the file COPYRIGHT for the
5 * terms and conditions of the copyright.
6 */
8 #ifdef HAVE_SYS_SELECT_H
9 #include <sys/select.h>
10 #endif
12 #define TOWRITEMAX 512
14 extern int slirp_socket;
15 extern int slirp_socket_unit;
16 extern int slirp_socket_port;
17 extern u_int32_t slirp_socket_addr;
18 extern char *slirp_socket_passwd;
19 extern int ctty_closed;
22 * Get the difference in 2 times from updtim()
23 * Allow for wraparound times, "just in case"
24 * x is the greater of the 2 (current time) and y is
25 * what it's being compared against.
27 #define TIME_DIFF(x,y) (x)-(y) < 0 ? ~0-(y)+(x) : (x)-(y)
29 extern char *slirp_tty;
30 extern char *exec_shell;
31 extern u_int curtime;
32 extern fd_set *global_readfds, *global_writefds, *global_xfds;
33 extern struct in_addr our_addr;
34 extern struct in_addr loopback_addr;
35 extern struct in_addr dns_addr;
36 extern char *username;
37 extern char *socket_path;
38 extern int towrite_max;
39 extern int ppp_exit;
40 extern int tcp_keepintvl;
42 #define PROTO_SLIP 0x1
43 #ifdef USE_PPP
44 #define PROTO_PPP 0x2
45 #endif
47 void if_encap(Slirp *slirp, const uint8_t *ip_data, int ip_data_len);
48 ssize_t slirp_send(struct socket *so, const void *buf, size_t len, int flags);