ad5143c2fba60897533ea2964b12c9a1768f4bf4
[project/luci.git] / applications / luci-olsr / luasrc / model / cbi / olsr / olsrdhna.lua
1 --[[
2 LuCI - Lua Configuration Interface
3
4 Copyright 2008 Steven Barth <steven@midlink.org>
5
6 Licensed under the Apache License, Version 2.0 (the "License");
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
9
10         http://www.apache.org/licenses/LICENSE-2.0
11
12 $Id$
13 ]]--
14
15 mh = Map("olsrd", translate("OLSR - HNA-Announcements"))
16
17
18 hna4 = mh:section(TypedSection, "Hna4", translate("Hna4"), translate("Both values must use the dotted decimal notation."))
19 hna4.addremove = true
20 hna4.anonymous = true
21 hna4.template  = "cbi/tblsection"
22
23 net4 = hna4:option(Value, "netaddr", translate("Network address"))
24 net4.datatype = "ip4addr"
25 net4.placeholder = "15.15.0.0"
26 msk4 = hna4:option(Value, "netmask", translate("Netmask"))
27 msk4.datatype = "ip4addr"
28 msk4.placeholder = "255.255.255.0"
29
30 hna6 = mh:section(TypedSection, "Hna6", translate("Hna6"), translate("IPv6 network must be given in full notation, " ..
31         "prefix must be in CIDR notation."))
32 hna6.addremove = true
33 hna6.anonymous = true
34 hna6.template  = "cbi/tblsection"
35
36 net6 = hna6:option(Value, "netaddr", translate("Network address"))
37 net6.datatype = "ip6addr"
38 net6.placeholder = "fec0:2200:106:0:0:0:0:0"
39 msk6 = hna6:option(Value, "prefix", translate("Prefix"))
40 msk6.datatype = "range(0,128)"
41 msk6.placeholder = "48"
42
43
44 return mh