mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-01 14:53:54 -06:00
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>
This commit is contained in:
parent
ad196a9d0c
commit
a13a4126c8
13 changed files with 148 additions and 141 deletions
|
@ -112,15 +112,16 @@ 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)
|
||||
return -1;
|
||||
if (port == tmp_ptr->ex_fport &&
|
||||
addr.s_addr == tmp_ptr->ex_addr.s_addr)
|
||||
return -1;
|
||||
}
|
||||
|
||||
tmp_ptr = *ex_ptr;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue