From: Jo-Philipp Wich Date: Tue, 1 Sep 2015 14:49:19 +0000 (+0200) Subject: luci-lib-ip: fix documentation issue X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=daeb2016d6b89d431f9e2ddb51384131c86ab6b6;p=project%2Fluci.git luci-lib-ip: fix documentation issue Signed-off-by: Jo-Philipp Wich --- diff --git a/documentation/api/modules/luci.ip.html b/documentation/api/modules/luci.ip.html index 4dece031ea..549a55307e 100644 --- a/documentation/api/modules/luci.ip.html +++ b/documentation/api/modules/luci.ip.html @@ -370,10 +370,10 @@ Overrides mask embedded in the first argument if specified. (optional)

Usage:

-
addr = luci.ip.new("10.24.0.1/24") 
-addr = luci.ip.new("10.24.0.1/255.255.255.0") 
-addr = luci.ip.new("10.24.0.1", "255.255.255.0")        -- separate netmask 
-addr = luci.ip.new("10.24.0.1/24", 16)                  -- override netmask
+
addr = luci.ip.IPv4("10.24.0.1/24") 
+addr = luci.ip.IPv4("10.24.0.1/255.255.255.0") 
+addr = luci.ip.IPv4("10.24.0.1", "255.255.255.0")        -- separate netmask 
+addr = luci.ip.IPv4("10.24.0.1/24", 16)                  -- override netmask
@@ -425,10 +425,10 @@ Overrides mask embedded in the first argument if specified. (optional)

Usage:

-
addr6 = luci.ip.new("fe80::221:63ff:fe75:aa17/64") 
-addr6 = luci.ip.new("fe80::221:63ff:fe75:aa17/ffff:ffff:ffff:ffff::") 
-addr6 = luci.ip.new("fe80::221:63ff:fe75:aa17", "ffff:ffff:ffff:ffff::") 
-addr6 = luci.ip.new("fe80::221:63ff:fe75:aa17/64", 128) -- override netmask
+
addr6 = luci.ip.IPv6("fe80::221:63ff:fe75:aa17/64") 
+addr6 = luci.ip.IPv6("fe80::221:63ff:fe75:aa17/ffff:ffff:ffff:ffff::") 
+addr6 = luci.ip.IPv6("fe80::221:63ff:fe75:aa17", "ffff:ffff:ffff:ffff::") 
+addr6 = luci.ip.IPv6("fe80::221:63ff:fe75:aa17/64", 128) -- override netmask
diff --git a/libs/luci-lib-ip/src/ip.luadoc b/libs/luci-lib-ip/src/ip.luadoc index 00738832c4..e32ae72f40 100644 --- a/libs/luci-lib-ip/src/ip.luadoc +++ b/libs/luci-lib-ip/src/ip.luadoc @@ -42,10 +42,10 @@ if the given optional netmask is of a different family. containing a prefix size between `0` and `32` bit. Overrides mask embedded in the first argument if specified. (optional) @return A `luci.ip.cidr` object representing the given IPv4 range. -@usage `addr = luci.ip.new("10.24.0.1/24") -addr = luci.ip.new("10.24.0.1/255.255.255.0") -addr = luci.ip.new("10.24.0.1", "255.255.255.0") -- separate netmask -addr = luci.ip.new("10.24.0.1/24", 16) -- override netmask` +@usage `addr = luci.ip.IPv4("10.24.0.1/24") +addr = luci.ip.IPv4("10.24.0.1/255.255.255.0") +addr = luci.ip.IPv4("10.24.0.1", "255.255.255.0") -- separate netmask +addr = luci.ip.IPv4("10.24.0.1/24", 16) -- override netmask` @see IPv6 ]] @@ -62,10 +62,10 @@ if the given optional netmask is of a different family. containing a prefix size between `0` and `128` bit. Overrides mask embedded in the first argument if specified. (optional) @return A `luci.ip.cidr` object representing the given IPv6 range. -@usage `addr6 = luci.ip.new("fe80::221:63ff:fe75:aa17/64") -addr6 = luci.ip.new("fe80::221:63ff:fe75:aa17/ffff:ffff:ffff:ffff::") -addr6 = luci.ip.new("fe80::221:63ff:fe75:aa17", "ffff:ffff:ffff:ffff::") -addr6 = luci.ip.new("fe80::221:63ff:fe75:aa17/64", 128) -- override netmask` +@usage `addr6 = luci.ip.IPv6("fe80::221:63ff:fe75:aa17/64") +addr6 = luci.ip.IPv6("fe80::221:63ff:fe75:aa17/ffff:ffff:ffff:ffff::") +addr6 = luci.ip.IPv6("fe80::221:63ff:fe75:aa17", "ffff:ffff:ffff:ffff::") +addr6 = luci.ip.IPv6("fe80::221:63ff:fe75:aa17/64", 128) -- override netmask` @see IPv4 ]]