]> git.proxmox.com Git - qemu.git/blame - slirp/main.h
rng-egd: remove redundant free
[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 */
cb9c377f
PB
7#ifndef SLIRP_MAIN_H
8#define SLIRP_MAIN_H 1
f0cbd3ec
FB
9
10#ifdef HAVE_SYS_SELECT_H
11#include <sys/select.h>
12#endif
13
14#define TOWRITEMAX 512
f0cbd3ec 15
f0cbd3ec
FB
16extern int slirp_socket;
17extern int slirp_socket_unit;
18extern int slirp_socket_port;
b6dce92e 19extern uint32_t slirp_socket_addr;
f0cbd3ec
FB
20extern char *slirp_socket_passwd;
21extern int ctty_closed;
22
23/*
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.
28 */
29#define TIME_DIFF(x,y) (x)-(y) < 0 ? ~0-(y)+(x) : (x)-(y)
30
31extern char *slirp_tty;
32extern char *exec_shell;
33extern u_int curtime;
f0cbd3ec 34extern struct in_addr loopback_addr;
0b8db8fe 35extern unsigned long loopback_mask;
f0cbd3ec
FB
36extern char *username;
37extern char *socket_path;
38extern int towrite_max;
39extern int ppp_exit;
f0cbd3ec 40extern int tcp_keepintvl;
f0cbd3ec
FB
41
42#define PROTO_SLIP 0x1
43#ifdef USE_PPP
44#define PROTO_PPP 0x2
45#endif
46
1ab74cea 47int if_encap(Slirp *slirp, struct mbuf *ifm);
e1c5a2b3 48ssize_t slirp_send(struct socket *so, const void *buf, size_t len, int flags);
cb9c377f
PB
49
50#endif