#ifndef DNS_PORT

#define DNS_PORT 53
#define DNS_MAXPACKET 512
#define DNS_MAXDN 255
#define DNS_MAXLABEL 63
#define DNS_MAXDOMAIN 1024

#define DNS_C_IN	0x0001
#define DNS_C_ANY	0x00ff

#define DNS_T_A		0x0001
#define DNS_T_TXT	0x0010
#define DNS_T_ANY	0x00ff

unsigned dns_ptodn(const char *name, char *dn, unsigned dnsiz);
/* convert asciiz string `name' to the DN format, return length or 0 */
unsigned dns_dntop(const unsigned char *dn, char *dst, unsigned dstsiz);
unsigned dns_dntol(const unsigned char *srcdn, unsigned char *dstdn);
#define dns_dnlc(c) ((c) >= 'A' && (c) <= 'Z' ? (c) - 'A' + 'a' : (c))
unsigned dns_dnlabels(const unsigned char *dn);

#endif
