Module:IP/doc: Difference between revisions

From the Croc Wiki, the Croc encyclopedia
Jump to navigationJump to search
add IPv6Collection
(add addFromString)
(add IPv6Collection)
Line 497:
collection:overlapsSubnet('1.2.3.0/24') -- true, IPAddress.new('1.2.3.4')
collection:overlapsSubnet('1.2.4.0/24') -- false
</source>
 
== IPv6Collection ==
 
The IPv6Collection class is used to work with several different IPv6 addresses and IPv6 subnets. IPv6Collection objects are directly analagous to [[#IPv4Collection|IPv4Collection]] objects: they contain the same methods and work the same way, but all IP addresses and subnets added to it must be IPv6, not IPv4.
 
To create a new IPv6Collection object:
 
<source lang="lua">
local collection = IPv6Collection.new()
</source>
 
Cookies help us deliver our services. By using our services, you agree to our use of cookies.

Navigation menu