@code{smc91c111} and @code{lance}. Not all devices are supported on all
targets.
-@item -net user[,vlan=n]
+@item -net user[,vlan=n][,hostname=name]
Use the user mode network stack which requires no administrator
-priviledge to run.
+priviledge to run. @option{hotname=name} can be used to specify the client
+hostname reported by the builtin DHCP server.
@item -net tap[,vlan=n][,fd=h][,ifname=name][,script=file]
Connect the host TAP network interface @var{name} to VLAN @var{n} and
val = htonl(LEASE_TIME);
memcpy(q, &val, 4);
q += 4;
+
+ if (*slirp_hostname) {
+ val = strlen(slirp_hostname);
+ *q++ = RFC1533_HOSTNAME;
+ *q++ = val;
+ memcpy(q, slirp_hostname, val);
+ q += val;
+ }
}
*q++ = RFC1533_END;
int guest_port);
extern const char *tftp_prefix;
+extern const char slirp_hostname[33];
#ifdef __cplusplus
}
/* XXX: suppress those select globals */
fd_set *global_readfds, *global_writefds, *global_xfds;
+const char slirp_hostname[33];
+
#ifdef _WIN32
static int get_dns_addr(struct in_addr *pdns_addr)
} 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
"-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"