Lines Matching refs:cname
97 static void find_country_from_cname(const char *cname, struct in_addr addr);
226 const char *cname; in callback() local
241 cname = host->h_name; /* CNAME gets put here */ in callback()
242 if (!cname) in callback()
245 find_country_from_cname(cname, *(struct in_addr*)host->h_addr); in callback()
554 static void find_country_from_cname(const char *cname, struct in_addr addr) in find_country_from_cname() argument
562 z0 = TOLOWER(cname[0]); in find_country_from_cname()
563 z1 = TOLOWER(cname[1]); in find_country_from_cname()
564 ccopy = strdup(cname); in find_country_from_cname()
567 ver_1 = (z0 == 'z' && z1 == 'z' && !strcasecmp(cname+4,nerd_ver1)); in find_country_from_cname()
572 const char *dot = strchr(cname, '.'); in find_country_from_cname()
573 if ((z0 != 'z' && z1 != 'z') || dot != cname+4) in find_country_from_cname()
575 printf("Unexpected CNAME %s (ver_1)\n", cname); in find_country_from_cname()
585 printf("Unexpected CNAME %s (ver_2)\n", cname); in find_country_from_cname()
591 printf("Unexpected CNAME %s (ver?)\n", cname); in find_country_from_cname()
597 ccode_A2[0] = (char)TOLOWER(cname[2]); in find_country_from_cname()
598 ccode_A2[1] = (char)TOLOWER(cname[3]); in find_country_from_cname()