diff options
author | ths <ths@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-02-20 00:05:08 +0000 |
---|---|---|
committer | ths <ths@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-02-20 00:05:08 +0000 |
commit | c1c0fe18bd8a4d6ad8a55a7c0de706ea5bdc936a (patch) | |
tree | af29639746fd229d98da7c8ef4115b22236f370c | |
parent | e4da1afe8a1ef4ba19b90ddd4d9f0af808ad53f7 (diff) | |
download | slirp-c1c0fe18bd8a4d6ad8a55a7c0de706ea5bdc936a.zip slirp-c1c0fe18bd8a4d6ad8a55a7c0de706ea5bdc936a.tar.gz slirp-c1c0fe18bd8a4d6ad8a55a7c0de706ea5bdc936a.tar.bz2 |
Add -bootp option for slirp, by Anthony Liguori.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2439 c046a42c-6fe2-441c-8c8c-71466251a162
-rw-r--r-- | bootp.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -38,6 +38,8 @@ typedef struct { BOOTPClient bootp_clients[NB_ADDR]; +const char *bootp_filename; + static const uint8_t rfc1533_cookie[] = { RFC1533_COOKIE }; #ifdef DEBUG @@ -169,6 +171,10 @@ static void bootp_reply(struct bootp_t *bp) goto new_addr; } } + + if (bootp_filename) + snprintf(rbp->bp_file, sizeof(rbp->bp_file), "%s", bootp_filename); + dprintf("offered addr=%08x\n", ntohl(daddr.sin_addr.s_addr)); saddr.sin_addr.s_addr = htonl(ntohl(special_addr.s_addr) | CTL_ALIAS); |