1 2#include "GeoIP_internal.h" 3 4char * 5GeoIP_org_by_ipnum(GeoIP * gi, unsigned long ipnum) 6{ 7 GeoIPLookup gl; 8 return GeoIP_name_by_ipnum_gl(gi, ipnum, &gl); 9} 10 11char * 12GeoIP_org_by_ipnum_v6(GeoIP * gi, geoipv6_t ipnum) 13{ 14 GeoIPLookup gl; 15 return GeoIP_name_by_ipnum_v6_gl(gi, ipnum, &gl); 16} 17 18char * 19GeoIP_org_by_addr(GeoIP * gi, const char *addr) 20{ 21 GeoIPLookup gl; 22 return GeoIP_name_by_addr_gl(gi, addr, &gl); 23} 24 25char * 26GeoIP_org_by_addr_v6(GeoIP * gi, const char *addr) 27{ 28 GeoIPLookup gl; 29 return GeoIP_name_by_addr_v6_gl(gi, addr, &gl); 30} 31 32char * 33GeoIP_org_by_name(GeoIP * gi, const char *name) 34{ 35 GeoIPLookup gl; 36 return GeoIP_name_by_name_gl(gi, name, &gl); 37} 38 39char * 40GeoIP_org_by_name_v6(GeoIP * gi, const char *name) 41{ 42 GeoIPLookup gl; 43 return GeoIP_name_by_name_v6_gl(gi, name, &gl); 44} 45 46int 47GeoIP_last_netmask(GeoIP * gi) 48{ 49 return gi->netmask; 50} 51 52unsigned int 53_GeoIP_seek_record_v6(GeoIP * gi, geoipv6_t ipnum) 54{ 55 GeoIPLookup gl; 56 return _GeoIP_seek_record_v6_gl(gi, ipnum, &gl); 57} 58 59unsigned int 60_GeoIP_seek_record(GeoIP * gi, unsigned long ipnum) 61{ 62 GeoIPLookup gl; 63 return _GeoIP_seek_record_gl(gi, ipnum, &gl); 64} 65 66const char * 67GeoIP_country_code_by_name_v6(GeoIP * gi, const char *name) 68{ 69 GeoIPLookup gl; 70 return GeoIP_country_code_by_name_v6_gl(gi, name, &gl); 71} 72 73const char * 74GeoIP_country_code_by_name(GeoIP * gi, const char *name) 75{ 76 GeoIPLookup gl; 77 return GeoIP_country_code_by_name_gl(gi, name, &gl); 78} 79 80const char * 81GeoIP_country_code3_by_name_v6(GeoIP * gi, const char *name) 82{ 83 GeoIPLookup gl; 84 return GeoIP_country_code3_by_name_v6_gl(gi, name, &gl); 85} 86 87const char * 88GeoIP_country_code3_by_name(GeoIP * gi, const char *name) 89{ 90 GeoIPLookup gl; 91 return GeoIP_country_code3_by_name_gl(gi, name, &gl); 92} 93 94const char * 95GeoIP_country_name_by_name_v6(GeoIP * gi, const char *name) 96{ 97 GeoIPLookup gl; 98 return GeoIP_country_name_by_name_v6_gl(gi, name, &gl); 99} 100 101const char * 102GeoIP_country_name_by_name(GeoIP * gi, const char *name) 103{ 104 GeoIPLookup gl; 105 return GeoIP_country_name_by_name_gl(gi, name, &gl); 106} 107 108int 109GeoIP_id_by_name(GeoIP * gi, const char *name) 110{ 111 GeoIPLookup gl; 112 return GeoIP_id_by_name_gl(gi, name, &gl); 113} 114int 115GeoIP_id_by_name_v6(GeoIP * gi, const char *name) 116{ 117 GeoIPLookup gl; 118 return GeoIP_id_by_name_v6_gl(gi, name, &gl); 119} 120 121const char * 122GeoIP_country_code_by_addr_v6(GeoIP * gi, const char *addr) 123{ 124 GeoIPLookup gl; 125 return GeoIP_country_code_by_addr_v6_gl(gi, addr, &gl); 126} 127const char * 128GeoIP_country_code_by_addr(GeoIP * gi, const char *addr) 129{ 130 GeoIPLookup gl; 131 return GeoIP_country_code_by_addr_gl(gi, addr, &gl); 132} 133 134const char * 135GeoIP_country_code3_by_addr_v6(GeoIP * gi, const char *addr) 136{ 137 GeoIPLookup gl; 138 return GeoIP_country_code3_by_addr_v6_gl(gi, addr, &gl); 139} 140 141const char * 142GeoIP_country_code3_by_addr(GeoIP * gi, const char *addr) 143{ 144 GeoIPLookup gl; 145 return GeoIP_country_code3_by_addr_gl(gi, addr, &gl); 146} 147 148const char * 149GeoIP_country_name_by_addr_v6(GeoIP * gi, const char *addr) 150{ 151 GeoIPLookup gl; 152 return GeoIP_country_name_by_addr_v6_gl(gi, addr, &gl); 153} 154const char * 155GeoIP_country_name_by_addr(GeoIP * gi, const char *addr) 156{ 157 GeoIPLookup gl; 158 return GeoIP_country_name_by_addr_gl(gi, addr, &gl); 159} 160 161const char * 162GeoIP_country_name_by_ipnum(GeoIP * gi, unsigned long ipnum) 163{ 164 GeoIPLookup gl; 165 return GeoIP_country_name_by_ipnum_gl(gi, ipnum, &gl); 166} 167 168const char * 169GeoIP_country_name_by_ipnum_v6(GeoIP * gi, geoipv6_t ipnum) 170{ 171 GeoIPLookup gl; 172 return GeoIP_country_name_by_ipnum_v6_gl(gi, ipnum, &gl); 173} 174 175const char * 176GeoIP_country_code_by_ipnum_v6(GeoIP * gi, geoipv6_t ipnum) 177{ 178 GeoIPLookup gl; 179 return GeoIP_country_code_by_ipnum_v6_gl(gi, ipnum, &gl); 180} 181 182 183const char * 184GeoIP_country_code_by_ipnum(GeoIP * gi, unsigned long ipnum) 185{ 186 GeoIPLookup gl; 187 return GeoIP_country_code_by_ipnum_gl(gi, ipnum, &gl); 188} 189 190const char * 191GeoIP_country_code3_by_ipnum(GeoIP * gi, unsigned long ipnum) 192{ 193 GeoIPLookup gl; 194 return GeoIP_country_code3_by_ipnum_gl(gi, ipnum, &gl); 195} 196 197const char * 198GeoIP_country_code3_by_ipnum_v6(GeoIP * gi, geoipv6_t ipnum) 199{ 200 GeoIPLookup gl; 201 return GeoIP_country_code3_by_ipnum_v6_gl(gi, ipnum, &gl); 202} 203 204int 205GeoIP_country_id_by_addr_v6(GeoIP * gi, const char *addr) 206{ 207 GeoIPLookup gl; 208 return GeoIP_id_by_addr_v6_gl(gi, addr, &gl); 209} 210 211int 212GeoIP_country_id_by_addr(GeoIP * gi, const char *addr) 213{ 214 GeoIPLookup gl; 215 return GeoIP_id_by_addr_gl(gi, addr, &gl); 216} 217int 218GeoIP_country_id_by_name_v6(GeoIP * gi, const char *host) 219{ 220 GeoIPLookup gl; 221 return GeoIP_id_by_name_v6_gl(gi, host, &gl); 222} 223int 224GeoIP_country_id_by_name(GeoIP * gi, const char *host) 225{ 226 GeoIPLookup gl; 227 return GeoIP_id_by_name_gl(gi, host, &gl); 228} 229int 230GeoIP_id_by_addr_v6(GeoIP * gi, const char *addr) 231{ 232 GeoIPLookup gl; 233 return GeoIP_id_by_addr_v6_gl(gi, addr, &gl); 234} 235int 236GeoIP_id_by_addr(GeoIP * gi, const char *addr) 237{ 238 GeoIPLookup gl; 239 return GeoIP_id_by_addr_gl(gi, addr, &gl); 240} 241 242int 243GeoIP_id_by_ipnum_v6(GeoIP * gi, geoipv6_t ipnum) 244{ 245 GeoIPLookup gl; 246 return GeoIP_id_by_ipnum_v6_gl(gi, ipnum, &gl); 247} 248int 249GeoIP_id_by_ipnum(GeoIP * gi, unsigned long ipnum) 250{ 251 GeoIPLookup gl; 252 return GeoIP_id_by_ipnum_gl(gi, ipnum, &gl); 253} 254void 255GeoIP_assign_region_by_inetaddr(GeoIP * gi, unsigned long inetaddr, GeoIPRegion * region) 256{ 257 GeoIPLookup gl; 258 GeoIP_assign_region_by_inetaddr_gl(gi, inetaddr, region, &gl); 259} 260 261void 262GeoIP_assign_region_by_inetaddr_v6(GeoIP * gi, geoipv6_t inetaddr, GeoIPRegion * region) 263{ 264 GeoIPLookup gl; 265 GeoIP_assign_region_by_inetaddr_v6_gl(gi, inetaddr, region, &gl); 266} 267 268 269GeoIPRegion * 270GeoIP_region_by_addr(GeoIP * gi, const char *addr) 271{ 272 GeoIPLookup gl; 273 return GeoIP_region_by_addr_gl(gi, addr, &gl); 274} 275GeoIPRegion * 276GeoIP_region_by_addr_v6(GeoIP * gi, const char *addr) 277{ 278 GeoIPLookup gl; 279 return GeoIP_region_by_addr_v6_gl(gi, addr, &gl); 280} 281 282GeoIPRegion * 283GeoIP_region_by_name(GeoIP * gi, const char *name) 284{ 285 GeoIPLookup gl; 286 return GeoIP_region_by_name_gl(gi, name, &gl); 287} 288GeoIPRegion * 289GeoIP_region_by_name_v6(GeoIP * gi, const char *name) 290{ 291 GeoIPLookup gl; 292 return GeoIP_region_by_name_v6_gl(gi, name, &gl); 293} 294 295GeoIPRegion * 296GeoIP_region_by_ipnum(GeoIP * gi, unsigned long ipnum) 297{ 298 GeoIPLookup gl; 299 return GeoIP_region_by_ipnum_gl(gi, ipnum, &gl); 300} 301GeoIPRegion * 302GeoIP_region_by_ipnum_v6(GeoIP * gi, geoipv6_t ipnum) 303{ 304 GeoIPLookup gl; 305 return GeoIP_region_by_ipnum_v6_gl(gi, ipnum, &gl); 306} 307 308char ** 309GeoIP_range_by_ip(GeoIP * gi, const char *addr) 310{ 311 GeoIPLookup gl; 312 return GeoIP_range_by_ip_gl(gi, addr, &gl); 313} 314 315char * 316GeoIP_name_by_ipnum(GeoIP * gi, unsigned long ipnum) 317{ 318 GeoIPLookup gl; 319 return GeoIP_name_by_ipnum_gl(gi, ipnum, &gl); 320} 321char * 322GeoIP_name_by_ipnum_v6(GeoIP * gi, geoipv6_t ipnum) 323{ 324 GeoIPLookup gl; 325 return GeoIP_name_by_ipnum_v6_gl(gi, ipnum, &gl); 326} 327char * 328GeoIP_name_by_addr(GeoIP * gi, const char *addr) 329{ 330 GeoIPLookup gl; 331 return GeoIP_name_by_addr_gl(gi, addr, &gl); 332} 333char * 334GeoIP_name_by_addr_v6(GeoIP * gi, const char *addr) 335{ 336 GeoIPLookup gl; 337 return GeoIP_name_by_addr_v6_gl(gi, addr, &gl); 338} 339 340char * 341GeoIP_name_by_name(GeoIP * gi, const char *name) 342{ 343 GeoIPLookup gl; 344 return GeoIP_name_by_name_gl(gi, name, &gl); 345} 346 347char * 348GeoIP_name_by_name_v6(GeoIP * gi, const char *name) 349{ 350 GeoIPLookup gl; 351 return GeoIP_name_by_name_v6_gl(gi, name, &gl); 352} 353