Import: sockaddr
The sockaddr import makes working with IP addresses easy.
sockaddr.is_contained(outer, inner)
The is_contained function returns true if inner
is an address that
is contained within outer
.
sockaddr.is_equal(addr1, addr2)
The is_equal function returns true if addr1 is equal to addr2.
sockaddr.is_ipv4(addr)
The is_ipv4 function returns true if addr is an IPv4 address.
sockaddr.is_ipv6(addr)
The is_ipv6 function returns true if addr is an IPv6 address.