Lines Matching refs:cc
32 " [!] --src-cc, --source-country country[,country,country,...]\n"
36 " [!] --dst-cc, --destination-country country[,country,country,...]\n"
47 { "dst-cc", 1, 0, '2' }, /* Alias for --destination-country */
49 { "src-cc", 1, 0, '1' }, /* Alias for --source-country */
66 u_int16_t cc;
71 get_country_subnets(u_int16_t cc, u_int32_t *count)
97 if (cc == index[i].cc)
100 if (cc != index[i].cc)
102 "geoip match: sorry, '%c%c' isn't in the database\n", COUNTRY(cc));
115 if (db_cc != cc)
137 load_geoip_cc(u_int16_t cc)
145 ginfo->subnets = get_country_subnets(cc, &ginfo->count);
146 ginfo->cc = cc;
152 check_geoip_cc(char *cc, u_int16_t cc_used[], u_int8_t count)
157 if (strlen(cc) != 2) /* Country must be 2 chars long according
160 "geoip match: invalid country code '%s'", cc);
165 if (isalnum(cc[i]) != 0)
166 cc[i] = toupper(cc[i]);
169 "geoip match: invalid country code '%s'", cc);
177 cc_int16 = (cc[0]<<8) + cc[1];
189 parse_geoip_cc(const char *ccstr, u_int16_t *cc, struct geoip_info **mem)
204 if ((cctmp = check_geoip_cc(cp, cc, count)) != 0) {
208 cc[count-1] = cctmp;
259 info->count = parse_geoip_cc(argv[optind-1], info->cc, info->mem);
297 printf("%s%c%c", i ? "," : "", COUNTRY(info->cc[i]));
317 printf("%s%c%c", i ? "," : "", COUNTRY(info->cc[i]));