luci-lib-ip: fix documentation issue
authorJo-Philipp Wich <jow@openwrt.org>
Tue, 1 Sep 2015 14:49:19 +0000 (16:49 +0200)
committerJo-Philipp Wich <jow@openwrt.org>
Tue, 1 Sep 2015 14:49:19 +0000 (16:49 +0200)
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
documentation/api/modules/luci.ip.html
libs/luci-lib-ip/src/ip.luadoc

index 4dece031ea8a8ff31176e50e61ca49708ec84867..549a55307e7f09ab2bdbd368b9a9528056290d6b 100644 (file)
@@ -370,10 +370,10 @@ Overrides mask embedded in the first argument if specified. (optional)
 
 
 <h3>Usage:</h3>
-<pre>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</pre>
+<pre>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</pre>
 
 
 
@@ -425,10 +425,10 @@ Overrides mask embedded in the first argument if specified. (optional)
 
 
 <h3>Usage:</h3>
-<pre>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</pre>
+<pre>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</pre>
 
 
 
index 00738832c4f8fb34fe1bf28f2d93adb27eac8129..e32ae72f40b1a88573efbd88d812da2da4bf6946 100644 (file)
@@ -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
 ]]