aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2007-02-20 00:05:08 +0000
committerths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2007-02-20 00:05:08 +0000
commitc1c0fe18bd8a4d6ad8a55a7c0de706ea5bdc936a (patch)
treeaf29639746fd229d98da7c8ef4115b22236f370c
parente4da1afe8a1ef4ba19b90ddd4d9f0af808ad53f7 (diff)
downloadslirp-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.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/bootp.c b/bootp.c
index cd5feff..3d07314 100644
--- a/bootp.c
+++ b/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
@@ -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);