Definition at line 176 of file dns.c.
References DNS_CONNECTION::already, check_validity(), node::conn_id, serv::conn_id, Curr_n_servers, Curr_n_services, Debug, dim_get_keepalive_timeout(), dim_print_date_time(), dll_empty(), dll_init(), dll_insert_queue(), dll_remove(), dna_set_test_write(), dna_write(), dna_write_nowait(), DNS_accepted_domains, Dns_conns, DNS_DIS_HEADER, DNS_DIS_KILL, DNS_DIS_STOP, do_inform_clients(), do_update_did(), dtq_add_entry(), DIS_DNS_PACKET::format, Memory::free(), get_dns_accepted_domains(), i, inform_clients(), Memory::malloc(), MAX_NAME, MAX_NODE_NAME, MAX_REGISTRATION_UNIT, MAX_TASK_NAME, MY_OS9, DIS_DNS_PACKET::n_services, DNS_CONNECTION::n_services, serv::next, DIS_DNS_PACKET::node_addr, serv::node_head, DIS_DNS_PACKET::node_name, DNS_CONNECTION::node_name, DNS_CONNECTION::old_n_services, DIS_DNS_PACKET::pid, DNS_CONNECTION::pid, DIS_DNS_PACKET::port, DNS_CONNECTION::port, DIS_DNS_PACKET::protocol, DNS_CONNECTION::protocol, release_conn(), serv::serv_def, serv::serv_id, serv::serv_name, serv::server_format, SERVICE_REG::service_def, service_exists(), DNS_CONNECTION::service_head, node::service_id, SERVICE_REG::service_id, service_init(), service_insert(), SERVICE_REG::service_name, service_remove(), DIS_DNS_PACKET::services, node::servp, DNS_DIS_PACKET::size, SRC_DIS, DNS_CONNECTION::src_type, serv::state, DIS_DNS_PACKET::task_name, DNS_CONNECTION::task_name, time, Timer_q, DNS_CONNECTION::timr_ent, DNS_DIS_PACKET::type, update_did(), DNS_CONNECTION::validity, and WATCHDOG_TMOUT_MAX.
Referenced by main(), and recv_rout().
182 char *ptr, *ptr1, *ptrt;
197 int name_too_long = 0;
207 if((
unsigned)service_id & 0x80000000)
240 for(i = 0; i < 4; i++)
258 if(strcmp(
Dns_conns[conn_id].task_name,
"DIS_DNS"))
270 ptr1 = strchr(ptr,
',');
279 ptr1 += (int)strlen(ptr);
281 if(strstr(
Dns_conns[conn_id].node_name,ptr))
295 printf(
" Stop Server: Couldn't write, releasing %d\n",conn_id);
299 printf(
" Connection from %s refused, stopping server %s\n",
311 if(strcmp(
Dns_conns[conn_id].task_name,
"DIS_DNS"))
328 if( (
Dns_conns[conn_id].n_services == -1) &&
331 if(strcmp(
Dns_conns[conn_id].task_name,
"DIS_DNS"))
334 printf(
" Server %s out of error\n",
343 for( i = 0; i < n_services; i++ )
373 format = vtohl(packet->
format);
380 printf(
" Couldn't write, releasing %d\n",servp->
conn_id);
384 printf(
" Service %s already declared, killing server %s\n",
387 release_client(servp->
conn_id);
397 printf(
" Service %s already declared by conn %d - %s@%s:%d (PID %d), Redeclared by conn %d - %s@%s:%d (PID %d)(same server) - Closing both conns %d %d\n",
425 printf(
" Kill Server: Couldn't write, releasing %d\n",conn_id);
429 printf(
" Service %s already declared by conn %d - %s@%s:%d (PID %d), killing server conn %d - %s@%s:%d (PID %d) \n",
450 else if( servp->
state != -1 )
479 if((
unsigned)service_id & 0x80000000)
491 printf(
" Conn %3d : Server %s@%s unregistered All services, releasing it.\n",
530 ptrt = strstr(
Dns_conns[conn_id].long_task_name,
"/CLIENT_LIST");
561 printf(
" Conn %3d : Server %s@%s (PID %d) registered %d services\n",
char node_name[MAX_NODE_NAME]
#define MAX_REGISTRATION_UNIT
static void release_conn(int conn_id)
int dim_get_keepalive_timeout()
void do_inform_clients(int conn_id)
void inform_clients(DNS_SERVICE *servp)
int dna_write(int conn_id, void *buffer, int size)
DllExp DIM_NOSHARE DNS_CONNECTION * Dns_conns
static char DNS_accepted_domains[1024]
void dll_insert_queue(DLL *head, DLL *item)
void do_update_did(int conn_id)
char task_name[MAX_TASK_NAME-4]
void dna_set_test_write(int conn_id, int time)
char service_name[MAX_NAME]
void dll_remove(DLL *item)
static int Curr_n_servers
void service_remove(RED_DNS_SERVICE *servp)
char node_name[MAX_NODE_NAME]
void check_validity(int conn_id)
char task_name[MAX_TASK_NAME-4]
char service_def[MAX_NAME]
void service_insert(RED_DNS_SERVICE *servp)
Warning because the service this data corrsponds to might have been last updated longer ago than Local time
#define WATCHDOG_TMOUT_MAX
DNS_SERVICE * service_exists(char *name)
int dna_write_nowait(int conn_id, void *buffer, int size)
TIMR_ENT * dtq_add_entry(int queue_id, int time, void(*user_routine)(), dim_long tag)
void dim_print_date_time()
SERVICE_REG services[MAX_SERVICE_UNIT]
static int Curr_n_services
int get_dns_accepted_domains(char *domains)