diff options
author | ps <ps@FreeBSD.org> | 2000-08-11 08:36:17 +0000 |
---|---|---|
committer | ps <ps@FreeBSD.org> | 2000-08-11 08:36:17 +0000 |
commit | 1dd134848fb77eeb60abfde6ac6c912a97a40a92 (patch) | |
tree | 6b4cf526523ea9ea5b7c7279e1adbc3a6c25784c /sys | |
parent | bf1837571fcf12844f15bc71088fee668425d7b1 (diff) | |
download | FreeBSD-src-1dd134848fb77eeb60abfde6ac6c912a97a40a92.zip FreeBSD-src-1dd134848fb77eeb60abfde6ac6c912a97a40a92.tar.gz |
Add support to send the string 'PXEClient' as the Vendor class
identifier to the DHCP server. Now you can check for this string
in your dhcp configuration to decide whether you will hand out a
lease to the client or not.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/boot/common/dev_net.c | 3 | ||||
-rw-r--r-- | sys/boot/i386/libi386/pxe.c | 3 | ||||
-rw-r--r-- | sys/boot/i386/libi386/pxe.h | 2 |
3 files changed, 6 insertions, 2 deletions
diff --git a/sys/boot/common/dev_net.c b/sys/boot/common/dev_net.c index c88dae7..884366f 100644 --- a/sys/boot/common/dev_net.c +++ b/sys/boot/common/dev_net.c @@ -68,6 +68,7 @@ #include <string.h> #include <net.h> #include <netif.h> +#include <bootp.h> #include <bootparam.h> #include "dev_net.h" @@ -217,7 +218,7 @@ net_getparams(sock) * use RARP and RPC/bootparam (the Sun way) to get them. */ if (try_bootp) - bootp(sock); + bootp(sock, BOOTP_NONE); if (myip.s_addr != 0) goto exit; if (debug) diff --git a/sys/boot/i386/libi386/pxe.c b/sys/boot/i386/libi386/pxe.c index fa3a4f2..0357cbe 100644 --- a/sys/boot/i386/libi386/pxe.c +++ b/sys/boot/i386/libi386/pxe.c @@ -41,6 +41,7 @@ #include <net.h> #include <netif.h> +#include <bootp.h> #include <bootstrap.h> #include "btxv86.h" #include "pxe.h" @@ -276,7 +277,7 @@ pxe_open(struct open_file *f, ...) * the proper information, fall back to the server * which brought us to life and a default rootpath. */ - bootp(pxe_sock); + bootp(pxe_sock, BOOTP_PXE); if (rootip.s_addr == 0) rootip.s_addr = bootplayer.sip; if (!rootpath[1]) diff --git a/sys/boot/i386/libi386/pxe.h b/sys/boot/i386/libi386/pxe.h index c6bc4d0..3c9f2ff 100644 --- a/sys/boot/i386/libi386/pxe.h +++ b/sys/boot/i386/libi386/pxe.h @@ -498,7 +498,9 @@ typedef struct { uint8_t d[BOOTP_DHCPVEND]; /* raw array of vendor/dhcp options */ struct { uint8_t magic[4]; /* DHCP magic cookie */ +# ifndef VM_RFC1048 # define VM_RFC1048 0x63825363L /* ? */ +# endif uint32_t flags; /* bootp flags/opcodes */ uint8_t pad[56]; /* I don't think intel knows what a union does... */ |