ipv4addr?

Synopsis

(ipv4addr? object)

Parameters

  • object

Description

This predicate returns #t if the object is an IP address and is within the IPv4 range, otherwise #f.

Side Effects

Return Value

#t or #f

Example

> (define a '2001:DB8::1:1)
a
> (define b '10.1.1.1)
b
> (ipaddr? a)
#t
> (ipaddr? b)
#t
> (ipv4addr? a)
#f
> (ipv4addr? b)
#t
> (cons a b)
(2001:db8::1:1 . 10.1.1.1)
>