#include <string.h>
#include <stdint.h>
#include <sys/types.h>
Go to the source code of this file.
|
int | andns_compress (char *src, int srclen) |
|
char * | andns_uncompress (char *src, int srclen, int *dstlen) |
|
int | a_hdr_u (char *buf, andns_pkt *ap) |
|
int | a_qst_u (char *buf, andns_pkt *ap, int limitlen) |
|
int | a_answ_u (char *buf, andns_pkt *ap, int limitlen) |
|
int | a_answs_u (char *buf, andns_pkt *ap, int limitlen) |
|
int | a_u (char *buf, int pktlen, andns_pkt **app) |
|
int | a_hdr_p (andns_pkt *ap, char *buf) |
|
int | a_qst_p (andns_pkt *ap, char *buf, int limitlen) |
|
int | a_answ_p (andns_pkt *ap, andns_pkt_data *apd, char *buf, int limitlen) |
|
int | a_answs_p (andns_pkt *ap, char *buf, int limitlen) |
|
int | a_p (andns_pkt *ap, char *buf) |
|
andns_pkt * | create_andns_pkt (void) |
|
andns_pkt_data * | create_andns_pkt_data (void) |
|
andns_pkt_data * | andns_add_answ (andns_pkt *ap) |
|
void | destroy_andns_pkt_data (andns_pkt_data *apd) |
|
void | andns_del_answ (andns_pkt *ap) |
|
void | destroy_andns_pkt_datas (andns_pkt *ap) |
|
void | destroy_andns_pkt (andns_pkt *ap) |
|
#define ANDNS_COMPR_LEVEL Z_BEST_COMPRESSION |
#define ANDNS_COMPR_THRESHOLD 1000 |
#define ANDNS_MAX_ANSW_H_LEN 516 |
#define ANDNS_MAX_ANSW_IP_LEN 20 |
#define ANDNS_MAX_ANSWER_LEN 516 |
#define ANDNS_MAX_ANSWERS_NUM 256 |
#define ANDNS_MAX_DATA_LEN 512 |
Value:
#define ANDNS_MAX_QUESTION_LEN
Definition: andns_lib.h:28
#define ANDNS_MAX_ANSWER_LEN
Definition: andns_lib.h:29
#define ANDNS_MAX_ANSWERS_NUM
Definition: andns_lib.h:30
#define ANDNS_MAX_QST_LEN 512 |
#define ANDNS_MAX_QUESTION_LEN 263 /* TODO */ |
#define ANDNS_PROTO_TCP 0 |
#define ANDNS_PROTO_UDP 1 |
#define ANDNS_RCODE_EINTRPRT 1 /* Intepret error */ |
#define ANDNS_RCODE_ENIMPL 4 /* Not implemented */ |
#define ANDNS_RCODE_ENSDMN 3 /* No such domain */ |
#define ANDNS_RCODE_ERFSD 5 /* Refused */ |
#define ANDNS_RCODE_ESRVFAIL 2 /* Server failure */ |
#define ANDNS_RCODE_NOERR 0 /* No error */ |
#define ANDNS_SET_ANCOUNT |
( |
|
s, |
|
|
|
n |
|
) |
| *(s+2)|=((n)>>1);*(s+3)|=((n)<<7); |
#define ANDNS_SET_QR |
( |
|
s | ) |
(*((s)+2))|=0x80 |
#define ANDNS_SET_RCODE |
( |
|
s, |
|
|
|
c |
|
) |
| *((s)+3)=(((*((s)+3))&0xf0)|c) |
#define ANDNS_SET_Z |
( |
|
s | ) |
*(s+3)|=0x20; |
#define ANDNS_UNSET_Z |
( |
|
s | ) |
*(s+3)&=0xdf; |
#define ANNDS_DNS_MAZ_QST_LEN 255 |
#define AP_ALIGN |
( |
|
ap | ) |
(ap)->qstdata=(char*)xmalloc((ap)->qstlength) |
Value:(apd)->rdata=(
char*)
xmalloc((apd)->rdlength+1); \
memset((apd)->rdata,0,(apd)->rdlength+1)
void * xmalloc(size_t size)
Definition: xmalloc.c:44
#define AT_A 0 /* h->ip */ |
#define AT_G 2 /* global */ |
#define AT_PTR 1 /* ip->h */ |
int a_answ_u |
( |
char * |
buf, |
|
|
andns_pkt * |
ap, |
|
|
int |
limitlen |
|
) |
| |
int a_answs_p |
( |
andns_pkt * |
ap, |
|
|
char * |
buf, |
|
|
int |
limitlen |
|
) |
| |
int a_answs_u |
( |
char * |
buf, |
|
|
andns_pkt * |
ap, |
|
|
int |
limitlen |
|
) |
| |
int a_qst_p |
( |
andns_pkt * |
ap, |
|
|
char * |
buf, |
|
|
int |
limitlen |
|
) |
| |
int a_qst_u |
( |
char * |
buf, |
|
|
andns_pkt * |
ap, |
|
|
int |
limitlen |
|
) |
| |
int a_u |
( |
char * |
buf, |
|
|
int |
pktlen, |
|
|
andns_pkt ** |
app |
|
) |
| |
int andns_compress |
( |
char * |
src, |
|
|
int |
srclen |
|
) |
| |
char* andns_uncompress |
( |
char * |
src, |
|
|
int |
srclen, |
|
|
int * |
dstlen |
|
) |
| |
void destroy_andns_pkt_datas |
( |
andns_pkt * |
ap | ) |
|