[luci] Use of luci.ip.cidr ?

Ken Bantoft kbantoft at satcomdirect.com
Mon Jan 20 20:23:24 CET 2014


Hi List,

I¹m trying to figure out how to use the luci.ip.cidr object.  I¹ve looked
through the LuCI source, and the only references seem to be within the
ip.lua library itself.  Other modules seem to take their own approaches
(olsr and meshwizard )

What I¹m trying to do it simply increment an IP address by 1, which I
thought should be something likeŠ


local ipc = require "luci.ip"


local myip = ipc.IPv4(³192.168.0.0/24²)
myip.cidr:add(1)


However that just fails with attempt to index field 'cidr' (a nil value).
Can someone point me in the syntactically correct direction?

Thanks, 

Ken





More information about the luci mailing list