summaryrefslogtreecommitdiffstats
path: root/aconf/model/net.lua
diff options
context:
space:
mode:
Diffstat (limited to 'aconf/model/net.lua')
-rw-r--r--aconf/model/net.lua15
1 files changed, 15 insertions, 0 deletions
diff --git a/aconf/model/net.lua b/aconf/model/net.lua
index 40ddd36..57eb3ea 100644
--- a/aconf/model/net.lua
+++ b/aconf/model/net.lua
@@ -74,6 +74,14 @@ function BaseIPAddress:encode(context, value)
end
+--- IPv4 address field, inherits @{String}.
+-- @fclass net.IPv4Address
+-- @tparam boolean cidr if set to true, the field accepts a network
+-- address in CIDR notation
+-- @tparam string mask_addr if set, the network address is decomposed
+-- into address and netmask in the back-end. This parameter specifies
+-- the back-end address where the netmask is stored in dotted-quad
+-- format.
M.IPv4Address = class(BaseIPAddress)
function M.IPv4Address:init(params)
@@ -122,6 +130,13 @@ function M.IPv4Address:cidr2mask(cidr)
end
+--- IPv6 address field, inherits @{String}.
+-- @fclass net.IPv6Address
+-- @tparam boolean cidr if set to true, the field accepts a network
+-- address
+-- @tparam string mask_addr if set, the network address is decomposed
+-- into address and netmask parts in the back-end. This parameter
+-- specifies the back-end address where the netmask length is stored.
M.IPv6Address = class(BaseIPAddress)
function M.IPv6Address:init(params)