range_generate: generate all IP addresses within a range

Description Usage Arguments Value See Also Examples

View source: R/generators.R

Description

generates a vector containing all IP addresses within a provided range. Currently IPv4 only due to R's support (or lack thereof) for really big numbers.

Usage

1

Arguments

range

an IPv4 IP range

Value

a character vector containing each IPv4 IP address within the provided range.

See Also

ip_random for randomly-generated IPs, or ip_to_numeric for converting generate_range's output to its numeric form.

Examples

1
2
3
4
range_generate("172.18.0.0/28")
#[1]  "172.18.0.0"  "172.18.0.1"  "172.18.0.2"  "172.18.0.3"  "172.18.0.4"
#[6]  "172.18.0.5"  "172.18.0.6"  "172.18.0.7"  "172.18.0.8"  "172.18.0.9"
#[11] "172.18.0.10" "172.18.0.11" "172.18.0.12" "172.18.0.13" "172.18.0.14" "172.18.0.15"

iptools documentation built on Sept. 10, 2021, 5:06 p.m.