FACT++  1.0
SERVICE* dis_hash_service_get_next ( int *  curr_index,
SERVICE prevp,
int  new_entries 
)

Definition at line 3315 of file dis.c.

References dll_get_next(), and MAX_HASH_ENTRIES.

Referenced by dis_hash_print(), dis_stop_serving(), do_dis_add_service(), do_dis_stop_serving_dns(), register_services(), and service_info().

3316 {
3317  int index;
3318  SERVICE *servp = 0;
3319 /*
3320  if(!prevp)
3321  {
3322  index = -1;
3323  }
3324 */
3325  index = *curr_index;
3326  if(index == -1)
3327  {
3328  index++;
3329  prevp = Service_hash_table[index];
3330  }
3331  if(!prevp)
3332  {
3333  prevp = Service_hash_table[index];
3334  }
3335  do
3336  {
3337  if(prevp)
3338  {
3339  if((!new_entries) || (Service_new_entries[index] > 0))
3340  {
3341  servp = (SERVICE *) dll_get_next(
3342  (DLL *) Service_hash_table[index],
3343  (DLL *) prevp);
3344  if(servp)
3345  break;
3346  }
3347  }
3348  index++;
3349  if(index == MAX_HASH_ENTRIES)
3350  {
3351  *curr_index = -1;
3352  return((SERVICE *) 0);
3353  }
3354  prevp = Service_hash_table[index];
3355  } while(!servp);
3356  *curr_index = index;
3357  return(servp);
3358 }
#define MAX_HASH_ENTRIES
Definition: dis.c:3231
static int Service_new_entries[MAX_HASH_ENTRIES]
Definition: dis.c:3234
Definition: dim.h:530
Definition: dis.c:69
static SERVICE * Service_hash_table[MAX_HASH_ENTRIES]
Definition: dis.c:3233
DLL * dll_get_next(DLL *head, DLL *item)
Definition: dll.c:66

+ Here is the call graph for this function:

+ Here is the caller graph for this function: