diff options
author | Asbjørn Sloth Tønnesen <ast@2e8.dk> | 2019-07-18 21:35:10 +0000 |
---|---|---|
committer | Asbjørn Sloth Tønnesen <ast@2e8.dk> | 2019-07-18 21:35:10 +0000 |
commit | cfec9c2570b9f185447025a17c735f44a7b9f525 (patch) | |
tree | d6ec96013caada6cc3803080a210400fa07084bf /README.rst | |
parent | 0667077147ea9da13811bf99bd6b960e847af15e (diff) | |
download | lua-inet-cfec9c2570b9f185447025a17c735f44a7b9f525.tar.gz lua-inet-cfec9c2570b9f185447025a17c735f44a7b9f525.tar.xz lua-inet-cfec9c2570b9f185447025a17c735f44a7b9f525.zip |
add inet6:netmask()
Signed-off-by: Asbjørn Sloth Tønnesen <ast@2e8.dk>
Diffstat (limited to 'README.rst')
-rw-r--r-- | README.rst | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -79,7 +79,7 @@ Operator Description ``tostring(net)`` convert to network ``:ipstring()`` ip as string without prefix ``:cidrstring()`` format CIDR notation -``:netmask()`` generate netmask as address +``:netmask()`` generate netmask as an address ``:flip()`` flip the least significant network bit ================= ====================================== @@ -234,6 +234,10 @@ Build an IP address mask with the netmask of ``foo``. :: inet('192.0.2.0/24'):netmask() -- returns inet('255.255.255.0') + inet('2001:db8::/52'):netmask() -- returns inet('ffff:ffff:ffff:f000::') + inet('2001:db8::/56'):netmask() -- returns inet('ffff:ffff:ffff:ff00::') + inet('2001:db8::/64'):netmask() -- returns inet('ffff:ffff:ffff:ffff::') + ``foo:flip()`` ~~~~~~~~~~~~~~ |