acl
3.5.3.0
|
类 | |
struct | ACL_RFC1035_RR |
struct | ACL_RFC1035_QUERY |
struct | ACL_RFC1035_MESSAGE |
struct | ACL_RFC1035_REPLY |
宏定义 | |
#define | ACL_RFC1035_MAXHOSTNAMESZ 256 |
#define | ACL_RFC1035_TYPE_A 1 /* a host address */ |
#define | ACL_RFC1035_TYPE_NS 2 /* an authoritative name server */ |
#define | ACL_RFC1035_TYPE_MD 3 /* a mail destination (Obsolete - use MX) */ |
#define | ACL_RFC1035_TYPE_MF 4 /* a mail forwarder (Obsolete - use MX) */ |
#define | ACL_RFC1035_TYPE_CNAME 5 /* the canonical name for an alias */ |
#define | ACL_RFC1035_TYPE_SOA 6 /* marks the start of a zone of authority */ |
#define | ACL_RFC1035_TYPE_MB 7 /* a mailbox domain name (EXPERIMENTAL) */ |
#define | ACL_RFC1035_TYPE_MG 8 /* a mail group member (EXPERIMENTAL) */ |
#define | ACL_RFC1035_TYPE_MR 9 /* a mail rename domain name (EXPERIMENTAL) */ |
#define | ACL_RFC1035_TYPE_NULL 10 /* a null RR (EXPERIMENTAL) */ |
#define | ACL_RFC1035_TYPE_WKS 11 /* a well known service description */ |
#define | ACL_RFC1035_TYPE_PTR 12 /* a domain name pointer */ |
#define | ACL_RFC1035_TYPE_HINFO 13 /* host information */ |
#define | ACL_RFC1035_TYPE_MINFO 14 /* mailbox or mail list information */ |
#define | ACL_RFC1035_TYPE_MX 15 /* mail exchange */ |
#define | ACL_RFC1035_TYPE_TXT 16 /* text strings */ |
#define | ACL_RFC1035_TYPE_AAAA 28 /* a IPv6 address of host */ |
#define | ACL_RFC1035_TYPE_AXFR 252 /* a request for a transfer of an entire zone */ |
#define | ACL_RFC1035_TYPE_MAILB 253 /* a request for mailbox-related records (MB, MG or MR) */ |
#define | ACL_RFC1035_TYPE_MAILA 253 /* a request for mail agent RRs (Obsolete - see MX) */ |
#define | ACL_RFC1035_TYPE_ALL 255 /* a request for all records */ |
#define | ACL_RFC1035_CLASS_IN 1 /* the Internet */ |
#define | ACL_RFC1035_CLASS_CS 2 /* the CSNET class (Obsolete - used only for examples in some obsolete RFCs */ |
#define | ACL_RFC1035_CLASS_CH 3 /* the CHAOS class */ |
#define | ACL_RFC1035_CLASS_HS 4 /* Hesiod [Dyer 87] */ |
类型定义 | |
typedef struct ACL_RFC1035_RR | ACL_RFC1035_RR |
typedef struct ACL_RFC1035_QUERY | ACL_RFC1035_QUERY |
typedef struct ACL_RFC1035_MESSAGE | ACL_RFC1035_MESSAGE |
typedef struct ACL_RFC1035_REPLY | ACL_RFC1035_REPLY |
函数 | |
ACL_API const char * | acl_rfc1035_strerror (int errnum) |
ACL_API size_t | acl_rfc1035_build_query4a (const char *hostname, char *buf, size_t sz, unsigned short qid, ACL_RFC1035_QUERY *query) |
ACL_API size_t | acl_rfc1035_build_query4aaaa (const char *hostname, char *buf, size_t sz, unsigned short qid, ACL_RFC1035_QUERY *query) |
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 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 void | acl_rfc1035_set_query_id (char *buf, size_t sz, unsigned short qid) |
ACL_API int | acl_rfc1035_query_compare (const ACL_RFC1035_QUERY *a, const ACL_RFC1035_QUERY *b) |
ACL_API ACL_RFC1035_MESSAGE * | acl_rfc1035_response_unpack (const char *buf, size_t sz) |
ACL_API ACL_RFC1035_MESSAGE * | acl_rfc1035_request_unpack (const char *buf, size_t sz) |
ACL_API void | acl_rfc1035_message_destroy (ACL_RFC1035_MESSAGE *message) |
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_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) |
ACL_API size_t | acl_rfc1035_build_reply (const ACL_RFC1035_REPLY *reply, char *buf, size_t sz) |
#define ACL_RFC1035_CLASS_CH 3 /* the CHAOS class */ |
在文件 acl_rfc1035.h 第 236 行定义.
#define ACL_RFC1035_CLASS_CS 2 /* the CSNET class (Obsolete - used only for examples in some obsolete RFCs */ |
在文件 acl_rfc1035.h 第 235 行定义.
#define ACL_RFC1035_CLASS_HS 4 /* Hesiod [Dyer 87] */ |
在文件 acl_rfc1035.h 第 237 行定义.
#define ACL_RFC1035_CLASS_IN 1 /* the Internet */ |
在文件 acl_rfc1035.h 第 234 行定义.
#define ACL_RFC1035_MAXHOSTNAMESZ 256 |
在文件 acl_rfc1035.h 第 16 行定义.
#define ACL_RFC1035_TYPE_A 1 /* a host address */ |
在文件 acl_rfc1035.h 第 212 行定义.
#define ACL_RFC1035_TYPE_AAAA 28 /* a IPv6 address of host */ |
在文件 acl_rfc1035.h 第 228 行定义.
#define ACL_RFC1035_TYPE_ALL 255 /* a request for all records */ |
在文件 acl_rfc1035.h 第 232 行定义.
#define ACL_RFC1035_TYPE_AXFR 252 /* a request for a transfer of an entire zone */ |
在文件 acl_rfc1035.h 第 229 行定义.
#define ACL_RFC1035_TYPE_CNAME 5 /* the canonical name for an alias */ |
在文件 acl_rfc1035.h 第 216 行定义.
#define ACL_RFC1035_TYPE_HINFO 13 /* host information */ |
在文件 acl_rfc1035.h 第 224 行定义.
#define ACL_RFC1035_TYPE_MAILA 253 /* a request for mail agent RRs (Obsolete - see MX) */ |
在文件 acl_rfc1035.h 第 231 行定义.
#define ACL_RFC1035_TYPE_MAILB 253 /* a request for mailbox-related records (MB, MG or MR) */ |
在文件 acl_rfc1035.h 第 230 行定义.
#define ACL_RFC1035_TYPE_MB 7 /* a mailbox domain name (EXPERIMENTAL) */ |
在文件 acl_rfc1035.h 第 218 行定义.
#define ACL_RFC1035_TYPE_MD 3 /* a mail destination (Obsolete - use MX) */ |
在文件 acl_rfc1035.h 第 214 行定义.
#define ACL_RFC1035_TYPE_MF 4 /* a mail forwarder (Obsolete - use MX) */ |
在文件 acl_rfc1035.h 第 215 行定义.
#define ACL_RFC1035_TYPE_MG 8 /* a mail group member (EXPERIMENTAL) */ |
在文件 acl_rfc1035.h 第 219 行定义.
#define ACL_RFC1035_TYPE_MINFO 14 /* mailbox or mail list information */ |
在文件 acl_rfc1035.h 第 225 行定义.
#define ACL_RFC1035_TYPE_MR 9 /* a mail rename domain name (EXPERIMENTAL) */ |
在文件 acl_rfc1035.h 第 220 行定义.
#define ACL_RFC1035_TYPE_MX 15 /* mail exchange */ |
在文件 acl_rfc1035.h 第 226 行定义.
#define ACL_RFC1035_TYPE_NS 2 /* an authoritative name server */ |
在文件 acl_rfc1035.h 第 213 行定义.
#define ACL_RFC1035_TYPE_NULL 10 /* a null RR (EXPERIMENTAL) */ |
在文件 acl_rfc1035.h 第 221 行定义.
#define ACL_RFC1035_TYPE_PTR 12 /* a domain name pointer */ |
在文件 acl_rfc1035.h 第 223 行定义.
#define ACL_RFC1035_TYPE_SOA 6 /* marks the start of a zone of authority */ |
在文件 acl_rfc1035.h 第 217 行定义.
#define ACL_RFC1035_TYPE_TXT 16 /* text strings */ |
在文件 acl_rfc1035.h 第 227 行定义.
#define ACL_RFC1035_TYPE_WKS 11 /* a well known service description */ |
在文件 acl_rfc1035.h 第 222 行定义.
typedef struct ACL_RFC1035_MESSAGE ACL_RFC1035_MESSAGE |
typedef struct ACL_RFC1035_QUERY ACL_RFC1035_QUERY |
typedef struct ACL_RFC1035_REPLY ACL_RFC1035_REPLY |
typedef struct ACL_RFC1035_RR ACL_RFC1035_RR |
ACL_API size_t acl_rfc1035_build_query4a | ( | const char * | hostname, |
char * | buf, | ||
size_t | sz, | ||
unsigned short | qid, | ||
ACL_RFC1035_QUERY * | query | ||
) |
Builds a message buffer with a QUESTION to lookup A records for a hostname. Caller must allocate 'buf' which should probably be at least 512 octets. The 'szp' initially specifies the size of the buffer, on return it contains the size of the message (i.e. how much to write).
hostname | {const char*} the hostname to be resolved |
buf | {char*} the buffer for holding the query content |
sz | {size_t} the buffer's size |
qid | {unsigned short} the unique ID number for thie quering |
query | {ACL_RFC1035_QUERY*} if not null, it's qtype, qclass and hostname will be set. |
ACL_API size_t acl_rfc1035_build_query4aaaa | ( | const char * | hostname, |
char * | buf, | ||
size_t | sz, | ||
unsigned short | qid, | ||
ACL_RFC1035_QUERY * | query | ||
) |
Builds a message buffer with a QUESTION to lookup AAAA records for a hostname.
hostname | {const char*} |
buf | {char*} |
sz | {size_t} |
qid | {unsigned short} |
query | {ACL_RFC1035_QUERY*} |
ACL_API size_t acl_rfc1035_build_query4mx | ( | const char * | hostname, |
char * | buf, | ||
size_t | sz, | ||
unsigned short | qid, | ||
ACL_RFC1035_QUERY * | query | ||
) |
Builds a message buffer with a QUESTION to lookup MX records for a hostname.
hostname | {const char*} |
buf | {char*} |
sz | {size_t} |
qid | {unsigned short} |
query | {ACL_RFC1035_QUERY*} |
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 | ||
) |
Builds a message buffer with a QUESTION to lookup PTR records for an address. Caller must allocate 'buf' which should probably be at least 512 octets. The 'szp' initially specifies the size of the buffer, on return it contains the size of the message (i.e. how much to write).
addr | {const struct in_addr} the addr to resolve for name |
buf | {char*} hold the query package |
sz | {size_t} the buf's size at least 512 octets |
qid | {unsigned short} the query ID |
query | {ACL_RFC1035_QUERY*} if no null, it's some member variable |
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 | ||
) |
Builds a response message for the query client.
hostname | {const char*} the name to be resolved |
ips | {const ACL_ARGV*} the ip list of the hostname |
domain_root | {const char*} |
dnsname | {const char*} |
dnsip | {const char*} |
qid | {unsigned short} |
buf | {char*} hold the result |
sz | {size_t} the buf's size |
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 | ||
) |
ACL_API void acl_rfc1035_message_destroy | ( | ACL_RFC1035_MESSAGE * | message | ) |
destroy and free the message created by RFC1035MessageUnpack()
message | {ACL_RFC1035_MESSAGE*} |
ACL_API int acl_rfc1035_query_compare | ( | const ACL_RFC1035_QUERY * | a, |
const ACL_RFC1035_QUERY * | b | ||
) |
Compares two RFC1035_QUERY entries
a | {const ACL_RFC1035_QUERY *} |
b | {const ACL_RFC1035_QUERY *} |
ACL_API ACL_RFC1035_MESSAGE* acl_rfc1035_request_unpack | ( | const char * | buf, |
size_t | sz | ||
) |
Takes the contents of a DNS request and fills in an array of resource record structures. The records array is allocated here, and should be freed by calling acl_rfc1035_message_destroy().
buf | {const char*} the data of the DNS reply |
sz | {size_t} the buf's size |
ACL_API ACL_RFC1035_MESSAGE* acl_rfc1035_response_unpack | ( | const char * | buf, |
size_t | sz | ||
) |
Takes the contents of a DNS reply and fills in an array of resource record structures. The records array is allocated here, and should be freed by calling acl_rfc1035_message_destroy().
buf | {const char*} the data of the DNS reply |
sz | {size_t} the buf's size |
ACL_API void acl_rfc1035_set_query_id | ( | char * | buf, |
size_t | sz, | ||
unsigned short | qid | ||
) |
We're going to retry a former query, but we just need a new ID for it. Lucky for us ID is the first field in the message buffer.
buf | {char*} hold the result |
sz | {size_t} the buf's size |
qid | {unsigned short} the query ID |
ACL_API const char* acl_rfc1035_strerror | ( | int | errnum | ) |
Get error description with the specifed error number
errnum | {int} |