philipp / rpms / dhcp

Forked from rpms/dhcp 4 years ago
Clone

Blame SOURCES/dhcp-4.2.5-rfc5970-dhcpv6-options-for-network-boot.patch

c8bb8f
diff -up dhcp-4.2.5b1/common/dhcp-options.5.rfc5970 dhcp-4.2.5b1/common/dhcp-options.5
c8bb8f
--- dhcp-4.2.5b1/common/dhcp-options.5.rfc5970	2012-12-17 13:43:44.000000000 +0100
c8bb8f
+++ dhcp-4.2.5b1/common/dhcp-options.5	2012-12-17 13:45:18.777638579 +0100
c8bb8f
@@ -1771,7 +1771,48 @@ The \fBlq-relay-data\fR option is used i
c8bb8f
 The \fBlq-client-link\fR option is used internally by for lease query.
c8bb8f
 .RE
c8bb8f
 .PP
c8bb8f
+
c8bb8f
+.B option
c8bb8f
+.B dhcp6.bootfile-url
c8bb8f
+.I string 
c8bb8f
+.B ;
c8bb8f
+.RS 0.25i
c8bb8f
+.PP
c8bb8f
+The server sends this option to inform the client about a URL to a
c8bb8f
+boot file.  Used primarily for UEFI network booting, it contains an RFC3986
c8bb8f
+compliant URI which the client may use to boot an operating system.  This option
c8bb8f
+is defined in RFC5970
c8bb8f
 .RE
c8bb8f
+.PP
c8bb8f
+
c8bb8f
+.B option
c8bb8f
+.B dhcp6.arch-type
c8bb8f
+.I arch-id \fR[\fB,\fR arch-id\fR...] 
c8bb8f
+.B ;
c8bb8f
+.RS 0.25i
c8bb8f
+.PP
c8bb8f
+A client will send this option to a server so that the server may make decisions
c8bb8f
+on what options and addresses to offer the requesting client.  The option
c8bb8f
+consists of a list of 16 bit unsigned values that represent the architecture of
c8bb8f
+the requesting client.  These values corespond to the values available to the
c8bb8f
+dhcpv4 option architecture-type, as defined in RFC4578, section 2.1.
c8bb8f
+This option is defined in RFC5970
c8bb8f
+ .RE
c8bb8f
+.PP
c8bb8f
+
c8bb8f
+.B option
c8bb8f
+.B dhcp6.net-id
c8bb8f
+.I uint8 uint8 uint8 
c8bb8f
+.B ;
c8bb8f
+.RS 0.25i
c8bb8f
+.PP
c8bb8f
+A client will send this option to a server to inform it about the clients level
c8bb8f
+of UNDI support.  The option consists of 3 octets (a type, major and minor
c8bb8f
+value).  Specific meanings of these values are doumented in section 2.2 of
c8bb8f
+RFC4578.
c8bb8f
+This option is defined in RFC5970
c8bb8f
+.RE
c8bb8f
+.PP
c8bb8f
 .SH DEFINING NEW OPTIONS
c8bb8f
 The Internet Systems Consortium DHCP client and server provide the
c8bb8f
 capability to define new options.  Each DHCP option has a name, a
c8bb8f
diff -up dhcp-4.2.5b1/common/tables.c.rfc5970 dhcp-4.2.5b1/common/tables.c
c8bb8f
--- dhcp-4.2.5b1/common/tables.c.rfc5970	2012-12-17 13:43:44.204939024 +0100
c8bb8f
+++ dhcp-4.2.5b1/common/tables.c	2012-12-17 13:43:44.286937948 +0100
c8bb8f
@@ -463,6 +463,18 @@ static struct option dhcpv6_options[] =
c8bb8f
 	{ "lq-relay-data", "6X",		&dhcpv6_universe, 47, 1 },
c8bb8f
 	{ "lq-client-link", "6A",		&dhcpv6_universe, 48, 1 },
c8bb8f
 
c8bb8f
+			/* RFC5970 OPTIONS */
c8bb8f
+
c8bb8f
+	{ "bootfile-url", "t",			&dhcpv6_universe, 59, 1},
c8bb8f
+#if 0
c8bb8f
+	/* Can't implement this until arrays of strings with length "StA"
c8bb8f
+	 * are implemented
c8bb8f
+	 */
c8bb8f
+	{ "bootfile-param", "StA",		&dhcpv6_universe, 60, 1},
c8bb8f
+#endif
c8bb8f
+	{ "arch-type", "Sa",			&dhcpv6_universe, 61, 1},
c8bb8f
+	{ "net-id", "BBB",			&dhcpv6_universe, 62, 1},
c8bb8f
+
c8bb8f
 	{ NULL, NULL, NULL, 0, 0 }
c8bb8f
 };
c8bb8f
 
c8bb8f
diff -up dhcp-4.2.5b1/includes/dhcp6.h.rfc5970 dhcp-4.2.5b1/includes/dhcp6.h
c8bb8f
--- dhcp-4.2.5b1/includes/dhcp6.h.rfc5970	2012-12-04 20:45:42.000000000 +0100
c8bb8f
+++ dhcp-4.2.5b1/includes/dhcp6.h	2012-12-17 13:43:44.286937948 +0100
c8bb8f
@@ -75,6 +75,11 @@
c8bb8f
 #define D6O_CLT_TIME				46 /* RFC5007 */
c8bb8f
 #define D6O_LQ_RELAY_DATA			47 /* RFC5007 */
c8bb8f
 #define D6O_LQ_CLIENT_LINK			48 /* RFC5007 */
c8bb8f
+/* 49-58 Not yet assigned */
c8bb8f
+#define D60_BOOT_URL				59 /* RFC5970 */
c8bb8f
+#define D60_BOOT_PARAMS				60 /* RFC5970 */
c8bb8f
+#define D60_CLIENT_ARCH				61 /* RFC5970 */
c8bb8f
+#define D60_CLIENT_NII				62 /* RFC5970 */
c8bb8f
 
c8bb8f
 /* 
c8bb8f
  * Status Codes, from RFC 3315 section 24.4, and RFC 3633, 5007.