added pxelinux dhcp options documented at http://tools.ietf.org/html/draft-ietf-dhc...
authorDobrica Pavlinusic <dpavlin@rot13.org>
Sun, 2 Aug 2009 03:31:39 +0000 (03:31 +0000)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Sun, 2 Aug 2009 03:31:39 +0000 (03:31 +0000)
lib/Net/DHCP/Constants.pm
lib/PXElator/dhcpd.pm

index df3529f..7b806cc 100644 (file)
@@ -152,7 +152,13 @@ BEGIN {
     'DHO_AUTO_CONFIGURE' => 116,
     'DHO_NAME_SERVICE_SEARCH' => 117,
     'DHO_SUBNET_SELECTION'  => 118,
-    
+
+       # http://tools.ietf.org/html/draft-ietf-dhc-pxelinux-03
+       'DHO_PXELINUX_MAGIC'       => 208, # 0xF100747E
+       'DHO_PXELINUX_CONFIG_FILE' => 209,
+       'DHO_PXELINUX_PATH_PREFIX' => 210,
+       'DHO_PXELINUX_REBOOT_TIME' => 211, # default: 300 s
+
     'DHO_END' => 255
   );
 
@@ -286,6 +292,11 @@ our %DHO_FORMATS = (
     DHO_NAME_SERVICE_SEARCH() => 'shorts',          # rfc 2937
     DHO_SUBNET_SELECTION()  => 'inet',              # rfc 3011
     
+       DHO_PXELINUX_MAGIC() => 'int',                          # draft-ietf-dhc-pxelinux-03
+       DHO_PXELINUX_CONFIG_FILE() => 'string',
+       DHO_PXELINUX_PATH_PREFIX() => 'string',
+       DHO_PXELINUX_REBOOT_TIME() => 'int',                    # 300 s
+
   );
 
 1;
index 20ee6e4..454f56f 100644 (file)
@@ -124,6 +124,11 @@ sub process_packet {
                Giaddr  => $dhcp->giaddr(),
                Chaddr  => $dhcp->chaddr(),
                File    => $file,
+
+               DHO_PXELINUX_MAGIC()       => 0xF100747E,
+               DHO_PXELINUX_CONFIG_FILE() => 'pxelinux.cfg/default',
+               DHO_PXELINUX_PATH_PREFIX() => 'live-helper/tftpboot/',
+               DHO_PXELINUX_REBOOT_TIME() => 5, # default: 300 s
        };
 
        my $messagetype = $dhcp->getOptionValue(DHO_DHCP_MESSAGE_TYPE());