/* ** Copyright 1998 - 1999 Double Precision, Inc. ** See COPYING for distribution information. */ #include "rfc1035.h" #include static struct { const char *name; int num; } typetab[]={ {"A", 1}, {"NS", 2}, {"MD", 3}, {"MF", 4}, {"CNAME", 5}, {"SOA", 6}, {"MB", 7}, {"MG", 8}, {"MR", 9}, {"NULL", 10}, {"WKS", 11}, {"PTR", 12}, {"HINFO", 13}, {"MINFO", 14}, {"MX", 15}, {"TXT", 16}, {"AAAA", 28}, {"RRSIG", 46}, {"AXFR", 252}, {"MAILB", 253}, {"MAILA", 254}, {"ANY", 255}}, classtab[]={ {"IN", 1}, {"CSNET", 2}, {"CHAOS", 3}, {"HESIOD", 4}, {"ANY", 255}}, opcodetab[]={ {"QUERY", 0}, {"IQUERY", 1}, {"STATUS", 2}}, rcodetab[]={ {"NOERROR", 0}, {"FORMAT", 1}, {"SERVFAIL", 2}, {"NXDOMAIN", 3}, {"UNIMPLEMENTED", 4}, {"REFUSED", 5}}; #if HAVE_STRCASECMP #define COMPARE(a,b) strcasecmp((a), (b)) #else #define COMPARE(a,b) stricmp((a), (b)) #endif void rfc1035_type_itostr(int n, void (*func)(const char *, void *), void *arg) { unsigned i; char buf[30]; for (i=0; i