The Netsukuku Project  0.0.9
An Alternative routing method
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
andns.c File Reference
#include <string.h>
#include <netdb.h>
#include "includes.h"
#include "common.h"
#include "andns.h"
#include "err_errno.h"
#include "andna.h"
#include "andns_lib.h"
#include "andns_net.h"
#include "andns_snsd.h"
#include "dnslib.h"
Include dependency graph for andns.c:

Macros

#define _GNU_SOURCE
 

Functions

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_pktdpktcpy (dns_pkt *src, const char *prefix)
 
char * rm_realm_prefix (char *from, char *dst, int type)
 
dns_pktdpktcpy_rm_pref (dns_pkt *src)
 
int andns_realm (dns_pkt_qst *dpq, int *prefixed)
 
int is_prefixed (dns_pkt *dp)
 
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 andns_gethostbyname (char *hname, inet_prefix *ip)
 
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 nk_forward (andns_pkt *ap, char *msg, int msglen, char *answer)
 
char * andns_rslv (char *msg, int msglen, char *answer, int *answ_len)
 

Variables

static uint8_t _dns_forwarding_
 
static uint8_t _andns_ns_count_
 
static uint8_t _default_realm_
 
static struct addrinfo _ns_filter_
 
static struct addrinfo * _andns_ns_ [3]
 
static int _ip_len_
 

Macro Definition Documentation

#define _GNU_SOURCE

Function Documentation

void andns_close ( void  )

Here is the call graph for this function:

Here is the caller graph for this function:

int andns_gethostbyname ( char *  hname,
inet_prefix ip 
)

Here is the call graph for this function:

Here is the caller graph for this function:

int andns_init ( int  restricted,
char *  resolv_conf,
int  family 
)

Here is the call graph for this function:

Here is the caller graph for this function:

int andns_realm ( dns_pkt_qst dpq,
int *  prefixed 
)

Here is the caller graph for this function:

char* andns_rslv ( char *  msg,
int  msglen,
char *  answer,
int *  answ_len 
)

Here is the call graph for this function:

Here is the caller graph for this function:

int apqsttodpqst ( andns_pkt ap,
dns_pkt **  dpsrc 
)

Here is the call graph for this function:

Here is the caller graph for this function:

int collect_resolv_conf ( char *  resolve_conf)

Here is the call graph for this function:

Here is the caller graph for this function:

int dns_forward ( dns_pkt dp,
char *  msg,
int  msglen,
char *  answer 
)

Here is the call graph for this function:

Here is the caller graph for this function:

int dpanswtoapansw ( dns_pkt dp,
andns_pkt ap 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void dpktacpy ( dns_pkt dst,
dns_pkt src,
const char *  prefix 
)

Here is the caller graph for this function:

dns_pkt* dpktcpy ( dns_pkt src,
const char *  prefix 
)

Here is the call graph for this function:

Here is the caller graph for this function:

dns_pkt* dpktcpy_rm_pref ( dns_pkt src)

Here is the call graph for this function:

Here is the caller graph for this function:

int inet_rslv ( dns_pkt dp,
char *  msg,
int  msglen,
char *  answer 
)

Here is the call graph for this function:

Here is the caller graph for this function:

int is_prefixed ( dns_pkt dp)

Here is the call graph for this function:

Here is the caller graph for this function:

int nk_forward ( andns_pkt ap,
char *  msg,
int  msglen,
char *  answer 
)

Here is the call graph for this function:

Here is the caller graph for this function:

int nk_rslv ( andns_pkt ap,
char *  msg,
int  msglen,
char *  answer 
)

Here is the call graph for this function:

Here is the caller graph for this function:

int ns_general_send ( char *  msg,
int  msglen,
char *  answer,
int  anslen 
)

Here is the call graph for this function:

Here is the caller graph for this function:

int qtype_a_to_d ( andns_pkt ap)

Here is the caller graph for this function:

void reset_andns_ns ( void  )

Here is the caller graph for this function:

char* rm_realm_prefix ( char *  from,
char *  dst,
int  type 
)

Here is the caller graph for this function:

int store_ns ( char *  ns)

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

struct addrinfo* _andns_ns_[3]
static
uint8_t _andns_ns_count_
static
uint8_t _default_realm_
static
uint8_t _dns_forwarding_
static
int _ip_len_
static
struct addrinfo _ns_filter_
static