/home/tomh/openhip/hip-0.5/src/usermode/hip_dns.c File Reference

#include <asm/types.h>
#include <netinet/in.h>
#include <netinet/udp.h>
#include <arpa/inet.h>
#include <unistd.h>
#include <pthread.h>
#include <sys/time.h>
#include <arpa/nameser.h>
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <openssl/rand.h>
#include <hip/hip_types.h>
#include <hip/hip_funcs.h>
#include <hip/hip_dns.h>
#include <hip/hip_usermode.h>
#include <hip/hip_sadb.h>

Classes

struct  dns_request_info

Defines

#define DNS_REQ_TABLE_SIZE   128
#define SALEN4(a)   (sizeof struct sockaddr_in)
#define TDIFF(a, b)   ((a).tv_sec - (b).tv_sec)
#define USE_LINUX

Functions

__u32 lsi_name_lookup (char *name, int namelen)
__u32 get_preferred_lsi (struct sockaddr *)
__u32 receive_hip_dns_response (unsigned char *buff, int len)
sockaddr * get_hip_dns_server ()
int init_dns_socket ()
void handle_dns_request (char *buff, int len, struct sockaddr *from)
int parse_dns_name (char *name, char *dst, int *dst_len, int *type)
int send_dns_response (char *buff, int len, struct sockaddr *to, int anstype, char *ans)
int forward_dns_request (char *buff, int len, struct sockaddr *to)
__u16 send_hip_dns_lookup (char *name, int name_len)
__u32 get_current_dns_server ()
int queue_request_info (__u16 xid, __u16 hip_request, struct sockaddr *addr)
int get_request_info (__u16 xid, __u16 hip_request, struct sockaddr *addr)
char ** get_request_old_buff (__u16 xid)
void * hip_dns (void *arg)
int build_dns_name (char *name, int name_len, char *dst)
void add_local_hip_nameserver (__u32 ip)
void delete_local_hip_nameserver (__u32 ip)

Variables

int dnsfd
__u16 g_txid
dns_request_info dns_reqs [DNS_REQ_TABLE_SIZE]

Define Documentation

#define DNS_REQ_TABLE_SIZE   128

#define SALEN4 (  )     (sizeof struct sockaddr_in)

#define TDIFF ( a,
 )     ((a).tv_sec - (b).tv_sec)

#define USE_LINUX


Function Documentation

void add_local_hip_nameserver ( __u32  ip  ) 

int build_dns_name ( char *  name,
int  name_len,
char *  dst 
)

void delete_local_hip_nameserver ( __u32  ip  ) 

int forward_dns_request ( char *  buff,
int  len,
struct sockaddr *  to 
)

__u32 get_current_dns_server (  ) 

struct sockaddr* get_hip_dns_server (  ) 

__u32 get_preferred_lsi ( struct sockaddr *   ) 

int get_request_info ( __u16  xid,
__u16  hip_request,
struct sockaddr *  addr 
)

char ** get_request_old_buff ( __u16  xid  ) 

void handle_dns_request ( char *  buff,
int  len,
struct sockaddr *  from 
)

void* hip_dns ( void *  arg  ) 

int init_dns_socket (  ) 

__u32 lsi_name_lookup ( char *  name,
int  namelen 
)

int parse_dns_name ( char *  name,
char *  dst,
int *  dst_len,
int *  type 
)

int queue_request_info ( __u16  xid,
__u16  hip_request,
struct sockaddr *  addr 
)

__u32 receive_hip_dns_response ( unsigned char *  buff,
int  len 
)

int send_dns_response ( char *  buff,
int  len,
struct sockaddr *  to,
int  anstype,
char *  ans 
)

__u16 send_hip_dns_lookup ( char *  name,
int  name_len 
)


Variable Documentation

struct dns_request_info dns_reqs[DNS_REQ_TABLE_SIZE]

int dnsfd

__u16 g_txid


Generated on Mon Oct 22 11:43:44 2007 for OpenHIP by  doxygen 1.5.1