geoip 0.0.3

Bindings for the GeoIP library
docs.rs failed to build geoip-0.0.3
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build: geoip-0.0.14

rust-geoip

GeoIP bindings for Rust.

Work in progress. Currently only supports the free ASN database.

Installation: use Cargo.

Usage:

let geoip = GeoIP::open(&Path::new("/opt/geoip/GeoIPASNum.dat"),
                        GeoIP::Options::MemoryCache).unwrap();
let ip = from_str("91.203.184.192").unwrap();
let res = geoip.as_info_by_ip(ip).unwrap();
assert!(res.asn == 41064);
assert!(res.name.contains("Telefun"));
assert!(res.netmask == 22);