]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[dhcpv6] Add DHCPv6 "filename" setting
authorMichael Brown <mcb30@ipxe.org>
Thu, 5 Dec 2013 15:12:50 +0000 (15:12 +0000)
committerMichael Brown <mcb30@ipxe.org>
Thu, 5 Dec 2013 15:12:50 +0000 (15:12 +0000)
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/include/ipxe/dhcpv6.h
src/net/udp/dhcpv6.c

index 57758e5167aa1a8c0b7e2043b14514c69491365e..2636b8ab25fadf8f3f8408fda6aaa009f8b13cda 100644 (file)
@@ -151,6 +151,12 @@ struct dhcpv6_user_class_option {
 /** DHCPv6 domain search list option */
 #define DHCPV6_DOMAIN_LIST 24
 
+/** DHCPv6 bootfile URI option */
+#define DHCPV6_BOOTFILE_URL 59
+
+/** DHCPv6 bootfile parameters option */
+#define DHCPV6_BOOTFILE_PARAM 60
+
 /** DHCPv6 syslog server option
  *
  * This option code has not yet been assigned by IANA.  Please update
index 61c26f24d48d67d6d81e4e7408a2214a7700ddb4..b86b833788a96495ab9323d6d85fe4c50e95a285 100644 (file)
@@ -363,6 +363,7 @@ static int dhcpv6_register ( struct dhcpv6_option_list *options,
 /** Options to be requested */
 static uint16_t dhcpv6_requested_options[] = {
        htons ( DHCPV6_DNS_SERVERS ), htons ( DHCPV6_DOMAIN_LIST ),
+       htons ( DHCPV6_BOOTFILE_URL ), htons ( DHCPV6_BOOTFILE_PARAM ),
 };
 
 /**
@@ -969,3 +970,12 @@ int start_dhcpv6 ( struct interface *job, struct net_device *netdev,
        ref_put ( &dhcpv6->refcnt );
        return rc;
 }
+
+/** Boot filename setting */
+const struct setting filename6_setting __setting ( SETTING_BOOT, filename ) = {
+       .name = "filename",
+       .description = "Boot filename",
+       .tag = DHCPV6_BOOTFILE_URL,
+       .type = &setting_type_string,
+       .scope = &ipv6_scope,
+};