diff options
author | jake <jake@FreeBSD.org> | 2002-07-31 20:17:06 +0000 |
---|---|---|
committer | jake <jake@FreeBSD.org> | 2002-07-31 20:17:06 +0000 |
commit | dea739f9839c0d837eb888857774dbba5e1fe783 (patch) | |
tree | 99be5d67fb34cc1046acd4f6522156c3e47b0c00 /sys/boot | |
parent | 6af754015784ac8650c4198a8c2a2a5bd8e3e5d0 (diff) | |
download | FreeBSD-src-dea739f9839c0d837eb888857774dbba5e1fe783.zip FreeBSD-src-dea739f9839c0d837eb888857774dbba5e1fe783.tar.gz |
Stash various networking paramters in the environment for the kernel
to pick up, ala pxe.
Diffstat (limited to 'sys/boot')
-rw-r--r-- | sys/boot/common/dev_net.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/boot/common/dev_net.c b/sys/boot/common/dev_net.c index 5e7b736..d0ed701 100644 --- a/sys/boot/common/dev_net.c +++ b/sys/boot/common/dev_net.c @@ -209,6 +209,7 @@ net_getparams(sock) { char buf[MAXHOSTNAMELEN]; char temp[FNAME_SIZE]; + struct iodesc *d; int i; n_long smask; @@ -284,6 +285,14 @@ net_getparams(sock) bcopy(&temp[0], &rootpath[0], strlen(&rootpath[i])+1); } printf("net_open: server path: %s\n", rootpath); + + d = socktodesc(sock); + sprintf(temp, "%6D", d->myea, ":"); + setenv("boot.netif.ip", inet_ntoa(myip), 1); + setenv("boot.netif.netmask", intoa(netmask), 1); + setenv("boot.netif.gateway", inet_ntoa(gateip), 1); + setenv("boot.netif.hwaddr", temp, 1); + return (0); } |