{ "AXFR", T_AXFR },
{ "MAILB", T_MAILB },
{ "MAILA", T_MAILA },
+ { "NAPTR", T_NAPTR },
{ "ANY", T_ANY }
};
static const int ntypes = sizeof(types) / sizeof(types[0]);
ares_free_string(name);
break;
+ case T_NAPTR:
+
+ printf("\t%d", DNS__16BIT(aptr)); // order
+ printf(" %d\n", DNS__16BIT(aptr + 2)); // preference
+
+ p = aptr + 4;
+ status = ares_expand_string(p, abuf, alen, &name, &len);
+ if (status != ARES_SUCCESS)
+ return NULL;
+ printf("\t\t\t\t\t\t%s\n", name);
+ ares_free_string(name);
+ p += len;
+
+ status = ares_expand_string(p, abuf, alen, &name, &len);
+ if (status != ARES_SUCCESS)
+ return NULL;
+ printf("\t\t\t\t\t\t%s\n", name);
+ ares_free_string(name);
+ p += len;
+
+ status = ares_expand_string(p, abuf, alen, &name, &len);
+ if (status != ARES_SUCCESS)
+ return NULL;
+ printf("\t\t\t\t\t\t%s\n", name);
+ ares_free_string(name);
+ p += len;
+
+ status = ares_expand_string(p, abuf, alen, &name, &len);
+ if (status != ARES_SUCCESS)
+ return NULL;
+ printf("\t\t\t\t\t\t%s", name);
+ ares_free_string(name);
+ break;
+
+
default:
printf("\t[Unknown RR; cannot parse]");
break;