/* Queues a name so that a question for the name will be sent out. */
void resolv_query(char *name)
/* Queues a name so that a question for the name will be sent out. */
void resolv_query(char *name)
{
  static u8_t i;
  static u8_t lseq, lseqi;
  register struct namemap *nameptr;
  lseq = lseqi = 0;
  for (i = 0; i < RESOLV_ENTRIES; ++i)
  {
    nameptr = &names[i];
    if (nameptr->state == STATE_UNUSED)
    {
      break;
    }
    if (seqno - nameptr->seqno > lseq)
    {
      lseq = seqno - nameptr->seqno;
      lseqi = i;
    }
  }
  if (i == RESOLV_ENTRIES)
  {
    i = lseqi;
    nameptr = &names[i];
  }
  strcpy(nameptr->name, name);
  nameptr->state = STATE_NEW;
  nameptr->seqno = seqno;
  ++seqno;
}