]> git.proxmox.com Git - mirror_qemu.git/blame - slirp/main.h
Merge remote-tracking branch 'remotes/kraxel/tags/pull-fixes-20170403-1' into staging
[mirror_qemu.git] / slirp / main.h
CommitLineData
f0cbd3ec
FB
1/*
2 * Copyright (c) 1995 Danny Gasparovski.
5fafdf24
TS
3 *
4 * Please read the file COPYRIGHT for the
f0cbd3ec
FB
5 * terms and conditions of the copyright.
6 */
175de524 7
cb9c377f 8#ifndef SLIRP_MAIN_H
175de524 9#define SLIRP_MAIN_H
f0cbd3ec
FB
10
11#ifdef HAVE_SYS_SELECT_H
12#include <sys/select.h>
13#endif
14
15#define TOWRITEMAX 512
f0cbd3ec 16
f0cbd3ec
FB
17extern int slirp_socket;
18extern int slirp_socket_unit;
19extern int slirp_socket_port;
b6dce92e 20extern uint32_t slirp_socket_addr;
f0cbd3ec
FB
21extern char *slirp_socket_passwd;
22extern int ctty_closed;
23
24/*
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.
29 */
30#define TIME_DIFF(x,y) (x)-(y) < 0 ? ~0-(y)+(x) : (x)-(y)
31
32extern char *slirp_tty;
33extern char *exec_shell;
34extern u_int curtime;
f0cbd3ec 35extern struct in_addr loopback_addr;
0b8db8fe 36extern unsigned long loopback_mask;
f0cbd3ec
FB
37extern char *username;
38extern char *socket_path;
39extern int towrite_max;
40extern int ppp_exit;
f0cbd3ec 41extern int tcp_keepintvl;
f0cbd3ec
FB
42
43#define PROTO_SLIP 0x1
44#ifdef USE_PPP
45#define PROTO_PPP 0x2
46#endif
47
1ab74cea 48int if_encap(Slirp *slirp, struct mbuf *ifm);
e1c5a2b3 49ssize_t slirp_send(struct socket *so, const void *buf, size_t len, int flags);
cb9c377f
PB
50
51#endif