aboutsummaryrefslogtreecommitdiff
path: root/misc.c
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@siemens.com>2009-06-24 14:42:28 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2009-06-29 08:52:45 -0500
commit12531b49b9735ade00b3dd565c00745bb04459e0 (patch)
tree26d9107e2d329219e8656646b08a509d0c7da0f0 /misc.c
parent4326f42547d52b5ca9c7444d1a56ed2a5d84d826 (diff)
downloadslirp-12531b49b9735ade00b3dd565c00745bb04459e0.zip
slirp-12531b49b9735ade00b3dd565c00745bb04459e0.tar.gz
slirp-12531b49b9735ade00b3dd565c00745bb04459e0.tar.bz2
slirp: Rework internal configuration
The user mode IP stack is currently only minimally configurable /wrt to its virtual IP addresses. This is unfortunate if some guest has a fixed idea of which IP addresses to use. Therefore this patch prepares the stack for fully configurable IP addresses and masks. The user interface and default addresses remain untouched in this step, they will be enhanced in the following patch. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'misc.c')
-rw-r--r--misc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/misc.c b/misc.c
index fd8b764..7236454 100644
--- a/misc.c
+++ b/misc.c
@@ -109,14 +109,14 @@ inline void remque(void *a)
/* #endif */
-int add_exec(struct ex_list **ex_ptr, int do_pty, char *exec, int addr,
- int port)
+int add_exec(struct ex_list **ex_ptr, int do_pty, char *exec,
+ struct in_addr addr, int port)
{
struct ex_list *tmp_ptr;
/* First, check if the port is "bound" */
for (tmp_ptr = *ex_ptr; tmp_ptr; tmp_ptr = tmp_ptr->ex_next) {
- if (port == tmp_ptr->ex_fport && addr == tmp_ptr->ex_addr)
+ if (port == tmp_ptr->ex_fport && addr.s_addr == tmp_ptr->ex_addr.s_addr)
return -1;
}