diff options
author | Asbjørn Sloth Tønnesen <ast@2e8.dk> | 2020-02-17 18:46:33 +0000 |
---|---|---|
committer | Asbjørn Sloth Tønnesen <ast@2e8.dk> | 2020-02-17 18:46:33 +0000 |
commit | 1df3b14bdfd26470c007b8443979cd20df0ea649 (patch) | |
tree | 382d85df8ca27f94ab226ef0ad683307e1dbd10a /README.rst | |
parent | 46676a465037c20b761b02d716fe30fdfd0a3f14 (diff) | |
download | lua-inet-1df3b14bdfd26470c007b8443979cd20df0ea649.tar.gz lua-inet-1df3b14bdfd26470c007b8443979cd20df0ea649.tar.xz lua-inet-1df3b14bdfd26470c007b8443979cd20df0ea649.zip |
document :family()
Signed-off-by: Asbjørn Sloth Tønnesen <ast@2e8.dk>
Diffstat (limited to 'README.rst')
-rw-r--r-- | README.rst | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -84,6 +84,7 @@ Operator Description ``:flip()`` flip the least significant network bit ``:bits()`` return the address bits in a table ``:subnets()`` return the amount of /n subnets +``:family()`` return the address family (number) ================= ====================================== @@ -416,6 +417,13 @@ Valid values for ``n`` are ``1``, ``2``, ``4``, ``8``, ``16`` or ``32``. inet('2001:db8::/48'):subnets(64) -- returns 65536 inet('2001:db8::/64'):subnets(56) -- returns 0.00390625 +``foo:family(n)`` +~~~~~~~~~~~~~~~~~ + +:: + + inet('192.0.2.0/24'):family() -- returns 4 + inet('2001:db8::/64'):family() -- returns 6 Sets ---- |