/* Extract all the interesting selectors for the interface in consideration  */
static struct if_mapping* mapping_extract(int skfd, const char *ifname)
/* Extract all the interesting selectors for the interface in consideration  */
static struct if_mapping* mapping_extract(int skfd, const char *ifname)
{
  struct if_mapping *	target;
  int			i;
  target = calloc(1, sizeof(if_mapping));
  if(!target)
    {
      fprintf(stderr, "Error: Can't allocate interface mapping.\n");  
      return(NULL);
    }
  strcpy(target->ifname, ifname);
  for(i = 0; i < SELECT_NUM; i++)
    {
      if(selector_active[i] != 0)
	{
	  selector_list[i].get_fn(skfd, ifname, target, selector_active[i]);
	}
    }
  return(target);
}