Browse Source

[dhcpv6] Add DHCPv6 "filename" setting

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 10 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
 /** DHCPv6 domain search list option */
151
 /** DHCPv6 domain search list option */
152
 #define DHCPV6_DOMAIN_LIST 24
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
 /** DHCPv6 syslog server option
160
 /** DHCPv6 syslog server option
155
  *
161
  *
156
  * This option code has not yet been assigned by IANA.  Please update
162
  * This option code has not yet been assigned by IANA.  Please update

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

363
 /** Options to be requested */
363
 /** Options to be requested */
364
 static uint16_t dhcpv6_requested_options[] = {
364
 static uint16_t dhcpv6_requested_options[] = {
365
 	htons ( DHCPV6_DNS_SERVERS ), htons ( DHCPV6_DOMAIN_LIST ),
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
 	ref_put ( &dhcpv6->refcnt );
970
 	ref_put ( &dhcpv6->refcnt );
970
 	return rc;
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