13 #define MAX_DNS_NODE 256 74 register int node_exists;
83 register int node_exists;
92 register int node_exists;
157 sscanf(pid_str,
"%d",&pid);
158 srand((
unsigned)(ip+pid));
229 if((!strcmp(connp->
node_name, node_name)) &&
317 register char *dns_node, *ptr;
319 register int timeout, node_exists;
340 if( (ptr = (
char *)strchr(ptr,
',')) )
345 strcpy(node_info,dns_node);
346 for(i = 0; i < 4; i ++)
347 node_info[(
int)strlen(node_info)+i+1] = (char)0xff;
367 retry_dns_connection,
381 register char *dns_node, *ptr;
382 register int conn_id, node_exists;
383 static int retrying = 0;
386 if( retrying )
return;
397 if( (ptr = (
char *)strchr(ptr,
',')) )
402 strcpy(node_info,dns_node);
403 for(i = 0; i < 4; i ++)
404 node_info[(
int)strlen(node_info)+i+1] = (char)0xff;
449 if(connp == DNS_ids[src_type])
int close_dns(dim_long dnsid, SRC_TYPES src_type)
void retry_dns_connection(DNS_CONN *connp)
int dis_set_dns_port(int port)
dim_long dis_add_dns(char *node_name, int port_number)
int dim_set_dns_node(char *node)
DNS_CONN * find_dns(char *node_name, int port_number, SRC_TYPES src_type)
int dna_open_client(char *server_node, char *server_task, int port, int server_protocol, void(*read_ast)(), void(*error_ast)(), SRC_TYPES src_type)
char task_name[MAX_TASK_NAME]
void dll_insert_queue(DLL *head, DLL *item)
int get_dns_pars(DNS_CONN *connp, char *node, int *port)
int rand_tmout(int min, int max)
int dic_set_dns_node(char *node)
_DIM_PROTO(void retry_dns_connection,(int conn_pend_id))
static void recv_rout(int conn_id, DIS_PACKET *packet, int size, int status)
int get_node_addr(char *node_addr)
int dic_set_dns_port(int port)
int get_dns_node_name(char *node_name)
int dim_get_dns_node(char *node)
int open_dns(dim_long dnsid, void(*recv_rout)(), void(*error_rout)(), int tmout_min, int tmout_max, SRC_TYPES src_type)
int dic_get_dns_node(char *node)
int dtq_rem_entry(int queue_id, TIMR_ENT *entry)
dim_long dic_add_dns(char *node_name, int port_number)
dim_long dns_get_dnsid(int conn_id, SRC_TYPES src_type)
int dis_get_dns_node(char *node)
int get_dns_port_number()
void set_dns_pars(DNS_CONN *connp, char *node, int port)
char node_name[MAX_DNS_NODE]
int dis_set_dns_node(char *node)
TIMR_ENT * dtq_add_entry(int queue_id, int time, void(*user_routine)(), dim_long tag)
int dim_set_dns_port(int port)
DLL * dll_get_next(DLL *head, DLL *item)
static DNS_CONN * DNS_ids[3]
int get_proc_name(char *proc_name)
static DNS_CONN * DNS_conn_head
DNS_CONN * get_dns(DNS_CONN *connp, SRC_TYPES src_type)