1 #ifndef __ACL_RFC1035_INCLUDE_H__ 2 #define __ACL_RFC1035_INCLUDE_H__ 8 #include "../stdlib/acl_define.h" 9 #include "../stdlib/acl_argv.h" 12 #include <netinet/in.h> 16 #define ACL_RFC1035_MAXHOSTNAMESZ 256 190 const char *domain_root,
const char *dnsname,
const char *dnsip,
191 unsigned short qid,
char *buf,
size_t sz);
194 const char *domain_root,
const char *dnsname,
const char *dnsip,
195 unsigned short qid,
char *buf,
size_t sz);
210 char *buf,
size_t sz);
212 #define ACL_RFC1035_TYPE_A 1 213 #define ACL_RFC1035_TYPE_NS 2 214 #define ACL_RFC1035_TYPE_MD 3 215 #define ACL_RFC1035_TYPE_MF 4 216 #define ACL_RFC1035_TYPE_CNAME 5 217 #define ACL_RFC1035_TYPE_SOA 6 218 #define ACL_RFC1035_TYPE_MB 7 219 #define ACL_RFC1035_TYPE_MG 8 220 #define ACL_RFC1035_TYPE_MR 9 221 #define ACL_RFC1035_TYPE_NULL 10 222 #define ACL_RFC1035_TYPE_WKS 11 223 #define ACL_RFC1035_TYPE_PTR 12 224 #define ACL_RFC1035_TYPE_HINFO 13 225 #define ACL_RFC1035_TYPE_MINFO 14 226 #define ACL_RFC1035_TYPE_MX 15 227 #define ACL_RFC1035_TYPE_TXT 16 228 #define ACL_RFC1035_TYPE_AAAA 28 229 #define ACL_RFC1035_TYPE_AXFR 252 230 #define ACL_RFC1035_TYPE_MAILB 253 231 #define ACL_RFC1035_TYPE_MAILA 253 232 #define ACL_RFC1035_TYPE_ALL 255 234 #define ACL_RFC1035_CLASS_IN 1 235 #define ACL_RFC1035_CLASS_CS 2 236 #define ACL_RFC1035_CLASS_CH 3 237 #define ACL_RFC1035_CLASS_HS 4 ACL_API size_t acl_rfc1035_build_query4aaaa(const char *hostname, char *buf, size_t sz, unsigned short qid, ACL_RFC1035_QUERY *query)
struct ACL_RFC1035_QUERY ACL_RFC1035_QUERY
ACL_API ACL_RFC1035_MESSAGE * acl_rfc1035_request_unpack(const char *buf, size_t sz)
ACL_API size_t acl_rfc1035_build_query4ptr(const struct in_addr addr, char *buf, size_t sz, unsigned short qid, ACL_RFC1035_QUERY *query)
ACL_API ACL_RFC1035_MESSAGE * acl_rfc1035_response_unpack(const char *buf, size_t sz)
ACL_API size_t acl_rfc1035_build_query4mx(const char *hostname, char *buf, size_t sz, unsigned short qid, ACL_RFC1035_QUERY *query)
ACL_API void acl_rfc1035_message_destroy(ACL_RFC1035_MESSAGE *message)
ACL_API size_t acl_rfc1035_build_reply(const ACL_RFC1035_REPLY *reply, char *buf, size_t sz)
ACL_API size_t acl_rfc1035_build_reply4a(const char *hostname, const ACL_ARGV *ips, const char *domain_root, const char *dnsname, const char *dnsip, unsigned short qid, char *buf, size_t sz)
ACL_RFC1035_QUERY * query
ACL_API void acl_rfc1035_set_query_id(char *buf, size_t sz, unsigned short qid)
ACL_RFC1035_RR * authority
struct ACL_RFC1035_REPLY ACL_RFC1035_REPLY
ACL_API size_t acl_rfc1035_build_reply4aaaa(const char *hostname, const ACL_ARGV *ips, const char *domain_root, const char *dnsname, const char *dnsip, unsigned short qid, char *buf, size_t sz)
struct ACL_RFC1035_RR ACL_RFC1035_RR
#define ACL_RFC1035_MAXHOSTNAMESZ
ACL_API size_t acl_rfc1035_build_query4a(const char *hostname, char *buf, size_t sz, unsigned short qid, ACL_RFC1035_QUERY *query)
char name[ACL_RFC1035_MAXHOSTNAMESZ]
ACL_API const char * acl_rfc1035_strerror(int errnum)
ACL_RFC1035_RR * additional
char name[ACL_RFC1035_MAXHOSTNAMESZ]
ACL_API int acl_rfc1035_query_compare(const ACL_RFC1035_QUERY *a, const ACL_RFC1035_QUERY *b)
struct ACL_RFC1035_MESSAGE ACL_RFC1035_MESSAGE