diff --git a/.gitignore b/.gitignore index d63edb6..f4fb084 100644 --- a/.gitignore +++ b/.gitignore @@ -1,33 +1,28 @@ -# Wildcard + in any subdir. -*.o -*.gcno -*.gcda -*.[ch].gcov - -# Exact filename in any subdir. -.deps -.dirstamp +aclocal.m4 +autom4te.cache/ +config.guess +config.h +config.h.in +config.h.in~ +config.log +config.status +config.sub +configure +contrib/Makefile +contrib/Makefile.in +depcomp +INSTALL +install-sh +libtool +ltmain.sh +m4/*.m4 Makefile Makefile.in - -# Exact wildcard, e.g., not in subdirs. -/tests/*.log -/tests/*.trs - -# Exact match, if a directory then everything in directory. -/.version -/aclocal.m4 -/autom4te.cache/ -/config.h -/config.h.in -/config.log -/config.status -/configure -/dhcpd-pools -/INSTALL -/libtool -/m4/ -/man/dhcpd-pools.1 -/stamp-h1 -/test-suite.log -/tests/outputs/ +man/Makefile +man/Makefile.in +missing +src/.deps/ +src/Makefile +src/Makefile.in +src/*.o +stamp-h1 diff --git a/.mailmap b/.mailmap deleted file mode 100644 index 7f7f47f..0000000 --- a/.mailmap +++ /dev/null @@ -1,2 +0,0 @@ -Sami Kerola -Sami Kerola diff --git a/COPYING b/COPYING index dd0de82..94a9ed0 100644 --- a/COPYING +++ b/COPYING @@ -1,34 +1,674 @@ -/* - * The dhcpd-pools has BSD 2-clause license which also known as "Simplified - * BSD License" or "FreeBSD License". - * - * Copyright 2006- Sami Kerola. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the - * distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR AND CONTRIBUTORS OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * The views and conclusions contained in the software and documentation are - * those of the authors and should not be interpreted as representing - * official policies, either expressed or implied, of Sami Kerola. - */ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey 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; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If 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 convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU 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 that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + 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. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +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. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/ChangeLog b/ChangeLog index c1e1fd2..a9dbf33 100644 --- a/ChangeLog +++ b/ChangeLog @@ -23,7 +23,7 @@ See "git log" for change information. 2009-05-14 Dan Thorson * Memory boundary check. Lack of this caused illegal memory - references when there was plenty of backup leases. + refrences when there was plenty of backup leases. 2009-02-18 Sami Kerola && Dan Thorson * posix_fadvice to make read-ahead quicker. (SK) diff --git a/Makefile.am b/Makefile.am index 65b6ba2..091465b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,55 +1,6 @@ ## Makefile.am -- Process this file with automake to produce Makefile.in AUTOMAKE_OPTIONS = gnu +ACLOCAL_AMFLAGS = -I m4 -EXTRA_DIST = \ - .version \ - build-aux/git-version-gen \ - m4/gnulib-cache.m4 - -SUBDIRS = lib - -BUILT_SOURCES = $(top_srcdir)/.version -$(top_srcdir)/.version: - echo $(VERSION) > $@-t && mv $@-t $@ -dist-hook: - echo $(VERSION) > $(distdir)/.tarball-version - -PATHFILES = -CLEANFILES = $(PATHFILES) -EXTRA_DIST += $(PATHFILES:=.in) -CLEAN_LOCALS = - -edit_cmd = sed \ - -e 's|@ALARM_CRIT[@]|$(ALARM_CRIT)|g' \ - -e 's|@ALARM_WARN[@]|$(ALARM_WARN)|g' \ - -e 's|@DHCPDCONF_FILE[@]|$(DHCPDCONF_FILE)|g' \ - -e 's|@DHCPDLEASE_FILE[@]|$(DHCPDLEASE_FILE)|g' \ - -e 's|@OUTPUT_FORMAT[@]|$(OUTPUT_FORMAT)|g' \ - -e 's|@OUTPUT_LIMIT[@]|$(OUTPUT_LIMIT)|g' \ - -e 's|@PACKAGE_BUGREPORT[@]|$(PACKAGE_BUGREPORT)|g' \ - -e 's|@PACKAGE_MAINTAINER[@]|$(PACKAGE_MAINTAINER)|g' \ - -e 's|@PACKAGE_NAME[@]|$(PACKAGE_NAME)|g' \ - -e 's|@PACKAGE_URL[@]|$(PACKAGE_URL)|g' \ - -e 's|@SHELL[@]|$(SHELL)|g' \ - -e 's|@VERSION[@]|$(VERSION)|g' \ - -e 's|@bindir[@]|$(bindir)|g' \ - -e 's|@docdir[@]|$(docdir)|g' \ - -e 's|@top_srcdir[@]|$(top_srcdir)|g' - -$(PATHFILES): Makefile - @ rm -f $@ $@.tmp - $(AM_V_at) mkdir -p $$(dirname $@) - $(AM_V_GEN) srcdir=''; \ - test -f ./$@.in || srcdir=$(srcdir)/; \ - $(edit_cmd) $${srcdir}$@.in >$@.tmp - @ mv $@.tmp $@ - -include contrib/Makemodule.am -include doc/Makemodule.am -include man/Makemodule.am -include samples/Makemodule.am -include src/Makemodule.am -include tests/Makemodule.am - -clean-local: $(CLEAN_LOCALS) +SUBDIRS = src man contrib diff --git a/NEWS b/NEWS index 624e0f2..fb444da 100644 --- a/NEWS +++ b/NEWS @@ -5,520 +5,6 @@ See the end for copying conditions. Please send dhcpd-pools bug reports to kerolasa@iki.fi. -gpg: Signature is crated using RSA key ID 8ED396E37E38D471A00530D3A9553245FDE9B739. - - -Version 3.3 -Belkacem Daheb (2): - add start, end and hostname printing support for xml and json - getdata output: add start, end and hostname printing support for xml and json - -M. van Brummelen (1): - docs: fix manual page groff warning - -Sami Kerola (9): - update project web page - website: use https - chore: update web links - getdata: only emit warning when config include file cannot be read - gnulib: update bootstrap and gitignore files - build-sys: quote subshell execution in the autotools file - build-sys: update bootstrap from gnulib - output: update html javascripts - release: 3.3 - -luisδμ (1): - fix: avoid generation of unvalid JSON in summary - -Version 3.2 -Jean Benoit (1): - contrib: snmptest.pl SNMPwalk can't access to all variables/wrong sort - -Sami Kerola (5): - contrib: point out where one can find zabbix template - build-sys: update .gitignore files - config: remove unnecessary padding - build-sys: autotools and gnulib related updates - build-sys: routine update - release: 3.2 - -Version 3.1 -Mark Sangster (1): - output: fix warn and crit counts on shared networks - -Sami Kerola (31): - webpage: add instructions how to get output you need - build-sys: add coverage files to .gitignore - tests: improve coverage - docs: fix peoples name in THANKS file to have correct characters - add .mailmap - output: fix implicit conversion - main: simplify option parsing - fix typo - main: move print_mac_addreses to state structure - main: move output_format to state, and rename color_format - webpages: use html sample output - fix switch missing default case warnings - sort: ensure NaN will not trip over comp_double() - drop images, java scripts, and such from web sitemap file - getdata: remote dead code - other: use strftime() to generate date-time string - lib: update .gitignore - fix typos - various: fix few warnings - warnings: ensure optimal packing in structures - other: use IP string lengths from netinet/in.h - mustach: sync with most recent mustach upstream changes - various: tidy up variable scopes, and one name mismatch - build-sys: update .gitignore files - output: add warning and critical threshold counts to mustach - samples: make prometheus template less klunky - misc: fix spelling issues - output: add ethernet address priting support to --mustach - build-sys: update bootstrap from gnulib - output: update javascripts - release: 3.1 - -Version 3.0 -Sami Kerola (56): - release: update web page meta data - update sitemap - output: make output_analysis() to be regular function - getdata: fix typo - output: add output helper functions - output: add color support to text output - output: include earlier missing data to json output - output: add --skip-ok option - other: add --skip-ok to usage() output - output: json nan values need quoting - other: do not use 'else' after 'return' - getdata: do not use 'else' after 'continue' - include: use project specific header guard - output: use range_output_helper() value in output_xml() - output: add mustach templating support - output: add separate first_ip and last_ip to json and mustach outputs - docs: add mustach sample files - tests: add mustach check - output: make mustach processing more robust - output: avoid mixing ntop_ipaddr() output buffers - output: do not skip over first range in mustach output - output: save and reuse output helper results - output: add must_put_err() utility function - output: include stdlib.h to avoid compilation error - gnulib: use nstrftime instead of strftime - build-sys: omit mustach compilation when it cannot work - usage: add error message informing mustach support is not available - output: deduplicate file closing code - clean up: remove unused variable - all files: replace global variables with runtime config state structure - all files: re-indent - analyze: bug fix shared networks counts - other: add Jose Bollo to version output credits - output: improve mustach template parsing error - analysis: shared networks to be linked list - output: make --skip-ok to effect --perfdata - output: move shared net andn range status check to output_helper - output: make warning and critical colors work in html output - output: display more entries in html table by default - output: shared net can be in suppressed state - output: improve html table - hash: include stdlib.h to avoid implicit declarations - clean up: fix couple compiler warnings - thanks: add Troy D. Hanson to credits about uthash - samples: add prometheus text file collector mustach template - output: make --skip to take arguments what will be skipped - misc: move command line option parsing to separate function - misc: move couple enums from global scope to file scope - docs: improve doxygen documentation - output: remove unused variable attribute - output: add more items to mustach tags - output: unify time stamp creations - orther: fix xstrstr_init() memcmp() return value usage - output: add some trivia data to json output - usage: --skip=ignored is actually 'suppressed' - release: 3.0 - -Version 2.29 -Boris Lytochkin (1): - introduce -A arg: treat single subnets as shared-network with CIDR as their name - -Manuel Hachtkemper (1): - alarming: add additional performance data - -Sami Kerola (47): - tell in README when ./bootstrap is needed - add dhcpd-pools website content to a subdirectory - add sitemap url to robots.txt file - use long options in .indent.pro file - webpages: make index page mobile device friendly - webpages: compress sitemap.txt file - getdata: flip ranges if they are in greater smaller order - tests: add range definition flip test - contrib: add archlinux package build file - contrib: remove unnecessary cgi script - contrib: remove awk file duplicate - getdata: get rid of remaining stdbool usage - argument parsing: fix compiler warning - add dhcpd-pools Description Of A Project file - fix doap file git repository and license section - output: check alarming mode can output successfully - build-sys: update bootstrap from gnulib - build-sys: update gnulib .gitignore file - analyze: use while() when for() is less fit to purpose - build-sys: default to ./configure --enable-silent-rules - build-sys: always use restrict found by autoconf - docs: fix couple typos and improve a sentence in README - output: remove unnecessary increment - portability: add gnulib modules earlier missing - remove const and pure function attributes - man: improve synopsis and output limit - man: remove old html table only option argument from manual - getdata: report position in config file when parsing fails - output: fix timestamp localization on html page - output: add include avoid referringt to undefined definition - getdata: remove POSIX_FADV_NOREUSE - style: use same argument names in header and source file - contrib: Klaus Slott told about opensuse package - getdata: fpos_t is not easy to print correctly - lib: update .gitignore - fix typo - variable: add const to print_mac_addreses_tmp - lib: update .gitignore - add --ip-version option to force either IPv4 or IPv6 analysis - lib: update .gitignore - getdata: add cidr range support - build-sys: update bootstrap from gnulib - docs: update doxygen configuration file - docs: tell what needs to be done when releasing new version - docs: add build instruction link to the project web page - docs: update maintainer gpg key - release: 2.29 - -Version 2.28 -Sami Kerola (26): - portability: Solaris 10 does not have err.h - fix couple compiler warnings - make binary exec path dynamic in scripts referring to it - update doxygen.conf file - add --snet-alarms option to suppress excess range alarms - add --warn-count and --crit-count options to suppress alarm noise - improve README file instructions - make html output to use Bootstrap and DataTables - fix typo in README - correct return value FIXME items - use more descriptive names in limit bits enum definition - remove upper limit of sort order definitions - fix protocol specifier in html output - use bitmap for booleans and other config that has known size - simplify output format selection, and passing - fix doxygen build - fix improve variable names - print include system error message when output fails - drop a core when bug condition happens - make usage() easier to read - unify quotation in error messages - add --warn-count and --crit-count test, and fix related bug - test all sorting options - change NAN markup to make tests work on mac - fix out of tree build tests - release: 2.28 - -Version 2.27 -Sami Kerola (9): - docs: remove very basic git usage info - docs: remove todo items that will never happen - output: remove empty element from xml - add touched addresses counts to xml and json reports - add xml format check - improve html output - add hint about configure options to README - man: fix character class change - gitignore: update gnulib file list - release: 2.27 - -Version 2.26 -$ git shortlog v2.25..v2.26 -Sami Kerola (15): - news: add the note about .sig pgp key id - reindent all files - declare global variables only once - add appropriate sorting function for struct leases_t - update kernel.org url in README - getdata: fix buffer-overflows reported by address sanitizer - update bootstrap from gnulib - getdata: fix buffer overflow [AddressSanitizer] - other: reduce variable scope - output: prefer thread safe function localtime_r() - tests: add regression test to avoid shared-net off by one alarming - issue - output: avoid division by zero - other: disallow unsigned counter ever to have minus value - maint: remove unnecessary braces, spaces, update gnulib .gitignore - release: 2.26 - -Wolfgang Steudel (1): - alarming: include last shared network in alarming [off by one] - -Version 2.25 -$ git shortlog v2.24..v2.25 -Sami Kerola (14): - build-sys: use more strict method to check __builtin_expect - getdata: add missing HAVE_POSIX_FADVISE protection - getdata: fix consecutive range definition regression - man: add tip analysis of include files can be useful - thanks: add Fredrik Lysén & Conor McCarthy - generic: use pure and const function attributes when possible - tests: fix testing error - output: make nagios output have performance data - build-sys: update gitinore file - output: use symbolic exit values for nagios commands - build-sys: update bootstrap script - build-sys: require automake 1.12 to get working test-driver - contrib: add release siging key to contrib/ - release: 2.25 - -Version 2.24 -$ git shortlog v2.23..v2.24 -Sami Kerola (22): - build-sys: update configure.ac - output: make output limits to apply to alarm return values - tests: add alarming tests - output: allow alarming, in case of success, be silent - tests: fix tests to use the new OK printing limit - docs: inform how the limits affect to printing when alarming is in use - output: allow user to ignore small ranges and shared networks - tests: test small network alarm ignoring - docs: add an example how to use limits with alarming - thanks: Dan Pritts - xstrstr: speed up analysis by avoiding string comparisons - other: memcmp() is tiny bit quicker than strncmp() - build-sys: update gnulib modules - build-sys: AC_PROG_CC_C99 is obsolete; use AC_PROG_CC - getdata: use correct file caching advice - analyze: remove unnecessary function - getdata: memccpy() is better than own similar function - getdata: split busy function to segments used via function pointer - various: split functions to IPv4 and IPv6 versions - various: fix memory leaks - getdata: fix one ip ranges when they have trailing spaces in definition - release: 2.24 - -Version 2.23 -$ git shortlog v2.22..v2.23 -Sami Kerola (3): - gnulib: add gnulib modules - build-sys: update bootstrap from gnulib - release: 2.23 - -Version 2.22 -$ git shortlog v2.21..v2.22 -Cheer Xiao (1): - getdata: treat binding states abandoned, expired and release like free - -Sami Kerola (19): - tests: add complete check including multiple ranges and shared networks - include: add missing declarations to dhcpd-pool.h - cppcheck: fix variable scoping - build-sys: update .gitignore - build-sys: add git-version-gen and test.sh to release package - docs: fix spelling mistakes in manual page - build-sys: ensure distribution has version file - build-sys: update git-version-gen from gnulib - tests: binding states commit needs to be reflected in expected results - build-sys: reorder gnulib macro in relation to C standard - getdata: posix_fadvise() error checking - getdata: certain input files caused SIGSEGV - tests: check how command works with invalid input - getdata: make a lease address detection more robust - getdata: make single address ranges work - tests: add a test for one ip range - build-sys: fix gnulib function order - build-sys: use non-recursive build - release: 2.22 - -Version 2.21 -$ git shortlog v2.20..v2.21 -Cheer Xiao (10): - IPv6: add DHCPv6 support - sort: Use a comparer instead of returner - sort: Get rid of global comparer - counting & output: Convert all counters to double - fix: Put prototype of field_selector back to dhcpd-pools.h - sort: let field_selector return NULL at the end - counting: Let get_range_size return double - sort: let comp_* functions compare double - tests: update expected/v6 - output: fix doc of output_double - -Gilles Bouthenot (5): - output: add json format support - json output: add newline at end - json output: remove useless, empty fields - json output: bugfix: correct range specify only first ip - contrib: add munin plugins - -Sami Kerola (29): - build-sys: remove c++ compiler check - tools: add indent command configuration file - tests: add basic tests - build-sys: update .gitignore - tests: add v6 check - output: remove unnecessary new line printing - build-sys: more clean ups - json output: use defined output file for all printing - tests: add json tests, and make fail output loud - ouput format: fix active lease printing - output ethernet: do not crash if ethernet is missing - docs: add doxygen tags, configuration file, and autotooling - backup counting: fix output regression - clean up: remove unused functions - clean up: move code to more proper location - hash: make delete to use HASH_ITER if it is available - clean up: move global variables to config structure - clean up: use enum as symbolic bit masks - clean up: convert parsing magic numbers to symbolic values - clean up: rename get_order() to merge() and mark static - clean up: fix few indentation slips - getdata: be consistant with symbolic numbers - smatch scan: fix few warnings - build-sys: allow tests run parallel - build-sys: update .gitignore files - docs: thanks to Cheer Xiao this software has IPv6 support - tests: fix make distcheck - docs: fix doxygen make distcheck breakage - release: 2.21 - -Version 2.20 -$ git shortlog v2.19..v2.20 -Cheer Xiao (3): - ignore /gnulib/ - Replace all htonl in getdata.c with ntohl. - Fix spelling mistakes. - -Sami Kerola (20): - analyze: use simpler comparison - analyze: sort ranges before analysis - sort: fix if else return statements - getdata: fix if else return statements - analyze, getdata: write functions in frequency order - getdata: stop looking after interesting field - getdata: skip strings before nth_field analysis - analyze: use gnulib - sort: fix get_order() if else return statement - (un)likely: use __builtin_expect to inform expected path - header: let gnulib do what it is best of - xstrstr: add function attributes - docs: fix spelling mistakes - getdata & analyze: fix first_ip and last_ip arithmetics - man: use configured dhcpd.conf and dhcpd.leases paths - build-sys: update gitignore - build-sys: clean up configure.ac - build-sys: make alarm warning & critical default configurable - man: fix errors in alarm warning and critical options text - release: 2.20 - -Version 2.19 -$ git shortlog v2.18..v2.19 -Sami Kerola (19): - alarming: make native nagios support to dhcpd-pools - docs: add examples to manual page - docs: add note how to limit alarming scope - contrib: add nagios.conf example - build-sys: create only xz compressed distribution package - all: fix compiler warninings - style: fix few indentation issues - build-sys: use AM_CPPFLAGS rather than INCLUDES - output: fix sign-compare warning [clang] - build-sys: add what autoscan found bein missing - build-sys: be conservative about posix_fadvice - docs: clarify man page - build-sys: add gnulib - build-sys: clean gnulib & autotools checks - performance: add few restict and const key words - build-sys: remove files which where added by accident - docs: mention gnulib in README file - build-sys: update gitignore - release: 2.19 - -Version 2.18 -$ git shortlog v2.17..v2.18 -Ryan Steinmetz (1): - build-sys: make build work under FreeBSD - -Sami Kerola (2): - build-sys: add --with-uthash=DIR ./configure option - analyze: a lot of IP counts being missed - -Version 2.17 -# git shortlog v2.16..v2.17 -Enno Gröper (1): - analyse: critical bug in the counting code - -Sami Kerola (16): - dhcpd-pools.h: move string.h to include - dhcpd-pools.h: move string.h to include - docs: TODO update - Merge branch 'master' of - ssh://dhcpd-pools.git.sourceforge.net/gitroot/dhc - build: smatch compiler warnings fixed - docs: enhance manual page readability - all files: use restrict key word for all pointer arguments - build-sys: C99 has true and false - docs: update thanks - TODO: update bugs - contrib: add first .awk algorithm test version to contrib - docs: update TODO - getdata: fix configuration parser bug - getdata: do not mix boolean and int data types [cppcheck] - output: verify stream status when closing files - build-sys: update news for release v2.17 - -Version 2.16 -# git shortlog v2.15..v2.16 -Sami Kerola (25): - docs: help screen & man page - docs: add missing full-html flag - headers: include-what-you-use fixes - other: free backup ranges - prepare_memory bug: initialization missing - licensing: use FreeBSD license (was GNUv3) - parse_leases: exit at read error - getdata: realloc instead of asserting - getdata: potential overflow due unit change - bug: use uint32_t for IP numbers - analyze: use more logical variable names - getdata: initialize memory - all: include-what-you-see fixes - analyze: debugging leftover removed - THANKS: add Ahmed AL Dakhil - maint: coding style fixes - output: change to full html behaviour - build-sys: autotools configure.ac update - docs: NEWS update - docs: remove version from manual page - licensing: set placeholder properly - bug: use uint32_t for IP numbers - build-sys: ignore gprof & gcov files - getdata: new xstrstr function for performance - other: fix two warnings - build-sys: update news for release v2.16 - -Version 2.15 -# git shortlog v2.14..v2.15 -Sami Kerola (13): - dhcpd-pools.h: function attributes declarations - dhcpd-pools.h: indentation fix - getdata.c: initialize variables to have safe values - autotools: point correct location of src - flose files & free memory when not needed - dhcpd-pools.h: portable program_invocation_short_name - build-sys: use git version as program version output - build-sys: git describe listed wrong tag - getdata: increase max number of shared networks - clean_up: checking errno at exit does not make sense - make range allocation dynamic - shared network names to be dynamically allocated - thanks: list update Version 2.14 # git shortlog v2.13..v2.14 diff --git a/README b/README index 5953fba..efa6974 100644 --- a/README +++ b/README @@ -1,62 +1,187 @@ -This is dhcpd-pools - ISC dhcpd lease status utility. +This is dhcpd-pools which is made for ISC dhcpd pool range analysis. -Quick start. +== Quick start - Get the uthash, assuming you do not have it already. - - cd /tmp - wget https://github.com/troydhanson/uthash/archive/master.zip - unzip master.zip - - Build the dhcpd-pools project. - - cd /tmp/dhcpd-pools - ./bootstrap # only when building git clone - ./configure --with-uthash=/tmp/uthash-master/include + ./autogen.sh + ./configure --prefix=/usr/local make - make check make install - Notice that there are configuration options for default dhcpd.conf, - dhcpd.leases paths, among other things. - ./configure --help +== General information - Remember to read the friendly manual page. + With this command you can check usage of pool addresses + when address space is great. Command is designed so that + it will not get slow even there is thousands of IPs in + lease file. This kind of huge dhcpd installation can be + near by DSL DSLAMs or some other public access connection + points. - man ./man/dhcpd-pools.1 + This command will not print nice to know information like + DHCPStatus does. Output is limited only to list only + usage for ranges, shared network and total address space. + Limiting what is printed is the right thing to do when + there is thousands of addresses. If your address space is + small some other dhcp analyzer might be more suitable for + you. -Dependencies to other projects. - https://www.gnu.org/software/gnulib/ - - You can avoid repeated gnulib downloads by setting - GNULIB_SRCDIR environment variable. For example: - - git clone git://git.savannah.gnu.org/gnulib.git ~/src/gnulib - export GNULIB_SRCDIR="$HOME/src/gnulib" - - Assumign detached gnulib please remember to git pull the - latest updates before building dhcpd-pools. - - https://troydhanson.github.io/uthash/ - - See quick start. - - https://getbootstrap.com/ - https://datatables.net/ - - Bootstrap and DataTables java scripts are used in html - output. - -Test data wanted. +== Test data wanted Maintainer is interested to get copy of your dhcpd.conf - and dhcpd.leases files, and include files if you use them. + and dhcpd.leases file, with includes if you use them. Intention is to collect large set of data to build - realistic regression test environment. + realistic regression test environment. By giving your + data to maintainer you can be sure that updates will work + for you. If you are interested to help this way put all files into - tar.gz, and send them to: + tar.gz, and send them to kerolasa@iki.fi. It would be nice + that email subject line would have 'dhcpd-pools test data'. - Sami Kerola + +== Instructions for developers + +AUTOTOOLS: + + * "./autogen.sh" generates all files needed to compile + and install the code (run it after checkout from git) + + * "make distclean" removes all unnecessary files, but the + code can still be recompiled with "./configure; make" + +PATCHES: + + * First get familiar with git. In case you are completely + lost watch Greg Kroah-Hartman explaining the very + basics. + http://archive.fosdem.org/2010/schedule/events/linuxkernelpatch + + * Get up to date version of the code base. + + $ git clone git://dhcpd-pools.git.sourceforge.net/gitroot/dhcpd-pools/dhcpd-pools + + * Don't include generated (autotools) stuff to your + patches (hint: use git-clean [-X]) + + * Add a Signed-off-by line, use "git commit -s" + + * Patches are delivered via email only. The following + commands will do the correct thing. + + $ git format-patch -C origin/master..yourbranch -o ~/patches + + When you send only one patch use the following. + + $ git send-email --to kerolasa@iki.fi 0001* + + The command above expects you have configured email + sending properly. See git.wiki for help. + https://git.wiki.kernel.org/index.php/GitTips#Mail + + * One patch per email, with the changelog in the body of + the email. + + * When you send series of pathes include introductory + message. + + $ git send-email --compose --to kerolasa@iki.fi ~/00* + + Good introductory message will have at least + + -- snip + Your Name (3): + firstfile.c: short description + secondfile.c: another description + + firstfile.c | 2 +- + secondfile.c | 2 +- + secondfile.c | 2 +- + 2 files changed, 3 insertions(+), 3 deletions(-) + -- snip + + Above introductory can be generated with git. + + $ git shortlog master..yourbranch + $ git diff --stat master..yourbranch + + * Subject: [PATCH] subsystem: description. Following + ~/.gitconfig will help you a little. + + -- snip + [user] + name = Your Name + email = your.name@example.com + + [format] + subjectprefix = PATCH + numbered = auto + signoff = yes + + [sendemail] + chainreplyto = false + cc = your.name@example.com + -- snip + + * If someone else wrote the patch, they should be + credited (and blamed) for it. To communicate this, add + a line: + + From: John Doe + + The sign-off is a simple line at the end of the + explanation for the patch, which certifies that you + wrote it or otherwise have the right to pass it on as a + open-source patch. The rules are pretty simple: if you + can certify the below: + + By making a contribution to this project, I certify + that: + + (a) The contribution was created in whole or in + part by me and I have the right to submit it + under the open source license indicated in the + file; or + + (b) The contribution is based upon previous work + that, to the best of my knowledge, is covered + under an appropriate open source license and I + have the right under that license to submit + that work with modifications, whether created + in whole or in part by me, under the same open + source license (unless I am permitted to submit + under a different license), as indicated in the + file; or + + (c) The contribution was provided directly to me by + some other person who certified (a), (b) or (c) + and I have not modified it. + + (d) I understand and agree that this project and + the contribution are public and that a record + of the contribution (including all personal + information I submit with it, including my + sign-off) is maintained indefinitely and may be + redistributed consistent with this project or + the open source license(s) involved. + + then you just add a line saying + + Signed-off-by: Random J Developer + + using your real name (sorry, no pseudonyms or anonymous + contributions.) + + * If the the business with git is too difficult just send + source code files as is as email attachment to + maintainer. + +CODING STYLE: + + * The preferred coding style is based on the linux kernel + Documentation/CodingStyle. For more details see: + + http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob_plain;f=Documentation/CodingStyle + + * Source code is pretty printed by using two, and only + the two, indent command switches -kr -i8 diff --git a/THANKS b/THANKS index 2aec631..6735a5a 100644 --- a/THANKS +++ b/THANKS @@ -5,50 +5,15 @@ Project is maintained by Sami Kerola People who reported problems, give improvement suggestions or even contributed code. -Otto J. Mäkelä +Otto J. Mäkelä Mika Paananen Frank Bulk Roar Pettersen Jeff Wieland Rusty -Fredrik Vöcks +Fredrik Vöcks Dan Thorson -Stian ØvrevÃ¥ge +Stian Øvrevåge Dominic Germain -Anders LÃ¥stad +Anders Låstad Thor Eivind Brantzeg -Ahmed AL Dakhil -Adam Ciarcinski -RezsÅ‘ Gajdóczy -Robert Viou -Enno Gröper -Troy D. Hanson -Ryan Malek -Cheer Xiao -Gilles Bouthenot -Helmut Grohne -Joey D. -Ryan Steinmetz -Dan Pritts -Fredrik Lysén -Conor McCarthy -Wolfgang Steudel -Aaron Paetznick -Tim Cantin -Martijn van Brummelen -Anton Tkachev -Derrick Lin -Ivanov Ivan -Manuel Hachtkemper -Klaus Slott -Boris Lytochkin -Jeff Bailey -José Bollo -Sebastián Cramatte -Mark Sangster -Brent Swingle -Mathieu Morier -Jean Benoit -Belkacem Daheb -Björn Lässig -Luisδμ diff --git a/TODO b/TODO index 15c3792..0af341a 100644 --- a/TODO +++ b/TODO @@ -1,33 +1,21 @@ -### Bugs +1 Well structured code, with extendible sane architecture. +2 Server, which has analysis in cache for N seconds and will + answer via socket. +3 Configuration file for server. +4 State file, where different ranges, shared networks etc have + unique identifiers (needed for graphs). +5 Support for snmp and munin protocols. +6 SNMP traps when limits get exceeded. +7 Some clever check_dhcpd_pools binary for Nagios & other + monitoring software. -Reported-by: Huangyu: I found dhcpd-pools didn't consider if the - active lease's ends time is passed so it would still think the - lease is active even if dhcpd daemon is stopped for a long time, - the leases marked by "active" state in lease_file has expired in - fact. +8 Super server support, which will collect analysis from other + dhcpd-pool servers. +9 Nice http view interface on super server, much can be copied + from http://piwik.org/ +10 IPv6 support. +11 And some other things perhaps... -### Feature requests - -o Assigned IPs count (Nelson) -o Subnet counting class (Henryk) -o When time stamps are part of lease situation evaluation (see - bug 1) add a --now switch which will one can use to change when - expiry happens. -o Add lease time histogram support. - -### When releasing - -o Update gnulib -o Update bootstrap -o Update DataTables, and bootstrap versions; see https://datatables.net/download/index -o Update NEWS, webpages/index.html dateModified & version -o Make annotated git tag -o ./configure --enable-doxygen && make distcheck -o BROWSER=cat man -H ./man/dhcpd-pools.1 | tee ./webpages/man.html -o gpg --armor --detach-sign dhcpd-pools*tar* -* Update sitemap -o Upload files to sourceforge -o mv doc/html webpages/doxygen -o sftp index.html man.html doxygen/* -> sourceforge web - remove old doxygen before uploading new -o Send email to dhcpd-pools-announce@lists.sourceforge.net subject: Version 3.n is released +When items 1-7 are done v3 can be released. To support rewrite +there should be a design document with nice blue print, which is +a web page. diff --git a/autogen.sh b/autogen.sh new file mode 100755 index 0000000..a8112e8 --- /dev/null +++ b/autogen.sh @@ -0,0 +1,79 @@ +#!/bin/sh + +# +# Helps generate autoconf/automake stuff, when code is checked +# out from SCM. +# +# The script is copied from util-linux package. +# + +srcdir=`dirname $0` +test -z "$srcdir" && srcdir=. + +THEDIR=`pwd` +cd $srcdir +DIE=0 + +test -f src/dhcpd-pools.c || { + echo + echo "You must run this script in the top-level dhcpd-pools directory" + echo + DIE=1 +} + +(autoconf --version) < /dev/null > /dev/null 2>&1 || { + echo + echo "You must have autoconf installed to generate dhcpd-pools build system." + echo + DIE=1 +} +(autoheader --version) < /dev/null > /dev/null 2>&1 || { + echo + echo "You must have autoheader installed to generate dhcpd-pools build system." + echo "The autoheader command is part of the GNU autoconf package." + echo + DIE=1 +} +(libtool --version) < /dev/null > /dev/null 2>&1 || { + echo + echo "You must have libtool-2 installed to generate dhcpd-pools build system." + echo + DIE=1 +} +(automake --version) < /dev/null > /dev/null 2>&1 || { + echo + echo "You must have automake installed to generate dhcpd-pools build system." + echo + DIE=1 +} + +ltver=$(libtoolize --version | awk '/^libtoolize/ { print $4 }') +test ${ltver##2.} = "$ltver" && { + echo "You must have libtool version >= 2.x.x, but you have $ltver." + DIE=1 +} + +if test "$DIE" -eq 1; then + exit 1 +fi + +echo +echo "Generate build-system by:" +echo " aclocal: $(aclocal --version | head -1)" +echo " autoconf: $(autoconf --version | head -1)" +echo " autoheader: $(autoheader --version | head -1)" +echo " automake: $(automake --version | head -1)" +echo " libtoolize: $(libtoolize --version | head -1)" + +set -e +libtoolize --force $LT_OPTS +aclocal $AL_OPTS +autoconf $AC_OPTS +autoheader $AH_OPTS +automake --add-missing $AM_OPTS + +cd $THEDIR + +echo +echo "Now type '$srcdir/configure' and 'make' to compile." +echo diff --git a/bootstrap b/bootstrap deleted file mode 100755 index 6f289d7..0000000 --- a/bootstrap +++ /dev/null @@ -1,1631 +0,0 @@ -#! /bin/sh -# DO NOT EDIT! GENERATED AUTOMATICALLY! - -# Bootstrap this package from checked-out sources. - -scriptversion=2024-07-04.10; # UTC - -# Copyright (C) 2003-2025 Free Software Foundation, Inc. -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# Originally written by Paul Eggert. The canonical version of this -# script is maintained as top/bootstrap in gnulib. However, to be -# useful to your package, you should place a copy of it under version -# control in the top-level directory of your package. The intent is -# that all customization can be done with a bootstrap.conf file also -# maintained in your version control; gnulib comes with a template -# build-aux/bootstrap.conf to get you started. - -# Please report bugs or propose patches to bug-gnulib@gnu.org. - -me="$0" -medir=`dirname "$me"` - -# Read the function library and the configuration. - -# A library of shell functions for autopull.sh, autogen.sh, and bootstrap. - -scriptlibversion=2025-02-16.12; # UTC - -# Copyright (C) 2003-2025 Free Software Foundation, Inc. -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# Originally written by Paul Eggert. The canonical version of this -# script is maintained as top/bootstrap-funclib.sh in gnulib. However, -# to be useful to your package, you should place a copy of it under -# version control in the top-level directory of your package. The -# intent is that all customization can be done with a bootstrap.conf -# file also maintained in your version control; gnulib comes with a -# template build-aux/bootstrap.conf to get you started. - -nl=' -' - -# Ensure file names are sorted consistently across platforms. -LC_ALL=C -export LC_ALL - -# Honor $PERL, but work even if there is none. -PERL="${PERL-perl}" - -default_gnulib_url=https://git.savannah.gnu.org/git/gnulib.git - -# Copyright year, for the --version output. -copyright_year=`echo "$scriptlibversion" | sed -e 's/[^0-9].*//'` -copyright="Copyright (C) ${copyright_year} Free Software Foundation, Inc. -License GPLv3+: GNU GPL version 3 or later . -This is free software: you are free to change and redistribute it. -There is NO WARRANTY, to the extent permitted by law." - -# warnf_ FORMAT-STRING ARG1... -warnf_ () -{ - warnf_format_=$1 - shift - nl=' -' - case $* in - *$nl*) me_=$(printf "$me"|tr "$nl|" '??') - printf "$warnf_format_" "$@" | sed "s|^|$me_: |" ;; - *) printf "$me: $warnf_format_" "$@" ;; - esac >&2 -} - -# warn_ WORD1... -warn_ () -{ - # If IFS does not start with ' ', set it and emit the warning in a subshell. - case $IFS in - ' '*) warnf_ '%s\n' "$*";; - *) (IFS=' '; warn_ "$@");; - esac -} - -# die WORD1... -die() { warn_ "$@"; exit 1; } - -# ------------------------------ Configuration. ------------------------------ - -# Directory that contains package-specific gnulib modules and/or overrides. -local_gl_dir=gl - -# Name of the Makefile.am -# XXX Not used. -gnulib_mk=gnulib.mk - -# List of gnulib modules needed. -gnulib_modules= - -# Any gnulib files needed that are not in modules. -gnulib_files= - -# A function to be called for each unrecognized option. Returns 0 if -# the option in $1 has been processed by the function. Returns 1 if -# the option has not been processed by the function. Override it via -# your own definition in bootstrap.conf -bootstrap_option_hook() { return 1; } - -# A function to be called in order to print the --help information -# corresponding to user-defined command-line options. -bootstrap_print_option_usage_hook() { :; } - -# A function to be called at the end of autopull.sh. -# Override it via your own definition in bootstrap.conf. -bootstrap_post_pull_hook() { :; } - -# A function to be called right after gnulib-tool is run. -# Override it via your own definition in bootstrap.conf. -bootstrap_post_import_hook() { :; } - -# A function to be called after everything else in this script. -# Override it via your own definition in bootstrap.conf. -bootstrap_epilogue() { :; } - -# The command to download all .po files for a specified domain into a -# specified directory. Fill in the first %s with the destination -# directory and the second with the domain name. -po_download_command_format=\ -"wget --mirror --level=1 -nd -nv -A.po -P '%s' \ - https://translationproject.org/latest/%s/" - -# When extracting the package name from an AC_INIT invocation, -# prefer a non-empty tarname (4th argument of AC_INIT if given), else -# fall back to the package name (1st argument with munging). -extract_package_name=' - /^AC_INIT(\[*/{ - s/// - /^[^,]*,[^,]*,[^,]*,[ []*\([^][ ,)]\)/{ - s//\1/ - s/[],)].*// - p - q - } - s/[],)].*// - s/-/_/g - p - } -' -normalize_package_name=' - s/^GNU // - y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ - s/[^abcdefghijklmnopqrstuvwxyz0123456789_]/-/g -' -package=$(${AUTOCONF:-autoconf} --trace 'AC_INIT:$4' configure.ac 2>/dev/null) -if test -z "$package"; then - package=$(sed -n "$extract_package_name" configure.ac) \ - || die 'cannot find package name in configure.ac' -fi -package=$(echo "$package" | sed "$normalize_package_name") -gnulib_name=lib$package - -build_aux=build-aux -source_base=lib -m4_base=m4 -doc_base=doc -tests_base=tests -gnulib_extra_files=" - build-aux/install-sh - build-aux/mdate-sh - build-aux/texinfo.tex - build-aux/depcomp - build-aux/config.guess - build-aux/config.sub - doc/INSTALL -" - -# Additional gnulib-tool options to use. Use "\newline" to break lines. -gnulib_tool_option_extras= - -# Other locale categories that need message catalogs. -EXTRA_LOCALE_CATEGORIES= - -# Additional xgettext options to use. Use "\\\newline" to break lines. -XGETTEXT_OPTIONS='\\\ - --flag=_:1:pass-c-format\\\ - --flag=N_:1:pass-c-format\\\ - --flag=error:3:c-format --flag=error_at_line:5:c-format\\\ -' - -# Package bug report address and copyright holder for gettext files -COPYRIGHT_HOLDER='Free Software Foundation, Inc.' -MSGID_BUGS_ADDRESS=bug-$package@gnu.org - -# Files we don't want to import. -# XXX Not used. -excluded_files= - -# File that should exist in the top directory of a checked out hierarchy, -# but not in a distribution tarball. -checkout_only_file=project.doap - -# Set this to '.cvsignore .gitignore' in bootstrap.conf if you want -# those files to be generated in directories like lib/, m4/, and po/. -# Or set it to 'auto' to make this script select which to use based -# on which version control system (if any) is used in the source directory. -vc_ignore=auto - -# Set this to true in bootstrap.conf to enable --bootstrap-sync by -# default. -bootstrap_sync=false - -# Override the default configuration, if necessary. -# Make sure that bootstrap.conf is sourced from the current directory -# if we were invoked as "sh bootstrap". -conffile=`dirname "$me"`/bootstrap.conf -test -r "$conffile" && . "$conffile" - -# ------------------------- Build-time prerequisites ------------------------- - -check_exists() { - if test "$1" = "--verbose"; then - ($2 --version /dev/null 2>&1 - if test $? -ge 126; then - # If not found, run with diagnostics as one may be - # presented with env variables to set to find the right version - ($2 --version /dev/null 2>&1 - fi - - test $? -lt 126 -} - -# Note this deviates from the version comparison in automake -# in that it treats 1.5 < 1.5.0, and treats 1.4.4a < 1.4-p3a -# but this should suffice as we won't be specifying old -# version formats or redundant trailing .0 in bootstrap.conf. -# If we did want full compatibility then we should probably -# use m4_version_compare from autoconf. -sort_ver() { # sort -V is not generally available - ver1="$1" - ver2="$2" - - # split on '.' and compare each component - i=1 - while : ; do - p1=$(echo "$ver1" | cut -d. -f$i) - p2=$(echo "$ver2" | cut -d. -f$i) - if [ ! "$p1" ]; then - echo "$1 $2" - break - elif [ ! "$p2" ]; then - echo "$2 $1" - break - elif [ ! "$p1" = "$p2" ]; then - if [ "$p1" -gt "$p2" ] 2>/dev/null; then # numeric comparison - echo "$2 $1" - elif [ "$p2" -gt "$p1" ] 2>/dev/null; then # numeric comparison - echo "$1 $2" - else # numeric, then lexicographic comparison - lp=$(printf "%s\n%s\n" "$p1" "$p2" | LANG=C sort -n | tail -n1) - if [ "$lp" = "$p2" ]; then - echo "$1 $2" - else - echo "$2 $1" - fi - fi - break - fi - i=$(($i+1)) - done -} - -get_version_sed=' -# Move version to start of line. -s/.*[v ]\([0-9]\)/\1/ - -# Skip lines that do not start with version. -/^[0-9]/!d - -# Remove characters after the version. -s/[^.a-z0-9-].*// - -# The first component must be digits only. -s/^\([0-9]*\)[a-z-].*/\1/ - -#the following essentially does s/5.005/5.5/ -s/\.0*\([1-9]\)/.\1/g -p -q' - -get_version() { - app=$1 - - $app --version >/dev/null 2>&1 || { $app --version; return 1; } - - $app --version 2>&1 | sed -n "$get_version_sed" -} - -check_versions() { - ret=0 - - while read app req_ver; do - # We only need libtoolize from the libtool package. - if test "$app" = libtool; then - app=libtoolize - fi - # Exempt git if git is not needed. - if test "$app" = git; then - $check_git || continue - fi - # Honor $APP variables ($TAR, $AUTOCONF, etc.) - appvar=$(echo $app | LC_ALL=C tr '[a-z]-' '[A-Z]_') - test "$appvar" = TAR && appvar=AMTAR - case $appvar in - GZIP) ;; # Do not use $GZIP: it contains gzip options. - PERL::*) ;; # Keep perl modules as-is - *) eval "app=\${$appvar-$app}" ;; - esac - - # Handle the still-experimental Automake-NG programs specially. - # They remain named as the mainstream Automake programs ("automake", - # and "aclocal") to avoid gratuitous incompatibilities with - # preexisting usages (by, say, autoreconf, or custom autogen.sh - # scripts), but correctly identify themselves (as being part of - # "GNU automake-ng") when asked their version. - case $app in - automake-ng|aclocal-ng) - app=${app%-ng} - ($app --version | grep '(GNU automake-ng)') >/dev/null 2>&1 || { - warn_ "Error: '$app' not found or not from Automake-NG" - ret=1 - continue - } ;; - # Another check is for perl modules. These can be written as - # e.g. perl::XML::XPath in case of XML::XPath module, etc. - perl::*) - # Extract module name - app="${app#perl::}" - if ! $PERL -m"$app" -e 'exit 0' >/dev/null 2>&1; then - warn_ "Error: perl module '$app' not found" - ret=1 - fi - continue - ;; - esac - if [ "$req_ver" = "-" ]; then - # Merely require app to exist; not all prereq apps are well-behaved - # so we have to rely on $? rather than get_version. - if ! check_exists --verbose $app; then - warn_ "Error: '$app' not found" - ret=1 - fi - else - # Require app to produce a new enough version string. - inst_ver=$(get_version $app) - if [ ! "$inst_ver" ]; then - warn_ "Error: '$app' not found" - ret=1 - else - latest_ver=$(sort_ver $req_ver $inst_ver | cut -d' ' -f2) - if [ ! "$latest_ver" = "$inst_ver" ]; then - warnf_ '%s\n' \ - "Error: '$app' version == $inst_ver is too old" \ - " '$app' version >= $req_ver is required" - ret=1 - fi - fi - fi - done - - return $ret -} - -print_versions() { - echo "Program Min_version" - echo "----------------------" - printf %s "$buildreq" - echo "----------------------" - # can't depend on column -t -} - -# check_build_prerequisites check_git -check_build_prerequisites() -{ - check_git="$1" - - # gnulib-tool requires at least automake and autoconf. - # If either is not listed, add it (with minimum version) as a prerequisite. - case $buildreq in - *automake*) ;; - *) buildreq="automake 1.9 -$buildreq" ;; - esac - case $buildreq in - *autoconf*) ;; - *) buildreq="autoconf 2.59 -$buildreq" ;; - esac - - # When we can deduce that gnulib-tool will require patch, - # and when patch is not already listed as a prerequisite, add it, too. - if test -d "$local_gl_dir" \ - && ! find "$local_gl_dir" -name '*.diff' -exec false {} +; then - case $buildreq in - *patch*) ;; - *) buildreq="patch - -$buildreq" ;; - esac - fi - - if ! printf '%s' "$buildreq" | check_versions; then - echo >&2 - if test -f README-prereq; then - die "See README-prereq for how to get the prerequisite programs" - else - die "Please install the prerequisite programs" - fi - fi - - # Warn the user if autom4te appears to be broken; this causes known - # issues with at least gettext 0.18.3. - probe=$(echo 'm4_quote([hi])' | autom4te -l M4sugar -t 'm4_quote:$%' -) - if test "x$probe" != xhi; then - warn_ "WARNING: your autom4te wrapper eats stdin;" - warn_ "if bootstrap fails, consider upgrading your autotools" - fi -} - -# find_tool ENVVAR NAMES... -# ------------------------- -# Search for a required program. Use the value of ENVVAR, if set, -# otherwise find the first of the NAMES that can be run. -# If found, set ENVVAR to the program name, die otherwise. -# -# FIXME: code duplication, see also gnu-web-doc-update. -find_tool () -{ - find_tool_envvar=$1 - shift - find_tool_names=$@ - eval "find_tool_res=\$$find_tool_envvar" - if test x"$find_tool_res" = x; then - for i; do - if check_exists $i; then - find_tool_res=$i - break - fi - done - fi - if test x"$find_tool_res" = x; then - warn_ "one of these is required: $find_tool_names;" - die "alternatively set $find_tool_envvar to a compatible tool" - fi - eval "$find_tool_envvar=\$find_tool_res" - eval "export $find_tool_envvar" -} - -# --------------------- Preparing GNULIB_SRCDIR for use. --------------------- -# This is part of autopull.sh, but bootstrap needs it too, for self-upgrading. - -# cleanup_gnulib fails, removing the directory $gnulib_path first. -cleanup_gnulib() { - status=$? - rm -fr "$gnulib_path" - exit $status -} - -git_modules_config () { - test -f .gitmodules && git config --file .gitmodules "$@" -} - -prepare_GNULIB_SRCDIR () -{ - if test -n "$GNULIB_SRCDIR"; then - # Use GNULIB_SRCDIR directly. - # We already checked that $GNULIB_SRCDIR references a directory. - # Verify that it contains a gnulib checkout. - test -f "$GNULIB_SRCDIR/gnulib-tool" \ - || die "Error: --gnulib-srcdir or \$GNULIB_SRCDIR is specified," \ - "but does not contain gnulib-tool" - if test -n "$GNULIB_REVISION" && $use_git; then - # The 'git checkout "$GNULIB_REVISION"' command succeeds if the - # GNULIB_REVISION is a commit hash that exists locally, or if it is - # branch name that can be fetched from origin. It fails, however, - # if the GNULIB_REVISION is a commit hash that only exists in - # origin. In this case, we need a 'git fetch' and then retry - # 'git checkout "$GNULIB_REVISION"'. - git -C "$GNULIB_SRCDIR" checkout "$GNULIB_REVISION" 2>/dev/null \ - || { git -C "$GNULIB_SRCDIR" fetch origin \ - && git -C "$GNULIB_SRCDIR" checkout "$GNULIB_REVISION"; } \ - || exit $? - fi - else - if ! $use_git; then - die "Error: --no-git is specified," \ - "but neither --gnulib-srcdir nor \$GNULIB_SRCDIR is specified" - fi - if git submodule -h | grep -- --reference > /dev/null; then - : - else - die "git version is too old, git >= 1.6.4 is required" - fi - gnulib_path=$(git_modules_config submodule.gnulib.path) - if test -n "$gnulib_path"; then - # A submodule 'gnulib' is configured. - # Get gnulib files. Populate $gnulib_path, updating the submodule. - if test -n "$GNULIB_REFDIR" && test -d "$GNULIB_REFDIR"/.git; then - # Use GNULIB_REFDIR as a reference. - echo "$0: getting gnulib files..." - git submodule update --init --reference "$GNULIB_REFDIR" "$gnulib_path"\ - || exit $? - else - # GNULIB_REFDIR is not set or not usable. Ignore it. - if git_modules_config submodule.gnulib.url >/dev/null; then - echo "$0: getting gnulib files..." - git submodule init -- "$gnulib_path" || exit $? - git submodule update -- "$gnulib_path" || exit $? - else - die "Error: submodule 'gnulib' has no configured url" - fi - fi - else - gnulib_path='gnulib' - if test ! -d "$gnulib_path"; then - # The subdirectory 'gnulib' does not yet exist. Clone into it. - echo "$0: getting gnulib files..." - trap cleanup_gnulib HUP INT PIPE TERM - gnulib_url=${GNULIB_URL:-$default_gnulib_url} - if test -n "$GNULIB_REFDIR" && test -d "$GNULIB_REFDIR"/.git; then - # Use GNULIB_REFDIR as a reference. - git clone "$GNULIB_REFDIR" "$gnulib_path" \ - && git -C "$gnulib_path" remote set-url origin "$gnulib_url" \ - && if test -z "$GNULIB_REVISION"; then - git -C "$gnulib_path" pull origin \ - && { - # We want the default branch of "$gnulib_url" (since that's - # the behaviour if GNULIB_REFDIR is not specified), not the - # current branch of "$GNULIB_REFDIR". - default_branch=`LC_ALL=C git -C "$gnulib_path" \ - remote show origin \ - | sed -n -e 's/^ *HEAD branch: //p'` - test -n "$default_branch" || default_branch='master' - git -C "$gnulib_path" checkout "$default_branch" - } - else - # The 'git checkout "$GNULIB_REVISION"' command succeeds if the - # GNULIB_REVISION is a commit hash that exists locally, or if it - # is a branch name that can be fetched from origin. It fails, - # however, if the GNULIB_REVISION is a commit hash that only - # exists in origin. In this case, we need a 'git fetch' and then - # retry 'git checkout "$GNULIB_REVISION"'. - git -C "$gnulib_path" checkout "$GNULIB_REVISION" 2>/dev/null \ - || { git -C "$gnulib_path" fetch origin \ - && git -C "$gnulib_path" checkout "$GNULIB_REVISION"; } - fi \ - || cleanup_gnulib - else - # GNULIB_REFDIR is not set or not usable. Ignore it. - shallow='--depth 2' - if test -z "$GNULIB_REVISION"; then - git clone $shallow "$gnulib_url" "$gnulib_path" \ - || cleanup_gnulib - else - # Only want a shallow checkout of $GNULIB_REVISION, but git does not - # support cloning by commit hash. So attempt a shallow fetch by - # commit hash to minimize the amount of data downloaded and changes - # needed to be processed, which can drastically reduce download and - # processing time for checkout. If the fetch by commit fails, a - # shallow fetch cannot be performed because we do not know what the - # depth of the commit is without fetching all commits. So fall back - # to fetching all commits. - # $GNULIB_REVISION can be a commit id, a tag name, or a branch name. - mkdir -p "$gnulib_path" - # Use a -c option to silence an annoying message - # "hint: Using 'master' as the name for the initial branch." - # (cf. ). - git -C "$gnulib_path" -c init.defaultBranch=master init - git -C "$gnulib_path" remote add origin "$gnulib_url" - if git -C "$gnulib_path" fetch $shallow origin "$GNULIB_REVISION" - then - # "git fetch" of the specific commit succeeded. - git -C "$gnulib_path" reset --hard FETCH_HEAD \ - || cleanup_gnulib - # "git fetch" does not fetch tags (at least in git version 2.43). - # If $GNULIB_REVISION is a tag (not a commit id or branch name), - # add the tag explicitly. - revision=`git -C "$gnulib_path" log -1 --pretty=format:%H` - branch=`LC_ALL=C git -C "$gnulib_path" remote show origin \ - | sed -n -e 's/^ \([^ ]*\) * tracked$/\1/p'` - test "$revision" = "$GNULIB_REVISION" \ - || test "$branch" = "$GNULIB_REVISION" \ - || git -C "$gnulib_path" tag "$GNULIB_REVISION" - else - # Fetch the entire repository. - git -C "$gnulib_path" fetch origin \ - || cleanup_gnulib - git -C "$gnulib_path" checkout "$GNULIB_REVISION" \ - || cleanup_gnulib - fi - fi - fi - trap - HUP INT PIPE TERM - else - # The subdirectory 'gnulib' already exists. - if test -n "$GNULIB_REVISION"; then - if test -d "$gnulib_path/.git"; then - # The 'git checkout "$GNULIB_REVISION"' command succeeds if the - # GNULIB_REVISION is a commit hash that exists locally, or if it - # is a branch name that can be fetched from origin. It fails, - # however, if the GNULIB_REVISION is a commit hash that only - # exists in origin. In this case, we need a 'git fetch' and then - # retry 'git checkout "$GNULIB_REVISION"'. - git -C "$gnulib_path" checkout "$GNULIB_REVISION" 2>/dev/null \ - || { git -C "$gnulib_path" fetch origin \ - && git -C "$gnulib_path" checkout "$GNULIB_REVISION"; } \ - || exit $? - else - die "Error: GNULIB_REVISION is specified in bootstrap.conf," \ - "but '$gnulib_path' contains no git history" - fi - fi - fi - fi - # Verify that $gnulib_path contains a gnulib checkout. - test -f "$gnulib_path/gnulib-tool" \ - || die "Error: '$gnulib_path' is supposed to contain a gnulib checkout," \ - "but does not contain gnulib-tool" - GNULIB_SRCDIR=$gnulib_path - fi - # $GNULIB_SRCDIR now points to the version of gnulib to use, and - # we no longer need to use git or $gnulib_path below here. -} - -# -------- Upgrading bootstrap to the version found in GNULIB_SRCDIR. -------- - -upgrade_bootstrap () -{ - if test -f "$medir"/bootstrap-funclib.sh; then - update_lib=true - { cmp -s "$medir"/bootstrap "$GNULIB_SRCDIR/top/bootstrap" \ - && cmp -s "$medir"/bootstrap-funclib.sh \ - "$GNULIB_SRCDIR/top/bootstrap-funclib.sh" \ - && cmp -s "$medir"/autopull.sh "$GNULIB_SRCDIR/top/autopull.sh" \ - && cmp -s "$medir"/autogen.sh "$GNULIB_SRCDIR/top/autogen.sh"; \ - } - else - update_lib=false - cmp -s "$medir"/bootstrap "$GNULIB_SRCDIR/build-aux/bootstrap" - fi || { - if $update_lib; then - echo "$0: updating bootstrap & companions and restarting..." - else - echo "$0: updating bootstrap and restarting..." - fi - case $(sh -c 'echo "$1"' -- a) in - a) ignored=--;; - *) ignored=ignored;; - esac - u=$update_lib - exec sh -c \ - '{ if '$u' && test -f "$1"; then cp "$1" "$3"; else cp "$2" "$3"; fi; } && - { if '$u' && test -f "$4"; then cp "$4" "$5"; else rm -f "$5"; fi; } && - { if '$u' && test -f "$6"; then cp "$6" "$7"; else rm -f "$7"; fi; } && - { if '$u' && test -f "$8"; then cp "$8" "$9"; else rm -f "$9"; fi; } && - shift && shift && shift && shift && shift && - shift && shift && shift && shift && - exec "${CONFIG_SHELL-/bin/sh}" "$@"' \ - $ignored \ - "$GNULIB_SRCDIR/top/bootstrap" "$GNULIB_SRCDIR/build-aux/bootstrap" \ - "$medir/bootstrap" \ - "$GNULIB_SRCDIR/top/bootstrap-funclib.sh" "$medir/bootstrap-funclib.sh" \ - "$GNULIB_SRCDIR/top/autopull.sh" "$medir/autopull.sh" \ - "$GNULIB_SRCDIR/top/autogen.sh" "$medir/autogen.sh" \ - "$0" "$@" --no-bootstrap-sync - } -} - -# ---------------------------------------------------------------------------- - -if test x"$gnulib_modules$gnulib_files$gnulib_extra_files" = x; then - use_gnulib=false -else - use_gnulib=true -fi - -# -------- Fetch auxiliary files from the network. -------------------------- - -autopull_usage() { - cat </dev/null 2>&1 && unset CDPATH - - # Parse options. - - # Use git to update gnulib sources - use_git=true - - for option - do - case $option in - --help) - autopull_usage - return;; - --version) - set -e - echo "autopull.sh $scriptlibversion" - echo "$copyright" - return 0 - ;; - --skip-po) - SKIP_PO=t;; - --force) - checkout_only_file=;; - --bootstrap-sync) - bootstrap_sync=true;; - --no-bootstrap-sync) - bootstrap_sync=false;; - --no-git) - use_git=false;; - *) - bootstrap_option_hook $option || die "$option: unknown option";; - esac - done - - $use_git || test -n "$GNULIB_SRCDIR" \ - || die "Error: --no-git requires \$GNULIB_SRCDIR environment variable" \ - "or --gnulib-srcdir option" - test -z "$GNULIB_SRCDIR" || test -d "$GNULIB_SRCDIR" \ - || die "Error: \$GNULIB_SRCDIR environment variable" \ - "or --gnulib-srcdir option is specified," \ - "but does not denote a directory" - - if test -n "$checkout_only_file" && test ! -r "$checkout_only_file"; then - die "Running this script from a non-checked-out distribution is risky." - fi - - check_build_prerequisites $use_git - - if $use_gnulib || $bootstrap_sync; then - prepare_GNULIB_SRCDIR - if $bootstrap_sync; then - upgrade_bootstrap "$@" - fi - fi - - # Find sha1sum, named gsha1sum on MacPorts, shasum on Mac OS X 10.6. - # Also find the compatible sha1 utility on the BSDs - if test x"$SKIP_PO" = x; then - find_tool SHA1SUM sha1sum gsha1sum shasum sha1 - fi - - # See if we can use gnulib's git-merge-changelog merge driver. - if $use_git && test -d .git && check_exists git; then - if git config merge.merge-changelog.driver >/dev/null ; then - : - elif check_exists git-merge-changelog; then - echo "$0: initializing git-merge-changelog driver" - git config merge.merge-changelog.name 'GNU-style ChangeLog merge driver' - git config merge.merge-changelog.driver 'git-merge-changelog %O %A %B' - else - echo "$0: consider installing git-merge-changelog from gnulib" - fi - fi - - case $SKIP_PO in - '') - if test -d po; then - update_po_files po $package || return - fi - - if test -d runtime-po; then - update_po_files runtime-po $package-runtime || return - fi;; - esac - - # --------------------------------------------------------------------------- - - bootstrap_post_pull_hook \ - || die "bootstrap_post_pull_hook failed" - - # Don't proceed if there are uninitialized submodules. In particular, - # autogen.sh will remove dangling links, which might be links into - # uninitialized submodules. - # But it's OK if the 'gnulib' submodule is uninitialized, as long as - # GNULIB_SRCDIR is set. - if $use_git; then - # Uninitialized submodules are listed with an initial dash. - uninitialized=`git submodule | grep '^-' | awk '{ print $2 }'` - if test -n "$GNULIB_SRCDIR"; then - uninitialized=`echo "$uninitialized" | grep -v '^gnulib$'` - fi - if test -n "$uninitialized"; then - uninit_comma=`echo "$uninitialized" | tr '\n' ',' | sed -e 's|,$|.|'` - die "Some git submodules are not initialized: "$uninit_comma \ - "Either use option '--no-git'," \ - "or run 'git submodule update --init' and bootstrap again." - fi - fi - - if test -f "$medir"/autogen.sh; then - echo "$0: done. Now you can run '$medir/autogen.sh'." - fi -} - -# ----------------------------- Get translations. ----------------------------- - -download_po_files() { - subdir=$1 - domain=$2 - echo "$me: getting translations into $subdir for $domain..." - cmd=$(printf "$po_download_command_format" "$subdir" "$domain") - eval "$cmd" -} - -# Mirror .po files to $po_dir/.reference and copy only the new -# or modified ones into $po_dir. Also update $po_dir/LINGUAS. -# Note po files that exist locally only are left in $po_dir but will -# not be included in LINGUAS and hence will not be distributed. -update_po_files() { - # Directory containing primary .po files. - # Overwrite them only when we're sure a .po file is new. - po_dir=$1 - domain=$2 - - # Mirror *.po files into this dir. - # Usually contains *.s1 checksum files. - ref_po_dir="$po_dir/.reference" - - test -d $ref_po_dir || mkdir $ref_po_dir || return - download_po_files $ref_po_dir $domain \ - && ls "$ref_po_dir"/*.po 2>/dev/null | - sed 's|.*/||; s|\.po$||' > "$po_dir/LINGUAS" || return - - for po in x $(ls $ref_po_dir | sed -n 's/\.po$//p'); do - case $po in x) continue;; esac - new_po="$ref_po_dir/$po.po" - cksum_file="$ref_po_dir/$po.s1" - if ! test -f "$cksum_file" || - ! test -f "$po_dir/$po.po" || - ! $SHA1SUM -c "$cksum_file" < "$new_po" > /dev/null 2>&1; then - echo "$me: updated $po_dir/$po.po..." - cp "$new_po" "$po_dir/$po.po" \ - && $SHA1SUM < "$new_po" > "$cksum_file" || return - fi - done -} - -# -------- Generate files automatically from existing sources. -------------- - -autogen_usage() { - cat < /dev/null 2>&1 - elif test -d .svn; then - svn log -r HEAD "$file" > /dev/null 2>&1 - elif test -d CVS; then - grep -F "/${file##*/}/" "$parent/CVS/Entries" 2>/dev/null | - grep '^/[^/]*/[0-9]' > /dev/null - else - warn_ "no version control for $file?" - false - fi -} - -# Strip blank and comment lines to leave significant entries. -gitignore_entries() { - sed '/^#/d; /^$/d' "$@" -} - -# If $STR is not already on a line by itself in $FILE, insert it at the start. -# Entries are inserted at the start of the ignore list to ensure existing -# entries starting with ! are not overridden. Such entries support -# whitelisting exceptions after a more generic blacklist pattern. -insert_if_absent() { - file=$1 - str=$2 - test -f $file || touch $file - test -r $file || die "Error: failed to read ignore file: $file" - duplicate_entries=$(gitignore_entries $file | sort | uniq -d) - if [ "$duplicate_entries" ] ; then - die "Error: Duplicate entries in $file: " $duplicate_entries - fi - linesold=$(gitignore_entries $file | wc -l) - linesnew=$( { echo "$str"; cat $file; } | gitignore_entries | sort -u | wc -l) - if [ $linesold != $linesnew ] ; then - { echo "$str" | cat - $file > $file.bak && mv $file.bak $file; } \ - || die "insert_if_absent $file $str: failed" - fi -} - -# Adjust $PATTERN for $VC_IGNORE_FILE and insert it with -# insert_if_absent. -insert_vc_ignore() { - vc_ignore_file="$1" - pattern="$2" - case $vc_ignore_file in - *.gitignore) - # A .gitignore entry that does not start with '/' applies - # recursively to subdirectories, so prepend '/' to every - # .gitignore entry. - pattern=$(echo "$pattern" | sed s,^,/,);; - esac - insert_if_absent "$vc_ignore_file" "$pattern" -} - -symlink_to_dir() -{ - src=$1/$2 - dst=${3-$2} - - test -f "$src" && { - - # If the destination directory doesn't exist, create it. - # This is required at least for "lib/uniwidth/cjk.h". - dst_dir=$(dirname "$dst") - if ! test -d "$dst_dir"; then - mkdir -p "$dst_dir" - - # If we've just created a directory like lib/uniwidth, - # tell version control system(s) it's ignorable. - # FIXME: for now, this does only one level - parent=$(dirname "$dst_dir") - for dot_ig in x $vc_ignore; do - test $dot_ig = x && continue - ig=$parent/$dot_ig - insert_vc_ignore $ig "${dst_dir##*/}/" - done - fi - - if $copy; then - { - test ! -h "$dst" || { - echo "$me: rm -f $dst" && - rm -f "$dst" - } - } && - test -f "$dst" && - cmp -s "$src" "$dst" || { - echo "$me: cp -fp $src $dst" && - cp -fp "$src" "$dst" - } - else - # Leave any existing symlink alone, if it already points to the source, - # so that broken build tools that care about symlink times - # aren't confused into doing unnecessary builds. Conversely, if the - # existing symlink's timestamp is older than the source, make it afresh, - # so that broken tools aren't confused into skipping needed builds. See - # . - test -h "$dst" && - src_ls=$(ls -diL "$src" 2>/dev/null) && set $src_ls && src_i=$1 && - dst_ls=$(ls -diL "$dst" 2>/dev/null) && set $dst_ls && dst_i=$1 && - test "$src_i" = "$dst_i" && - both_ls=$(ls -dt "$src" "$dst") && - test "X$both_ls" = "X$dst$nl$src" || { - dot_dots= - case $src in - /*) ;; - *) - case /$dst/ in - *//* | */../* | */./* | /*/*/*/*/*/) - die "invalid symlink calculation: $src -> $dst";; - /*/*/*/*/) dot_dots=../../../;; - /*/*/*/) dot_dots=../../;; - /*/*/) dot_dots=../;; - esac;; - esac - - echo "$me: ln -fs $dot_dots$src $dst" && - ln -fs "$dot_dots$src" "$dst" - } - fi - } -} - -# Regenerate all autogeneratable files that are omitted from the -# version control repository. In particular, regenerate all -# aclocal.m4, config.h.in, Makefile.in, configure files with new -# versions of autoconf or automake. -autogen() -{ - # Ensure that CDPATH is not set. Otherwise, the output from cd - # would cause trouble in at least one use below. - (unset CDPATH) >/dev/null 2>&1 && unset CDPATH - - # Environment variables that may be set by the user. - : "${AUTOPOINT=autopoint}" - : "${AUTORECONF=autoreconf}" - - if test "$vc_ignore" = auto; then - vc_ignore= - test -d .git && vc_ignore=.gitignore - test -d CVS && vc_ignore="$vc_ignore .cvsignore" - fi - - - # Parse options. - - # Whether to use copies instead of symlinks. - copy=false - - for option - do - case $option in - --help) - autogen_usage - return;; - --version) - set -e - echo "autogen.sh $scriptlibversion" - echo "$copyright" - return 0 - ;; - --force) - checkout_only_file=;; - --copy) - copy=true;; - *) - bootstrap_option_hook $option || die "$option: unknown option";; - esac - done - - test -z "$GNULIB_SRCDIR" || test -d "$GNULIB_SRCDIR" \ - || die "Error: \$GNULIB_SRCDIR environment variable or --gnulib-srcdir" \ - "option is specified, but does not denote a directory" - - if test -n "$checkout_only_file" && test ! -r "$checkout_only_file"; then - die "Running this script from a non-checked-out distribution is risky." - fi - - if $use_gnulib; then - if test -z "$GNULIB_SRCDIR"; then - gnulib_path=$(test -f .gitmodules && - git config --file .gitmodules submodule.gnulib.path) - test -z "$gnulib_path" && gnulib_path=gnulib - GNULIB_SRCDIR=$gnulib_path - fi - fi - - # Die if there is no AC_CONFIG_AUX_DIR($build_aux) line in configure.ac. - found_aux_dir=no - grep '^[ ]*AC_CONFIG_AUX_DIR(\['"$build_aux"'])' configure.ac \ - >/dev/null && found_aux_dir=yes - grep '^[ ]*AC_CONFIG_AUX_DIR('"$build_aux"')' configure.ac \ - >/dev/null && found_aux_dir=yes - test $found_aux_dir = yes \ - || die "configure.ac lacks 'AC_CONFIG_AUX_DIR([$build_aux])'; add it" - - # If $build_aux doesn't exist, create it now, otherwise some bits - # below will malfunction. If creating it, also mark it as ignored. - if test ! -d $build_aux; then - mkdir $build_aux - for dot_ig in x $vc_ignore; do - test $dot_ig = x && continue - insert_vc_ignore $dot_ig $build_aux/ - done - fi - - check_build_prerequisites false - - use_libtool=0 - # We'd like to use grep -E, to see if any of LT_INIT, - # AC_PROG_LIBTOOL, AM_PROG_LIBTOOL is used in configure.ac, - # but that's not portable enough (e.g., for Solaris). - grep '^[ ]*A[CM]_PROG_LIBTOOL' configure.ac >/dev/null \ - && use_libtool=1 - grep '^[ ]*LT_INIT' configure.ac >/dev/null \ - && use_libtool=1 - if test $use_libtool = 1; then - find_tool LIBTOOLIZE glibtoolize libtoolize - fi - - if $use_gnulib; then - gnulib_tool=$GNULIB_SRCDIR/gnulib-tool - <$gnulib_tool || return - fi - - # NOTE: we have to be careful to run both autopoint and libtoolize - # before gnulib-tool, since gnulib-tool is likely to provide newer - # versions of files "installed" by these two programs. - # Then, *after* gnulib-tool (see below), we have to be careful to - # run autoreconf in such a way that it does not run either of these - # two just-pre-run programs. - - # Import from gettext. - with_gettext=yes - grep '^[ ]*AM_GNU_GETTEXT_VERSION(' configure.ac >/dev/null || \ - with_gettext=no - - if test $with_gettext = yes || test $use_libtool = 1; then - - tempbase=.bootstrap$$ - trap "rm -f $tempbase.0 $tempbase.1" HUP INT PIPE TERM - - > $tempbase.0 > $tempbase.1 && - find . ! -type d -print | sort > $tempbase.0 || return - - if test $with_gettext = yes; then - # Released autopoint has the tendency to install macros that have been - # obsoleted in current gnulib, so run this before gnulib-tool. - echo "$0: $AUTOPOINT --force" - $AUTOPOINT --force || return - fi - - # Autoreconf runs aclocal before libtoolize, which causes spurious - # warnings if the initial aclocal is confused by the libtoolized - # (or worse out-of-date) macro directory. - # libtoolize 1.9b added the --install option; but we support back - # to libtoolize 1.5.22, where the install action was default. - if test $use_libtool = 1; then - install= - case $($LIBTOOLIZE --help) in - *--install*) install=--install ;; - esac - echo "running: $LIBTOOLIZE $install --copy" - $LIBTOOLIZE $install --copy - fi - - find . ! -type d -print | sort >$tempbase.1 - old_IFS=$IFS - IFS=$nl - for file in $(comm -13 $tempbase.0 $tempbase.1); do - IFS=$old_IFS - parent=${file%/*} - version_controlled_file "$parent" "$file" || { - for dot_ig in x $vc_ignore; do - test $dot_ig = x && continue - ig=$parent/$dot_ig - insert_vc_ignore "$ig" "${file##*/}" - done - } - done - IFS=$old_IFS - - rm -f $tempbase.0 $tempbase.1 - trap - HUP INT PIPE TERM - fi - - # Import from gnulib. - - if $use_gnulib; then - gnulib_tool_options="\ - --no-changelog\ - --aux-dir=$build_aux\ - --doc-base=$doc_base\ - --lib=$gnulib_name\ - --m4-base=$m4_base/\ - --source-base=$source_base/\ - --tests-base=$tests_base\ - --local-dir=$local_gl_dir\ - $gnulib_tool_option_extras\ - " - if test $use_libtool = 1; then - case "$gnulib_tool_options " in - *' --libtool '*) ;; - *) gnulib_tool_options="$gnulib_tool_options --libtool" ;; - esac - fi - echo "$0: $gnulib_tool $gnulib_tool_options --import ..." - $gnulib_tool $gnulib_tool_options --import $gnulib_modules \ - || die "gnulib-tool failed" - - if test $with_gettext = yes && test ! -f $m4_base/gettext.m4; then - # The gnulib-tool invocation has removed $m4_base/gettext.m4, that the - # AUTOPOINT invocation had installed. This can occur when the gnulib - # module 'gettext' was previously present but is now not present any more. - # Repeat the AUTOPOINT invocation and the gnulib-tool invocation. - - echo "$0: $AUTOPOINT --force" - $AUTOPOINT --force || return - - echo "$0: $gnulib_tool $gnulib_tool_options --import ..." - $gnulib_tool $gnulib_tool_options --import $gnulib_modules \ - || die "gnulib-tool failed" - fi - - for file in $gnulib_files; do - symlink_to_dir "$GNULIB_SRCDIR" $file \ - || die "failed to symlink $file" - done - fi - - bootstrap_post_import_hook \ - || die "bootstrap_post_import_hook failed" - - # Remove any dangling symlink matching "*.m4" or "*.[ch]" in some - # gnulib-populated directories. Such .m4 files would cause aclocal to fail. - # The following requires GNU find 4.2.3 or newer. Considering the usual - # portability constraints of this script, that may seem a very demanding - # requirement, but it should be ok. Ignore any failure, which is fine, - # since this is only a convenience to help developers avoid the relatively - # unusual case in which a symlinked-to .m4 file is git-removed from gnulib - # between successive runs of this script. - find "$m4_base" "$source_base" \ - -depth \( -name '*.m4' -o -name '*.[ch]' \) \ - -type l -xtype l -delete > /dev/null 2>&1 - - # Invoke autoreconf with --force --install to ensure upgrades of tools - # such as ylwrap. - AUTORECONFFLAGS="--verbose --install --force -I $m4_base $ACLOCAL_FLAGS" - AUTORECONFFLAGS="$AUTORECONFFLAGS --no-recursive" - - # Tell autoreconf not to invoke autopoint or libtoolize; they were run above. - echo "running: AUTOPOINT=true LIBTOOLIZE=true $AUTORECONF $AUTORECONFFLAGS" - AUTOPOINT=true LIBTOOLIZE=true $AUTORECONF $AUTORECONFFLAGS \ - || die "autoreconf failed" - - # Get some extra files from gnulib, overriding existing files. - for file in $gnulib_extra_files; do - case $file in - */INSTALL) dst=INSTALL;; - build-aux/*) dst=$build_aux/${file#build-aux/};; - *) dst=$file;; - esac - symlink_to_dir "$GNULIB_SRCDIR" $file $dst \ - || die "failed to symlink $file" - done - - if test $with_gettext = yes; then - # Create gettext configuration. - echo "$0: Creating po/Makevars from po/Makevars.template ..." - rm -f po/Makevars - sed ' - /^EXTRA_LOCALE_CATEGORIES *=/s/=.*/= '"$EXTRA_LOCALE_CATEGORIES"'/ - /^COPYRIGHT_HOLDER *=/s/=.*/= '"$COPYRIGHT_HOLDER"'/ - /^MSGID_BUGS_ADDRESS *=/s|=.*|= '"$MSGID_BUGS_ADDRESS"'| - /^XGETTEXT_OPTIONS *=/{ - s/$/ \\/ - a\ - '"$XGETTEXT_OPTIONS"' $${end_of_xgettext_options+} - } - ' po/Makevars.template >po/Makevars \ - || die 'cannot generate po/Makevars' - - # If the 'gettext' module is in use, grab the latest Makefile.in.in. - # If only the 'gettext-h' module is in use, assume autopoint already - # put the correct version of this file into place. - case $gnulib_modules in - *gettext-h*) ;; - *gettext*) - cp $GNULIB_SRCDIR/build-aux/po/Makefile.in.in po/Makefile.in.in \ - || die "cannot create po/Makefile.in.in" - ;; - esac - - if test -d runtime-po; then - # Similarly for runtime-po/Makevars, but not quite the same. - rm -f runtime-po/Makevars - sed ' - /^DOMAIN *=.*/s/=.*/= '"$package"'-runtime/ - /^subdir *=.*/s/=.*/= runtime-po/ - /^MSGID_BUGS_ADDRESS *=/s/=.*/= bug-'"$package"'@gnu.org/ - /^XGETTEXT_OPTIONS *=/{ - s/$/ \\/ - a\ - '"$XGETTEXT_OPTIONS_RUNTIME"' $${end_of_xgettext_options+} - } - ' po/Makevars.template >runtime-po/Makevars \ - || die 'cannot generate runtime-po/Makevars' - - # Copy identical files from po to runtime-po. - cp -p po/Makefile.in.in po/*-quot po/*.header po/*.sed po/*.sin runtime-po - fi - fi - - bootstrap_epilogue - - echo "$0: done. Now you can run './configure'." -} - -# ---------------------------------------------------------------------------- - -# Local Variables: -# eval: (add-hook 'before-save-hook 'time-stamp nil t) -# time-stamp-start: "scriptlibversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC0" -# time-stamp-end: "; # UTC" -# End: - -usage() { - cat <. - - -# gnulib modules used by this package. -gnulib_modules=" - close-stream - closeout - error - fclose - fcntl-h - fdopen - fflush - fopen - getopt-gnu - inet_pton - isnan - netinet_in - nstrftime - progname - quote - realloc-gnu - stat - stddef - stdio - stdlib - stpncpy - strdup-posix - strstr - strtod - time_r - xalloc -" - -# Additional xgettext options to use. Use "\\\newline" to break lines. -XGETTEXT_OPTIONS=$XGETTEXT_OPTIONS'\\\ - --from-code=UTF-8\\\ - --flag=asprintf:2:c-format --flag=vasprintf:2:c-format\\\ - --flag=asnprintf:3:c-format --flag=vasnprintf:3:c-format\\\ - --flag=wrapf:1:c-format\\\ -' - -# If "AM_GNU_GETTEXT(external" or "AM_GNU_GETTEXT([external]" -# appears in configure.ac, exclude some unnecessary files. -# Without grep's -E option (not portable enough, pre-configure), -# the following test is ugly. Also, this depends on the existence -# of configure.ac, not the obsolescent-named configure.in. But if -# you're using this infrastructure, you should care about such things. - -gettext_external=0 -grep '^[ ]*AM_GNU_GETTEXT(external\>' configure.ac > /dev/null && - gettext_external=1 -grep '^[ ]*AM_GNU_GETTEXT(\[external]' configure.ac > /dev/null && - gettext_external=1 - -if test $gettext_external = 1; then - # Gettext supplies these files, but we don't need them since - # we don't have an intl subdirectory. - excluded_files=' - m4/glibc2.m4 - m4/intdiv0.m4 - m4/lcmessage.m4 - m4/lock.m4 - m4/printf-posix.m4 - m4/size_max.m4 - m4/uintmax_t.m4 - m4/ulonglong.m4 - m4/visibility.m4 - m4/xsize.m4 - ' -fi - -# Build prerequisites -buildreq="\ -autoconf 2.59 -automake 1.9.6 -git 1.5.5 -tar - -" diff --git a/build-aux/.gitignore b/build-aux/.gitignore deleted file mode 100644 index 1d51c02..0000000 --- a/build-aux/.gitignore +++ /dev/null @@ -1,12 +0,0 @@ -/ar-lib -/compile -/config.guess -/config.rpath -/config.sub -/depcomp -/install-sh -/ltmain.sh -/mdate-sh -/missing -/test-driver -/texinfo.tex diff --git a/build-aux/git-version-gen b/build-aux/git-version-gen index a44f5d5..0b7655e 100755 --- a/build-aux/git-version-gen +++ b/build-aux/git-version-gen @@ -1,12 +1,12 @@ #!/bin/sh # Print a version string. -scriptversion=2022-01-27.18; # UTC +scriptversion=2011-02-19.19; # UTC -# Copyright (C) 2007-2022 Free Software Foundation, Inc. +# Copyright (C) 2007-2011 Free Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or +# the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, @@ -15,9 +15,9 @@ scriptversion=2022-01-27.18; # UTC # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . -# This script is derived from GIT-VERSION-GEN from GIT: https://git-scm.com/. +# This script is derived from GIT-VERSION-GEN from GIT: http://git.or.cz/. # It may be run two ways: # - from a git repository in which the "git describe" command below # produces useful output (thus requiring at least one signed tag) @@ -44,10 +44,8 @@ scriptversion=2022-01-27.18; # UTC # files to pick up a version string change; and leave it stale to # minimize rebuild time after unrelated changes to configure sources. # -# As with any generated file in a VC'd directory, you should add -# /.version to .gitignore, so that you don't accidentally commit it. -# .tarball-version is never generated in a VC'd directory, so needn't -# be listed there. +# It is probably wise to add these two files to .gitignore, so that you +# don't accidentally commit either generated file. # # Use the following line in your configure.ac, so that $(VERSION) will # automatically be up-to-date each time configure is run (and note that @@ -59,76 +57,24 @@ scriptversion=2022-01-27.18; # UTC # [bug-project@example]) # # Then use the following lines in your Makefile.am, so that .version -# will be present for dependencies, and so that .version and -# .tarball-version will exist in distribution tarballs. +# will be present for dependencies, and so that .tarball-version will +# exist in distribution tarballs. # -# EXTRA_DIST = $(top_srcdir)/.version # BUILT_SOURCES = $(top_srcdir)/.version # $(top_srcdir)/.version: -# echo '$(VERSION)' > $@-t -# mv $@-t $@ +# echo $(VERSION) > $@-t && mv $@-t $@ # dist-hook: -# echo '$(VERSION)' > $(distdir)/.tarball-version +# echo $(VERSION) > $(distdir)/.tarball-version +case $# in + 1|2) ;; + *) echo 1>&2 "Usage: $0 \$srcdir/.tarball-version" \ + '[TAG-NORMALIZATION-SED-SCRIPT]' + exit 1;; +esac -me=$0 - -year=`expr "$scriptversion" : '\([^-]*\)'` -version="git-version-gen $scriptversion - -Copyright (C) ${year} Free Software Foundation, Inc. -License GPLv3+: GNU GPL version 3 or later . -This is free software: you are free to change and redistribute it. -There is NO WARRANTY, to the extent permitted by law." - -usage="\ -Usage: $me [OPTION]... \$srcdir/.tarball-version [TAG-NORMALIZATION-SED-SCRIPT] -Print a version string. - -Options: - - --prefix PREFIX prefix of git tags (default 'v') - --fallback VERSION - fallback version to use if \"git --version\" fails - - --help display this help and exit - --version output version information and exit - -Running without arguments will suffice in most cases." - -prefix=v -fallback= - -while test $# -gt 0; do - case $1 in - --help) echo "$usage"; exit 0;; - --version) echo "$version"; exit 0;; - --prefix) shift; prefix=${1?};; - --fallback) shift; fallback=${1?};; - -*) - echo "$0: Unknown option '$1'." >&2 - echo "$0: Try '--help' for more information." >&2 - exit 1;; - *) - if test "x$tarball_version_file" = x; then - tarball_version_file="$1" - elif test "x$tag_sed_script" = x; then - tag_sed_script="$1" - else - echo "$0: extra non-option argument '$1'." >&2 - exit 1 - fi;; - esac - shift -done - -if test "x$tarball_version_file" = x; then - echo "$usage" - exit 1 -fi - -tag_sed_script="${tag_sed_script:-s/x/x/}" - +tarball_version_file=$1 +tag_sed_script="${2:-s/x/x/}" nl=' ' @@ -143,23 +89,25 @@ then v=`cat $tarball_version_file` || v= case $v in *$nl*) v= ;; # reject multi-line output + [0-9]*) ;; + *) v= ;; esac - test "x$v" = x \ - && echo "$0: WARNING: $tarball_version_file is damaged" 1>&2 + test -z "$v" \ + && echo "$0: WARNING: $tarball_version_file is missing or damaged" 1>&2 fi -if test "x$v" != x +if test -n "$v" then : # use $v # Otherwise, if there is at least one git commit involving the working # directory, and "git describe" output looks sensible, use that to # derive a version string. elif test "`git log -1 --pretty=format:x . 2>&1`" = x \ - && v=`git describe --abbrev=4 --match="$prefix*" HEAD 2>/dev/null \ - || git describe --abbrev=4 HEAD 2>/dev/null` \ + && v=`git describe --tags --abbrev=4 --match='v*' HEAD 2>/dev/null \ + || git describe --tags --abbrev=4 HEAD 2>/dev/null` \ && v=`printf '%s\n' "$v" | sed "$tag_sed_script"` \ && case $v in - $prefix[0-9]*) ;; + v[0-9]*) ;; *) (exit 1) ;; esac then @@ -167,10 +115,9 @@ then # tag or the previous older version that did not? # Newer: v6.10-77-g0f8faeb # Older: v6.10-g0f8faeb - vprefix=`expr "X$v" : 'X\(.*\)-g[^-]*$'` || vprefix=$v - case $vprefix in - *-*) : git describe is probably okay three part flavor ;; - *) + case $v in + *-*-*) : git describe is okay three part flavor ;; + *-*) : git describe is older two part flavor # Recreate the number of commits and rewrite such that the # result is the same as if we were using the newer version @@ -185,23 +132,21 @@ then ;; esac - # Change the penultimate "-" to ".", for version-comparing tools. - # Remove the "g" to save a byte. - v=`echo "$v" | sed 's/-\([^-]*\)-g\([^-]*\)$/.\1-\2/'`; + # Change the first '-' to a '.', so version-comparing tools work properly. + # Remove the "g" in git describe's output string, to save a byte. + v=`echo "$v" | sed 's/-/./;s/\(.*\)-g/\1-/'`; v_from_git=1 -elif test "x$fallback" = x || git --version >/dev/null 2>&1; then - v=UNKNOWN else - v=$fallback + v=UNKNOWN fi -v=`echo "$v" |sed "s/^$prefix//"` +v=`echo "$v" |sed 's/^v//'` # Test whether to append the "-dirty" suffix only if the version # string we're using came from git. I.e., skip the test if it's "UNKNOWN" # or if it came from .tarball-version. -if test "x$v_from_git" != x; then - # Don't declare a version "dirty" merely because a timestamp has changed. +if test -n "$v_from_git"; then + # Don't declare a version "dirty" merely because a time stamp has changed. git update-index --refresh > /dev/null 2>&1 dirty=`exec 2>/dev/null;git diff-index --name-only HEAD` || dirty= @@ -216,12 +161,12 @@ if test "x$v_from_git" != x; then fi # Omit the trailing newline, so that m4_esyscmd can use the result directly. -printf %s "$v" +echo "$v" | tr -d "$nl" # Local variables: -# eval: (add-hook 'before-save-hook 'time-stamp) +# eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC0" +# time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: diff --git a/build-aux/snippet/.gitignore b/build-aux/snippet/.gitignore deleted file mode 100644 index 5ec3722..0000000 --- a/build-aux/snippet/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -/_Noreturn.h -/arg-nonnull.h -/c++defs.h -/unused-parameter.h -/warn-on-use.h diff --git a/configure.ac b/configure.ac index 818bee9..eab7a1b 100644 --- a/configure.ac +++ b/configure.ac @@ -1,172 +1,86 @@ -# -*- Autoconf -*- +# -*- Autoconf -*- # Process this file with autoconf to produce a configure script. -AC_PREREQ([2.69]) -AC_CONFIG_MACRO_DIRS([m4]) +AC_PREREQ(2.64) +AC_CONFIG_MACRO_DIR([m4]) AC_INIT([dhcpd-pools], - [m4_esyscmd([build-aux/git-version-gen .tarball-version])], - [kerolasa@iki.fi],[], - [https://dhcpd-pools.sourceforge.net/]) -PACKAGE_MAINTAINER="Sami Kerola" -AC_SUBST([PACKAGE_MAINTAINER]) -AC_CONFIG_AUX_DIR([build-aux]) -AM_INIT_AUTOMAKE([ - -Wall - -Wextra-portability - 1.12 - foreign - dist-xz - no-dist-gzip - parallel-tests - subdir-objects - tar-pax -]) + m4_esyscmd([build-aux/git-version-gen .tarball-version]), + [kerolasa@iki.fi],,[http://dhcpd-pools.sourceforge.net/]) +AM_INIT_AUTOMAKE AC_CONFIG_SRCDIR([src/dhcpd-pools.h]) AC_CONFIG_HEADERS([config.h]) -m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], - [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) +AC_GNU_SOURCE # Checks for programs -AC_USE_SYSTEM_EXTENSIONS -AC_C_RESTRICT +AC_PROG_AWK AC_PROG_CC -gl_EARLY -gl_INIT +AC_PROG_CXX AC_PROG_MAKE_SET -LT_INIT +AC_PROG_LIBTOOL # Checks for libraries. LT_INIT # Checks for header files. -AC_CHECK_HEADERS([\ - arpa/inet.h \ + +AC_CHECK_HEADERS([arpa/inet.h \ fcntl.h \ libintl.h \ - limits.h \ + netinet/in.h \ + stdlib.h \ + string.h \ + strings.h \ sys/socket.h \ -]) - -AC_ARG_WITH( - [uthash], - [AS_HELP_STRING([--with-uthash=DIR], [Use uthash from [DIR]/uthash.h)])], - [AS_CASE([$with_uthash], - [yes], [], - [no], [AC_MSG_ERROR([the uthash is required])], - [CPPFLAGS="$CPPFLAGS -I$with_uthash"] - )] -) -AC_CHECK_HEADER([uthash.h], [], [AC_MSG_ERROR([Unable to find uthash.h])]) + unistd.h]) # Checks for typedefs, structures, and compiler characteristics. -AC_C_INLINE AC_HEADER_STDBOOL AC_TYPE_SIZE_T -AC_TYPE_UINT32_T # Checks for library functions. -AC_FUNC_ERROR_AT_LINE -AC_CHECK_FUNCS([\ - __fpending \ - open_memstream \ - posix_fadvise \ -]) -AC_CHECK_DECL([strndupa]) +AC_FUNC_MALLOC +AC_CHECK_FUNCS([inet_ntoa memset strerror strstr strdup]) -AC_CHECK_FUNCS([fpclassify], [], - [AC_CHECK_LIB([m], [fpclassify], [MATH_LIBS="-lm"])] - [AC_CHECK_LIB([m], [__fpclassify], [MATH_LIBS="-lm"])] -) -AC_SUBST([MATH_LIBS]) +# GNU commandline parsing in getopt.h present? +AC_CHECK_HEADERS(getopt.h, AC_DEFINE(HAVE_GETOPT_H), + import_sources="getopt.c getopt1.c $import_sources") -AS_IF([test "x$ac_cv_func_open_memstream" = "xyes" && test "x$ac_cv_have_decl_strndupa" == "xyes"], [ - build_mustach=yes - AC_DEFINE([BUILD_MUSTACH], [1], [build mustach support]) -], [ - build_mustach=no -]) -AM_CONDITIONAL([ENABLE_MUSTACH], [test "x$build_mustach" = xyes]) +AC_CONFIG_FILES([Makefile + man/Makefile + src/Makefile + contrib/Makefile]) -AC_MSG_CHECKING([if the compiler supports __builtin_expect]) -AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ - return __builtin_expect(1, 1) ? 1 : 0 -]])],[ - have_builtin_expect=yes - AC_MSG_RESULT([yes]) -],[ - have_builtin_expect=no - AC_MSG_RESULT([no]) -]) -AS_IF([test x$have_builtin_expect = xyes], [ - AC_DEFINE([HAVE_BUILTIN_EXPECT], [1], - [The compiler supports __builtin_expect]) -]) +AC_MSG_CHECKING(whether program_invocation_short_name is defined) +AC_TRY_COMPILE([#include ], + [program_invocation_short_name = "test";], + AC_DEFINE(HAVE_PROGRAM_INVOCATION_SHORT_NAME, 1, + [Define if program_invocation_short_name is defined]) + AC_MSG_RESULT(yes), + AC_MSG_RESULT(no)) -AC_ARG_WITH([dhcpd-conf], - [AS_HELP_STRING([--with-dhcpd-conf=FILE],[default path of dhcpd.conf])], - [dhcpd_conf_path="$withval"], - [dhcpd_conf_path="/etc/dhcpd.conf"]) -AC_DEFINE_UNQUOTED([DHCPDCONF_FILE], ["$dhcpd_conf_path"], [default path of dhcpd.conf]) -AC_SUBST([DHCPDCONF_FILE], [$dhcpd_conf_path]) +AC_MSG_CHECKING([whether __progname is defined]) +AC_LINK_IFELSE([AC_LANG_PROGRAM([extern char *__progname;], + [if (*__progname == 0) return;])], + AC_DEFINE(HAVE___PROGNAME, 1, [Define if __progname is defined]) + AC_MSG_RESULT(yes), + AC_MSG_RESULT(no)) -AC_ARG_WITH([dhcpd-leases], - [AS_HELP_STRING([--with-dhcpd-leases=FILE],[default path of dhcpd.leases])], - [dhcpd_leases_path="$withval"], - [dhcpd_leases_path="/var/lib/dhcp/dhcpd.leases"]) -AC_DEFINE_UNQUOTED([DHCPDLEASE_FILE], ["$dhcpd_leases_path"], [default path of dhcpd.leases]) -AC_SUBST([DHCPDLEASE_FILE], [$dhcpd_leases_path]) - -AC_ARG_WITH([output-format], - [AS_HELP_STRING([--with-output-format=FORMAT],[default output format])], - [output_format="$withval"], - [output_format="text"]) -AC_DEFINE_UNQUOTED([OUTPUT_FORMAT], ["$output_format"], [default output format]) -AC_SUBST([OUTPUT_FORMAT], [$output_format]) - -AC_ARG_WITH([output-limit], - [AS_HELP_STRING([--with-output-limit=MASK],[default output limit])], - [output_limit="$withval"], - [output_limit="77"]) -AC_DEFINE_UNQUOTED([OUTPUT_LIMIT], ["$output_limit"], [default output limit]) -AC_SUBST([OUTPUT_LIMIT], [$output_limit]) - -AC_ARG_WITH([warning], - [AS_HELP_STRING([--with-warning=NUM],[monitoring warning default])], - [warning_percent="$withval"], - [warning_percent="80"]) -AC_DEFINE_UNQUOTED([ALARM_WARN], [$warning_percent], [monitoring warning default]) -AC_SUBST([ALARM_WARN], [$warning_percent]) - -AC_ARG_WITH([critical], - [AS_HELP_STRING([--with-critical=NUM],[monitoring critical default])], - [critical_percent="$withval"], - [critical_percent="90"]) -AC_DEFINE_UNQUOTED([ALARM_CRIT], [$critical_percent], [monitoring critical default]) -AC_SUBST([ALARM_CRIT], [$critical_percent]) - -AC_ARG_ENABLE([doxygen], - AS_HELP_STRING([--enable-doxygen],[build internal api documentation @<:@default=disabled@:>@]), - [], [enable_doxygen=no]) -AM_CONDITIONAL([ENABLE_DOXYGEN], [test "x$enable_doxygen" = "xyes"]) - -AS_IF([test x$enable_doxygen = xyes], [ - AC_CHECK_PROGS([DOXYGEN], [doxygen]) - AS_IF([test "x$DOXYGEN" = "x"], - AC_MSG_ERROR([doxygen not in path]) - ) - - AC_CHECK_PROGS([DOXYGEN_DOT], [dot]) - AS_IF([test "x$DOXYGEN" = "x"], - AC_MSG_WARN([dot not in path, internal documentation graphs are not generated]) - ) -]) -AM_CONDITIONAL([HAVE_DOXYGEN], [test "x$DOXYGEN" != "x"]) -AM_CONDITIONAL([HAVE_DOXYGEN_DOT], [test "x$DOXYGEN_DOT" != "x"]) - -AC_CONFIG_FILES([ - Makefile - lib/Makefile -]) +AC_ARG_WITH(dhcpd-conf, + [AC_HELP_STRING([--with-dhcpd-conf], [default path of dhcpd.conf])], + AC_DEFINE_UNQUOTED(DHCPDCONF_FILE,"$withval"), + AC_DEFINE(DHCPDCONF_FILE,["/etc/dhcpd.conf"],[default path of dhcpd.conf])) +AC_ARG_WITH(dhcpd-leases, + [AC_HELP_STRING([--with-dhcpd-leases], [default path of dhcpd.leases])], + AC_DEFINE_UNQUOTED(DHCPDLEASE_FILE,"$withval"), + AC_DEFINE(DHCPDLEASE_FILE,["/var/lib/dhcp/dhcpd.leases"],[default path of dhcpd.leases])) +AC_ARG_WITH(output-format, + [AC_HELP_STRING([--with-output-format], [default output format])], + AC_DEFINE_UNQUOTED(OUTPUT_FORMAT,"$withval"), + AC_DEFINE(OUTPUT_FORMAT,["text"],[default output format])) +AC_ARG_WITH(output-limit, + [AC_HELP_STRING([--with-output-limit], [default output limitations])], + AC_DEFINE_UNQUOTED(OUTPUT_LIMIT,"$withval"), + AC_DEFINE(OUTPUT_LIMIT,["77"],[default output limitations])) AC_OUTPUT diff --git a/contrib/.gitignore b/contrib/.gitignore deleted file mode 100644 index f28c483..0000000 --- a/contrib/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/nagios.conf diff --git a/contrib/Makefile.am b/contrib/Makefile.am new file mode 100644 index 0000000..1406e82 --- /dev/null +++ b/contrib/Makefile.am @@ -0,0 +1,2 @@ +contribdir = $(datadir)/dhcpd-pools/ +dist_contrib_SCRIPTS = dhcpd-pools.cgi snmptest.pl diff --git a/contrib/Makemodule.am b/contrib/Makemodule.am deleted file mode 100644 index 289c7f9..0000000 --- a/contrib/Makemodule.am +++ /dev/null @@ -1,5 +0,0 @@ -contribdir = $(datadir)/dhcpd-pools/ -PATHFILES += contrib/nagios.conf -dist_contrib_SCRIPTS = contrib/snmptest.pl -dist_contrib_DATA = contrib/nagios.conf -EXTRA_DIST += contrib/munin_plugins diff --git a/contrib/PKGBUILD b/contrib/PKGBUILD deleted file mode 100644 index 08770a4..0000000 --- a/contrib/PKGBUILD +++ /dev/null @@ -1,36 +0,0 @@ -# Archlinux package file. Just download this file, and -# makepkg PKGBUILD -# pacman -U ./dhcpd-pools*.pkg.tar.xz - -pkgname=dhcpd-pools -pkgver=0 -pkgrel=1 -pkgdesc="ISC dhcpd lease status utility" -arch=('i686' 'x86_64') -url=https://dhcpd-pools.sourceforge.net/ -license=('BSD') -depends=('pacman') -makedepends=('uthash' 'git') -source=("$pkgname"::'git://git.code.sf.net/p/dhcpd-pools/code') -md5sums=('SKIP') - -pkgver() { - cd "$srcdir/$pkgname" - # Use the tag of the last commit - git describe --long | sed -E 's/([^-]*-g)/r\1/;s/-/./g' -} - -build() { - cd "$srcdir/$pkgname" - ./bootstrap - ./configure \ - --prefix=/usr \ - --bindir=/usr/bin - make -} - -package() { - cd "$srcdir/$pkgname" - make PREFIX=/ DESTDIR="$pkgdir" install - install -D -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING" -} diff --git a/contrib/dhcpd-pools.cgi b/contrib/dhcpd-pools.cgi new file mode 100755 index 0000000..15a73fb --- /dev/null +++ b/contrib/dhcpd-pools.cgi @@ -0,0 +1,34 @@ +#!/bin/sh +# +# Simple CGI for dhcpd-pools. + +echo Content-type: text/html +echo + +# To make lease table more fancy use CSS definition something +# like this in your style.css file. +# +# TABLE.dhcpd-pools { +# border-style : groove; +# margin-left : 2px; +# foo : bar; +# } +# +# http://www.w3.org/TR/REC-CSS2/tables.html +# +# And uncomment this line. +# +#echo + +echo "" +echo "" +echo "

This was situation at " +date +echo "

" + +/usr/local/bin/dhcpd-pools --format html + +echo "" +echo "" + +# EOF diff --git a/contrib/kerolasa.gpg b/contrib/kerolasa.gpg deleted file mode 100644 index 97a480d..0000000 --- a/contrib/kerolasa.gpg +++ /dev/null @@ -1,111 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- - -mQINBFLH/jcBEADNgkgZAr7b/qvHzNkme8eSplDA8UHhcCFQmBnQ8HYFEYBi1Y5a -GhICcuisRSuZIPLtqRF8ntoOXsOHOUxnn5hVR62HxMLgOC1PQMw8TzREobbkAxMp -Vg66c6JXD2+jEGuAbhRk1XyWJHaCN2ewT06ToqGi7jhlw6nz1AHyohhyxeRlyMff -a4daTIRREnh2qouImSOE0E8ETAb0eOnFOsweHhmbpC/RDzuY7Ns8YcNH3FbWT1Kl -4W9vOstB1JcgSz38/tnzoMG2Mf2jI8LgR+6xiHTb7i6bgyWiBOxcJWouTVam6SC0 -Bc5cAe8EqHT6NMEjtNjDEzmb3ZFpFUnNKgKK5Wzghf17HAvYwpjYxNNoQl9jNIkf -XroquAyDDXW0IkNdGDARjJGW17r38oRH/R3q79DZNlqV/DPk4YLb0EAKzRAdBYGm -v8Bj+uLXc4JT9kTB5E8DT2ZR+61E4eT/zk4rpZ5j6tTktLNaSG58VYc+oQlPkPsB -ntraDsORpa5cK9uPUbHIHN1qd4gi35O4UDSqS023XnStQqsUD4vlzICedPDypn28 -h9q2nlNQHSDjIRnZFD+z9IHfVoBNTfm5/UH7NKBAvSS6rP5zsgi2fittt5AFdbmQ -VBOtpYp5vbcdSt8gNdJRy8FRaiQ/2n74xF1Zso/PGni1xRmseS+qBGI95QARAQAB -tB1TYW1pIEtlcm9sYSA8a2Vyb2xhc2FAaWtpLmZpPokCcwQTAQgAXQIbAwULCQgH -AgYVCAkKCwIEFgIDAQIeAQIXgAIZARsYaHR0cDovL2h0dHAta2V5cy5nbnVwZy5u -ZXQWIQSO05bjfjjUcaAFMNOpVTJF/em3OQUCWb42mgUJGcI7YwAKCRCpVTJF/em3 -OWNBD/4/N0OO6cA3bmEAum5qmHdcJVcUor9ClY3oY2QWdTyDCmSJLcTZUNsTrYYA -hY5vQsDxG6ZaKiITvhwp9y4PdJmnqqzRfnqnXusSVEsqG3vGHIVlpQj8Vgurr68d -1x2buHGRvRrjBMWR/Ro1TUeNOmM4HStcvjXRTWlHk9VXi9nk+uMQY9n1lXYNChda -0usj7q5QXXFXbOukKrvEZzt4I1tGbSEv7bBIghr5fMAJg8ZqAMDwfqsUKSM38HF4 -leCUgMZS7XuXuEb35ImjR1VYYCb+L2Q/PFqDOEGQpUwyLOzXcU9TaIDjMhNQY19y -DTUjW1YdQtf+3XmQFa4X1Od0jP1PiVJhw1LNCQLOENs+SRqT9s0W8+nP3qjso/LR -T3vR3FcGSw6KrESMFvmwY7EEYGvOpEgaIv8sIJl7un4BoWHYq/2D6jDHK/YmbpgG -J2FIvZZ4vVYixqgrqCh54USpwTaKd4KQpdm4zZMJ2yIznR6+gXxTi2TyUwKFV67y -RY6o5n3jusWuRejB1BI2eXRbFSeZn6IxAG8QLlLHu1R/XBB1dYDkbtYZ5XuAJRTH -qjCL+s/4rjJIUj02dmmtiyObN3bs/48DTQsDqgCYbA2wmbBjT9lPmRWfncBSlqbx -XSRwyXnDql+UIi6wphBdESn5TNVJjWxYQ16ZRYoZlz4tV2bPl4kCHAQQAQoABgUC -WCOB1QAKCRCB/dUuZfDuelcKD/4iggO8sgYYmTf63y2LJhG7e2d3K/cbQ04Pn/iF -b6zBa5kCsLAWHJmWBPlPkQB3HjZ+j1OSs4sHvwuotuVde2cbtzEvuphQRamFSU83 -lakXwXrk00IU7oVEz1Yo9c7IB6pOY0uDgQMIp/Vitm9pomZXAV3S1bYciYuvXdJC -6SaUbyrHzkVgxEV7TSK2XUgMFGnBCIUhqxNA+chkGg6KS715XH8MJyb1Izinsjux -Q07+tquoiYqRhSntTc+bJ83OpSB8bPlqP1FZdc+ypZjq8OEpFIZK8QtK+849vzYw -vORq19mwFAY9y6XZip7YZzSGzn7Q4v3XfVJlIwGrkHSnUkqOmQXGdoSHAiwX3WhU -nPtpYFZQoFFQjm0SsgdPWbqJmmLj2MjHUFbKzl9PVa0INnwp6RxfzNZjU6OxphoI -ocw+2hmXv/lHzb+cwFf8Nae0WOJkCoGwxk9mYA0omhuKJ/WWVvauu+uaswBkeX6O -1Yf1jSrWgK5u+jbDcmZj0kFL0zdB/pBxshngxCA3efPd1e2dJGcPlaoqkwZAtEmG -hwWDj9Gk5IhSX1/Wpv+ke2wprUPzwv7Z5loXroLub2R29FWyHzymwlnts5hSg7kR -1PzxD3iOHFgmnWcBCchf8UWmAjrutZQJZWLTDkzlC6Vj8rkJcgdb0v14zvYVJTWs -Q/hMDYkCHAQSAQoABgUCWCN/ZwAKCRCRAl9JYWN/KLmND/9k8ydscqaMW86NswOC -drJDXuOTDvJJlnLYhgO1+jKQizbHQqnszIVk7KvXY2/K++TdTNdG/+/LosvtIRKb -2DEvV2hPZhc3UxZ2Gnx9ocqjSCfmd9er9EY34WGLtr57eQnu93CJGe10F3qg4rr3 -8zsgQcLXomvKnB2J5oRWBla01DXZhum1uIbehrqDmBUz9YxAIz9adY0AjDyLNvAB -IghkjobLHWhouQaTV1IT6Koixdrj6eKekjRojWVZ7Po5dcUe525NlA1yBJhI9VDF -TLy6DHEwmJJuAQqDpyRILzSDsyQ0B+wBgpGks5reCDZlwAjogLy0O6nV2qYKfVXK -ziHeXPvzLPEfSmkA0ZutLXnJBLNfod4zELLJrPJA27dDdQO4yImoAjjTklyBpHXy -Fp3r5RlDq5yA9VpNkC58KJQZoiplkUNBaQTjYgcYX4LDaU4bEq++CUUEnisIyqPO -KqJPJAvmlm1d2vOMxhzcjxt3xBAvDZ8ibRIXlV296Y56SEBe5UZhyUqpAQBa0zsp -oQm9MdkqoC+IDBTRVnbGSxsw0GiQRpAJyNOlkTzP6z6ySmRIQ1hH1TqXx7TChPqP -tcLHLOnRTY9/v5Kt8APa+qgn/0UVgGcetkarqXNdtq+zD1x9C0DFNURBl0uH/E1E -Dtyx4xI6xCY3jzv0Cb1y9Afrc7Q7U2FtaSBLZXJvbGEgKGh0dHA6Ly93d3cuaWtp -LmZpL2tlcm9sYXNhLykgPGtlcm9sYXNhQGlraS5maT6JAlYEEwECAEACGwMHCwkI -BwMCAQYVCAIJCgsEFgIDAQIeAQIXgBYhBI7TluN+ONRxoAUw06lVMkX96bc5BQJZ -vjaaBQkZwjtjAAoJEKlVMkX96bc58KYP/jvpHWmoKKFzqClLdDkN8tBo30GgHGoh -WKHbgW859mi/ZcYzTxlx6Dm88QwV5DRulgqAHvLTippncR3LTpL3Ys86ZDoIskF9 -BnWOm/bC+Czl9mDL6BNfFEWWnfeGFsCaMq/Jx8nj8i2o0ezhbTjCeGeng4quWK1D -T6G8Kvnk7Dc+i0n20LUQf2WRCLrtJEl/PMElc+11X/jLm9ypjE/jr24xiNsZck45 -4rdMsdkZqgbSHWNIHyxS66mWmD1vbHp3kq0ic09ISCx/Xc7OQpv7V0hN+lxE+AvA -3Mjp2i7A3ntwUbPwmZkdiWUrBqU4CYee0S4fbgroUjNQ/JhGZmCku5YbcyAg4KrP -quXEftY0HP3qQMMElcwna5ljDQdC9NGuSWkH0OKZsuXlgtIz583wjNTKupzii+jo -AJcNnbdRR4i/U7cI+/ySluTp+Az/odmTNzssGnlsXOSGYWk4o6ruKvU4HzUauMEO -XPrTvI7IlH/GIHvwrOcXAyAU90M0qppC4YjXK8oCawzTnbQVQsbedwoNaEPaD4Bz -N4ka9PtvgKnBzODvOeDsTz1O6vTomttW2C6nficc/PXQvxDkZ3NeJw3eGiiAQxeA -w2Ps3+oIasyQZZVLlvu8dfE2BsPArggPLNgd6bLk3yk/gQGR0D+/TyHuCgPM1nZt -mBG3utrXfMz3iQIcBBABCgAGBQJYI4HVAAoJEIH91S5l8O56YhYQAIfxcRP31w+6 -htYZO5dGS1zF1CReY8VO/AyBa59YJHAlFSbOhqHQY1SAYD+H1IZhv/JCvQScZhyT -giI3KPP1RAPUa1xGZrf4hwl7Yu8ZpFn1Y0Gxd4bj2i9HWJcd1A+ci4kc+dU4rPEB -ac2U06vcIyuyCSjuK2RdYCyd7pQRkoUtZxWen6sxi1khsw3Qucfbr5QZyh/roA4i -hTb3VlFFIiCRcZOAqSYml9a+kbDxpgswbdCE3EMHVYBWtFwWImZOhnsun148H7EA -+b+hAcbkoNpXJOfC8q/EM0qm6C1GhryXe1voLxfeMdKKjXM78dc0z3L/Vz0E+stD -qrT7CG1jLSk/rIjSvRhbnEX/ZTKa+19ytht0B2zxkokjevvzw6cXSM5JjG8Q9k7R -PcPOTS0t7MSwRqCEFvhvswH3JYy0SH0U2nKbPmkY1Awh6BZNyGpf3dxHV648RVZv -lrXUbXv1azD8U+llaMkVx0PTbej0RcRHQM6B5zJ0qu1MC64V/v2uUK3MNl38JdFa -wkB494uf024FRIfJlQ8+WYrsGlHbUBZZsWzsyrPaeaqL0Xcy+hOc7wu7cZPxkqL8 -71O3jbq2dFkBWA4ANsiRdJTh14qoen4YVdc9gjq6HsuFyu0gauDktLaLUHVCX27e -kWThHNxeNoGkcKKHoQdHrN8sII8C1q6fiQIcBBIBCgAGBQJYI39nAAoJEJECX0lh -Y38oIbEP/165gMnaD+g7cfGsHCHQk9/ZrE+4iXfZSwxlhaJ4kK88Ad/tPvoiOxmS -NaUIfH/koGBQNeE/OjjIkPiGlsldg9//4mGmSglM4jLeQBG0QuTLo30aNCl9xU6q -rv9PV/ROfjRUF5NxCAiDdA24uBZ8CftdK5sglD6fazeINQyNk5Wm8e7Jk9PRzIuK -jnZRyaGJl3egx5smWnCZZ8QfjsYXDzbp1uDavmF7Qczp+xbzBhdh6VdSZ0VwvnPr -kN3CzGiR3AuG982R41UGZQ3a+3d38QnmX8cdT1yCqJLrSh4+AJbuGrndOqxBhTN0 -VQBIGHteZ6ezxDHs4kVBwfSc3XOzNimJKFVxWCJDXZQojKawu7PaDPYGxU9OWAjs -OWtJFTGqeEiBDQbnLwncT5l/I1O1zv9MIFhQ4MgJeRbvG/QjuLrP6RoIMGZLkX6K -o35dZ6gO/XAdhJmOhfon6Q5/RPdB11e/UkM58xZMbQLGJ3Gm9vjz039vwMabMjXf -28UE3xKzdzDg8Fb3ykNtIQSFNr/cf5YBZ7KMtfJ6ugExmJQQdWxZLQpHoNNCmknt -OHOajlB628N3J0PKlwPjjt5KveBO2ur/yAly6SSv2Oi/astGscgrJtIyPFKMmKar -gPzEnPv4DfLbHnskHkyzVBrQE16Pmcfx4fAe2LeDIO8KJMqSxKOouQINBFLH/jcB -EADGsDuJyhEGExcInkb4Zy8HlSNaT0nFxpQK+tI5RlqyC11TnxdUDCQwPPRh/hdN -s7RDQ6lHhmXydD04+Sjjn0nkQCxd8TlBTwOU6BV4vPF7BonskTMHb6mXxOo+6f7+ -J5q4beQ7XzRSoFqLZ0kiump7B4m6L4WSqZmcfi8f6EOQZHK1HsTB2jE+cwaPm7vN -eNaKXYM6hHojZ7XnDavv4vMxfLRGGx5e6wNcZexD4t4pkMwmA+A576t5CnIm8JVB -2HLj2YZN6DfIfYQ9EcMYSYVLg/EuivPaMZIoIa9ki5TbeQDANluJqAG+i+CSoIfJ -X1V1p0WoeSEKJnGBhVFmajU+nek1lCqeM/VXQF4dWbFCQm8/eKl1M9PY77dwT90x -RZDeigM6o6CoB+6rfePAnwsmtA21LyQ9WMTCH9qii9SvlWkfCvLK3HnC/2d1ctws -F8yoc6KF+Qwj7RV23/iHYqjxB8OcOAyHuv+k0sD9o0MLlzAExOftLPkwyWS8ePs7 -rJVLSA42N3diUYx5TO3NzmU8ifn4hGxbF9J/sIYQUfCxH9V+DBe2vhVSZ/bQKpVU -ZTE8KxINL32JvTR3HbEwHKIe0xIFnDOMGrWP7icPEsaSKj/0vEq/Is/R2nJWfD0V -zs7vil9zYU16vHQtZrv/5SzavzDRFGxLm7/jDfrzMuNRdQARAQABiQIlBBgBAgAP -BQJSx/43AhsMBQkJZgGAAAoJEKlVMkX96bc5cYEQAI8xVRdoza/MY9KFJCRiobii -4GjxAJqIXXvbY8mM7rvmiLnzfr5msLzSop7Epse6tkI8QvYXbY+EjXke27J8rM/z -qXyqdKJfcqKVzq6fIQyVVsz9o0hwvuSjkcSgCV2b8XHKbNygSnNh2VJ5YY/zL2x5 -tsySa3tLukh46ydKWRQqOSMIxMT0TnCOiTMr5INwGnX68rB0kEuCSUdkzDuyulW2 -T0oN7Yx4ASgrJixwSu/UNMO/fXvkG0NYIWeXQcnn0C8zQv/PAfzJ9O+24Md4m6tz -VuDpblSRB6E8xQhusysRc4BEHB/G3Ege3JR/tumT6solJD7pfFDYkC9rAKhTKK9h -1b2VpEGxN9o8qwwjtNljLakEYXuWNpCmZxKAR4Agg3UY8CGmgsTKyjsfB9iO2+LX -CS9uQMAtIHbnr++mPASBEKD6rP8QIyf12fbI9JRNGWcXQVZBGXWmu4UaKOrXBTVz -ooj2yG7kZmKO0FoIaCqqTUs2/KhnFj2EFvym2j1OMrYxOM/pT6w3cv3CwGb1ILOX -0qrTQiEpOExSMa21Mi4678jXt6F6NPWG/lwlgE1WM9i9jIcua+NU5ZJiqQ/rjuSR -MB/WFrQy66/jb9wWNp/G6DXrANgdgoC9Dq5oviB+dqSXlU5b0atG4ru506mXCHKm -OC+wu0oRlGQ/X6iuuDfS -=fVwo ------END PGP PUBLIC KEY BLOCK----- diff --git a/contrib/munin_plugins/dhcpstats_abs.js b/contrib/munin_plugins/dhcpstats_abs.js deleted file mode 100755 index aa5409c..0000000 --- a/contrib/munin_plugins/dhcpstats_abs.js +++ /dev/null @@ -1,44 +0,0 @@ -#!/usr/bin/env node - -var command = "dhcpd-pools" -var timeout = 5000; // (ms) if the command take longer, then kill it - -var execFile = require('child_process').execFile; -var echo = require('util').print; - -var arg = process.argv[2]; - -if ("autoconf" === arg) { - echo("yes\n"); - return 0; -} - -execFile(command, [ "--format=j", "--sort=n" ], { timeout: timeout }, function(error, stdout, stderr) { - if (error !== null) { - console.log('exec error: ' + error); - return 1; - } - - stdout = JSON.parse(stdout); - - if ("config" === arg) { - echo("graph_title dhcp usage (number of machines)\n"); - echo("graph_vlabel nb of machines\n"); - echo("graph_scale no\n"); - echo("graph_category network\n"); - - stdout["subnets"].forEach(function(subnet) { - var location = subnet["location"]; - var range = subnet["range"]; - echo(location + '.label ' + location + ' (' + range + ')\n'); - }); - } else { - stdout["shared-networks"].forEach(function(network) { - var location = network["location"]; - var used = network["used"]; - var defined = network["defined"]; - echo(location + '.value ' + used + '\n'); - }); - } - -}); diff --git a/contrib/munin_plugins/dhcpstats_abs.php b/contrib/munin_plugins/dhcpstats_abs.php deleted file mode 100755 index 3f8c553..0000000 --- a/contrib/munin_plugins/dhcpstats_abs.php +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/env php -1 && $argv[1]=="autoconf") { - echo "yes\n"; - return; -} elseif ($argc>1 && $argv[1]=="config") { - $xml2 = $xml->xpath("subnet"); - echo "graph_title dhcp usage (number of machines)\n"; - echo "graph_vlabel nb of machines\n"; - echo "graph_scale no\n"; - echo "graph_category network\n"; - foreach ($xml2 as $xml3) { - $location = (string) $xml3->location; - $range = (string) $xml3->range; - echo "$location.label $location ($range)\n"; - } -} else { - $xml2 = $xml->xpath("shared-network"); - foreach ($xml2 as $xml3) { - $location = (string) $xml3->location; - $used = (int) $xml3->used; - $defined = (int) $xml3->defined; - $pourcent = ceil($used*10000/$defined)/100; - echo "$location.value $used\n"; - } -} - diff --git a/contrib/munin_plugins/dhcpstats_percent.js b/contrib/munin_plugins/dhcpstats_percent.js deleted file mode 100755 index 6cf2dbd..0000000 --- a/contrib/munin_plugins/dhcpstats_percent.js +++ /dev/null @@ -1,49 +0,0 @@ -#!/usr/bin/env node - -var command = "dhcpd-pools" -var timeout = 5000; // (ms) if the command take longer, then kill it - -var execFile = require('child_process').execFile; -var echo = require('util').print; - -var arg = process.argv[2]; - -if ("autoconf" === arg) { - echo("yes\n"); - return 0; -} - -execFile(command, [ "--format=j", "--sort=n" ], { timeout: timeout }, function(error, stdout, stderr) { - if (error !== null) { - console.log('exec error: ' + error); - return 1; - } - - stdout = JSON.parse(stdout); - - if ("config" === arg) { - echo("graph_title dhcp usage (in percent)\n"); - echo("graph_args --upper-limit 100 -l 0 --rigid\n"); - echo("graph_vlabel %\n"); - echo("graph_scale no\n"); - echo("graph_category network\n"); - - stdout["subnets"].forEach(function(subnet) { - var location = subnet["location"]; - var range = subnet["range"]; - echo(location + '.label ' + location + ' (' + range + ')\n'); - echo(location + '.warning 75\n'); - echo(location + '.critical 90\n'); - }); - } else { - stdout["shared-networks"].forEach(function(network) { - var location = network["location"]; - var used = network["used"]; - var defined = network["defined"]; - // keep 1 digit after decimal point - var percent = Math.ceil(used * 100 / defined) / 10; - echo(location + '.value ' + percent + '\n'); - }); - } - -}); diff --git a/contrib/munin_plugins/dhcpstats_percent.php b/contrib/munin_plugins/dhcpstats_percent.php deleted file mode 100755 index 8a5ae32..0000000 --- a/contrib/munin_plugins/dhcpstats_percent.php +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/env php -1 && $argv[1]=="autoconf") { - echo "yes\n"; - return; -} elseif ($argc>1 && $argv[1]=="config") { - $xml2 = $xml->xpath("subnet"); - echo "graph_title dhcp usage (in percent)\n"; - echo "graph_args --upper-limit 100 -l 0 --rigid\n"; - echo "graph_vlabel %\n"; - echo "graph_scale no\n"; - echo "graph_category network\n"; - foreach ($xml2 as $xml3) { - $location = (string) $xml3->location; - $range = (string) $xml3->range; - echo "$location.label $location ($range)\n"; - echo "$location.warning 75\n"; - echo "$location.critical 90\n"; - } -} else { - $xml2 = $xml->xpath("shared-network"); - foreach ($xml2 as $xml3) { - $location = (string) $xml3->location; - $used = (int) $xml3->used; - $defined = (int) $xml3->defined; - // keep 1 digit after decimal point - $pourcent = ceil($used*1000/$defined)/10; - echo "$location.value $pourcent\n"; - } -} - diff --git a/contrib/munin_plugins/preview.png b/contrib/munin_plugins/preview.png deleted file mode 100644 index b621b69..0000000 Binary files a/contrib/munin_plugins/preview.png and /dev/null differ diff --git a/contrib/nagios.conf.in b/contrib/nagios.conf.in deleted file mode 100644 index 1881c1a..0000000 --- a/contrib/nagios.conf.in +++ /dev/null @@ -1 +0,0 @@ -command[check_dhcpd_pools]=@bindir@/dhcpd-pools --warning $ARG1$ --critical $ARG2$ diff --git a/contrib/rpm.spec b/contrib/rpm.spec deleted file mode 100644 index 46826d8..0000000 --- a/contrib/rpm.spec +++ /dev/null @@ -1,4 +0,0 @@ -Klaus Slott made a package that works for opensuse, and is -a good starting point for whom ever happens to need an rpm. - -https://build.opensuse.org/package/show/home:Mr_Manor/dhcpd-pools diff --git a/contrib/snmptest.pl b/contrib/snmptest.pl index 54093c7..c77b882 100644 --- a/contrib/snmptest.pl +++ b/contrib/snmptest.pl @@ -23,10 +23,9 @@ # you set $dbg to 1 then output will be generated in /tmp. use strict; -use NetSNMP::OID; # Version info: -my $SNMPver = "snmp1.1"; +my $SNMPver = "snmp1.0"; my $DHCPver = "dhcp1.0"; my $VERSION = "$SNMPver/$DHCPver"; # @@ -194,7 +193,7 @@ sub ParseDataFile () { } close IN; if ($dbg) { - foreach (sort Oidcmp @validoidlist) { print DBG "ValidOID: $_\n"; } + foreach (sort @validoidlist) { print DBG "ValidOID: $_\n"; } } if ($dbg) { @@ -371,7 +370,7 @@ sub GetData ($) { @userquery = split (/\./, $userqueryoid); my $found = 0; - foreach (sort Oidcmp @validoidlist) { + foreach (sort @validoidlist) { $next = $_; print DBG "Comparing $userqueryoid vs. $_\n" if $dbg; @validoid = split (/\./, $_); @@ -433,12 +432,6 @@ sub Pong { $line = 0; } -sub Oidcmp { - my $oida = new NetSNMP::OID($a); - my $oidb = new NetSNMP::OID($b); - snmp_oid_compare($oida, $oidb); -} - ################################## START ################################## # # Main diff --git a/contrib/zabbix.txt b/contrib/zabbix.txt deleted file mode 100644 index 9ea279a..0000000 --- a/contrib/zabbix.txt +++ /dev/null @@ -1,4 +0,0 @@ -Zabbix 5 template, and instructions how to use it, can be found from -Mathieu's repository. - -https://github.com/mmorier86/dhcpd-pools-zabbix-template diff --git a/doc/.gitignore b/doc/.gitignore deleted file mode 100644 index 6f46fcd..0000000 --- a/doc/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/doxy.conf -/doxyfile.stamp -/html diff --git a/doc/Makemodule.am b/doc/Makemodule.am deleted file mode 100644 index 89846b6..0000000 --- a/doc/Makemodule.am +++ /dev/null @@ -1,24 +0,0 @@ -PATHFILES += \ - doc/doxy.conf -nodist_noinst_DATA = \ - doc/doxy.conf - -EXTRA_DIST += \ - doc/introduction.dox - -if ENABLE_DOXYGEN - -doc/doxyfile.stamp: - $(DOXYGEN) doc/doxy.conf - date > doc/doxyfile.stamp - -CLEANFILES += doc/doxyfile.stamp - -all-local: doc/doxyfile.stamp - -clean-local-doc: - -rm -rf doc/*html - -CLEAN_LOCALS += clean-local-doc - -endif diff --git a/doc/doxy.conf.in b/doc/doxy.conf.in deleted file mode 100644 index 776809f..0000000 --- a/doc/doxy.conf.in +++ /dev/null @@ -1,2424 +0,0 @@ -# Doxyfile 1.8.13 - -# This file describes the settings to be used by the documentation system -# doxygen (www.doxygen.org) for a project. -# -# All text after a double hash (##) is considered a comment and is placed in -# front of the TAG it is preceding. -# -# All text after a single 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. -# The default value is: UTF-8. - -DOXYFILE_ENCODING = UTF-8 - -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by -# double-quotes, unless you are using Doxywizard) that should identify the -# project for which the documentation is generated. This name is used in the -# title of most generated pages and in a few other places. -# The default value is: My Project. - -PROJECT_NAME = @PACKAGE_NAME@ - -# 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 = @VERSION@ - -# Using the PROJECT_BRIEF tag one can provide an optional one line description -# for a project that appears at the top of each page and should give viewer a -# quick idea about the purpose of the project. Keep the description short. - -PROJECT_BRIEF = "ISC dhcpd lease usage analyser" - -# With the PROJECT_LOGO tag one can specify a logo or an icon that is included -# in the documentation. The maximum height of the logo should not exceed 55 -# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy -# the logo to the output directory. - -PROJECT_LOGO = - -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path -# into which the generated documentation will be written. 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 = @top_srcdir@/doc - -# 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 causes -# performance problems for the file system. -# The default value is: NO. - -CREATE_SUBDIRS = NO - -# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII -# characters to appear in the names of generated files. If set to NO, non-ASCII -# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode -# U+3044. -# The default value is: NO. - -ALLOW_UNICODE_NAMES = 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. -# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese, -# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States), -# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian, -# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages), -# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian, -# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian, -# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish, -# Ukrainian and Vietnamese. -# The default value is: English. - -OUTPUT_LANGUAGE = English - -# If the BRIEF_MEMBER_DESC tag is set to YES, 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. -# The default value is: YES. - -BRIEF_MEMBER_DESC = YES - -# If the REPEAT_BRIEF tag is set to YES, 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. -# The default value is: YES. - -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 and 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. -# The default value is: NO. - -ALWAYS_DETAILED_SEC = NO - -# 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. -# The default value is: NO. - -INLINE_INHERITED_MEMB = NO - -# If the FULL_PATH_NAMES tag is set to YES, 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 -# The default value is: YES. - -FULL_PATH_NAMES = YES - -# 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. -# -# Note that you can specify absolute paths here, but also relative paths, which -# will be relative from the directory where doxygen is started. -# This tag requires that the tag FULL_PATH_NAMES is set to YES. - -STRIP_FROM_PATH = src - -# 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 list of 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. -# The default value is: NO. - -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-style will behave just like regular Qt- -# style comments (thus requiring an explicit @brief command for a brief -# description.) -# The default value is: NO. - -JAVADOC_AUTOBRIEF = YES - -# 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 Qt-style will behave just like regular Qt-style comments (thus -# requiring an explicit \brief command for a brief description.) -# The default value is: NO. - -QT_AUTOBRIEF = YES - -# 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 behavior. 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 behavior instead. -# -# Note that setting this tag to YES also means that rational rose comments are -# not recognized any more. -# The default value is: NO. - -MULTILINE_CPP_IS_BRIEF = NO - -# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the -# documentation from any documented member that it re-implements. -# The default value is: YES. - -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. -# The default value is: NO. - -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. -# Minimum value: 1, maximum value: 16, default value: 4. - -TAB_SIZE = 4 - -# This tag can be used to specify a number of aliases that act 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 = - -# This tag can be used to specify a number of word-keyword mappings (TCL only). -# A mapping has the form "name=value". For example adding "class=itcl::class" -# will allow you to use the command class in the itcl::class meaning. - -TCL_SUBST = - -# 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. -# The default value is: NO. - -OPTIMIZE_OUTPUT_FOR_C = YES - -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or -# Python sources only. Doxygen will then generate output that is more tailored -# for that language. For instance, namespaces will be presented as packages, -# qualified scopes will look different, etc. -# The default value is: NO. - -OPTIMIZE_OUTPUT_JAVA = NO - -# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran -# sources. Doxygen will then generate output that is tailored for Fortran. -# The default value is: NO. - -OPTIMIZE_FOR_FORTRAN = NO - -# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL -# sources. Doxygen will then generate output that is tailored for VHDL. -# The default value is: NO. - -OPTIMIZE_OUTPUT_VHDL = NO - -# Doxygen selects the parser to use depending on the extension of the files it -# parses. With this tag you can assign which parser to use for a given -# extension. Doxygen has a built-in mapping, but you can override or extend it -# using this tag. The format is ext=language, where ext is a file extension, and -# language is one of the parsers supported by doxygen: IDL, Java, Javascript, -# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran: -# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran: -# Fortran. In the later case the parser tries to guess whether the code is fixed -# or free formatted code, this is the default for Fortran type files), VHDL. For -# instance to make doxygen treat .inc files as Fortran files (default is PHP), -# and .f files as C (default is Fortran), use: inc=Fortran f=C. -# -# Note: For files without extension you can use no_extension as a placeholder. -# -# Note that for custom extensions you also need to set FILE_PATTERNS otherwise -# the files are not read by doxygen. - -EXTENSION_MAPPING = - -# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments -# according to the Markdown format, which allows for more readable -# documentation. See http://daringfireball.net/projects/markdown/ for details. -# The output of markdown processing is further processed by doxygen, so you can -# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in -# case of backward compatibilities issues. -# The default value is: YES. - -MARKDOWN_SUPPORT = YES - -# When the TOC_INCLUDE_HEADINGS tag is set to a non-zero value, all headings up -# to that level are automatically included in the table of contents, even if -# they do not have an id attribute. -# Note: This feature currently applies only to Markdown headings. -# Minimum value: 0, maximum value: 99, default value: 0. -# This tag requires that the tag MARKDOWN_SUPPORT is set to YES. - -TOC_INCLUDE_HEADINGS = 0 - -# When enabled doxygen tries to link words that correspond to documented -# classes, or namespaces to their corresponding documentation. Such a link can -# be prevented in individual cases by putting a % sign in front of the word or -# globally by setting AUTOLINK_SUPPORT to NO. -# The default value is: YES. - -AUTOLINK_SUPPORT = YES - -# 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); -# versus func(std::string) {}). This also make the inheritance and collaboration -# diagrams that involve STL classes more complete and accurate. -# The default value is: NO. - -BUILTIN_STL_SUPPORT = NO - -# If you use Microsoft's C++/CLI language, you should set this option to YES to -# enable parsing support. -# The default value is: NO. - -CPP_CLI_SUPPORT = NO - -# Set the SIP_SUPPORT tag to YES if your project consists of sip (see: -# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen -# will parse them like normal C++ but will assume all classes use public instead -# of private inheritance when no explicit protection keyword is present. -# The default value is: NO. - -SIP_SUPPORT = NO - -# For Microsoft's IDL there are propget and propput attributes to indicate -# getter and setter methods for a property. Setting this option to YES will make -# doxygen to replace the get and set methods by a property in the documentation. -# This will only work if the methods are indeed getting or setting a simple -# type. If this is not the case, or you want to show the methods anyway, you -# should set this option to NO. -# The default value is: YES. - -IDL_PROPERTY_SUPPORT = YES - -# 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. -# The default value is: NO. - -DISTRIBUTE_GROUP_DOC = NO - -# If one adds a struct or class to a group and this option is enabled, then also -# any nested class or struct is added to the same group. By default this option -# is disabled and one has to add nested compounds explicitly via \ingroup. -# The default value is: NO. - -GROUP_NESTED_COMPOUNDS = NO - -# Set the SUBGROUPING tag to YES 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. -# The default value is: YES. - -SUBGROUPING = YES - -# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions -# are shown inside the group in which they are included (e.g. using \ingroup) -# instead of on a separate page (for HTML and Man pages) or section (for LaTeX -# and RTF). -# -# Note that this feature does not work in combination with -# SEPARATE_MEMBER_PAGES. -# The default value is: NO. - -INLINE_GROUPED_CLASSES = NO - -# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions -# with only public data fields or simple typedef fields will be shown inline in -# the documentation of the scope in which they are defined (i.e. file, -# namespace, or group documentation), provided this scope is documented. If set -# to NO, structs, classes, and unions are shown on a separate page (for HTML and -# Man pages) or section (for LaTeX and RTF). -# The default value is: NO. - -INLINE_SIMPLE_STRUCTS = NO - -# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or -# enum is documented as struct, union, or enum with the name of the typedef. So -# typedef struct TypeS {} TypeT, will appear in the documentation as a struct -# with name TypeT. When disabled the typedef will appear as a member of a file, -# namespace, or class. And the struct will be named TypeS. This can typically be -# useful for C code in case the coding convention dictates that all compound -# types are typedef'ed and only the typedef is referenced, never the tag name. -# The default value is: NO. - -TYPEDEF_HIDES_STRUCT = NO - -# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This -# cache is used to resolve symbols given their name and scope. Since this can be -# an expensive process and often the same symbol appears multiple times in the -# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small -# doxygen will become slower. If the cache is too large, memory is wasted. The -# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range -# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 -# symbols. At the end of a run doxygen will report the cache usage and suggest -# the optimal cache size from a speed point of view. -# Minimum value: 0, maximum value: 9, default value: 0. - -LOOKUP_CACHE_SIZE = 0 - -#--------------------------------------------------------------------------- -# 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 respectively EXTRACT_STATIC tags are set to YES. -# Note: This will also disable the warnings about undocumented members that are -# normally produced when WARNINGS is set to YES. -# The default value is: NO. - -EXTRACT_ALL = YES - -# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will -# be included in the documentation. -# The default value is: NO. - -EXTRACT_PRIVATE = NO - -# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal -# scope will be included in the documentation. -# The default value is: NO. - -EXTRACT_PACKAGE = NO - -# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be -# included in the documentation. -# The default value is: NO. - -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. Does not have any effect -# for Java sources. -# The default value is: YES. - -EXTRACT_LOCAL_CLASSES = YES - -# This flag is only useful for Objective-C code. If 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, only methods in the interface are -# included. -# The default value is: NO. - -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. -# The default value is: NO. - -EXTRACT_ANON_NSPACES = NO - -# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all -# undocumented members inside documented classes or files. If set to NO 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. -# The default value is: NO. - -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, these classes will be included in the various overviews. This option -# has no effect if EXTRACT_ALL is enabled. -# The default value is: NO. - -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, these declarations will be -# included in the documentation. -# The default value is: NO. - -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, these -# blocks will be appended to the function's detailed documentation block. -# The default value is: NO. - -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 then the documentation -# will be excluded. Set it to YES to include the internal documentation. -# The default value is: NO. - -INTERNAL_DOCS = YES - -# 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. -# The default value is: system dependent. - -CASE_SENSE_NAMES = YES - -# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with -# their full class and namespace scopes in the documentation. If set to YES, the -# scope will be hidden. -# The default value is: NO. - -HIDE_SCOPE_NAMES = YES - -# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will -# append additional text to a page's title, such as Class Reference. If set to -# YES the compound reference will be hidden. -# The default value is: NO. - -HIDE_COMPOUND_REFERENCE= NO - -# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of -# the files that are included by a file in the documentation of that file. -# The default value is: YES. - -SHOW_INCLUDE_FILES = YES - -# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each -# grouped member an include statement to the documentation, telling the reader -# which file to include in order to use the member. -# The default value is: NO. - -SHOW_GROUPED_MEMB_INC = NO - -# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include -# files with double quotes in the documentation rather than with sharp brackets. -# The default value is: NO. - -FORCE_LOCAL_INCLUDES = NO - -# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the -# documentation for inline members. -# The default value is: YES. - -INLINE_INFO = YES - -# If the SORT_MEMBER_DOCS tag is set to YES 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. -# The default value is: YES. - -SORT_MEMBER_DOCS = YES - -# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief -# descriptions of file, namespace and class members alphabetically by member -# name. If set to NO, the members will appear in declaration order. Note that -# this will also influence the order of the classes in the class list. -# The default value is: NO. - -SORT_BRIEF_DOCS = NO - -# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the -# (brief and detailed) documentation of class members so that constructors and -# destructors are listed first. If set to NO the constructors will appear in the -# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. -# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief -# member documentation. -# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting -# detailed member documentation. -# The default value is: NO. - -SORT_MEMBERS_CTORS_1ST = NO - -# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy -# of group names into alphabetical order. If set to NO the group names will -# appear in their defined order. -# The default value is: NO. - -SORT_GROUP_NAMES = 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 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. -# The default value is: NO. - -SORT_BY_SCOPE_NAME = NO - -# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper -# type resolution of all parameters of a function it will reject a match between -# the prototype and the implementation of a member function even if there is -# only one candidate or it is obvious which candidate to choose by doing a -# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still -# accept a match between prototype and implementation in such cases. -# The default value is: NO. - -STRICT_PROTO_MATCHING = 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. -# The default value is: YES. - -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. -# The default value is: YES. - -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. -# The default value is: YES. - -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. -# The default value is: YES. - -GENERATE_DEPRECATEDLIST= YES - -# The ENABLED_SECTIONS tag can be used to enable conditional documentation -# sections, marked by \if ... \endif and \cond -# ... \endcond blocks. - -ENABLED_SECTIONS = - -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the -# initial value of a variable or macro / define can have 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 value of individual variables and macros / defines can be -# controlled using \showinitializer or \hideinitializer command in the -# documentation regardless of this setting. -# Minimum value: 0, maximum value: 10000, default value: 30. - -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. -# The default value is: YES. - -SHOW_USED_FILES = YES - -# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This -# will remove the Files entry from the Quick Index and from the Folder Tree View -# (if specified). -# The default value is: YES. - -SHOW_FILES = YES - -# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces -# page. This will remove the Namespaces entry from the Quick Index and from the -# Folder Tree View (if specified). -# The default value is: YES. - -SHOW_NAMESPACES = YES - -# 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 command input-file, where command is the value of the -# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided -# by doxygen. Whatever the program writes to standard output is used as the file -# version. For an example see the documentation. - -FILE_VERSION_FILTER = - -# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed -# by doxygen. The layout file controls the global structure of the generated -# output files in an output format independent way. To create the layout file -# that represents doxygen's defaults, run doxygen with the -l option. You can -# optionally specify a file name after the option, if omitted DoxygenLayout.xml -# will be used as the name of the layout file. -# -# Note that if you run doxygen from a directory containing a file called -# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE -# tag is left empty. - -LAYOUT_FILE = - -# The CITE_BIB_FILES tag can be used to specify one or more bib files containing -# the reference definitions. This must be a list of .bib files. The .bib -# extension is automatically appended if omitted. This requires the bibtex tool -# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info. -# For LaTeX the style of the bibliography can be controlled using -# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the -# search path. See also \cite for info how to create references. - -CITE_BIB_FILES = - -#--------------------------------------------------------------------------- -# Configuration options related to warning and progress messages -#--------------------------------------------------------------------------- - -# The QUIET tag can be used to turn on/off the messages that are generated to -# standard output by doxygen. If QUIET is set to YES this implies that the -# messages are off. -# The default value is: NO. - -QUIET = NO - -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES -# this implies that the warnings are on. -# -# Tip: Turn warnings on while writing the documentation. -# The default value is: YES. - -WARNINGS = YES - -# If the WARN_IF_UNDOCUMENTED tag 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. -# The default value is: YES. - -WARN_IF_UNDOCUMENTED = YES - -# If the WARN_IF_DOC_ERROR tag 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. -# The default value is: YES. - -WARN_IF_DOC_ERROR = YES - -# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that -# are documented, but have no documentation for their parameters or return -# value. If set to NO, doxygen will only warn about wrong or incomplete -# parameter documentation, but not about the absence of documentation. -# The default value is: NO. - -WARN_NO_PARAMDOC = NO - -# If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when -# a warning is encountered. -# The default value is: NO. - -WARN_AS_ERROR = 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) -# The default value is: $file:$line: $text. - -WARN_FORMAT = "$file:$line: $text" - -# 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 standard -# error (stderr). - -WARN_LOGFILE = - -#--------------------------------------------------------------------------- -# Configuration options related to the input files -#--------------------------------------------------------------------------- - -# The INPUT tag is 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. See also FILE_PATTERNS and EXTENSION_MAPPING -# Note: If this tag is empty the current directory is searched. - -INPUT = @top_srcdir@ - -# This tag can be used to specify the character encoding of the source files -# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses -# libiconv (or the iconv built into libc) for the transcoding. See the libiconv -# documentation (see: http://www.gnu.org/software/libiconv) for the list of -# possible encodings. -# The default value is: UTF-8. - -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 patterns (like *.cpp and -# *.h) to filter out the source-files in the directories. -# -# Note that for custom extensions or not directly supported extensions you also -# need to set EXTENSION_MAPPING for the extension otherwise the files are not -# read by doxygen. -# -# If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp, -# *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, -# *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, -# *.m, *.markdown, *.md, *.mm, *.dox, *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, -# *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf and *.qsf. - -FILE_PATTERNS = *.c \ - *.h \ - *.dox - -# The RECURSIVE tag can be used to specify whether or not subdirectories should -# be searched for input files as well. -# The default value is: NO. - -RECURSIVE = YES - -# The EXCLUDE tag can be used to specify files and/or directories that should be -# 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. -# -# Note that relative paths are relative to the directory from which doxygen is -# run. - -EXCLUDE = build-aux \ - contrib - -# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or -# directories that are symbolic links (a Unix file system feature) are excluded -# from the input. -# The default value is: NO. - -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 -# -# Note that the wildcards are matched against the file with absolute path, so to -# exclude all test directories use the pattern */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. -# The default value is: NO. - -EXAMPLE_RECURSIVE = NO - -# The IMAGE_PATH tag can be used to specify one or more files or directories -# that contain images that are to be 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. -# -# Note that the filter must not add or remove lines; it is applied before the -# code is scanned, but not when the output code is generated. If lines are added -# or removed, the anchors will not be placed correctly. -# -# Note that for custom extensions or not directly supported extensions you also -# need to set EXTENSION_MAPPING for the extension otherwise the files are not -# properly processed by doxygen. - -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 information on how -# filters are used. If the FILTER_PATTERNS tag is empty or if none of the -# patterns match the file name, INPUT_FILTER is applied. -# -# Note that for custom extensions or not directly supported extensions you also -# need to set EXTENSION_MAPPING for the extension otherwise the files are not -# properly processed by doxygen. - -FILTER_PATTERNS = - -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER) will also be used to filter the input files that are used for -# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). -# The default value is: NO. - -FILTER_SOURCE_FILES = NO - -# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file -# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and -# it is also possible to disable source filtering for a specific pattern using -# *.ext= (so without naming a filter). -# This tag requires that the tag FILTER_SOURCE_FILES is set to YES. - -FILTER_SOURCE_PATTERNS = *.c \ - *.h - -# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that -# is part of the input, its contents will be placed on the main page -# (index.html). This can be useful if you have a project on for instance GitHub -# and want to reuse the introduction page also for the doxygen output. - -USE_MDFILE_AS_MAINPAGE = - -#--------------------------------------------------------------------------- -# 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 that -# also VERBATIM_HEADERS is set to NO. -# The default value is: NO. - -SOURCE_BROWSER = NO - -# Setting the INLINE_SOURCES tag to YES will include the body of functions, -# classes and enums directly into the documentation. -# The default value is: NO. - -INLINE_SOURCES = NO - -# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any -# special comment blocks from generated source code fragments. Normal C, C++ and -# Fortran comments will always remain visible. -# The default value is: YES. - -STRIP_CODE_COMMENTS = YES - -# If the REFERENCED_BY_RELATION tag is set to YES then for each documented -# function all documented functions referencing it will be listed. -# The default value is: NO. - -REFERENCED_BY_RELATION = YES - -# If the REFERENCES_RELATION tag is set to YES then for each documented function -# all documented entities called/used by that function will be listed. -# The default value is: NO. - -REFERENCES_RELATION = NO - -# If the REFERENCES_LINK_SOURCE tag is set to YES 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 documentation. -# The default value is: YES. - -REFERENCES_LINK_SOURCE = YES - -# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the -# source code will show a tooltip with additional information such as prototype, -# brief description and links to the definition and documentation. Since this -# will make the HTML file larger and loading of large files a bit slower, you -# can opt to disable this feature. -# The default value is: YES. -# This tag requires that the tag SOURCE_BROWSER is set to YES. - -SOURCE_TOOLTIPS = 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. -# -# To use it do the following: -# - Install the latest version of global -# - Enable SOURCE_BROWSER and USE_HTAGS in the config file -# - Make sure the INPUT points to the root of the source tree -# - Run doxygen as normal -# -# Doxygen will invoke htags (and that will in turn invoke gtags), so these -# tools must be available from the command line (i.e. in the search path). -# -# The result: instead of the source browser generated by doxygen, the links to -# source code will now point to the output of htags. -# The default value is: NO. -# This tag requires that the tag SOURCE_BROWSER is set to YES. - -USE_HTAGS = NO - -# If the VERBATIM_HEADERS tag is set the YES 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. -# See also: Section \class. -# The default value is: YES. - -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. -# The default value is: YES. - -ALPHABETICAL_INDEX = YES - -# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in -# which the alphabetical index list will be split. -# Minimum value: 1, maximum value: 20, default value: 5. -# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. - -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 a prefix (or a list of prefixes) that should be ignored -# while generating the index headers. -# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. - -IGNORE_PREFIX = - -#--------------------------------------------------------------------------- -# Configuration options related to the HTML output -#--------------------------------------------------------------------------- - -# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output -# The default value is: YES. - -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. -# The default directory is: html. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_OUTPUT = html - -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each -# generated HTML page (for example: .htm, .php, .asp). -# The default value is: .html. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_FILE_EXTENSION = .html - -# The HTML_HEADER tag can be used to specify a user-defined HTML header file for -# each generated HTML page. If the tag is left blank doxygen will generate a -# standard header. -# -# To get valid HTML the header file that includes any scripts and style sheets -# that doxygen needs, which is dependent on the configuration options used (e.g. -# the setting GENERATE_TREEVIEW). It is highly recommended to start with a -# default header using -# doxygen -w html new_header.html new_footer.html new_stylesheet.css -# YourConfigFile -# and then modify the file new_header.html. See also section "Doxygen usage" -# for information on how to generate the default header that doxygen normally -# uses. -# Note: The header is subject to change so you typically have to regenerate the -# default header when upgrading to a newer version of doxygen. For a description -# of the possible markers and block names see the documentation. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_HEADER = - -# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each -# generated HTML page. If the tag is left blank doxygen will generate a standard -# footer. See HTML_HEADER for more information on how to generate a default -# footer and what special commands can be used inside the footer. See also -# section "Doxygen usage" for information on how to generate the default footer -# that doxygen normally uses. -# This tag requires that the tag GENERATE_HTML is set to YES. - -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 left blank doxygen will generate a default style sheet. -# See also section "Doxygen usage" for information on how to generate the style -# sheet that doxygen normally uses. -# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as -# it is more robust and this tag (HTML_STYLESHEET) will in the future become -# obsolete. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_STYLESHEET = - -# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined -# cascading style sheets that are included after the standard style sheets -# created by doxygen. Using this option one can overrule certain style aspects. -# This is preferred over using HTML_STYLESHEET since it does not replace the -# standard style sheet and is therefore more robust against future updates. -# Doxygen will copy the style sheet files to the output directory. -# Note: The order of the extra style sheet files is of importance (e.g. the last -# style sheet in the list overrules the setting of the previous ones in the -# list). For an example see the documentation. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_EXTRA_STYLESHEET = - -# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or -# other source files which should be copied to the HTML output directory. Note -# that these files will be copied to the base HTML output directory. Use the -# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these -# files. In the HTML_STYLESHEET file, use the file name only. Also note that the -# files will be copied as-is; there are no commands or markers available. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_EXTRA_FILES = - -# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen -# will adjust the colors in the style sheet and background images according to -# this color. Hue is specified as an angle on a colorwheel, see -# http://en.wikipedia.org/wiki/Hue for more information. For instance the value -# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 -# purple, and 360 is red again. -# Minimum value: 0, maximum value: 359, default value: 220. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COLORSTYLE_HUE = 220 - -# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors -# in the HTML output. For a value of 0 the output will use grayscales only. A -# value of 255 will produce the most vivid colors. -# Minimum value: 0, maximum value: 255, default value: 100. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COLORSTYLE_SAT = 100 - -# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the -# luminance component of the colors in the HTML output. Values below 100 -# gradually make the output lighter, whereas values above 100 make the output -# darker. The value divided by 100 is the actual gamma applied, so 80 represents -# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not -# change the gamma. -# Minimum value: 40, maximum value: 240, default value: 80. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COLORSTYLE_GAMMA = 80 - -# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML -# page will contain the date and time when the page was generated. Setting this -# to YES can help to show when doxygen was last run and thus if the -# documentation is up to date. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_TIMESTAMP = YES - -# 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. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_DYNAMIC_SECTIONS = NO - -# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries -# shown in the various tree structured indices initially; the user can expand -# and collapse entries dynamically later on. Doxygen will expand the tree to -# such a level that at most the specified number of entries are visible (unless -# a fully collapsed tree already exceeds this amount). So setting the number of -# entries 1 will produce a full collapsed tree by default. 0 is a special value -# representing an infinite number of entries and will result in a full expanded -# tree by default. -# Minimum value: 0, maximum value: 9999, default value: 100. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_INDEX_NUM_ENTRIES = 100 - -# If the GENERATE_DOCSET tag is set to YES, additional index files will be -# generated that can be used as input for Apple's Xcode 3 integrated development -# environment (see: http://developer.apple.com/tools/xcode/), introduced with -# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a -# Makefile in the HTML output directory. Running make will produce the docset in -# that directory and running make install will install the docset in -# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at -# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html -# for more information. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_DOCSET = NO - -# This tag determines the name of the docset feed. A documentation feed provides -# an umbrella under which multiple documentation sets from a single provider -# (such as a company or product suite) can be grouped. -# The default value is: Doxygen generated docs. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_FEEDNAME = "Doxygen generated docs" - -# This tag specifies a string that should uniquely identify the documentation -# set bundle. This should be a reverse domain-name style string, e.g. -# com.mycompany.MyDocSet. Doxygen will append .docset to the name. -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_BUNDLE_ID = org.doxygen.Project - -# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify -# the documentation publisher. This should be a reverse domain-name style -# string, e.g. com.mycompany.MyDocSet.documentation. -# The default value is: org.doxygen.Publisher. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_PUBLISHER_ID = org.doxygen.Publisher - -# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. -# The default value is: Publisher. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_PUBLISHER_NAME = Publisher - -# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three -# additional HTML index files: index.hhp, index.hhc, and index.hhk. The -# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop -# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on -# Windows. -# -# The HTML Help Workshop contains a compiler that can convert all HTML output -# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML -# files are now used as the Windows 98 help format, and will replace the old -# Windows help format (.hlp) on all Windows platforms in the future. Compressed -# HTML files also contain an index, a table of contents, and you can search for -# words in the documentation. The HTML workshop also contains a viewer for -# compressed HTML files. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_HTMLHELP = NO - -# 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. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -CHM_FILE = - -# 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. -# The file has to be specified with full path. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -HHC_LOCATION = - -# 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). -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -GENERATE_CHI = NO - -# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc) -# and project file content. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -CHM_INDEX_ENCODING = - -# 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. Furthermore it -# enables the Previous and Next buttons. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -BINARY_TOC = NO - -# The TOC_EXPAND flag can be set to YES to add extra items for group members to -# the table of contents of the HTML help documentation and to the tree view. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -TOC_EXPAND = NO - -# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and -# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that -# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help -# (.qch) of the generated HTML documentation. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_QHP = NO - -# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify -# the file name of the resulting .qch file. The path specified is relative to -# the HTML output folder. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QCH_FILE = - -# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help -# Project output. For more information please see Qt Help Project / Namespace -# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace). -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_NAMESPACE = org.doxygen.Project - -# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt -# Help Project output. For more information please see Qt Help Project / Virtual -# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual- -# folders). -# The default value is: doc. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_VIRTUAL_FOLDER = doc - -# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom -# filter to add. For more information please see Qt Help Project / Custom -# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- -# filters). -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_CUST_FILTER_NAME = - -# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the -# custom filter to add. For more information please see Qt Help Project / Custom -# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- -# filters). -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_CUST_FILTER_ATTRS = - -# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this -# project's filter section matches. Qt Help Project / Filter Attributes (see: -# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes). -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_SECT_FILTER_ATTRS = - -# The QHG_LOCATION tag can be used to specify the location of Qt's -# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the -# generated .qhp file. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHG_LOCATION = - -# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be -# generated, together with the HTML files, they form an Eclipse help plugin. To -# install this plugin and make it available under the help contents menu in -# Eclipse, the contents of the directory containing the HTML and XML files needs -# to be copied into the plugins directory of eclipse. The name of the directory -# within the plugins directory should be the same as the ECLIPSE_DOC_ID value. -# After copying Eclipse needs to be restarted before the help appears. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_ECLIPSEHELP = NO - -# A unique identifier for the Eclipse help plugin. When installing the plugin -# the directory name containing the HTML and XML files should also have this -# name. Each documentation set should have its own identifier. -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. - -ECLIPSE_DOC_ID = org.doxygen.Project - -# If you want full control over the layout of the generated HTML pages it might -# be necessary to disable the index and replace it with your own. The -# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top -# of each HTML page. A value of NO enables the index and the value YES disables -# it. Since the tabs in the index contain the same information as the navigation -# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -DISABLE_INDEX = NO - -# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index -# structure should be generated to display hierarchical information. If the tag -# value 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 -# (i.e. any modern browser). Windows users are probably better off using the -# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can -# further fine-tune the look of the index. As an example, the default style -# sheet generated by doxygen has an example that shows how to put an image at -# the root of the tree instead of the PROJECT_NAME. Since the tree basically has -# the same information as the tab index, you could consider setting -# DISABLE_INDEX to YES when enabling this option. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_TREEVIEW = NO - -# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that -# doxygen will group on one line in the generated HTML documentation. -# -# Note that a value of 0 will completely suppress the enum values from appearing -# in the overview section. -# Minimum value: 0, maximum value: 20, default value: 4. -# This tag requires that the tag GENERATE_HTML is set to YES. - -ENUM_VALUES_PER_LINE = 4 - -# 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. -# Minimum value: 0, maximum value: 1500, default value: 250. -# This tag requires that the tag GENERATE_HTML is set to YES. - -TREEVIEW_WIDTH = 250 - -# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to -# external symbols imported via tag files in a separate window. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -EXT_LINKS_IN_WINDOW = NO - -# Use this tag to change the font size of LaTeX formulas included as images in -# the HTML documentation. When you change the font size after a successful -# doxygen run you need to manually remove any form_*.png images from the HTML -# output directory to force them to be regenerated. -# Minimum value: 8, maximum value: 50, default value: 10. -# This tag requires that the tag GENERATE_HTML is set to YES. - -FORMULA_FONTSIZE = 10 - -# Use the FORMULA_TRANPARENT tag to determine whether or not the images -# generated for formulas are transparent PNGs. Transparent PNGs are not -# supported properly for IE 6.0, but are supported on all modern browsers. -# -# Note that when changing this option you need to delete any form_*.png files in -# the HTML output directory before the changes have effect. -# The default value is: YES. -# This tag requires that the tag GENERATE_HTML is set to YES. - -FORMULA_TRANSPARENT = YES - -# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see -# http://www.mathjax.org) which uses client side Javascript for the rendering -# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX -# installed or if you want to formulas look prettier in the HTML output. When -# enabled you may also need to install MathJax separately and configure the path -# to it using the MATHJAX_RELPATH option. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -USE_MATHJAX = NO - -# When MathJax is enabled you can set the default output format to be used for -# the MathJax output. See the MathJax site (see: -# http://docs.mathjax.org/en/latest/output.html) for more details. -# Possible values are: HTML-CSS (which is slower, but has the best -# compatibility), NativeMML (i.e. MathML) and SVG. -# The default value is: HTML-CSS. -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_FORMAT = HTML-CSS - -# When MathJax is enabled you need to specify the location relative to the HTML -# output directory using the MATHJAX_RELPATH option. The destination directory -# should contain the MathJax.js script. For instance, if the mathjax directory -# is located at the same level as the HTML output directory, then -# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax -# Content Delivery Network so you can quickly see the result without installing -# MathJax. However, it is strongly recommended to install a local copy of -# MathJax from http://www.mathjax.org before deployment. -# The default value is: http://cdn.mathjax.org/mathjax/latest. -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest - -# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax -# extension names that should be enabled during MathJax rendering. For example -# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_EXTENSIONS = - -# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces -# of code that will be used on startup of the MathJax code. See the MathJax site -# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an -# example see the documentation. -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_CODEFILE = - -# When the SEARCHENGINE tag is enabled doxygen will generate a search box for -# the HTML output. The underlying search engine uses javascript and DHTML and -# should work on any modern browser. Note that when using HTML help -# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) -# there is already a search function so this one should typically be disabled. -# For large projects the javascript based search engine can be slow, then -# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to -# search using the keyboard; to jump to the search box use + S -# (what the is depends on the OS and browser, but it is typically -# , /