spapr_pci: Introduce a finish_realize() callback
[qemu/cris-port.git] / slirp / main.h
blobf2e58cfe2d98268ea4d67af1a7484499506c0519
1 /*
2 * Copyright (c) 1995 Danny Gasparovski.
4 * Please read the file COPYRIGHT for the
5 * terms and conditions of the copyright.
6 */
7 #ifndef SLIRP_MAIN_H
8 #define SLIRP_MAIN_H 1
10 #ifdef HAVE_SYS_SELECT_H
11 #include <sys/select.h>
12 #endif
14 #define TOWRITEMAX 512
16 extern int slirp_socket;
17 extern int slirp_socket_unit;
18 extern int slirp_socket_port;
19 extern uint32_t slirp_socket_addr;
20 extern char *slirp_socket_passwd;
21 extern int ctty_closed;
24 * Get the difference in 2 times from updtim()
25 * Allow for wraparound times, "just in case"
26 * x is the greater of the 2 (current time) and y is
27 * what it's being compared against.
29 #define TIME_DIFF(x,y) (x)-(y) < 0 ? ~0-(y)+(x) : (x)-(y)
31 extern char *slirp_tty;
32 extern char *exec_shell;
33 extern u_int curtime;
34 extern struct in_addr loopback_addr;
35 extern unsigned long loopback_mask;
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 int if_encap(Slirp *slirp, struct mbuf *ifm);
48 ssize_t slirp_send(struct socket *so, const void *buf, size_t len, int flags);
50 #endif