if (fqdn == NULL) return(hostalias_nomatch);
if (IsEmptyStr(fqdn)) return(hostalias_nomatch);
if (!strcasecmp(fqdn, "localhost")) return(hostalias_localhost);
if (fqdn == NULL) return(hostalias_nomatch);
if (IsEmptyStr(fqdn)) return(hostalias_nomatch);
if (!strcasecmp(fqdn, "localhost")) return(hostalias_localhost);
if (inetcfg == NULL) return(hostalias_nomatch);
config_lines = num_tokens(inetcfg, '\n');
if (inetcfg == NULL) return(hostalias_nomatch);
config_lines = num_tokens(inetcfg, '\n');
for (i=0; i<config_lines; ++i) {
extract_token(buf, inetcfg, i, '\n', sizeof buf);
extract_token(host, buf, 0, '|', sizeof host);
for (i=0; i<config_lines; ++i) {
extract_token(buf, inetcfg, i, '\n', sizeof buf);
extract_token(host, buf, 0, '|', sizeof host);