jabberd14 1.6.2
Data Structures | Typedefs | Functions
dnsrv.cc File Reference

implements the main part of the DNS resolver component More...

#include "jabberd.h"
#include "srv_resolv.h"
#include <sys/wait.h>

Data Structures

struct  __dns_resend_list_host_list
 structure to build a list that holds all hosts to which the packets are resent for a service More...
struct  __dns_resend_list
struct  dns_io
struct  __dns_packet_list

Typedefs

typedef struct
__dns_resend_list_host_list
dns_resend_list_host_list
 structure to build a list that holds all hosts to which the packets are resent for a service
typedef struct
__dns_resend_list_host_list 
_dns_resend_list_host_list
typedef struct __dns_resend_listdns_resend_list
typedef struct __dns_resend_list _dns_resend_list
typedef struct dns_io _dns_io
typedef int(* RESOLVEFUNC )(dns_io di)
typedef struct __dns_packet_listdns_packet_list
typedef struct __dns_packet_list _dns_packet_list

Functions

void _dnsrv_signal (int sig)
void dnsrv_child_process_xstream_io (int type, xmlnode x, void *args)
int dnsrv_child_main (dns_io di)
int dnsrv_fork_and_capture (RESOLVEFUNC f, dns_io di)
void dnsrv_resend (xmlnode pkt, char *ip, char *to)
void dnsrv_lookup (dns_io d, dpacket p)
result dnsrv_deliver (instance i, dpacket p, void *args)
void dnsrv_process_xstream_io (int type, xmlnode x, void *arg)
void * dnsrv_process_io (void *threadarg)
void * dnsrv_thread (void *arg)
void _dnsrv_beat_packets (xht h, const char *key, void *data, void *arg)
result dnsrv_beat_packets (void *arg)
void dnsrv (instance i, xmlnode x)

Detailed Description

implements the main part of the DNS resolver component

Config format: <dnsrv xmlns='jabber:config:dnsrv'> <resend service="_jabber._tcp">s2s-component</resend> </dnsrv>

Note: You must specify the services in the order you want them tried


Typedef Documentation

typedef struct dns_io _dns_io

struct to store list of dpackets which need to be delivered

struct to store list of services and resend hosts

structure to build a list that holds all hosts to which the packets are resent for a service

typedef int(* RESOLVEFUNC)(dns_io di)

prototype for the resolver function

Parameters:
dipointer to the instance global data

Function Documentation

void _dnsrv_beat_packets ( xht  h,
const char *  key,
void *  data,
void *  arg 
)
void _dnsrv_signal ( int  sig)

signal handler: just die after any signal

Parameters:
sigthe signal number that has been sent

Referenced by dnsrv_fork_and_capture().

void dnsrv ( instance  i,
xmlnode  x 
)
result dnsrv_beat_packets ( void *  arg)
int dnsrv_child_main ( dns_io  di)
void dnsrv_child_process_xstream_io ( int  type,
xmlnode  x,
void *  args 
)
result dnsrv_deliver ( instance  i,
dpacket  p,
void *  args 
)
int dnsrv_fork_and_capture ( RESOLVEFUNC  f,
dns_io  di 
)
void dnsrv_lookup ( dns_io  d,
dpacket  p 
)
void* dnsrv_process_io ( void *  threadarg)
void dnsrv_process_xstream_io ( int  type,
xmlnode  x,
void *  arg 
)
void dnsrv_resend ( xmlnode  pkt,
char *  ip,
char *  to 
)
void* dnsrv_thread ( void *  arg)