void create_proc_client_map()

in tacacs-F4.0.4.28/client_count.c [47:58]


void create_proc_client_map(pid_t process_id, char* client_ip)
{
  /* max size of a 64bit number is 19 chars */
  char pid_str[20];
  snprintf(pid_str, 20, "%d", process_id);
  PROC_CLIENT *pc = (PROC_CLIENT *)tac_malloc(sizeof(PROC_CLIENT));
  memset(pc, 0, sizeof(PROC_CLIENT));
  pc->name = tac_strdup(pid_str);
  pc->hash = NULL;
  pc->client_ip = tac_strdup(client_ip);
  hash_add_entry(proc_table, (void*)pc);
}