All Manuals > LispWorks User Guide and Reference Manual > 32 The COMM Package

NextPrevUpTopContentsIndex

string-ip-address

Function
Summary

Returns either an integer representing an IPv4 address or an ipv6-address object from the given IP address string.

Package

comm

Signature

string-ip-address ip-address-string => ip-address

Arguments

ip-address-string

A string denoting an IP address in either dotted format for IPv4 or standard IPv6 format.

Values

ip-address

Either an integer representing an IPv4 address, or an ipv6-address object.

Description

The function string-ip-address takes a string in the standard dotted IP address notation a.b.c.d and returns the corresponding integer IP address.

The function string-ip-address takes a string and tries to parse as an IP address. If ip-address-string is in a proper dotted IP address format, it returns an integer representing an IPv4 address. Otherwise it tries to read it as an IPv6 address using parse-ipv6-address (with trim-whitespace-p nil), which returns an ipv6-address object if it is successful or nil if it fails.

See also

ip-address-string
parse-ipv6-address


LispWorks User Guide and Reference Manual - 20 Sep 2017

NextPrevUpTopContentsIndex