aboutsummaryrefslogtreecommitdiff
path: root/slirp/udp.h
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@siemens.com>2009-06-24 14:42:31 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2009-06-29 08:52:49 -0500
commit460fec67ee3807bb2eb189587ffe803a48f317e5 (patch)
tree398605fd3595389ac29b7af0e0151a19edf25ff5 /slirp/udp.h
parentb5302e1a9d8a47bd29a3e1876fba34be111728a2 (diff)
slirp: Factor out internal state structure
The essence of this patch is to stuff (almost) all global variables of the slirp stack into the structure Slirp. In this step, we still keep the structure as global variable, directly accessible by the whole stack. Changes to the external interface of slirp will be applied in the following patches. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'slirp/udp.h')
-rw-r--r--slirp/udp.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/slirp/udp.h b/slirp/udp.h
index 3eed14a677..cc814a3f48 100644
--- a/slirp/udp.h
+++ b/slirp/udp.h
@@ -36,8 +36,6 @@
#define UDP_TTL 0x60
#define UDP_UDPDATALEN 16192
-extern struct socket *udp_last_so;
-
/*
* Udp protocol header.
* Per RFC 768, September, 1981.
@@ -73,15 +71,15 @@ struct udpiphdr {
#define UDPCTL_CHECKSUM 1 /* checksum UDP packets */
#define UDPCTL_MAXID 2
-extern struct socket udb;
struct mbuf;
-void udp_init _P((void));
+void udp_init _P((Slirp *));
void udp_input _P((register struct mbuf *, int));
int udp_output _P((struct socket *, struct mbuf *, struct sockaddr_in *));
int udp_attach _P((struct socket *));
void udp_detach _P((struct socket *));
-struct socket * udp_listen _P((u_int32_t, u_int, u_int32_t, u_int, int));
+struct socket * udp_listen _P((Slirp *, u_int32_t, u_int, u_int32_t, u_int,
+ int));
int udp_output2(struct socket *so, struct mbuf *m,
struct sockaddr_in *saddr, struct sockaddr_in *daddr,
int iptos);