NAME

Net::SockAddr::Inet6 - IPv6 sockaddr

SYNOPSIS & DESCRIPTION

See Net::SockAddr

METHODS

new($ip, $port, [$scope_id], [$flowinfo]) [CLASS METHOD]

Creates object from ip in human-readable form and port. Dies if $ip is not a valid IPv6 address. Optionally receives IPv6 scope id (unsigned integer) and flowinfo (unsigned integer).

Supports ip addresses in form address%scope_id, for example '::1%eth0', in which case it is used and argument $scope_id is ignored. On Windows, scope id after '%' must be a number. On other systems it can be an interface name and translated via if_nametoindex().

from_addr($addr, $port, [$scope_id], [$flowinfo]) [FUNCTION]

Creates object from binary IPv6 address (16-byte string) and port. Optionally receives IPv6 scope id (unsigned integer) and flowinfo (unsigned integer).

ip()

Returns ip in human-readable form

port()

Returns port

addr()

Returns ip in binary form (16-byte string)

scope_id()

Returns IPv6 scope id (if any) or 0

flowinfo()

Returns IPv6 flow info (if any) or 0

AUTHOR

Pronin Oleg <syber@crazypanda.ru>

Crazy Panda LTD

LICENSE

You may distribute this code under the same terms as Perl itself.