The function parse-ipv6-address
parses its argument string as an IPv6 address if possible, otherwise it returns nil
.
start and end specify the subsequence of string to parse. The default value of start is 0. The default value of end is nil
, meaning the length of string.
trim-whitespace is a boolean specifying that leading and trailing whitespace characters may be ignored. Note that the address itself must not contain any whitespace. The default value of trim-whitespace is t
.
The address has to be in either standard IPv6 address notation, or dotted-quad notation. It can have the standard simplifications.
In addition, the address may be followed by a '%' character and a scope ID. If the scope ID is a string of decimal characters, it is read as a decimal number, otherwise it is taken as-is. The address may also be followed by a '/' and a prefix length in decimal format. The result ipv6-address object remembers the prefix length and prints it when the object is printed, but it does not affect the address otherwise.
If the syntax of the string string is correct, parse-ipv6-address
constructs the ipv6-address object and returns it. It does not perform any address resolution.
LispWorks User Guide and Reference Manual - 13 Feb 2015