definition.
This does mean any 3rd party hook scripts using this will need to be changed.
printf(" rfc3361");
if (opt->type & RFC3442)
printf(" rfc3442");
- if (opt->type & RFC5969)
- printf(" rfc5969");
if (opt->type & REQUEST)
printf(" request");
if (opt->type & NOREQ)
size_t sz;
if (opt->type == 0 ||
- opt->type & (STRING | BINHEX | RFC3442 | RFC5969))
+ opt->type & (STRING | BINHEX | RFC3442))
{
if (opt->len) {
if ((size_t)opt->len > dl)
if (opt->type & RFC3442)
return decode_rfc3442(s, len, data, dl);
-
- if (opt->type & RFC5969)
- return decode_rfc5969(s, len, data, dl);
#endif
if (opt->type & STRING)
#define RFC3361 (1 << 9)
#define RFC1035 (1 << 10)
#define RFC3442 (1 << 11)
-#define RFC5969 (1 << 12)
+/* unassigned (1 << 12) */
#define ADDRIPV6 (1 << 13)
#define BINHEX (1 << 14)
#define FLAG (1 << 15)
return sip;
}
-/* Decode an RFC5969 6rd order option into a space
- * separated string. Returns length of string (including
- * terminating zero) or zero on error. */
-ssize_t
-decode_rfc5969(char *out, size_t len, const uint8_t *p, size_t pl)
-{
- uint8_t ipv4masklen, ipv6prefixlen;
- uint8_t ipv6prefix[16];
- uint8_t br[4];
- int i;
- ssize_t b, bytes = 0;
-
- if (pl < 22) {
- errno = EINVAL;
- return 0;
- }
-
- ipv4masklen = *p++;
- pl--;
- ipv6prefixlen = *p++;
- pl--;
-
- for (i = 0; i < 16; i++) {
- ipv6prefix[i] = *p++;
- pl--;
- }
- if (out) {
- b= snprintf(out, len,
- "%d %d "
- "%02x%02x:%02x%02x:"
- "%02x%02x:%02x%02x:"
- "%02x%02x:%02x%02x:"
- "%02x%02x:%02x%02x",
- ipv4masklen, ipv6prefixlen,
- ipv6prefix[0], ipv6prefix[1], ipv6prefix[2], ipv6prefix[3],
- ipv6prefix[4], ipv6prefix[5], ipv6prefix[6], ipv6prefix[7],
- ipv6prefix[8], ipv6prefix[9], ipv6prefix[10],ipv6prefix[11],
- ipv6prefix[12],ipv6prefix[13],ipv6prefix[14], ipv6prefix[15]
- );
-
- len -= (size_t)b;
- out += b;
- bytes += b;
- } else {
- bytes += 16 * 2 + 8 + 2 + 1 + 2;
- }
-
- while (pl >= 4) {
- br[0] = *p++;
- br[1] = *p++;
- br[2] = *p++;
- br[3] = *p++;
- pl -= 4;
-
- if (out) {
- b= snprintf(out, len, " %d.%d.%d.%d",
- br[0], br[1], br[2], br[3]);
- len -= (size_t)b;
- out += b;
- bytes += b;
- } else {
- bytes += (4 * 4);
- }
- }
-
- return bytes;
-}
-
static char *
get_option_string(struct dhcpcd_ctx *ctx,
const struct dhcp_message *dhcp, uint8_t option)
#ifdef INET
char *decode_rfc3361(const uint8_t *, size_t);
ssize_t decode_rfc3442(char *, size_t, const uint8_t *p, size_t);
-ssize_t decode_rfc5969(char *, size_t, const uint8_t *p, size_t);
void dhcp_printoptions(const struct dhcpcd_ctx *,
const struct dhcp_opt *, size_t);
define 211 uint32 reboot_time
# DHCP IPv6 Rapid Deployment on IPv4 Infrastructures, RFC5969
-define 212 rfc5969 sixrd
+define 212 embed sixrd
+embed byte mask_len
+embed byte prefix_len
+embed ip6address prefix
+embed array ipaddress brip_address
# DHCP Access Network Domain Name, RFC5986
define 213 domain access_domain
t |= STRING | RFC3361;
else if (strcasecmp(arg, "rfc3442") ==0)
t |= STRING | RFC3442;
- else if (strcasecmp(arg, "rfc5969") == 0)
- t |= STRING | RFC5969;
else if (strcasecmp(arg, "option") == 0)
t |= OPTION;
else {