#include <stdio.h>
#include <sys/socket.h>
#include <netdb.h>
#include "dnslib.h"
#include "andns_lib.h"
#include "inet.h"
Go to the source code of this file.
|
int | store_ns (char *ns) |
|
int | collect_resolv_conf (char *resolve_conf) |
|
void | reset_andns_ns (void) |
|
int | andns_init (int restricted, char *resolv_conf, int family) |
|
void | andns_close (void) |
|
int | ns_general_send (char *msg, int msglen, char *answer, int anslen) |
|
void | dpktacpy (dns_pkt *dst, dns_pkt *src, const char *prefix) |
|
dns_pkt * | dpktcpy (dns_pkt *src, const char *prefix) |
|
char * | rm_realm_prefix (char *from, char *dst, int type) |
|
dns_pkt * | dpktcpy_rm_pref (dns_pkt *src) |
|
int | andns_gethostbyname (char *hname, inet_prefix *ip) |
|
int | andns_realm (dns_pkt_qst *dpq, int *prefixed) |
|
int | is_prefixed (dns_pkt *dp) |
|
int | dns_forward (dns_pkt *dp, char *msg, int msglen, char *answer) |
|
int | inet_rslv (dns_pkt *dp, char *msg, int msglen, char *answer) |
|
int | nk_rslv (andns_pkt *ap, char *msg, int msglen, char *answer) |
|
int | qtype_a_to_d (andns_pkt *ap) |
|
int | apqsttodpqst (andns_pkt *ap, dns_pkt **dpsrc) |
|
int | dpanswtoapansw (dns_pkt *dp, andns_pkt *ap) |
|
int | nk_forward (andns_pkt *ap, char *msg, int msglen, char *answer) |
|
char * | andns_rslv (char *msg, int msglen, char *answer, int *answ_len) |
|
#define DNS_PORT_STR "53" |
#define DNS_REPLY_TIMEOUT 10 /* seconds */ |
#define GET_NK_BIT |
( |
|
msg | ) |
(*((msg+3))>>4)&0x03 |
#define INET_REALM_PREFIX ".INT" |
#define NTK_REALM_PREFIX ".NTK" |
#define PTR_INET_REALM_PREFIX "INT." |
#define PTR_NTK_REALM_PREFIX "NTK." |
#define REALM_PREFIX_LEN 4 |
void andns_close |
( |
void |
| ) |
|
int andns_gethostbyname |
( |
char * |
hname, |
|
|
inet_prefix * |
ip |
|
) |
| |
int andns_init |
( |
int |
restricted, |
|
|
char * |
resolv_conf, |
|
|
int |
family |
|
) |
| |
char* andns_rslv |
( |
char * |
msg, |
|
|
int |
msglen, |
|
|
char * |
answer, |
|
|
int * |
answ_len |
|
) |
| |
int collect_resolv_conf |
( |
char * |
resolve_conf | ) |
|
int dns_forward |
( |
dns_pkt * |
dp, |
|
|
char * |
msg, |
|
|
int |
msglen, |
|
|
char * |
answer |
|
) |
| |
int inet_rslv |
( |
dns_pkt * |
dp, |
|
|
char * |
msg, |
|
|
int |
msglen, |
|
|
char * |
answer |
|
) |
| |
int nk_forward |
( |
andns_pkt * |
ap, |
|
|
char * |
msg, |
|
|
int |
msglen, |
|
|
char * |
answer |
|
) |
| |
int nk_rslv |
( |
andns_pkt * |
ap, |
|
|
char * |
msg, |
|
|
int |
msglen, |
|
|
char * |
answer |
|
) |
| |
int ns_general_send |
( |
char * |
msg, |
|
|
int |
msglen, |
|
|
char * |
answer, |
|
|
int |
anslen |
|
) |
| |
void reset_andns_ns |
( |
void |
| ) |
|
char* rm_realm_prefix |
( |
char * |
from, |
|
|
char * |
dst, |
|
|
int |
type |
|
) |
| |
int store_ns |
( |
char * |
ns | ) |
|