/* Look up a hostname in the array of known hostnames. */
u16_t* resolv_lookup(char *name)
/* Look up a hostname in the array of known hostnames. */
u16_t* resolv_lookup(char *name)
{
  static u8_t i;
  struct namemap *nameptr;
  for (i = 0; i < RESOLV_ENTRIES; ++i)
  {
    nameptr = &names[i];
    if (nameptr->state == STATE_DONE &&
        strcmp(name, nameptr->name) == 0)
    {
      return nameptr->ipaddr;
    }
  }
  return NULL;
}