s390x: sort some devices into categories
[qemu.git] / slirp / main.h
blob90053ce5eca6c5a5f6dc1708c65c1a58d70cc084
1 /*
2 * Copyright (c) 1995 Danny Gasparovski.
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
17 extern int slirp_socket;
18 extern int slirp_socket_unit;
19 extern int slirp_socket_port;
20 extern uint32_t slirp_socket_addr;
21 extern char *slirp_socket_passwd;
22 extern int ctty_closed;
25 * Get the difference in 2 times from updtim()
26 * Allow for wraparound times, "just in case"
27 * x is the greater of the 2 (current time) and y is
28 * what it's being compared against.
30 #define TIME_DIFF(x,y) (x)-(y) < 0 ? ~0-(y)+(x) : (x)-(y)
32 extern char *slirp_tty;
33 extern char *exec_shell;
34 extern u_int curtime;
35 extern struct in_addr loopback_addr;
36 extern unsigned long loopback_mask;
37 extern char *username;
38 extern char *socket_path;
39 extern int towrite_max;
40 extern int ppp_exit;
41 extern int tcp_keepintvl;
43 #define PROTO_SLIP 0x1
44 #ifdef USE_PPP
45 #define PROTO_PPP 0x2
46 #endif
48 int if_encap(Slirp *slirp, struct mbuf *ifm);
49 ssize_t slirp_send(struct socket *so, const void *buf, size_t len, int flags);
51 #endif