Higher-order Internet Protocol ('IP') Address Methods
A collection of tools and methods that expand upon the functionality of the 'iptools' package.
Currently uses Remotes:
in the DESCRIPTION
since it depends on the development version of iptools
.
The following functions are implemented:
as.ipv4
: Convert a character vector of IP(v4) addresses into an 'ipv4' objectas.numeric
: Convert an IPv4 object to an numeric vectordecode_toredo
: Decode Toredo IPv6 strings into componentsenrich
: Enrich a collection of IP addresses with country and AS informationin_addr_arpa
: Convert IPv4 addresses into in-addr.arpa formatipv4_to_ipv6
: Perform 6-to-4 and 4-to-6 addressingipv6_to_ipv4
: Perform 6-to-4 and 4-to-6 addressingoctets
: Turn an IPv4 object or a character vector of IPv4 addresses into a data frame of octetsdevtools::install_github("hrbrmstr/iptools") devtools::install_github("hrbrmstr/inet")
options(width=120)
library(inet) library(tidyverse) # current verison packageVersion("inet")
set.seed(19216811) x <- iptools::ip_random(20) x <- as.ipv4(x) as.numeric(x) enrich(x) octets(x) in_addr_arpa(x)
set.seed(19216811) data_frame( src = iptools::ip_random(10), to6 = ipv4_to_ipv6(src), to4 = ipv6_to_ipv4(to6), equal = (src == to4) )
decode_toredo("2001:0000:4136:e378:8000:63bf:3fff:fdd2")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.