ucspi-ssl  0.99e
TLS encryption for IPv6 communication
Data Structures | Macros | Functions | Variables
dns.h File Reference
#include "stralloc.h"
#include "iopause.h"
#include "taia.h"
Include dependency graph for dns.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  dns_transmit
 

Macros

#define DNS_C_IN   "\0\1"
 
#define DNS_C_ANY   "\0\377"
 
#define DNS_T_A   "\0\1"
 
#define DNS_T_NS   "\0\2"
 
#define DNS_T_CNAME   "\0\5"
 
#define DNS_T_SOA   "\0\6"
 
#define DNS_T_PTR   "\0\14"
 
#define DNS_T_HINFO   "\0\15"
 
#define DNS_T_MX   "\0\17"
 
#define DNS_T_TXT   "\0\20"
 
#define DNS_T_RP   "\0\21"
 
#define DNS_T_SIG   "\0\30"
 
#define DNS_T_KEY   "\0\31"
 
#define DNS_T_AAAA   "\0\34"
 
#define DNS_T_AXFR   "\0\374"
 
#define DNS_T_ANY   "\0\377"
 
#define DNS_NAME4_DOMAIN   31
 
#define DNS_NAME6_DOMAIN   (4*16+11)
 

Functions

void dns_random_init (const char *)
 
unsigned int dns_random (unsigned int)
 
void dns_sortip (char *, unsigned int)
 
void dns_sortip6 (char *, unsigned int)
 
void dns_domain_free (char **)
 
int dns_domain_copy (char **, const char *)
 
unsigned int dns_domain_length (const char *)
 
int dns_domain_equal (const char *, const char *)
 
int dns_domain_suffix (const char *, const char *)
 
unsigned int dns_domain_suffixpos (const char *, const char *)
 
int dns_domain_fromdot (char **, const char *, unsigned int)
 
int dns_domain_todot_cat (stralloc *, const char *)
 
unsigned int dns_packet_copy (const char *, unsigned int, unsigned int, char *, unsigned int)
 
unsigned int dns_packet_getname (const char *, unsigned int, unsigned int, char **)
 
unsigned int dns_packet_skipname (const char *, unsigned int, unsigned int)
 
int dns_transmit_start (struct dns_transmit *, const char *, int, const char *, const char *, const unsigned char *)
 
void dns_transmit_free (struct dns_transmit *)
 
void dns_transmit_io (struct dns_transmit *, iopause_fd *, struct taia *)
 
int dns_transmit_get (struct dns_transmit *, const iopause_fd *, const struct taia *)
 
int dns_resolvconfip (char *)
 
int dns_resolve (const char *, const char *)
 
int dns_ip4_packet (stralloc *, const char *, unsigned int)
 
int dns_ip4 (stralloc *, const stralloc *)
 
int dns_ip6_packet (stralloc *, const char *, unsigned int)
 
int dns_ip6 (stralloc *, stralloc *)
 
int dns_name_packet (stralloc *, const char *, unsigned int)
 
void dns_name4_domain (char *, const char *)
 
int dns_name4 (stralloc *, const char *)
 
int dns_txt_packet (stralloc *, const char *, unsigned int)
 
int dns_txt (stralloc *, const stralloc *)
 
int dns_mx_packet (stralloc *, const char *, unsigned int)
 
int dns_mx (stralloc *, const stralloc *)
 
int dns_resolvconfrewrite (stralloc *)
 
int dns_ip4_qualify_rules (stralloc *, stralloc *, const stralloc *, const stralloc *)
 
int dns_ip4_qualify (stralloc *, stralloc *, const stralloc *)
 
int dns_ip6_qualify_rules (stralloc *, stralloc *, const stralloc *, const stralloc *)
 
int dns_ip6_qualify (stralloc *, stralloc *, const stralloc *)
 
int dns_name6 (stralloc *, char ip[16])
 
int dns_name6_domain (char *, char *)
 

Variables

struct dns_transmit dns_resolve_tx
 

Macro Definition Documentation

◆ DNS_C_ANY

#define DNS_C_ANY   "\0\377"

Definition at line 9 of file dns.h.

◆ DNS_C_IN

#define DNS_C_IN   "\0\1"

Definition at line 8 of file dns.h.

◆ DNS_NAME4_DOMAIN

#define DNS_NAME4_DOMAIN   31

Definition at line 77 of file dns.h.

◆ DNS_NAME6_DOMAIN

#define DNS_NAME6_DOMAIN   (4*16+11)

Definition at line 92 of file dns.h.

◆ DNS_T_A

#define DNS_T_A   "\0\1"

Definition at line 11 of file dns.h.

◆ DNS_T_AAAA

#define DNS_T_AAAA   "\0\34"

Definition at line 22 of file dns.h.

◆ DNS_T_ANY

#define DNS_T_ANY   "\0\377"

Definition at line 24 of file dns.h.

◆ DNS_T_AXFR

#define DNS_T_AXFR   "\0\374"

Definition at line 23 of file dns.h.

◆ DNS_T_CNAME

#define DNS_T_CNAME   "\0\5"

Definition at line 13 of file dns.h.

◆ DNS_T_HINFO

#define DNS_T_HINFO   "\0\15"

Definition at line 16 of file dns.h.

◆ DNS_T_KEY

#define DNS_T_KEY   "\0\31"

Definition at line 21 of file dns.h.

◆ DNS_T_MX

#define DNS_T_MX   "\0\17"

Definition at line 17 of file dns.h.

◆ DNS_T_NS

#define DNS_T_NS   "\0\2"

Definition at line 12 of file dns.h.

◆ DNS_T_PTR

#define DNS_T_PTR   "\0\14"

Definition at line 15 of file dns.h.

◆ DNS_T_RP

#define DNS_T_RP   "\0\21"

Definition at line 19 of file dns.h.

◆ DNS_T_SIG

#define DNS_T_SIG   "\0\30"

Definition at line 20 of file dns.h.

◆ DNS_T_SOA

#define DNS_T_SOA   "\0\6"

Definition at line 14 of file dns.h.

◆ DNS_T_TXT

#define DNS_T_TXT   "\0\20"

Definition at line 18 of file dns.h.

Function Documentation

◆ dns_domain_copy()

int dns_domain_copy ( char **  ,
const char *   
)

Definition at line 26 of file dns_domain.c.

Here is the caller graph for this function:

◆ dns_domain_equal()

int dns_domain_equal ( const char *  ,
const char *   
)

Definition at line 40 of file dns_domain.c.

Here is the call graph for this function:

◆ dns_domain_free()

void dns_domain_free ( char **  )

Definition at line 18 of file dns_domain.c.

◆ dns_domain_fromdot()

int dns_domain_fromdot ( char **  ,
const char *  ,
unsigned  int 
)

Definition at line 6 of file dns_dfd.c.

◆ dns_domain_length()

unsigned int dns_domain_length ( const char *  )

Definition at line 7 of file dns_domain.c.

Here is the caller graph for this function:

◆ dns_domain_suffix()

int dns_domain_suffix ( const char *  ,
const char *   
)

Definition at line 51 of file dns_domain.c.

◆ dns_domain_suffixpos()

unsigned int dns_domain_suffixpos ( const char *  ,
const char *   
)

Definition at line 63 of file dns_domain.c.

◆ dns_domain_todot_cat()

int dns_domain_todot_cat ( stralloc *  ,
const char *   
)

Definition at line 4 of file dns_dtda.c.

◆ dns_ip4()

int dns_ip4 ( stralloc *  ,
const stralloc *   
)

Definition at line 39 of file dns_ip.c.

◆ dns_ip4_packet()

int dns_ip4_packet ( stralloc *  ,
const char *  ,
unsigned  int 
)

Definition at line 6 of file dns_ip.c.

◆ dns_ip4_qualify()

int dns_ip4_qualify ( stralloc *  ,
stralloc *  ,
const stralloc *   
)

Definition at line 66 of file dns_ipq.c.

◆ dns_ip4_qualify_rules()

int dns_ip4_qualify_rules ( stralloc *  ,
stralloc *  ,
const stralloc *  ,
const stralloc *   
)

Definition at line 33 of file dns_ipq.c.

◆ dns_ip6()

int dns_ip6 ( stralloc *  ,
stralloc *   
)

Definition at line 51 of file dns_ip6.c.

◆ dns_ip6_packet()

int dns_ip6_packet ( stralloc *  ,
const char *  ,
unsigned  int 
)

Definition at line 44 of file dns_ip6.c.

Here is the call graph for this function:

◆ dns_ip6_qualify()

int dns_ip6_qualify ( stralloc *  ,
stralloc *  ,
const stralloc *   
)

Definition at line 67 of file dns_ipq6.c.

◆ dns_ip6_qualify_rules()

int dns_ip6_qualify_rules ( stralloc *  ,
stralloc *  ,
const stralloc *  ,
const stralloc *   
)

Definition at line 34 of file dns_ipq6.c.

◆ dns_mx()

int dns_mx ( stralloc *  ,
const stralloc *   
)

◆ dns_mx_packet()

int dns_mx_packet ( stralloc *  ,
const char *  ,
unsigned  int 
)

◆ dns_name4()

int dns_name4 ( stralloc *  ,
const char *   
)

◆ dns_name4_domain()

void dns_name4_domain ( char *  ,
const char *   
)

◆ dns_name6()

int dns_name6 ( stralloc *  ,
char  ip[16] 
)

Definition at line 51 of file dns_name.c.

Here is the caller graph for this function:

◆ dns_name6_domain()

int dns_name6_domain ( char *  ,
char *   
)

◆ dns_name_packet()

int dns_name_packet ( stralloc *  ,
const char *  ,
unsigned  int 
)

Definition at line 9 of file dns_name.c.

◆ dns_packet_copy()

unsigned int dns_packet_copy ( const char *  ,
unsigned  int,
unsigned  int,
char *  ,
unsigned  int 
)

Definition at line 8 of file dns_packet.c.

◆ dns_packet_getname()

unsigned int dns_packet_getname ( const char *  ,
unsigned  int,
unsigned  int,
char **   
)

Definition at line 35 of file dns_packet.c.

Here is the call graph for this function:

◆ dns_packet_skipname()

unsigned int dns_packet_skipname ( const char *  ,
unsigned  int,
unsigned  int 
)

Definition at line 18 of file dns_packet.c.

◆ dns_random()

unsigned int dns_random ( unsigned  int)

Definition at line 52 of file dns_random.c.

◆ dns_random_init()

void dns_random_init ( const char *  )
Here is the caller graph for this function:

◆ dns_resolvconfip()

int dns_resolvconfip ( char *  )

◆ dns_resolvconfrewrite()

int dns_resolvconfrewrite ( stralloc *  )

Definition at line 112 of file dns_rcrw.c.

◆ dns_resolve()

int dns_resolve ( const char *  ,
const char *   
)

◆ dns_sortip()

void dns_sortip ( char *  ,
unsigned  int 
)

Definition at line 7 of file dns_sortip.c.

◆ dns_sortip6()

void dns_sortip6 ( char *  ,
unsigned  int 
)

Definition at line 7 of file dns_sortip6.c.

◆ dns_transmit_free()

void dns_transmit_free ( struct dns_transmit )

Definition at line 79 of file dns_transmit.c.

◆ dns_transmit_get()

int dns_transmit_get ( struct dns_transmit ,
const iopause_fd *  ,
const struct taia  
)

Definition at line 244 of file dns_transmit.c.

Here is the call graph for this function:

◆ dns_transmit_io()

void dns_transmit_io ( struct dns_transmit ,
iopause_fd *  ,
struct taia  
)

Definition at line 227 of file dns_transmit.c.

◆ dns_transmit_start()

int dns_transmit_start ( struct dns_transmit ,
const char *  ,
int  ,
const char *  ,
const char *  ,
const unsigned char *   
)

◆ dns_txt()

int dns_txt ( stralloc *  ,
const stralloc *   
)

Definition at line 51 of file dns_txt.c.

◆ dns_txt_packet()

int dns_txt_packet ( stralloc *  ,
const char *  ,
unsigned  int 
)

Definition at line 6 of file dns_txt.c.

Variable Documentation

◆ dns_resolve_tx

struct dns_transmit dns_resolve_tx

Definition at line 7 of file dns_resolve.c.