rem: _("Inverse host lookup failed for %s"), dst->addrs[i]);
add: _("Inverse name lookup failed for `%s'"), dst->addrs[i]);
context: bool netcat_resolvehost(nc_host_t *dst, const char *name){  int i, ret;  struct hostent *hostent;  struct in_addr res_addr;  assert(name[0]);  debug_v("netcat_resolvehost(dst=%p, name=\"%s\")", (void *)dst, name);  /* reset all fields of the dst struct */  memset(dst, 0, sizeof(*dst));  ret = netcat_inet_pton(name, &res_addr);  if (!ret) {			/* couldn't translate: it must be a name! */    bool host_auth_taken = FALSE;    /* if the opt_numeric option is set, we must not use DNS in any way */    if (opt_numeric)      return FALSE;    /* failures to look up a name are reported to the calling function */    if (!(hostent = gethostbyname(name)))      return FALSE;    /* now I need to handle the host aliases (CNAME).  If we lookup host       www.bighost.foo, which is an alias for www.bighost.mux.foo, the hostent       struct will contain the real name in h_name, which is not what we want       for the output purpose (the user doesn't want to see something he didn't       type.  So assume the lookup name as the "official" name and fetch the       ips for the reverse lookup. */    debug("(lookup) lookup=\"%s\" official=\"%s\" (should match)\n", name,	  hostent->h_name);    strncpy(dst->name, name, MAXHOSTNAMELEN - 1);    /* now save all the available ip addresses (no more than MAXINETADDRS) */    for (i = 0; hostent->h_addr_list[i] && (i < MAXINETADDRS); i++) {      memcpy(&dst->iaddrs[i], hostent->h_addr_list[i], sizeof(dst->iaddrs[0]));      strncpy(dst->addrs[i], netcat_inet_ntop(&dst->iaddrs[i]),	      sizeof(dst->addrs[0]));    }				/* end of foreach addr, part A */    /* since the invalid dns warning is only shown with verbose level 1,       we may skip them (which would speed up the thing) */    if (!opt_debug && (opt_verbose < 1))      return TRUE;    /* do inverse lookups in separate loop based on our collected addresses */    for (i = 0; dst->iaddrs[i].s_addr && (i < MAXINETADDRS); i++) {      hostent = gethostbyaddr((char *)&dst->iaddrs[i], sizeof(dst->iaddrs[0]),			      AF_INET);      if (!hostent || !hostent->h_name) {	ncprint(NCPRINT_VERB1 | NCPRINT_WARNING,		_("Inverse host lookup failed for %s"), dst->addrs[i]);	continue;      }      /* now the case.  hostnames aren't case sensitive because of this we may         find a different case for the authoritative hostname.  For the same         previous reason we may want to keep the user typed case, but this time         we are going to override it because this tool is a "network exploration         tool", thus it's good to see the case they chose for this host. */      if (strcasecmp(dst->name, hostent->h_name)) {	int xcmp;	char savedhost[MAXHOSTNAMELEN];	/* refering to the flowchart (see the drafts directory contained in	   this package), try to guess the real hostname */	strncpy(savedhost, hostent->h_name, sizeof(savedhost));	savedhost[sizeof(savedhost) - 1] = 0;	/* ok actually the given host and the reverse-resolved address doesn't	   match, so try to see if we can find the real machine name.  In order to	   this to happen the originally found address must match with the newly	   found hostname directly resolved.  If this doesn't, or if this resolve	   fails, then fall back to the original warning message: they have a DNS	   misconfigured! */	hostent = gethostbyname(savedhost);	if (!hostent)	  goto failed_real_host;	for (xcmp = 0; hostent->h_addr_list[xcmp] &&		(xcmp < MAXINETADDRS); xcmp++) {	  if (!memcmp(&dst->iaddrs[i], hostent->h_addr_list[xcmp],		     sizeof(dst->iaddrs[0])))	    goto found_real_host;	} failed_real_host:	ncprint(NCPRINT_WARNING | NCPRINT_VERB1,		_("This host's reverse DNS doesn't match! %s -- %s"),		hostent->h_name, dst->name);	continue; found_real_host:	ncprint(NCPRINT_NOTICE | NCPRINT_VERB2,		_("Real hostname for %s [%s] is %s"),		dst->name, dst->addrs[i], savedhost);	continue;      }      else if (!host_auth_taken) {	/* case: take only the first one as auth */	strncpy(dst->name, hostent->h_name, sizeof(dst->name));	host_auth_taken = TRUE;      }    }				/* end of foreach addr, part B */  }  else {		/* `name' is a numeric address, try reverse lookup */    memcpy(&dst->iaddrs[0], &res_addr, sizeof(dst->iaddrs[0]));    strncpy(dst->addrs[0], netcat_inet_ntop(&res_addr), sizeof(dst->addrs[0]));    /* if opt_numeric is set or we don't require verbosity, we are done */    if (opt_numeric)      return TRUE;    /* numeric or not, failure to look up a PTR is *not* considered fatal */    hostent = gethostbyaddr((char *)&res_addr, sizeof(res_addr), AF_INET);    if (!hostent)      ncprint(NCPRINT_VERB2 | NCPRINT_WARNING,	      _("Inverse name lookup failed for `%s'"), name);    else {      strncpy(dst->name, hostent->h_name, MAXHOSTNAMELEN - 2);      /* now do the direct lookup to see if the PTR was authoritative */      hostent = gethostbyname(dst->name);      /* Any kind of failure in this section results in a host not auth         warning, and the dst->name field cleaned (I don't care if there is a         PTR, if it's unauthoritative). */      if (!hostent || !hostent->h_addr_list[0]) {	ncprint(NCPRINT_VERB1 | NCPRINT_WARNING,		_("Host %s isn't authoritative! (direct lookup failed)"),		dst->addrs[0]);	goto check_failed;      }      for (i = 0; hostent->h_addr_list[i] && (i < MAXINETADDRS); i++)	if (!memcmp(&dst->iaddrs[0], hostent->h_addr_list[i],		    sizeof(dst->iaddrs[0])))	  return TRUE;      ncprint(NCPRINT_VERB1 | NCPRINT_WARNING,	      _("Host %s isn't authoritative! (direct lookup mismatch)"),	      dst->addrs[0]);      ncprint(NCPRINT_VERB1, _("  %s -> %s  BUT  %s -> %s"),	      dst->addrs[0], dst->name, dst->name,	      netcat_inet_ntop(hostent->h_addr_list[0])); check_failed:      memset(dst->name, 0, sizeof(dst->name));    }				/* if hostent */  }  return TRUE;}