Browse Source

[dhcpv6] Add DHCPv6 "filename" setting

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 11 years ago
parent
commit
4a6c453b5b
2 changed files with 16 additions and 0 deletions
  1. 6
    0
      src/include/ipxe/dhcpv6.h
  2. 10
    0
      src/net/udp/dhcpv6.c

+ 6
- 0
src/include/ipxe/dhcpv6.h View File

@@ -151,6 +151,12 @@ struct dhcpv6_user_class_option {
151 151
 /** DHCPv6 domain search list option */
152 152
 #define DHCPV6_DOMAIN_LIST 24
153 153
 
154
+/** DHCPv6 bootfile URI option */
155
+#define DHCPV6_BOOTFILE_URL 59
156
+
157
+/** DHCPv6 bootfile parameters option */
158
+#define DHCPV6_BOOTFILE_PARAM 60
159
+
154 160
 /** DHCPv6 syslog server option
155 161
  *
156 162
  * This option code has not yet been assigned by IANA.  Please update

+ 10
- 0
src/net/udp/dhcpv6.c View File

@@ -363,6 +363,7 @@ static int dhcpv6_register ( struct dhcpv6_option_list *options,
363 363
 /** Options to be requested */
364 364
 static uint16_t dhcpv6_requested_options[] = {
365 365
 	htons ( DHCPV6_DNS_SERVERS ), htons ( DHCPV6_DOMAIN_LIST ),
366
+	htons ( DHCPV6_BOOTFILE_URL ), htons ( DHCPV6_BOOTFILE_PARAM ),
366 367
 };
367 368
 
368 369
 /**
@@ -969,3 +970,12 @@ int start_dhcpv6 ( struct interface *job, struct net_device *netdev,
969 970
 	ref_put ( &dhcpv6->refcnt );
970 971
 	return rc;
971 972
 }
973
+
974
+/** Boot filename setting */
975
+const struct setting filename6_setting __setting ( SETTING_BOOT, filename ) = {
976
+	.name = "filename",
977
+	.description = "Boot filename",
978
+	.tag = DHCPV6_BOOTFILE_URL,
979
+	.type = &setting_type_string,
980
+	.scope = &ipv6_scope,
981
+};

Loading…
Cancel
Save