DHCP option which first required it.
printf(" flag");
else if (opt->type & BITFLAG)
printf(" bitflags");
- else if (opt->type & RFC3397)
+ else if (opt->type & RFC1035)
printf(" domain");
else if (opt->type & DOMAIN)
printf(" dname");
return len;
}
-/* Decode an RFC3397 DNS search order option into a space
+/* Decode an RFC1035 DNS search order option into a space
* separated string. Returns length of string (including
* terminating zero) or zero on error. out may be NULL
* to just determine output length. */
ssize_t
-decode_rfc3397(char *out, size_t len, const uint8_t *p, size_t pl)
+decode_rfc1035(char *out, size_t len, const uint8_t *p, size_t pl)
{
const char *start;
size_t start_len, l, count;
UNUSED(ifname);
#endif
- if (opt->type & RFC3397) {
- sl = decode_rfc3397(NULL, 0, data, dl);
+ if (opt->type & RFC1035) {
+ sl = decode_rfc1035(NULL, 0, data, dl);
if (sl == 0 || sl == -1)
return sl;
l = (size_t)sl + 1;
tmp = malloc(l);
if (tmp == NULL)
return -1;
- decode_rfc3397(tmp, l, data, dl);
+ decode_rfc1035(tmp, l, data, dl);
sl = print_string(s, len, opt->type, (uint8_t *)tmp, l - 1);
free(tmp);
return sl;
#define STRING (1 << 7)
#define ARRAY (1 << 8)
#define RFC3361 (1 << 9)
-#define RFC3397 (1 << 10)
+#define RFC1035 (1 << 10)
#define RFC3442 (1 << 11)
#define RFC5969 (1 << 12)
#define ADDRIPV6 (1 << 13)
uint8_t *, const char *, int);
size_t encode_rfc1035(const char *src, uint8_t *dst);
-ssize_t decode_rfc3397(char *, size_t, const uint8_t *, size_t);
+ssize_t decode_rfc1035(char *, size_t, const uint8_t *, size_t);
ssize_t print_string(char *, size_t, int, const uint8_t *, size_t);
int dhcp_set_leasefile(char *, size_t, int, const struct interface *);
dl--;
switch (enc) {
case 0:
- if ((r = decode_rfc3397(NULL, 0, data, dl)) > 0) {
+ if ((r = decode_rfc1035(NULL, 0, data, dl)) > 0) {
l = (size_t)r;
sip = malloc(l);
if (sip == NULL)
return 0;
- decode_rfc3397(sip, l, data, dl);
+ decode_rfc1035(sip, l, data, dl);
}
break;
case 1:
else if (strcasecmp(arg, "ascii") == 0)
t |= STRING | ASCII;
else if (strcasecmp(arg, "domain") == 0)
- t |= STRING | DOMAIN | RFC3397;
+ t |= STRING | DOMAIN | RFC1035;
else if (strcasecmp(arg, "dname") == 0)
t |= STRING | DOMAIN;
else if (strcasecmp(arg, "binhex") == 0)
l = 0;
}
if (t & ARRAY && t & (STRING | BINHEX) &&
- !(t & (RFC3397 | DOMAIN)))
+ !(t & (RFC1035 | DOMAIN)))
{
logger(ctx, LOG_WARNING, "ignoring array for strings");
t &= ~ARRAY;