On Mon, 13 Dec 1999, Ken Yap wrote: > Yes please. Maybe CC the list to get more eyes on the code. Why do you > have to program a loop in CPP by the way? The fix for menue support with DHCP is attached. The etherboot vendor tags have to be added to the parameter request list in the DHCPREQUEST packet sent to the dhcp server. The loop in CPP would be needed to proper support filling the dhcprequest structure with the (#define'd) number of tags for MOTD and IMAGES, right now I'm simply adding 8 and 16 entries respectively. Also attached is a simple dhcpd.conf to start with, works with dhcpd 2.0 and 3.0 beta. BTW, /etc/inetd.conf in RedHat 6.1 is flawed. The line for tftpd should be tftp dgram udp wait root /usr/sbin/tcpd in.tftpd /tftpboot The "/tftpboot" directory is missing from the original RH61 distribution. According to "man tftpd" it should be the default, but somehow it isn't. Maybe it's worth noting this in the etherboot documentation. BTW, the ISC dhdpd comes with the recent RFC's for dhcp and bootp. It would be nice if these could be put on the etherboot web-pages or even included in the package. They are fairly easy to read and were very helpful for me to fix this problem: rfc951, rfc2131, rfc2132
--- etherboot-4.2.12.org/src-32/main.c Thu Dec 9 15:29:18 1999 +++ etherboot-4.2.12/src-32/main.c Tue Dec 14 14:49:27 1999 @@ -49,16 +49,54 @@ #else char rfc1533_cookie[] = { RFC1533_COOKIE}; char rfc1533_end[]={RFC1533_END }; -char dhcpdiscover[]={RFC2132_MSG_TYPE,1,DHCPDISCOVER, - RFC2132_MAX_SIZE,2,2,64, - RFC2132_PARAM_LIST,4,RFC1533_NETMASK,RFC1533_GATEWAY, - RFC1533_HOSTNAME,RFC1533_EXTENSIONPATH}; -char dhcprequest []={RFC2132_MSG_TYPE,1,DHCPREQUEST, - RFC2132_SRV_ID,4,0,0,0,0, - RFC2132_REQ_ADDR,4,0,0,0,0, - RFC2132_MAX_SIZE,2,2,64, - RFC2132_PARAM_LIST,4,RFC1533_NETMASK,RFC1533_GATEWAY, - RFC1533_HOSTNAME,RFC1533_EXTENSIONPATH}; +char dhcpdiscover[]={ + RFC2132_MSG_TYPE,1,DHCPDISCOVER, + RFC2132_MAX_SIZE,2,2,64, + RFC2132_PARAM_LIST,4,RFC1533_NETMASK,RFC1533_GATEWAY, + RFC1533_HOSTNAME,RFC1533_EXTENSIONPATH + }; +char dhcprequest []={ + RFC2132_MSG_TYPE,1,DHCPREQUEST, + RFC2132_SRV_ID,4,0,0,0,0, + RFC2132_REQ_ADDR,4,0,0,0,0, + RFC2132_MAX_SIZE,2,2,64, + /* request parameters */ + RFC2132_PARAM_LIST, + /* 4 standard + 4 vendortags + 8 motd + 16 menu items */ + 4 + 4 + 8 + 16, + /* Standard parameters */ + RFC1533_NETMASK, RFC1533_GATEWAY, + RFC1533_HOSTNAME, RFC1533_EXTENSIONPATH, + /* Etherboot vendortags */ + RFC1533_VENDOR_MAGIC, RFC1533_VENDOR_HOWTO, + RFC1533_VENDOR_MNUOPTS, RFC1533_VENDOR_SELECTION, + /* 8 MOTD entries */ + RFC1533_VENDOR_MOTD, + RFC1533_VENDOR_MOTD+1, + RFC1533_VENDOR_MOTD+2, + RFC1533_VENDOR_MOTD+3, + RFC1533_VENDOR_MOTD+4, + RFC1533_VENDOR_MOTD+5, + RFC1533_VENDOR_MOTD+6, + RFC1533_VENDOR_MOTD+7, + /* 16 image entries */ + RFC1533_VENDOR_IMG, + RFC1533_VENDOR_IMG+1, + RFC1533_VENDOR_IMG+2, + RFC1533_VENDOR_IMG+3, + RFC1533_VENDOR_IMG+4, + RFC1533_VENDOR_IMG+5, + RFC1533_VENDOR_IMG+6, + RFC1533_VENDOR_IMG+7, + RFC1533_VENDOR_IMG+8, + RFC1533_VENDOR_IMG+9, + RFC1533_VENDOR_IMG+10, + RFC1533_VENDOR_IMG+11, + RFC1533_VENDOR_IMG+12, + RFC1533_VENDOR_IMG+13, + RFC1533_VENDOR_IMG+14, + RFC1533_VENDOR_IMG+15, + }; #endif /* NO_DHCP_SUPPORT */ char broadcast[] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF };
subnet 10.97.0.0 netmask 255.255.0.0 { range 10.97.0.2 10.97.0.254; option option-128 e4:45:74:68:0:0; option option-160 "default=193"; option option-184 "HALLO"; option option-192 "Linux:::linux.tagged:"; option option-193 "DOS Bootdisk:::dosboot.tagged"; option option-194 "RH61 Bootdisk:::boot.tagged"; option option-195 "Local Disk:::/dev/hda:85b103482a20682da703aa388933a6d8"; }
For requests or suggestions regarding this mailing list archive please write to netboot@gkminix.han.de.