R/is.R

Defines functions is_valid is_ipv6 is_ipv4

Documented in is_ipv4 is_ipv6 is_valid

# See iptools.cpp for is_multicast

#'@rdname is_checks
#'@export
is_ipv4 <- function(ip_addresses){
  return((ip_classify(ip_addresses) == "IPv4"))
}

#'@rdname is_checks
#'@export
is_ipv6 <- function(ip_addresses){
  return((ip_classify(ip_addresses) == "IPv6"))
}

#'@rdname is_checks
#'@export
is_valid <- function(ip_addresses){
  return((ip_classify(ip_addresses) != "Invalid"))
}

Try the iptools package in your browser

Any scripts or data that you put into this service are public.

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