diff options
author | pbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162> | 2006-04-16 11:06:58 +0000 |
---|---|---|
committer | pbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162> | 2006-04-16 11:06:58 +0000 |
commit | 115defd163ff4977cfffbaa5a02e8d19d89e03d2 (patch) | |
tree | 88076d7b335285e1bedf19f71ddbd3c54a1c01cf /vl.c | |
parent | ffcdb539debe426e75290cb76f73e5c7b4fc645d (diff) | |
download | hqemu-115defd163ff4977cfffbaa5a02e8d19d89e03d2.zip hqemu-115defd163ff4977cfffbaa5a02e8d19d89e03d2.tar.gz |
Set slirp client hostname.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1813 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'vl.c')
-rw-r--r-- | vl.c | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -3151,6 +3151,11 @@ int net_client_init(const char *str) } else #ifdef CONFIG_SLIRP if (!strcmp(device, "user")) { + if (get_param_value(buf, sizeof(buf), "hostname", p)) { + if (strlen(buf) > 32) + buf[32] = 0; + strcpy(slirp_hostname, buf); + } ret = net_slirp_init(vlan); } else #endif @@ -4597,8 +4602,9 @@ void help(void) "-net nic[,vlan=n][,macaddr=addr][,model=type]\n" " create a new Network Interface Card and connect it to VLAN 'n'\n" #ifdef CONFIG_SLIRP - "-net user[,vlan=n]\n" - " connect the user mode network stack to VLAN 'n'\n" + "-net user[,vlan=n][,hostname=host]\n" + " connect the user mode network stack to VLAN 'n' and send\n" + " hostname 'host' to DHCP clients\n" #endif #ifdef _WIN32 "-net tap[,vlan=n],ifname=name\n" |