slirp: Make hostfwd_add/remove multi-instance-aware

Extend the syntax of hostfwd_add/remove to optionally take a tuple of
VLAN ID and slirp stack name. If those are omitted, the commands will
continue to work on the first registered slirp stack.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
Jan Kiszka 2009-06-24 14:42:32 +02:00 committed by Anthony Liguori
parent 1a60952027
commit f13b572cb3
3 changed files with 60 additions and 16 deletions

View file

@ -536,11 +536,11 @@ Remove host VLAN client.
ETEXI
#ifdef CONFIG_SLIRP
{ "hostfwd_add", "s", net_slirp_hostfwd_add,
"[tcp|udp]:[hostaddr]:hostport-[guestaddr]:guestport",
{ "hostfwd_add", "ss?s?", net_slirp_hostfwd_add,
"[vlan_id name] [tcp|udp]:[hostaddr]:hostport-[guestaddr]:guestport",
"redirect TCP or UDP connections from host to guest (requires -net user)" },
{ "hostfwd_remove", "s", net_slirp_hostfwd_remove,
"[tcp|udp]:[hostaddr]:hostport",
{ "hostfwd_remove", "ss?s?", net_slirp_hostfwd_remove,
"[vlan_id name] [tcp|udp]:[hostaddr]:hostport",
"remove host-to-guest TCP or UDP redirection" },
#endif
STEXI