enrich: Enrich a collection of IP addresses with country and AS...

Description Usage Arguments Examples

Description

Takes a character vector of classed IP addresses and minimally converts them to their numeric representation. If Maxmind datases are available, country and autonomous system (AS) inforamtion will be added as well.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
enrich(x, ..., mm_asn_db = Sys.getenv("MAXMIND_ASN_DB_PATH"),
  mm_city_db = Sys.getenv("MAXMIND_CITY_DB_PATH"))

## S3 method for class 'ipv4'
enrich(x, mm_asn_db = Sys.getenv("MAXMIND_ASN_DB_PATH"),
  mm_city_db = Sys.getenv("MAXMIND_CITY_DB_PATH"))

## S3 method for class 'character'
enrich(x, mm_asn_db = Sys.getenv("MAXMIND_ASN_DB_PATH"),
  mm_city_db = Sys.getenv("MAXMIND_CITY_DB_PATH"))

Arguments

x

a character vector of IPv4 addresses

...

passed to other methods

mmm_asn_db, mm_city_db

paths to the Maxmind GeoLite ASN and City databases

Examples

1
2
3
x <- iptools::ip_random(10)
enrich(x)
enrich(as.ipv4(x))

hrbrmstr/inet documentation built on May 12, 2019, 6:23 p.m.