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 | 47d5d01a45d64d231fb856a9cdfecf5d567371e6 (patch) | |
tree | 030558e3f9f65817ae2f8e11e16f39c2c740ec8f /slirp/bootp.c | |
parent | 5f189496c4a34e337d77680b0eebc1c0adc32caf (diff) |
Add -bootp option for slirp, by Anthony Liguori.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2439 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'slirp/bootp.c')
-rw-r--r-- | slirp/bootp.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/slirp/bootp.c b/slirp/bootp.c index 62cbcfd8f3..9d243a705a 100644 --- a/slirp/bootp.c +++ b/slirp/bootp.c @@ -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 @@ -168,6 +170,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); |