validate_range: check whether IPv4 ranges are valid

View source: R/RcppExports.R

validate_rangeR Documentation

check whether IPv4 ranges are valid

Description

validate_range checks whether a vector of IPv4 CIDR ranges ("127.0.0.1/32") are valid or not.

Usage

validate_range(ranges)

Arguments

ranges

a vector of IPv4 ranges

Value

a logical vector, where TRUE indicates that the provided entry is valid, and FALSE that it is not (or isn't an IP range at all)

See Also

ip_classify for classifying (and, incidentally, validating) IPv4 and IPv6 addresses, or range_boundaries for identifying the minimum and maximum IPs within a range.

Examples

validate_range("127.0.0.1/32")
#[1] TRUE
validate_range("127.0.0.1/33")
#[1] FALSE


hrbrmstr/iptools documentation built on Jan. 10, 2023, 2:54 a.m.