mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 10:13:56 -06:00
Set slirp client hostname.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1813 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
ffcdb539de
commit
115defd163
5 changed files with 22 additions and 4 deletions
|
@ -228,6 +228,14 @@ static void bootp_reply(struct bootp_t *bp)
|
|||
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;
|
||||
|
||||
|
|
|
@ -32,6 +32,7 @@ int slirp_add_exec(int do_pty, const char *args, int addr_low_byte,
|
|||
int guest_port);
|
||||
|
||||
extern const char *tftp_prefix;
|
||||
extern const char slirp_hostname[33];
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -25,6 +25,8 @@ struct ex_list *exec_list;
|
|||
/* 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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue