FACT++  1.0
DNS_SERVICE* service_exists ( char *  name)

Definition at line 1649 of file dns.c.

References dll_search(), HashFunction(), MAX_HASH_ENTRIES, and node::servp.

Referenced by find_services(), handle_client_request(), handle_registration(), and set_rpc_info().

1650 {
1651  int index;
1652  RED_DNS_SERVICE *servp;
1653  char *ptr;
1654 
1655  index = HashFunction(name, MAX_HASH_ENTRIES);
1656  if( (servp = (RED_DNS_SERVICE *) dll_search(
1657  (DLL *) Service_hash_table[index],
1658  name, (int)strlen(name)+1)) )
1659  {
1660  ptr = (char *)servp - (2 * sizeof(void *));
1661  return((DNS_SERVICE *)ptr);
1662  }
1663 
1664  return((DNS_SERVICE *)0);
1665 }
Definition: dns.c:58
#define MAX_HASH_ENTRIES
Definition: dns.c:23
Definition: dim.h:530
Definition: dis.c:69
int HashFunction(char *name, int max)
Definition: hash.c:22
static RED_DNS_SERVICE * Service_hash_table[MAX_HASH_ENTRIES]
Definition: dns.c:71
DLL * dll_search(DLL *head, char *data, int size)
Definition: dll.c:49

+ Here is the call graph for this function:

+ Here is the caller graph for this function: