diff --git a/bmx6/Makefile b/bmx6/Makefile
index 689fa6f..bdcdbbf 100644
--- a/bmx6/Makefile
+++ b/bmx6/Makefile
@@ -1,39 +1,24 @@
-# Copyright (C) 2011 Fundacio Privada per a la Xarxa Oberta, Lliure i Neutral guifi.net
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
+# Copyright (C) 2011 OpenWrt.org, bmx6.net
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# The full GNU General Public License is included in this distribution in
-# the file called "COPYING".
-#
-# Contibutors:
-# Axel Neumann, Simó Albert i Beltran, Pau Escrich
-#
-
+# $Id$
include $(TOPDIR)/rules.mk
PKG_NAME:=bmx6
+
PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=git://git.bmx6.net/bmx6.git
+PKG_REV:=c3ef7d76292a765c5e578bd4113030dc34ee3b9a
-PKG_SOURCE_URL:=git://bmx6.net/bmx6.git
-#PKG_SOURCE_URL:=git://github.com/axn/bmx6.git
+PKG_VERSION:=r2011031602
-PKG_REV:=c0076183ce28fe15285c8faa51920e74633776fe
-PKG_VERSION:=r2013041901
-PKG_RELEASE:=4
+#PKG_RELEASE:=1
+#PKG_INSTALL:=1 # this tries to install straight to /usr/sbin/bmx6
PKG_SOURCE_VERSION:=$(PKG_REV)
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
@@ -45,15 +30,18 @@ include $(INCLUDE_DIR)/package.mk
TARGET_CFLAGS += $(FPIC)
+#-DNO_TRAFFIC_DUMP -DNO_DYN_PLUGIN -DNO_DEBUG_DUMP -DNO_DEBUG_ALL -DNO_DEBUG_TRACK -DNO_DEBUG_SYS
+
MAKE_ARGS += \
EXTRA_CFLAGS="$(TARGET_CFLAGS) -I. -I$(STAGING_DIR)/usr/include -DNO_DEBUG_ALL -DNO_DEBUG_DUMP" \
EXTRA_LDFLAGS="-L$(STAGING_DIR)/usr/lib " \
REVISION_VERSION="$(PKG_REV)" \
CC="$(TARGET_CC)" \
INSTALL_DIR="$(PKG_INSTALL_DIR)" \
- STRIP="/bin/false" \
+ STRIP="/bin/true" \
build_all
+
define Package/bmx6/Default
SECTION:=net
CATEGORY:=Network
@@ -61,11 +49,10 @@ define Package/bmx6/Default
TITLE:=BMX6 layer 3 routing daemon
URL:=http://bmx6.net/
MAINTAINER:=Axel Neumann
- DEPENDS:=+kmod-ip6-tunnel +kmod-iptunnel6
endef
define Package/bmx6/description
-BMX6 layer 3 routing daemon supporting IPv4, IPv6, and IPv4 over IPv6
+BMX6 layer 3 routing daemon supporting IPv4, IPv6, and IPv4 over IPv6 - http://www.bmx6.net
endef
define Package/bmx6
@@ -80,23 +67,7 @@ define Package/bmx6-uci-config
endef
-define Package/bmx6-json
- $(call Package/bmx6/Default)
- DEPENDS:=bmx6 +libjson
- TITLE:=json plugin based on jsonc
-endef
-define Package/bmx6-sms
- $(call Package/bmx6/Default)
- DEPENDS:=bmx6
- TITLE:=sms plugin
-endef
-
-define Package/bmx6-quagga
- $(call Package/bmx6/Default)
- DEPENDS:=bmx6 +qmp-quagga @BROKEN
- TITLE:=bmx6 quagga plugin to redistribute/export routes (needs manet/bmx6 patched quagga 0.99.21)
-endef
define Build/Configure
mkdir -p $(PKG_INSTALL_DIR)
@@ -125,24 +96,7 @@ define Package/bmx6-uci-config/install
$(INSTALL_DATA) ./files/etc/config/bmx6 $(1)/etc/config/bmx6
endef
-define Package/bmx6-json/install
- $(INSTALL_DIR) $(1)/usr/lib
- $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/bmx6_json/bmx6_json.so $(1)/usr/lib/bmx6_json.so
-endef
-
-define Package/bmx6-sms/install
- $(INSTALL_DIR) $(1)/usr/lib
- $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/bmx6_sms/bmx6_sms.so $(1)/usr/lib/bmx6_sms.so
-endef
-
-define Package/bmx6-quagga/install
- $(INSTALL_DIR) $(1)/usr/lib
- $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/bmx6_quagga/bmx6_quagga.so $(1)/usr/lib/bmx6_quagga.so
-endef
$(eval $(call BuildPackage,bmx6))
$(eval $(call BuildPackage,bmx6-uci-config))
-$(eval $(call BuildPackage,bmx6-json))
-$(eval $(call BuildPackage,bmx6-sms))
-$(eval $(call BuildPackage,bmx6-quagga))
diff --git a/bmx6/files/etc/config/bmx6 b/bmx6/files/etc/config/bmx6
index 884fd12..d593e74 100644
--- a/bmx6/files/etc/config/bmx6
+++ b/bmx6/files/etc/config/bmx6
@@ -1,32 +1,12 @@
-
-# for more information:
-# http://bmx6.net/projects/bmx6/wiki
-# options execute: bmx6 --help
+# for more options execute: bmx6 --help
config 'bmx6' 'general'
-# option 'runtimeDir' '/var/run/bmx6'
-# option 'tun4Address' '10.202.0.116/32'
-# option 'tun4Address' '10.254.10.0/32'
-# option 'tun6Address' '2012:0:0:1000::1/64'
-
-#config 'ipVersion' 'ipVersion'
-# option 'ipVersion' '6' # default is 4
-# option 'throwRules' '0'
-
-
-#config 'plugin'
-# option 'plugin' 'bmx6_config.so'
-
-
-
-#config 'plugin'
-# option 'plugin' 'bmx6_json.so'
-
-
-
-#config 'plugin'
-# option 'plugin' 'bmx6_sms.so'
+# option 'runtime_dir' '/var/run/bmx6'
+# option 'niit_source' '10.202.0.116'
+#config 'ip_version' 'ip_version'
+# option 'ip_version' '6' # default is 4
+# option 'throw_rules' '0'
config 'dev' 'mesh_1'
option 'dev' 'eth0.12'
@@ -34,49 +14,10 @@ config 'dev' 'mesh_1'
config 'dev' 'mesh_2'
option 'dev' 'ath0.12'
-
-
-#config 'hna' 'my_global_prefix'
-# option 'hna' '2012:0:0:74:0:0:0:0/64'
-
-
-#config 'tunOut'
-# option 'tunOut' 'ip6'
-# option 'network' '2012::/16'
-# option 'exportDistance' '0'
-
-#config 'tunOut'
-# option 'tunOut' 'ip4'
-# option 'network' '10.254.0.0/16'
-# option 'exportDistance' '0' # requires quagga plugin !
-# option 'minPrefixLen' '27'
-
-
-
-#config 'plugin'
-# option 'plugin' 'bmx6_quagga.so'
-
-
-
-#config 'redistribute'
-# option 'redistribute' 'ospf6'
-# option 'network' '10.0.0.0/8'
-# option 'minPrefixLen' '10'
-# option 'bandwidth' '10000000'
-# option 'ospf6' '1'
-# option 'aggregatePrefixLen' '16'
-
-#config 'redistribute'
-# option 'redistribute' 'bgp'
-# option 'network' '0.0.0.0/0'
-# option 'minPrefixLen' '0'
-# option 'maxPrefixLen' '24'
-# option 'bandwidth' '10000000'
-# option 'bgp' '1'
-# option 'aggregatePrefixLen' '8'
-
-
-
-
+#config 'unicast_hna' 'my_global_prefix'
+# option 'unicast_hna' '2012:0:0:74:0:0:0:0/64'
+
+#config 'unicast_hna' 'niit6to4'
+# option 'unicast_hna' '0:0:0:0:0:ffff:10.202.0.116/128'
diff --git a/bmx6/files/etc/init.d/bmx6 b/bmx6/files/etc/init.d/bmx6
index 4926e2b..c584718 100644
--- a/bmx6/files/etc/init.d/bmx6
+++ b/bmx6/files/etc/init.d/bmx6
@@ -1,23 +1,4 @@
#!/bin/sh /etc/rc.common
-# Copyright (C) 2011 Fundacio Privada per a la Xarxa Oberta, Lliure i Neutral guifi.net
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# The full GNU General Public License is included in this distribution in
-# the file called "COPYING".
-
START=91
BIN=/usr/sbin/bmx6
@@ -26,9 +7,8 @@ PID=/var/run/bmx6/pid
start() {
- cd /root/
- ulimit -c 20000
- $BIN -f $CONF -d0 > /dev/null &
+ #$BIN -f $CONF -d0 > /dev/null &
+ start-stop-daemon -b -x $BIN -S -- -f $CONF
}
stop() {
diff --git a/luci-app-bmx6/COPYING b/luci-app-bmx6/COPYING
deleted file mode 100644
index d511905..0000000
--- a/luci-app-bmx6/COPYING
+++ /dev/null
@@ -1,339 +0,0 @@
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users. This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it. (Some other Free Software Foundation software is covered by
-the GNU Lesser General Public License instead.) You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have. You must make sure that they, too, receive or can get the
-source code. And you must show them these terms so they know their
-rights.
-
- We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
- Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- GNU GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License. The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language. (Hereinafter, translation is included without limitation in
-the term "modification".) Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
- 1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
- 2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) You must cause the modified files to carry prominent notices
- stating that you changed the files and the date of any change.
-
- b) You must cause any work that you distribute or publish, that in
- whole or in part contains or is derived from the Program or any
- part thereof, to be licensed as a whole at no charge to all third
- parties under the terms of this License.
-
- c) If the modified program normally reads commands interactively
- when run, you must cause it, when started running for such
- interactive use in the most ordinary way, to print or display an
- announcement including an appropriate copyright notice and a
- notice that there is no warranty (or else, saying that you provide
- a warranty) and that users may redistribute the program under
- these conditions, and telling the user how to view a copy of this
- License. (Exception: if the Program itself is interactive but
- does not normally print such an announcement, your work based on
- the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
- a) Accompany it with the complete corresponding machine-readable
- source code, which must be distributed under the terms of Sections
- 1 and 2 above on a medium customarily used for software interchange; or,
-
- b) Accompany it with a written offer, valid for at least three
- years, to give any third party, for a charge no more than your
- cost of physically performing source distribution, a complete
- machine-readable copy of the corresponding source code, to be
- distributed under the terms of Sections 1 and 2 above on a medium
- customarily used for software interchange; or,
-
- c) Accompany it with the information you received as to the offer
- to distribute corresponding source code. (This alternative is
- allowed only for noncommercial distribution and only if you
- received the program in object code or executable form with such
- an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable. However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License. Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
- 5. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Program or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
- 6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
- 7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all. For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded. In such case, this License incorporates
-the limitation as if written in the body of this License.
-
- 9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation. If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
- 10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission. For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this. Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
- NO WARRANTY
-
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
-
- Copyright (C)
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
- Gnomovision version 69, Copyright (C) year name of author
- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the program
- `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
- , 1 April 1989
- Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs. If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library. If this is what you want to do, use the GNU Lesser General
-Public License instead of this License.
diff --git a/luci-app-bmx6/Makefile b/luci-app-bmx6/Makefile
deleted file mode 100644
index 4e8ce1b..0000000
--- a/luci-app-bmx6/Makefile
+++ /dev/null
@@ -1,61 +0,0 @@
-# Copyright (C) 2011 Pau Escrich
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# The full GNU General Public License is included in this distribution in
-# the file called "COPYING".
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=luci-app-bmx6
-PKG_RELEASE:=2
-
-PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
-
-include $(INCLUDE_DIR)/package.mk
-
-define Package/luci-app-bmx6
- SECTION:=luci
- CATEGORY:=LuCI
- SUBMENU:=3. Applications
- TITLE:= bmx6 configuration, status and visualization module
- DEPENDS:=+luci-lib-json +luci-mod-admin-core +luci-lib-httpclient +bmx6
- MAINTAINER:= Pau Escrich
-endef
-
-define Package/luci-app-bmx6/description
- bmx6 web module for LuCi web interface
-endef
-
-define Package/luci-app-bmx6/conffiles
- /etc/config/luci-bmx6
-endef
-
-define Build/Prepare
-endef
-
-define Build/Configure
-endef
-
-define Build/Compile
-endef
-
-define Package/luci-app-bmx6/install
- $(CP) ./files/* $(1)/
- chmod 755 $(1)/www/cgi-bin/bmx6-info
-endef
-
-$(eval $(call BuildPackage,luci-app-bmx6))
-
diff --git a/luci-app-bmx6/files/etc/config/luci-bmx6 b/luci-app-bmx6/files/etc/config/luci-bmx6
deleted file mode 100644
index df1e715..0000000
--- a/luci-app-bmx6/files/etc/config/luci-bmx6
+++ /dev/null
@@ -1,7 +0,0 @@
-config 'bmx6' 'luci'
- option ignore '0'
- option place 'admin network BMX6'
- #option place 'qmp Mesh'
- option position '3'
- #option json 'http://127.0.0.1/cgi-bin/bmx6-info?'
- option json 'exec:/www/cgi-bin/bmx6-info -s'
diff --git a/luci-app-bmx6/files/usr/lib/lua/luci/controller/bmx6.lua b/luci-app-bmx6/files/usr/lib/lua/luci/controller/bmx6.lua
deleted file mode 100644
index cb5642e..0000000
--- a/luci-app-bmx6/files/usr/lib/lua/luci/controller/bmx6.lua
+++ /dev/null
@@ -1,329 +0,0 @@
---[[
- Copyright (C) 2011 Pau Escrich
- Contributors Jo-Philipp Wich
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
- The full GNU General Public License is included in this distribution in
- the file called "COPYING".
---]]
-
-local bmx6json = require("luci.model.bmx6json")
-
-module("luci.controller.bmx6", package.seeall)
-
-function index()
- local place = {}
- local ucim = require "luci.model.uci"
- local uci = ucim.cursor()
-
- -- checking if ignore is on
- if uci:get("luci-bmx6","luci","ignore") == "1" then
- return nil
- end
-
- -- getting value from uci database
- local uci_place = uci:get("luci-bmx6","luci","place")
-
- -- default values
- if uci_place == nil then
- place = {"bmx6"}
- else
- local util = require "luci.util"
- place = util.split(uci_place," ")
- end
-
- -- getting position of menu
- local uci_position = uci:get("luci-bmx6","luci","position")
-
- ---------------------------
- -- Starting with the pages
- ---------------------------
-
- --- status (default)
- entry(place,call("action_nodes_j"),place[#place],tonumber(uci_position))
-
- table.insert(place,"Status")
- entry(place,call("action_status_j"),"Status",0)
- table.remove(place)
-
- -- not visible
- table.insert(place,"nodes_nojs")
- entry(place, call("action_nodes"), nil)
- table.remove(place)
-
- --- nodes
- table.insert(place,"Nodes")
- entry(place,call("action_nodes_j"),"Nodes",1)
- table.remove(place)
-
- --- links
- table.insert(place,"Links")
- entry(place,call("action_links"),"Links",2).leaf = true
- table.remove(place)
-
- -- Tunnels
- table.insert(place,"Tunnels")
- entry(place,call("action_tunnels_j"), "Tunnels", 3).leaf = true
- table.remove(place)
-
- -- Gateways (deprecated)
- --table.insert(place,"Gateways")
- --entry(place,call("action_gateways_j"),"Gateways").leaf = true
- --table.remove(place)
-
- --- Chat
- table.insert(place,"Chat")
- entry(place,call("action_chat"),"Chat",5)
- table.remove(place)
-
- --- Graph
- table.insert(place,"Graph")
- entry(place, template("bmx6/graph"), "Graph",4)
- table.remove(place)
-
- --- Topology (hidden)
- table.insert(place,"topology")
- entry(place, call("action_topology"), nil)
- table.remove(place)
-
- --- configuration (CBI)
- table.insert(place,"Configuration")
- entry(place, cbi("bmx6/main"), "Configuration",6).dependent=false
-
- table.insert(place,"General")
- entry(place, cbi("bmx6/main"), "General",1)
- table.remove(place)
-
- table.insert(place,"Advanced")
- entry(place, cbi("bmx6/advanced"), "Advanced",5)
- table.remove(place)
-
- table.insert(place,"Interfaces")
- entry(place, cbi("bmx6/interfaces"), "Interfaces",2)
- table.remove(place)
-
- table.insert(place,"Tunnels")
- entry(place, cbi("bmx6/tunnels"), "Tunnels",3)
- table.remove(place)
-
- table.insert(place,"Plugins")
- entry(place, cbi("bmx6/plugins"), "Plugins",6)
- table.remove(place)
-
- table.insert(place,"HNAv6")
- entry(place, cbi("bmx6/hna"), "HNAv6",4)
- table.remove(place)
-
- table.remove(place)
-
-end
-
-function action_status()
- local status = bmx6json.get("status").status or nil
- local interfaces = bmx6json.get("interfaces").interfaces or nil
-
- if status == nil or interfaces == nil then
- luci.template.render("bmx6/error", {txt="Cannot fetch data from bmx6 json"})
- else
- luci.template.render("bmx6/status", {status=status,interfaces=interfaces})
- end
-end
-
-function action_status_j()
- luci.template.render("bmx6/status_j", {})
-end
-
-
-function action_nodes()
- local orig_list = bmx6json.get("originators").originators or nil
-
- if orig_list == nil then
- luci.template.render("bmx6/error", {txt="Cannot fetch data from bmx6 json"})
- return nil
- end
-
- local originators = {}
- local desc = nil
- local orig = nil
- local name = ""
- local ipv4 = ""
-
- for _,o in ipairs(orig_list) do
- orig = bmx6json.get("originators/"..o.name) or {}
- desc = bmx6json.get("descriptions/"..o.name) or {}
-
- if string.find(o.name,'.') then
- name = luci.util.split(o.name,'.')[1]
- else
- name = o.name
- end
-
- table.insert(originators,{name=name,orig=orig,desc=desc})
- end
-
- luci.template.render("bmx6/nodes", {originators=originators})
-end
-
-function action_nodes_j()
- local http = require "luci.http"
- local link_non_js = "/cgi-bin/luci" .. http.getenv("PATH_INFO") .. '/nodes_nojs'
-
- luci.template.render("bmx6/nodes_j", {link_non_js=link_non_js})
-end
-
-function action_gateways_j()
- luci.template.render("bmx6/gateways_j", {})
-end
-
-function action_tunnels_j()
- luci.template.render("bmx6/tunnels_j", {})
-end
-
-
-function action_links(host)
- local links = bmx6json.get("links", host)
- local devlinks = {}
- local _,l
-
- if links ~= nil then
- links = links.links
- for _,l in ipairs(links) do
- devlinks[l.viaDev] = {}
- end
- for _,l in ipairs(links) do
- l.globalId = luci.util.split(l.globalId,'.')[1]
- table.insert(devlinks[l.viaDev],l)
- end
- end
-
- luci.template.render("bmx6/links", {links=devlinks})
-end
-
-function action_topology()
- local originators = bmx6json.get("originators/all")
- local o,i,l,i2
- local first = true
- local topology = '[ '
- local cache = '/tmp/bmx6-topology.json'
- local offset = 60
-
- local cachefd = io.open(cache,r)
- local update = false
-
- if cachefd ~= nil then
- local lastupdate = tonumber(cachefd:read("*line")) or 0
- if os.time() >= lastupdate + offset then
- update = true
- else
- topology = cachefd:read("*all")
- end
- cachefd:close()
- end
-
- if cachefd == nil or update then
- for i,o in ipairs(originators) do
- local links = bmx6json.get("links",o.primaryIp)
- if links then
- if first then
- first = false
- else
- topology = topology .. ', '
- end
-
- topology = topology .. '{ "globalId": "%s", "links": [' %o.globalId:match("^[^%.]+")
-
- local first2 = true
-
- for i2,l in ipairs(links.links) do
- if first2 then
- first2 = false
- else
- topology = topology .. ', '
- end
-
- topology = topology .. '{ "globalId": "%s", "rxRate": %s, "txRate": %s }'
- %{ l.globalId:match("^[^%.]+"), l.rxRate, l.txRate }
-
- end
-
- topology = topology .. ']}'
- end
-
- end
-
- topology = topology .. ' ]'
-
- -- Upgrading the content of the cache file
- cachefd = io.open(cache,'w+')
- cachefd:write(os.time()..'\n')
- cachefd:write(topology)
- cachefd:close()
- end
-
- luci.http.prepare_content("application/json")
- luci.http.write(topology)
-end
-
-
-function action_chat()
- local sms_dir = "/var/run/bmx6/sms"
- local rcvd_dir = sms_dir .. "/rcvdSms"
- local send_file = sms_dir .. "/sendSms/chat"
- local sms_list = bmx6json.get("rcvdSms")
- local sender = ""
- local sms_file = ""
- local chat = {}
- local to_send = nil
- local sent = ""
- local fd = nil
-
- if luci.sys.call("test -d " .. sms_dir) ~= 0 then
- luci.template.render("bmx6/error", {txt="sms plugin disabled or some problem with directory " .. sms_dir})
- return nil
- end
-
- sms_list = luci.util.split(luci.util.exec("ls "..rcvd_dir.."/*:chat"))
-
- for _,sms_path in ipairs(sms_list) do
- if #sms_path > #rcvd_dir then
- sms_file = luci.util.split(sms_path,'/')
- sms_file = sms_file[#sms_file]
- sender = luci.util.split(sms_file,':')[1]
-
- -- Trying to clean the name
- if string.find(sender,".") ~= nil then
- sender = luci.util.split(sender,".")[1]
- end
-
- fd = io.open(sms_path,"r")
- chat[sender] = fd:read()
- fd:close()
- end
- end
-
- to_send = luci.http.formvalue("toSend")
- if to_send ~= nil and #to_send > 1 then
- fd = io.open(send_file,"w")
- fd:write(to_send)
- fd:close()
- sent = to_send
- else
- sent = luci.util.exec("cat "..send_file)
- end
-
- luci.template.render("bmx6/chat", {chat=chat,sent=sent})
-end
-
diff --git a/luci-app-bmx6/files/usr/lib/lua/luci/model/bmx6json.lua b/luci-app-bmx6/files/usr/lib/lua/luci/model/bmx6json.lua
deleted file mode 100644
index dfe9ab1..0000000
--- a/luci-app-bmx6/files/usr/lib/lua/luci/model/bmx6json.lua
+++ /dev/null
@@ -1,219 +0,0 @@
---[[
- Copyright (C) 2011 Pau Escrich
- Contributors Jo-Philipp Wich
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
- The full GNU General Public License is included in this distribution in
- the file called "COPYING".
---]]
-
-local ltn12 = require("luci.ltn12")
-local json = require("luci.json")
-local util = require("luci.util")
-local uci = require("luci.model.uci")
-local sys = require("luci.sys")
-local template = require("luci.template")
-local http = require("luci.http")
-local string = require("string")
-local table = require("table")
-local nixio = require("nixio")
-local nixiofs = require("nixio.fs")
-local ipairs = ipairs
-
-module "luci.model.bmx6json"
-
--- Returns a LUA object from bmx6 JSON daemon
-
-function get(field, host)
- local url
- if host ~= nil then
- if host:match(":") then
- url = 'http://[%s]/cgi-bin/bmx6-info?' % host
- else
- url = 'http://%s/cgi-bin/bmx6-info?' % host
- end
- else
- url = uci.cursor():get("luci-bmx6","luci","json")
- end
-
- if url == nil then
- print_error("bmx6 json url not configured, cannot fetch bmx6 daemon data",true)
- return nil
- end
-
- local json_url = util.split(url,":")
- local raw = ""
-
- if json_url[1] == "http" then
- raw,err = wget(url..field,1000)
- else
-
- if json_url[1] == "exec" then
- raw = sys.exec(json_url[2]..' '..field)
- else
- print_error("bmx6 json url not recognized, cannot fetch bmx6 daemon data. Use http: or exec:",true)
- return nil
- end
-
- end
-
- local data = nil
-
- if raw and raw:len() > 10 then
- local decoder = json.Decoder()
- ltn12.pump.all(ltn12.source.string(raw), decoder:sink())
- data = decoder:get()
--- else
--- print_error("Cannot get data from bmx6 daemon",true)
--- return nil
- end
-
- return data
-end
-
-function print_error(txt,popup)
- util.perror(txt)
- sys.call("logger -t bmx6json " .. txt)
-
- if popup then
- http.write('')
- else
- http.write("
')
- end
-
-end
-
-function text2html(txt)
- txt = string.gsub(txt,"<","{")
- txt = string.gsub(txt,">","}")
- txt = util.striptags(txt)
- return txt
-end
-
-
-function wget(url, timeout)
- local rfd, wfd = nixio.pipe()
- local pid = nixio.fork()
- if pid == 0 then
- rfd:close()
- nixio.dup(wfd, nixio.stdout)
-
- local candidates = { "/usr/bin/wget", "/bin/wget" }
- local _, bin
- for _, bin in ipairs(candidates) do
- if nixiofs.access(bin, "x") then
- nixio.exec(bin, "-q", "-O", "-", url)
- end
- end
- return
- else
- wfd:close()
- rfd:setblocking(false)
-
- local buffer = { }
- local err1, err2
-
- while true do
- local ready = nixio.poll({{ fd = rfd, events = nixio.poll_flags("in") }}, timeout)
- if not ready then
- nixio.kill(pid, nixio.const.SIGKILL)
- err1 = "timeout"
- break
- end
-
- local rv = rfd:read(4096)
- if rv then
- -- eof
- if #rv == 0 then
- break
- end
-
- buffer[#buffer+1] = rv
- else
- -- error
- if nixio.errno() ~= nixio.const.EAGAIN and
- nixio.errno() ~= nixio.const.EWOULDBLOCK then
- err1 = "error"
- err2 = nixio.errno()
- end
- end
- end
-
- nixio.waitpid(pid, "nohang")
- if not err1 then
- return table.concat(buffer)
- else
- return nil, err1, err2
- end
- end
-end
-
-function getOptions(name)
- -- Getting json and Checking if bmx6-json is avaiable
- local options = get("options")
- if options == nil or options.OPTIONS == nil then
- m.message = "bmx6-json plugin is not running or some mistake in luci-bmx6 configuration, check /etc/config/luci-bmx6"
- return nil
- else
- options = options.OPTIONS
- end
-
- -- Filtering by the option name
- local i,_
- local namedopt = nil
- if name ~= nil then
- for _,i in ipairs(options) do
- if i.name == name and i.CHILD_OPTIONS ~= nil then
- namedopt = i.CHILD_OPTIONS
- break
- end
- end
- end
-
- return namedopt
-end
-
--- Rturns a help string formated to be used in HTML scope
-function getHtmlHelp(opt)
- if opt == nil then return nil end
-
- local help = ""
- if opt.help ~= nil then
- help = text2html(opt.help)
- end
- if opt.syntax ~= nil then
- help = help .. " Syntax: " .. text2html(opt.syntax)
- end
-
- return help
-end
-
-function testandreload()
- local test = sys.call('bmx6 -c --test > /tmp/bmx6-luci.err.tmp')
- if test ~= 0 then
- return sys.exec("cat /tmp/bmx6-luci.err.tmp")
- end
-
- local err = sys.call('bmx6 -c --configReload > /tmp/bmx6-luci.err.tmp')
- if err ~= 0 then
- return sys.exec("cat /tmp/bmx6-luci.err.tmp")
- end
-
- return nil
-end
-
diff --git a/luci-app-bmx6/files/usr/lib/lua/luci/model/cbi/bmx6/advanced.lua b/luci-app-bmx6/files/usr/lib/lua/luci/model/cbi/bmx6/advanced.lua
deleted file mode 100644
index 9510214..0000000
--- a/luci-app-bmx6/files/usr/lib/lua/luci/model/cbi/bmx6/advanced.lua
+++ /dev/null
@@ -1,74 +0,0 @@
---[[
- Copyright (C) 2011 Pau Escrich
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
- The full GNU General Public License is included in this distribution in
- the file called "COPYING".
---]]
-
-m = Map("bmx6", "bmx6")
-
-local bmx6json = require("luci.model.bmx6json")
-local util = require("luci.util")
-local http = require("luci.http")
-local sys = require("luci.sys")
-
-local options = bmx6json.get("options")
-if options == nil or options.OPTIONS == nil then
- m.message = "bmx6-json plugin is not running or some mistake in luci-bmx6 configuration, check /etc/config/luci-bmx6"
- options = {}
-else
- options = options.OPTIONS
-end
-
-local general = m:section(NamedSection,"general","general","General Options")
-
-local name = ""
-local help = ""
-local value = nil
-local _,o
-
-for _,o in ipairs(options) do
- if o.name ~= nil and o.CHILD_OPTIONS == nil and o.configurable == 1 then
- help = ""
- name = o.name
-
- if o.help ~= nil then
- help = bmx6json.text2html(o.help)
- end
-
- if o.syntax ~= nil then
- help = help .. " Syntax: " .. bmx6json.text2html(o.syntax)
- end
-
- if o.def ~= nil then
- help = help .. " Default: " .. o.def
- end
-
- value = general:option(Value,name,name,help)
-
- end
-end
-
-function m.on_commit(self,map)
- local err = sys.call('bmx6 -c --configReload > /tmp/bmx6-luci.err.tmp')
- if err ~= 0 then
- m.message = sys.exec("cat /tmp/bmx6-luci.err.tmp")
- end
-end
-
-return m
-
diff --git a/luci-app-bmx6/files/usr/lib/lua/luci/model/cbi/bmx6/hna.lua b/luci-app-bmx6/files/usr/lib/lua/luci/model/cbi/bmx6/hna.lua
deleted file mode 100644
index db98ae6..0000000
--- a/luci-app-bmx6/files/usr/lib/lua/luci/model/cbi/bmx6/hna.lua
+++ /dev/null
@@ -1,47 +0,0 @@
---[[
- Copyright (C) 2011 Pau Escrich
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
- The full GNU General Public License is included in this distribution in
- the file called "COPYING".
---]]
-
-local sys = require("luci.sys")
-
-m = Map("bmx6", "bmx6")
-
-local hna = m:section(TypedSection,"unicastHna","IPv6 HNA")
-hna.addremove = true
-hna.anonymous = true
-local hna_option = hna:option(Value,"unicastHna", "IPv6 Host Network Announcement. Syntax /")
-
---function hna_option:validate(value)
--- local err = sys.call('bmx6 -c --test -a ' .. value)
--- if err ~= 0 then
--- return nil
--- end
--- return value
---end
-
-function m.on_commit(self,map)
- local err = sys.call('bmx6 -c --configReload > /tmp/bmx6-luci.err.tmp')
- if err ~= 0 then
- m.message = sys.exec("cat /tmp/bmx6-luci.err.tmp")
- end
-end
-
-return m
-
diff --git a/luci-app-bmx6/files/usr/lib/lua/luci/model/cbi/bmx6/interfaces.lua b/luci-app-bmx6/files/usr/lib/lua/luci/model/cbi/bmx6/interfaces.lua
deleted file mode 100644
index fb1261b..0000000
--- a/luci-app-bmx6/files/usr/lib/lua/luci/model/cbi/bmx6/interfaces.lua
+++ /dev/null
@@ -1,77 +0,0 @@
---[[
- Copyright (C) 2011 Pau Escrich
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
- The full GNU General Public License is included in this distribution in
- the file called "COPYING".
---]]
-
-local sys = require("luci.sys")
-local bmx6json = require("luci.model.bmx6json")
-local m = Map("bmx6", "bmx6")
-
-local eth_int = sys.net.devices()
-local interfaces = m:section(TypedSection,"dev","Devices","")
-interfaces.addremove = true
-interfaces.anonymous = true
-
-local intlv = interfaces:option(ListValue,"dev","Device")
-
-for _,i in ipairs(eth_int) do
- intlv:value(i,i)
-end
-
--- Getting json and looking for device section
-local json = bmx6json.get("options")
-
-if json == nil or json.OPTIONS == nil then
- m.message = "bmx6-json plugin is not running or some mistake in luci-bmx6 configuration, check /etc/config/luci-bmx6"
- json = {}
-else
- json = json.OPTIONS
-end
-
-local dev = {}
-for _,j in ipairs(json) do
- if j.name == "dev" and j.CHILD_OPTIONS ~= nil then
- dev = j.CHILD_OPTIONS
- break
- end
-end
-
-local help = ""
-local name = ""
-
-for _,o in ipairs(dev) do
- if o.name ~= nil then
- help = ""
- name = o.name
- if o.help ~= nil then
- help = bmx6json.text2html(o.help)
- end
-
- if o.syntax ~= nil then
- help = help .. " Syntax: " .. bmx6json.text2html(o.syntax)
- end
-
- value = interfaces:option(Value,name,name,help)
- value.optional = true
- end
-end
-
-
-return m
-
diff --git a/luci-app-bmx6/files/usr/lib/lua/luci/model/cbi/bmx6/main.lua b/luci-app-bmx6/files/usr/lib/lua/luci/model/cbi/bmx6/main.lua
deleted file mode 100644
index 8c114bf..0000000
--- a/luci-app-bmx6/files/usr/lib/lua/luci/model/cbi/bmx6/main.lua
+++ /dev/null
@@ -1,108 +0,0 @@
---[[
- Copyright (C) 2011 Pau Escrich
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
- The full GNU General Public License is included in this distribution in
- the file called "COPYING".
---]]
-
-local sys = require("luci.sys")
-local bmx6json = require("luci.model.bmx6json")
-
-m = Map("bmx6", "bmx6")
-
--- Getting json and Checking if bmx6-json is avaiable
-local options = bmx6json.get("options")
-if options == nil or options.OPTIONS == nil then
- m.message = "bmx6-json plugin is not running or some mistake in luci-bmx6 configuration, check /etc/config/luci-bmx6"
-else
- options = options.OPTIONS
-end
-
--- Getting a list of interfaces
-local eth_int = luci.sys.net.devices()
-
--- Getting the most important options from general
-local general = m:section(NamedSection,"general","general","General")
-general.addremove = false
-general:option(Value,"globalPrefix","Global ip prefix","Specify global prefix for interfaces: NETADDR/LENGTH. If you are using IPv6 leave blank to let bmx6 autoassign an ULA IPv6 address.")
-
-if m:get("ipVersion","ipVersion") == "6" then
- general:option(Value,"tun4Address","IPv4 address or range","specify default IPv4 tunnel address and announced range")
-end
-
--- IP section
--- ipVersion section is important, we are allways showing it
-local ipV = m:section(NamedSection,"ipVersion","ipVersion","IP options")
-ipV.addremove = false
-local lipv = ipV:option(ListValue,"ipVersion","IP version")
-lipv:value("4","4")
-lipv:value("6","6")
-lipv.default = "6"
-
--- rest of ip options are optional, getting them from json
-local ipoptions = {}
-for _,o in ipairs(options) do
- if o.name == "ipVersion" and o.CHILD_OPTIONS ~= nil then
- ipoptions = o.CHILD_OPTIONS
- break
- end
-end
-
-local help = ""
-local name = ""
-local value = nil
-
-for _,o in ipairs(ipoptions) do
- if o.name ~= nil then
- help = ""
- name = o.name
- if o.help ~= nil then
- help = bmx6json.text2html(o.help)
- end
-
- if o.syntax ~= nil then
- help = help .. " Syntax: " .. bmx6json.text2html(o.syntax)
- end
-
- if o.def ~= nil then
- help = help .. " Default: " .. bmx6json.text2html(o.def)
- end
-
- value = ipV:option(Value,name,name,help)
- value.optional = true
- end
-end
-
--- Interfaces section
-local interfaces = m:section(TypedSection,"dev","Devices","")
-interfaces.addremove = true
-interfaces.anonymous = true
-local intlv = interfaces:option(ListValue,"dev","Device")
-
-for _,i in ipairs(eth_int) do
- intlv:value(i,i)
-end
-
-function m.on_commit(self,map)
- local err = sys.call('bmx6 -c --configReload > /tmp/bmx6-luci.err.tmp')
- if err ~= 0 then
- m.message = sys.exec("cat /tmp/bmx6-luci.err.tmp")
- end
-end
-
-return m
-
diff --git a/luci-app-bmx6/files/usr/lib/lua/luci/model/cbi/bmx6/plugins.lua b/luci-app-bmx6/files/usr/lib/lua/luci/model/cbi/bmx6/plugins.lua
deleted file mode 100644
index 518864e..0000000
--- a/luci-app-bmx6/files/usr/lib/lua/luci/model/cbi/bmx6/plugins.lua
+++ /dev/null
@@ -1,50 +0,0 @@
---[[
- Copyright (C) 2011 Pau Escrich
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
- The full GNU General Public License is included in this distribution in
- the file called "COPYING".
---]]
-local sys = require("luci.sys")
-
-m = Map("bmx6", "bmx6")
-plugins_dir = {"/usr/lib/","/var/lib","/lib"}
-
-plugin = m:section(TypedSection,"plugin","Plugin")
-plugin.addremove = true
-plugin.anonymous = true
-plv = plugin:option(ListValue,"plugin", "Plugin")
-
-for _,d in ipairs(plugins_dir) do
- pl = luci.sys.exec("cd "..d..";ls bmx6_*")
- if #pl > 6 then
- for _,v in ipairs(luci.util.split(pl,"\n")) do
- plv:value(v,v)
- end
- end
-end
-
-
-function m.on_commit(self,map)
- local err = sys.call('/etc/init.d/bmx6 restart')
- if err ~= 0 then
- m.message = sys.exec("Cannot restart bmx6")
- end
-end
-
-
-return m
-
diff --git a/luci-app-bmx6/files/usr/lib/lua/luci/model/cbi/bmx6/tunnels.lua b/luci-app-bmx6/files/usr/lib/lua/luci/model/cbi/bmx6/tunnels.lua
deleted file mode 100644
index 7a6bfd3..0000000
--- a/luci-app-bmx6/files/usr/lib/lua/luci/model/cbi/bmx6/tunnels.lua
+++ /dev/null
@@ -1,75 +0,0 @@
---[[
- Copyright (C) 2011 Pau Escrich
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
- The full GNU General Public License is included in this distribution in
- the file called "COPYING".
---]]
-
-local sys = require("luci.sys")
-local bmx6json = require("luci.model.bmx6json")
-
-m = Map("bmx6", "bmx6")
-
--- tunOut
-local tunnelsOut = m:section(TypedSection,"tunOut",translate("Networks to fetch"),translate("Tunnel announcements to fetch if possible"))
-tunnelsOut.addremove = true
-tunnelsOut.anonymous = true
-tunnelsOut:option(Value,"tunOut","Name")
-tunnelsOut:option(Value,"network", translate("Network to fetch"))
-
-local tunoptions = bmx6json.getOptions("tunOut")
-local _,o
-for _,o in ipairs(tunoptions) do
- if o.name ~= nil and o.name ~= "network" then
- help = bmx6json.getHtmlHelp(o)
- value = tunnelsOut:option(Value,o.name,o.name,help)
- value.optional = true
- end
-end
-
-
---tunIn
-local tunnelsIn = m:section(TypedSection,"tunInNet",translate("Networks to offer"),translate("Tunnels to announce in the network"))
-tunnelsIn.addremove = true
-tunnelsIn.anonymous = true
-
-local net = tunnelsIn:option(Value,"tunInNet", translate("Network to offer"))
-net.default = "10.0.0.0/8"
-
-local bwd = tunnelsIn:option(Value,"bandwidth",translate("Bandwidth (Bytes)"))
-bwd.default = "1000000"
-
-local tuninoptions = bmx6json.getOptions("tunInNet")
-local _,o
-for _,o in ipairs(tuninoptions) do
- if o.name ~= nil and o.name ~= "tunInNet" and o.name ~= "bandwidth" then
- help = bmx6json.getHtmlHelp(o)
- value = tunnelsIn:option(Value,o.name,o.name,help)
- value.optional = true
- end
-end
-
-function m.on_commit(self,map)
- --Not working. If test returns error the changes are still commited
- local msg = bmx6json.testandreload()
- if msg ~= nil then
- m.message = msg
- end
-end
-
-return m
-
diff --git a/luci-app-bmx6/files/usr/lib/lua/luci/view/admin_status/index/neighbours_simple.htm b/luci-app-bmx6/files/usr/lib/lua/luci/view/admin_status/index/neighbours_simple.htm
deleted file mode 100644
index 97d6e0e..0000000
--- a/luci-app-bmx6/files/usr/lib/lua/luci/view/admin_status/index/neighbours_simple.htm
+++ /dev/null
@@ -1,108 +0,0 @@
-
-
-
This is sms a chat where all bmx6 nodes can participate. The data is replayed using routing packets, so there is a limit of 2040 bytes. Use it only to send short messages.
-
Each participant can only send one sms at same time.
-
-
-Received SMS
-
-
-<% for orig,sms in pairs(chat) do %>
- <%=orig%>:<%=sms%>
-<% end %>
-
-
-<%+footer%>
-
diff --git a/luci-app-bmx6/files/usr/lib/lua/luci/view/bmx6/graph.htm b/luci-app-bmx6/files/usr/lib/lua/luci/view/bmx6/graph.htm
deleted file mode 100644
index a4dabb7..0000000
--- a/luci-app-bmx6/files/usr/lib/lua/luci/view/bmx6/graph.htm
+++ /dev/null
@@ -1,110 +0,0 @@
-<%#
-Copyright (C) 2011 Pau Escrich
-Contributors Jo-Philip
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License along
-with this program; if not, write to the Free Software Foundation, Inc.,
-51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-The full GNU General Public License is included in this distribution in
-the file called "COPYING".
--%>
-
-<%
- luci.http.prepare_content("text/html")
-
- local location = { unpack(luci.dispatcher.context.path) }
- location[#location] = "topology"
-%>
-
-<%+header%>
-
-
-
-
-
-
-
-
-
- <% if o.desc.DESC_ADV ~= nil then %>
- <% for j,h in ipairs(o.desc.DESC_ADV.extensions[2].HNA6_EXTENSION) do %>
- <%=h.address%>
- <% end %>
- <% end %>
-
- <% if o.desc.DESC_ADV ~= nil then %>
- <% for j,h in ipairs(o.desc.DESC_ADV.extensions[2].HNA6_EXTENSION) do %>
- <%=h.address%>
- <% end %>
- <% end %>
-
-
-<% end %>
-
-
-
-<%+footer%>
diff --git a/luci-app-bmx6/files/usr/lib/lua/luci/view/bmx6/nodes_j.htm b/luci-app-bmx6/files/usr/lib/lua/luci/view/bmx6/nodes_j.htm
deleted file mode 100644
index 0435655..0000000
--- a/luci-app-bmx6/files/usr/lib/lua/luci/view/bmx6/nodes_j.htm
+++ /dev/null
@@ -1,193 +0,0 @@
-<%#
- Copyright (C) 2011 Pau Escrich
- Contributors Lluis Esquerda
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
- The full GNU General Public License is included in this distribution in
- the file called "COPYING".
--%>
-
-<%+header%>
-
-
-
-
-
-
-
-
Node originators
-
-
-
-
- Click icon to see individual node information
-
-
-
-
-
-
-Go to non JavaScript view
-
-
-
-<%+footer%>
-
diff --git a/luci-app-bmx6/files/usr/lib/lua/luci/view/bmx6/status.htm b/luci-app-bmx6/files/usr/lib/lua/luci/view/bmx6/status.htm
deleted file mode 100644
index 11e9682..0000000
--- a/luci-app-bmx6/files/usr/lib/lua/luci/view/bmx6/status.htm
+++ /dev/null
@@ -1,69 +0,0 @@
-<%+header%>
-
-
-
-
-Bmx6 is a routing protocol for Linux based operating systems. Visit bmx6.net for more info.
-
-
-
-
-
-
-
-
-a mesh routing protocol for Linux devices.
-Visit bmx6.net for more info.
-
-
-
-
-
status
-
-
-
-
-
-
-
-
-
-
-<%+footer%>
-
diff --git a/luci-app-bmx6/files/usr/lib/lua/luci/view/bmx6/tunnels_j.htm b/luci-app-bmx6/files/usr/lib/lua/luci/view/bmx6/tunnels_j.htm
deleted file mode 100644
index 1b7ce42..0000000
--- a/luci-app-bmx6/files/usr/lib/lua/luci/view/bmx6/tunnels_j.htm
+++ /dev/null
@@ -1,107 +0,0 @@
-<%#
- Copyright (C) 2011 Pau Escrich
- Contributors Lluis Esquerda
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
- The full GNU General Public License is included in this distribution in
- the file called "COPYING".
--%>
-
-
-<%+header%>
-
-
-
-
-
-
"&&!n?r.childNodes:[];for(k=o.length-1;k>=0;--k)c.nodeName(o[k],"tbody")&&!o[k].childNodes.length&&o[k].parentNode.removeChild(o[k])}!c.support.leadingWhitespace&&V.test(i)&&r.insertBefore(b.createTextNode(V.exec(i)[0]),r.firstChild);i=r.childNodes}if(i.nodeType)e.push(i);else e=
-c.merge(e,i)}}if(d)for(j=0;e[j];j++)if(f&&c.nodeName(e[j],"script")&&(!e[j].type||e[j].type.toLowerCase()==="text/javascript"))f.push(e[j].parentNode?e[j].parentNode.removeChild(e[j]):e[j]);else{e[j].nodeType===1&&e.splice.apply(e,[j+1,0].concat(c.makeArray(e[j].getElementsByTagName("script"))));d.appendChild(e[j])}return e},cleanData:function(a){for(var b,d,f=c.cache,e=c.event.special,j=c.support.deleteExpando,i=0,o;(o=a[i])!=null;i++)if(d=o[c.expando]){b=f[d];if(b.events)for(var k in b.events)e[k]?
-c.event.remove(o,k):Ca(o,k,b.handle);if(j)delete o[c.expando];else o.removeAttribute&&o.removeAttribute(c.expando);delete f[d]}}});var kb=/z-?index|font-?weight|opacity|zoom|line-?height/i,Na=/alpha\([^)]*\)/,Oa=/opacity=([^)]*)/,ha=/float/i,ia=/-([a-z])/ig,lb=/([A-Z])/g,mb=/^-?\d+(?:px)?$/i,nb=/^-?\d/,ob={position:"absolute",visibility:"hidden",display:"block"},pb=["Left","Right"],qb=["Top","Bottom"],rb=s.defaultView&&s.defaultView.getComputedStyle,Pa=c.support.cssFloat?"cssFloat":"styleFloat",ja=
-function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){return X(this,a,b,true,function(d,f,e){if(e===w)return c.curCSS(d,f);if(typeof e==="number"&&!kb.test(f))e+="px";c.style(d,f,e)})};c.extend({style:function(a,b,d){if(!a||a.nodeType===3||a.nodeType===8)return w;if((b==="width"||b==="height")&&parseFloat(d)<0)d=w;var f=a.style||a,e=d!==w;if(!c.support.opacity&&b==="opacity"){if(e){f.zoom=1;b=parseInt(d,10)+""==="NaN"?"":"alpha(opacity="+d*100+")";a=f.filter||c.curCSS(a,"filter")||"";f.filter=
-Na.test(a)?a.replace(Na,b):b}return f.filter&&f.filter.indexOf("opacity=")>=0?parseFloat(Oa.exec(f.filter)[1])/100+"":""}if(ha.test(b))b=Pa;b=b.replace(ia,ja);if(e)f[b]=d;return f[b]},css:function(a,b,d,f){if(b==="width"||b==="height"){var e,j=b==="width"?pb:qb;function i(){e=b==="width"?a.offsetWidth:a.offsetHeight;f!=="border"&&c.each(j,function(){f||(e-=parseFloat(c.curCSS(a,"padding"+this,true))||0);if(f==="margin")e+=parseFloat(c.curCSS(a,"margin"+this,true))||0;else e-=parseFloat(c.curCSS(a,
-"border"+this+"Width",true))||0})}a.offsetWidth!==0?i():c.swap(a,ob,i);return Math.max(0,Math.round(e))}return c.curCSS(a,b,d)},curCSS:function(a,b,d){var f,e=a.style;if(!c.support.opacity&&b==="opacity"&&a.currentStyle){f=Oa.test(a.currentStyle.filter||"")?parseFloat(RegExp.$1)/100+"":"";return f===""?"1":f}if(ha.test(b))b=Pa;if(!d&&e&&e[b])f=e[b];else if(rb){if(ha.test(b))b="float";b=b.replace(lb,"-$1").toLowerCase();e=a.ownerDocument.defaultView;if(!e)return null;if(a=e.getComputedStyle(a,null))f=
-a.getPropertyValue(b);if(b==="opacity"&&f==="")f="1"}else if(a.currentStyle){d=b.replace(ia,ja);f=a.currentStyle[b]||a.currentStyle[d];if(!mb.test(f)&&nb.test(f)){b=e.left;var j=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;e.left=d==="fontSize"?"1em":f||0;f=e.pixelLeft+"px";e.left=b;a.runtimeStyle.left=j}}return f},swap:function(a,b,d){var f={};for(var e in b){f[e]=a.style[e];a.style[e]=b[e]}d.call(a);for(e in b)a.style[e]=f[e]}});if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b=
-a.offsetWidth,d=a.offsetHeight,f=a.nodeName.toLowerCase()==="tr";return b===0&&d===0&&!f?true:b>0&&d>0&&!f?false:c.curCSS(a,"display")==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var sb=J(),tb=/
-//
-// Math.seedrandom('yipee'); Sets Math.random to a function that is
-// initialized using the given explicit seed.
-//
-// Math.seedrandom(); Sets Math.random to a function that is
-// seeded using the current time, dom state,
-// and other accumulated local entropy.
-// The generated seed string is returned.
-//
-// Math.seedrandom('yowza', true);
-// Seeds using the given explicit seed mixed
-// together with accumulated entropy.
-//
-//
-// Seeds using physical random bits downloaded
-// from random.org.
-//
-// Examples:
-//
-// Math.seedrandom("hello"); // Use "hello" as the seed.
-// document.write(Math.random()); // Always 0.5463663768140734
-// document.write(Math.random()); // Always 0.43973793770592234
-// var rng1 = Math.random; // Remember the current prng.
-//
-// var autoseed = Math.seedrandom(); // New prng with an automatic seed.
-// document.write(Math.random()); // Pretty much unpredictable.
-//
-// Math.random = rng1; // Continue "hello" prng sequence.
-// document.write(Math.random()); // Always 0.554769432473455
-//
-// Math.seedrandom(autoseed); // Restart at the previous seed.
-// document.write(Math.random()); // Repeat the 'unpredictable' value.
-//
-// Notes:
-//
-// Each time seedrandom('arg') is called, entropy from the passed seed
-// is accumulated in a pool to help generate future seeds for the
-// zero-argument form of Math.seedrandom, so entropy can be injected over
-// time by calling seedrandom with explicit data repeatedly.
-//
-// On speed - This javascript implementation of Math.random() is about
-// 3-10x slower than the built-in Math.random() because it is not native
-// code, but this is typically fast enough anyway. Seeding is more expensive,
-// especially if you use auto-seeding. Some details (timings on Chrome 4):
-//
-// Our Math.random() - avg less than 0.002 milliseconds per call
-// seedrandom('explicit') - avg less than 0.5 milliseconds per call
-// seedrandom('explicit', true) - avg less than 2 milliseconds per call
-// seedrandom() - avg about 38 milliseconds per call
-//
-// LICENSE (BSD):
-//
-// Copyright 2010 David Bau, all rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-// 1. Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-//
-// 2. Redistributions in binary form must reproduce the above copyright
-// notice, this list of conditions and the following disclaimer in the
-// documentation and/or other materials provided with the distribution.
-//
-// 3. Neither the name of this module nor the names of its contributors may
-// be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-/**
- * All code is in an anonymous closure to keep the global namespace clean.
- *
- * @param {number=} overflow
- * @param {number=} startdenom
- */
-(function (pool, math, width, chunks, significance, overflow, startdenom) {
-
-
-//
-// seedrandom()
-// This is the seedrandom function described above.
-//
-math['seedrandom'] = function seedrandom(seed, use_entropy) {
- var key = [];
- var arc4;
-
- // Flatten the seed string or build one from local entropy if needed.
- seed = mixkey(flatten(
- use_entropy ? [seed, pool] :
- arguments.length ? seed :
- [new Date().getTime(), pool, window], 3), key);
-
- // Use the seed to initialize an ARC4 generator.
- arc4 = new ARC4(key);
-
- // Mix the randomness into accumulated entropy.
- mixkey(arc4.S, pool);
-
- // Override Math.random
-
- // This function returns a random double in [0, 1) that contains
- // randomness in every bit of the mantissa of the IEEE 754 value.
-
- math['random'] = function random() { // Closure to return a random double:
- var n = arc4.g(chunks); // Start with a numerator n < 2 ^ 48
- var d = startdenom; // and denominator d = 2 ^ 48.
- var x = 0; // and no 'extra last byte'.
- while (n < significance) { // Fill up all significant digits by
- n = (n + x) * width; // shifting numerator and
- d *= width; // denominator and generating a
- x = arc4.g(1); // new least-significant-byte.
- }
- while (n >= overflow) { // To avoid rounding up, before adding
- n /= 2; // last byte, shift everything
- d /= 2; // right using integer math until
- x >>>= 1; // we have exactly the desired bits.
- }
- return (n + x) / d; // Form the number within [0, 1).
- };
-
- // Return the seed that was used
- return seed;
-};
-
-//
-// ARC4
-//
-// An ARC4 implementation. The constructor takes a key in the form of
-// an array of at most (width) integers that should be 0 <= x < (width).
-//
-// The g(count) method returns a pseudorandom integer that concatenates
-// the next (count) outputs from ARC4. Its return value is a number x
-// that is in the range 0 <= x < (width ^ count).
-//
-/** @constructor */
-function ARC4(key) {
- var t, u, me = this, keylen = key.length;
- var i = 0, j = me.i = me.j = me.m = 0;
- me.S = [];
- me.c = [];
-
- // The empty key [] is treated as [0].
- if (!keylen) { key = [keylen++]; }
-
- // Set up S using the standard key scheduling algorithm.
- while (i < width) { me.S[i] = i++; }
- for (i = 0; i < width; i++) {
- t = me.S[i];
- j = lowbits(j + t + key[i % keylen]);
- u = me.S[j];
- me.S[i] = u;
- me.S[j] = t;
- }
-
- // The "g" method returns the next (count) outputs as one number.
- me.g = function getnext(count) {
- var s = me.S;
- var i = lowbits(me.i + 1); var t = s[i];
- var j = lowbits(me.j + t); var u = s[j];
- s[i] = u;
- s[j] = t;
- var r = s[lowbits(t + u)];
- while (--count) {
- i = lowbits(i + 1); t = s[i];
- j = lowbits(j + t); u = s[j];
- s[i] = u;
- s[j] = t;
- r = r * width + s[lowbits(t + u)];
- }
- me.i = i;
- me.j = j;
- return r;
- };
- // For robust unpredictability discard an initial batch of values.
- // See http://www.rsa.com/rsalabs/node.asp?id=2009
- me.g(width);
-}
-
-//
-// flatten()
-// Converts an object tree to nested arrays of strings.
-//
-/** @param {Object=} result
- * @param {string=} prop */
-function flatten(obj, depth, result, prop) {
- result = [];
- if (depth && typeof(obj) == 'object') {
- for (prop in obj) {
- if (prop.indexOf('S') < 5) { // Avoid FF3 bug (local/sessionStorage)
- try { result.push(flatten(obj[prop], depth - 1)); } catch (e) {}
- }
- }
- }
- return result.length ? result : '' + obj;
-}
-
-//
-// mixkey()
-// Mixes a string seed into a key that is an array of integers, and
-// returns a shortened string seed that is equivalent to the result key.
-//
-/** @param {number=} smear
- * @param {number=} j */
-function mixkey(seed, key, smear, j) {
- seed += ''; // Ensure the seed is a string
- smear = 0;
- for (j = 0; j < seed.length; j++) {
- key[lowbits(j)] =
- lowbits((smear ^= key[lowbits(j)] * 19) + seed.charCodeAt(j));
- }
- seed = '';
- for (j in key) { seed += String.fromCharCode(key[j]); }
- return seed;
-}
-
-//
-// lowbits()
-// A quick "n mod width" for width a power of 2.
-//
-function lowbits(n) { return n & (width - 1); }
-
-//
-// The following constants are related to IEEE 754 limits.
-//
-startdenom = math.pow(width, chunks);
-significance = math.pow(2, significance);
-overflow = significance * 2;
-
-//
-// When seedrandom.js is loaded, we immediately mix a few bits
-// from the built-in RNG into the entropy pool. Because we do
-// not want to intefere with determinstic PRNG state later,
-// seedrandom will not call math.random on its own again after
-// initialization.
-//
-mixkey(math.random(), pool);
-
-// End anonymous scope, and pass initial values.
-})(
- [], // pool: entropy pool starts empty
- Math, // math: package containing random, pow, and seedrandom
- 256, // width: each RC4 output is 0 <= x < 256
- 6, // chunks: at least six RC4 outputs for each double
- 52 // significance: there are 52 significant digits in a double
-);
diff --git a/luci-app-bmx6/files/www/luci-static/resources/bmx6/link.png b/luci-app-bmx6/files/www/luci-static/resources/bmx6/link.png
deleted file mode 100644
index 58977ff..0000000
Binary files a/luci-app-bmx6/files/www/luci-static/resources/bmx6/link.png and /dev/null differ
diff --git a/luci-app-bmx6/files/www/luci-static/resources/bmx6/style.css b/luci-app-bmx6/files/www/luci-static/resources/bmx6/style.css
deleted file mode 100644
index d8191a7..0000000
--- a/luci-app-bmx6/files/www/luci-static/resources/bmx6/style.css
+++ /dev/null
@@ -1,22 +0,0 @@
- table {
- width:90%;
- border-top:1px solid #e5eaf8;
- border-right:1px solid #e5eaf8;
- margin:1em auto;
- border-collapse:collapse;
- }
-
- td {
- color:#678197;
- border-bottom:1px solid #e6eff8;
- border-left:1px solid #e6eff8;
- padding:.3em 1em;
- text-align:center;
- }
- th {
- background:#f4f9fe;
- text-align:center;
- font:bold 1.2em/2em Century Gothic,Trebuchet MS,Arial,Helvetica,sans-serif;
- color:#66a3d3;
- }
-
diff --git a/luci-app-bmx6/files/www/luci-static/resources/bmx6/wifi.png b/luci-app-bmx6/files/www/luci-static/resources/bmx6/wifi.png
deleted file mode 100644
index 4195b08..0000000
Binary files a/luci-app-bmx6/files/www/luci-static/resources/bmx6/wifi.png and /dev/null differ
diff --git a/luci-app-bmx6/files/www/luci-static/resources/bmx6/world.png b/luci-app-bmx6/files/www/luci-static/resources/bmx6/world.png
deleted file mode 100644
index 29b53c9..0000000
Binary files a/luci-app-bmx6/files/www/luci-static/resources/bmx6/world.png and /dev/null differ
diff --git a/luci-app-bmx6/files/www/luci-static/resources/bmx6/world_small.png b/luci-app-bmx6/files/www/luci-static/resources/bmx6/world_small.png
deleted file mode 100644
index f5f3105..0000000
Binary files a/luci-app-bmx6/files/www/luci-static/resources/bmx6/world_small.png and /dev/null differ