From e8b6bae449360cacc68c78c270af3fa9d25a1045 Mon Sep 17 00:00:00 2001
From: GaomingPan <2285022179@qq.com>
Date: Sun, 9 Aug 2015 16:51:58 +0800
Subject: [PATCH 01/33] Initial Commit
---
.cproject | 49 +
.project | 27 +
AUTHORS | 6 +
COPYING | 280 ++++
ChangeLog | 898 ++++++++++++
FAQ | 488 +++++++
Makefile.am | 53 +
NEWS | 116 ++
README | 16 +
README.openwrt | 96 ++
autogen.sh | 65 +
configure.in | 105 ++
contrib/airos/wifidog/Makefile | 70 +
contrib/airos/wifidog/files.patch | 87 ++
contrib/airos/wifidog/files/wifidog.conf | 253 ++++
contrib/airos/wifidog/files/wifidog.init | 27 +
.../wifidog/patches/100-counter_outoing.patch | 24 +
contrib/airos/wifidog/readme.txt | 43 +
contrib/build-deb/changelog | 14 +
contrib/build-deb/control | 15 +
contrib/build-deb/rules | 74 +
.../wifidog/Makefile | 62 +
.../wifidog/files/wifidog.conf | 246 ++++
.../wifidog/files/wifidog.init | 18 +
.../wifidog/Makefile | 60 +
.../wifidog/files/wifidog.conf | 246 ++++
.../wifidog/files/wifidog.init | 17 +
.../wifidog/Config.in | 16 +
.../wifidog/Makefile | 65 +
.../wifidog/files/wifidog.conf | 246 ++++
.../wifidog/files/wifidog.init | 15 +
.../wifidog/ipkg/wifidog.conffiles | 1 +
.../wifidog/ipkg/wifidog.control | 8 +
contrib/dump_fw.sh | 5 +
doc/Makefile.am | 52 +
doc/README.developers.txt | 37 +
doc/doxygen.cfg.in | 1294 +++++++++++++++++
doc/wifidog_firewall_diagram.dia | Bin 0 -> 8702 bytes
libhttpd/Makefile.am | 19 +
libhttpd/README | 23 +
libhttpd/api.c | 1067 ++++++++++++++
libhttpd/httpd.h | 250 ++++
libhttpd/httpd_priv.h | 83 ++
libhttpd/ip_acl.c | 224 +++
libhttpd/protocol.c | 791 ++++++++++
libhttpd/version.c | 23 +
scripts/Copy of white_black_flush.sh | 95 ++
scripts/Copy of white_black_flush.sh~ | 95 ++
scripts/GET_settings | 48 +
scripts/GET_settings~ | 48 +
scripts/conf/dog_post_conf | 9 +
scripts/conf/wifidog_conf | 73 +
scripts/dog_conf_generator.sh | 167 +++
scripts/init.d/wifidog | 201 +++
scripts/white_black_flush.sh | 95 ++
scripts/white_black_flush.sh~ | 95 ++
scripts/wifidog | 21 +
scripts/wifidog.init | 104 ++
src/Makefile.am | 61 +
src/auth.c | 224 +++
src/auth.h | 61 +
src/centralserver.c | 446 ++++++
src/centralserver.h | 63 +
src/client_list.c | 258 ++++
src/client_list.h | 100 ++
src/commandline.c | 180 +++
src/commandline.h | 33 +
src/common.h | 33 +
src/conf.c | 1044 +++++++++++++
src/conf.h | 244 ++++
src/debug.c | 76 +
src/debug.h | 38 +
src/firewall.c | 424 ++++++
src/firewall.h | 70 +
src/fw_iptables.c | 720 +++++++++
src/fw_iptables.h | 82 ++
src/gateway.c | 573 ++++++++
src/gateway.h | 33 +
src/get_clientinfo.c | 443 ++++++
src/get_clientinfo.h | 89 ++
src/get_devinfo.c | 459 ++++++
src/get_devinfo.h | 119 ++
src/get_remote_shell.c | 212 +++
src/get_remote_shell.h | 35 +
src/http.c | 331 +++++
src/http.h | 50 +
src/httpd_thread.c | 75 +
src/httpd_thread.h | 33 +
src/ping_thread.c | 284 ++++
src/ping_thread.h | 35 +
src/safe.c | 110 ++
src/safe.h | 56 +
src/shell_command.h | 53 +
src/util.c | 544 +++++++
src/util.h | 79 +
src/wdctl.c | 327 +++++
src/wdctl.h | 43 +
src/wdctl_thread.c | 401 +++++
src/wdctl_thread.h | 37 +
wifidog-msg.html.in | 107 ++
wifidog.conf | 281 ++++
wifidog.spec.in | 69 +
102 files changed, 17760 insertions(+)
create mode 100644 .cproject
create mode 100644 .project
create mode 100755 AUTHORS
create mode 100755 COPYING
create mode 100755 ChangeLog
create mode 100755 FAQ
create mode 100755 Makefile.am
create mode 100755 NEWS
create mode 100755 README
create mode 100755 README.openwrt
create mode 100755 autogen.sh
create mode 100755 configure.in
create mode 100755 contrib/airos/wifidog/Makefile
create mode 100755 contrib/airos/wifidog/files.patch
create mode 100755 contrib/airos/wifidog/files/wifidog.conf
create mode 100755 contrib/airos/wifidog/files/wifidog.init
create mode 100755 contrib/airos/wifidog/patches/100-counter_outoing.patch
create mode 100755 contrib/airos/wifidog/readme.txt
create mode 100755 contrib/build-deb/changelog
create mode 100755 contrib/build-deb/control
create mode 100755 contrib/build-deb/rules
create mode 100755 contrib/build-openwrt-kamikazeipk/wifidog/Makefile
create mode 100755 contrib/build-openwrt-kamikazeipk/wifidog/files/wifidog.conf
create mode 100755 contrib/build-openwrt-kamikazeipk/wifidog/files/wifidog.init
create mode 100755 contrib/build-openwrt-kamikazeipk8.09up/wifidog/Makefile
create mode 100755 contrib/build-openwrt-kamikazeipk8.09up/wifidog/files/wifidog.conf
create mode 100755 contrib/build-openwrt-kamikazeipk8.09up/wifidog/files/wifidog.init
create mode 100755 contrib/build-openwrt-whiterussianipk/wifidog/Config.in
create mode 100755 contrib/build-openwrt-whiterussianipk/wifidog/Makefile
create mode 100755 contrib/build-openwrt-whiterussianipk/wifidog/files/wifidog.conf
create mode 100755 contrib/build-openwrt-whiterussianipk/wifidog/files/wifidog.init
create mode 100755 contrib/build-openwrt-whiterussianipk/wifidog/ipkg/wifidog.conffiles
create mode 100755 contrib/build-openwrt-whiterussianipk/wifidog/ipkg/wifidog.control
create mode 100755 contrib/dump_fw.sh
create mode 100755 doc/Makefile.am
create mode 100755 doc/README.developers.txt
create mode 100755 doc/doxygen.cfg.in
create mode 100755 doc/wifidog_firewall_diagram.dia
create mode 100755 libhttpd/Makefile.am
create mode 100755 libhttpd/README
create mode 100755 libhttpd/api.c
create mode 100755 libhttpd/httpd.h
create mode 100755 libhttpd/httpd_priv.h
create mode 100755 libhttpd/ip_acl.c
create mode 100755 libhttpd/protocol.c
create mode 100755 libhttpd/version.c
create mode 100644 scripts/Copy of white_black_flush.sh
create mode 100644 scripts/Copy of white_black_flush.sh~
create mode 100755 scripts/GET_settings
create mode 100755 scripts/GET_settings~
create mode 100644 scripts/conf/dog_post_conf
create mode 100644 scripts/conf/wifidog_conf
create mode 100644 scripts/dog_conf_generator.sh
create mode 100755 scripts/init.d/wifidog
create mode 100644 scripts/white_black_flush.sh
create mode 100644 scripts/white_black_flush.sh~
create mode 100644 scripts/wifidog
create mode 100644 scripts/wifidog.init
create mode 100755 src/Makefile.am
create mode 100755 src/auth.c
create mode 100755 src/auth.h
create mode 100755 src/centralserver.c
create mode 100755 src/centralserver.h
create mode 100755 src/client_list.c
create mode 100755 src/client_list.h
create mode 100755 src/commandline.c
create mode 100755 src/commandline.h
create mode 100755 src/common.h
create mode 100755 src/conf.c
create mode 100755 src/conf.h
create mode 100755 src/debug.c
create mode 100755 src/debug.h
create mode 100755 src/firewall.c
create mode 100755 src/firewall.h
create mode 100755 src/fw_iptables.c
create mode 100755 src/fw_iptables.h
create mode 100755 src/gateway.c
create mode 100755 src/gateway.h
create mode 100644 src/get_clientinfo.c
create mode 100644 src/get_clientinfo.h
create mode 100644 src/get_devinfo.c
create mode 100644 src/get_devinfo.h
create mode 100644 src/get_remote_shell.c
create mode 100644 src/get_remote_shell.h
create mode 100755 src/http.c
create mode 100755 src/http.h
create mode 100755 src/httpd_thread.c
create mode 100755 src/httpd_thread.h
create mode 100755 src/ping_thread.c
create mode 100755 src/ping_thread.h
create mode 100755 src/safe.c
create mode 100755 src/safe.h
create mode 100644 src/shell_command.h
create mode 100755 src/util.c
create mode 100755 src/util.h
create mode 100755 src/wdctl.c
create mode 100755 src/wdctl.h
create mode 100755 src/wdctl_thread.c
create mode 100755 src/wdctl_thread.h
create mode 100755 wifidog-msg.html.in
create mode 100755 wifidog.conf
create mode 100755 wifidog.spec.in
diff --git a/.cproject b/.cproject
new file mode 100644
index 00000000..e2b2aaa0
--- /dev/null
+++ b/.cproject
@@ -0,0 +1,49 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/.project b/.project
new file mode 100644
index 00000000..7785dd6f
--- /dev/null
+++ b/.project
@@ -0,0 +1,27 @@
+
+
+ wifidog-20140822
+
+
+
+
+
+ org.eclipse.cdt.managedbuilder.core.genmakebuilder
+ clean,full,incremental,
+
+
+
+
+ org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder
+ full,incremental,
+
+
+
+
+
+ org.eclipse.cdt.core.cnature
+ org.eclipse.cdt.core.ccnature
+ org.eclipse.cdt.managedbuilder.core.managedBuildNature
+ org.eclipse.cdt.managedbuilder.core.ScannerConfigNature
+
+
diff --git a/AUTHORS b/AUTHORS
new file mode 100755
index 00000000..52177b0c
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1,6 @@
+$Id$
+
+Philippe April
+Mina Naguib
+Benoit Grégoire
+Alexandre Carmel-Veilleux
diff --git a/COPYING b/COPYING
new file mode 100755
index 00000000..c7aea189
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,280 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 675 Mass Ave, Cambridge, MA 02139, 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 Library 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
diff --git a/ChangeLog b/ChangeLog
new file mode 100755
index 00000000..31f0cc7f
--- /dev/null
+++ b/ChangeLog
@@ -0,0 +1,898 @@
+# $Id$
+2015-07-13
+ * add get_clientinfo.h get_clientinfo.c
+2015-07-09
+ * add shell_command.h
+ * add get_devinfo.h get_devinfo.c
+2014-05-13
+ * libhttpd crash on invalid HTTP headers (second part of the patch) by Benoit Grégoire
+2013-08-21
+ * add support for DROP target for firewall rules by Champtar
+2013-06-14
+ * add support for log, ulog target for firewall rules by jean-philippe menil and florida
+2013-05-31
+ Add transparent proxy support (via iptables REDIRECT) by Champtar (inspired by FFW team)
+2012-05-30
+ * Add many const by champtar
+ * Send http 302 instead of 307 by champtar
+ * Suppress all compilation warnings by champtar
+ * Add transparent proxy support (via iptables REDIRECT)
+2012-08-28
+ * Fix #836, buffer overflow on long urls reported by Etienne CHAMPETIER
+ * Fix #835, segfaults reported by Etienne CHAMPETIER
+2009-11-03
+ * Fix #625, does not display failure notice when quiet is set to true
+ * Fix #587, change index and rindex to strchr and strrchr
+ * Fix #548, trim leading spaces of the config file's options
+
+2009-09-28 Benoit Grégoire
+ * Fix #471, patch by wichert
+
+2009-09-25 Geneviève Bastien
+ * Release 20090925
+ * Update contrib Makefiles
+
+2009-09-17 Geneviève Bastien
+ * Documented #537
+ * Fixed #472, patch by Jean-Philippe Menil
+ * Fixed #515, using the gateway interface instead of the gateway id in the iptables chain
+
+2009-07-02 Benoit Grégoire
+ * Re-fix #505, #525 and fix #584, sorry about that.
+
+2009-06-26 Benoit Grégoire
+ * Fix #518
+
+2009-02-27 Benoit Grégoire
+ * Fix #488 and #493 (arp_get() in firewall.c couldn't parse lowercase mac's from /proc/net/arp) with patch from jch@pps.jussieu.fr. Otherwise wifidog wouldn't work with recent openwrt and Ubuntu.
+ * Fix #525
+
+2008-09-30 Wichert Akkerman
+ * Add exitcode to iptables failure errors.
+ * Include the gw_id in auth server updates so the client does not have
+ to keep track of it in a session.
+ * Include the gateway id in the firewall table names. Fixes ticket #466
+ * URL encode the token before transmitting (it was already decoded).
+ Fixes ticket #473
+ * Clean up compiler warnings.
+ * Security: strncpy may not NUL-terminate strings, so enforce this
+ ourselves. Fixes ticket #464
+ * Make it possible to protect the status page. Fixes ticket #463.
+
+2008-07-20 Alexandre Carmel-Veilleux
+ * src/util.c: Fixed #include bug that caused segfaults on newer Linux
+
+2008-04-21 Alexandre Carmel-Veilleux
+ * Integrated patch #452 from Wichert Akkerman : Add const to function arguments in libhttpd to enforce more type checking and prevent certain class of problems.
+ * Compatiblity fix: Libhttpd assumes that type u_int is defined. Added an #ifndef/#include pair to httpd.h to make sure that assertion is true.
+ * Integrated patch #453 from Wichert Akkerman : Add configurable html to wifidog error messages. This has been a long-requested feature.
+
+2008-04-13 Benoit Grégoire
+ * contrib/build-openwrt-kamikazeipk/wifidog/Makefile: Add iptables userspace dependencies
+ * Release 1.1.5
+
+2008-03-24 Benoit Grégoire
+ * Integrate with OpenWRT kamikaze build system
+
+2007-11-01 Benoit Grégoire
+ * Apply portability patches by David Young . These have been reviewed, but not tested.
+
+2007-10-18 Benoit Grégoire
+ * fw_iptables.c: From Philippe April: reverted change made in 1241 so we properly remove the entry from mangle.WiFiDog_Incoming when kicking out users, it was affecting statistics
+ * Update doxygen.cfg.in for latest version and to fix path ambiguity during make dist.
+ * Release 1.1.4
+
+2007-07-06 Benoit Grégoire
+ * Makefile.am: Slight change in make ipk tagrget. It seems that sometimes builddir isn't defined. srcdir works just as well in this case.
+
+2007-06-27 Benoit Grégoire
+ * util.c: Fix while loop initialisation bug
+ * conf.h: Forgot to change the value of NUM_EXT_INTERFACE_DETECT_RETRY to actually make it wait forever.
+ * Remove hardcoded authserver paths. Can now be defined in the config file (auth server section).
+ * Centralise browser redirect code to simplify code
+ * Add manual logout URL, based in part on work by David Bird
+ * Release 1.1.3 final
+
+2007-06-24 Benoit Grégoire
+ * Close #321: Make the Gateway retry forever if it cannot find it's interface. You never know when someone may finally replug the network cable or something...
+ * Close #332: Apply patch from Laurent Marchal. biguphpcgmailcom
+ * fw_iptables.c: Fix error in iptables_fw_access(). Rules were created as ACCEPT instead of DROP
+ * firewall.c: Fix bug in fw_sync_with_authserver(). The traffic for the validation period of a user who validated his account while connected wouldn't get counted.
+ * doc/wifidog_firewall_map.dia: At long last, full documentation of the firewall. We would have avoided a lot of stupid mistakes if we produced that sooner.
+ * Release 1.1.3_rc1
+
+2007-05-24 Benoit Grégoire
+ * wdctl_thread.c: Fix #324, again. Credit goes to Medea, I misunderstood his instructons.
+ * From David Bird libhttpd/: Fix #266 - don't process query string parameters and keep them in that request.path.
+
+2007-05-18 Benoit Grégoire
+ * wdctl_thread.c: Fix #324
+
+2007-04-26 Benoit Grégoire
+ * wifidog.conf: Improve comments and add examples of blocking access to the upstream LAN.
+
+2007-04-26 Benoit Grégoire
+ * conf.h: The DEFAULT_CHECKINTERVAL was 5 instead of 60 (as stated in the config file) which caused huge needless load on the auth servers, and needless ping traffic towards the clients if it wasn't manually set.
+
+2007-04-09 Benoit Grégoire
+ * Makefile.am: Slight path fix when using building make ipk. Tell me if you have trouble with this
+
+2007-01-06 Benoit Grégoire
+ * contrib/ Add contrib dir to collect the scripts and other code distributed with, but not really part of wifidog.
+ * Include the scripts used to build a ipkg on Openwrt RC6 and 0.9
+ * Modify the build system to finally be able to build wifidog directly from the wifidog directory using the same files
+ used to make the official .ipk, without having to copy ANYTHNG to the openwrt SDK.
+ At last, there is now a new target: make ipk make ipk OPENWRTSDK=path_to_openwrt_sdk
+ * ipk/ Removed the obsolete OpenWRT RC4 scripts
+ * README.openwrt: Update
+ * scripts/openwrt/ remove obsolete dir.
+ * contrib/dump_fw.sh: Convenience script for firewall debugging.
+
+2007-01-06 Benoit Grégoire
+ * Documentation update in the code
+ * Released 1.1.3_beta6
+
+2006-10-26 Benoit Grégoire
+ * src/conf.h: Fix #238 by using $sysconfdir to compute the default config-file location.
+
+2006-10-08 Alexandre Carmel-Veilleux
+ * Changed my email in a few files.
+ * Broken down some printf's on multiple lines.
+ * Added comments.
+
+2006-09-14 Benoit Grégoire
+ * src/util.c, src/conf.h: Fix autodectection of the External interface if not specified in the config file. If the interface (typically pppoe) wasn't yet fully up when wifidog starts, wifidog would stop every connection from going trough. It will now retry every second for up to two minutes, and then exit with a fatal error if it can't successfully detect it.
+
+2006-02-23 Philippe April
+ * src/fw_iptables.c:
+ * Changed order in the filter.FORWARD chain
+ * Added TCPMSS rule
+ * Fixed deleting the rules on shutdown
+ * Fixed wdctl reset problem
+ * Released 1.1.3_beta4
+
+2006-02-06 Benoit Grégoire
+ * src/fw_iptables.c: Fix deleting the rules on shutdown.
+
+2006-01-31 Benoit Grégoire
+ * Release 1.1.3_beta2
+
+2006-01-31 Benoit Grégoire
+ * src/fw_iptables.c: Add the global ruleset to the nat table to fix #65.
+ Add the table parameter to iptables_load_ruleset() and iptables_compile
+ * libhttpd/protocol.c: Fix pointer type mismatch
+ * src/conf.c,h: Remove deprecated option AuthServMaxTries (which was already ignored anyway.
+
+2006-01-23 Benoit Grégoire
+ * src/conf.h: Fix the value of DEFAULT_AUTHSERVPATH and completely wrong code comment. Not the default indicated in the config file and the define are in sync.
+
+2006-01-17 Mina Naguib
+ * Ingisgnificant cleanup of CVS artifacts after svn migration
+
+2005-11-24 Philippe April
+ * Bad idea
+
+2005-11-01 Max Horvath
+ * Added .project to .cvsignore
+
+2005-11-01 Philippe April
+ * Added OPTIONS section in wifidog-init (example: enable syslog)
+
+2005-10-09 Philippe April
+ * Changed html pages, added info to wdctl status
+
+2005-10-07 Philippe April
+ * Released 1.1.3_beta1
+
+2005-10-03 Philippe April
+ * libhttpd: Fixed two bugs parsing the GET query string making wifidog segfault
+
+2005-09-24 Mina Naguib
+ * New wdctl command "restart" which will get wifidog to restart itself
+ while preserving the existing clientlist. Perfect for 0-downtime
+ upgrading!
+ * safe.c: New safe_fork that croaks if the fork fails, also takes care of
+ closing some global file descriptors for the child
+ * debug.c: Now also logs the PID as part of every entry
+ * gateway.c: Handler for SIGCHLD now waitpid()s with WNOHANG flag to prevent deadlock
+ when the handler is called and another wait() or waitpid() is used
+ * util.c: execute() now uses waitpid() instead of wait() to reap only the child
+ it fork/executed
+ * Extra debugging entries throughout code
+
+2005-09-24 Mina Naguib
+ * conf.c: Pre-emptive bugfix - harsh lockdown of parsing trusted MAC
+ addresses from config file
+
+2005-09-24 Philippe April
+ * (finally) Added {Saul Albert,Jo Walsh,Schuyler}'s patch (thank you!) to send
+ the GW interface's mac address as the node_id if no node_id is specified. It allows
+ the use of generic configuration files without the need to hardcode the
+ node_id in.
+ * Added TrustedMACList configuration variable which allows specifying
+ MAC addresses which are allowed to go through without authentication.
+ * Updated OpenWrt instructions.
+
+2005-09-08 Philippe April
+ * Added compile instructions and installation for OpenWrt Whiterussian-rc2
+ * Released 1.1.2
+
+2005-05-30 Mina Naguib
+ * New wdctl command "restart" which will get wifidog to restart itself while preserving the existing clientlist. Perfect for 0-downtime upgrading!
+ * safe.c: New safe_fork that croaks if the fork fails, also takes care of closing some global file descriptors for the child
+ * debug.c: Now also logs the PID as part of every entry
+ * gateway.c: Handler for SIGCHLD now waitpid()s with WNOHANG flag to prevent deadlock when the handler is called and another wait() or waitpid() is used
+ * util.c: execute() now uses waitpid() instead of wait() to reap only the child it fork/executed
+ * Extra debugging entries throughout code
+
+2005-05-24 Mina Naguib
+ * wdctl.c: Minor bugfix pointed out by David Vincelli: When an invalid
+ command is given to wdctl, the error message showed "Invalid command:
+ wdctl" instead of the actual command supplied
+
+2005-05-23 Philippe April
+ * Released 1.1.2_pre1
+
+2005-05-23 Mina Naguib
+ * fw_uptables.c: When appending call to chain WiFiDog_Outgoing from
+ nat.prerouting, add it via -A (at end) instead of -I 1 (at beginning) to
+ allow for existing nat forwarding.
+
+2005-05-16 Mina Naguib
+ * centralserver.c: read()s from central server in auth_server_request() are
+ now timed-out (via select). This is hopefully a bugfix to the
+ thread-freezing problem.
+
+2005-05-06 Mina Naguib
+ * Bugfix non-RFC compliant HTTP requests using \n instead of \r\n as line
+ terminations as per email from ludocornut@users.sourceforge.net
+
+2005-04-28 Philippe April
+ * Released 1.1.2_beta2
+
+2005-04-28 Mina Naguib
+ * wifidog.conf: Make the default ruleset for validating users = allow all
+ (except sending SMTP)
+
+2005-04-20 Philippe April
+ * fw_iptables.c: Insert ourselves at the end of filter.FORWARD instead of
+ at the beginning since important FW instructions are located there on the
+ WRT54Gs when used with some DSL providers and we never execute them
+ otherwise.
+ * Released 1.1.2_beta1
+
+2005-04-03 Philippe April
+ * Fixed issue with FAQ
+ * ipkg/rules: If autogen.sh doesn't exist, it's ok. 'configure' will.
+
+2005-04-01 Philippe April
+ * Duplicated auth server list in NAT table to fix the issue
+ of using an auth server on port 80, since port 80 was being systematically
+ redirected to 2060 otherwise.
+ * Released 1.1.1
+
+2005-03-29 Mina Naguib
+ * Added FAQ document copied from wiki
+
+2005-03-22 Philippe April
+ * Released 1.1.0
+
+2005-03-20 Mina Naguib
+ * More verbose debugging output
+
+2005-03-12 Mina Naguib
+ * More debugging output
+ * Document ugly hack involving tid_fw_thread
+ * SIGPIPE now ignored (as it's comment said) instead of being sent to the
+ handler for SIGCHLD
+ * Bugfix firewall destruction not happening from termination handler - had
+ to move explicit thread kills after, not before, firewall destruction
+
+2005-03-11 Mina Naguib
+ * If external interface was unspecified in the conf file, try to determine
+ it from the default route
+ * If external interface is known, specify it in the trigger rule in
+ nat.PREROUTING to prevent the rule from matching traffic inbound to the
+ router itself. This should fix the issue raised by Philippe and Pascal on
+ the mailing list
+ * Bugfix: UNDO ABOVE 2 ITEMS. Aparently you cannot use the "-o" iptables
+ option in nat.PREROUTING which makes knowing external_interface useless
+ * Added new chain in nat.PREROUTING that explicitly allows all traffic to
+ the router's internal IP from the internal interface, effectively
+ addressing the same above problem
+
+2005-03-07 Mina Naguib
+ * auth.c: Got rid of legacy _http_output and _http_redirect - replaced them
+ with libhttpd functions and http_wifidog_header/http_wifidog_footer
+ * auth.c: When re-directing to auth server now respects SSL setting instead
+ of always http+port 80
+ * auth.c: Better debugging output of what it's doing when it acts on auth
+ server response
+ * A little bit more care with buffers and their sizes
+ * Minor whitespace tweaking and a couple of internal doc typo fixes
+
+2005-03-06 Mina Naguib
+ * Check return values of pthread_create
+ * Internal documentation touch-ups
+ * auth.c: Bugfix invalid http header sent by _http_output
+ * Bugfix traffic counter read from iptables as long int instead of long
+ long int
+ * Minor insignificant code touch-ups:
+ * Replace pthread_mutex_lock/unlock calls with appropriate
+ LOCK_FOO/UNLOCK_FOO macros for consistency
+ * Lock first before using some variables, not after
+ * Indentation adjustments
+
+2005-03-04 Mina Naguib
+ * Bugfix huge uptime pointed out to be by Philippe - was caused when the
+ date is set (with ntpclient for example) after wifidog starts
+ * Beautified "Uh oh!" apology screens and redirection screen
+
+2005-03-02 Alexandre Carmel-Veilleux
+ * Ifdef'd out the bits that are Linux specific if __linux__ is not
+ defined.
+
+2005-03-01 Mina Naguib
+ * Minor visual tweaks to the web interface
+
+2005-03-01 Philippe April
+ * Tagged v1_1_0_beta3
+
+2005-02-28 Mina Naguib
+ * Do not update the last_updated field on incoming traffic - update it on
+ outgoing traffic only. This should be a much more reliable indication of
+ client no longer being there
+ * WifiDog status is now viewable with a web browser at
+ http://ip:port/wifidog/status
+ * Added new web hook for http://ip:port/wifidog
+ * Beautified web interface at http://ip:port/wifidog/*
+
+2005-02-24 Mina Naguib
+ * auth_server_request now returns AUTH_ERROR on error instead of AUTH_VALIDATION_FAILED
+ * centralserver.c: Fix typo (was =+, made it +=) that made the response
+ from the auth server corrupted in memory if the entire response would not
+ fit in 1 packet and retrieved with 1 read() call
+ * Better logging of details and calling of mark_* (auth+online/offline)
+
+2005-02-22 Philippe April
+ * Tagged v1_1_0_beta2
+
+2005-02-20 Mina Naguib
+ * New safe.c with safe_malloc, safe_strdup, safe_asprintf and
+ safe_vasprintf with propper logging and exit when error. Replaced all
+ instances of original with safe versions in all files
+ * Fix memory leak in iptables_fw_counters_update
+ * Partial merge from CaptiveDNS branch: Consolidated much of the networking
+ calls to the auth servers into a magical function called connect_auth_server()
+ that's responsible for dns lookup, connecting, marking servers bad, marking
+ online/auth_online, and refreshing the firewall rules.
+ * Partial merge from CaptiveDNS branch: Added new functions mark_auth_online(),
+ mark_auth_offline() and is_auth_online() - similar in nature to is_online()
+ etc. except tailored to decide on auth servers status - currently being called by
+ connect_auth_server()
+ * Partial merge from CaptiveDNS branch: Different apology in 404 handler
+ depending on whether internet is down or just auth server is down
+ * Partial merge from CaptiveDNS branch: wdctl status now shows status of
+ is_online and is_auth_online
+ * Fixed several inconsistencies regarding the parity and size of
+ incoming/outgoing counters. Standardized on "unsigned long long int" in
+ declarations and *printf/*scanf formats
+
+2005-02-16 Philippe April
+ * ipkg/rules - When we clean, forgot to delete ipkg-build-stamp
+
+2005-02-15 Mina Naguib
+ * Now also reports wifidog_uptime when it pings the server, as well as
+ shows it in wdctl status
+
+2005-02-13 Mina Naguib
+ * Completely re-did the iptables rules. Most of the rules are now in the
+ filter table instead of the nat table. Also DROPs are now replaced with
+ REJECTs to help tell the user connection refused instead of endless pauses
+ * Bugfix: Traffic from client to router was counted twice in the "outgoing"
+ bytecount since it increased both counters in mangle.* and filter.* - Got
+ rid of TABLE_WIFIDOG_WIFI_TO_GW completely since it's unneeded
+
+2005-02-12 Mina Naguib
+ * Stricter format rules for all *scan* functions hunting for IPs and MAC addresses
+ * fw_iptables.c: Make sure scanned IP address is a valid IP address
+ * firewall.c: Fix memory leak in arp_get
+ * libhttpd/protocol.c: Abort connection if read non-ascii from client. This
+ is often a telltale sign of a program such as skype using port 80 for
+ non-http requests - this therefore ends the thread as early as possible
+ instead of having it lay around for a while trying to get a valid http
+ request and taking up resources
+ * ping_thread.c: When pinging auth server now also sends sys_uptime, sys_memfree
+ and sys_load
+ * -v commandline option now shows wifidog version
+
+2005-02-11 Philippe April
+ * Tagged v1_1_0_beta1
+
+2005-02-11 Philippe April
+ * Fixed a bug in counting the traffic between client and gateway
+ * Alpha8
+
+2005-02-04 Mina Naguib
+ * Partially bugfix apology when offline
+ * ipkg/rules: More tweaking to make it build nicely with recent openwrt
+ buildroots
+
+2005-02-03 Mina Naguib
+ * Keep track of last times we successfully & unsuccessfully spoke to the
+ auth server/used DNS. Then, if we know we're not online, show a little
+ apology to the user instead of re-directing them to the auth server.
+ * ipkg/rules: Added some extra version detection to auto-detect versions
+ of kernel, iptables and ipkg-utils instead of having them hardcoded. This
+ makes creating ipkg's work with different OpenWRT releases
+ * fw_iptables.c: Fixed memory leak caused by not freeing return from
+ iptables_compile in iptables_load_ruleset
+ * http.c: Deleted unused call to client_list_find
+ * http.c: /about URL now shows wifidog version
+ * Cosmetic typo fixes
+
+2005-02-03 Philippe April
+ * Ping the users everytime we check their counters, that way we keep them
+ alive
+ * Optional ExternalInterface
+ * Optional GatewayAddress (we discover it. finally.)
+ * We check for the traffic from the clients to the firewall, to catch the
+ traffic the icmp ping is generating
+ * Fixed bug where we were doing the opposite of what desired when checking if authentication server was alive
+ * Bumped to alpha7
+
+2005-01-23 Philippe April
+ * wdctl status will return the auth servers in the linked list
+ * We'll now forward to the auth server to display the used-to-be-ugly
+ messages like "go ahead and validate your account you have 15 minutes"
+ * Bumped to alpha6
+
+2005-01-06 Philippe April
+ * fw_iptables.c: Changed REJECT to DROP for the end of the table Unknown,
+ REJECT doesn't seem to be available in the NAT table.
+ * fw_iptables.c: Indented things
+ * fw_iptables.c Fix: Created the authservers table at the beginning and destroy
+ at exit time only to avoid recreating it everytime
+ * Bumped to alpha5
+
+2005-01-05 Philippe April
+ * Typo, fixed some spaces (mostly esthetic)
+ * Bumped to alpha4
+
+2004-12-19 Alexandre Carmel-Veilleux
+ * src/fw_iptables.c: Tweak of auth_server firewall rule setting
+ code. (and promptly undone, fixing the cause is better then
+ fixing the symptom)
+ * src/conf.c: NULL-fill auth_server struct so that
+ auth_server->last_ip always equals NULL when first filled.
+
+2004-12-16 Benoit Grégoire
+ * src/fw_iptables.c: Display iptables command that is run in debug mode.
+
+2004-12-07 Benoit Grégoire
+ * src/firewall.c: Fix reversed incoming and outgoing connections in statistics code
+ * bump version to alpha3
+
+2004-11-29 Alexandre Carmel-Veilleux
+ * wifidog.conf: Fixed firewall rule bug.
+ * src/fw_iptables.c: Unknown user default block rule not "REJECT"
+ instead of "DROP"
+
+2004-11-23 Alexandre Carmel-Veilleux
+ * src/conf.c: Fixed a NULL pointer dereference in get_ruleset().
+
+2004-11-22 Alexandre Carmel-Veilleux
+ * libhttpd/api.c: Fix leak in HttpdEndRequest().
+ * src/ping_thread.c: Fix auth_server IP change code with latest
+ from previous branch.
+ * src/conf.h: Same as above.
+ * src/fw_iptables.c: Same as above.
+ * src/conf.[ch]: Firewall rule set parsing code.
+ * wifidog.conf: Default firewall rule set defined.
+ * src/fw_iptables.[ch]: Firewall rule set enacting code.
+ * configure.in: bumped version to 1.1.0-alpha2
+
+2004-11-18 Benoit Grégoire
+ * src/ping_thread.c: Merge phil's bug fixes from stable branch
+ * ipkg/rules: Merge phil's bug fixes from stable branch
+ * configure.in: Set version to 1.1.0alpha
+
+2004-11-18 Alexandre Carmel-Veilleux
+ * src/fw_iptables.[ch]: Merged in Phil's patch.
+ * src/*: Added ping_thread hooks to reset authserver table in the
+ firewall if it notices the auth_servers changing IPs.
+
+2004-11-17 Alexandre Carmel-Veilleux
+ * libhttpd/*: libhttpd has been taken behind the shed and shot in
+ the back of the head. The replacement separates the request struct
+ from the server struct. It's thread safe if none of OUR threads
+ write to server.
+ * src/*: All the changes to handle the new libhttpd and also to
+ move over to a worker thread system. http_callback_auth() no
+ longer spawns a thread either.
+ * *: this update preceded by a cvs tag PRE_NEW_LIBHTTPD.
+ * *: You want to check the mailing list archive also.
+
+2004-11-10 Alexandre Carmel-Veilleux
+ * libhttpd/protocol.c: select() based timeout.
+
+2004-10-31 Alexandre Carmel-Veilleux
+ * configure.in: bumped version number to "1.0.2-pre1" since we
+ already have ile sans fil hot spots advertising "1.0.1".
+
+2004-10-30 Alexandre Carmel-Veilleux
+ * src/ping_thread.c: asynch read(). fixed bug in byte counting.
+
+2004-10-29 Philippe April
+ * ipkg/rules: added conffiles so it does not overwrite config files
+
+2004-10-29 Alexandre Carmel-Veilleux
+ * src/ping_thread.c: Much new debugging information
+ * multiple files: Logging for all mutexes
+
+2004-10-28 Philippe April
+ * ipkg/rules: building ipkg-tools before packaging
+
+2004-10-28 Alexandre Carmel-Veilleux
+ * multiple files: Implemented a FirewallRule config command, it
+ doesn't actually do anything yet.
+ * libhttpd: #if 0'd out lots of request parsing code.
+ * libhttpd: changed URL parsing.
+
+2004-10-27 Philippe April
+ * ipkg/rules: removed --build=mipsel from ./configure
+
+2004-10-26 Philippe April
+ * ipkg/rules: sed -i is not standard, did a workaround.
+ * ipkg/rules: openwrt's buildroot has changed, modified ipkg
+ accordingly, please read README.openwrt
+
+2004-10-22 Alexandre Carmel-Veilleux
+ * src/various: Added wd_gethostbyname, a thread-safe (serialized)
+ version of gethostbyname.
+
+2004-10-15 Alexandre Carmel-Veilleux
+ * src/auth.c: Fixed hard coded port.
+
+2004-10-09 Alexandre Carmel-Veilleux
+ * src/gateway.c: More logging on termination_handler.
+
+2004-10-08 Alexandre Carmel-Veilleux
+ * src/wdctl_thread.c: Fix wdctl_status to return all connected
+ users.
+
+2004-10-07 Alexandre Carmel-Veilleux
+ * src/conf.c: Fixed mark_auth_server_bad() for the case where there
+ is only one auth server.
+ * src/ping_thread.c: Added extra debugging.
+ * src/ping_thread.c: Fixed file descriptor leak.
+ * src/centralserver.c: Fixed many file descriptor leaks.
+ * src/centralserver.c: Failure of read() no longer fatal.
+ * src/centralserver.c: In case of failure, return from
+ auth_server_request() is no longer an undefined authresponse.
+ * src/util.c: Fixed typo in logging.
+ * src/wdctl_thread.c: Added logging when socket path is too long.
+ * src/debug.c: Debug now logs the time of an event.
+
+2004-08-30 Alexandre Carmel-Veilleux
+ * wifidog.conf: Corrected an example
+ * README.openwrt: Typo fixed, editorial changes
+ * ChangeLog: Benoit's last update entry was set in the future ;-).
+ * All over src/: Compiled with -Wall and fixed all nagging.
+
+2004-08-30 Benoit Grégoire
+ * Makefile.am: Add rpm target
+ * wifidog.spec.in: Rework spec file. Now works and include the init script
+ * ipkg/rules: Deal with the incomplete init.d system of the OpenWrt. Install scripts/init.d/wifidog as /usr/bin/wifidog-init, and call wifidog-init start from S65wifidog.
+ * scripts/openwrt/S65wifidog: Add file
+ * scripts/init.d/wifidog: Fix performance and protability problem. Make it chkconfig compliant. Test that chkconfig --add wifidog works (at least on mandrake)
+ * src/wdctl.c: Change some message, make sure wdctl return 0 unless there is an error.
+
+2004-08-30 Benoit Grégoire
+ * README.openwrt: Documentation update
+ * Makefile.am: Make a ipkg target to ease WRT54G installation
+ * ipkg/rules: Add wdctl and the init.d script.
+ * Add BUILDROOT variable to the build system so we can use it when needed
+ * src/ping_thread.c: Have the server ping immediately on boot. Note that this will only help if the second server responds. The logic of the ping itself should be changed so it iterates in the list until it finds one that responds or exausts the list
+ * wifidog.conf: Add more doc, and (most) of ISF's default config in comments.
+ * Bump version in anticipation for release
+
+2004-08-29 Guillaume Beaudoin
+ * wifidog.spec.in: Changed prefix to match scripts/init.d/wifidog.
+ * debian/rules: Configuration and init.d file added.
+ * debian/control: Description and Depends field changed.
+ * Makefile.am: Added scripts directory and ipkg/rules file.
+
+2004-08-29 Pascal Leclerc
+ * scripts/init.d/wifidog: Startup/shutdown script for Wifidog deamon
+
+2004-08-29 Guillaume Beaudoin
+ * wifidog.spec.in: Must be in decending chronological order.
+
+2004-08-29 Guillaume Beaudoin
+ * wifidog.spec.in: Remove some leftover from libOFX.
+ * Makefile.am: Include debian/* files.
+ * We should now be able to package .deb and .rpm from dist.
+
+2004-08-27 Benoit Grégoire
+ * README.openwrt,src/conf.c,h: Documentation update
+ * src/gateway.c, src/ping_thread.c, src/wdctl.c, src/wdctl_thread.c: Fix linking problems related to errno.h and extern int errno
+
+2004-08-26 Pascal Leclerc
+ * Makefile.am: Remove phpauth from EXTRA_DIST
+
+2004-08-25 Alexandre Carmel-Veilleux
+ * src/auth.c: Path as changed in 1.26 was preceded by a /, the path already contains a / so it would yield http://host//path/
+
+2004-08-25 Benoit Grégoire
+ * src/auth.c: Remove hardcoded path.
+
+2004-08-23 Benoit Grégoire
+ * src/ping_thread.c: Send the gateway id to the central server during ping, so the server know which gateway checked in, and then knows for sure that it is up (well, once the server implements it...).
+
+2004-08-23 Benoit Grégoire
+ * src/centralserver.c: Fix path for auth by appending /auth/ to auth_server->authserv_path. Wifidog works again.
+
+2004-08-20 Alexandre Carmel-Veilleux
+ * Debug output of all HTTP transactions and their responses.
+ * Changed ipkg to use wifidog.conf from the base tree
+ * Send url to central server for link back out
+
+2004-08-19 Alexandre Carmel-Veilleux
+ * Sort of fixed the hanging thread (with an explicit thread kill)
+ * Fixed ping code
+
+2004-08-13 Alexandre Carmel-Veilleux
+ * All Auth Server configuration now handled by the "AuthServer"
+ directive.
+ * The "AuthServer" directive is now multi line.
+
+2004-08-11 Alexandre Carmel-Veilleux
+ * Added code to do heartbeat.
+ * Changed AuthServer yet again.
+
+2004-08-09 Alexandre Carmel-Veilleux
+ * WiFiDog now can read multiple auth servers in its config file.
+ * Added functions to handle the auth servers list.
+ * WiFiDog can failover between servers for its internal requests.
+ * Firewall sets rules for all auth servers.
+
+2004-08-06 Alexandre Carmel-Veilleux
+ * AuthservPath no longer mandatory in config file.
+
+2004-08-04 Philippe April
+ * Renamed iptables.[ch] to fw_iptables.[ch]
+
+2004-08-03 Alexandre Carmel-Veilleux
+ * Fixed broken sockaddr_un usage in wdctl.c and wdctl_thread.c
+
+2004-08-01 Benoit Grégoire
+ * Delete everything in phpauth, it will now live in it's own module (wifidog-auth)
+
+2004-08-01 Alexandre Carmel-Veilleux
+ * Added wdctl facility
+
+2004-07-21 Philippe April
+ * Cleaned up the ipkg makefile
+ * Added makefile to build on Debian
+
+2004-07-19 Alexandre Carmel-Veilleux
+ * Build script for OpenWRT ipkg
+
+2004-07-06 Alexandre Carmel-Veilleux
+ * Added cache control to default error message returned.
+
+2004-07-05 Philippe April
+ * Fixed an endless loop in client_list_delete
+
+2004-06-10 Alexandre Carmel-Veilleux
+ * Added debugging to libhttpd so that httpdGetConnection() traces
+ its execution into ./httpdGetConnection.log. This should be removed
+ once it's no longer needed or put within #ifdef DEBUG's.
+
+2004-06-01 Philippe April
+ * Sending User-Agent header to central server
+
+2004-05-28 Philippe April
+ * Fixed bugs implemented after major changes
+
+2004-05-27 Benoit Grégoire
+ * Massive Doxygen update in all files. IMPORTANT: The new convention is: @brief in the .h, long description and parameters in the .c
+ * Cleaned up some more issues in my notes taken at the formal review
+ * client_list.c,h: Make client_list_free_node() private, define and document client_list_mutex here
+ * config.c: Start the hunt for evil globals: Get rid of the config global
+ * doc/doxygen.cfg.in: Enable generation of internal doc, a few other tweaks
+ * Documentation now generates a TODO list and DEPRECATED list, please look at them
+
+2004-05-27 Alexandre Carmel-Veilleux
+ * Cleaned up all the issues brought forward in the code review
+ on 2004-05-26 at Benoit's. There are to many changes to list
+ individually.
+
+2004-05-15 Philippe April
+ * Commented out cookie handling in libhttpd because it segfaults if
+ you pass a particular formatting/buggy one
+
+2004-05-14 Philippe April
+ * Fixed crash when receiving SIGPIPE signal with write() would fail
+
+2004-05-13 Philippe April
+ * Advertise to the central server when we logged out a user
+
+2004-05-12 Philippe April
+ * Sending a "stage" when doing authentication for the server
+ to be able to know if it's a login, or just a counters update.
+
+2004-05-11 Philippe April
+ * Now tracking the hotspot id and ip in database
+
+2004-05-07 Philippe April
+ * Now we store both incoming and outgoing counters on server
+ and expire if no activity at all on both
+ * Changed the structure of nodes a little
+
+2004-05-07 Philippe April
+ * New parameter ExternalInterface
+ * Made possible to count inbound traffic by inserting new rules
+
+2004-05-07 Philippe April
+ * Cleaned up common.h from files
+
+2004-05-07 Philippe April
+ * Made iptables' tables DEFINEs instead of being hardcoded
+
+2004-05-07 Philippe April
+ * Fixed typo
+
+2004-05-06 Philippe April
+ * Cleanups and standardized things
+
+2004-05-06 Philippe April
+ * Cleanups in fw_counter function
+
+2004-05-05 Philippe April
+ * Calling iptables directly instead of using shell scripts
+ for fw_init, fw_destroy and fw_allow/fw_deny
+ * Removed shell script for fw.counters
+ * Fixed memory leaks
+ * Moved most of the iptables-specific (all but the counters)
+ to iptables.c to modularize a bit more
+ * Hack to allow deciding if we want FW calls' messages quiet or not
+
+2004-04-23 Philippe April
+ * Fixed a debug line
+
+2004-04-22 Philippe April
+ * Major changes, cleaned up code
+ * Changed the way firewall tags traffic
+
+2004-04-21 Philippe April
+ * Changed fw.destroy so it cleans up more in a while loop
+
+2004-04-20 Alexandre Carmel-Veilleux
+ * fixed expiration time
+
+2004-04-20 Philippe April
+ * A lot of changes regarding debugging facilities and added logging
+ to syslog
+ * Removed possibility to specify port on command line
+
+2004-04-19 Philippe April
+ * Changed some debugging severity
+
+2004-04-19 Benoit Grégoire
+ * Properly integrate libhttpd into the source tree ;) Note that this will create a proper system wide shared library for libghttpd. Still to be done: 1- Store Mina's patch somewhere, in case we want to upgrade libhttpd. 2-Add configure option not to build httpd, and use an already installed one.
+
+2004-04-18 Alexandre Carmel-Veilleux
+ * Fixed pthread_cond_timedwait. The mutex needed to be locked as
+ per the POSIX spec, yet Linux or Mac OS X don't care...
+ * Fixed the double SIGTERM handler on Linux...
+
+2004-04-17 Alexandre Carmel-Veilleux
+ * Added work around for uClibc bug in auth.c
+
+2004-04-17 Philippe April
+ * Fixed firewall scripts to make them standard and some firewall functions
+
+2004-04-17 Alexandre Carmel-Veilleux
+ * Updated documentation in firewall.c
+
+2004-04-17 Philippe April
+ * Fixed path returning to gateway in phpauth/login/index.php
+
+2004-04-16 Alexandre Carmel-Veilleux
+ * Merged in libhttpd into the source tree
+
+2004-04-16 Philippe April
+ * Fixed CRLF/formatting in phpauth/login/index.php
+ * Added some documentation for firewall.c, commandline.c
+ * Removed an unnecessary line dist_sysconf_DATA from Makefile.am
+
+2004-04-15 Alexandre Carmel-Veilleux
+ * Changed the locking mechanism, now all access to t_node * structs
+ are properly protected.
+
+2004-04-15 Alexandre Carmel-Veilleux
+ * Connection now closed if counter hasn't change for one full
+ period.
+
+2004-04-14 Philippe April
+ * Fixed shell script hardcoded interface
+
+2004-04-14 Alexandre Carmel-Veilleux
+ * Existing IPs are logged off when they're authenticated again.
+
+2004-04-14 Alexandre Carmel-Veilleux
+ * Fixed clean up so it happens at the right time.
+
+2004-04-14 Alexandre Carmel-Veilleux
+ * Major retooling of insert_userclass(), fixed seg fault.
+ * The program now works as advertised.
+
+2004-04-14 Alexandre Carmel-Veilleux
+ * Switched to threads. Alpha quality build, at best
+
+2004-04-12 Alexandre Carmel-Veilleux
+ * Changed child return value handling, again. Now it's actually
+ using the real value instead of the flag.
+ * The http.c authentication code now closes the http connection
+ from the user.
+
+2004-04-11 Alexandre Carmel-Veilleux
+ * Added extra debugging information.
+ * Fixed return value handling in debugging calls.
+
+2004-04-11 Alexandre Carmel-Veilleux
+ * Removed duplicates signal handling hooks
+ * Additional comments in SIGCHLD handler
+
+2004-04-11 Alexandre Carmel-Veilleux
+ * Node find if's expressions changed
+
+2004-04-11 Alexandre Carmel-Veilleux
+ * SIGCHLD Handler initializaed outside of deamon mode now.
+
+2004-04-11 Alexandre Carmel-Veilleux
+ * Very large modification. The entire architecture has been reworked
+ so that authentications to the central server are performed in a
+ fork()'d child process and the exit code from that child is then
+ used to set the User Class of the connection.
+ * The UserClasses (global definitions) and Rights (per connection)
+ have been integrated.
+
+2004-03-16 Mina Naguib
+ * Changed HTTP server tasks to be handled by libhttpd - merged
+ incorporate_libhttpd branch
+
+2004-03-13 Philippe April
+ * Modified the way firewall scripts are called so we can configure
+ them in the config file (a bit more modular than it was)
+ * Added simple linked list to keep track of clients and to
+ keep a counter of the utilization and send it to the auth server
+ * Fixed CRLF/formatting in phpauth/auth/index.php
+ * Hacked phpauth/auth/index.php to handle very basic utilization tracking
+
+2004-03-12 Philippe April
+ * Changed all perror()s into debug()s and added errno.h to common.h
+
+2004-03-10 Philippe April
+ * Small fix to firewall.c so we don't define variables after
+ the function has started (so it builds on gcc-2.95)
+
+2004-03-09 Philippe April
+ * Major changes, not forking anymore for new connections, now using
+ select() instead. It will allow us to efficiently use a linked list to track
+ users and other things. It introduces some bugs and design issues but will
+ be better in the end.
+
+2004-03-09 Philippe April
+ * Small fix in the default.php login page
+ * exit() where the program was supposed to exit but wasn't when the
+ firewall could not be setup
+
+2004-03-09 Alexandre Carmel-Veilleux
+ * Tiny change to increase cross-platform compatibility. It can now build on OS X and it comes close to building on my old BSD box.
+
+2004-03-08 Benoit Grégoire
+ * Initial CVS import. Integrate a standrad GNU build system and Doxygen to the build process. Add Doxygen and CVS headers, .cvsignores, etc. Note that the imported code is Philippe April (papril777 at yahoo.com)'s work. Tell me if I forgot anything. Please note that the paths in the src/fw* scripts are still hardcoded. Don't forget to update the ChangeLog file every commit and add doxygen comments to your code. Happy hacking.
+
diff --git a/FAQ b/FAQ
new file mode 100755
index 00000000..fb8d82d2
--- /dev/null
+++ b/FAQ
@@ -0,0 +1,488 @@
+#
+# $Id$
+#
+# The latest version of this document lives at:
+# http://www.ilesansfil.org/wiki/WiFiDog/FAQ
+#
+# Please check the above URL if you have a FAQ that does not appear here.
+#
+
+WiFiDog/FAQ
+
+The WiFi Dog Captive Portal Frequently Asked Questions
+
+ To alleviate the repetition on the [9][WWW] WiFiDog mailing list, and
+ to help people get started quickly, here are the FAQs:
+ 1. [10]The WiFi Dog Captive Portal Frequently Asked Questions
+ 1. [11]General questions
+ 1. [12]What is WiFiDog ?
+ 2. [13]Who makes WiFiDog ?
+ 3. [14]Who can use WiFiDog ?
+ 4. [15]Who currently uses WiFiDog ?
+ 5. [16]What can it do ?
+ 6. [17]What is it composed of ?
+ 7. [18]What are the main differences between it and NoCat ?
+ 8. [19]How does it work ?
+ 9. [20]What does it run on ?
+ 10. [21]Can I write my own client ?
+ 11. [22]Can I write my own auth server ?
+ 12. [23]What does it look like ?
+ 2. [24]The WiFiDog Client
+ 1. [25]What do I need ?
+ 2. [26]Pre-installation
+ 3. [27]Installation
+ 4. [28]Configuration
+ 5. [29]Running
+ 6. [30]Testing
+ 3. [31]The WiFiDog client on a linksys WRT54G
+ 1. [32]What do I need ?
+ 2. [33]Pre-installation
+ 3. [34]Installation
+ 1. [35]Introduction
+ 2. [36]Compiling a MIPS-friendly WiFiDog
+ 3. [37]Getting the new MIPS-friendly WiFiDog onto the
+ router
+ 4. [38]Actual installation
+ 4. [39]Configuration, Running and Testing
+ 5. [40]The intricate link between WiFiDog and OpenWRT
+ 6. [41]I am not comfortable with linux and don't know how
+ to do all this compiling stuff. Is there an easier way
+ for me to get the WiFiDog client running on a Linksys
+ WRT54G ?
+ 4. [42]The WiFiDog auth server
+ 1. [43]What do I need ?
+ 2. [44]Installation
+ 3. [45]Configuration
+ 4. [46]Testing
+
+General questions
+
+What is WiFiDog ?
+
+ [47]WiFiDog is software used to create wireless hotspots. It is a
+ next-generation alternative to [48][WWW] NoCat.
+
+Who makes WiFiDog ?
+
+ The technical team of [49]IleSansFil created and maintains
+ [50]WiFiDog.
+
+Who can use WiFiDog ?
+
+ On the legal/licensing front, anyone can use [51]WiFiDog. It is free
+ software released under the GPL license.
+
+ On the practical front, we would like the answer to also be
+ "everyone", however this would not be the truth. The main target user
+ base of [52]WiFiDog is network administrators, hotspot administrators
+ and hackers who "know what they're doing". Odds are that an average
+ windows user would not benefit from, or be able to correctly setup and
+ continually administer a [53]WiFiDog installation.
+
+ If the software ever reaches a point of complete point-and-click ease
+ that we feel average users can safely administer, we will update this
+ document.
+
+Who currently uses WiFiDog ?
+
+ The following companies, organizations, groups or persons are known to
+ use [54]WiFiDog on their hotspots:
+ * [55]IleSansFil
+ * [56][WWW] BC Wireless
+
+What can it do ?
+
+ See the [57]WiFiDog/FeatureList page for the feature list.
+
+What is it composed of ?
+
+ It is composed of 2 components:
+ 1. The client is a daemon process - this gets installed on every
+ wireless router
+ 2. The auth server is a web application - this gets installed in a
+ central location
+
+What are the main differences between it and NoCat ?
+
+ On the client side, it's smaller, has far fewer dependencies, and runs
+ well on embedded devices.
+
+ On the auth server side, it's more customizable, and is geared towards
+ capitalizing the infrastructure for the purposes of building portals
+ and communities.
+
+How does it work ?
+
+ The client daemon uses firewall rules to control traffic going through
+ the router. When a new user tries to access a web site, the client
+ will transparently re-direct them to the auth server where they can
+ either log-in or sign-up. The client and the auth server then
+ negotiate what to do with the client and either allow or deny them
+ certain network access.
+
+ The client also talks to the auth server every X minutes to update it
+ on vital statistics including uptime, load, traffic count per client,
+ and to let it know it's still there.
+
+ Refer to the [58]WiFiDog/FlowDiagram document for some more details.
+
+What does it run on ?
+
+ The client runs on any linux machine that has a working
+ netfilter+iptables installation.
+
+ The auth server runs on any PHP-enabled web server.
+
+Can I write my own client ?
+
+ Sure, but why ? We've done all the work. The client is written in C
+ and is extremely lightweight so that it runs comfortably in embedded
+ environments such as the [59][WWW] Linksys WRT54G router.
+
+ The client is time-tested and is fairly stable. It is used extensively
+ in [60][WWW] IleSansFil's deployed hotspots.
+
+Can I write my own auth server ?
+
+ Again, we've done all the work. However our auth server at the time of
+ this writing is not as polished as the client. Feel free to make it
+ better or write your own from scratch. If you go with the later option
+ you'll have to respect the same protocol the client uses for the whole
+ system to work correctly.
+
+What does it look like ?
+
+ The client is a daemon process that runs in the background. It looks
+ like zen, chi, the ether, zilch. It has no user interface.
+
+ The auth server is a web application that can be customized via
+ templates to look however you want it to look. To check out
+ [61]IleSansFil's auth server installation see [62][WWW]
+ https://auth.ilesansfil.org
+
+The WiFiDog Client
+
+What do I need ?
+
+ 1. Basic proficiency in a linux environment
+ 2. A linux OS with netfilter compiled into the kernel
+ 3. The iptables package
+ 4. The GNU C compiler (gcc). Other compilers may work, but we have
+ not tested and will not support them.
+ 5. The latest [63]WiFiDog tarball which can be obtained from
+ [64][WWW] SourceForge
+
+Pre-installation
+
+ This is where a lot of people run into problems, so let's state this
+ in bold:
+
+ MAKE SURE EVERYTHING WORKS FIRST BEFORE INTRODUCING [65]WiFiDog INTO
+ THE ENVIRONMENT
+
+ That especially means:
+ * The router must boot properly
+ * The router must bring up the interfaces properly
+ * The router must set up the routes properly
+ * The router must connect to the internet properly
+ * DNS settings must be set or obtained properly. DNS must work.
+ * DHCP settings (client, server or both) must be set or obtained
+ properly.
+ * If using NAT, the router must setup NAT/masquerading rules with
+ iptables properly
+ * Clients on the desired ([66]WiFi) network must be able to bind,
+ associate, lease and connect the internet properly
+ * All the above must happen automatically when the router starts or
+ gets rebooted
+
+ Do NOT proceed with installing [67]WiFiDog until you've satisfied the
+ above. It will not work otherwise and you will waste lots of time.
+
+Installation
+
+ [68]WiFiDog, like many open source projects, is distributed with
+ standard autotools utilities to make installation easy. Unpack the
+ tarball, then follow the standard:
+./configure
+make
+make install
+
+Configuration
+
+ Edit /etc/wifidog.conf and follow the instructions in the file. Things
+ should be self-explanatory.
+
+Running
+
+ For the first time, run [69]WiFiDog with the following switches:
+wifidog -f -d 7
+
+ -f means to run in foreground (do not become a background daemon)
+
+ -d 7 increases debug output level to the maximum
+
+Testing
+
+ As a client on the [70]WiFi network (or whatever interface is
+ configured as the LAN interface in /etc/wifidog.conf), open a web
+ browser and try to browse to your favourite web site.
+
+ Monitor the output of the running [71]WiFiDog to see what it's doing.
+
+The WiFiDog client on a linksys WRT54G
+
+ Due to the lightness of the [72]WiFiDog client it is often installed
+ inside the linksys WRT54G. There are some profound issues that arise
+ with this setup that it warrants its own section in this FAQ:
+
+What do I need ?
+
+ You will need to have basic/full proficiency in a linux environment
+
+ You need to re-flash your router with a hacker-friendly firmware
+ called [73][WWW] OpenWRT. [74][WWW] Follow the user guide on the
+ OpenWRT site to get this part done.
+
+ Do not proceed until you've completed the above. We also recommend you
+ spend some time familiarizing yourself with your new router's OS
+ before introducing [75]WiFiDog into that environment. This especially
+ includes the nvram settings, network interfaces and existing interface
+ bridges.
+
+Pre-installation
+
+ The same rules apply as the pre-installation in a non-WRT54G
+ environment above. Do not proceed until you've satisfied them. In
+ summary: Make sure EVERYTHING works first.
+
+Installation
+
+Introduction
+
+ Installation of the client on the WRT54G is a bit tricky. The space
+ limitations on the device mean there is no compiler in the OpenWRT
+ operating system. That means that you must compile the client on an
+ external machine then transfer the compiled form onto the router.
+
+ To complicate things more, if you compile your client regularly on a
+ standard x86 desktop the produced binary will not run on the router
+ due to the different type of processor (MIPS) on that router.
+
+ What is needed is called cross-compilation, In that scenario you use
+ an architecture (such as your x86 desktop) to produce binaries
+ explicitly designed to run on a different architecture (your MIPS
+ router).
+
+ The above was the bad news since it makes things sound complicated.
+ The good news is that it's not too complicated and we've built scripts
+ to make this a snap for you. As a matter of fact, you've already done
+ this before!
+
+ Remember when you followed the OpenWRT building instructions ? Without
+ knowing it, you already cross-compiled stuff! You used your desktop to
+ cross-compile an entire operating system for the MIPS architecture
+ which resulted in one compressed firmware image you installed on your
+ router.
+
+Compiling a MIPS-friendly WiFiDog
+
+ 1. Download the latest [76][WWW] WiFiDog tarball from sourceforge.
+ 2. Uncompress the tarball, enter the directory
+ 3. Run the following, replacing /usr/local/openwrt/ with wherever you
+ unpacked the OpenWRT tarball earlier:
+
+ipkg/rules BUILDROOT=/usr/local/openwrt/
+
+ You're done. If all is well you should now have a new file named
+ wifidog_1.1.0_mipsel.ipk (version number may be different depending on
+ the tarball you downloaded).
+
+Getting the new MIPS-friendly WiFiDog onto the router
+
+ The .ipk is a data file for the simple "ipkg/i-Package" package
+ manager already on your router. All that's needed now is to copy that
+ file onto your router. If you have installed the dropbear SSH daemon
+ package on your router you can use scp on your desktop to copy the
+ .ipk file to the router. Otherwise copy that file to any web server
+ you have access to, then use wget on the router to download the file
+ from the web server.
+
+ Either way, place the file in the /tmp/ directory on the router.
+
+Actual installation
+
+ Once you have the .ipk file on the router, use this command to install
+ it:
+ipkg install /tmp/wifidog_1.1.0_mipsel.ipk
+
+ Once that is successful delete the .ipk file from /tmp/ to free the
+ occupied memory.
+
+Configuration, Running and Testing
+
+ Same as the earlier section in a non-WRT54G environment
+
+The intricate link between WiFiDog and OpenWRT
+
+ Repeat after me:
+
+ A [77]WiFiDog RUNNING ON AN OpenWRT INSTALLATION MUST HAVE BEEN
+ COMPILED AGAINST THE SAME OpenWRT BUILDROOT USED TO CREATE THAT
+ INSTALLATION
+
+ What does that mean ?
+ 1. If you downloaded and compiled OpenWRT yourself, download and
+ compile [78]WiFiDog yourself against the same buildroot - Do not
+ use someone else's pre-compiled [79]WiFiDog
+ 2. If you downloaded a pre-compiled OpenWRT firmware image:
+ 1. Ask the person who built it to compile [80]WiFiDog for you
+ against the same buildroot
+ 2. Or ask them for a copy of their OpenWRT buildroot so you may
+ compile [81]WiFiDog against it
+
+I am not comfortable with linux and don't know how to do all this compiling
+stuff. Is there an easier way for me to get the WiFiDog client running on a
+Linksys WRT54G ?
+
+ You can use an OpenWRT and [82]WiFiDog compiled by someone else. They
+ must be compiled by the same person against the same OpenWRT
+ buildroot.
+
+ [83]IleSansFil makes it's own pair of OpenWRT images and [84]WiFiDog
+ .ipk compiled files available to the public:
+ * You can download a pre-compiled OpenWRT firmware image [85][WWW]
+ here
+ * And you can download a compatible [86]WiFiDog .ipk file [87][WWW]
+ here
+
+ Look in the [88][WWW] OpenWRT site for instructions on how to re-flash
+ your router with the firmware image (skip any download/building
+ instructions).
+
+ Then follow the above installation instructions for installing the
+ [89]WiFiDog .ipk file into the OpenWRT-flashed router.
+
+ Please note that the above saves you from the knowledge and time
+ needed to compile and produced these binary files. It is however no
+ magical cure for linux illiteracy. You need to be proficient enough in
+ a unix environment to be able to telnet/ssh into the router and
+ perform the outlined installation and configuration tasks. If you do
+ not feel comfortable doing this we advise you consult with someone who
+ is proficient in linux and networking.
+
+The WiFiDog auth server
+
+What do I need ?
+
+ Refer to [90]WiFiDog/AuthServerDoc
+
+Installation
+
+ Refer to [91]WiFiDog/AuthServerDoc
+
+Configuration
+
+ Refer to [92]WiFiDog/AuthServerDoc
+
+Testing
+
+ Refer to [93]WiFiDog/AuthServerDoc
+
+ last edited 2005-03-27 13:11:15 by [94]MinaNaguib
+
+References
+
+ 1. http://www.ilesansfil.org/wiki/FrontPage
+ 2. http://www.ilesansfil.org/wiki/WiFiDog/FAQ?action=raw
+ 3. http://www.ilesansfil.org/wiki/WiFiDog/FAQ?action=print
+ 4. http://www.ilesansfil.org/wiki/WiFiDog
+ 5. http://www.ilesansfil.org/wiki/FindPage
+ 6. http://www.ilesansfil.org/wiki/TitleIndex
+ 7. http://www.ilesansfil.org/wiki/WordIndex
+ 8. http://www.ilesansfil.org/wiki/HelpOnFormatting
+ 9. http://listes.ilesansfil.org/
+ 10. http://www.ilesansfil.org/wiki/WiFiDog/FAQ?action=print#head-b9d27a8844e66371abfbb27bf54669896d8bf4fa
+ 11. http://www.ilesansfil.org/wiki/WiFiDog/FAQ?action=print#head-eb7dd5c81583187efb2d29ebc9ab2b6457417b13
+ 12. http://www.ilesansfil.org/wiki/WiFiDog/FAQ?action=print#head-e05420efb19364f3fa0844223f1bcfc71be7db00
+ 13. http://www.ilesansfil.org/wiki/WiFiDog/FAQ?action=print#head-80293173c84355ebeff2ecbfabaa32edb3c3ae75
+ 14. http://www.ilesansfil.org/wiki/WiFiDog/FAQ?action=print#head-2aa554753e8b93818ba5ef190e67e401421931b9
+ 15. http://www.ilesansfil.org/wiki/WiFiDog/FAQ?action=print#head-975f3574aa59265dd2b0c45ae96e90c98c8bc7d5
+ 16. http://www.ilesansfil.org/wiki/WiFiDog/FAQ?action=print#head-dccf73ff2dcc305d6334dfd0ed90d1c4221b8a12
+ 17. http://www.ilesansfil.org/wiki/WiFiDog/FAQ?action=print#head-ebd81c14ab1b66d6aada9fc399597b644e120036
+ 18. http://www.ilesansfil.org/wiki/WiFiDog/FAQ?action=print#head-9b4c49acb692c6ba8bc2c0e43a991c5fc7b80220
+ 19. http://www.ilesansfil.org/wiki/WiFiDog/FAQ?action=print#head-5aa44a01d2ff78d1e2b5240e0a6c75910d584a0e
+ 20. http://www.ilesansfil.org/wiki/WiFiDog/FAQ?action=print#head-738ab14de6f62065ca3daf9dd3341bfcabc06223
+ 21. http://www.ilesansfil.org/wiki/WiFiDog/FAQ?action=print#head-6059fbd6c262224baf06331fbe83f319ffe730fa
+ 22. http://www.ilesansfil.org/wiki/WiFiDog/FAQ?action=print#head-e8131f271e42589291d507afd89d0c5d24f02ad1
+ 23. http://www.ilesansfil.org/wiki/WiFiDog/FAQ?action=print#head-6a764a3be722e0ff8d1446586643ea57d70cd489
+ 24. http://www.ilesansfil.org/wiki/WiFiDog/FAQ?action=print#head-a650736551182819fd6f742597362be729d9b70d
+ 25. http://www.ilesansfil.org/wiki/WiFiDog/FAQ?action=print#head-57aaa0d1e21d38a7f5bedea65950c36b422cbbb6
+ 26. http://www.ilesansfil.org/wiki/WiFiDog/FAQ?action=print#head-2b75ffe2445295c9982d0873d48e11d5cd89816e
+ 27. http://www.ilesansfil.org/wiki/WiFiDog/FAQ?action=print#head-930f69b528374c4c55fc91b52e030deef8a93648
+ 28. http://www.ilesansfil.org/wiki/WiFiDog/FAQ?action=print#head-4b221edbf4c2383afab601694f2db039700c21cc
+ 29. http://www.ilesansfil.org/wiki/WiFiDog/FAQ?action=print#head-9fcf91fbcf4712b6de6d5b70e703192dd882afa8
+ 30. http://www.ilesansfil.org/wiki/WiFiDog/FAQ?action=print#head-18cc26d84a97b42f3bc06af0203038062a8efb06
+ 31. http://www.ilesansfil.org/wiki/WiFiDog/FAQ?action=print#head-8ba37f479842312562f131032bb11e4fb68942aa
+ 32. http://www.ilesansfil.org/wiki/WiFiDog/FAQ?action=print#head-57aaa0d1e21d38a7f5bedea65950c36b422cbbb6-2
+ 33. http://www.ilesansfil.org/wiki/WiFiDog/FAQ?action=print#head-2b75ffe2445295c9982d0873d48e11d5cd89816e-2
+ 34. http://www.ilesansfil.org/wiki/WiFiDog/FAQ?action=print#head-930f69b528374c4c55fc91b52e030deef8a93648-2
+ 35. http://www.ilesansfil.org/wiki/WiFiDog/FAQ?action=print#head-b6830b2e74230b45153f4fa98ee189d5748ec9f0
+ 36. http://www.ilesansfil.org/wiki/WiFiDog/FAQ?action=print#head-78504516e51f8fc43cc111b9a8a41a85cb652fff
+ 37. http://www.ilesansfil.org/wiki/WiFiDog/FAQ?action=print#head-92221794cfda95baa91352d087656f27754027d2
+ 38. http://www.ilesansfil.org/wiki/WiFiDog/FAQ?action=print#head-2474f5bb689b7b06fc3334eb8e29a26ed60c4280
+ 39. http://www.ilesansfil.org/wiki/WiFiDog/FAQ?action=print#head-37c9cfe0aa830fa8ef3e6f617bd3c741cca6947c
+ 40. http://www.ilesansfil.org/wiki/WiFiDog/FAQ?action=print#head-1dee9a0f840701e6518a0763c48aef734d1996f8
+ 41. http://www.ilesansfil.org/wiki/WiFiDog/FAQ?action=print#head-158e6f354a348c9374107d0a66a7f4c84603ba8a
+ 42. http://www.ilesansfil.org/wiki/WiFiDog/FAQ?action=print#head-30106563831cfdb0840b05fa48e9194d7876f12e
+ 43. http://www.ilesansfil.org/wiki/WiFiDog/FAQ?action=print#head-57aaa0d1e21d38a7f5bedea65950c36b422cbbb6-3
+ 44. http://www.ilesansfil.org/wiki/WiFiDog/FAQ?action=print#head-930f69b528374c4c55fc91b52e030deef8a93648-3
+ 45. http://www.ilesansfil.org/wiki/WiFiDog/FAQ?action=print#head-4b221edbf4c2383afab601694f2db039700c21cc-2
+ 46. http://www.ilesansfil.org/wiki/WiFiDog/FAQ?action=print#head-18cc26d84a97b42f3bc06af0203038062a8efb06-2
+ 47. http://www.ilesansfil.org/wiki/WiFiDog
+ 48. http://nocat.net/
+ 49. http://www.ilesansfil.org/wiki/IleSansFil
+ 50. http://www.ilesansfil.org/wiki/WiFiDog
+ 51. http://www.ilesansfil.org/wiki/WiFiDog
+ 52. http://www.ilesansfil.org/wiki/WiFiDog
+ 53. http://www.ilesansfil.org/wiki/WiFiDog
+ 54. http://www.ilesansfil.org/wiki/WiFiDog
+ 55. http://www.ilesansfil.org/wiki/IleSansFil
+ 56. http://www.bcwireless.net/
+ 57. http://www.ilesansfil.org/wiki/WiFiDog/FeatureList
+ 58. http://www.ilesansfil.org/wiki/WiFiDog/FlowDiagram
+ 59. http://www.linksys.com/products/product.asp?prid=508&scid=35
+ 60. http://auth.ilesansfil.org/hotspot_status.php
+ 61. http://www.ilesansfil.org/wiki/IleSansFil
+ 62. https://auth.ilesansfil.org/
+ 63. http://www.ilesansfil.org/wiki/WiFiDog
+ 64. http://sourceforge.net/projects/wifidog
+ 65. http://www.ilesansfil.org/wiki/WiFiDog
+ 66. http://www.ilesansfil.org/wiki/WiFi
+ 67. http://www.ilesansfil.org/wiki/WiFiDog
+ 68. http://www.ilesansfil.org/wiki/WiFiDog
+ 69. http://www.ilesansfil.org/wiki/WiFiDog
+ 70. http://www.ilesansfil.org/wiki/WiFi
+ 71. http://www.ilesansfil.org/wiki/WiFiDog
+ 72. http://www.ilesansfil.org/wiki/WiFiDog
+ 73. http://openwrt.org/
+ 74. http://openwrt.org/OpenWrtDocs
+ 75. http://www.ilesansfil.org/wiki/WiFiDog
+ 76. http://sourceforge.net/projects/wifidog
+ 77. http://www.ilesansfil.org/wiki/WiFiDog
+ 78. http://www.ilesansfil.org/wiki/WiFiDog
+ 79. http://www.ilesansfil.org/wiki/WiFiDog
+ 80. http://www.ilesansfil.org/wiki/WiFiDog
+ 81. http://www.ilesansfil.org/wiki/WiFiDog
+ 82. http://www.ilesansfil.org/wiki/WiFiDog
+ 83. http://www.ilesansfil.org/wiki/IleSansFil
+ 84. http://www.ilesansfil.org/wiki/WiFiDog
+ 85. http://www.ilesansfil.org/dist/openwrt/
+ 86. http://www.ilesansfil.org/wiki/WiFiDog
+ 87. http://www.ilesansfil.org/dist/wifidog/
+ 88. http://www.openwrt.org/
+ 89. http://www.ilesansfil.org/wiki/WiFiDog
+ 90. http://www.ilesansfil.org/wiki/WiFiDog/AuthServerDoc
+ 91. http://www.ilesansfil.org/wiki/WiFiDog/AuthServerDoc
+ 92. http://www.ilesansfil.org/wiki/WiFiDog/AuthServerDoc
+ 93. http://www.ilesansfil.org/wiki/WiFiDog/AuthServerDoc
+ 94. http://www.ilesansfil.org/wiki/MinaNaguib
diff --git a/Makefile.am b/Makefile.am
new file mode 100755
index 00000000..686ee881
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,53 @@
+# $Id$
+
+SUBDIRS = libhttpd src . doc
+
+docdir = ${prefix}/share/doc/wifidog-@VERSION@
+
+doc_DATA = \
+ AUTHORS \
+ COPYING \
+ INSTALL \
+ NEWS \
+ README \
+ ChangeLog
+
+EXTRA_DIST = \
+ FAQ \
+ wifidog.spec.in \
+ wifidog.spec \
+ config \
+ scripts \
+ contrib \
+ wifidog.conf
+
+.PHONY: doc
+doc:
+ $(MAKE) -C doc doc
+
+.PHONY: whiterussianipk
+whiterussianipk: dist
+ make -C $(OPENWRTSDK) distclean
+ mkdir -p $(OPENWRTSDK)/dl
+ cp -f ${srcdir}/wifidog-@VERSION@.tar.gz $(OPENWRTSDK)/dl/
+ make -C ${srcdir}/contrib/build-openwrt-whiterussianipk/wifidog TOPDIR=$(OPENWRTSDK) PKG_MD5SUM= V=99
+ @echo DONE. If there were no errors, your package should be in: $(OPENWRTSDK)/bin/packages/
+
+.PHONY: kamikazeipk
+kamikazeipk: dist
+ make -C $(OPENWRTSDK) distclean
+ mkdir -p $(OPENWRTSDK)/dl
+ cp -f ${srcdir}/wifidog-@VERSION@.tar.gz $(OPENWRTSDK)/dl/
+ make -C ${srcdir}/contrib/build-openwrt-kamikazeipk/wifidog TOPDIR=$(OPENWRTSDK) PKG_MD5SUM= V=99 SDK=1 DEVELOPER=1
+ @echo DONE. If there were no errors, your package should be in: $(OPENWRTSDK)/bin/packages/
+
+.PHONY: rpm
+rpm: dist
+ cp ${builddir}wifidog.spec /usr/src/RPM/SPECS
+ cp ${builddir}wifidog-@VERSION@.tar.gz /usr/src/RPM/SOURCES
+ rpmbuild -ta ${builddir}wifidog-@VERSION@.tar.gz
+
+#clean-local:
+# echo "clean-local: " && pwd
+# rm -f /usr/src/RPM/SPECS/wifidog.spec
+# rm -f /usr/src/RPM/SOURCES/wifidog-@VERSION@.tar.gz
diff --git a/NEWS b/NEWS
new file mode 100755
index 00000000..ad25e269
--- /dev/null
+++ b/NEWS
@@ -0,0 +1,116 @@
+# $Id$
+WiFiDog 1.1.5:
+ * First supported version on OpenWRT kamikaze
+
+WiFiDog 1.1.4:
+ * Fix incorrect firewal rule deletion introduced in 1.1.3rc1. Caused the incoming byte count reported to be incorrect for users that logged in a second time on a gateway that wasn't restarted in between.
+
+WiFiDog 1.1.3:
+ * Fix incomplete change to make te gateway retry external interface forever.
+ * Remove hardcoded authserver paths. Can now be defined in the config file (auth server section).
+ * Add manual logout URL, based in part on work by David Bird
+
+WiFiDog 1.1.3rc1:
+ * Close #321: Make the Gateway retry forever if it cannot find it's interface. You never know when someone may finally replug the network cable or something...
+ * Close #332: Apply patch from Laurent Marchal. biguphpcgmailcom
+ * fw_iptables.c: Fix error in iptables_fw_access(). Rules were created as ACCEPT instead of DROP
+ * firewall.c: Fix bug in fw_sync_with_authserver(). The traffic for the validation period of a user who validated his account while connected wouldn't get counted.
+ * doc/wifidog_firewall_map.dia: At long last, full documentation of the firewall. We would have avoided a lot of stupid mistakes if we produced that sooner.
+ * Release 1.1.3_rc1
+ * Fix #324
+ * wifidog.conf: Improve comments and add examples of blocking access to the upstream LAN.
+ * conf.h: The DEFAULT_CHECKINTERVAL was 5 instead of 60 (as stated in the config file) which caused huge needless load on the auth servers, and needless ping traffic towards the clients if it wasn't manually set.
+ * contrib/ Add contrib dir to collect the scripts and other code distributed with, but not really part of wifidog.
+ * Modify the build system to finally be able to build wifidog directly from the wifidog directory using the same files
+ used to make the official .ipk, without having to copy ANYTHNG to the openwrt SDK.
+ There is now a new target: make ipk make ipk OPENWRTSDK=path_to_openwrt_sdk
+
+WiFiDog 1.1.3beta6:
+ -Fix bug #238 (config file location was hardcoded)
+ -Fix problem with autodectection of the External interface if the interface isn't fully up yet. wifidog wil now retry for up to two minutes.
+
+WiFiDog 1.1.3beta4:
+ -Changed ordering in the filter.FORWARD chain
+ -Added TCPMSS rule
+ -Fixed rules bieng left over on shutdown
+ -Fixed wdctl reset problem
+
+WiFiDog 1.1.3beta2:
+ -Fix bug #65 (Whitelisted servers would still splash on port 80
+ -Fix incorrect default value for Path in the AuthServer configuration
+ -Add more info to wdctl status
+
+WiFiDog 1.1.3beta1:
+ -Added patch by wireless London to use the GW interface's mac address as the node_id
+ if no node_id is specified. It allows the use of generic configuration files without
+ the need to hardcoding the node_id in.
+ -Added TrustedMACList configuration variable which allows specifying
+ MAC addresses which are allowed to go through without authentication.
+ -New wdctl command "restart" which will get wifidog to restart itself
+ while preserving the existing clientlist. Perfect for 0-downtime
+ upgrading!
+ -libhttpd: Fixed two bugs parsing the GET query string making wifidog segfault
+
+
+WiFiDog 1.1.2:
+ - Added some informations so it compiles on newer OpenWRT's (whiterussian-rc2)
+ - Fixed minor issue with wdctl
+ - Changed the iptables rules priority to allow existing NAT rules to work
+ - read()s from central server in auth_server_request() are
+ now timed-out (via select). This is hopefully a bugfix to the
+ thread-freezing problem.
+ - Bugfix non-RFC compliant HTTP requests using \n instead of \r\n as line
+ terminations as per email from ludocornut@users.sourceforge.net
+ - Firewall: make the default ruleset for validating users = allow all
+ (except sending SMTP)
+
+Fixed issue with FAQ
+
+WiFiDog 1.1.1:
+ - An auth server on port 80 will now work
+ - Added an FAQ
+
+WiFiDog 1.1.0:
+ - Changes:
+ - Visual tweaks in the web interface
+ - Internal code & documentation touch-ups
+ - More debugging output
+ - Bugfixes:
+ - Wrong reported uptime
+ - Invalid http header sent during redirection
+ - Mixed long/long long type for counter
+ - Respect SSL setting in auth server definition
+ - Explicitly allow traffic coming into the router
+ - SIGPIPE handling
+ - Firewall destruction not occuring on wifidog termination
+
+WiFiDog 1.1.0_beta3:
+ - Completely re-did the iptables rules. Most of the rules are now in the filter table instead of the nat table. Also DROPs are now replaced with REJECTs to help tell the user connection refused instead of endless pauses
+ - wdctl status will return more informations
+ - Some error messages are now displayed by the auth server (used to be done in a non-pretty way by wifidog)
+ - We now 'ping' authserver and detect when authservers are changing IPs
+ - Fixed memory leaks
+ - Incoming and outgoing counters were reversed
+ - More verbose debugging
+ - ICMP Ping the users everytime we check their counters to keep them alive
+ - Optional ExternalInterface
+ - Optional GatewayAddress
+ - /about URL now shows wifidog version
+ - Keep track of last times we successfully & unsuccessfully spoke to the auth server/used DNS. Then, if we know we're not online, show a little apology to the user instead of re-directing them to the auth server.
+ - When pinging auth server now also sends sys_uptime, sys_memfree and sys_load
+ - Bugfix: Traffic from client to router was counted twice in the "outgoing" bytecount since it increased both counters in mangle.* and filter.* - Got rid of TABLE_WIFIDOG_WIFI_TO_GW completely since it's unneeded
+ - Do not update the last_updated field on incoming traffic - update it on outgoing traffic only. This should be a much more reliable indication of client no longer being there
+ - WiFiDog status is now viewable with a web browser at http://ip:port/wifidog/status
+
+WiFiDog 1.0.2:
+ - Fix reversed incoming and outgoing connections in statistics reported to the auth server
+ - Will now gracefully handle auth servers changing IP adress.
+ - Fixes two bugs in byte counting. (Possible missed data, and incoming and outgoing were reversed.
+ - Fixed file descriptor leaks
+ - wdctl_status now returns all connected users.
+ - worked around sed -i not being available on all platform
+ - ipkg no longuer overwrites config file
+ - Several code changes in thread handling and libhttpd to fix occasional hangs.
+
+WiFiDog 1.0.0:
+ - Initial release
diff --git a/README b/README
new file mode 100755
index 00000000..15c6bc87
--- /dev/null
+++ b/README
@@ -0,0 +1,16 @@
+#
+# $Id$
+#
+
+The WiFi Guard Dog project is a complete and embeddable captive portal
+solution for wireless community groups or individuals who wish to open a
+free HotSpot while still preventing abuse of their Internet connection.
+
+The project's homepage is:
+ http://dev.wifidog.org/
+
+Mailing list interface:
+ http://listes.ilesansfil.org/cgi-bin/mailman/listinfo/wifidog
+
+The project's software is released under the GPL license and is copyright it's respective owners.
+
diff --git a/README.openwrt b/README.openwrt
new file mode 100755
index 00000000..f40cc473
--- /dev/null
+++ b/README.openwrt
@@ -0,0 +1,96 @@
+$Id$
+
+OpenWRT specific README
+=======================
+
+So, you want to run wifidog on one of linksys's WRT wireless routers!
+
+OpenWRT is the embedded linux-gnu bundle that runs on the linksys WRT
+series routers (among numerous others).
+
+OpenWRT's home page is http://openwrt.org/
+
+---- I just want to RUN the thing: ----
+-DO NOT use the wifidog packages distributed by OpenWRT (you are asking for trouble, they are broken in various ways; you will get no support if you do)
+-Use the official wifidog packages on sourceforge (currently only available for whiterussian.
+
+---- I want to develop and test on OpenWRT ----
+
+To build wifidog so that it may be run on the linksys wrt routers you
+must first obtain the OpenWRT toolchain. This toolchain is a set of
+compilers and other software development tools that will allow you,
+running on your intel/pentium/mac computer to compile and develop software
+that is to run on the mips based linksys wrt series routers, which is
+based on another computer cpu chip entirely.
+
+You have several options for building wifidog using the OpenWRT toolchain.
+
+Option 1. get the prebuilt, minimal OpenWRT toolchain (The OpenWRT SDK), and give the makefile it's path. This is the best option, assuming you have a x86_64 Os (the SDK is distributed only for x86_64).
+
+For OpenWRT 0.9 (Whiterussian):
+ cd ~
+ wget http://downloads.openwrt.org/whiterussian/newest/OpenWrt-SDK-Linux-i686-1.tar.bz2
+ tar -jxvf OpenWrt-SDK-Linux-i686-1.tar.bz2
+ cd wifidog
+ make whiterussianipk OPENWRTSDK=~/OpenWrt-SDK-Linux-i686-1/
+
+For OpenWRT Kamikaze up till 7.09:
+ cd ~
+ wget http://downloads.openwrt.org/kamikaze/7.09/brcm-2.4/OpenWrt-SDK-brcm-2.4-for-Linux-x86_64.tar.bz2
+ tar -jxvf OpenWrt-SDK-brcm-2.4-for-Linux-x86_64.tar.bz2
+ cd wifidog
+ make kamikazeipk OPENWRTSDK=~/OpenWrt-SDK-brcm-2.4-for-Linux-x86_64
+
+For OpenWRT Kamikaze 8.09 and up, there is no SDK available and the 7.09 SDK does not work. So Option 1 is not an option. Option 2 is not an option either since building the SDK did not seem to work (https://forum.openwrt.org/viewtopic.php?id=17879). So jump to Option 3!
+
+ If it works (!) you will have an ipkg file in $(OPENWRTSDK)/bin/packages/
+ You can then boot up your OpenWrt
+ router, copy the .ipk to it, and install it using the ipkg commands.
+
+ You should also make sure that the wifidog prereqs are already
+ installed on the router before you try to run wifidog. Note that if you build the
+ packages with the instructions above, they will download the required dependencies auomatically (if you have an internet connecion on yout router) and will refuse to install without them.
+
+ The prereqs are:
+ * iptables command and modules mac, mark and MARK
+ * iptables kernel module mac
+ * libpthread
+
+ These are all packages you can install on your running OpenWrt router
+ using the ipkg commands. If the router is on the net, the ipkg
+ commands can download the packages from www.openwrt.org, just like
+ debian apt-get or fedora yum or up2date.
+
+Option 2. Build your own SDK (or find someone to do it for you)
+cd ~
+wget http://downloads.openwrt.org/kamikaze/7.09/kamikaze_7.09.tar.bz2
+tar -jxvf kamikaze_7.09.tar.bz2
+cd kamikaze_7.09
+make menuconfig #(Make sure you build the SDK in "special targets")
+make #(could take hours downloading and compiling all dependencies)
+Follow the instructions in Option 1, using the SDK you build instead of downloading it.
+
+Option 3. Use the full buildroot directly (time consuming...)
+ cd wifidog
+ make dist
+ cd ~
+ wget http://downloads.openwrt.org/kamikaze/7.09/kamikaze_7.09.tar.bz2
+ tar -jxvf kamikaze_7.09.tar.bz2
+ cp -R wifidog/contrib/build-openwrt-kamikazeipk/wifidog kamikaze_7.09/package/
+ cp wifidog/wifidog-1.1.5.tar.gz kamikaze_7.09/dl/
+ cd kamikaze_7.09
+ make menuconfig #(Follow instructions on OpenWRT's site to setup your buildroot for your platform)
+ make #(could take hours downloading and compiling all dependencies)
+
+For Kamikaze 8.09 and up, there is an extra dependency to add to the package, so here would be the new procedure
+ cd wifidog
+ make dist
+ cd ~
+ wget http://downloads.openwrt.org/kamikaze/8.09/kamikaze_8.09.tar.bz2
+ tar -jxvf kamikaze_8.09.tar.bz2
+ cp -R wifidog/contrib/build-openwrt-kamikazeipk8.09up/wifidog kamikaze_8.09/package/
+ cp wifidog/wifidog-1.1.5.tar.gz kamikaze_8.09/dl/
+ cd kamikaze_8.09
+ make menuconfig #(Follow instructions on OpenWRT's site to setup your buildroot for your platform)
+ make #(could take hours downloading and compiling all dependencies)
+
diff --git a/autogen.sh b/autogen.sh
new file mode 100755
index 00000000..b0f95786
--- /dev/null
+++ b/autogen.sh
@@ -0,0 +1,65 @@
+#!/bin/sh
+# Run this to generate all the initial makefiles, etc.
+#
+# $Id$
+
+if [ -r Makefile ]
+then
+ echo "Doing distclean"
+ make distclean
+fi
+
+if [ "X$1" != "X" ]
+then
+ BUILDROOT=`echo "$1" | sed 's/^[^=]*[=]//'`
+
+ OLDCC=${CC}
+ OLDRANLIB=${RANLIB}
+ OLDAR=${AR}
+
+ CC=${BUILDROOT}/build_mipsel/staging_dir/bin/mipsel-linux-uclibc-gcc
+ RANLIB=${BUILDROOT}/build_mipsel/staging_dir/bin/mipsel-linux-uclibc-ranlib
+ AR=${BUILDROOT}/build_mipsel/staging_dir/bin/mipsel-linux-uclibc-ar
+
+ POSTCONF=--host=mipsel
+
+ export CC
+ export RANLIB
+ export AR
+else
+ OLDCC=${CC}
+ OLDRANLIB=${RANLIB}
+ OLDAR=${AR}
+ POSTCONF=
+fi
+
+echo "Running mkdir -p config"
+mkdir -p config
+
+if [ "X"`uname` = "XDarwin" ]
+then
+ echo "Running glibtoolize --force"
+ glibtoolize --force
+else
+ echo "Running libtoolize --force"
+ libtoolize --force
+fi
+
+echo "Running aclocal"
+aclocal
+echo "Running autoheader"
+autoheader
+echo "Running automake -a"
+automake -a
+echo "Running autoconf"
+autoconf
+echo "Running ./configure ${POSTCONF} --enable-maintainer-mode $conf_flags $@"
+./configure ${POSTCONF} --enable-maintainer-mode $conf_flags "$@"
+
+CC=${OLDCC}
+RANLIB=${OLDRANLIB}
+AR=${OLDAR}
+
+export CC
+export RANLIB
+export AR
diff --git a/configure.in b/configure.in
new file mode 100755
index 00000000..cdc818c3
--- /dev/null
+++ b/configure.in
@@ -0,0 +1,105 @@
+## -*-m4-*-
+# $Id$
+
+dnl Process this file with autoconf to produce a configure script.
+
+# FILE:
+# configure.in
+#
+# FUNCTION:
+# implements checks for a variety of system-specific functions
+
+AC_INIT(src/common.h)
+AM_CONFIG_HEADER(config.h)
+AC_CONFIG_AUX_DIR(config)
+AC_PROG_CC
+AC_PROG_CXX
+#AC_PROG_RANLIB
+
+AC_SUBST(BUILDROOT)
+
+WIFIDOG_MAJOR_VERSION=1
+WIFIDOG_MINOR_VERSION=1
+WIFIDOG_MICRO_VERSION=5
+WIFIDOG_VERSION=20140822
+
+AC_SUBST(WIFIDOG_MAJOR_VERSION)
+AC_SUBST(WIFIDOG_MINOR_VERSION)
+AC_SUBST(WIFIDOG_MICRO_VERSION)
+AC_SUBST(WIFIDOG_VERSION)
+AM_INIT_AUTOMAKE(wifidog,$WIFIDOG_VERSION)
+
+
+AM_MAINTAINER_MODE
+
+AC_PROG_INSTALL
+
+AC_LIBTOOL_DLOPEN
+AM_PROG_LIBTOOL
+
+AC_ISC_POSIX
+AC_C_BIGENDIAN
+AC_PROG_MAKE_SET
+AC_HEADER_STDC
+
+
+# check for doxygen, mostly stolen from http://log4cpp.sourceforge.net/
+# ----------------------------------------------------------------------------
+AC_DEFUN([BB_ENABLE_DOXYGEN],
+[
+AC_ARG_ENABLE(doxygen, [ --enable-doxygen enable documentation generation with doxygen (auto)])
+AC_ARG_ENABLE(dot, [ --enable-dot use 'dot' to generate graphs in doxygen (auto)])
+AC_ARG_ENABLE(html-docs, [ --enable-html-docs enable HTML generation with doxygen (yes)], [], [ enable_html_docs=yes])
+AC_ARG_ENABLE(latex-docs, [ --enable-latex-docs enable LaTeX documentation generation with doxygen (no)], [], [ enable_latex_docs=no])
+if test "x$enable_doxygen" = xno; then
+ enable_doc=no
+else
+ AC_PATH_PROG(DOXYGEN, doxygen, , $PATH)
+ if test x$DOXYGEN = x; then
+ if test "x$enable_doxygen" = xyes; then
+ AC_MSG_ERROR([could not find doxygen])
+ fi
+ enable_doc=no
+ else
+ enable_doc=yes
+ AC_PATH_PROG(DOT, dot, , $PATH)
+ fi
+fi
+AM_CONDITIONAL(DOC, test x$enable_doc = xyes)
+
+if test x$DOT = x; then
+ if test "x$enable_dot" = xyes; then
+ AC_MSG_ERROR([could not find dot])
+ fi
+ enable_dot=no
+else
+ enable_dot=yes
+fi
+AM_CONDITIONAL(ENABLE_DOXYGEN, test x$enable_doc = xtrue)
+AC_SUBST(enable_dot)
+AC_SUBST(enable_html_docs)
+AC_SUBST(enable_latex_docs)
+])
+
+# Acutally perform the doxygen check
+BB_ENABLE_DOXYGEN
+
+# check for pthread
+AC_CHECK_HEADER(pthread.h, , AC_MSG_ERROR(You need the pthread headers) )
+AC_CHECK_LIB(pthread, pthread_create, , AC_MSG_ERROR(You need the pthread library) )
+
+# libhttpd dependencies
+echo "Begining libhttpd dependencies check"
+AC_CHECK_HEADERS(string.h strings.h stdarg.h unistd.h)
+AC_HAVE_LIBRARY(socket)
+AC_HAVE_LIBRARY(nsl)
+echo "libhttpd dependencies check complete"
+
+AC_OUTPUT( Makefile
+ wifidog.spec
+ wifidog-msg.html
+ src/Makefile
+ libhttpd/Makefile
+ doc/Makefile
+ )
+
diff --git a/contrib/airos/wifidog/Makefile b/contrib/airos/wifidog/Makefile
new file mode 100755
index 00000000..4195dbf1
--- /dev/null
+++ b/contrib/airos/wifidog/Makefile
@@ -0,0 +1,70 @@
+#
+# Copyright (C) 2006,2008 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=wifidog
+PKG_VERSION:=20090925
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:= @SF/$(PKG_NAME)
+PKG_MD5SUM:=
+
+PKG_FIXUP = libtool
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/wifidog
+ SUBMENU:=Captive Portals
+ SECTION:=net
+ CATEGORY:=Network
+ DEPENDS:=+iptables-mod-extra +iptables-mod-ipopt +iptables-mod-nat +iptables-mod-nat-extra +libpthread
+ TITLE:=A wireless captive portal solution
+ URL:=http://www.wifidog.org
+endef
+
+define Package/wifidog/description
+ The Wifidog project is a complete and embeddable captive
+ portal solution for wireless community groups or individuals
+ who wish to open a free Hotspot while still preventing abuse
+ of their Internet connection.
+endef
+
+define Package/wifidog/conffiles
+ /usr/etc/wifidog.conf
+endef
+
+MAKE_FLAGS += \
+ DESTDIR="$(PKG_INSTALL_DIR)" \
+ all install
+
+define Package/wifidog/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/init.d/wifidog $(1)/usr/bin/wifidog-init
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/wifidog $(1)/usr/bin/
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/wdctl $(1)/usr/bin/
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libhttpd.so* $(1)/usr/lib/
+ $(INSTALL_DIR) $(1)/usr/etc
+ $(INSTALL_DATA) ./files/wifidog.conf $(1)/usr/etc/
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/wifidog-msg.html $(1)/usr/etc/
+ $(INSTALL_DIR) $(1)/usr/etc/init.d
+ $(INSTALL_BIN) ./files/$(PKG_NAME).init $(1)/usr/etc/init.d/wifidog
+endef
+
+define Package/wifidog/postinst
+#!/bin/sh
+
+# # check if the wifidog is already running, if so restart it
+if /etc/init.d/wifidog status | grep 'Authentication servers' > /dev/null; then
+ # create copies of passwd and group, if we use squashfs
+ /etc/init.d/wifidog restart
+fi
+endef
+
+$(eval $(call BuildPackage,wifidog))
diff --git a/contrib/airos/wifidog/files.patch b/contrib/airos/wifidog/files.patch
new file mode 100755
index 00000000..a877a64b
--- /dev/null
+++ b/contrib/airos/wifidog/files.patch
@@ -0,0 +1,87 @@
+--- SDK.UBNT.v5.2.clean/openwrt/package/ubnt-base-files/files/init 2010-05-14 06:11:06.000000000 -0400
++++ SDK.UBNT.v5.2/openwrt/package/ubnt-base-files/files/init 2010-07-27 12:52:36.087267563 -0400
+@@ -64,7 +64,7 @@ echo "...filesystem init done"
+ # making sure that critical files are in place
+ mkdir -p /etc/rc.d /etc/init.d
+ # forced update
+-for f in inittab rc.d/rc.sysinit rc.d/rc rc.d/rc.stop ppp; do
++for f in inittab rc.d/rc.sysinit rc.d/rc rc.d/rc.stop ppp wifidog.conf wifidog-msg.html ; do
+ cp -f -r /usr/etc/$f /etc/$f
+ done
+ echo "...base ok"
+@@ -139,6 +139,14 @@ if [ -e /sbin/ubntconf ]; then
+ /sbin/ubntconf
+ fi
+
++#adding wifidog to startup programs
++if [ -f /usr/etc/init.d/wifidog ]; then
++ cp -f /usr/etc/init.d/wifidog /etc/sysinit/wifidog.conf
++ echo "null::respawn:/usr/bin/wifidog -f" >> /etc/inittab
++ echo "wifidog" >> /etc/startup.list
++fi
++
++
+ echo "...running /sbin/init"
+ exec /sbin/init
+
+--- SDK.UBNT.v5.2.clean/openwrt/package/ubnt-base-files/files/usr/etc/rc.d/rc.softrestart 2010-05-14 06:11:06.000000000 -0400
++++ SDK.UBNT.v5.2/openwrt/package/ubnt-base-files/files/usr/etc/rc.d/rc.softrestart 2010-07-27 12:03:15.604767622 -0400
+@@ -80,3 +80,10 @@ if [ $# -gt 0 ]; then
+ -p /etc/ 2>/dev/null &
+ fi
+ fi
++
++#adding wifidog to startup programs
++if [ -f /usr/etc/init.d/wifidog ]; then
++ cp -f /usr/etc/init.d/wifidog /etc/sysinit/wifidog.conf
++ echo "null::respawn:/usr/bin/wifidog -f" >> /etc/inittab
++ echo "wifidog" >> /etc/startup.list
++fi
+
+--- SDK.UBNT.v5.2.clean/openwrt/.config 2010-05-18 05:03:40.000000000 -0400
++++ SDK.UBNT.v5.2/openwrt/.config 2010-07-26 14:59:08.131750309 -0400
+@@ -888,7 +888,7 @@ CONFIG_PACKAGE_hotplug2=y
+ CONFIG_PACKAGE_iptables=y
+ CONFIG_PACKAGE_iptables-mod-conntrack=y
+ CONFIG_PACKAGE_iptables-mod-conntrack-extra=y
+-# CONFIG_PACKAGE_iptables-mod-extra is not set
++CONFIG_PACKAGE_iptables-mod-extra=y
+ CONFIG_PACKAGE_iptables-mod-filter=y
+ # CONFIG_PACKAGE_iptables-mod-imq is not set
+ CONFIG_PACKAGE_iptables-mod-ipopt=y
+@@ -896,7 +896,7 @@ CONFIG_PACKAGE_iptables-mod-ipopt=y
+ # CONFIG_PACKAGE_iptables-mod-ipsec is not set
+ # CONFIG_PACKAGE_iptables-mod-ipset is not set
+ CONFIG_PACKAGE_iptables-mod-nat=y
+-# CONFIG_PACKAGE_iptables-mod-nat-extra is not set
++CONFIG_PACKAGE_iptables-mod-nat-extra=y
+ # CONFIG_PACKAGE_iptables-mod-ulog is not set
+ # CONFIG_PACKAGE_iptables-utils is not set
+ # CONFIG_PACKAGE_ldconfig is not set
+@@ -963,6 +963,7 @@ CONFIG_PACKAGE_php2=y
+ #
+ # Network
+ #
++CONFIG_PACKAGE_wifidog=y
+
+ #
+ # Monitoring
+@@ -1149,7 +1150,7 @@ CONFIG_PACKAGE_kmod-ebtables=y
+ CONFIG_PACKAGE_kmod-ipt-core=y
+ CONFIG_PACKAGE_kmod-ipt-conntrack=y
+ CONFIG_PACKAGE_kmod-ipt-conntrack-extra=y
+-# CONFIG_PACKAGE_kmod-ipt-extra is not set
++CONFIG_PACKAGE_kmod-ipt-extra=y
+ CONFIG_PACKAGE_kmod-ipt-filter=y
+ # CONFIG_PACKAGE_kmod-ipt-imq is not set
+ CONFIG_PACKAGE_kmod-ipt-ipopt=y
+@@ -1157,7 +1158,7 @@ CONFIG_PACKAGE_kmod-ipt-ipopt=y
+ # CONFIG_PACKAGE_kmod-ipt-ipsec is not set
+ # CONFIG_PACKAGE_kmod-ipt-ipset is not set
+ CONFIG_PACKAGE_kmod-ipt-nat=y
+-# CONFIG_PACKAGE_kmod-ipt-nat-extra is not set
++CONFIG_PACKAGE_kmod-ipt-nat-extra=y
+ CONFIG_PACKAGE_kmod-ipt-nathelper=y
+ # CONFIG_PACKAGE_kmod-ipt-nathelper-extra is not set
+ # CONFIG_PACKAGE_kmod-ipt-queue is not set
+
diff --git a/contrib/airos/wifidog/files/wifidog.conf b/contrib/airos/wifidog/files/wifidog.conf
new file mode 100755
index 00000000..32e9ea90
--- /dev/null
+++ b/contrib/airos/wifidog/files/wifidog.conf
@@ -0,0 +1,253 @@
+# $Id: wifidog.conf 1375 2008-09-30 10:20:06Z wichert $
+# WiFiDog Configuration file
+
+# Parameter: GatewayID
+# Default: default
+# Optional
+#
+# Set this to the node ID on the auth server
+# This is used to give a customized login page to the clients and for
+# monitoring/statistics purpose. If you run multiple gateways on the same
+# machine each gateway needs to have a different gateway id.
+# If none is supplied, the mac address of the GatewayInterface interface will be used,
+# without the : separators
+
+# GatewayID default
+
+# Parameter: ExternalInterface
+# Default: NONE
+# Optional
+#
+# Set this to the external interface (the one going out to the Inernet or your larger LAN).
+# Typically vlan1 for OpenWrt, and eth0 or ppp0 otherwise,
+# Normally autodetected
+
+# ExternalInterface eth0
+
+# Parameter: GatewayInterface
+# Default: NONE
+# Mandatory
+#
+# Set this to the internal interface (typically your wifi interface).
+# Typically br0 for whiterussian, br-lan for kamikaze (by default the wifi interface is bridged with wired lan in openwrt)
+# and eth1, wlan0, ath0, etc. otherwise
+# You can get this interface with the ifconfig command and finding your wifi interface
+
+GatewayInterface eth0
+
+# Parameter: GatewayAddress
+# Default: Find it from GatewayInterface
+# Optional
+#
+# Set this to the internal IP address of the gateway. Not normally required.
+
+# GatewayAddress 192.168.1.1
+
+# Parameter: HtmlMessageFile
+# Default: wifidog-msg.html
+# Optional
+#
+# This allows you to specify a custome HTML file which will be used for
+# system errors by the gateway. Any $title, $message and $node variables
+# used inside the file will be replaced.
+#
+# HtmlMessageFile /opt/wifidog/etc/wifidog-.html
+
+# Parameter: AuthServer
+# Default: NONE
+# Mandatory, repeatable
+#
+# This allows you to configure your auth server(s). Each one will be tried in order, untill one responds.
+# Set this to the hostname or IP of your auth server(s), the path where
+# WiFiDog-auth resides in and the port it listens on.
+#AuthServer {
+# Hostname (Mandatory; Default: NONE)
+# SSLAvailable (Optional; Default: no; Possible values: yes, no)
+# SSLPort (Optional; Default: 443)
+# HTTPPort (Optional; Default: 80)
+# Path (Optional; Default: /wifidog/ Note: The path must be both prefixed and suffixed by /. Use a single / for server root.)
+# LoginScriptPathFragment (Optional; Default: login/? Note: This is the script the user will be sent to for login.)
+# PortalScriptPathFragment (Optional; Default: portal/? Note: This is the script the user will be sent to after a successfull login.)
+# MsgScriptPathFragment (Optional; Default: gw_message.php? Note: This is the script the user will be sent to upon error to read a readable message.)
+# PingScriptPathFragment (Optional; Default: ping/? Note: This is the script the user will be sent to upon error to read a readable message.)
+# AuthScriptPathFragment (Optional; Default: auth/? Note: This is the script the user will be sent to upon error to read a readable message.)
+#}
+
+#AuthServer {
+# Hostname auth.ilesansfil.org
+# SSLAvailable yes
+# Path /
+#}
+
+#AuthServer {
+# Hostname auth2.ilesansfil.org
+# SSLAvailable yes
+# Path /
+#}
+
+# Parameter: Daemon
+# Default: 1
+# Optional
+#
+# Set this to true if you want to run as a daemon
+# Daemon 1
+
+# Parameter: GatewayPort
+# Default: 2060
+# Optional
+#
+# Listen on this port
+# GatewayPort 2060
+
+# Parameter: ProxyPort
+# Default: 0 (disable)
+# Optional
+#
+# Redirect http traffic of knowns & probations users
+# to a local transparent proxy listening on ProxyPort port
+# ProxyPort 0
+
+# Parameter: HTTPDName
+# Default: WiFiDog
+# Optional
+#
+# Define what name the HTTPD server will respond
+# HTTPDName WiFiDog
+
+# Parameter: HTTPDMaxConn
+# Default: 10
+# Optional
+#
+# How many sockets to listen to
+# HTTPDMaxConn 10
+
+# Parameter: HTTPDRealm
+# Default: WiFiDog
+# Optional
+#
+# The name of the HTTP authentication realm. This only used when a user
+# tries to access a protected WiFiDog internal page. See HTTPUserName.
+# HTTPDRealm WiFiDog
+
+# Parameter: HTTPDUserName / HTTPDPassword
+# Default: unset
+# Optional
+#
+# The gateway exposes some information such as the status page through its web
+# interface. This information can be protected with a username and password,
+# which can be set through the HTTPDUserName and HTTPDPassword parameters.
+# HTTPDUserName admin
+# HTTPDPassword secret
+
+# Parameter: CheckInterval
+# Default: 60
+# Optional
+#
+# How many seconds should we wait between timeout checks. This is also
+# how often the gateway will ping the auth server and how often it will
+# update the traffic counters on the auth server. Setting this too low
+# wastes bandwidth, setting this too high will cause the gateway to take
+# a long time to switch to it's backup auth server(s).
+
+# CheckInterval 60
+
+# Parameter: ClientTimeout
+# Default: 5
+# Optional
+#
+# Set this to the desired of number of CheckInterval of inactivity before a client is logged out
+# The timeout will be INTERVAL * TIMEOUT
+ClientTimeout 5
+
+# Parameter: TrustedMACList
+# Default: none
+# Optional
+#
+# Comma separated list of MAC addresses who are allowed to pass
+# through without authentication
+#TrustedMACList 00:00:DE:AD:BE:AF,00:00:C0:1D:F0:0D
+
+# Parameter: FirewallRuleSet
+# Default: none
+# Mandatory
+#
+# Groups a number of FirewallRule statements together.
+
+# Parameter: FirewallRule
+# Default: none
+#
+# Define one firewall rule in a rule set.
+
+# Rule Set: global
+#
+# Used for rules to be applied to all other rulesets except locked.
+FirewallRuleSet global {
+ ## To block SMTP out, as it's a tech support nightmare, and a legal liability
+ #FirewallRule block tcp port 25
+
+ ## Use the following if you don't want clients to be able to access machines on
+ ## the private LAN that gives internet access to wifidog. Note that this is not
+ ## client isolation; The laptops will still be able to talk to one another, as
+ ## well as to any machine bridged to the wifi of the router.
+ # FirewallRule block to 192.168.0.0/16
+ # FirewallRule block to 172.16.0.0/12
+ # FirewallRule block to 10.0.0.0/8
+
+ ## This is an example ruleset for the Teliphone service.
+ #FirewallRule allow udp to 69.90.89.192/27
+ #FirewallRule allow udp to 69.90.85.0/27
+ #FirewallRule allow tcp port 80 to 69.90.89.205
+
+ ## Use the following to log or ulog the traffic you want to allow or block.
+ # For OPENWRT: use of these feature requires modules ipt_LOG or ipt_ULOG present in dependencies
+ # iptables-mod-extra and iptables-mod-ulog (to adapt it to the linux distribution).
+ # Note: the log or ulog rule must be passed before, the rule you want to match.
+ # for openwrt: use of these feature requires modules ipt_LOG or ipt_ULOG present in dependencies
+ # iptables-mod-extra and iptables-mod-ulog
+ # For example, you want to log (ulog works the same way) the traffic allowed on port 80 to the ip 69.90.89.205:
+ #FirewallRule log tcp port 80 to 69.90.89.205
+ #FirewallRule allow tcp port 80 to 69.90.89.205
+ # And you want to know, who matche your block rule:
+ #FirewallRule log to 0.0.0.0/0
+ #FirewallRule block to 0.0.0.0/0
+}
+
+# Rule Set: validating-users
+#
+# Used for new users validating their account
+FirewallRuleSet validating-users {
+ FirewallRule allow to 0.0.0.0/0
+}
+
+# Rule Set: known-users
+#
+# Used for normal validated users.
+FirewallRuleSet known-users {
+ FirewallRule allow to 0.0.0.0/0
+}
+
+# Rule Set: auth-is-down
+#
+# Used when auth server is down
+FirewallRuleSet auth-is-down {
+# FirewallRule allow to 0.0.0.0/0
+}
+
+# Rule Set: unknown-users
+#
+# Used for unvalidated users, this is the ruleset that gets redirected.
+#
+# XXX The redirect code adds the Default DROP clause.
+FirewallRuleSet unknown-users {
+ FirewallRule allow udp port 53
+ FirewallRule allow tcp port 53
+ FirewallRule allow udp port 67
+ FirewallRule allow tcp port 67
+}
+
+# Rule Set: locked-users
+#
+# Not currently used
+FirewallRuleSet locked-users {
+ FirewallRule block to 0.0.0.0/0
+}
diff --git a/contrib/airos/wifidog/files/wifidog.init b/contrib/airos/wifidog/files/wifidog.init
new file mode 100755
index 00000000..2c6857e9
--- /dev/null
+++ b/contrib/airos/wifidog/files/wifidog.init
@@ -0,0 +1,27 @@
+plugin_start() {
+ echo "Inserting kernel modules: "
+ insmod ip_conntrack
+ insmod ip_nat
+ insmod ip_tables
+ insmod ipt_MARK
+ insmod ipt_mark
+ insmod ipt_mac
+ insmod ipt_REDIRECT
+ insmod ipt_MASQUERADE
+ insmod ipt_state
+ insmod iptable_mangle
+ insmod iptable_nat
+ insmod iptable_filter
+
+ # echo "Starting wifidog: "
+
+ #/usr/bin/wifidog-init start
+ echo
+ true
+}
+plugin_stop() {
+ killall wifidog
+ #/usr/bin/wifidog-init stop
+ true
+}
+
diff --git a/contrib/airos/wifidog/patches/100-counter_outoing.patch b/contrib/airos/wifidog/patches/100-counter_outoing.patch
new file mode 100755
index 00000000..3fa8a1ad
--- /dev/null
+++ b/contrib/airos/wifidog/patches/100-counter_outoing.patch
@@ -0,0 +1,24 @@
+--- a/src/fw_iptables.c 2009-09-18 19:01:57.000000000 -0400
++++ b/src/fw_iptables.c 2010-08-21 19:37:28.975094088 -0400
+@@ -513,6 +513,7 @@ iptables_fw_counters_update(void)
+ char *script,
+ ip[16],
+ rc;
++ char mystring[250];
+ unsigned long long int counter;
+ t_client *p1;
+ struct in_addr tempaddr;
+@@ -533,8 +534,11 @@ iptables_fw_counters_update(void)
+ while (('\n' != fgetc(output)) && !feof(output))
+ ;
+ while (output && !(feof(output))) {
+- rc = fscanf(output, "%*s %llu %*s %*s %*s %*s %*s %15[0-9.] %*s %*s %*s %*s %*s %*s", &counter, ip);
++ rc = fgets(mystring,250,output);
++ rc = sscanf(mystring, "%*s %llu %*s %*s %*s %*s %*s %15[0-9.]", &counter, ip);
++ //rc = fscanf(output, "%*s %llu %*s %*s %*s %*s %*s %15[0-9.] %*s %*s %*s %*s %*s %*s", &counter, ip);
+ //rc = fscanf(output, "%*s %llu %*s %*s %*s %*s %*s %15[0-9.] %*s %*s %*s %*s %*s 0x%*u", &counter, ip);
++
+ if (2 == rc && EOF != rc) {
+ /* Sanity*/
+ if (!inet_aton(ip, &tempaddr)) {
+
diff --git a/contrib/airos/wifidog/readme.txt b/contrib/airos/wifidog/readme.txt
new file mode 100755
index 00000000..38e28aa3
--- /dev/null
+++ b/contrib/airos/wifidog/readme.txt
@@ -0,0 +1,43 @@
+-- Compiling airos with the wifidog package running at boot
+
+Because airos doesn't have a package manager like opkf and has a (mostly) read-only file system, we need to build the the firmware with wifidog in it to have wifidog running on airos
+
+1- Get the latest wifidog source code tarball from sourceforge (http://sourceforge.net/projects/wifidog/files/) and copy it to the ~/dev/wifidog directory
+
+2- Get the wifidog airos package directory
+
+cd ~/dev/wifidog
+wget http://dev.wifidog.org/wiki/doc/install/airos/wifidog_airos.tar.gz
+tar xvzf wifidog_airos.tar.gz
+
+If compiling from source, this directory is located in wifidog/contrib/airos
+
+3- Download the airos SDK from http://www.ubnt.com/support/downloads and copy it to the ~/dev/airos directory
+
+4- Untar the SDK and prepare the files
+
+cd ~/dev/airos
+tar xvjf SDK.UBNT.v5.2.tar.bz2
+cd SDK.UBNT.v5.2
+
+cd openwrt/package
+ln -s ~/dev/wifidog/airos/wifidog/
+cd ../dl
+ln -s ~/dev/wifidog/wifidog-20090925.tar.gz
+
+cd ../..
+patch -p1 < openwrt/package/wifidog/files.patch
+
+5- Prepare the wifidog.conf file for your network, since airos is readonly, changes to the config files cannot be done in the router
+
+cd ~/dev/airos/SDK.UBNT.v5.2/openwrt
+mkdir -p files/usr/etc
+cp package/wifidog/files/wifidog.conf files/usr/etc/wifidog.conf
+
+6- Edit the files/usr/etc/wifidog.conf file for your authentication server settings. Also the GatewayInterface may need to be changed if you are not using a SOHO router configuration (eth0 for SOHO router, ath0 for router)
+
+7- Make the os
+
+make world V=99
+
+8- Your new image should be available in the openwrt/bin directory as XM.v5.2....bin
diff --git a/contrib/build-deb/changelog b/contrib/build-deb/changelog
new file mode 100755
index 00000000..d0274250
--- /dev/null
+++ b/contrib/build-deb/changelog
@@ -0,0 +1,14 @@
+wifidog (1.0.0-1) stable; urgency=low
+
+ * New init.d file.
+ * Inclu
+ * debian/rules: Configuration and init.d file added.
+ * Bump version in anticipation for release
+
+ -- Guillaume Beaudoin Sun, 29 Aug 2004 23:14:12 -0400
+
+wifidog (0.2.0-1) stable; urgency=low
+
+ * Initial Package
+
+ -- Philippe April Wed, 21 Jul 2004 15:22:50 -0500
diff --git a/contrib/build-deb/control b/contrib/build-deb/control
new file mode 100755
index 00000000..330f63af
--- /dev/null
+++ b/contrib/build-deb/control
@@ -0,0 +1,15 @@
+Source: wifidog
+Section: net
+Priority: optional
+Maintainer: Philippe April
+
+Package: wifidog
+Architecture: any
+Depends: iptables, modutils, grep, mawk | awk
+Provides: libhttpd
+Description: The WiFi Guard Dog client
+ The WiFi Gaurd Dog project is a complete and embeddable captive portal
+ solution for wireless community groups or individuals who wish to open
+ a free HotSpot while still preventing abuse of their Internet connection.
+ .
+ This package contains only the client part.
diff --git a/contrib/build-deb/rules b/contrib/build-deb/rules
new file mode 100755
index 00000000..45291ed2
--- /dev/null
+++ b/contrib/build-deb/rules
@@ -0,0 +1,74 @@
+#!/usr/bin/make -f
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+build: build-stamp
+build-stamp:
+ dh_testdir
+
+ ./configure --prefix=/usr
+ $(MAKE)
+
+ touch build-stamp
+
+clean:
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp
+
+ -$(MAKE) clean
+ -$(MAKE) distclean
+
+ dh_clean
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+
+ $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
+ mkdir -p $(CURDIR)/debian/tmp/etc
+ cp wifidog.conf $(CURDIR)/debian/tmp/etc
+ cp scripts/init.d/wifidog debian/wifidog.init
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+ dh_testdir
+ dh_testroot
+ dh_installchangelogs
+ dh_installdocs
+# dh_installexamples
+# dh_install
+# dh_installmenu
+# dh_installdebconf
+# dh_installlogrotate
+# dh_installemacsen
+# dh_installcatalogs
+# dh_installpam
+# dh_installmime
+ dh_installinit
+# dh_installcron
+# dh_installinfo
+# dh_undocumented
+ dh_installman
+ dh_link
+ dh_strip
+ dh_compress
+ dh_fixperms
+# dh_perl
+# dh_python
+ dh_makeshlibs
+ dh_installdeb
+# dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install
diff --git a/contrib/build-openwrt-kamikazeipk/wifidog/Makefile b/contrib/build-openwrt-kamikazeipk/wifidog/Makefile
new file mode 100755
index 00000000..adec69eb
--- /dev/null
+++ b/contrib/build-openwrt-kamikazeipk/wifidog/Makefile
@@ -0,0 +1,62 @@
+#
+# Copyright (C) 2006,2008 OpenWrt.org
+# Copyright (C) 2008 Technologies Coeus inc.
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+# $Id$
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=wifidog
+PKG_VERSION:=20090925
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:= @SF/$(PKG_NAME)
+PKG_MD5SUM:=
+
+PKG_FIXUP = libtool
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/wifidog
+ SUBMENU:=Captive Portals
+ SECTION:=net
+ CATEGORY:=Network
+ DEPENDS:=+kmod-ipt-extra +iptables-mod-extra +kmod-ipt-ipopt +iptables-mod-ipopt +kmod-ipt-nat +iptables-mod-nat +libpthread
+ TITLE:=A wireless captive portal solution
+ URL:=http://www.wifidog.org
+endef
+
+define Package/wifidog/description
+ The Wifidog project is a complete and embeddable captive
+ portal solution for wireless community groups or individuals
+ who wish to open a free Hotspot while still preventing abuse
+ of their Internet connection.
+endef
+
+define Package/wifidog/conffiles
+/etc/wifidog.conf
+endef
+
+MAKE_FLAGS += \
+ DESTDIR="$(PKG_INSTALL_DIR)" \
+ all install
+
+define Package/wifidog/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/init.d/wifidog $(1)/usr/bin/wifidog-init
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/wifidog $(1)/usr/bin/
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/wdctl $(1)/usr/bin/
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libhttpd.so* $(1)/usr/lib/
+ $(INSTALL_DIR) $(1)/etc
+ $(INSTALL_DATA) ./files/wifidog.conf $(1)/etc/
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/wifidog-msg.html $(1)/etc/
+ $(INSTALL_DIR) $(1)/etc/init.d
+ $(INSTALL_BIN) ./files/$(PKG_NAME).init $(1)/etc/init.d/wifidog
+endef
+
+$(eval $(call BuildPackage,wifidog))
diff --git a/contrib/build-openwrt-kamikazeipk/wifidog/files/wifidog.conf b/contrib/build-openwrt-kamikazeipk/wifidog/files/wifidog.conf
new file mode 100755
index 00000000..c905f04c
--- /dev/null
+++ b/contrib/build-openwrt-kamikazeipk/wifidog/files/wifidog.conf
@@ -0,0 +1,246 @@
+# $Id: wifidog.conf 1375 2008-09-30 10:20:06Z wichert $
+# WiFiDog Configuration file
+
+# Parameter: GatewayID
+# Default: default
+# Optional
+#
+# Set this to the node ID on the auth server
+# This is used to give a customized login page to the clients and for
+# monitoring/statistics purpose. If you run multiple gateways on the same
+# machine each gateway needs to have a different gateway id.
+# If none is supplied, the mac address of the GatewayInterface interface will be used,
+# without the : separators
+
+# GatewayID default
+
+# Parameter: ExternalInterface
+# Default: NONE
+# Optional
+#
+# Set this to the external interface (the one going out to the Inernet or your larger LAN).
+# Typically vlan1 for OpenWrt, and eth0 or ppp0 otherwise,
+# Normally autodetected
+
+# ExternalInterface eth0
+
+# Parameter: GatewayInterface
+# Default: NONE
+# Mandatory
+#
+# Set this to the internal interface (typically your wifi interface).
+# Typically br0 for whiterussian, br-lan for kamikaze (by default the wifi interface is bridged with wired lan in openwrt)
+# and eth1, wlan0, ath0, etc. otherwise
+# You can get this interface with the ifconfig command and finding your wifi interface
+
+GatewayInterface br-lan
+
+# Parameter: GatewayAddress
+# Default: Find it from GatewayInterface
+# Optional
+#
+# Set this to the internal IP address of the gateway. Not normally required.
+
+# GatewayAddress 192.168.1.1
+
+# Parameter: HtmlMessageFile
+# Default: wifidog-msg.html
+# Optional
+#
+# This allows you to specify a custome HTML file which will be used for
+# system errors by the gateway. Any $title, $message and $node variables
+# used inside the file will be replaced.
+#
+# HtmlMessageFile /opt/wifidog/etc/wifidog-.html
+
+# Parameter: AuthServer
+# Default: NONE
+# Mandatory, repeatable
+#
+# This allows you to configure your auth server(s). Each one will be tried in order, untill one responds.
+# Set this to the hostname or IP of your auth server(s), the path where
+# WiFiDog-auth resides in and the port it listens on.
+#AuthServer {
+# Hostname (Mandatory; Default: NONE)
+# SSLAvailable (Optional; Default: no; Possible values: yes, no)
+# SSLPort (Optional; Default: 443)
+# HTTPPort (Optional; Default: 80)
+# Path (Optional; Default: /wifidog/ Note: The path must be both prefixed and suffixed by /. Use a single / for server root.)
+# LoginScriptPathFragment (Optional; Default: login/? Note: This is the script the user will be sent to for login.)
+# PortalScriptPathFragment (Optional; Default: portal/? Note: This is the script the user will be sent to after a successfull login.)
+# MsgScriptPathFragment (Optional; Default: gw_message.php? Note: This is the script the user will be sent to upon error to read a readable message.)
+# PingScriptPathFragment (Optional; Default: ping/? Note: This is the script the user will be sent to upon error to read a readable message.)
+# AuthScriptPathFragment (Optional; Default: auth/? Note: This is the script the user will be sent to upon error to read a readable message.)
+#}
+
+#AuthServer {
+# Hostname auth.ilesansfil.org
+# SSLAvailable yes
+# Path /
+#}
+
+#AuthServer {
+# Hostname auth2.ilesansfil.org
+# SSLAvailable yes
+# Path /
+#}
+
+# Parameter: Daemon
+# Default: 1
+# Optional
+#
+# Set this to true if you want to run as a daemon
+# Daemon 1
+
+# Parameter: GatewayPort
+# Default: 2060
+# Optional
+#
+# Listen on this port
+# GatewayPort 2060
+
+# Parameter: ProxyPort
+# Default: 0 (disable)
+# Optional
+#
+# Redirect http traffic of knowns & probations users
+# to a local transparent proxy listening on ProxyPort port
+# ProxyPort 0
+
+# Parameter: HTTPDName
+# Default: WiFiDog
+# Optional
+#
+# Define what name the HTTPD server will respond
+# HTTPDName WiFiDog
+
+# Parameter: HTTPDMaxConn
+# Default: 10
+# Optional
+#
+# How many sockets to listen to
+# HTTPDMaxConn 10
+
+# Parameter: HTTPDRealm
+# Default: WiFiDog
+# Optional
+#
+# The name of the HTTP authentication realm. This only used when a user
+# tries to access a protected WiFiDog internal page. See HTTPUserName.
+# HTTPDRealm WiFiDog
+
+# Parameter: HTTPDUserName / HTTPDPassword
+# Default: unset
+# Optional
+#
+# The gateway exposes some information such as the status page through its web
+# interface. This information can be protected with a username and password,
+# which can be set through the HTTPDUserName and HTTPDPassword parameters.
+# HTTPDUserName admin
+# HTTPDPassword secret
+
+# Parameter: CheckInterval
+# Default: 60
+# Optional
+#
+# How many seconds should we wait between timeout checks. This is also
+# how often the gateway will ping the auth server and how often it will
+# update the traffic counters on the auth server. Setting this too low
+# wastes bandwidth, setting this too high will cause the gateway to take
+# a long time to switch to it's backup auth server(s).
+
+# CheckInterval 60
+
+# Parameter: ClientTimeout
+# Default: 5
+# Optional
+#
+# Set this to the desired of number of CheckInterval of inactivity before a client is logged out
+# The timeout will be INTERVAL * TIMEOUT
+ClientTimeout 5
+
+# Parameter: TrustedMACList
+# Default: none
+# Optional
+#
+# Comma separated list of MAC addresses who are allowed to pass
+# through without authentication
+#TrustedMACList 00:00:DE:AD:BE:AF,00:00:C0:1D:F0:0D
+
+# Parameter: FirewallRuleSet
+# Default: none
+# Mandatory
+#
+# Groups a number of FirewallRule statements together.
+
+# Parameter: FirewallRule
+# Default: none
+#
+# Define one firewall rule in a rule set.
+
+# Rule Set: global
+#
+# Used for rules to be applied to all other rulesets except locked.
+FirewallRuleSet global {
+ ## To block SMTP out, as it's a tech support nightmare, and a legal liability
+ #FirewallRule block tcp port 25
+
+ ## Use the following if you don't want clients to be able to access machines on
+ ## the private LAN that gives internet access to wifidog. Note that this is not
+ ## client isolation; The laptops will still be able to talk to one another, as
+ ## well as to any machine bridged to the wifi of the router.
+ # FirewallRule block to 192.168.0.0/16
+ # FirewallRule block to 172.16.0.0/12
+ # FirewallRule block to 10.0.0.0/8
+
+ ## This is an example ruleset for the Teliphone service.
+ #FirewallRule allow udp to 69.90.89.192/27
+ #FirewallRule allow udp to 69.90.85.0/27
+ #FirewallRule allow tcp port 80 to 69.90.89.205
+
+ ## Use the following to log or ulog the traffic you want to allow or block.
+ # For OPENWRT: use of these feature requires modules ipt_LOG or ipt_ULOG present in dependencies
+ # iptables-mod-extra and iptables-mod-ulog (to adapt it to the linux distribution).
+ # Note: the log or ulog rule must be passed before, the rule you want to match.
+ # for openwrt: use of these feature requires modules ipt_LOG or ipt_ULOG present in dependencies
+ # iptables-mod-extra and iptables-mod-ulog
+ # For example, you want to log (ulog works the same way) the traffic allowed on port 80 to the ip 69.90.89.205:
+ #FirewallRule log tcp port 80 to 69.90.89.205
+ #FirewallRule allow tcp port 80 to 69.90.89.205
+ # And you want to know, who matche your block rule:
+ #FirewallRule log to 0.0.0.0/0
+ #FirewallRule block to 0.0.0.0/0
+}
+
+# Rule Set: validating-users
+#
+# Used for new users validating their account
+FirewallRuleSet validating-users {
+ FirewallRule allow to 0.0.0.0/0
+}
+
+# Rule Set: known-users
+#
+# Used for normal validated users.
+FirewallRuleSet known-users {
+ FirewallRule allow to 0.0.0.0/0
+}
+
+# Rule Set: unknown-users
+#
+# Used for unvalidated users, this is the ruleset that gets redirected.
+#
+# XXX The redirect code adds the Default DROP clause.
+FirewallRuleSet unknown-users {
+ FirewallRule allow udp port 53
+ FirewallRule allow tcp port 53
+ FirewallRule allow udp port 67
+ FirewallRule allow tcp port 67
+}
+
+# Rule Set: locked-users
+#
+# Not currently used
+FirewallRuleSet locked-users {
+ FirewallRule block to 0.0.0.0/0
+}
diff --git a/contrib/build-openwrt-kamikazeipk/wifidog/files/wifidog.init b/contrib/build-openwrt-kamikazeipk/wifidog/files/wifidog.init
new file mode 100755
index 00000000..68d4eea6
--- /dev/null
+++ b/contrib/build-openwrt-kamikazeipk/wifidog/files/wifidog.init
@@ -0,0 +1,18 @@
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006 OpenWrt.org
+START=65
+EXTRA_COMMANDS="status"
+EXTRA_HELP=" status Print the status of the service"
+
+
+start() {
+ /usr/bin/wifidog-init start
+}
+
+stop() {
+ /usr/bin/wifidog-init stop
+}
+
+status() {
+ /usr/bin/wifidog-init status
+}
\ No newline at end of file
diff --git a/contrib/build-openwrt-kamikazeipk8.09up/wifidog/Makefile b/contrib/build-openwrt-kamikazeipk8.09up/wifidog/Makefile
new file mode 100755
index 00000000..3be5dbbf
--- /dev/null
+++ b/contrib/build-openwrt-kamikazeipk8.09up/wifidog/Makefile
@@ -0,0 +1,60 @@
+#
+# Copyright (C) 2006,2008 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=wifidog
+PKG_VERSION:=20090925
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:= @SF/$(PKG_NAME)
+PKG_MD5SUM:=
+
+PKG_FIXUP = libtool
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/wifidog
+ SUBMENU:=Captive Portals
+ SECTION:=net
+ CATEGORY:=Network
+ DEPENDS:=+iptables-mod-extra +iptables-mod-ipopt +iptables-mod-nat +iptables-mod-nat-extra +libpthread
+ TITLE:=A wireless captive portal solution
+ URL:=http://www.wifidog.org
+endef
+
+define Package/wifidog/description
+ The Wifidog project is a complete and embeddable captive
+ portal solution for wireless community groups or individuals
+ who wish to open a free Hotspot while still preventing abuse
+ of their Internet connection.
+endef
+
+define Package/wifidog/conffiles
+/etc/wifidog.conf
+endef
+
+MAKE_FLAGS += \
+ DESTDIR="$(PKG_INSTALL_DIR)" \
+ all install
+
+define Package/wifidog/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/init.d/wifidog $(1)/usr/bin/wifidog-init
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/wifidog $(1)/usr/bin/
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/wdctl $(1)/usr/bin/
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libhttpd.so* $(1)/usr/lib/
+ $(INSTALL_DIR) $(1)/etc
+ $(INSTALL_DATA) ./files/wifidog.conf $(1)/etc/
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/wifidog-msg.html $(1)/etc/
+ $(INSTALL_DIR) $(1)/etc/init.d
+ $(INSTALL_BIN) ./files/$(PKG_NAME).init $(1)/etc/init.d/wifidog
+endef
+
+$(eval $(call BuildPackage,wifidog))
diff --git a/contrib/build-openwrt-kamikazeipk8.09up/wifidog/files/wifidog.conf b/contrib/build-openwrt-kamikazeipk8.09up/wifidog/files/wifidog.conf
new file mode 100755
index 00000000..c905f04c
--- /dev/null
+++ b/contrib/build-openwrt-kamikazeipk8.09up/wifidog/files/wifidog.conf
@@ -0,0 +1,246 @@
+# $Id: wifidog.conf 1375 2008-09-30 10:20:06Z wichert $
+# WiFiDog Configuration file
+
+# Parameter: GatewayID
+# Default: default
+# Optional
+#
+# Set this to the node ID on the auth server
+# This is used to give a customized login page to the clients and for
+# monitoring/statistics purpose. If you run multiple gateways on the same
+# machine each gateway needs to have a different gateway id.
+# If none is supplied, the mac address of the GatewayInterface interface will be used,
+# without the : separators
+
+# GatewayID default
+
+# Parameter: ExternalInterface
+# Default: NONE
+# Optional
+#
+# Set this to the external interface (the one going out to the Inernet or your larger LAN).
+# Typically vlan1 for OpenWrt, and eth0 or ppp0 otherwise,
+# Normally autodetected
+
+# ExternalInterface eth0
+
+# Parameter: GatewayInterface
+# Default: NONE
+# Mandatory
+#
+# Set this to the internal interface (typically your wifi interface).
+# Typically br0 for whiterussian, br-lan for kamikaze (by default the wifi interface is bridged with wired lan in openwrt)
+# and eth1, wlan0, ath0, etc. otherwise
+# You can get this interface with the ifconfig command and finding your wifi interface
+
+GatewayInterface br-lan
+
+# Parameter: GatewayAddress
+# Default: Find it from GatewayInterface
+# Optional
+#
+# Set this to the internal IP address of the gateway. Not normally required.
+
+# GatewayAddress 192.168.1.1
+
+# Parameter: HtmlMessageFile
+# Default: wifidog-msg.html
+# Optional
+#
+# This allows you to specify a custome HTML file which will be used for
+# system errors by the gateway. Any $title, $message and $node variables
+# used inside the file will be replaced.
+#
+# HtmlMessageFile /opt/wifidog/etc/wifidog-.html
+
+# Parameter: AuthServer
+# Default: NONE
+# Mandatory, repeatable
+#
+# This allows you to configure your auth server(s). Each one will be tried in order, untill one responds.
+# Set this to the hostname or IP of your auth server(s), the path where
+# WiFiDog-auth resides in and the port it listens on.
+#AuthServer {
+# Hostname (Mandatory; Default: NONE)
+# SSLAvailable (Optional; Default: no; Possible values: yes, no)
+# SSLPort (Optional; Default: 443)
+# HTTPPort (Optional; Default: 80)
+# Path (Optional; Default: /wifidog/ Note: The path must be both prefixed and suffixed by /. Use a single / for server root.)
+# LoginScriptPathFragment (Optional; Default: login/? Note: This is the script the user will be sent to for login.)
+# PortalScriptPathFragment (Optional; Default: portal/? Note: This is the script the user will be sent to after a successfull login.)
+# MsgScriptPathFragment (Optional; Default: gw_message.php? Note: This is the script the user will be sent to upon error to read a readable message.)
+# PingScriptPathFragment (Optional; Default: ping/? Note: This is the script the user will be sent to upon error to read a readable message.)
+# AuthScriptPathFragment (Optional; Default: auth/? Note: This is the script the user will be sent to upon error to read a readable message.)
+#}
+
+#AuthServer {
+# Hostname auth.ilesansfil.org
+# SSLAvailable yes
+# Path /
+#}
+
+#AuthServer {
+# Hostname auth2.ilesansfil.org
+# SSLAvailable yes
+# Path /
+#}
+
+# Parameter: Daemon
+# Default: 1
+# Optional
+#
+# Set this to true if you want to run as a daemon
+# Daemon 1
+
+# Parameter: GatewayPort
+# Default: 2060
+# Optional
+#
+# Listen on this port
+# GatewayPort 2060
+
+# Parameter: ProxyPort
+# Default: 0 (disable)
+# Optional
+#
+# Redirect http traffic of knowns & probations users
+# to a local transparent proxy listening on ProxyPort port
+# ProxyPort 0
+
+# Parameter: HTTPDName
+# Default: WiFiDog
+# Optional
+#
+# Define what name the HTTPD server will respond
+# HTTPDName WiFiDog
+
+# Parameter: HTTPDMaxConn
+# Default: 10
+# Optional
+#
+# How many sockets to listen to
+# HTTPDMaxConn 10
+
+# Parameter: HTTPDRealm
+# Default: WiFiDog
+# Optional
+#
+# The name of the HTTP authentication realm. This only used when a user
+# tries to access a protected WiFiDog internal page. See HTTPUserName.
+# HTTPDRealm WiFiDog
+
+# Parameter: HTTPDUserName / HTTPDPassword
+# Default: unset
+# Optional
+#
+# The gateway exposes some information such as the status page through its web
+# interface. This information can be protected with a username and password,
+# which can be set through the HTTPDUserName and HTTPDPassword parameters.
+# HTTPDUserName admin
+# HTTPDPassword secret
+
+# Parameter: CheckInterval
+# Default: 60
+# Optional
+#
+# How many seconds should we wait between timeout checks. This is also
+# how often the gateway will ping the auth server and how often it will
+# update the traffic counters on the auth server. Setting this too low
+# wastes bandwidth, setting this too high will cause the gateway to take
+# a long time to switch to it's backup auth server(s).
+
+# CheckInterval 60
+
+# Parameter: ClientTimeout
+# Default: 5
+# Optional
+#
+# Set this to the desired of number of CheckInterval of inactivity before a client is logged out
+# The timeout will be INTERVAL * TIMEOUT
+ClientTimeout 5
+
+# Parameter: TrustedMACList
+# Default: none
+# Optional
+#
+# Comma separated list of MAC addresses who are allowed to pass
+# through without authentication
+#TrustedMACList 00:00:DE:AD:BE:AF,00:00:C0:1D:F0:0D
+
+# Parameter: FirewallRuleSet
+# Default: none
+# Mandatory
+#
+# Groups a number of FirewallRule statements together.
+
+# Parameter: FirewallRule
+# Default: none
+#
+# Define one firewall rule in a rule set.
+
+# Rule Set: global
+#
+# Used for rules to be applied to all other rulesets except locked.
+FirewallRuleSet global {
+ ## To block SMTP out, as it's a tech support nightmare, and a legal liability
+ #FirewallRule block tcp port 25
+
+ ## Use the following if you don't want clients to be able to access machines on
+ ## the private LAN that gives internet access to wifidog. Note that this is not
+ ## client isolation; The laptops will still be able to talk to one another, as
+ ## well as to any machine bridged to the wifi of the router.
+ # FirewallRule block to 192.168.0.0/16
+ # FirewallRule block to 172.16.0.0/12
+ # FirewallRule block to 10.0.0.0/8
+
+ ## This is an example ruleset for the Teliphone service.
+ #FirewallRule allow udp to 69.90.89.192/27
+ #FirewallRule allow udp to 69.90.85.0/27
+ #FirewallRule allow tcp port 80 to 69.90.89.205
+
+ ## Use the following to log or ulog the traffic you want to allow or block.
+ # For OPENWRT: use of these feature requires modules ipt_LOG or ipt_ULOG present in dependencies
+ # iptables-mod-extra and iptables-mod-ulog (to adapt it to the linux distribution).
+ # Note: the log or ulog rule must be passed before, the rule you want to match.
+ # for openwrt: use of these feature requires modules ipt_LOG or ipt_ULOG present in dependencies
+ # iptables-mod-extra and iptables-mod-ulog
+ # For example, you want to log (ulog works the same way) the traffic allowed on port 80 to the ip 69.90.89.205:
+ #FirewallRule log tcp port 80 to 69.90.89.205
+ #FirewallRule allow tcp port 80 to 69.90.89.205
+ # And you want to know, who matche your block rule:
+ #FirewallRule log to 0.0.0.0/0
+ #FirewallRule block to 0.0.0.0/0
+}
+
+# Rule Set: validating-users
+#
+# Used for new users validating their account
+FirewallRuleSet validating-users {
+ FirewallRule allow to 0.0.0.0/0
+}
+
+# Rule Set: known-users
+#
+# Used for normal validated users.
+FirewallRuleSet known-users {
+ FirewallRule allow to 0.0.0.0/0
+}
+
+# Rule Set: unknown-users
+#
+# Used for unvalidated users, this is the ruleset that gets redirected.
+#
+# XXX The redirect code adds the Default DROP clause.
+FirewallRuleSet unknown-users {
+ FirewallRule allow udp port 53
+ FirewallRule allow tcp port 53
+ FirewallRule allow udp port 67
+ FirewallRule allow tcp port 67
+}
+
+# Rule Set: locked-users
+#
+# Not currently used
+FirewallRuleSet locked-users {
+ FirewallRule block to 0.0.0.0/0
+}
diff --git a/contrib/build-openwrt-kamikazeipk8.09up/wifidog/files/wifidog.init b/contrib/build-openwrt-kamikazeipk8.09up/wifidog/files/wifidog.init
new file mode 100755
index 00000000..1cbbafda
--- /dev/null
+++ b/contrib/build-openwrt-kamikazeipk8.09up/wifidog/files/wifidog.init
@@ -0,0 +1,17 @@
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006 OpenWrt.org
+START=65
+EXTRA_COMMANDS="status"
+EXTRA_HELP=" status Print the status of the service"
+
+start() {
+ /usr/bin/wifidog-init start
+}
+
+stop() {
+ /usr/bin/wifidog-init stop
+}
+
+status() {
+ /usr/bin/wifidog-init status
+}
diff --git a/contrib/build-openwrt-whiterussianipk/wifidog/Config.in b/contrib/build-openwrt-whiterussianipk/wifidog/Config.in
new file mode 100755
index 00000000..7b67874b
--- /dev/null
+++ b/contrib/build-openwrt-whiterussianipk/wifidog/Config.in
@@ -0,0 +1,16 @@
+config BR2_PACKAGE_WIFIDOG
+ prompt "wifidog........................... A wireless captive portal solution"
+ tristate
+ default m if CONFIG_DEVEL
+ select BR2_PACKAGE_LIBPTHREAD
+ select BR2_PACKAGE_IPTABLES
+ select BR2_PACKAGE_IPTABLES_MOD_NAT
+ select BR2_PACKAGE_IPTABLES-MOD_IPOPT
+ help
+ The Wifidog project is a complete and embeddable captive
+ portal solution for wireless community groups or individuals
+ who wish to open a free Hotspot while still preventing abuse
+ of their Internet connection.
+
+ http://dev.wifidog.org/
+
diff --git a/contrib/build-openwrt-whiterussianipk/wifidog/Makefile b/contrib/build-openwrt-whiterussianipk/wifidog/Makefile
new file mode 100755
index 00000000..42df3f22
--- /dev/null
+++ b/contrib/build-openwrt-whiterussianipk/wifidog/Makefile
@@ -0,0 +1,65 @@
+# $Id: $
+ifndef TOPDIR
+ ERR := $(Please set TOPDIR to OpenWRT SDK's buildroot)
+endif
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=wifidog
+PKG_VERSION:=20090925
+PKG_RELEASE:=1
+PKG_MD5SUM:=
+
+PKG_SOURCE_URL:= @SF/$(PKG_NAME)
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_CAT:=zcat
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
+PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
+include $(TOPDIR)/package/rules.mk
+$(eval $(call PKG_template,WIFIDOG,$(PKG_NAME),$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
+$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared
+ (cd $(PKG_BUILD_DIR); \
+ $(TARGET_CONFIGURE_OPTS) \
+ CFLAGS="$(TARGET_CFLAGS)" \
+ CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
+ LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
+ ./configure \
+ --target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --without-libiconv-prefix \
+ --without-libintl-prefix \
+ --disable-nls \
+ );
+ ## Add software specific configurable options above
+ ## See : ./configure --help
+ touch $@
+
+$(PKG_BUILD_DIR)/.built:
+ $(MAKE) -C $(PKG_BUILD_DIR) \
+ $(TARGET_CONFIGURE_OPTS)
+ mkdir -p $(PKG_INSTALL_DIR)
+ $(MAKE) -C $(PKG_BUILD_DIR) \
+ DESTDIR="$(PKG_INSTALL_DIR)" \
+ all install
+ touch $@
+
+$(IPKG_WIFIDOG):
+ install -m0755 -d $(IDIR_WIFIDOG)/etc/init.d
+ install -m0755 ./files/$(PKG_NAME).init $(IDIR_WIFIDOG)/etc/init.d/S65wifidog
+ install -m0644 ./files/wifidog.conf $(IDIR_WIFIDOG)/etc/
+ install -m0644 $(PKG_BUILD_DIR)/wifidog-msg.html $(IDIR_WIFIDOG)/etc/
+ install -m0755 -d $(IDIR_WIFIDOG)/usr/bin
+ install -m0755 -d $(IDIR_WIFIDOG)/usr/lib
+ install -m0755 $(PKG_BUILD_DIR)/scripts/init.d/wifidog $(IDIR_WIFIDOG)/usr/bin/wifidog-init
+ $(CP) $(PKG_INSTALL_DIR)/usr/bin/wifidog $(IDIR_WIFIDOG)/usr/bin/
+ $(CP) $(PKG_INSTALL_DIR)/usr/bin/wdctl $(IDIR_WIFIDOG)/usr/bin/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libhttpd.so* $(IDIR_WIFIDOG)/usr/lib/
+ $(RSTRIP) $(IDIR_WIFIDOG)
+ $(IPKG_BUILD) $(IDIR_WIFIDOG) $(PACKAGE_DIR)
+mostlyclean:
+ make -C $(PKG_BUILD_DIR) clean
+ rm $(PKG_BUILD_DIR)/.built
+all: $(IPKG_WIFIDOG)
\ No newline at end of file
diff --git a/contrib/build-openwrt-whiterussianipk/wifidog/files/wifidog.conf b/contrib/build-openwrt-whiterussianipk/wifidog/files/wifidog.conf
new file mode 100755
index 00000000..c275b887
--- /dev/null
+++ b/contrib/build-openwrt-whiterussianipk/wifidog/files/wifidog.conf
@@ -0,0 +1,246 @@
+# $Id: wifidog.conf 1375 2008-09-30 10:20:06Z wichert $
+# WiFiDog Configuration file
+
+# Parameter: GatewayID
+# Default: default
+# Optional
+#
+# Set this to the node ID on the auth server
+# This is used to give a customized login page to the clients and for
+# monitoring/statistics purpose. If you run multiple gateways on the same
+# machine each gateway needs to have a different gateway id.
+# If none is supplied, the mac address of the GatewayInterface interface will be used,
+# without the : separators
+
+# GatewayID default
+
+# Parameter: ExternalInterface
+# Default: NONE
+# Optional
+#
+# Set this to the external interface (the one going out to the Inernet or your larger LAN).
+# Typically vlan1 for OpenWrt, and eth0 or ppp0 otherwise,
+# Normally autodetected
+
+# ExternalInterface eth0
+
+# Parameter: GatewayInterface
+# Default: NONE
+# Mandatory
+#
+# Set this to the internal interface (typically your wifi interface).
+# Typically br0 for whiterussian, br-lan for kamikaze (by default the wifi interface is bridged with wired lan in openwrt)
+# and eth1, wlan0, ath0, etc. otherwise
+# You can get this interface with the ifconfig command and finding your wifi interface
+
+GatewayInterface br0
+
+# Parameter: GatewayAddress
+# Default: Find it from GatewayInterface
+# Optional
+#
+# Set this to the internal IP address of the gateway. Not normally required.
+
+# GatewayAddress 192.168.1.1
+
+# Parameter: HtmlMessageFile
+# Default: wifidog-msg.html
+# Optional
+#
+# This allows you to specify a custome HTML file which will be used for
+# system errors by the gateway. Any $title, $message and $node variables
+# used inside the file will be replaced.
+#
+# HtmlMessageFile /opt/wifidog/etc/wifidog-.html
+
+# Parameter: AuthServer
+# Default: NONE
+# Mandatory, repeatable
+#
+# This allows you to configure your auth server(s). Each one will be tried in order, untill one responds.
+# Set this to the hostname or IP of your auth server(s), the path where
+# WiFiDog-auth resides in and the port it listens on.
+#AuthServer {
+# Hostname (Mandatory; Default: NONE)
+# SSLAvailable (Optional; Default: no; Possible values: yes, no)
+# SSLPort (Optional; Default: 443)
+# HTTPPort (Optional; Default: 80)
+# Path (Optional; Default: /wifidog/ Note: The path must be both prefixed and suffixed by /. Use a single / for server root.)
+# LoginScriptPathFragment (Optional; Default: login/? Note: This is the script the user will be sent to for login.)
+# PortalScriptPathFragment (Optional; Default: portal/? Note: This is the script the user will be sent to after a successfull login.)
+# MsgScriptPathFragment (Optional; Default: gw_message.php? Note: This is the script the user will be sent to upon error to read a readable message.)
+# PingScriptPathFragment (Optional; Default: ping/? Note: This is the script the user will be sent to upon error to read a readable message.)
+# AuthScriptPathFragment (Optional; Default: auth/? Note: This is the script the user will be sent to upon error to read a readable message.)
+#}
+
+#AuthServer {
+# Hostname auth.ilesansfil.org
+# SSLAvailable yes
+# Path /
+#}
+
+#AuthServer {
+# Hostname auth2.ilesansfil.org
+# SSLAvailable yes
+# Path /
+#}
+
+# Parameter: Daemon
+# Default: 1
+# Optional
+#
+# Set this to true if you want to run as a daemon
+# Daemon 1
+
+# Parameter: GatewayPort
+# Default: 2060
+# Optional
+#
+# Listen on this port
+# GatewayPort 2060
+
+# Parameter: ProxyPort
+# Default: 0 (disable)
+# Optional
+#
+# Redirect http traffic of knowns & probations users
+# to a local transparent proxy listening on ProxyPort port
+# ProxyPort 0
+
+# Parameter: HTTPDName
+# Default: WiFiDog
+# Optional
+#
+# Define what name the HTTPD server will respond
+# HTTPDName WiFiDog
+
+# Parameter: HTTPDMaxConn
+# Default: 10
+# Optional
+#
+# How many sockets to listen to
+# HTTPDMaxConn 10
+
+# Parameter: HTTPDRealm
+# Default: WiFiDog
+# Optional
+#
+# The name of the HTTP authentication realm. This only used when a user
+# tries to access a protected WiFiDog internal page. See HTTPUserName.
+# HTTPDRealm WiFiDog
+
+# Parameter: HTTPDUserName / HTTPDPassword
+# Default: unset
+# Optional
+#
+# The gateway exposes some information such as the status page through its web
+# interface. This information can be protected with a username and password,
+# which can be set through the HTTPDUserName and HTTPDPassword parameters.
+# HTTPDUserName admin
+# HTTPDPassword secret
+
+# Parameter: CheckInterval
+# Default: 60
+# Optional
+#
+# How many seconds should we wait between timeout checks. This is also
+# how often the gateway will ping the auth server and how often it will
+# update the traffic counters on the auth server. Setting this too low
+# wastes bandwidth, setting this too high will cause the gateway to take
+# a long time to switch to it's backup auth server(s).
+
+# CheckInterval 60
+
+# Parameter: ClientTimeout
+# Default: 5
+# Optional
+#
+# Set this to the desired of number of CheckInterval of inactivity before a client is logged out
+# The timeout will be INTERVAL * TIMEOUT
+ClientTimeout 5
+
+# Parameter: TrustedMACList
+# Default: none
+# Optional
+#
+# Comma separated list of MAC addresses who are allowed to pass
+# through without authentication
+#TrustedMACList 00:00:DE:AD:BE:AF,00:00:C0:1D:F0:0D
+
+# Parameter: FirewallRuleSet
+# Default: none
+# Mandatory
+#
+# Groups a number of FirewallRule statements together.
+
+# Parameter: FirewallRule
+# Default: none
+#
+# Define one firewall rule in a rule set.
+
+# Rule Set: global
+#
+# Used for rules to be applied to all other rulesets except locked.
+FirewallRuleSet global {
+ ## To block SMTP out, as it's a tech support nightmare, and a legal liability
+ #FirewallRule block tcp port 25
+
+ ## Use the following if you don't want clients to be able to access machines on
+ ## the private LAN that gives internet access to wifidog. Note that this is not
+ ## client isolation; The laptops will still be able to talk to one another, as
+ ## well as to any machine bridged to the wifi of the router.
+ # FirewallRule block to 192.168.0.0/16
+ # FirewallRule block to 172.16.0.0/12
+ # FirewallRule block to 10.0.0.0/8
+
+ ## This is an example ruleset for the Teliphone service.
+ #FirewallRule allow udp to 69.90.89.192/27
+ #FirewallRule allow udp to 69.90.85.0/27
+ #FirewallRule allow tcp port 80 to 69.90.89.205
+
+ ## Use the following to log or ulog the traffic you want to allow or block.
+ # For OPENWRT: use of these feature requires modules ipt_LOG or ipt_ULOG present in dependencies
+ # iptables-mod-extra and iptables-mod-ulog (to adapt it to the linux distribution).
+ # Note: the log or ulog rule must be passed before, the rule you want to match.
+ # for openwrt: use of these feature requires modules ipt_LOG or ipt_ULOG present in dependencies
+ # iptables-mod-extra and iptables-mod-ulog
+ # For example, you want to log (ulog works the same way) the traffic allowed on port 80 to the ip 69.90.89.205:
+ #FirewallRule log tcp port 80 to 69.90.89.205
+ #FirewallRule allow tcp port 80 to 69.90.89.205
+ # And you want to know, who matche your block rule:
+ #FirewallRule log to 0.0.0.0/0
+ #FirewallRule block to 0.0.0.0/0
+}
+
+# Rule Set: validating-users
+#
+# Used for new users validating their account
+FirewallRuleSet validating-users {
+ FirewallRule allow to 0.0.0.0/0
+}
+
+# Rule Set: known-users
+#
+# Used for normal validated users.
+FirewallRuleSet known-users {
+ FirewallRule allow to 0.0.0.0/0
+}
+
+# Rule Set: unknown-users
+#
+# Used for unvalidated users, this is the ruleset that gets redirected.
+#
+# XXX The redirect code adds the Default DROP clause.
+FirewallRuleSet unknown-users {
+ FirewallRule allow udp port 53
+ FirewallRule allow tcp port 53
+ FirewallRule allow udp port 67
+ FirewallRule allow tcp port 67
+}
+
+# Rule Set: locked-users
+#
+# Not currently used
+FirewallRuleSet locked-users {
+ FirewallRule block to 0.0.0.0/0
+}
diff --git a/contrib/build-openwrt-whiterussianipk/wifidog/files/wifidog.init b/contrib/build-openwrt-whiterussianipk/wifidog/files/wifidog.init
new file mode 100755
index 00000000..44a272a6
--- /dev/null
+++ b/contrib/build-openwrt-whiterussianipk/wifidog/files/wifidog.init
@@ -0,0 +1,15 @@
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006 OpenWrt.org
+START=50
+
+start() {
+ /usr/bin/wifidog-init start
+}
+
+stop() {
+ /usr/bin/wifidog-init stop
+}
+
+status() {
+ /usr/bin/wifidog-init status
+}
\ No newline at end of file
diff --git a/contrib/build-openwrt-whiterussianipk/wifidog/ipkg/wifidog.conffiles b/contrib/build-openwrt-whiterussianipk/wifidog/ipkg/wifidog.conffiles
new file mode 100755
index 00000000..aaa3dd14
--- /dev/null
+++ b/contrib/build-openwrt-whiterussianipk/wifidog/ipkg/wifidog.conffiles
@@ -0,0 +1 @@
+/etc/wifidog.conf
diff --git a/contrib/build-openwrt-whiterussianipk/wifidog/ipkg/wifidog.control b/contrib/build-openwrt-whiterussianipk/wifidog/ipkg/wifidog.control
new file mode 100755
index 00000000..dcf25e87
--- /dev/null
+++ b/contrib/build-openwrt-whiterussianipk/wifidog/ipkg/wifidog.control
@@ -0,0 +1,8 @@
+Package: wifidog
+Priority: optional
+Section: net
+Depends: libpthread, iptables, iptables-mod-nat, iptables-mod-ipopt
+Description: WiFiDog is a complete and embeddable captive portal
+ solution for wireless community groups or individuals who
+ wish to open a free Hotspot while still preventing abuse
+ of their Internet connection.
diff --git a/contrib/dump_fw.sh b/contrib/dump_fw.sh
new file mode 100755
index 00000000..37552efd
--- /dev/null
+++ b/contrib/dump_fw.sh
@@ -0,0 +1,5 @@
+#!sh
+iptables --list --table filter
+iptables --list --table mangle
+iptables --list --table nat
+
diff --git a/doc/Makefile.am b/doc/Makefile.am
new file mode 100755
index 00000000..85cc11d5
--- /dev/null
+++ b/doc/Makefile.am
@@ -0,0 +1,52 @@
+SUBDIRS =
+
+docdir = ${prefix}/share/doc/wifidog-@VERSION@
+
+EXTRA_DIST = \
+ doxygen.cfg \
+ doxygen.cfg.in \
+ README.developers.txt
+
+all:
+
+doc: doxygen.cfg
+ echo "doc: " && pwd && echo "distdir: " && echo $(distdir)
+ rm -rf html/ refman.pdf
+ $(DOXYGEN) doxygen.cfg
+# $(MAKE) -C latex/
+# mv latex/refman.pdf ./refman.pdf
+
+dist-hook: doxygen.cfg
+ echo "dist-hook: " && pwd
+ cd $(srcdir) && pwd && rm -rf html refman.pdf && $(DOXYGEN) doxygen.cfg
+ cp -rp html ${distdir}
+
+clean-local:
+ echo "clean-local: " && pwd
+ rm -rf latex/
+ rm -f *~
+ rm -f doxygen.log
+ rm -f doxygen.cfg
+
+maintainer-clean-local: clean-local
+ echo "maintainer-clean-local: " && pwd
+ rm -rf html refman.pdf
+
+install-data-hook:
+ $(mkinstalldirs) $(DESTDIR)$(docdir)
+ mkdir -p html #Workaround to allow libofx-cvs user to install without doc.
+ cp -rp html $(DESTDIR)$(docdir)
+
+uninstall-hook:
+ chmod +w -R $(DESTDIR)${docdir}/html #Why chmod is needed is a mystery
+ rm -rf $(DESTDIR)${docdir}/html
+
+## We borrow guile's convention and use @-...-@ as the substitution
+## brackets here, instead of the usual @...@. This prevents autoconf
+## from substituting the values directly into the left-hand sides of
+## the sed substitutions.
+doxygen.cfg: doxygen.cfg.in Makefile
+ rm -f $@.tmp
+ sed < $< > $@.tmp \
+ -e 's:@-top_srcdir-@:${top_srcdir}:g'
+ mv $@.tmp $@
\ No newline at end of file
diff --git a/doc/README.developers.txt b/doc/README.developers.txt
new file mode 100755
index 00000000..d19645dd
--- /dev/null
+++ b/doc/README.developers.txt
@@ -0,0 +1,37 @@
+
+$Id$
+
+
+This file contains some small notes on developing the WiFiDog application.
+
+The application's home page is:
+ http://www.ilesansfil.org/wiki/WiFiDog
+
+The application's sourceforge page is:
+ http://sourceforge.net/projects/wifidog/
+
+As a developer, you must subscribe to sourceforge as a "developer" under WiFiDog, as well as subscribe to the WiFiDog mailing list located at:
+ http://listes.ilesansfil.org/cgi-bin/mailman/listinfo/wifidog
+
+
+SOURCE CODE:
+ - Please do not contribute unless you agree with the GPL license and are contributing your portion under that license. See the included LICENSE.txt
+ - Please respect the intellectual property of others. You are not allowed to taint WiFiDog by including source code from projects that do not allow so.
+ - Keep in mind that this application will run on extremely simple embedded devices. The binary size needs to be small, the dependencies absolutely minimal, and the memory footprint negligible.
+ - Always place the subversion "Id" macro at the top of every file
+ - Since this is a collaborative project, please aim for clearness instead of cleverness when faced with a choice.
+ - If you must use some cleverness, please add appropriate clear comments.
+ - Please re-indent your code before committing to subversion - see the "Formatting Your Source Code" section in the GNU Coding Standards at http://www.gnu.org/prep/standards_toc.html - the entire document makes a good reading if you haven't read it before. Also see the "indent" program.
+ - Before writing any brand-new large chunks of code, make sure it's logic has been discussed with the other team of developers or included in the design stage.
+
+
+MEMORY ALLOCATION IN SOURCE CODE:
+ - Safe versions of C functions that allocate memory (safe_malloc, safe_asprintf, etc..) have been created in safe.c . You must use them instead of the original functions.
+ - If you need to use a memory-allocating C function that does not have a safe version in safe.c, create the safe wrapper first (following the template of the others) and use that instead of calling the original.
+
+
+DOCUMENTATION:
+ - Please use DoxyGen-style comments (see http://www.doxygen.org/ for details) for source code documentation.
+ - Please use DocBook-SGML documentation for user documentation. This will make it easy to export documentation in multiple formats. Otherwise submit your documentation in plaintext format to someone who will change it to DocBook.
+ - Please thoroughly-comment non-clear sections in your code.
+
diff --git a/doc/doxygen.cfg.in b/doc/doxygen.cfg.in
new file mode 100755
index 00000000..41b0857f
--- /dev/null
+++ b/doc/doxygen.cfg.in
@@ -0,0 +1,1294 @@
+# Doxyfile 1.5.3
+
+# This file describes the settings to be used by the documentation system
+# doxygen (www.doxygen.org) for a project
+#
+# All text after a hash (#) is considered a comment and will be ignored
+# The format is:
+# TAG = value [value, ...]
+# For lists items can also be appended using:
+# TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (" ")
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+
+# This tag specifies the encoding used for all characters in the config file that
+# follow. The default is UTF-8 which is also the encoding used for all text before
+# the first occurrence of this tag. Doxygen uses libiconv (or the iconv built into
+# libc) for the transcoding. See http://www.gnu.org/software/libiconv for the list of
+# possible encodings.
+
+DOXYFILE_ENCODING = UTF-8
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
+# by quotes) that should identify the project.
+
+PROJECT_NAME = WifiDog
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number.
+# This could be handy for archiving the generated documentation or
+# if some version control system is used.
+
+PROJECT_NUMBER =
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
+# base path where the generated documentation will be put.
+# If a relative path is entered, it will be relative to the location
+# where doxygen was started. If left blank the current directory will be used.
+
+OUTPUT_DIRECTORY =
+
+# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
+# 4096 sub-directories (in 2 levels) under the output directory of each output
+# format and will distribute the generated files over these directories.
+# Enabling this option can be useful when feeding doxygen a huge amount of
+# source files, where putting all generated files in the same directory would
+# otherwise cause performance problems for the file system.
+
+CREATE_SUBDIRS = NO
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all
+# documentation generated by doxygen is written. Doxygen will use this
+# information to generate all constant output in the proper language.
+# The default language is English, other supported languages are:
+# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional,
+# Croatian, Czech, Danish, Dutch, Finnish, French, German, Greek, Hungarian,
+# Italian, Japanese, Japanese-en (Japanese with English messages), Korean,
+# Korean-en, Lithuanian, Norwegian, Polish, Portuguese, Romanian, Russian,
+# Serbian, Slovak, Slovene, Spanish, Swedish, and Ukrainian.
+
+OUTPUT_LANGUAGE = English
+
+# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
+# include brief member descriptions after the members that are listed in
+# the file and class documentation (similar to JavaDoc).
+# Set to NO to disable this.
+
+BRIEF_MEMBER_DESC = YES
+
+# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
+# the brief description of a member or function before the detailed description.
+# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
+# brief descriptions will be completely suppressed.
+
+REPEAT_BRIEF = YES
+
+# This tag implements a quasi-intelligent brief description abbreviator
+# that is used to form the text in various listings. Each string
+# in this list, if found as the leading text of the brief description, will be
+# stripped from the text and the result after processing the whole list, is
+# used as the annotated text. Otherwise, the brief description is used as-is.
+# If left blank, the following values are used ("$name" is automatically
+# replaced with the name of the entity): "The $name class" "The $name widget"
+# "The $name file" "is" "provides" "specifies" "contains"
+# "represents" "a" "an" "the"
+
+ABBREVIATE_BRIEF =
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
+# Doxygen will generate a detailed section even if there is only a brief
+# description.
+
+ALWAYS_DETAILED_SEC = YES
+
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
+# inherited members of a class in the documentation of that class as if those
+# members were ordinary class members. Constructors, destructors and assignment
+# operators of the base classes will not be shown.
+
+INLINE_INHERITED_MEMB = NO
+
+# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
+# path before files name in the file list and in the header files. If set
+# to NO the shortest path that makes the file name unique will be used.
+
+FULL_PATH_NAMES = NO
+
+# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
+# can be used to strip a user-defined part of the path. Stripping is
+# only done if one of the specified strings matches the left-hand part of
+# the path. The tag can be used to show relative paths in the file list.
+# If left blank the directory from which doxygen is run is used as the
+# path to strip.
+
+STRIP_FROM_PATH =
+
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
+# the path mentioned in the documentation of a class, which tells
+# the reader which header file to include in order to use a class.
+# If left blank only the name of the header file containing the class
+# definition is used. Otherwise one should specify the include paths that
+# are normally passed to the compiler using the -I flag.
+
+STRIP_FROM_INC_PATH =
+
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
+# (but less readable) file names. This can be useful is your file systems
+# doesn't support long names like on DOS, Mac, or CD-ROM.
+
+SHORT_NAMES = NO
+
+# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
+# will interpret the first line (until the first dot) of a JavaDoc-style
+# comment as the brief description. If set to NO, the JavaDoc
+# comments will behave just like regular Qt-style comments
+# (thus requiring an explicit @brief command for a brief description.)
+
+JAVADOC_AUTOBRIEF = NO
+
+# If the QT_AUTOBRIEF tag is set to YES then Doxygen will
+# interpret the first line (until the first dot) of a Qt-style
+# comment as the brief description. If set to NO, the comments
+# will behave just like regular Qt-style comments (thus requiring
+# an explicit \brief command for a brief description.)
+
+QT_AUTOBRIEF = NO
+
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
+# treat a multi-line C++ special comment block (i.e. a block of //! or ///
+# comments) as a brief description. This used to be the default behaviour.
+# The new default is to treat a multi-line C++ comment block as a detailed
+# description. Set this tag to YES if you prefer the old behaviour instead.
+
+MULTILINE_CPP_IS_BRIEF = NO
+
+# If the DETAILS_AT_TOP tag is set to YES then Doxygen
+# will output the detailed description near the top, like JavaDoc.
+# If set to NO, the detailed description appears after the member
+# documentation.
+
+DETAILS_AT_TOP = NO
+
+# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
+# member inherits the documentation from any documented member that it
+# re-implements.
+
+INHERIT_DOCS = YES
+
+# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce
+# a new page for each member. If set to NO, the documentation of a member will
+# be part of the file/class/namespace that contains it.
+
+SEPARATE_MEMBER_PAGES = NO
+
+# The TAB_SIZE tag can be used to set the number of spaces in a tab.
+# Doxygen uses this value to replace tabs by spaces in code fragments.
+
+TAB_SIZE = 8
+
+# This tag can be used to specify a number of aliases that acts
+# as commands in the documentation. An alias has the form "name=value".
+# For example adding "sideeffect=\par Side Effects:\n" will allow you to
+# put the command \sideeffect (or @sideeffect) in the documentation, which
+# will result in a user-defined paragraph with heading "Side Effects:".
+# You can put \n's in the value part of an alias to insert newlines.
+
+ALIASES =
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C
+# sources only. Doxygen will then generate output that is more tailored for C.
+# For instance, some of the names that are used will be different. The list
+# of all members will be omitted, etc.
+
+OPTIMIZE_OUTPUT_FOR_C = YES
+
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java
+# sources only. Doxygen will then generate output that is more tailored for Java.
+# For instance, namespaces will be presented as packages, qualified scopes
+# will look different, etc.
+
+OPTIMIZE_OUTPUT_JAVA = NO
+
+# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want to
+# include (a tag file for) the STL sources as input, then you should
+# set this tag to YES in order to let doxygen match functions declarations and
+# definitions whose arguments contain STL classes (e.g. func(std::string); v.s.
+# func(std::string) {}). This also make the inheritance and collaboration
+# diagrams that involve STL classes more complete and accurate.
+
+BUILTIN_STL_SUPPORT = NO
+
+# If you use Microsoft's C++/CLI language, you should set this option to YES to
+# enable parsing support.
+
+CPP_CLI_SUPPORT = NO
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
+# tag is set to YES, then doxygen will reuse the documentation of the first
+# member in the group (if any) for the other members of the group. By default
+# all members of a group must be documented explicitly.
+
+DISTRIBUTE_GROUP_DOC = YES
+
+# Set the SUBGROUPING tag to YES (the default) to allow class member groups of
+# the same type (for instance a group of public functions) to be put as a
+# subgroup of that type (e.g. under the Public Functions section). Set it to
+# NO to prevent subgrouping. Alternatively, this can be done per class using
+# the \nosubgrouping command.
+
+SUBGROUPING = YES
+
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+
+# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
+# documentation are documented, even if no documentation was available.
+# Private class members and static file members will be hidden unless
+# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
+
+EXTRACT_ALL = NO
+
+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
+# will be included in the documentation.
+
+EXTRACT_PRIVATE = NO
+
+# If the EXTRACT_STATIC tag is set to YES all static members of a file
+# will be included in the documentation.
+
+EXTRACT_STATIC = YES
+
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
+# defined locally in source files will be included in the documentation.
+# If set to NO only classes defined in header files are included.
+
+EXTRACT_LOCAL_CLASSES = YES
+
+# This flag is only useful for Objective-C code. When set to YES local
+# methods, which are defined in the implementation section but not in
+# the interface are included in the documentation.
+# If set to NO (the default) only methods in the interface are included.
+
+EXTRACT_LOCAL_METHODS = NO
+
+# If this flag is set to YES, the members of anonymous namespaces will be extracted
+# and appear in the documentation as a namespace called 'anonymous_namespace{file}',
+# where file will be replaced with the base name of the file that contains the anonymous
+# namespace. By default anonymous namespace are hidden.
+
+EXTRACT_ANON_NSPACES = NO
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
+# undocumented members of documented classes, files or namespaces.
+# If set to NO (the default) these members will be included in the
+# various overviews, but no documentation section is generated.
+# This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_MEMBERS = NO
+
+# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
+# undocumented classes that are normally visible in the class hierarchy.
+# If set to NO (the default) these classes will be included in the various
+# overviews. This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_CLASSES = NO
+
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
+# friend (class|struct|union) declarations.
+# If set to NO (the default) these declarations will be included in the
+# documentation.
+
+HIDE_FRIEND_COMPOUNDS = NO
+
+# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any
+# documentation blocks found inside the body of a function.
+# If set to NO (the default) these blocks will be appended to the
+# function's detailed documentation block.
+
+HIDE_IN_BODY_DOCS = NO
+
+# The INTERNAL_DOCS tag determines if documentation
+# that is typed after a \internal command is included. If the tag is set
+# to NO (the default) then the documentation will be excluded.
+# Set it to YES to include the internal documentation.
+
+INTERNAL_DOCS = NO
+
+# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
+# file names in lower-case letters. If set to YES upper-case letters are also
+# allowed. This is useful if you have classes or files whose names only differ
+# in case and if your file system supports case sensitive file names. Windows
+# and Mac users are advised to set this option to NO.
+
+CASE_SENSE_NAMES = YES
+
+# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
+# will show members with their full class and namespace scopes in the
+# documentation. If set to YES the scope will be hidden.
+
+HIDE_SCOPE_NAMES = NO
+
+# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
+# will put a list of the files that are included by a file in the documentation
+# of that file.
+
+SHOW_INCLUDE_FILES = NO
+
+# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
+# is inserted in the documentation for inline members.
+
+INLINE_INFO = YES
+
+# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
+# will sort the (detailed) documentation of file and class members
+# alphabetically by member name. If set to NO the members will appear in
+# declaration order.
+
+SORT_MEMBER_DOCS = YES
+
+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the
+# brief documentation of file, namespace and class members alphabetically
+# by member name. If set to NO (the default) the members will appear in
+# declaration order.
+
+SORT_BRIEF_DOCS = NO
+
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be
+# sorted by fully-qualified names, including namespaces. If set to
+# NO (the default), the class list will be sorted only by class name,
+# not including the namespace part.
+# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
+# Note: This option applies only to the class list, not to the
+# alphabetical list.
+
+SORT_BY_SCOPE_NAME = NO
+
+# The GENERATE_TODOLIST tag can be used to enable (YES) or
+# disable (NO) the todo list. This list is created by putting \todo
+# commands in the documentation.
+
+GENERATE_TODOLIST = YES
+
+# The GENERATE_TESTLIST tag can be used to enable (YES) or
+# disable (NO) the test list. This list is created by putting \test
+# commands in the documentation.
+
+GENERATE_TESTLIST = YES
+
+# The GENERATE_BUGLIST tag can be used to enable (YES) or
+# disable (NO) the bug list. This list is created by putting \bug
+# commands in the documentation.
+
+GENERATE_BUGLIST = YES
+
+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
+# disable (NO) the deprecated list. This list is created by putting
+# \deprecated commands in the documentation.
+
+GENERATE_DEPRECATEDLIST= YES
+
+# The ENABLED_SECTIONS tag can be used to enable conditional
+# documentation sections, marked by \if sectionname ... \endif.
+
+ENABLED_SECTIONS =
+
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
+# the initial value of a variable or define consists of for it to appear in
+# the documentation. If the initializer consists of more lines than specified
+# here it will be hidden. Use a value of 0 to hide initializers completely.
+# The appearance of the initializer of individual variables and defines in the
+# documentation can be controlled using \showinitializer or \hideinitializer
+# command in the documentation regardless of this setting.
+
+MAX_INITIALIZER_LINES = 30
+
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
+# at the bottom of the documentation of classes and structs. If set to YES the
+# list will mention the files that were used to generate the documentation.
+
+SHOW_USED_FILES = YES
+
+# If the sources in your project are distributed over multiple directories
+# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy
+# in the documentation. The default is NO.
+
+SHOW_DIRECTORIES = NO
+
+# The FILE_VERSION_FILTER tag can be used to specify a program or script that
+# doxygen should invoke to get the current version for each file (typically from the
+# version control system). Doxygen will invoke the program by executing (via
+# popen()) the command , where is the value of
+# the FILE_VERSION_FILTER tag, and is the name of an input file
+# provided by doxygen. Whatever the program writes to standard output
+# is used as the file version. See the manual for examples.
+
+FILE_VERSION_FILTER =
+
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+
+# The QUIET tag can be used to turn on/off the messages that are generated
+# by doxygen. Possible values are YES and NO. If left blank NO is used.
+
+QUIET = YES
+
+# The WARNINGS tag can be used to turn on/off the warning messages that are
+# generated by doxygen. Possible values are YES and NO. If left blank
+# NO is used.
+
+WARNINGS = YES
+
+# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
+# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
+# automatically be disabled.
+
+WARN_IF_UNDOCUMENTED = YES
+
+# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for
+# potential errors in the documentation, such as not documenting some
+# parameters in a documented function, or documenting parameters that
+# don't exist or using markup commands wrongly.
+
+WARN_IF_DOC_ERROR = YES
+
+# This WARN_NO_PARAMDOC option can be abled to get warnings for
+# functions that are documented, but have no documentation for their parameters
+# or return value. If set to NO (the default) doxygen will only warn about
+# wrong or incomplete parameter documentation, but not about the absence of
+# documentation.
+
+WARN_NO_PARAMDOC = NO
+
+# The WARN_FORMAT tag determines the format of the warning messages that
+# doxygen can produce. The string should contain the $file, $line, and $text
+# tags, which will be replaced by the file and line number from which the
+# warning originated and the warning text. Optionally the format may contain
+# $version, which will be replaced by the version of the file (if it could
+# be obtained via FILE_VERSION_FILTER)
+
+WARN_FORMAT =
+
+# The WARN_LOGFILE tag can be used to specify a file to which warning
+# and error messages should be written. If left blank the output is written
+# to stderr.
+
+WARN_LOGFILE =
+
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+
+# The INPUT tag can be used to specify the files and/or directories that contain
+# documented source files. You may enter file names like "myfile.cpp" or
+# directories like "/usr/src/myproject". Separate the files or directories
+# with spaces.
+
+INPUT = @-top_srcdir-@/src
+
+# This tag can be used to specify the character encoding of the source files that
+# doxygen parses. Internally doxygen uses the UTF-8 encoding, which is also the default
+# input encoding. Doxygen uses libiconv (or the iconv built into libc) for the transcoding.
+# See http://www.gnu.org/software/libiconv for the list of possible encodings.
+
+INPUT_ENCODING = UTF-8
+
+# If the value of the INPUT tag contains directories, you can use the
+# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
+# and *.h) to filter out the source-files in the directories. If left
+# blank the following patterns are tested:
+# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx
+# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py
+
+FILE_PATTERNS =
+
+# The RECURSIVE tag can be used to turn specify whether or not subdirectories
+# should be searched for input files as well. Possible values are YES and NO.
+# If left blank NO is used.
+
+RECURSIVE = YES
+
+# The EXCLUDE tag can be used to specify files and/or directories that should
+# excluded from the INPUT source files. This way you can easily exclude a
+# subdirectory from a directory tree whose root is specified with the INPUT tag.
+
+EXCLUDE = @-top_srcdir-@/libhttpd/
+
+# The EXCLUDE_SYMLINKS tag can be used select whether or not files or
+# directories that are symbolic links (a Unix filesystem feature) are excluded
+# from the input.
+
+EXCLUDE_SYMLINKS = NO
+
+# If the value of the INPUT tag contains directories, you can use the
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
+# certain files from those directories. Note that the wildcards are matched
+# against the file with absolute path, so to exclude all test directories
+# for example use the pattern */test/*
+
+EXCLUDE_PATTERNS =
+
+# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
+# (namespaces, classes, functions, etc.) that should be excluded from the output.
+# The symbol name can be a fully qualified name, a word, or if the wildcard * is used,
+# a substring. Examples: ANamespace, AClass, AClass::ANamespace, ANamespace::*Test
+
+EXCLUDE_SYMBOLS =
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or
+# directories that contain example code fragments that are included (see
+# the \include command).
+
+EXAMPLE_PATH =
+
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
+# and *.h) to filter out the source-files in the directories. If left
+# blank all files are included.
+
+EXAMPLE_PATTERNS =
+
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
+# searched for input files to be used with the \include or \dontinclude
+# commands irrespective of the value of the RECURSIVE tag.
+# Possible values are YES and NO. If left blank NO is used.
+
+EXAMPLE_RECURSIVE = NO
+
+# The IMAGE_PATH tag can be used to specify one or more files or
+# directories that contain image that are included in the documentation (see
+# the \image command).
+
+IMAGE_PATH =
+
+# The INPUT_FILTER tag can be used to specify a program that doxygen should
+# invoke to filter for each input file. Doxygen will invoke the filter program
+# by executing (via popen()) the command , where
+# is the value of the INPUT_FILTER tag, and is the name of an
+# input file. Doxygen will then use the output that the filter program writes
+# to standard output. If FILTER_PATTERNS is specified, this tag will be
+# ignored.
+
+INPUT_FILTER =
+
+# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
+# basis. Doxygen will compare the file name with each pattern and apply the
+# filter if there is a match. The filters are a list of the form:
+# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
+# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER
+# is applied to all files.
+
+FILTER_PATTERNS =
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
+# INPUT_FILTER) will be used to filter the input files when producing source
+# files to browse (i.e. when SOURCE_BROWSER is set to YES).
+
+FILTER_SOURCE_FILES = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to source browsing
+#---------------------------------------------------------------------------
+
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will
+# be generated. Documented entities will be cross-referenced with these sources.
+# Note: To get rid of all source code in the generated output, make sure also
+# VERBATIM_HEADERS is set to NO. If you have enabled CALL_GRAPH or CALLER_GRAPH
+# then you must also enable this option. If you don't then doxygen will produce
+# a warning and turn it on anyway
+
+SOURCE_BROWSER = YES
+
+# Setting the INLINE_SOURCES tag to YES will include the body
+# of functions and classes directly in the documentation.
+
+INLINE_SOURCES = NO
+
+# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
+# doxygen to hide any special comment blocks from generated source code
+# fragments. Normal C and C++ comments will always remain visible.
+
+STRIP_CODE_COMMENTS = YES
+
+# If the REFERENCED_BY_RELATION tag is set to YES (the default)
+# then for each documented function all documented
+# functions referencing it will be listed.
+
+REFERENCED_BY_RELATION = YES
+
+# If the REFERENCES_RELATION tag is set to YES (the default)
+# then for each documented function all documented entities
+# called/used by that function will be listed.
+
+REFERENCES_RELATION = YES
+
+# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
+# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
+# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
+# link to the source code. Otherwise they will link to the documentstion.
+
+REFERENCES_LINK_SOURCE = YES
+
+# If the USE_HTAGS tag is set to YES then the references to source code
+# will point to the HTML generated by the htags(1) tool instead of doxygen
+# built-in source browser. The htags tool is part of GNU's global source
+# tagging system (see http://www.gnu.org/software/global/global.html). You
+# will need version 4.8.6 or higher.
+
+USE_HTAGS = NO
+
+# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
+# will generate a verbatim copy of the header file for each class for
+# which an include is specified. Set to NO to disable this.
+
+VERBATIM_HEADERS = YES
+
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
+# of all compounds will be generated. Enable this if the project
+# contains a lot of classes, structs, unions or interfaces.
+
+ALPHABETICAL_INDEX = NO
+
+# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
+# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
+# in which this list will be split (can be a number in the range [1..20])
+
+COLS_IN_ALPHA_INDEX = 5
+
+# In case all classes in a project start with a common prefix, all
+# classes will be put under the same header in the alphabetical index.
+# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
+# should be ignored while generating the index headers.
+
+IGNORE_PREFIX =
+
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
+# generate HTML output.
+
+GENERATE_HTML = YES
+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `html' will be used as the default path.
+
+HTML_OUTPUT =
+
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
+# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
+# doxygen will generate files with .html extension.
+
+HTML_FILE_EXTENSION =
+
+# The HTML_HEADER tag can be used to specify a personal HTML header for
+# each generated HTML page. If it is left blank doxygen will generate a
+# standard header.
+
+HTML_HEADER =
+
+# The HTML_FOOTER tag can be used to specify a personal HTML footer for
+# each generated HTML page. If it is left blank doxygen will generate a
+# standard footer.
+
+HTML_FOOTER =
+
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
+# style sheet that is used by each HTML page. It can be used to
+# fine-tune the look of the HTML output. If the tag is left blank doxygen
+# will generate a default style sheet. Note that doxygen will try to copy
+# the style sheet file to the HTML output directory, so don't put your own
+# stylesheet in the HTML output directory as well, or it will be erased!
+
+HTML_STYLESHEET =
+
+# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
+# files or namespaces will be aligned in HTML using tables. If set to
+# NO a bullet list will be used.
+
+HTML_ALIGN_MEMBERS = YES
+
+# If the GENERATE_HTMLHELP tag is set to YES, additional index files
+# will be generated that can be used as input for tools like the
+# Microsoft HTML help workshop to generate a compressed HTML help file (.chm)
+# of the generated HTML documentation.
+
+GENERATE_HTMLHELP = NO
+
+# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
+# documentation will contain sections that can be hidden and shown after the
+# page has loaded. For this to work a browser that supports
+# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox
+# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).
+
+HTML_DYNAMIC_SECTIONS = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
+# be used to specify the file name of the resulting .chm file. You
+# can add a path in front of the file if the result should not be
+# written to the html output directory.
+
+CHM_FILE =
+
+# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
+# be used to specify the location (absolute path including file name) of
+# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
+# the HTML help compiler on the generated index.hhp.
+
+HHC_LOCATION =
+
+# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
+# controls if a separate .chi index file is generated (YES) or that
+# it should be included in the master .chm file (NO).
+
+GENERATE_CHI = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
+# controls whether a binary table of contents is generated (YES) or a
+# normal table of contents (NO) in the .chm file.
+
+BINARY_TOC = NO
+
+# The TOC_EXPAND flag can be set to YES to add extra items for group members
+# to the contents of the HTML help documentation and to the tree view.
+
+TOC_EXPAND = NO
+
+# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
+# top of each HTML page. The value NO (the default) enables the index and
+# the value YES disables it.
+
+DISABLE_INDEX = NO
+
+# This tag can be used to set the number of enum values (range [1..20])
+# that doxygen will group on one line in the generated HTML documentation.
+
+ENUM_VALUES_PER_LINE = 4
+
+# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be
+# generated containing a tree-like index structure (just like the one that
+# is generated for HTML Help). For this to work a browser that supports
+# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+,
+# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are
+# probably better off using the HTML help feature.
+
+GENERATE_TREEVIEW = YES
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
+# used to set the initial width (in pixels) of the frame in which the tree
+# is shown.
+
+TREEVIEW_WIDTH = 250
+
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
+# generate Latex output.
+
+GENERATE_LATEX = NO
+
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `latex' will be used as the default path.
+
+LATEX_OUTPUT =
+
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
+# invoked. If left blank `latex' will be used as the default command name.
+
+LATEX_CMD_NAME =
+
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
+# generate index for LaTeX. If left blank `makeindex' will be used as the
+# default command name.
+
+MAKEINDEX_CMD_NAME =
+
+# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
+# LaTeX documents. This may be useful for small projects and may help to
+# save some trees in general.
+
+COMPACT_LATEX = NO
+
+# The PAPER_TYPE tag can be used to set the paper type that is used
+# by the printer. Possible values are: a4, a4wide, letter, legal and
+# executive. If left blank a4wide will be used.
+
+PAPER_TYPE = letter
+
+# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
+# packages that should be included in the LaTeX output.
+
+EXTRA_PACKAGES =
+
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
+# the generated latex document. The header should contain everything until
+# the first chapter. If it is left blank doxygen will generate a
+# standard header. Notice: only use this tag if you know what you are doing!
+
+LATEX_HEADER =
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
+# is prepared for conversion to pdf (using ps2pdf). The pdf file will
+# contain links (just like the HTML output) instead of page references
+# This makes the output suitable for online browsing using a pdf viewer.
+
+PDF_HYPERLINKS = YES
+
+# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
+# plain latex in the generated Makefile. Set this option to YES to get a
+# higher quality PDF documentation.
+
+USE_PDFLATEX = YES
+
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
+# command to the generated LaTeX files. This will instruct LaTeX to keep
+# running if errors occur, instead of asking the user for help.
+# This option is also used when generating formulas in HTML.
+
+LATEX_BATCHMODE = NO
+
+# If LATEX_HIDE_INDICES is set to YES then doxygen will not
+# include the index chapters (such as File Index, Compound Index, etc.)
+# in the output.
+
+LATEX_HIDE_INDICES = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the RTF output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
+# The RTF output is optimized for Word 97 and may not look very pretty with
+# other RTF readers or editors.
+
+GENERATE_RTF = NO
+
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `rtf' will be used as the default path.
+
+RTF_OUTPUT =
+
+# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
+# RTF documents. This may be useful for small projects and may help to
+# save some trees in general.
+
+COMPACT_RTF = NO
+
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
+# will contain hyperlink fields. The RTF file will
+# contain links (just like the HTML output) instead of page references.
+# This makes the output suitable for online browsing using WORD or other
+# programs which support those fields.
+# Note: wordpad (write) and others do not support links.
+
+RTF_HYPERLINKS = NO
+
+# Load stylesheet definitions from file. Syntax is similar to doxygen's
+# config file, i.e. a series of assignments. You only have to provide
+# replacements, missing definitions are set to their default value.
+
+RTF_STYLESHEET_FILE =
+
+# Set optional variables used in the generation of an rtf document.
+# Syntax is similar to doxygen's config file.
+
+RTF_EXTENSIONS_FILE =
+
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
+# generate man pages
+
+GENERATE_MAN = NO
+
+# The MAN_OUTPUT tag is used to specify where the man pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `man' will be used as the default path.
+
+MAN_OUTPUT =
+
+# The MAN_EXTENSION tag determines the extension that is added to
+# the generated man pages (default is the subroutine's section .3)
+
+MAN_EXTENSION =
+
+# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
+# then it will generate one additional man file for each entity
+# documented in the real man page(s). These additional files
+# only source the real man page, but without them the man command
+# would be unable to find the correct page. The default is NO.
+
+MAN_LINKS = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the XML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_XML tag is set to YES Doxygen will
+# generate an XML file that captures the structure of
+# the code including all documentation.
+
+GENERATE_XML = NO
+
+# The XML_OUTPUT tag is used to specify where the XML pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `xml' will be used as the default path.
+
+XML_OUTPUT = xml
+
+# The XML_SCHEMA tag can be used to specify an XML schema,
+# which can be used by a validating XML parser to check the
+# syntax of the XML files.
+
+XML_SCHEMA =
+
+# The XML_DTD tag can be used to specify an XML DTD,
+# which can be used by a validating XML parser to check the
+# syntax of the XML files.
+
+XML_DTD =
+
+# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
+# dump the program listings (including syntax highlighting
+# and cross-referencing information) to the XML output. Note that
+# enabling this will significantly increase the size of the XML output.
+
+XML_PROGRAMLISTING = YES
+
+#---------------------------------------------------------------------------
+# configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
+# generate an AutoGen Definitions (see autogen.sf.net) file
+# that captures the structure of the code including all
+# documentation. Note that this feature is still experimental
+# and incomplete at the moment.
+
+GENERATE_AUTOGEN_DEF = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_PERLMOD tag is set to YES Doxygen will
+# generate a Perl module file that captures the structure of
+# the code including all documentation. Note that this
+# feature is still experimental and incomplete at the
+# moment.
+
+GENERATE_PERLMOD = NO
+
+# If the PERLMOD_LATEX tag is set to YES Doxygen will generate
+# the necessary Makefile rules, Perl scripts and LaTeX code to be able
+# to generate PDF and DVI output from the Perl module output.
+
+PERLMOD_LATEX = NO
+
+# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
+# nicely formatted so it can be parsed by a human reader. This is useful
+# if you want to understand what is going on. On the other hand, if this
+# tag is set to NO the size of the Perl module output will be much smaller
+# and Perl will parse it just the same.
+
+PERLMOD_PRETTY = YES
+
+# The names of the make variables in the generated doxyrules.make file
+# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX.
+# This is useful so different doxyrules.make files included by the same
+# Makefile don't overwrite each other's variables.
+
+PERLMOD_MAKEVAR_PREFIX =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor
+#---------------------------------------------------------------------------
+
+# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
+# evaluate all C-preprocessor directives found in the sources and include
+# files.
+
+ENABLE_PREPROCESSING = YES
+
+# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
+# names in the source code. If set to NO (the default) only conditional
+# compilation will be performed. Macro expansion can be done in a controlled
+# way by setting EXPAND_ONLY_PREDEF to YES.
+
+MACRO_EXPANSION = NO
+
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
+# then the macro expansion is limited to the macros specified with the
+# PREDEFINED and EXPAND_AS_DEFINED tags.
+
+EXPAND_ONLY_PREDEF = NO
+
+# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
+# in the INCLUDE_PATH (see below) will be search if a #include is found.
+
+SEARCH_INCLUDES = YES
+
+# The INCLUDE_PATH tag can be used to specify one or more directories that
+# contain include files that are not input files but should be processed by
+# the preprocessor.
+
+INCLUDE_PATH =
+
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
+# patterns (like *.h and *.hpp) to filter out the header-files in the
+# directories. If left blank, the patterns specified with FILE_PATTERNS will
+# be used.
+
+INCLUDE_FILE_PATTERNS =
+
+# The PREDEFINED tag can be used to specify one or more macro names that
+# are defined before the preprocessor is started (similar to the -D option of
+# gcc). The argument of the tag is a list of macros of the form: name
+# or name=definition (no spaces). If the definition and the = are
+# omitted =1 is assumed. To prevent a macro definition from being
+# undefined via #undef or recursively expanded use the := operator
+# instead of the = operator.
+
+PREDEFINED =
+
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
+# this tag can be used to specify a list of macro names that should be expanded.
+# The macro definition that is found in the sources will be used.
+# Use the PREDEFINED tag if you want to use a different macro definition.
+
+EXPAND_AS_DEFINED =
+
+# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
+# doxygen's preprocessor will remove all function-like macros that are alone
+# on a line, have an all uppercase name, and do not end with a semicolon. Such
+# function macros are typically used for boiler-plate code, and will confuse
+# the parser if not removed.
+
+SKIP_FUNCTION_MACROS = YES
+
+#---------------------------------------------------------------------------
+# Configuration::additions related to external references
+#---------------------------------------------------------------------------
+
+# The TAGFILES option can be used to specify one or more tagfiles.
+# Optionally an initial location of the external documentation
+# can be added for each tagfile. The format of a tag file without
+# this location is as follows:
+# TAGFILES = file1 file2 ...
+# Adding location for the tag files is done as follows:
+# TAGFILES = file1=loc1 "file2 = loc2" ...
+# where "loc1" and "loc2" can be relative or absolute paths or
+# URLs. If a location is present for each tag, the installdox tool
+# does not have to be run to correct the links.
+# Note that each tag file must have a unique name
+# (where the name does NOT include the path)
+# If a tag file is not located in the directory in which doxygen
+# is run, you must also specify the path to the tagfile here.
+
+TAGFILES =
+
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create
+# a tag file that is based on the input files it reads.
+
+GENERATE_TAGFILE =
+
+# If the ALLEXTERNALS tag is set to YES all external classes will be listed
+# in the class index. If set to NO only the inherited external classes
+# will be listed.
+
+ALLEXTERNALS = NO
+
+# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed
+# in the modules index. If set to NO, only the current project's groups will
+# be listed.
+
+EXTERNAL_GROUPS = YES
+
+# The PERL_PATH should be the absolute path and name of the perl script
+# interpreter (i.e. the result of `which perl').
+
+PERL_PATH =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool
+#---------------------------------------------------------------------------
+
+# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
+# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base
+# or super classes. Setting the tag to NO turns the diagrams off. Note that
+# this option is superseded by the HAVE_DOT option below. This is only a
+# fallback. It is recommended to install and use dot, since it yields more
+# powerful graphs.
+
+CLASS_DIAGRAMS = YES
+
+# You can define message sequence charts within doxygen comments using the \msc
+# command. Doxygen will then run the mscgen tool (see http://www.mcternan.me.uk/mscgen/) to
+# produce the chart and insert it in the documentation. The MSCGEN_PATH tag allows you to
+# specify the directory where the mscgen tool resides. If left empty the tool is assumed to
+# be found in the default search path.
+
+MSCGEN_PATH =
+
+# If set to YES, the inheritance and collaboration graphs will hide
+# inheritance and usage relations if the target is undocumented
+# or is not a class.
+
+HIDE_UNDOC_RELATIONS = YES
+
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
+# available from the path. This tool is part of Graphviz, a graph visualization
+# toolkit from AT&T and Lucent Bell Labs. The other options in this section
+# have no effect if this option is set to NO (the default)
+
+HAVE_DOT = NO
+
+# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for each documented class showing the direct and
+# indirect inheritance relations. Setting this tag to YES will force the
+# the CLASS_DIAGRAMS tag to NO.
+
+CLASS_GRAPH = YES
+
+# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for each documented class showing the direct and
+# indirect implementation dependencies (inheritance, containment, and
+# class references variables) of the class with other documented classes.
+
+COLLABORATION_GRAPH = YES
+
+# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for groups, showing the direct groups dependencies
+
+GROUP_GRAPHS = YES
+
+# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
+# collaboration diagrams in a style similar to the OMG's Unified Modeling
+# Language.
+
+UML_LOOK = NO
+
+# If set to YES, the inheritance and collaboration graphs will show the
+# relations between templates and their instances.
+
+TEMPLATE_RELATIONS = YES
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
+# tags are set to YES then doxygen will generate a graph for each documented
+# file showing the direct and indirect include dependencies of the file with
+# other documented files.
+
+INCLUDE_GRAPH = YES
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
+# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
+# documented header file showing the documented files that directly or
+# indirectly include this file.
+
+INCLUDED_BY_GRAPH = YES
+
+# If the CALL_GRAPH, SOURCE_BROWSER and HAVE_DOT tags are set to YES then doxygen will
+# generate a call dependency graph for every global function or class method.
+# Note that enabling this option will significantly increase the time of a run.
+# So in most cases it will be better to enable call graphs for selected
+# functions only using the \callgraph command.
+
+CALL_GRAPH = NO
+
+# If the CALLER_GRAPH, SOURCE_BROWSER and HAVE_DOT tags are set to YES then doxygen will
+# generate a caller dependency graph for every global function or class method.
+# Note that enabling this option will significantly increase the time of a run.
+# So in most cases it will be better to enable caller graphs for selected
+# functions only using the \callergraph command.
+
+CALLER_GRAPH = NO
+
+# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
+# will graphical hierarchy of all classes instead of a textual one.
+
+GRAPHICAL_HIERARCHY = YES
+
+# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES
+# then doxygen will show the dependencies a directory has on other directories
+# in a graphical way. The dependency relations are determined by the #include
+# relations between the files in the directories.
+
+DIRECTORY_GRAPH = YES
+
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
+# generated by dot. Possible values are png, jpg, or gif
+# If left blank png will be used.
+
+DOT_IMAGE_FORMAT = png
+
+# The tag DOT_PATH can be used to specify the path where the dot tool can be
+# found. If left blank, it is assumed the dot tool can be found in the path.
+
+DOT_PATH =
+
+# The DOTFILE_DIRS tag can be used to specify one or more directories that
+# contain dot files that are included in the documentation (see the
+# \dotfile command).
+
+DOTFILE_DIRS =
+
+# The MAX_DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of
+# nodes that will be shown in the graph. If the number of nodes in a graph
+# becomes larger than this value, doxygen will truncate the graph, which is
+# visualized by representing a node as a red box. Note that doxygen if the number
+# of direct children of the root node in a graph is already larger than
+# MAX_DOT_GRAPH_NOTES then the graph will not be shown at all. Also note
+# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
+
+DOT_GRAPH_MAX_NODES = 50
+
+# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
+# graphs generated by dot. A depth value of 3 means that only nodes reachable
+# from the root by following a path via at most 3 edges will be shown. Nodes
+# that lay further from the root node will be omitted. Note that setting this
+# option to 1 or 2 may greatly reduce the computation time needed for large
+# code bases. Also note that the size of a graph can be further restricted by
+# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
+
+MAX_DOT_GRAPH_DEPTH = 0
+
+# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
+# background. This is disabled by default, which results in a white background.
+# Warning: Depending on the platform used, enabling this option may lead to
+# badly anti-aliased labels on the edges of a graph (i.e. they become hard to
+# read).
+
+DOT_TRANSPARENT = NO
+
+# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
+# files in one run (i.e. multiple -o and -T options on the command line). This
+# makes dot run faster, but since only newer versions of dot (>1.8.10)
+# support this, this feature is disabled by default.
+
+DOT_MULTI_TARGETS = NO
+
+# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
+# generate a legend page explaining the meaning of the various boxes and
+# arrows in the dot generated graphs.
+
+GENERATE_LEGEND = YES
+
+# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
+# remove the intermediate dot files that are used to generate
+# the various graphs.
+
+DOT_CLEANUP = YES
+
+#---------------------------------------------------------------------------
+# Configuration::additions related to the search engine
+#---------------------------------------------------------------------------
+
+# The SEARCHENGINE tag specifies whether or not a search engine should be
+# used. If set to NO the values of all tags below this one will be ignored.
+
+SEARCHENGINE = NO
diff --git a/doc/wifidog_firewall_diagram.dia b/doc/wifidog_firewall_diagram.dia
new file mode 100755
index 0000000000000000000000000000000000000000..2946cc770d0ac8c8bafbb34fab1a9bdff80b0af0
GIT binary patch
literal 8702
zcmVEt
z=A-H4+hRUhn1&&IXGCeQ)*M!D2BR
zz5B2j_9lbN;kVD;4Nm{Km`y)S&Ymr=T3vTK9ZzSyKL_J)pZ)DT{dx9$b(`n6?(@LC
zuLc*xceCN(kLFv;_$P!-ZhbYJ-M#JQ)pS0Jmn=SA-MggWKJ@<^*Q~CZ$BQNx-~H_c
z{B8M`R^Rw?uevwdc*x>%FuNE{?w=EXH{<0mLJQPd$6tmG7^DZUu74-%ANQ`?0lfmv4_OUkm7u_SWF*z|L248
zyo~_MZ-3Udbv5^5HadG)ac^DGaF>sxv&H+9e=_~LmUsWeboW0;^U=HUuH}U`oEyJ|>AU|oJYB5B`(Zr&c=~=YTlD_k`+oY*
zXJ6co=yZ(EzI}EmZ~uPoN)+!FP2as=(AD(wQ)DW*EAM@4(RAx~@9y4t7T^3}axorW
zTk&8k6aUv&QW#e`;q7L}4adXFlhf&Ja^D}=hBWE+$z-}(a
z@qW>Km=<2%`lB~HZ2o@w@ubEsAOIpu0_c6J;2?uaABhM)Ul_|JR4rMp((&NWTH
ziRAy?y6%pvc)5IX-yR(t9sYLw`pu6Gp5p`Nwh6nZlSSRh^!?uX;Bqwn6yM-rGJn>a
zFFui7hzh>^(f=5Z{~Rtxr-Pg3YyEd{?|G~Jknr|1Cn4|9+oq>ZVV!W+R#rgJHt($4
zDD*(6B4yq|(Z{=(Tn_6$(Bb66Weq$(1kiOD(}a`Hzd*$1n4xkp!&b^Nf(8(1C`hQG
zgwj5~a`6=>aBMD88{}|8dJi{{!!sg>5}{Fv3v%!v$7HZ5u+brGppXWac0m^8=nOe@
zE^>s*1V-e*6mDQb4)Q7DE0D~{vAIa?kOLq@=SblSKd>OjKE@nB93K7t;^_S0~?vTUeBL}b}2P}~Tgmdwg`cL%_&vn{KYt@*O(=sswmP=uurtuMr4$%-ZG)RIAtB~zNil--Q!kB76%(PS{L
z3G6Z3FB8ESAHC`z6sKP%5Ld^@B_{>YS4t|OScCk0@!ACY$_Q`}te4=t52zIO-__(_Xyca28EjFKXy;c0M>Amc$7^N7Ol|O|-UBXwW5b@>t@e=>Z#$u1?-Z
z5A%QG6BW_;A#-r2|8(tRBGA+Gn19GN!={iQHhoUv@y1OmJ@8=_H|dZL4IBF!Z3Cw|
z=^nVwKO7D%wYKF|o4ao%Y${>XW?_@f37e2RYI-#qTuxJq@x8vU>}FvtjIlOUMhX`+
zvNjHDygmsuQX`l))>p~RPUH|iTHl&X+F4DpPF
z04ZeY7TZtMIQ;GS$HRgeorWG(NE1y$fsC$s|0=ud_y*$h)_i>`s>Wkd&3E}K7-q6;
zy>!jj1@#CE_H%K#^@XO?eM{Z9)4H$9V*Xq1!f%5MY`2k$*X%y9QYjga0%?Q-rBv9{
z@tU=?tNqPfO7V*K-7B697R4p*A{!6NAQ_0_6?d3O$!>%-rc#bGAD>nYD4M9y2NV6^
zN_l1s$q=b!GR1`g8+!>G^!4QU@Pwu)92^z!=mtCt3Imo5L&1&?u_L?fScOWnvVqd{
zPc2tzchVO$W*lsTFo8p~~c){l<>hZz6QOIXEup(OKwW(UNH>=+Pm1;1=>%hChF0
z)R!Wz=^%S$bSdK&^jIG~etYxNo5SDV6wv6hglkH+s#DAeTZlNovPT?g${95vM9cuk
zA8~*!m{Bleea!gr=fm$`{9GWTvp6F{29(Waoo+Uh+Xyo(f0%I%8NrwsX!wnJKJ5by
z%iD5b)Qx%3{^<>nDuA&*V7&P4_&(koN+y1*5m9(|zdC>k^cS31O%>>g<4H(qPs4p>}5mg|@#T1ZnV
zny2AdCp2Y<)e2g)u;`5OK?i_ft!ACeWWA#~P}W6+0dHKvmK|Wr*>JuXO@?PQto7n!
zFN!%E&gTVQ*uxehbbL<8I|U;{ftM|Jx!vh+`wT7ljnQ9-*qr@sM8uNb&@mVvls+Ac
zkchs~FWE4@pjMlc;pFVmHn(~qA9#v4M5Xw|oL=31A79|E^nC5E=PPU2r@qrMCbzxr
zrAfWB+gGDEM?MhQWsL}&8XiwF%2m;q1n{<>YUM#CM6lX&Yj~5K4RrsFi?l_>pX@%T
zJ4y;`Z9#Fjf7oxmt@G_*HW-hG2=I@7t*-84WAJ``@|H>t?Uk0;3dO!Sr^2>{(pH33>t^}3b
zL8Vo~DXl79N?|N1%SR!}ZGlW-B|Dh{!fNJ#wb22!nx9OusZi}^4p^z&4OnsomI^F2
zjiNtz_4?@G<#Eb)4i>|YgHHvQI^bw%E3u0BRDh}DTAJU+00Z{<1u05`_*Z3p1;QA#
zj(dawE4|NI7h=d4JUE4{^gcrg9P5DCgvy$*X$i6v(lQEZ^IrUw%ooG6-Y+j+7C>Pi
zXy9q`IL1K7qbuu8I;);#_oPM>A5Ei=ADjbVU8F@PNlK@SXoQ37gQo%-&?6%yI_C6x
zqnvd)J7I`tRMP8vmR|Q6>2+;6((5fWJiCJsjBp{RVAM{#<0%@D&Ornu?UvwNMUjTF
zid(zuWURT&iRhO_BLGFW_pCa8r}~BK=(aH&6Hy=6ZIj>Xbxrr6wOfvr{t{2p+NG1E
zOZ1n37#%((VnD#H-;HuM4@XfrL~9zLttBzq@U>Cc7&~;l_~Ft_b1N*fEm^$I!s8
z=$0EPz*t~qPj4<(EB3SzN`rC1t7x$tW}Wp|(#HvdHaa>^fwR;GRM^vF(o&)<1_bol*?RiHXLk}%
zfK@gpm16Wr=`IWeev?;!Q12FXL9?Q;DnaaSJ8tgG?oti
z%xy+6JJU4o^n&x~oUJPetXf%5!*IAlx<&%k!
zp$zxzXxV_tW|wPK@p^~}NUTfLG%Z|o3oDD$NS=@fX>OSx}@a-kGEJ
zLrn&vtgPt{ML=$2@Rtniqra5IH2llco-?H+GmPX&RW_adwNd2rcFY1EUCrv!l;R_+
zPy&$dphIl|I)Y?J4h&y_BPf2{2(rLNfsM@-@sFB_10=C+8Dq%a+
zpiMNDw+S_@FvhydBR2(pbD>(|hDPgH6IW$5W@k`wYc*!Ui>~lO5>*{5?+azUOT@@-
znsTy2&H*|$4Fblr!OWomqkM&qyI#JzQ0>a)29;OnulFkJ5_aq*mi&D9@~4AW1xC87
zmxEA22C@((@aPamU<=GE);VlT;#Gia-jxZy3XY$46Js87wAdh1RS)l{Xiv-6Z$`
z)_VgEX-XG(#kx{Cc#Y`daoPt|n+}aAL&17EE0xb@)5~6bzJ{|&6lHWiI2{&X;RY6^
z=;05QwZdsE`;dbbon-2POuZF=j&vQ$m5UC9N5fhI-CV48nFwc{
zRq;P3$$NB$)q6A=we_e`>gYZC;ymtPjnI5Ch(GZ9P0CFax3PozXng7o`2a@V9HLy@
z#%@-oLUwbpbwWAn!r&zI(;;fv>Oq-qDWud`ImJw|$(5}Q$QWv3xv@UAjG8Q?CL0mz
z)zRVGf=cYDMAW^IJlMk8=`fj*-JWc8YPHP?-`g%twOV;P$2kLipmE13T^`Lha*vs;
z7qUJ&!U$kcmgDT(47!jp#|G|BMDJ=;mCbG(wU8q6yvMqo!nh*C_$F{L0(wXEiE1NjszabaK@7
z%AxSVa>IC|oV6=zrIL=`n049}Mc;2lUklBx=H5`!T$iwV3;U>*wkq$*Zo7|K`qfEF
zyS`N-fYX&XG$~%ORw=e2WIMKt_e!D-*K8MLtyf??1$4j_+XYL(Vh06_i};*fL{rd<
zw=86rjuw%u@YpM%z!$Ph=T!@9wh&21>xGq5%DjH$flu3BWu)&^>v
z0O`RyX;urebg5dDszn1#osI{WSH0txZ-4pq*Md%6RWA}cmFh)T)eD>5EEYo&3>1o2vZ9$4+Akd%yKxIt`^-m^oHdumH>N^_vQom>w^95$BfDvLv?$AF
z_wZ1~Fwk@u&T;$@1Ug9S979>4L1x~WsBqD1bC#QFT_@rLlQBvtTr1<#4g@K*REBm|Ii0nn;L)s6hFC4PASkPhmIh2JPH^^8SlaOAoK#+UA5be>
zY7@JxO$hlaZtk&ZFl9nRt@K
z=)}?bWa76)r%q{02ct#cX0SGiS;t`&-da@^*2}){V$9lGPo>T-dw=Ut>M
zF*bS85OF)68MLWP46lM^PyN(LSTkfycqd)de<@thMZNc}`6Mg9tK{zZ
zsxE*13{;+VahXYr1eSZtT#OtMDl{}F2U!`an~T*d_oJf|Pc%`b!GlwQm6oclMj0e1
zi&{FPOX{bje*RJeHGI$&DxqDO!`3}D)n)fY*ia!WD>c;@{F0Mu1duz4?3~oig=&K^
zAV4aEnk;`AqEYCm55m)nmoE?A9v3WPA2uB^NJ>vwREVhEl_8wj!bm6b*V6~5S!aUM
zNzz4Vpe8)sw?RO(;&iZ;ioFB3Nz6L<62{S$C7H2b$qc75st``^hKB0$_maqEA`dxf
zs3Ag*PUb&AprLJu-cvfm%1!sAx7O`C0quyM@^q
zOTHyCv&&H_+G!X}NbJ+7*M=fWMmiHMVL+o0$_|*$
z^E>Yc^WG1?pZxOT=%>}H%9870uRBmLr&ARY9|20Lr=wI)b~6K+c|~U43U3wb#$#$|
z@QzLb@XI0IApq?(1-t2%`SxyOlbj7(lFRy+{fh}*&OAlKz5eCV!eTbN+%xYqcQB1m&;I^lKAiPtAI8IZ@jkh|
zPY*<6@Z?LBN@IuaXLd7$Lt&6UILkY*pUyGTCg(F?=+odE?HoNYRx0j+Hw{wOf!VUm
zSel*oEo*5q+U4DjW_f$LjalA_jc5`pmovJICrLy)Ng<8AQBlE_A#c>!&_Pk6Ud{&+
zB~WyHzo`W4>A2fX*OOOUm|C}dpgpC&6|as5kbzEusBV3$g;mN`K?-dg|IoU6F>5Z>
zLYnxlih}QV0%^UOH;Q}a&0`59pUq5mb~$_hG8_Im8h-3WbJB~NKDikFpMNcWXa`HBkoZtEiLdyf-T9%}
zO&2hk`GD=zjU3Dre!i2W~&K
zx#_~^H(fXZ=qL~Afq5G-m~@T{hT1QT(^Wv~k7o5n^Tlg9{u{NE;DU6LfBbh)Mrs4J
z8J)&|yV8WQ%O;GsM~C0PIDUQjrg)L;eHdDp5ULQp1klBY?8t}QMjM7vnm#rcc+;6E
zG<9Kw>n;o>B<*4gU3Fp9idkQkD@_>t=ScdjCJfjS5iYy+Vnqp2BJgf?3|a;{1`R0U
z$DsF$e7k^weeGL~h|Tzv;cgb?{#vRP>-FY)x4YhaAM(S*N=Z&~OiI2~A(3OOkD5&f
z#_u`98y;>hR*4HsT=-yI_|u!i-%Cu`MQ?t5?xP+X>bNdJVK+e`$}KpJ$yY+*tmE|?
zL0hDQY|!L3f}_Vp3avc9*H|ax0}pYbRquI7xL$1`?51x5)fVV$(esH9w5GWjybLz)
zZAd4FN^k%j@YiaEtWEeVuPW-jXX+ht_Pp(=^%3JyF+6?Zz
z(9&b2l;m!Z$`!BO0uL3OQ_dC2YN4z?l0rH<_`e4)%l?ioI-{fwOHV=-HbG~JBiK%7
z6n$*`tx<;JHl(RKX_*uRw}d3=J86x&D`d@6Y=qHP7teDK>y0wQ^F*_w&@!8FZX`YV
zo>#f)5a}=;O`!$3MyJ?Za3ZWSv32}^38MRWre%@$90EH
z0?a0yD_0?BK3F9p0Xm8zwG+x=>Sk6>vl7iS#A-z(kU}Z+Xp~3kG)m37WH?6RP6ApC
zTGHPNk)ZP>!{@!@!`>g0>BmX$bUca;e3D&ZpzfRBsBiT8zkM
znrkn>lge?{BIpoJhon+O3=M-ffyUJERw8m`YvV`8BfynS;-wPNev^1FdMl+S(TxXc
zu6K%uG9{x+4>Y?!f-((?26X2*UhTjs`kc;daswft>qpcGR4FGXR4VpK8BKE5!Wn`h
z@3^?3`{jmWPM0I%?#5+=Y|^@cij%8u(u&eFt_^6>RN|fqK;9u4n+w%4bs416Us9Kf
zHFXKJpA-SXS*7i!4Ob;~nU%Wy;pp&}lDzEJbqoTmbQQ)$%zgY{hk4C%F;S7Mg55
zdyB1Gb=Vp-Rp6cky0Jhln`@0RQtPl9K941rQF0j#pfn#YdV{O0+4O2Q8pNNw9L)ac
zMfdb7em27bPhE8BI_HRBQxY59B{o8KqYs54k~WRyFp=896V0b4#Gt%}i~@-A5-|
zsRB18t5MF{nSyDJVM%N3S6bsPv1+ZfMo_!qTZZiZp6Es?w7xPrYJlZTUD8P!=^zB}
z`brD0T@?ct75zBw>UootHJ56kHN;Cx;&R{W=Q$d#Ia>KzC^&3E!BGZZ(Sku8^mvBK?6E@$D)JnI5
z@RU!lFzR&hNb3u2u#Sk;(mHPDTb+pauL=Sk(c_+yVvpmeev$(HX3Z`(V~5TCIfOdc
zkwf6NU@|;LtPIRcJ>oGEr6#LkrSxPq5Q3s<%(Qfl-)huJSqw)p99!tkgs;$W_$?R?
zBw}pND65v1!&$FamLnv81B3L-A&<)NTaH>Wi|Ht)V+(N#eubtZo48Mlyo`kkSc&@}
ztX7t`h6S+Lr$aF~N(xxXzW$+3#2Q*82&Vw!dnz`g*o?Mu3gjd=wA+!@$fi|$VS;i{
zX_NlKIe$!Oi&~|VjJJJil%Y*BM#d<@a!-3{l(WV;5#C9c-k1xz6e0Ia({;{D?7Q`i
z?eCa49?mXDlfk$~+i7-nF1xzoOk$EVU(rJBzLGSSJ5+|5|F*F_?OOQ^1oRlR@;;!J
zPmunW{EA2QN!=kMqVPB`g1rh3_tdHio$sa(T6Dvzg7&trsr!sx;lA3osIq{K2Q;8AJYHx!Fax*
z0Z7M045!C2|B&s(3rc2F=&v6_!x}0m3o%j<0fJO9Qc#vQm(%Q+z)f?gk+1e5Ybz+B
z!M?GV?oNJNi@zjylLSyQn}du(8l-%@VK1RpX>q?=}!Eq~gy^PJ7
z0#zdaeN*qO6rbANc1b1kImi`fS%6~xG;Os{EI~smPP3d9??A{3S$nEIQa>;_w6s@J
zv+k87lVe;wO;e&lm6qxqv{awZrkB0=bPZ>dD9Y%3a5^k8Eq_eALfd$@K~sX-ZrawA
z%qG2i)>dj8T}6aI&D2JjKF#V!Pp$V-Tkf4yw03l@3XNWG$^%EHF4eN9viq)k}DJ7@X3NbAL{u>~@|#iHPQ58i9lSk#WDK+y8i
zTn*RDM_==6xL#?vjw-I*QpH1{leyzFe>e~#sPDsH*w*S?(%&xYqw(a+*v
zr>DdDyjJ5we$fRichx0LvF$rSJC8N>W$+R%Hy5c*)y2|4DzB`K{=G2@!4<}3VO$o*
z<#m
z=!4K;eTaxpJT309p;68U6te^ldpGis^!j5wLDw|jR`I+Xds+$;*OHhPp0X#(w
zQY&2{2x%nuxR^Q#YYKc7nvxONL&Xj`)N0sK)=yp`;l}LBE6*mmS`}kpRIJ^OnieBio!T9Z
zH2rv{kyb_3woJ=lzZiH?>eZ>fUl}0EO
z_ouir-Lkr)$fjvk8}AnB5;k7AIOBI;U8kVtMX8a>epIWy{l4meTngP#S{ed=(^b
zbEq*06$TN2sABQZ;8Ybr00i#MUv(nZwva;5whB*-3R<@KJndQ+VopKZ<_?coz8()g
c4QJndvwRW%yO<3wzx(EY0d`2g%YSnM0GHJxJpcdz
literal 0
HcmV?d00001
diff --git a/libhttpd/Makefile.am b/libhttpd/Makefile.am
new file mode 100755
index 00000000..0338fca8
--- /dev/null
+++ b/libhttpd/Makefile.am
@@ -0,0 +1,19 @@
+#
+# $Id$
+#
+
+lib_LTLIBRARIES = libhttpd.la
+
+libhttpd_la_SOURCES = protocol.c \
+ api.c \
+ version.c \
+ ip_acl.c
+
+noinst_HEADERS = httpd_priv.h
+
+pkginclude_HEADERS = httpd.h
+
+EXTRA_DIST = README
+
+#AM_CPPFLAGS = \
+# -I${top_srcdir}/inc
diff --git a/libhttpd/README b/libhttpd/README
new file mode 100755
index 00000000..6d720519
--- /dev/null
+++ b/libhttpd/README
@@ -0,0 +1,23 @@
+
+Welcome to LibHTTPD, a library for the creation of embedded web servers.
+Complete documentation is available in the PDF file location in the doc
+directory.
+
+To build this software simply run
+
+ ./configure
+ make all
+ make install
+
+The software will be compiled and installed into /usr/local/lib and
+/usr/local/include. To use the software you will have to include the
+library's header file into your application and link against the library
+itself. Details are privided in the documentation.
+
+This software has been developed by David J. Hughes (aka Bambi) of
+Hughes Technologies in Australia. You can always find a current verion
+of this software at www.Hughes.com.au
+
+This software is released under the GPL. If you wish to incorporate
+this code in a commercial application then OEM licenses are available
+from Hughes Technology. Please email info@Hughes.com.au for details.
diff --git a/libhttpd/api.c b/libhttpd/api.c
new file mode 100755
index 00000000..afc205ef
--- /dev/null
+++ b/libhttpd/api.c
@@ -0,0 +1,1067 @@
+/*
+** Copyright (c) 2002 Hughes Technologies Pty Ltd. All rights
+** reserved.
+**
+** Terms under which this software may be used or copied are
+** provided in the specific license associated with this product.
+**
+** Hughes Technologies disclaims all warranties with regard to this
+** software, including all implied warranties of merchantability and
+** fitness, in no event shall Hughes Technologies be liable for any
+** special, indirect or consequential damages or any damages whatsoever
+** resulting from loss of use, data or profits, whether in an action of
+** contract, negligence or other tortious action, arising out of or in
+** connection with the use or performance of this software.
+**
+**
+** $Id$
+**
+*/
+
+#include