From 5d002cc66acad0e578b25b1c985b250015ea1ed5 Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Mon, 26 Aug 2019 13:44:38 +0200 Subject: [PATCH] Import Upstream version 1.0.9 --- COPYING | 848 +++++++++++----- ChangeLog | 95 ++ INSTALL | 5 +- Makefile.in | 25 +- NEWS | 17 + README | 6 +- THANKS | 1 + aclocal.m4 | 38 +- config.guess | 36 +- config.sub | 52 +- configure | 19 +- configure.in | 2 +- depcomp | 33 +- doc/Makefile.in | 4 +- doc/sample-config.tar.gz | Bin 1249 -> 1249 bytes doc/texinfo.tex | 2016 +++++++++++++++++++++++++++++++++----- doc/tinc.conf.5.in | 121 ++- doc/tinc.info | 348 ++++--- doc/tinc.texi | 148 ++- install-sh | 222 +++-- lib/Makefile.in | 19 +- m4/Makefile.in | 4 +- po/nl.gmo | Bin 32749 -> 32993 bytes po/nl.po | 176 ++-- po/tinc.pot | 168 ++-- src/Makefile.in | 17 +- src/bsd/device.c | 6 +- src/conf.c | 14 +- src/connection.c | 21 +- src/event.c | 4 +- src/event.h | 4 +- src/graph.c | 4 +- src/net.c | 4 +- src/net_setup.c | 6 +- src/net_socket.c | 27 +- src/process.c | 7 +- src/protocol_auth.c | 8 +- src/protocol_key.c | 16 +- src/route.c | 16 +- src/subnet.c | 24 +- src/tincd.c | 18 +- 41 files changed, 3389 insertions(+), 1210 deletions(-) diff --git a/COPYING b/COPYING index 623b625..94a9ed0 100644 --- a/COPYING +++ b/COPYING @@ -1,285 +1,626 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + 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 + Preamble - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to + 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 -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. +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 make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. + 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 give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. +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. - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. + 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. - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. + 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. - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. + 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. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". + TERMS AND CONDITIONS -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. + 0. Definitions. - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. + "This License" refers to version 3 of the GNU General Public License. -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: + "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. - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. + 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. - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. + A "covered work" means either the unmodified Program or a work based +on the Program. - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. + 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. -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. + 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. -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. + 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. - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: + 1. Source Code. - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, + 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. - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, + 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. - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) + The "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 source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. + 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. -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. + The Corresponding Source for a work in source code form is that +same work. - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to + 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. - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or + 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 -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. +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. -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. + 13. Use with the GNU Affero General Public License. -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. + 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. -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. + 14. Revised Versions of this License. - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will + 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 a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. + 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. - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. + 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. - NO WARRANTY + 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. - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. + 15. Disclaimer of Warranty. - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. + 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. - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs + 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 @@ -287,15 +628,15 @@ free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least +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 + This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + 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, @@ -304,37 +645,30 @@ the "copyright" line and a pointer to where the full notice is found. GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - + along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + 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, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. +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 your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: + 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 +. - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. + 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 69db917..a14b05e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,98 @@ +------------------------------------------------------------------------ +r1600 | guus | 2008-12-24 00:14:37 +0100 (wo, 24 dec 2008) | 3 lines + +Apply patch from Max Rijevski fixing a memory leak when closing connections. +It also cleans up more when stopping tinc, helping tools like valgrind. + +------------------------------------------------------------------------ +r1599 | guus | 2008-12-23 23:31:38 +0100 (di, 23 dec 2008) | 4 lines + +Handle broadcast and multicast packets in router mode. +Multicast packets are treated as broadcast packets. +Based on a patch from Max Rijevski. + +------------------------------------------------------------------------ +r1598 | guus | 2008-12-22 22:49:23 +0100 (ma, 22 dec 2008) | 2 lines + +Update the manpage as well, and some whitespace to make its source more legible. + +------------------------------------------------------------------------ +r1597 | guus | 2008-12-22 22:29:21 +0100 (ma, 22 dec 2008) | 5 lines + +Update documentation. +- TCPOnly is not experimental. +- Do not mention old Linux kernels and Ethertap anymore. +- Document the DeviceType, PMTU and PMTUDiscovery options. + +------------------------------------------------------------------------ +r1596 | guus | 2008-12-22 21:35:45 +0100 (ma, 22 dec 2008) | 2 lines + +Enable PMTU discovery by default. + +------------------------------------------------------------------------ +r1595 | guus | 2008-12-22 21:27:52 +0100 (ma, 22 dec 2008) | 2 lines + +Update copyright information. + +------------------------------------------------------------------------ +r1594 | guus | 2008-12-22 20:43:49 +0100 (ma, 22 dec 2008) | 2 lines + +Update Dutch translation. + +------------------------------------------------------------------------ +r1593 | guus | 2008-12-22 20:40:40 +0100 (ma, 22 dec 2008) | 4 lines + +Make sure IPv6 sockets are IPv6 only. +This will get rid of the "Can't bind to 0.0.0.0 port 655/tcp: Address already +in use" message on Linux. + +------------------------------------------------------------------------ +r1592 | guus | 2008-12-22 20:33:37 +0100 (ma, 22 dec 2008) | 2 lines + +Use TUNIFHEAD by default on FreeBSD to make sure IPv6 works. + +------------------------------------------------------------------------ +r1591 | guus | 2008-12-21 17:19:31 +0100 (zo, 21 dec 2008) | 3 lines + +Treat virtual network device as tap if Mode = switch or hub. +On OpenBSD, the link0 flag should still be set in tinc-up or by other means. + +------------------------------------------------------------------------ +r1579 | guus | 2008-12-05 15:17:39 +0100 (vr, 05 dec 2008) | 2 lines + +Correct debug message. + +------------------------------------------------------------------------ +r1578 | guus | 2008-11-18 16:11:27 +0100 (di, 18 nov 2008) | 2 lines + +Prevent freeing a NULL pointer when a hostname is unresolvable. + +------------------------------------------------------------------------ +r1577 | guus | 2008-10-25 21:54:00 +0200 (za, 25 okt 2008) | 2 lines + +Do not try to send REQ_KEY or ANS_KEY requests to unreachable nodes. + +------------------------------------------------------------------------ +r1576 | guus | 2008-10-25 20:10:08 +0200 (za, 25 okt 2008) | 2 lines + +Fix reading configuration files that do not end with a newline. + +------------------------------------------------------------------------ +r1575 | guus | 2007-12-14 22:17:08 +0100 (vr, 14 dec 2007) | 3 lines + +Make sure the prefixlength of subnets is sane. +Thanks to Sven-Haegar Koch for spotting the bug and providing a fix. + +------------------------------------------------------------------------ +r1555 | guus | 2007-08-18 00:09:00 +0200 (za, 18 aug 2007) | 2 lines + +Handle SERVICE_CONTROL_INTERROGATE requests. Thanks to Carsten Ralle for noticing this. + +------------------------------------------------------------------------ +r1511 | guus | 2007-05-16 19:16:09 +0200 (wo, 16 mei 2007) | 2 lines + +Releasing 1.0.8. + ------------------------------------------------------------------------ r1510 | guus | 2007-05-16 16:46:25 +0200 (wo, 16 mei 2007) | 2 lines diff --git a/INSTALL b/INSTALL index 5458714..d3c5b40 100644 --- a/INSTALL +++ b/INSTALL @@ -2,7 +2,7 @@ Installation Instructions ************************* Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, -2006 Free Software Foundation, Inc. +2006, 2007 Free Software Foundation, Inc. This file is free documentation; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. @@ -67,6 +67,9 @@ The simplest way to compile this package is: all sorts of other programs in order to regenerate files that came with the distribution. + 6. Often, you can also type `make uninstall' to remove the installed + files again. + Compilers and Options ===================== diff --git a/Makefile.in b/Makefile.in index 842e857..c854149 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. +# Makefile.in generated by automake 1.10.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -320,8 +320,8 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS @@ -346,8 +346,8 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ @@ -357,13 +357,12 @@ ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ - here=`pwd`; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique @@ -434,6 +433,10 @@ dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) +dist-lzma: distdir + tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma + $(am__remove_distdir) + dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) @@ -460,6 +463,8 @@ distcheck: dist GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ + *.tar.lzma*) \ + unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ @@ -610,7 +615,7 @@ uninstall-am: .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am am--refresh check check-am clean clean-generic \ ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \ - dist-shar dist-tarZ dist-zip distcheck distclean \ + dist-lzma dist-shar dist-tarZ dist-zip distcheck distclean \ distclean-generic distclean-hdr distclean-tags distcleancheck \ distdir distuninstallcheck dvi dvi-am html html-am info \ info-am install install-am install-data install-data-am \ diff --git a/NEWS b/NEWS index 1183ab7..736f5e6 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,20 @@ +Version 1.0.9 Dec 26 2008 + + * Fixed tinc as a service under Windows 2003. + + * Fixed reading configuration files that do not end with a newline. + + * Fixed crashes in situations where hostnames could not be resolved or hosts + would disconnect at the same time as session keys were exchanged. + + * Improved default settings of tun and tap devices on BSD platforms. + + * Make IPv6 sockets bind only to IPv6 on Linux. + + * Enable path MTU discovery by default. + + * Fixed a memory leak that occured when connections were closed. + Version 1.0.8 May 16 2007 * Fixed some memory and resource leaks. diff --git a/README b/README index 1f523d7..23b2458 100644 --- a/README +++ b/README @@ -1,7 +1,7 @@ -This is the README file for tinc version 1.0.8. Installation +This is the README file for tinc version 1.0.9. Installation instructions may be found in the INSTALL file. -tinc is Copyright (C) 1998-2007 by: +tinc is Copyright (C) 1998-2008 by: Ivo Timmermans, Guus Sliepen , @@ -55,7 +55,7 @@ should be changed into "Device", and "Device" should be changed into Compatibility ------------- -Version 1.0.8 is compatible with 1.0pre8, 1.0 and later, but not with older +Version 1.0.9 is compatible with 1.0pre8, 1.0 and later, but not with older versions of tinc. diff --git a/THANKS b/THANKS index cd99f2a..ce5ec13 100644 --- a/THANKS +++ b/THANKS @@ -21,6 +21,7 @@ We would like to thank the following people for their contributions to tinc: * Markus Goetz * Martin Kihlgren * Matias Carrasco +* Max Rijevski * Miles Nordin * Nick Patavalis * Paul Littlefield diff --git a/aclocal.m4 b/aclocal.m4 index 01e03bd..25cd12f 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,7 +1,7 @@ -# generated automatically by aclocal 1.10 -*- Autoconf -*- +# generated automatically by aclocal 1.10.1 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006 Free Software Foundation, Inc. +# 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -11,12 +11,15 @@ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. -m4_if(m4_PACKAGE_VERSION, [2.61],, -[m4_fatal([this file was generated for autoconf 2.61. -You have another version of autoconf. If you want to use that, -you should regenerate the build system entirely.], [63])]) +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +m4_if(AC_AUTOCONF_VERSION, [2.61],, +[m4_warning([this file was generated for autoconf 2.61. +You have another version of autoconf. It may work, but is not guaranteed to. +If you have problems, you may need to regenerate the build system entirely. +To do so, use the procedure documented by the package, typically `autoreconf'.])]) -# Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc. +# Copyright (C) 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -31,7 +34,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.10' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.10], [], +m4_if([$1], [1.10.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -47,8 +50,10 @@ m4_define([_AM_AUTOCONF_VERSION], []) # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.10])dnl -_AM_AUTOCONF_VERSION(m4_PACKAGE_VERSION)]) +[AM_AUTOMAKE_VERSION([1.10.1])dnl +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +_AM_AUTOCONF_VERSION(AC_AUTOCONF_VERSION)]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- @@ -320,7 +325,7 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. - if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue @@ -368,13 +373,13 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006 Free Software Foundation, Inc. +# 2005, 2006, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 12 +# serial 13 # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. @@ -479,16 +484,17 @@ AC_PROVIDE_IFELSE([AC_PROG_OBJC], # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. +_am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in - $1 | $1:* ) + $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done -echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) +echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # @@ -789,7 +795,7 @@ AC_SUBST([INSTALL_STRIP_PROGRAM])]) # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- -# Prevent Automake from outputing VARIABLE = @VARIABLE@ in Makefile.in. +# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) diff --git a/config.guess b/config.guess index 0f0fe71..f32079a 100755 --- a/config.guess +++ b/config.guess @@ -1,10 +1,10 @@ #! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, -# Inc. +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 +# Free Software Foundation, Inc. -timestamp='2007-03-06' +timestamp='2008-01-23' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -56,8 +56,8 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 -Free Software Foundation, Inc. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -330,7 +330,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; - i86pc:SunOS:5.*:*) + i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) @@ -532,7 +532,7 @@ EOF echo rs6000-ibm-aix3.2 fi exit ;; - *:AIX:*:[45]) + *:AIX:*:[456]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 @@ -793,12 +793,15 @@ EOF exit ;; *:Interix*:[3456]*) case ${UNAME_MACHINE} in - x86) + x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; EM64T | authenticamd) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; + IA64) + echo ia64-unknown-interix${UNAME_RELEASE} + exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks @@ -833,7 +836,14 @@ EOF echo ${UNAME_MACHINE}-pc-minix exit ;; arm*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + eval $set_cc_for_build + if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_EABI__ + then + echo ${UNAME_MACHINE}-unknown-linux-gnu + else + echo ${UNAME_MACHINE}-unknown-linux-gnueabi + fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu @@ -954,8 +964,8 @@ EOF x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit ;; - xtensa:Linux:*:*) - echo xtensa-unknown-linux-gnu + xtensa*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so @@ -1474,9 +1484,9 @@ This script, last modified $timestamp, has failed to recognize the operating system you are using. It is advised that you download the most up to date version of the config scripts from - http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess + http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD and - http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub + http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD If the version you run ($0) is already up to date, please send the following data and any information you think might be diff --git a/config.sub b/config.sub index 5defff6..6759825 100755 --- a/config.sub +++ b/config.sub @@ -1,10 +1,10 @@ #! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, -# Inc. +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 +# Free Software Foundation, Inc. -timestamp='2007-01-18' +timestamp='2008-01-16' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -72,8 +72,8 @@ Report bugs and patches to ." version="\ GNU config.sub ($timestamp) -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 -Free Software Foundation, Inc. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -369,10 +369,14 @@ case $basic_machine in | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ - | xstormy16-* | xtensa-* \ + | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-*) ;; + # Recognize the basic CPU types without company name, with glob match. + xtensa*) + basic_machine=$basic_machine-unknown + ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) @@ -443,6 +447,14 @@ case $basic_machine in basic_machine=ns32k-sequent os=-dynix ;; + blackfin) + basic_machine=bfin-unknown + os=-linux + ;; + blackfin-*) + basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; c90) basic_machine=c90-cray os=-unicos @@ -475,8 +487,8 @@ case $basic_machine in basic_machine=craynv-cray os=-unicosmp ;; - cr16c) - basic_machine=cr16c-unknown + cr16) + basic_machine=cr16-unknown os=-elf ;; crds | unos) @@ -668,6 +680,14 @@ case $basic_machine in basic_machine=m68k-isi os=-sysv ;; + m68knommu) + basic_machine=m68k-unknown + os=-linux + ;; + m68knommu-*) + basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; m88k-omron*) basic_machine=m88k-omron ;; @@ -683,6 +703,10 @@ case $basic_machine in basic_machine=i386-pc os=-mingw32 ;; + mingw32ce) + basic_machine=arm-unknown + os=-mingw32ce + ;; miniframe) basic_machine=m68000-convergent ;; @@ -809,6 +833,14 @@ case $basic_machine in basic_machine=i860-intel os=-osf ;; + parisc) + basic_machine=hppa-unknown + os=-linux + ;; + parisc-*) + basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; pbd) basic_machine=sparc-tti ;; @@ -1017,6 +1049,10 @@ case $basic_machine in basic_machine=tic6x-unknown os=-coff ;; + tile*) + basic_machine=tile-unknown + os=-linux-gnu + ;; tx39) basic_machine=mipstx39-unknown ;; diff --git a/configure b/configure index 0b2f01d..ba80ab2 100755 --- a/configure +++ b/configure @@ -2107,7 +2107,7 @@ fi # Define the identity of the package. PACKAGE=tinc - VERSION=1.0.8 + VERSION=1.0.9 cat >>confdefs.h <<_ACEOF @@ -12990,21 +12990,22 @@ echo "$as_me: $ac_file is unchanged" >&6;} fi rm -f "$tmp/out12" # Compute $ac_file's index in $config_headers. +_am_arg=$ac_file _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in - $ac_file | $ac_file:* ) + $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done -echo "timestamp for $ac_file" >`$as_dirname -- $ac_file || -$as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X$ac_file : 'X\(//\)[^/]' \| \ - X$ac_file : 'X\(//\)$' \| \ - X$ac_file : 'X\(/\)' \| . 2>/dev/null || -echo X$ac_file | +echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || +$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$_am_arg" : 'X\(//\)[^/]' \| \ + X"$_am_arg" : 'X\(//\)$' \| \ + X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || +echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -13150,7 +13151,7 @@ echo "$as_me: executing $ac_file commands" >&6;} # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. - if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ diff --git a/configure.in b/configure.in index 6396ce8..de70e02 100644 --- a/configure.in +++ b/configure.in @@ -5,7 +5,7 @@ dnl $Id: configure.in 1488 2006-12-16 16:53:58Z guus $ AC_PREREQ(2.61) AC_INIT AC_CONFIG_SRCDIR([src/tincd.c]) -AM_INIT_AUTOMAKE(tinc, 1.0.8) +AM_INIT_AUTOMAKE(tinc, 1.0.9) AC_CONFIG_HEADERS([config.h]) AM_MAINTAINER_MODE diff --git a/depcomp b/depcomp index ca5ea4e..e5f9736 100755 --- a/depcomp +++ b/depcomp @@ -1,9 +1,9 @@ #! /bin/sh # depcomp - compile a program generating dependencies as side-effects -scriptversion=2006-10-15.18 +scriptversion=2007-03-29.01 -# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006 Free Software +# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007 Free Software # Foundation, Inc. # This program is free software; you can redistribute it and/or modify @@ -215,34 +215,39 @@ aix) # current directory. Also, the AIX compiler puts `$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. - stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'` - tmpdepfile="$stripped.u" + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` + test "x$dir" = "x$object" && dir= + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then + tmpdepfile1=$dir$base.u + tmpdepfile2=$base.u + tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else + tmpdepfile1=$dir$base.u + tmpdepfile2=$dir$base.u + tmpdepfile3=$dir$base.u "$@" -M fi stat=$? - if test -f "$tmpdepfile"; then : - else - stripped=`echo "$stripped" | sed 's,^.*/,,'` - tmpdepfile="$stripped.u" - fi - if test $stat -eq 0; then : else - rm -f "$tmpdepfile" + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + do + test -f "$tmpdepfile" && break + done if test -f "$tmpdepfile"; then - outname="$stripped.o" # Each line is of the form `foo.o: dependent.h'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. - sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile" - sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile" + sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" + # That's a tab and a space in the []. + sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile diff --git a/doc/Makefile.in b/doc/Makefile.in index ba48e2b..edf7d78 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. +# Makefile.in generated by automake 1.10.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. diff --git a/doc/sample-config.tar.gz b/doc/sample-config.tar.gz index a67d4297b7392920765fdeb4d684298cca0b8dcb..db6e586d11a008bc75118c3e89d65029e47f3d76 100644 GIT binary patch delta 17 YcmaFJ`H+)CzMF%=m_5LABgah^051##_y7O^ delta 17 YcmaFJ`H+)CzMF%=UCP^SBgah^05Ajv7XSbN diff --git a/doc/texinfo.tex b/doc/texinfo.tex index 8083622..d2b264d 100644 --- a/doc/texinfo.tex +++ b/doc/texinfo.tex @@ -3,16 +3,16 @@ % Load plain if necessary, i.e., if running under initex. \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi % -\def\texinfoversion{2006-10-04.17} +\def\texinfoversion{2007-12-02.17} % -% Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, -% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free -% Software Foundation, Inc. +% Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, 2007, +% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, +% 2007 Free Software Foundation, Inc. % -% This texinfo.tex file is free software; you can redistribute it and/or +% This texinfo.tex file is free software: you can redistribute it and/or % modify it under the terms of the GNU General Public License as -% published by the Free Software Foundation; either version 2, or (at -% your option) any later version. +% published by the Free Software Foundation, either version 3 of the +% License, or (at your option) any later version. % % This texinfo.tex file is distributed in the hope that it will be % useful, but WITHOUT ANY WARRANTY; without even the implied warranty @@ -20,9 +20,7 @@ % General Public License for more details. % % You should have received a copy of the GNU General Public License -% along with this texinfo.tex file; see the file COPYING. If not, write -% to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -% Boston, MA 02110-1301, USA. +% along with this program. If not, see . % % As a special exception, when this file is read by TeX when processing % a Texinfo source document, you may use the result without @@ -67,7 +65,7 @@ \everyjob{\message{[Texinfo version \texinfoversion]}% \catcode`+=\active \catcode`\_=\active} -\message{Basics,} + \chardef\other=12 % We never want plain's \outer definition of \+ in Texinfo. @@ -279,6 +277,50 @@ \newdimen\cornerthick \cornerthick=.3pt \newdimen\topandbottommargin \topandbottommargin=.75in +% Output a mark which sets \thischapter, \thissection and \thiscolor. +% We dump everything together because we only have one kind of mark. +% This works because we only use \botmark / \topmark, not \firstmark. +% +% A mark contains a subexpression of the \ifcase ... \fi construct. +% \get*marks macros below extract the needed part using \ifcase. +% +% Another complication is to let the user choose whether \thischapter +% (\thissection) refers to the chapter (section) in effect at the top +% of a page, or that at the bottom of a page. The solution is +% described on page 260 of The TeXbook. It involves outputting two +% marks for the sectioning macros, one before the section break, and +% one after. I won't pretend I can describe this better than DEK... +\def\domark{% + \toks0=\expandafter{\lastchapterdefs}% + \toks2=\expandafter{\lastsectiondefs}% + \toks4=\expandafter{\prevchapterdefs}% + \toks6=\expandafter{\prevsectiondefs}% + \toks8=\expandafter{\lastcolordefs}% + \mark{% + \the\toks0 \the\toks2 + \noexpand\or \the\toks4 \the\toks6 + \noexpand\else \the\toks8 + }% +} +% \topmark doesn't work for the very first chapter (after the title +% page or the contents), so we use \firstmark there -- this gets us +% the mark with the chapter defs, unless the user sneaks in, e.g., +% @setcolor (or @url, or @link, etc.) between @contents and the very +% first @chapter. +\def\gettopheadingmarks{% + \ifcase0\topmark\fi + \ifx\thischapter\empty \ifcase0\firstmark\fi \fi +} +\def\getbottomheadingmarks{\ifcase1\botmark\fi} +\def\getcolormarks{\ifcase2\topmark\fi} + +% Avoid "undefined control sequence" errors. +\def\lastchapterdefs{} +\def\lastsectiondefs{} +\def\prevchapterdefs{} +\def\prevsectiondefs{} +\def\lastcolordefs{} + % Main output routine. \chardef\PAGE = 255 \output = {\onepageout{\pagecontents\PAGE}} @@ -296,7 +338,9 @@ % % Do this outside of the \shipout so @code etc. will be expanded in % the headline as they should be, not taken literally (outputting ''code). + \ifodd\pageno \getoddheadingmarks \else \getevenheadingmarks \fi \setbox\headlinebox = \vbox{\let\hsize=\pagewidth \makeheadline}% + \ifodd\pageno \getoddfootingmarks \else \getevenfootingmarks \fi \setbox\footlinebox = \vbox{\let\hsize=\pagewidth \makefootline}% % {% @@ -375,7 +419,7 @@ % marginal hacks, juha@viisa.uucp (Juha Takala) \ifvoid\margin\else % marginal info is present \rlap{\kern\hsize\vbox to\z@{\kern1pt\box\margin \vss}}\fi -\dimen@=\dp#1 \unvbox#1 +\dimen@=\dp#1\relax \unvbox#1\relax \ifvoid\footins\else\vskip\skip\footins\footnoterule \unvbox\footins\fi \ifr@ggedbottom \kern-\dimen@ \vfil \fi} } @@ -1225,8 +1269,9 @@ where each line of input produces a line of output.} % To handle parens, we must adopt a different approach, since parens are % not active characters. hyperref.dtx (which has the same problem as -% us) handles it with this amazing macro to replace tokens. I've -% tinkered with it a little for texinfo, but it's definitely from there. +% us) handles it with this amazing macro to replace tokens, with minor +% changes for Texinfo. It is included here under the GPL by permission +% from the author, Heiko Oberdiek. % % #1 is the tokens to replace. % #2 is the replacement. @@ -1255,13 +1300,83 @@ where each line of input produces a line of output.} \HyPsdSubst{)}{\realbackslash)}{#1}% } +\newhelp\nopdfimagehelp{Texinfo supports .png, .jpg, .jpeg, and .pdf images +with PDF output, and none of those formats could be found. (.eps cannot +be supported due to the design of the PDF format; use regular TeX (DVI +output) for that.)} + \ifpdf - \input pdfcolor - \pdfcatalog{/PageMode /UseOutlines}% + % + % Color manipulation macros based on pdfcolor.tex. + \def\cmykDarkRed{0.28 1 1 0.35} + \def\cmykBlack{0 0 0 1} + % + \def\pdfsetcolor#1{\pdfliteral{#1 k}} + % Set color, and create a mark which defines \thiscolor accordingly, + % so that \makeheadline knows which color to restore. + \def\setcolor#1{% + \xdef\lastcolordefs{\gdef\noexpand\thiscolor{#1}}% + \domark + \pdfsetcolor{#1}% + } + % + \def\maincolor{\cmykBlack} + \pdfsetcolor{\maincolor} + \edef\thiscolor{\maincolor} + \def\lastcolordefs{} + % + \def\makefootline{% + \baselineskip24pt + \line{\pdfsetcolor{\maincolor}\the\footline}% + } + % + \def\makeheadline{% + \vbox to 0pt{% + \vskip-22.5pt + \line{% + \vbox to8.5pt{}% + % Extract \thiscolor definition from the marks. + \getcolormarks + % Typeset the headline with \maincolor, then restore the color. + \pdfsetcolor{\maincolor}\the\headline\pdfsetcolor{\thiscolor}% + }% + \vss + }% + \nointerlineskip + } + % + % + \pdfcatalog{/PageMode /UseOutlines} + % % #1 is image name, #2 width (might be empty/whitespace), #3 height (ditto). \def\dopdfimage#1#2#3{% \def\imagewidth{#2}\setbox0 = \hbox{\ignorespaces #2}% \def\imageheight{#3}\setbox2 = \hbox{\ignorespaces #3}% + % + % pdftex (and the PDF format) support .png, .jpg, .pdf (among + % others). Let's try in that order. + \let\pdfimgext=\empty + \begingroup + \openin 1 #1.png \ifeof 1 + \openin 1 #1.jpg \ifeof 1 + \openin 1 #1.jpeg \ifeof 1 + \openin 1 #1.JPG \ifeof 1 + \openin 1 #1.pdf \ifeof 1 + \errhelp = \nopdfimagehelp + \errmessage{Could not find image file #1 for pdf}% + \else \gdef\pdfimgext{pdf}% + \fi + \else \gdef\pdfimgext{JPG}% + \fi + \else \gdef\pdfimgext{jpeg}% + \fi + \else \gdef\pdfimgext{jpg}% + \fi + \else \gdef\pdfimgext{png}% + \fi + \closein 1 + \endgroup + % % without \immediate, pdftex seg faults when the same image is % included twice. (Version 3.14159-pre-1.0-unofficial-20010704.) \ifnum\pdftexversion < 14 @@ -1272,28 +1387,35 @@ where each line of input produces a line of output.} \ifdim \wd0 >0pt width \imagewidth \fi \ifdim \wd2 >0pt height \imageheight \fi \ifnum\pdftexversion<13 - #1.pdf% + #1.\pdfimgext \else - {#1.pdf}% + {#1.\pdfimgext}% \fi \ifnum\pdftexversion < 14 \else \pdfrefximage \pdflastximage \fi} + % \def\pdfmkdest#1{{% % We have to set dummies so commands such as @code, and characters % such as \, aren't expanded when present in a section title. - \atdummies + \indexnofonts + \turnoffactive \activebackslashdouble + \makevalueexpandable \def\pdfdestname{#1}% \backslashparens\pdfdestname - \pdfdest name{\pdfdestname} xyz% - }}% + \safewhatsit{\pdfdest name{\pdfdestname} xyz}% + }} % % used to mark target names; must be expandable. - \def\pdfmkpgn#1{#1}% + \def\pdfmkpgn#1{#1} + % + % by default, use a color that is dark enough to print on paper as + % nearly black, but still distinguishable for online viewing. + \def\urlcolor{\cmykDarkRed} + \def\linkcolor{\cmykDarkRed} + \def\endlink{\setcolor{\maincolor}\pdfendlink} % - \let\linkcolor = \Blue % was Cyan, but that seems light? - \def\endlink{\Black\pdfendlink} % Adding outlines to PDF; macros for calculating structure of outlines % come from Petr Olsak \def\expnumber#1{\expandafter\ifx\csname#1\endcsname\relax 0% @@ -1395,7 +1517,7 @@ where each line of input produces a line of output.} \indexnofonts \setupdatafile \catcode`\\=\active \otherbackslash - \input \jobname.toc + \input \tocreadfilename \endgroup } % @@ -1425,7 +1547,7 @@ where each line of input produces a line of output.} \def\@{@}% \let\/=\empty \makevalueexpandable - \leavevmode\Red + \leavevmode\setcolor{\urlcolor}% \startlink attr{/Border [0 0 0]}% user{/Subtype /Link /A << /S /URI /URI (#1) >>}% \endgroup} @@ -1452,13 +1574,14 @@ where each line of input produces a line of output.} {\noexpand\pdflink{\the\toksC}}\toksC={}\global\countA=0} \def\pdflink#1{% \startlink attr{/Border [0 0 0]} goto name{\pdfmkpgn{#1}} - \linkcolor #1\endlink} + \setcolor{\linkcolor}#1\endlink} \def\done{\edef\st{\global\noexpand\toksA={\the\toksB}}\st} \else \let\pdfmkdest = \gobble \let\pdfurl = \gobble \let\endlink = \relax - \let\linkcolor = \relax + \let\setcolor = \gobble + \let\pdfsetcolor = \gobble \let\pdfmakeoutlines = \relax \fi % \ifx\pdfoutput @@ -1505,8 +1628,12 @@ where each line of input produces a line of output.} \def\strutheightpercent{.70833} \def\strutdepthpercent {.29167} % +% can get a sort of poor man's double spacing by redefining this. +\def\baselinefactor{1} +% \def\setleading#1{% - \normalbaselineskip = #1\relax + \dimen0 = #1\relax + \normalbaselineskip = \baselinefactor\dimen0 \normallineskip = \lineskipfactor\normalbaselineskip \normalbaselines \setbox\strutbox =\hbox{% @@ -1515,12 +1642,279 @@ where each line of input produces a line of output.} }% } +% PDF CMaps. See also LaTeX's t1.cmap. +% +% do nothing with this by default. +\expandafter\let\csname cmapOT1\endcsname\gobble +\expandafter\let\csname cmapOT1IT\endcsname\gobble +\expandafter\let\csname cmapOT1TT\endcsname\gobble + +% if we are producing pdf, and we have \pdffontattr, then define cmaps. +% (\pdffontattr was introduced many years ago, but people still run +% older pdftex's; it's easy to conditionalize, so we do.) +\ifpdf \ifx\pdffontattr\undefined \else + \begingroup + \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char. + \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%IncludeResource: ProcSet (CIDInit) +%%BeginResource: CMap (TeX-OT1-0) +%%Title: (TeX-OT1-0 TeX OT1 0) +%%Version: 1.000 +%%EndComments +/CIDInit /ProcSet findresource begin +12 dict begin +begincmap +/CIDSystemInfo +<< /Registry (TeX) +/Ordering (OT1) +/Supplement 0 +>> def +/CMapName /TeX-OT1-0 def +/CMapType 2 def +1 begincodespacerange +<00> <7F> +endcodespacerange +8 beginbfrange +<00> <01> <0393> +<09> <0A> <03A8> +<23> <26> <0023> +<28> <3B> <0028> +<3F> <5B> <003F> +<5D> <5E> <005D> +<61> <7A> <0061> +<7B> <7C> <2013> +endbfrange +40 beginbfchar +<02> <0398> +<03> <039B> +<04> <039E> +<05> <03A0> +<06> <03A3> +<07> <03D2> +<08> <03A6> +<0B> <00660066> +<0C> <00660069> +<0D> <0066006C> +<0E> <006600660069> +<0F> <00660066006C> +<10> <0131> +<11> <0237> +<12> <0060> +<13> <00B4> +<14> <02C7> +<15> <02D8> +<16> <00AF> +<17> <02DA> +<18> <00B8> +<19> <00DF> +<1A> <00E6> +<1B> <0153> +<1C> <00F8> +<1D> <00C6> +<1E> <0152> +<1F> <00D8> +<21> <0021> +<22> <201D> +<27> <2019> +<3C> <00A1> +<3D> <003D> +<3E> <00BF> +<5C> <201C> +<5F> <02D9> +<60> <2018> +<7D> <02DD> +<7E> <007E> +<7F> <00A8> +endbfchar +endcmap +CMapName currentdict /CMap defineresource pop +end +end +%%EndResource +%%EOF + }\endgroup + \expandafter\edef\csname cmapOT1\endcsname#1{% + \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}% + }% +% +% \cmapOT1IT + \begingroup + \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char. + \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%IncludeResource: ProcSet (CIDInit) +%%BeginResource: CMap (TeX-OT1IT-0) +%%Title: (TeX-OT1IT-0 TeX OT1IT 0) +%%Version: 1.000 +%%EndComments +/CIDInit /ProcSet findresource begin +12 dict begin +begincmap +/CIDSystemInfo +<< /Registry (TeX) +/Ordering (OT1IT) +/Supplement 0 +>> def +/CMapName /TeX-OT1IT-0 def +/CMapType 2 def +1 begincodespacerange +<00> <7F> +endcodespacerange +8 beginbfrange +<00> <01> <0393> +<09> <0A> <03A8> +<25> <26> <0025> +<28> <3B> <0028> +<3F> <5B> <003F> +<5D> <5E> <005D> +<61> <7A> <0061> +<7B> <7C> <2013> +endbfrange +42 beginbfchar +<02> <0398> +<03> <039B> +<04> <039E> +<05> <03A0> +<06> <03A3> +<07> <03D2> +<08> <03A6> +<0B> <00660066> +<0C> <00660069> +<0D> <0066006C> +<0E> <006600660069> +<0F> <00660066006C> +<10> <0131> +<11> <0237> +<12> <0060> +<13> <00B4> +<14> <02C7> +<15> <02D8> +<16> <00AF> +<17> <02DA> +<18> <00B8> +<19> <00DF> +<1A> <00E6> +<1B> <0153> +<1C> <00F8> +<1D> <00C6> +<1E> <0152> +<1F> <00D8> +<21> <0021> +<22> <201D> +<23> <0023> +<24> <00A3> +<27> <2019> +<3C> <00A1> +<3D> <003D> +<3E> <00BF> +<5C> <201C> +<5F> <02D9> +<60> <2018> +<7D> <02DD> +<7E> <007E> +<7F> <00A8> +endbfchar +endcmap +CMapName currentdict /CMap defineresource pop +end +end +%%EndResource +%%EOF + }\endgroup + \expandafter\edef\csname cmapOT1IT\endcsname#1{% + \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}% + }% +% +% \cmapOT1TT + \begingroup + \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char. + \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%IncludeResource: ProcSet (CIDInit) +%%BeginResource: CMap (TeX-OT1TT-0) +%%Title: (TeX-OT1TT-0 TeX OT1TT 0) +%%Version: 1.000 +%%EndComments +/CIDInit /ProcSet findresource begin +12 dict begin +begincmap +/CIDSystemInfo +<< /Registry (TeX) +/Ordering (OT1TT) +/Supplement 0 +>> def +/CMapName /TeX-OT1TT-0 def +/CMapType 2 def +1 begincodespacerange +<00> <7F> +endcodespacerange +5 beginbfrange +<00> <01> <0393> +<09> <0A> <03A8> +<21> <26> <0021> +<28> <5F> <0028> +<61> <7E> <0061> +endbfrange +32 beginbfchar +<02> <0398> +<03> <039B> +<04> <039E> +<05> <03A0> +<06> <03A3> +<07> <03D2> +<08> <03A6> +<0B> <2191> +<0C> <2193> +<0D> <0027> +<0E> <00A1> +<0F> <00BF> +<10> <0131> +<11> <0237> +<12> <0060> +<13> <00B4> +<14> <02C7> +<15> <02D8> +<16> <00AF> +<17> <02DA> +<18> <00B8> +<19> <00DF> +<1A> <00E6> +<1B> <0153> +<1C> <00F8> +<1D> <00C6> +<1E> <0152> +<1F> <00D8> +<20> <2423> +<27> <2019> +<60> <2018> +<7F> <00A8> +endbfchar +endcmap +CMapName currentdict /CMap defineresource pop +end +end +%%EndResource +%%EOF + }\endgroup + \expandafter\edef\csname cmapOT1TT\endcsname#1{% + \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}% + }% +\fi\fi + % Set the font macro #1 to the font named #2, adding on the % specified font prefix (normally `cm'). -% #3 is the font's design size, #4 is a scale factor -\def\setfont#1#2#3#4{\font#1=\fontprefix#2#3 scaled #4} - +% #3 is the font's design size, #4 is a scale factor, #5 is the CMap +% encoding (currently only OT1, OT1IT and OT1TT are allowed, pass +% empty to omit). +\def\setfont#1#2#3#4#5{% + \font#1=\fontprefix#2#3 scaled #4 + \csname cmap#5\endcsname#1% +} +% This is what gets called when #5 of \setfont is empty. +\let\cmap\gobble +% emacs-page end of cmaps % Use cm as the default font prefix. % To specify the font prefix, you must define \fontprefix @@ -1548,119 +1942,127 @@ where each line of input produces a line of output.} % Definitions for a main text size of 11pt. This is the default in % Texinfo. % -\def\definetextfontsizexi{ +\def\definetextfontsizexi{% % Text fonts (11.2pt, magstep1). \def\textnominalsize{11pt} \edef\mainmagstep{\magstephalf} -\setfont\textrm\rmshape{10}{\mainmagstep} -\setfont\texttt\ttshape{10}{\mainmagstep} -\setfont\textbf\bfshape{10}{\mainmagstep} -\setfont\textit\itshape{10}{\mainmagstep} -\setfont\textsl\slshape{10}{\mainmagstep} -\setfont\textsf\sfshape{10}{\mainmagstep} -\setfont\textsc\scshape{10}{\mainmagstep} -\setfont\textttsl\ttslshape{10}{\mainmagstep} +\setfont\textrm\rmshape{10}{\mainmagstep}{OT1} +\setfont\texttt\ttshape{10}{\mainmagstep}{OT1TT} +\setfont\textbf\bfshape{10}{\mainmagstep}{OT1} +\setfont\textit\itshape{10}{\mainmagstep}{OT1IT} +\setfont\textsl\slshape{10}{\mainmagstep}{OT1} +\setfont\textsf\sfshape{10}{\mainmagstep}{OT1} +\setfont\textsc\scshape{10}{\mainmagstep}{OT1} +\setfont\textttsl\ttslshape{10}{\mainmagstep}{OT1TT} \font\texti=cmmi10 scaled \mainmagstep \font\textsy=cmsy10 scaled \mainmagstep +\def\textecsize{1095} % A few fonts for @defun names and args. -\setfont\defbf\bfshape{10}{\magstep1} -\setfont\deftt\ttshape{10}{\magstep1} -\setfont\defttsl\ttslshape{10}{\magstep1} +\setfont\defbf\bfshape{10}{\magstep1}{OT1} +\setfont\deftt\ttshape{10}{\magstep1}{OT1TT} +\setfont\defttsl\ttslshape{10}{\magstep1}{OT1TT} \def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf} % Fonts for indices, footnotes, small examples (9pt). \def\smallnominalsize{9pt} -\setfont\smallrm\rmshape{9}{1000} -\setfont\smalltt\ttshape{9}{1000} -\setfont\smallbf\bfshape{10}{900} -\setfont\smallit\itshape{9}{1000} -\setfont\smallsl\slshape{9}{1000} -\setfont\smallsf\sfshape{9}{1000} -\setfont\smallsc\scshape{10}{900} -\setfont\smallttsl\ttslshape{10}{900} +\setfont\smallrm\rmshape{9}{1000}{OT1} +\setfont\smalltt\ttshape{9}{1000}{OT1TT} +\setfont\smallbf\bfshape{10}{900}{OT1} +\setfont\smallit\itshape{9}{1000}{OT1IT} +\setfont\smallsl\slshape{9}{1000}{OT1} +\setfont\smallsf\sfshape{9}{1000}{OT1} +\setfont\smallsc\scshape{10}{900}{OT1} +\setfont\smallttsl\ttslshape{10}{900}{OT1TT} \font\smalli=cmmi9 \font\smallsy=cmsy9 +\def\smallecsize{0900} % Fonts for small examples (8pt). \def\smallernominalsize{8pt} -\setfont\smallerrm\rmshape{8}{1000} -\setfont\smallertt\ttshape{8}{1000} -\setfont\smallerbf\bfshape{10}{800} -\setfont\smallerit\itshape{8}{1000} -\setfont\smallersl\slshape{8}{1000} -\setfont\smallersf\sfshape{8}{1000} -\setfont\smallersc\scshape{10}{800} -\setfont\smallerttsl\ttslshape{10}{800} +\setfont\smallerrm\rmshape{8}{1000}{OT1} +\setfont\smallertt\ttshape{8}{1000}{OT1TT} +\setfont\smallerbf\bfshape{10}{800}{OT1} +\setfont\smallerit\itshape{8}{1000}{OT1IT} +\setfont\smallersl\slshape{8}{1000}{OT1} +\setfont\smallersf\sfshape{8}{1000}{OT1} +\setfont\smallersc\scshape{10}{800}{OT1} +\setfont\smallerttsl\ttslshape{10}{800}{OT1TT} \font\smalleri=cmmi8 \font\smallersy=cmsy8 +\def\smallerecsize{0800} % Fonts for title page (20.4pt): \def\titlenominalsize{20pt} -\setfont\titlerm\rmbshape{12}{\magstep3} -\setfont\titleit\itbshape{10}{\magstep4} -\setfont\titlesl\slbshape{10}{\magstep4} -\setfont\titlett\ttbshape{12}{\magstep3} -\setfont\titlettsl\ttslshape{10}{\magstep4} -\setfont\titlesf\sfbshape{17}{\magstep1} +\setfont\titlerm\rmbshape{12}{\magstep3}{OT1} +\setfont\titleit\itbshape{10}{\magstep4}{OT1IT} +\setfont\titlesl\slbshape{10}{\magstep4}{OT1} +\setfont\titlett\ttbshape{12}{\magstep3}{OT1TT} +\setfont\titlettsl\ttslshape{10}{\magstep4}{OT1TT} +\setfont\titlesf\sfbshape{17}{\magstep1}{OT1} \let\titlebf=\titlerm -\setfont\titlesc\scbshape{10}{\magstep4} +\setfont\titlesc\scbshape{10}{\magstep4}{OT1} \font\titlei=cmmi12 scaled \magstep3 \font\titlesy=cmsy10 scaled \magstep4 \def\authorrm{\secrm} \def\authortt{\sectt} +\def\titleecsize{2074} % Chapter (and unnumbered) fonts (17.28pt). \def\chapnominalsize{17pt} -\setfont\chaprm\rmbshape{12}{\magstep2} -\setfont\chapit\itbshape{10}{\magstep3} -\setfont\chapsl\slbshape{10}{\magstep3} -\setfont\chaptt\ttbshape{12}{\magstep2} -\setfont\chapttsl\ttslshape{10}{\magstep3} -\setfont\chapsf\sfbshape{17}{1000} +\setfont\chaprm\rmbshape{12}{\magstep2}{OT1} +\setfont\chapit\itbshape{10}{\magstep3}{OT1IT} +\setfont\chapsl\slbshape{10}{\magstep3}{OT1} +\setfont\chaptt\ttbshape{12}{\magstep2}{OT1TT} +\setfont\chapttsl\ttslshape{10}{\magstep3}{OT1TT} +\setfont\chapsf\sfbshape{17}{1000}{OT1} \let\chapbf=\chaprm -\setfont\chapsc\scbshape{10}{\magstep3} +\setfont\chapsc\scbshape{10}{\magstep3}{OT1} \font\chapi=cmmi12 scaled \magstep2 \font\chapsy=cmsy10 scaled \magstep3 +\def\chapecsize{1728} % Section fonts (14.4pt). \def\secnominalsize{14pt} -\setfont\secrm\rmbshape{12}{\magstep1} -\setfont\secit\itbshape{10}{\magstep2} -\setfont\secsl\slbshape{10}{\magstep2} -\setfont\sectt\ttbshape{12}{\magstep1} -\setfont\secttsl\ttslshape{10}{\magstep2} -\setfont\secsf\sfbshape{12}{\magstep1} +\setfont\secrm\rmbshape{12}{\magstep1}{OT1} +\setfont\secit\itbshape{10}{\magstep2}{OT1IT} +\setfont\secsl\slbshape{10}{\magstep2}{OT1} +\setfont\sectt\ttbshape{12}{\magstep1}{OT1TT} +\setfont\secttsl\ttslshape{10}{\magstep2}{OT1TT} +\setfont\secsf\sfbshape{12}{\magstep1}{OT1} \let\secbf\secrm -\setfont\secsc\scbshape{10}{\magstep2} +\setfont\secsc\scbshape{10}{\magstep2}{OT1} \font\seci=cmmi12 scaled \magstep1 \font\secsy=cmsy10 scaled \magstep2 +\def\sececsize{1440} % Subsection fonts (13.15pt). \def\ssecnominalsize{13pt} -\setfont\ssecrm\rmbshape{12}{\magstephalf} -\setfont\ssecit\itbshape{10}{1315} -\setfont\ssecsl\slbshape{10}{1315} -\setfont\ssectt\ttbshape{12}{\magstephalf} -\setfont\ssecttsl\ttslshape{10}{1315} -\setfont\ssecsf\sfbshape{12}{\magstephalf} +\setfont\ssecrm\rmbshape{12}{\magstephalf}{OT1} +\setfont\ssecit\itbshape{10}{1315}{OT1IT} +\setfont\ssecsl\slbshape{10}{1315}{OT1} +\setfont\ssectt\ttbshape{12}{\magstephalf}{OT1TT} +\setfont\ssecttsl\ttslshape{10}{1315}{OT1TT} +\setfont\ssecsf\sfbshape{12}{\magstephalf}{OT1} \let\ssecbf\ssecrm -\setfont\ssecsc\scbshape{10}{1315} +\setfont\ssecsc\scbshape{10}{1315}{OT1} \font\sseci=cmmi12 scaled \magstephalf \font\ssecsy=cmsy10 scaled 1315 +\def\ssececsize{1200} % Reduced fonts for @acro in text (10pt). \def\reducednominalsize{10pt} -\setfont\reducedrm\rmshape{10}{1000} -\setfont\reducedtt\ttshape{10}{1000} -\setfont\reducedbf\bfshape{10}{1000} -\setfont\reducedit\itshape{10}{1000} -\setfont\reducedsl\slshape{10}{1000} -\setfont\reducedsf\sfshape{10}{1000} -\setfont\reducedsc\scshape{10}{1000} -\setfont\reducedttsl\ttslshape{10}{1000} +\setfont\reducedrm\rmshape{10}{1000}{OT1} +\setfont\reducedtt\ttshape{10}{1000}{OT1TT} +\setfont\reducedbf\bfshape{10}{1000}{OT1} +\setfont\reducedit\itshape{10}{1000}{OT1IT} +\setfont\reducedsl\slshape{10}{1000}{OT1} +\setfont\reducedsf\sfshape{10}{1000}{OT1} +\setfont\reducedsc\scshape{10}{1000}{OT1} +\setfont\reducedttsl\ttslshape{10}{1000}{OT1TT} \font\reducedi=cmmi10 \font\reducedsy=cmsy10 +\def\reducedecsize{1000} % reset the current fonts \textfonts @@ -1677,115 +2079,123 @@ where each line of input produces a line of output.} % Text fonts (10pt). \def\textnominalsize{10pt} \edef\mainmagstep{1000} -\setfont\textrm\rmshape{10}{\mainmagstep} -\setfont\texttt\ttshape{10}{\mainmagstep} -\setfont\textbf\bfshape{10}{\mainmagstep} -\setfont\textit\itshape{10}{\mainmagstep} -\setfont\textsl\slshape{10}{\mainmagstep} -\setfont\textsf\sfshape{10}{\mainmagstep} -\setfont\textsc\scshape{10}{\mainmagstep} -\setfont\textttsl\ttslshape{10}{\mainmagstep} +\setfont\textrm\rmshape{10}{\mainmagstep}{OT1} +\setfont\texttt\ttshape{10}{\mainmagstep}{OT1TT} +\setfont\textbf\bfshape{10}{\mainmagstep}{OT1} +\setfont\textit\itshape{10}{\mainmagstep}{OT1IT} +\setfont\textsl\slshape{10}{\mainmagstep}{OT1} +\setfont\textsf\sfshape{10}{\mainmagstep}{OT1} +\setfont\textsc\scshape{10}{\mainmagstep}{OT1} +\setfont\textttsl\ttslshape{10}{\mainmagstep}{OT1TT} \font\texti=cmmi10 scaled \mainmagstep \font\textsy=cmsy10 scaled \mainmagstep +\def\textecsize{1000} % A few fonts for @defun names and args. -\setfont\defbf\bfshape{10}{\magstephalf} -\setfont\deftt\ttshape{10}{\magstephalf} -\setfont\defttsl\ttslshape{10}{\magstephalf} +\setfont\defbf\bfshape{10}{\magstephalf}{OT1} +\setfont\deftt\ttshape{10}{\magstephalf}{OT1TT} +\setfont\defttsl\ttslshape{10}{\magstephalf}{OT1TT} \def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf} % Fonts for indices, footnotes, small examples (9pt). \def\smallnominalsize{9pt} -\setfont\smallrm\rmshape{9}{1000} -\setfont\smalltt\ttshape{9}{1000} -\setfont\smallbf\bfshape{10}{900} -\setfont\smallit\itshape{9}{1000} -\setfont\smallsl\slshape{9}{1000} -\setfont\smallsf\sfshape{9}{1000} -\setfont\smallsc\scshape{10}{900} -\setfont\smallttsl\ttslshape{10}{900} +\setfont\smallrm\rmshape{9}{1000}{OT1} +\setfont\smalltt\ttshape{9}{1000}{OT1TT} +\setfont\smallbf\bfshape{10}{900}{OT1} +\setfont\smallit\itshape{9}{1000}{OT1IT} +\setfont\smallsl\slshape{9}{1000}{OT1} +\setfont\smallsf\sfshape{9}{1000}{OT1} +\setfont\smallsc\scshape{10}{900}{OT1} +\setfont\smallttsl\ttslshape{10}{900}{OT1TT} \font\smalli=cmmi9 \font\smallsy=cmsy9 +\def\smallecsize{0900} % Fonts for small examples (8pt). \def\smallernominalsize{8pt} -\setfont\smallerrm\rmshape{8}{1000} -\setfont\smallertt\ttshape{8}{1000} -\setfont\smallerbf\bfshape{10}{800} -\setfont\smallerit\itshape{8}{1000} -\setfont\smallersl\slshape{8}{1000} -\setfont\smallersf\sfshape{8}{1000} -\setfont\smallersc\scshape{10}{800} -\setfont\smallerttsl\ttslshape{10}{800} +\setfont\smallerrm\rmshape{8}{1000}{OT1} +\setfont\smallertt\ttshape{8}{1000}{OT1TT} +\setfont\smallerbf\bfshape{10}{800}{OT1} +\setfont\smallerit\itshape{8}{1000}{OT1IT} +\setfont\smallersl\slshape{8}{1000}{OT1} +\setfont\smallersf\sfshape{8}{1000}{OT1} +\setfont\smallersc\scshape{10}{800}{OT1} +\setfont\smallerttsl\ttslshape{10}{800}{OT1TT} \font\smalleri=cmmi8 \font\smallersy=cmsy8 +\def\smallerecsize{0800} % Fonts for title page (20.4pt): \def\titlenominalsize{20pt} -\setfont\titlerm\rmbshape{12}{\magstep3} -\setfont\titleit\itbshape{10}{\magstep4} -\setfont\titlesl\slbshape{10}{\magstep4} -\setfont\titlett\ttbshape{12}{\magstep3} -\setfont\titlettsl\ttslshape{10}{\magstep4} -\setfont\titlesf\sfbshape{17}{\magstep1} +\setfont\titlerm\rmbshape{12}{\magstep3}{OT1} +\setfont\titleit\itbshape{10}{\magstep4}{OT1IT} +\setfont\titlesl\slbshape{10}{\magstep4}{OT1} +\setfont\titlett\ttbshape{12}{\magstep3}{OT1TT} +\setfont\titlettsl\ttslshape{10}{\magstep4}{OT1TT} +\setfont\titlesf\sfbshape{17}{\magstep1}{OT1} \let\titlebf=\titlerm -\setfont\titlesc\scbshape{10}{\magstep4} +\setfont\titlesc\scbshape{10}{\magstep4}{OT1} \font\titlei=cmmi12 scaled \magstep3 \font\titlesy=cmsy10 scaled \magstep4 \def\authorrm{\secrm} \def\authortt{\sectt} +\def\titleecsize{2074} % Chapter fonts (14.4pt). \def\chapnominalsize{14pt} -\setfont\chaprm\rmbshape{12}{\magstep1} -\setfont\chapit\itbshape{10}{\magstep2} -\setfont\chapsl\slbshape{10}{\magstep2} -\setfont\chaptt\ttbshape{12}{\magstep1} -\setfont\chapttsl\ttslshape{10}{\magstep2} -\setfont\chapsf\sfbshape{12}{\magstep1} +\setfont\chaprm\rmbshape{12}{\magstep1}{OT1} +\setfont\chapit\itbshape{10}{\magstep2}{OT1IT} +\setfont\chapsl\slbshape{10}{\magstep2}{OT1} +\setfont\chaptt\ttbshape{12}{\magstep1}{OT1TT} +\setfont\chapttsl\ttslshape{10}{\magstep2}{OT1TT} +\setfont\chapsf\sfbshape{12}{\magstep1}{OT1} \let\chapbf\chaprm -\setfont\chapsc\scbshape{10}{\magstep2} +\setfont\chapsc\scbshape{10}{\magstep2}{OT1} \font\chapi=cmmi12 scaled \magstep1 \font\chapsy=cmsy10 scaled \magstep2 +\def\chapecsize{1440} % Section fonts (12pt). \def\secnominalsize{12pt} -\setfont\secrm\rmbshape{12}{1000} -\setfont\secit\itbshape{10}{\magstep1} -\setfont\secsl\slbshape{10}{\magstep1} -\setfont\sectt\ttbshape{12}{1000} -\setfont\secttsl\ttslshape{10}{\magstep1} -\setfont\secsf\sfbshape{12}{1000} +\setfont\secrm\rmbshape{12}{1000}{OT1} +\setfont\secit\itbshape{10}{\magstep1}{OT1IT} +\setfont\secsl\slbshape{10}{\magstep1}{OT1} +\setfont\sectt\ttbshape{12}{1000}{OT1TT} +\setfont\secttsl\ttslshape{10}{\magstep1}{OT1TT} +\setfont\secsf\sfbshape{12}{1000}{OT1} \let\secbf\secrm -\setfont\secsc\scbshape{10}{\magstep1} +\setfont\secsc\scbshape{10}{\magstep1}{OT1} \font\seci=cmmi12 \font\secsy=cmsy10 scaled \magstep1 +\def\sececsize{1200} % Subsection fonts (10pt). \def\ssecnominalsize{10pt} -\setfont\ssecrm\rmbshape{10}{1000} -\setfont\ssecit\itbshape{10}{1000} -\setfont\ssecsl\slbshape{10}{1000} -\setfont\ssectt\ttbshape{10}{1000} -\setfont\ssecttsl\ttslshape{10}{1000} -\setfont\ssecsf\sfbshape{10}{1000} +\setfont\ssecrm\rmbshape{10}{1000}{OT1} +\setfont\ssecit\itbshape{10}{1000}{OT1IT} +\setfont\ssecsl\slbshape{10}{1000}{OT1} +\setfont\ssectt\ttbshape{10}{1000}{OT1TT} +\setfont\ssecttsl\ttslshape{10}{1000}{OT1TT} +\setfont\ssecsf\sfbshape{10}{1000}{OT1} \let\ssecbf\ssecrm -\setfont\ssecsc\scbshape{10}{1000} +\setfont\ssecsc\scbshape{10}{1000}{OT1} \font\sseci=cmmi10 \font\ssecsy=cmsy10 +\def\ssececsize{1000} % Reduced fonts for @acro in text (9pt). \def\reducednominalsize{9pt} -\setfont\reducedrm\rmshape{9}{1000} -\setfont\reducedtt\ttshape{9}{1000} -\setfont\reducedbf\bfshape{10}{900} -\setfont\reducedit\itshape{9}{1000} -\setfont\reducedsl\slshape{9}{1000} -\setfont\reducedsf\sfshape{9}{1000} -\setfont\reducedsc\scshape{10}{900} -\setfont\reducedttsl\ttslshape{10}{900} +\setfont\reducedrm\rmshape{9}{1000}{OT1} +\setfont\reducedtt\ttshape{9}{1000}{OT1TT} +\setfont\reducedbf\bfshape{10}{900}{OT1} +\setfont\reducedit\itshape{9}{1000}{OT1IT} +\setfont\reducedsl\slshape{9}{1000}{OT1} +\setfont\reducedsf\sfshape{9}{1000}{OT1} +\setfont\reducedsc\scshape{10}{900}{OT1} +\setfont\reducedttsl\ttslshape{10}{900}{OT1TT} \font\reducedi=cmmi9 \font\reducedsy=cmsy9 +\def\reducedecsize{0900} % reduce space between paragraphs \divide\parskip by 2 @@ -1941,10 +2351,10 @@ where each line of input produces a line of output.} \newcount\fontdepth \fontdepth=0 % Fonts for short table of contents. -\setfont\shortcontrm\rmshape{12}{1000} -\setfont\shortcontbf\bfshape{10}{\magstep1} % no cmb12 -\setfont\shortcontsl\slshape{12}{1000} -\setfont\shortconttt\ttshape{12}{1000} +\setfont\shortcontrm\rmshape{12}{1000}{OT1} +\setfont\shortcontbf\bfshape{10}{\magstep1}{OT1} % no cmb12 +\setfont\shortcontsl\slshape{12}{1000}{OT1} +\setfont\shortconttt\ttshape{12}{1000}{OT1TT} %% Add scribe-like font environments, plus @l for inline lisp (usually sans %% serif) and @ii for TeX italic @@ -2007,7 +2417,7 @@ where each line of input produces a line of output.} \null } \def\samp#1{`\tclose{#1}'\null} -\setfont\keyrm\rmshape{8}{1000} +\setfont\keyrm\rmshape{8}{1000}{OT1} \font\keysy=cmsy9 \def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{% \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{% @@ -2015,6 +2425,7 @@ where each line of input produces a line of output.} \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}% \kern-0.4pt\hrule}% \kern-.06em\raise0.4pt\hbox{\angleright}}}} +\def\key #1{{\nohyphenation \uppercase{#1}}\null} % The old definition, with no lozenge: %\def\key #1{{\ttsl \nohyphenation \uppercase{#1}}\null} \def\ctrl #1{{\tt \rawbackslash \hat}#1} @@ -2299,6 +2710,35 @@ where each line of input produces a line of output.} \thiseurofont } +% Hacks for glyphs from the EC fonts similar to \euro. We don't +% use \let for the aliases, because sometimes we redefine the original +% macro, and the alias should reflect the redefinition. +\def\guillemetleft{{\ecfont \char"13}} +\def\guillemotleft{\guillemetleft} +\def\guillemetright{{\ecfont \char"14}} +\def\guillemotright{\guillemetright} +\def\guilsinglleft{{\ecfont \char"0E}} +\def\guilsinglright{{\ecfont \char"0F}} +\def\quotedblbase{{\ecfont \char"12}} +\def\quotesinglbase{{\ecfont \char"0D}} +% +\def\ecfont{% + % We can't distinguish serif/sanserif and italic/slanted, but this + % is used for crude hacks anyway (like adding French and German + % quotes to documents typeset with CM, where we lose kerning), so + % hopefully nobody will notice/care. + \edef\ecsize{\csname\curfontsize ecsize\endcsname}% + \edef\nominalsize{\csname\curfontsize nominalsize\endcsname}% + \ifx\curfontstyle\bfstylename + % bold: + \font\thisecfont = ecb\ifusingit{i}{x}\ecsize \space at \nominalsize + \else + % regular: + \font\thisecfont = ec\ifusingit{ti}{rm}\ecsize \space at \nominalsize + \fi + \thisecfont +} + % @registeredsymbol - R in a circle. The font for the R should really % be smaller yet, but lllsize is the best we can do for now. % Adapted from the plain.tex definition of \copyright. @@ -2321,6 +2761,12 @@ where each line of input produces a line of output.} \def\Orb{\mathhexbox20D} \fi +% Quotes. +\chardef\quotedblleft="5C +\chardef\quotedblright=`\" +\chardef\quoteleft=`\` +\chardef\quoteright=`\' + \message{page headings,} @@ -2490,6 +2936,33 @@ where each line of input produces a line of output.} \parseargdef\everyfooting{\oddfootingxxx{#1}\evenfootingxxx{#1}} +% @evenheadingmarks top \thischapter <- chapter at the top of a page +% @evenheadingmarks bottom \thischapter <- chapter at the bottom of a page +% +% The same set of arguments for: +% +% @oddheadingmarks +% @evenfootingmarks +% @oddfootingmarks +% @everyheadingmarks +% @everyfootingmarks + +\def\evenheadingmarks{\headingmarks{even}{heading}} +\def\oddheadingmarks{\headingmarks{odd}{heading}} +\def\evenfootingmarks{\headingmarks{even}{footing}} +\def\oddfootingmarks{\headingmarks{odd}{footing}} +\def\everyheadingmarks#1 {\headingmarks{even}{heading}{#1} + \headingmarks{odd}{heading}{#1} } +\def\everyfootingmarks#1 {\headingmarks{even}{footing}{#1} + \headingmarks{odd}{footing}{#1} } +% #1 = even/odd, #2 = heading/footing, #3 = top/bottom. +\def\headingmarks#1#2#3 {% + \expandafter\let\expandafter\temp \csname get#3headingmarks\endcsname + \global\expandafter\let\csname get#1#2marks\endcsname \temp +} + +\everyheadingmarks bottom +\everyfootingmarks bottom % @headings double turns headings on for double-sided printing. % @headings single turns headings on for single-sided printing. @@ -3530,11 +4003,21 @@ where each line of input produces a line of output.} \definedummyword\equiv \definedummyword\error \definedummyword\euro + \definedummyword\guillemetleft + \definedummyword\guillemetright + \definedummyword\guilsinglleft + \definedummyword\guilsinglright \definedummyword\expansion \definedummyword\minus \definedummyword\pounds \definedummyword\point \definedummyword\print + \definedummyword\quotedblbase + \definedummyword\quotedblleft + \definedummyword\quotedblright + \definedummyword\quoteleft + \definedummyword\quoteright + \definedummyword\quotesinglbase \definedummyword\result \definedummyword\textdegree % @@ -3664,11 +4147,21 @@ where each line of input produces a line of output.} \def\equiv{==}% \def\error{error}% \def\euro{euro}% + \def\guillemetleft{<<}% + \def\guillemetright{>>}% + \def\guilsinglleft{<}% + \def\guilsinglright{>}% \def\expansion{==>}% \def\minus{-}% \def\pounds{pounds}% \def\point{.}% \def\print{-|}% + \def\quotedblbase{"}% + \def\quotedblleft{"}% + \def\quotedblright{"}% + \def\quoteleft{`}% + \def\quoteright{'}% + \def\quotesinglbase{,}% \def\result{=>}% \def\textdegree{degrees}% % @@ -3710,11 +4203,7 @@ where each line of input produces a line of output.} % \edef\writeto{\csname#1indfile\endcsname}% % - \ifvmode - \dosubindsanitize - \else - \dosubindwrite - \fi + \safewhatsit\dosubindwrite }% \fi } @@ -3751,13 +4240,13 @@ where each line of input produces a line of output.} \temp } -% Take care of unwanted page breaks: +% Take care of unwanted page breaks/skips around a whatsit: % % If a skip is the last thing on the list now, preserve it % by backing up by \lastskip, doing the \write, then inserting % the skip again. Otherwise, the whatsit generated by the -% \write will make \lastskip zero. The result is that sequences -% like this: +% \write or \pdfdest will make \lastskip zero. The result is that +% sequences like this: % @end defun % @tindex whatever % @defun ... @@ -3781,25 +4270,31 @@ where each line of input produces a line of output.} % \edef\zeroskipmacro{\expandafter\the\csname z@skip\endcsname} % +\newskip\whatsitskip +\newcount\whatsitpenalty +% % ..., ready, GO: % -\def\dosubindsanitize{% +\def\safewhatsit#1{% +\ifhmode + #1% +\else % \lastskip and \lastpenalty cannot both be nonzero simultaneously. - \skip0 = \lastskip + \whatsitskip = \lastskip \edef\lastskipmacro{\the\lastskip}% - \count255 = \lastpenalty + \whatsitpenalty = \lastpenalty % % If \lastskip is nonzero, that means the last item was a % skip. And since a skip is discardable, that means this - % -\skip0 glue we're inserting is preceded by a + % -\whatsitskip glue we're inserting is preceded by a % non-discardable item, therefore it is not a potential % breakpoint, therefore no \nobreak needed. \ifx\lastskipmacro\zeroskipmacro \else - \vskip-\skip0 + \vskip-\whatsitskip \fi % - \dosubindwrite + #1% % \ifx\lastskipmacro\zeroskipmacro % If \lastskip was zero, perhaps the last item was a penalty, and @@ -3813,13 +4308,14 @@ where each line of input produces a line of output.} % Description. % would allow a break between the index-whatever whatsit % and the "Description." paragraph. - \ifnum\count255>9999 \penalty\count255 \fi + \ifnum\whatsitpenalty>9999 \penalty\whatsitpenalty \fi \else % On the other hand, if we had a nonzero \lastskip, % this make-up glue would be preceded by a non-discardable item % (the whatsit from the \write), so we must insert a \nobreak. - \nobreak\vskip\skip0 + \nobreak\vskip\whatsitskip \fi +\fi } % The index entry written in the file actually looks like @@ -3862,6 +4358,7 @@ where each line of input produces a line of output.} % \smallfonts \rm \tolerance = 9500 + \plainfrenchspacing \everypar = {}% don't want the \kern\-parindent from indentation suppression. % % See if the index file exists and is nonempty. @@ -3991,11 +4488,8 @@ where each line of input produces a line of output.} % The following is kludged to not output a line of dots in the index if % there are no page numbers. The next person who breaks this will be % cursed by a Unix daemon. - \def\tempa{{\rm }}% - \def\tempb{#1}% - \edef\tempc{\tempa}% - \edef\tempd{\tempb}% - \ifx\tempc\tempd + \setbox\boxA = \hbox{#1}% + \ifdim\wd\boxA = 0pt \ % \else % @@ -4131,6 +4625,34 @@ where each line of input produces a line of output.} % % All done with double columns. \def\enddoublecolumns{% + % The following penalty ensures that the page builder is exercised + % _before_ we change the output routine. This is necessary in the + % following situation: + % + % The last section of the index consists only of a single entry. + % Before this section, \pagetotal is less than \pagegoal, so no + % break occurs before the last section starts. However, the last + % section, consisting of \initial and the single \entry, does not + % fit on the page and has to be broken off. Without the following + % penalty the page builder will not be exercised until \eject + % below, and by that time we'll already have changed the output + % routine to the \balancecolumns version, so the next-to-last + % double-column page will be processed with \balancecolumns, which + % is wrong: The two columns will go to the main vertical list, with + % the broken-off section in the recent contributions. As soon as + % the output routine finishes, TeX starts reconsidering the page + % break. The two columns and the broken-off section both fit on the + % page, because the two columns now take up only half of the page + % goal. When TeX sees \eject from below which follows the final + % section, it invokes the new output routine that we've set after + % \balancecolumns below; \onepageout will try to fit the two columns + % and the final section into the vbox of \pageheight (see + % \pagebody), causing an overfull box. + % + % Note that glue won't work here, because glue does not exercise the + % page builder, unlike penalties (see The TeXbook, pp. 280-281). + \penalty0 + % \output = {% % Split the last of the double-column material. Leave it on the % current page, no automatic page break. @@ -4240,11 +4762,15 @@ where each line of input produces a line of output.} \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi} -% Each @chapter defines this as the name of the chapter. -% page headings and footings can use it. @section does likewise. -% However, they are not reliable, because we don't use marks. +% Each @chapter defines these (using marks) as the number+name, number +% and name of the chapter. Page headings and footings can use +% these. @section does likewise. \def\thischapter{} +\def\thischapternum{} +\def\thischaptername{} \def\thissection{} +\def\thissectionnum{} +\def\thissectionname{} \newcount\absseclevel % used to calculate proper heading level \newcount\secbase\secbase=0 % @raisesections/@lowersections modify this count @@ -4545,7 +5071,20 @@ where each line of input produces a line of output.} \def\chapbreak{\dobreak \chapheadingskip {-4000}} \def\chappager{\par\vfill\supereject} -\def\chapoddpage{\chappager \ifodd\pageno \else \hbox to 0pt{} \chappager\fi} +% Because \domark is called before \chapoddpage, the filler page will +% get the headings for the next chapter, which is wrong. But we don't +% care -- we just disable all headings on the filler page. +\def\chapoddpage{% + \chappager + \ifodd\pageno \else + \begingroup + \evenheadline={\hfil}\evenfootline={\hfil}% + \oddheadline={\hfil}\oddfootline={\hfil}% + \hbox to 0pt{}% + \chappager + \endgroup + \fi +} \def\setchapternewpage #1 {\csname CHAPPAG#1\endcsname} @@ -4579,45 +5118,72 @@ where each line of input produces a line of output.} \def\Yappendixkeyword{Yappendix} % \def\chapmacro#1#2#3{% + % Insert the first mark before the heading break (see notes for \domark). + \let\prevchapterdefs=\lastchapterdefs + \let\prevsectiondefs=\lastsectiondefs + \gdef\lastsectiondefs{\gdef\thissectionname{}\gdef\thissectionnum{}% + \gdef\thissection{}}% + % + \def\temptype{#2}% + \ifx\temptype\Ynothingkeyword + \gdef\lastchapterdefs{\gdef\thischaptername{#1}\gdef\thischapternum{}% + \gdef\thischapter{\thischaptername}}% + \else\ifx\temptype\Yomitfromtockeyword + \gdef\lastchapterdefs{\gdef\thischaptername{#1}\gdef\thischapternum{}% + \gdef\thischapter{}}% + \else\ifx\temptype\Yappendixkeyword + \toks0={#1}% + \xdef\lastchapterdefs{% + \gdef\noexpand\thischaptername{\the\toks0}% + \gdef\noexpand\thischapternum{\appendixletter}% + \gdef\noexpand\thischapter{\putwordAppendix{} \noexpand\thischapternum: + \noexpand\thischaptername}% + }% + \else + \toks0={#1}% + \xdef\lastchapterdefs{% + \gdef\noexpand\thischaptername{\the\toks0}% + \gdef\noexpand\thischapternum{\the\chapno}% + \gdef\noexpand\thischapter{\putwordChapter{} \noexpand\thischapternum: + \noexpand\thischaptername}% + }% + \fi\fi\fi + % + % Output the mark. Pass it through \safewhatsit, to take care of + % the preceding space. + \safewhatsit\domark + % + % Insert the chapter heading break. \pchapsepmacro + % + % Now the second mark, after the heading break. No break points + % between here and the heading. + \let\prevchapterdefs=\lastchapterdefs + \let\prevsectiondefs=\lastsectiondefs + \domark + % {% \chapfonts \rm % - % Have to define \thissection before calling \donoderef, because the + % Have to define \lastsection before calling \donoderef, because the % xref code eventually uses it. On the other hand, it has to be called % after \pchapsepmacro, or the headline will change too soon. - \gdef\thissection{#1}% - \gdef\thischaptername{#1}% + \gdef\lastsection{#1}% % % Only insert the separating space if we have a chapter/appendix % number, and don't print the unnumbered ``number''. - \def\temptype{#2}% \ifx\temptype\Ynothingkeyword \setbox0 = \hbox{}% \def\toctype{unnchap}% - \gdef\thischapternum{}% - \gdef\thischapter{#1}% \else\ifx\temptype\Yomitfromtockeyword \setbox0 = \hbox{}% contents like unnumbered, but no toc entry \def\toctype{omit}% - \gdef\thischapternum{}% - \gdef\thischapter{}% \else\ifx\temptype\Yappendixkeyword \setbox0 = \hbox{\putwordAppendix{} #3\enspace}% \def\toctype{app}% - \xdef\thischapternum{\appendixletter}% - % We don't substitute the actual chapter name into \thischapter - % because we don't want its macros evaluated now. And we don't - % use \thissection because that changes with each section. - % - \xdef\thischapter{\putwordAppendix{} \appendixletter: - \noexpand\thischaptername}% \else \setbox0 = \hbox{#3\enspace}% \def\toctype{numchap}% - \xdef\thischapternum{\the\chapno}% - \xdef\thischapter{\putwordChapter{} \the\chapno: - \noexpand\thischaptername}% \fi\fi\fi % % Write the toc entry for this chapter. Must come before the @@ -4633,6 +5199,7 @@ where each line of input produces a line of output.} \donoderef{#2}% % % Typeset the actual heading. + \nobreak % Avoid page breaks at the interline glue. \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \raggedright \hangindent=\wd0 \centerparametersmaybe \unhbox0 #1\par}% @@ -4695,36 +5262,78 @@ where each line of input produces a line of output.} % the section type for xrefs (Ynumbered, Ynothing, Yappendix), #4 is the % section number. % +\def\seckeyword{sec} +% \def\sectionheading#1#2#3#4{% {% % Switch to the right set of fonts. \csname #2fonts\endcsname \rm % - % Insert space above the heading. - \csname #2headingbreak\endcsname - % - % Only insert the space after the number if we have a section number. \def\sectionlevel{#2}% \def\temptype{#3}% % + % Insert first mark before the heading break (see notes for \domark). + \let\prevsectiondefs=\lastsectiondefs + \ifx\temptype\Ynothingkeyword + \ifx\sectionlevel\seckeyword + \gdef\lastsectiondefs{\gdef\thissectionname{#1}\gdef\thissectionnum{}% + \gdef\thissection{\thissectionname}}% + \fi + \else\ifx\temptype\Yomitfromtockeyword + % Don't redefine \thissection. + \else\ifx\temptype\Yappendixkeyword + \ifx\sectionlevel\seckeyword + \toks0={#1}% + \xdef\lastsectiondefs{% + \gdef\noexpand\thissectionname{\the\toks0}% + \gdef\noexpand\thissectionnum{#4}% + \gdef\noexpand\thissection{\putwordSection{} \noexpand\thissectionnum: + \noexpand\thissectionname}% + }% + \fi + \else + \ifx\sectionlevel\seckeyword + \toks0={#1}% + \xdef\lastsectiondefs{% + \gdef\noexpand\thissectionname{\the\toks0}% + \gdef\noexpand\thissectionnum{#4}% + \gdef\noexpand\thissection{\putwordSection{} \noexpand\thissectionnum: + \noexpand\thissectionname}% + }% + \fi + \fi\fi\fi + % + % Output the mark. Pass it through \safewhatsit, to take care of + % the preceding space. + \safewhatsit\domark + % + % Insert space above the heading. + \csname #2headingbreak\endcsname + % + % Now the second mark, after the heading break. No break points + % between here and the heading. + \let\prevsectiondefs=\lastsectiondefs + \domark + % + % Only insert the space after the number if we have a section number. \ifx\temptype\Ynothingkeyword \setbox0 = \hbox{}% \def\toctype{unn}% - \gdef\thissection{#1}% + \gdef\lastsection{#1}% \else\ifx\temptype\Yomitfromtockeyword % for @headings -- no section number, don't include in toc, - % and don't redefine \thissection. + % and don't redefine \lastsection. \setbox0 = \hbox{}% \def\toctype{omit}% \let\sectionlevel=\empty \else\ifx\temptype\Yappendixkeyword \setbox0 = \hbox{#4\enspace}% \def\toctype{app}% - \gdef\thissection{#1}% + \gdef\lastsection{#1}% \else \setbox0 = \hbox{#4\enspace}% \def\toctype{num}% - \gdef\thissection{#1}% + \gdef\lastsection{#1}% \fi\fi\fi % % Write the toc entry (before \donoderef). See comments in \chapmacro. @@ -4839,7 +5448,7 @@ where each line of input produces a line of output.} \def\readtocfile{% \setupdatafile \activecatcodes - \input \jobname.toc + \input \tocreadfilename } \newskip\contentsrightmargin \contentsrightmargin=1in @@ -4858,7 +5467,6 @@ where each line of input produces a line of output.} % % Don't need to put `Contents' or `Short Contents' in the headline. % It is abundantly clear what they are. - \def\thischapter{}% \chapmacro{#1}{Yomitfromtoc}{}% % \savepageno = \pageno @@ -4870,11 +5478,16 @@ where each line of input produces a line of output.} \ifnum \pageno>0 \global\pageno = \lastnegativepageno \fi } +% redefined for the two-volume lispref. We always output on +% \jobname.toc even if this is redefined. +% +\def\tocreadfilename{\jobname.toc} % Normal (long) toc. +% \def\contents{% \startcontents{\putwordTOC}% - \openin 1 \jobname.toc + \openin 1 \tocreadfilename\space \ifeof 1 \else \readtocfile \fi @@ -4912,7 +5525,7 @@ where each line of input produces a line of output.} \let\numsubsubsecentry = \numsecentry \let\appsubsubsecentry = \numsecentry \let\unnsubsubsecentry = \numsecentry - \openin 1 \jobname.toc + \openin 1 \tocreadfilename\space \ifeof 1 \else \readtocfile \fi @@ -5247,12 +5860,18 @@ where each line of input produces a line of output.} \let\SETdispenvsize\relax \def\setnormaldispenv{% \ifx\SETdispenvsize\smallword + % end paragraph for sake of leading, in case document has no blank + % line. This is redundant with what happens in \aboveenvbreak, but + % we need to do it before changing the fonts, and it's inconvenient + % to change the fonts afterward. + \ifnum \lastpenalty=10000 \else \endgraf \fi \smallexamplefonts \rm \fi } \def\setsmalldispenv{% \ifx\SETdispenvsize\nosmallword \else + \ifnum \lastpenalty=10000 \else \endgraf \fi \smallexamplefonts \rm \fi } @@ -5419,11 +6038,11 @@ where each line of input produces a line of output.} % regular 0x27. % \def\codequoteright{% - \expandafter\ifx\csname SETcodequoteundirected\endcsname\relax - '% - \else - \char'15 - \fi + \expandafter\ifx\csname SETtxicodequoteundirected\endcsname\relax + \expandafter\ifx\csname SETcodequoteundirected\endcsname\relax + '% + \else \char'15 \fi + \else \char'15 \fi } % % and a similar option for the left quote char vs. a grave accent. @@ -5431,11 +6050,11 @@ where each line of input produces a line of output.} % the code environments to do likewise. % \def\codequoteleft{% - \expandafter\ifx\csname SETcodequotebacktick\endcsname\relax - `% - \else - \char'22 - \fi + \expandafter\ifx\csname SETtxicodequotebacktick\endcsname\relax + \expandafter\ifx\csname SETcodequotebacktick\endcsname\relax + `% + \else \char'22 \fi + \else \char'22 \fi } % \begingroup @@ -5553,27 +6172,35 @@ where each line of input produces a line of output.} \endgroup } + \message{defuns,} % @defun etc. \newskip\defbodyindent \defbodyindent=.4in \newskip\defargsindent \defargsindent=50pt \newskip\deflastargmargin \deflastargmargin=18pt +\newcount\defunpenalty % Start the processing of @deffn: \def\startdefun{% \ifnum\lastpenalty<10000 \medbreak + \defunpenalty=10003 % Will keep this @deffn together with the + % following @def command, see below. \else % If there are two @def commands in a row, we'll have a \nobreak, % which is there to keep the function description together with its % header. But if there's nothing but headers, we need to allow a % break somewhere. Check specifically for penalty 10002, inserted - % by \defargscommonending, instead of 10000, since the sectioning + % by \printdefunline, instead of 10000, since the sectioning % commands also insert a nobreak penalty, and we don't want to allow % a break between a section heading and a defun. - % - \ifnum\lastpenalty=10002 \penalty2000 \fi + % + % As a minor refinement, we avoid "club" headers by signalling + % with penalty of 10003 after the very first @deffn in the + % sequence (see above), and penalty of 10002 after any following + % @def command. + \ifnum\lastpenalty=10002 \penalty2000 \else \defunpenalty=10002 \fi % % Similarly, after a section heading, do not allow a break. % But do insert the glue. @@ -5591,7 +6218,7 @@ where each line of input produces a line of output.} % % As above, allow line break if we have multiple x headers in a row. % It's not a great place, though. - \ifnum\lastpenalty=10002 \penalty3000 \fi + \ifnum\lastpenalty=10002 \penalty3000 \else \defunpenalty=10002 \fi % % And now, it's time to reuse the body of the original defun: \expandafter\gobbledefun#1% @@ -5609,7 +6236,7 @@ where each line of input produces a line of output.} \advance\rightskip by 0pt plus 1fil \endgraf \nobreak\vskip -\parskip - \penalty 10002 % signal to \startdefun and \dodefunx + \penalty\defunpenalty % signal to \startdefun and \dodefunx % Some of the @defun-type tags do not enable magic parentheses, % rendering the following check redundant. But we don't optimize. \checkparencounts @@ -5878,12 +6505,14 @@ where each line of input produces a line of output.} \ifnum\parencount=0 \else \badparencount \fi \ifnum\brackcount=0 \else \badbrackcount \fi } +% these should not use \errmessage; the glibc manual, at least, actually +% has such constructs (when documenting function pointers). \def\badparencount{% - \errmessage{Unbalanced parentheses in @def}% + \message{Warning: unbalanced parentheses in @def...}% \global\parencount=0 } \def\badbrackcount{% - \errmessage{Unbalanced square braces in @def}% + \message{Warning: unbalanced square brackets in @def...}% \global\brackcount=0 } @@ -5978,6 +6607,10 @@ where each line of input produces a line of output.} % all characters are catcode 10, 11 or 12, except \ which is active % (as in normal texinfo). It is necessary to change the definition of \. +% Non-ASCII encodings make 8-bit characters active, so un-activate +% them to avoid their expansion. Must do this non-globally, to +% confine the change to the current group. + % It's necessary to have hard CRs when the macro is executed. This is % done by making ^^M (\endlinechar) catcode 12 when reading the macro % body, and then making it the \newlinechar in \scanmacro. @@ -5992,6 +6625,7 @@ where each line of input produces a line of output.} \catcode`\_=\other \catcode`\|=\other \catcode`\~=\other + \ifx\declaredencoding\ascii \else \setnonasciicharscatcodenonglobal\other \fi } \def\scanargctxt{% @@ -6209,7 +6843,6 @@ where each line of input produces a line of output.} \message{cross references,} \newwrite\auxfile - \newif\ifhavexrefs % True if xref values are known. \newif\ifwarnedxrefs % True if we warned once that they aren't known. @@ -6254,7 +6887,7 @@ where each line of input produces a line of output.} % \setref{NAME}{SNT} defines a cross-reference point NAME (a node or an % anchor), which consists of three parts: -% 1) NAME-title - the current sectioning name taken from \thissection, +% 1) NAME-title - the current sectioning name taken from \lastsection, % or the anchor name. % 2) NAME-snt - section number and type, passed as the SNT arg, or % empty for anchors. @@ -6273,10 +6906,10 @@ where each line of input produces a line of output.} \write\auxfile{@xrdef{#1-% #1 of \setref, expanded by the \edef ##1}{##2}}% these are parameters of \writexrdef }% - \toks0 = \expandafter{\thissection}% + \toks0 = \expandafter{\lastsection}% \immediate \writexrdef{title}{\the\toks0 }% \immediate \writexrdef{snt}{\csname #2\endcsname}% \Ynumbered etc. - \writexrdef{pg}{\folio}% will be written later, during \shipout + \safewhatsit{\writexrdef{pg}{\folio}}% will be written later, during \shipout }% \fi } @@ -6322,7 +6955,8 @@ where each line of input produces a line of output.} \ifpdf \leavevmode \getfilename{#4}% - {\turnoffactive + {\indexnofonts + \turnoffactive % See comments at \activebackslashdouble. {\activebackslashdouble \xdef\pdfxrefdest{#1}% \backslashparens\pdfxrefdest}% @@ -6335,7 +6969,7 @@ where each line of input produces a line of output.} goto name{\pdfmkpgn{\pdfxrefdest}}% \fi }% - \linkcolor + \setcolor{\linkcolor}% \fi % % Float references are printed completely differently: "Figure 1.2" @@ -6373,7 +7007,7 @@ where each line of input produces a line of output.} % is a loss. Therefore, we give the text of the node name again, so it % is as if TeX is seeing it for the first time. \ifdim \wd1 > 0pt - \putwordsection{} ``\printedrefname'' \putwordin{} \cite{\printedmanual}% + \putwordSection{} ``\printedrefname'' \putwordin{} \cite{\printedmanual}% \else % _ (for example) has to be the character _ for the purposes of the % control sequence corresponding to the node, but it has to expand @@ -6469,10 +7103,18 @@ where each line of input produces a line of output.} % collisions). But if this is a float type, we have more work to do. % \def\xrdef#1#2{% - \expandafter\gdef\csname XR#1\endcsname{#2}% remember this xref value. + {% The node name might contain 8-bit characters, which in our current + % implementation are changed to commands like @'e. Don't let these + % mess up the control sequence name. + \indexnofonts + \turnoffactive + \xdef\safexrefname{#1}% + }% + % + \expandafter\gdef\csname XR\safexrefname\endcsname{#2}% remember this xref % % Was that xref control sequence that we just defined for a float? - \expandafter\iffloat\csname XR#1\endcsname + \expandafter\iffloat\csname XR\safexrefname\endcsname % it was a float, and we have the (safe) float type in \iffloattype. \expandafter\let\expandafter\floatlist \csname floatlist\iffloattype\endcsname @@ -6487,7 +7129,8 @@ where each line of input produces a line of output.} % % Remember this xref in the control sequence \floatlistFLOATTYPE, % for later use in \listoffloats. - \expandafter\xdef\csname floatlist\iffloattype\endcsname{\the\toks0{#1}}% + \expandafter\xdef\csname floatlist\iffloattype\endcsname{\the\toks0 + {\safexrefname}}% \fi } @@ -6591,6 +7234,7 @@ where each line of input produces a line of output.} \input\jobname.#1 \endgroup} + \message{insertions,} % including footnotes. @@ -6863,13 +7507,13 @@ where each line of input produces a line of output.} \global\advance\floatno by 1 % {% - % This magic value for \thissection is output by \setref as the + % This magic value for \lastsection is output by \setref as the % XREFLABEL-title value. \xrefX uses it to distinguish float % labels (which have a completely different output format) from % node and anchor labels. And \xrdef uses it to construct the % lists of floats. % - \edef\thissection{\floatmagic=\safefloattype}% + \edef\lastsection{\floatmagic=\safefloattype}% \setref{\floatlabel}{Yfloat}% }% \fi @@ -7004,7 +7648,7 @@ where each line of input produces a line of output.} % #1 is the control sequence we are passed; we expand into a conditional % which is true if #1 represents a float ref. That is, the magic -% \thissection value which we \setref above. +% \lastsection value which we \setref above. % \def\iffloat#1{\expandafter\doiffloat#1==\finish} % @@ -7065,39 +7709,871 @@ where each line of input produces a line of output.} \writeentry }} + \message{localization,} -% and i18n. % @documentlanguage is usually given very early, just after % @setfilename. If done too late, it may not override everything -% properly. Single argument is the language abbreviation. -% It would be nice if we could set up a hyphenation file here. +% properly. Single argument is the language (de) or locale (de_DE) +% abbreviation. It would be nice if we could set up a hyphenation file. % -\parseargdef\documentlanguage{% +{ + \catcode`\_ = \active + \globaldefs=1 +\parseargdef\documentlanguage{\begingroup + \let_=\normalunderscore % normal _ character for filenames \tex % read txi-??.tex file in plain TeX. - % Read the file if it exists. + % Read the file by the name they passed if it exists. \openin 1 txi-#1.tex \ifeof 1 - \errhelp = \nolanghelp - \errmessage{Cannot read language file txi-#1.tex}% + \documentlanguagetrywithoutunderscore{#1_\finish}% \else \input txi-#1.tex \fi \closein 1 \endgroup +\endgroup} } +% +% If they passed de_DE, and txi-de_DE.tex doesn't exist, +% try txi-de.tex. +% +\def\documentlanguagetrywithoutunderscore#1_#2\finish{% + \openin 1 txi-#1.tex + \ifeof 1 + \errhelp = \nolanghelp + \errmessage{Cannot read language file txi-#1.tex}% + \else + \input txi-#1.tex + \fi + \closein 1 +} +% \newhelp\nolanghelp{The given language definition file cannot be found or is empty. Maybe you need to install it? In the current directory should work if nowhere else does.} - -% @documentencoding should change something in TeX eventually, most -% likely, but for now just recognize it. -\let\documentencoding = \comment - - -% Page size parameters. +% Set the catcode of characters 128 through 255 to the specified number. % +\def\setnonasciicharscatcode#1{% + \count255=128 + \loop\ifnum\count255<256 + \global\catcode\count255=#1\relax + \advance\count255 by 1 + \repeat +} + +\def\setnonasciicharscatcodenonglobal#1{% + \count255=128 + \loop\ifnum\count255<256 + \catcode\count255=#1\relax + \advance\count255 by 1 + \repeat +} + +% @documentencoding sets the definition of non-ASCII characters +% according to the specified encoding. +% +\parseargdef\documentencoding{% + % Encoding being declared for the document. + \def\declaredencoding{\csname #1.enc\endcsname}% + % + % Supported encodings: names converted to tokens in order to be able + % to compare them with \ifx. + \def\ascii{\csname US-ASCII.enc\endcsname}% + \def\latnine{\csname ISO-8859-15.enc\endcsname}% + \def\latone{\csname ISO-8859-1.enc\endcsname}% + \def\lattwo{\csname ISO-8859-2.enc\endcsname}% + \def\utfeight{\csname UTF-8.enc\endcsname}% + % + \ifx \declaredencoding \ascii + \asciichardefs + % + \else \ifx \declaredencoding \lattwo + \setnonasciicharscatcode\active + \lattwochardefs + % + \else \ifx \declaredencoding \latone + \setnonasciicharscatcode\active + \latonechardefs + % + \else \ifx \declaredencoding \latnine + \setnonasciicharscatcode\active + \latninechardefs + % + \else \ifx \declaredencoding \utfeight + \setnonasciicharscatcode\active + \utfeightchardefs + % + \else + \message{Unknown document encoding #1, ignoring.}% + % + \fi % utfeight + \fi % latnine + \fi % latone + \fi % lattwo + \fi % ascii +} + +% A message to be logged when using a character that isn't available +% the default font encoding (OT1). +% +\def\missingcharmsg#1{\message{Character missing in OT1 encoding: #1.}} + +% Take account of \c (plain) vs. \, (Texinfo) difference. +\def\cedilla#1{\ifx\c\ptexc\c{#1}\else\,{#1}\fi} + +% First, make active non-ASCII characters in order for them to be +% correctly categorized when TeX reads the replacement text of +% macros containing the character definitions. +\setnonasciicharscatcode\active +% +% Latin1 (ISO-8859-1) character definitions. +\def\latonechardefs{% + \gdef^^a0{~} + \gdef^^a1{\exclamdown} + \gdef^^a2{\missingcharmsg{CENT SIGN}} + \gdef^^a3{{\pounds}} + \gdef^^a4{\missingcharmsg{CURRENCY SIGN}} + \gdef^^a5{\missingcharmsg{YEN SIGN}} + \gdef^^a6{\missingcharmsg{BROKEN BAR}} + \gdef^^a7{\S} + \gdef^^a8{\"{}} + \gdef^^a9{\copyright} + \gdef^^aa{\ordf} + \gdef^^ab{\missingcharmsg{LEFT-POINTING DOUBLE ANGLE QUOTATION MARK}} + \gdef^^ac{$\lnot$} + \gdef^^ad{\-} + \gdef^^ae{\registeredsymbol} + \gdef^^af{\={}} + % + \gdef^^b0{\textdegree} + \gdef^^b1{$\pm$} + \gdef^^b2{$^2$} + \gdef^^b3{$^3$} + \gdef^^b4{\'{}} + \gdef^^b5{$\mu$} + \gdef^^b6{\P} + % + \gdef^^b7{$^.$} + \gdef^^b8{\cedilla\ } + \gdef^^b9{$^1$} + \gdef^^ba{\ordm} + % + \gdef^^bb{\missingcharmsg{RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK}} + \gdef^^bc{$1\over4$} + \gdef^^bd{$1\over2$} + \gdef^^be{$3\over4$} + \gdef^^bf{\questiondown} + % + \gdef^^c0{\`A} + \gdef^^c1{\'A} + \gdef^^c2{\^A} + \gdef^^c3{\~A} + \gdef^^c4{\"A} + \gdef^^c5{\ringaccent A} + \gdef^^c6{\AE} + \gdef^^c7{\cedilla C} + \gdef^^c8{\`E} + \gdef^^c9{\'E} + \gdef^^ca{\^E} + \gdef^^cb{\"E} + \gdef^^cc{\`I} + \gdef^^cd{\'I} + \gdef^^ce{\^I} + \gdef^^cf{\"I} + % + \gdef^^d0{\missingcharmsg{LATIN CAPITAL LETTER ETH}} + \gdef^^d1{\~N} + \gdef^^d2{\`O} + \gdef^^d3{\'O} + \gdef^^d4{\^O} + \gdef^^d5{\~O} + \gdef^^d6{\"O} + \gdef^^d7{$\times$} + \gdef^^d8{\O} + \gdef^^d9{\`U} + \gdef^^da{\'U} + \gdef^^db{\^U} + \gdef^^dc{\"U} + \gdef^^dd{\'Y} + \gdef^^de{\missingcharmsg{LATIN CAPITAL LETTER THORN}} + \gdef^^df{\ss} + % + \gdef^^e0{\`a} + \gdef^^e1{\'a} + \gdef^^e2{\^a} + \gdef^^e3{\~a} + \gdef^^e4{\"a} + \gdef^^e5{\ringaccent a} + \gdef^^e6{\ae} + \gdef^^e7{\cedilla c} + \gdef^^e8{\`e} + \gdef^^e9{\'e} + \gdef^^ea{\^e} + \gdef^^eb{\"e} + \gdef^^ec{\`{\dotless i}} + \gdef^^ed{\'{\dotless i}} + \gdef^^ee{\^{\dotless i}} + \gdef^^ef{\"{\dotless i}} + % + \gdef^^f0{\missingcharmsg{LATIN SMALL LETTER ETH}} + \gdef^^f1{\~n} + \gdef^^f2{\`o} + \gdef^^f3{\'o} + \gdef^^f4{\^o} + \gdef^^f5{\~o} + \gdef^^f6{\"o} + \gdef^^f7{$\div$} + \gdef^^f8{\o} + \gdef^^f9{\`u} + \gdef^^fa{\'u} + \gdef^^fb{\^u} + \gdef^^fc{\"u} + \gdef^^fd{\'y} + \gdef^^fe{\missingcharmsg{LATIN SMALL LETTER THORN}} + \gdef^^ff{\"y} +} + +% Latin9 (ISO-8859-15) encoding character definitions. +\def\latninechardefs{% + % Encoding is almost identical to Latin1. + \latonechardefs + % + \gdef^^a4{\euro} + \gdef^^a6{\v S} + \gdef^^a8{\v s} + \gdef^^b4{\v Z} + \gdef^^b8{\v z} + \gdef^^bc{\OE} + \gdef^^bd{\oe} + \gdef^^be{\"Y} +} + +% Latin2 (ISO-8859-2) character definitions. +\def\lattwochardefs{% + \gdef^^a0{~} + \gdef^^a1{\missingcharmsg{LATIN CAPITAL LETTER A WITH OGONEK}} + \gdef^^a2{\u{}} + \gdef^^a3{\L} + \gdef^^a4{\missingcharmsg{CURRENCY SIGN}} + \gdef^^a5{\v L} + \gdef^^a6{\'S} + \gdef^^a7{\S} + \gdef^^a8{\"{}} + \gdef^^a9{\v S} + \gdef^^aa{\cedilla S} + \gdef^^ab{\v T} + \gdef^^ac{\'Z} + \gdef^^ad{\-} + \gdef^^ae{\v Z} + \gdef^^af{\dotaccent Z} + % + \gdef^^b0{\textdegree} + \gdef^^b1{\missingcharmsg{LATIN SMALL LETTER A WITH OGONEK}} + \gdef^^b2{\missingcharmsg{OGONEK}} + \gdef^^b3{\l} + \gdef^^b4{\'{}} + \gdef^^b5{\v l} + \gdef^^b6{\'s} + \gdef^^b7{\v{}} + \gdef^^b8{\cedilla\ } + \gdef^^b9{\v s} + \gdef^^ba{\cedilla s} + \gdef^^bb{\v t} + \gdef^^bc{\'z} + \gdef^^bd{\H{}} + \gdef^^be{\v z} + \gdef^^bf{\dotaccent z} + % + \gdef^^c0{\'R} + \gdef^^c1{\'A} + \gdef^^c2{\^A} + \gdef^^c3{\u A} + \gdef^^c4{\"A} + \gdef^^c5{\'L} + \gdef^^c6{\'C} + \gdef^^c7{\cedilla C} + \gdef^^c8{\v C} + \gdef^^c9{\'E} + \gdef^^ca{\missingcharmsg{LATIN CAPITAL LETTER E WITH OGONEK}} + \gdef^^cb{\"E} + \gdef^^cc{\v E} + \gdef^^cd{\'I} + \gdef^^ce{\^I} + \gdef^^cf{\v D} + % + \gdef^^d0{\missingcharmsg{LATIN CAPITAL LETTER D WITH STROKE}} + \gdef^^d1{\'N} + \gdef^^d2{\v N} + \gdef^^d3{\'O} + \gdef^^d4{\^O} + \gdef^^d5{\H O} + \gdef^^d6{\"O} + \gdef^^d7{$\times$} + \gdef^^d8{\v R} + \gdef^^d9{\ringaccent U} + \gdef^^da{\'U} + \gdef^^db{\H U} + \gdef^^dc{\"U} + \gdef^^dd{\'Y} + \gdef^^de{\cedilla T} + \gdef^^df{\ss} + % + \gdef^^e0{\'r} + \gdef^^e1{\'a} + \gdef^^e2{\^a} + \gdef^^e3{\u a} + \gdef^^e4{\"a} + \gdef^^e5{\'l} + \gdef^^e6{\'c} + \gdef^^e7{\cedilla c} + \gdef^^e8{\v c} + \gdef^^e9{\'e} + \gdef^^ea{\missingcharmsg{LATIN SMALL LETTER E WITH OGONEK}} + \gdef^^eb{\"e} + \gdef^^ec{\v e} + \gdef^^ed{\'\i} + \gdef^^ee{\^\i} + \gdef^^ef{\v d} + % + \gdef^^f0{\missingcharmsg{LATIN SMALL LETTER D WITH STROKE}} + \gdef^^f1{\'n} + \gdef^^f2{\v n} + \gdef^^f3{\'o} + \gdef^^f4{\^o} + \gdef^^f5{\H o} + \gdef^^f6{\"o} + \gdef^^f7{$\div$} + \gdef^^f8{\v r} + \gdef^^f9{\ringaccent u} + \gdef^^fa{\'u} + \gdef^^fb{\H u} + \gdef^^fc{\"u} + \gdef^^fd{\'y} + \gdef^^fe{\cedilla t} + \gdef^^ff{\dotaccent{}} +} + +% UTF-8 character definitions. +% +% This code to support UTF-8 is based on LaTeX's utf8.def, with some +% changes for Texinfo conventions. It is included here under the GPL by +% permission from Frank Mittelbach and the LaTeX team. +% +\newcount\countUTFx +\newcount\countUTFy +\newcount\countUTFz + +\gdef\UTFviiiTwoOctets#1#2{\expandafter + \UTFviiiDefined\csname u8:#1\string #2\endcsname} +% +\gdef\UTFviiiThreeOctets#1#2#3{\expandafter + \UTFviiiDefined\csname u8:#1\string #2\string #3\endcsname} +% +\gdef\UTFviiiFourOctets#1#2#3#4{\expandafter + \UTFviiiDefined\csname u8:#1\string #2\string #3\string #4\endcsname} + +\gdef\UTFviiiDefined#1{% + \ifx #1\relax + \message{\linenumber Unicode char \string #1 not defined for Texinfo}% + \else + \expandafter #1% + \fi +} + +\begingroup + \catcode`\~13 + \catcode`\"12 + + \def\UTFviiiLoop{% + \global\catcode\countUTFx\active + \uccode`\~\countUTFx + \uppercase\expandafter{\UTFviiiTmp}% + \advance\countUTFx by 1 + \ifnum\countUTFx < \countUTFy + \expandafter\UTFviiiLoop + \fi} + + \countUTFx = "C2 + \countUTFy = "E0 + \def\UTFviiiTmp{% + \xdef~{\noexpand\UTFviiiTwoOctets\string~}} + \UTFviiiLoop + + \countUTFx = "E0 + \countUTFy = "F0 + \def\UTFviiiTmp{% + \xdef~{\noexpand\UTFviiiThreeOctets\string~}} + \UTFviiiLoop + + \countUTFx = "F0 + \countUTFy = "F4 + \def\UTFviiiTmp{% + \xdef~{\noexpand\UTFviiiFourOctets\string~}} + \UTFviiiLoop +\endgroup + +\begingroup + \catcode`\"=12 + \catcode`\<=12 + \catcode`\.=12 + \catcode`\,=12 + \catcode`\;=12 + \catcode`\!=12 + \catcode`\~=13 + + \gdef\DeclareUnicodeCharacter#1#2{% + \countUTFz = "#1\relax + \wlog{\space\space defining Unicode char U+#1 (decimal \the\countUTFz)}% + \begingroup + \parseXMLCharref + \def\UTFviiiTwoOctets##1##2{% + \csname u8:##1\string ##2\endcsname}% + \def\UTFviiiThreeOctets##1##2##3{% + \csname u8:##1\string ##2\string ##3\endcsname}% + \def\UTFviiiFourOctets##1##2##3##4{% + \csname u8:##1\string ##2\string ##3\string ##4\endcsname}% + \expandafter\expandafter\expandafter\expandafter + \expandafter\expandafter\expandafter + \gdef\UTFviiiTmp{#2}% + \endgroup} + + \gdef\parseXMLCharref{% + \ifnum\countUTFz < "A0\relax + \errhelp = \EMsimple + \errmessage{Cannot define Unicode char value < 00A0}% + \else\ifnum\countUTFz < "800\relax + \parseUTFviiiA,% + \parseUTFviiiB C\UTFviiiTwoOctets.,% + \else\ifnum\countUTFz < "10000\relax + \parseUTFviiiA;% + \parseUTFviiiA,% + \parseUTFviiiB E\UTFviiiThreeOctets.{,;}% + \else + \parseUTFviiiA;% + \parseUTFviiiA,% + \parseUTFviiiA!% + \parseUTFviiiB F\UTFviiiFourOctets.{!,;}% + \fi\fi\fi + } + + \gdef\parseUTFviiiA#1{% + \countUTFx = \countUTFz + \divide\countUTFz by 64 + \countUTFy = \countUTFz + \multiply\countUTFz by 64 + \advance\countUTFx by -\countUTFz + \advance\countUTFx by 128 + \uccode `#1\countUTFx + \countUTFz = \countUTFy} + + \gdef\parseUTFviiiB#1#2#3#4{% + \advance\countUTFz by "#10\relax + \uccode `#3\countUTFz + \uppercase{\gdef\UTFviiiTmp{#2#3#4}}} +\endgroup + +\def\utfeightchardefs{% + \DeclareUnicodeCharacter{00A0}{\tie} + \DeclareUnicodeCharacter{00A1}{\exclamdown} + \DeclareUnicodeCharacter{00A3}{\pounds} + \DeclareUnicodeCharacter{00A8}{\"{ }} + \DeclareUnicodeCharacter{00A9}{\copyright} + \DeclareUnicodeCharacter{00AA}{\ordf} + \DeclareUnicodeCharacter{00AB}{\guillemetleft} + \DeclareUnicodeCharacter{00AD}{\-} + \DeclareUnicodeCharacter{00AE}{\registeredsymbol} + \DeclareUnicodeCharacter{00AF}{\={ }} + + \DeclareUnicodeCharacter{00B0}{\ringaccent{ }} + \DeclareUnicodeCharacter{00B4}{\'{ }} + \DeclareUnicodeCharacter{00B8}{\cedilla{ }} + \DeclareUnicodeCharacter{00BA}{\ordm} + \DeclareUnicodeCharacter{00BB}{\guillemetright} + \DeclareUnicodeCharacter{00BF}{\questiondown} + + \DeclareUnicodeCharacter{00C0}{\`A} + \DeclareUnicodeCharacter{00C1}{\'A} + \DeclareUnicodeCharacter{00C2}{\^A} + \DeclareUnicodeCharacter{00C3}{\~A} + \DeclareUnicodeCharacter{00C4}{\"A} + \DeclareUnicodeCharacter{00C5}{\AA} + \DeclareUnicodeCharacter{00C6}{\AE} + \DeclareUnicodeCharacter{00C7}{\cedilla{C}} + \DeclareUnicodeCharacter{00C8}{\`E} + \DeclareUnicodeCharacter{00C9}{\'E} + \DeclareUnicodeCharacter{00CA}{\^E} + \DeclareUnicodeCharacter{00CB}{\"E} + \DeclareUnicodeCharacter{00CC}{\`I} + \DeclareUnicodeCharacter{00CD}{\'I} + \DeclareUnicodeCharacter{00CE}{\^I} + \DeclareUnicodeCharacter{00CF}{\"I} + + \DeclareUnicodeCharacter{00D1}{\~N} + \DeclareUnicodeCharacter{00D2}{\`O} + \DeclareUnicodeCharacter{00D3}{\'O} + \DeclareUnicodeCharacter{00D4}{\^O} + \DeclareUnicodeCharacter{00D5}{\~O} + \DeclareUnicodeCharacter{00D6}{\"O} + \DeclareUnicodeCharacter{00D8}{\O} + \DeclareUnicodeCharacter{00D9}{\`U} + \DeclareUnicodeCharacter{00DA}{\'U} + \DeclareUnicodeCharacter{00DB}{\^U} + \DeclareUnicodeCharacter{00DC}{\"U} + \DeclareUnicodeCharacter{00DD}{\'Y} + \DeclareUnicodeCharacter{00DF}{\ss} + + \DeclareUnicodeCharacter{00E0}{\`a} + \DeclareUnicodeCharacter{00E1}{\'a} + \DeclareUnicodeCharacter{00E2}{\^a} + \DeclareUnicodeCharacter{00E3}{\~a} + \DeclareUnicodeCharacter{00E4}{\"a} + \DeclareUnicodeCharacter{00E5}{\aa} + \DeclareUnicodeCharacter{00E6}{\ae} + \DeclareUnicodeCharacter{00E7}{\cedilla{c}} + \DeclareUnicodeCharacter{00E8}{\`e} + \DeclareUnicodeCharacter{00E9}{\'e} + \DeclareUnicodeCharacter{00EA}{\^e} + \DeclareUnicodeCharacter{00EB}{\"e} + \DeclareUnicodeCharacter{00EC}{\`{\dotless{i}}} + \DeclareUnicodeCharacter{00ED}{\'{\dotless{i}}} + \DeclareUnicodeCharacter{00EE}{\^{\dotless{i}}} + \DeclareUnicodeCharacter{00EF}{\"{\dotless{i}}} + + \DeclareUnicodeCharacter{00F1}{\~n} + \DeclareUnicodeCharacter{00F2}{\`o} + \DeclareUnicodeCharacter{00F3}{\'o} + \DeclareUnicodeCharacter{00F4}{\^o} + \DeclareUnicodeCharacter{00F5}{\~o} + \DeclareUnicodeCharacter{00F6}{\"o} + \DeclareUnicodeCharacter{00F8}{\o} + \DeclareUnicodeCharacter{00F9}{\`u} + \DeclareUnicodeCharacter{00FA}{\'u} + \DeclareUnicodeCharacter{00FB}{\^u} + \DeclareUnicodeCharacter{00FC}{\"u} + \DeclareUnicodeCharacter{00FD}{\'y} + \DeclareUnicodeCharacter{00FF}{\"y} + + \DeclareUnicodeCharacter{0100}{\=A} + \DeclareUnicodeCharacter{0101}{\=a} + \DeclareUnicodeCharacter{0102}{\u{A}} + \DeclareUnicodeCharacter{0103}{\u{a}} + \DeclareUnicodeCharacter{0106}{\'C} + \DeclareUnicodeCharacter{0107}{\'c} + \DeclareUnicodeCharacter{0108}{\^C} + \DeclareUnicodeCharacter{0109}{\^c} + \DeclareUnicodeCharacter{010A}{\dotaccent{C}} + \DeclareUnicodeCharacter{010B}{\dotaccent{c}} + \DeclareUnicodeCharacter{010C}{\v{C}} + \DeclareUnicodeCharacter{010D}{\v{c}} + \DeclareUnicodeCharacter{010E}{\v{D}} + + \DeclareUnicodeCharacter{0112}{\=E} + \DeclareUnicodeCharacter{0113}{\=e} + \DeclareUnicodeCharacter{0114}{\u{E}} + \DeclareUnicodeCharacter{0115}{\u{e}} + \DeclareUnicodeCharacter{0116}{\dotaccent{E}} + \DeclareUnicodeCharacter{0117}{\dotaccent{e}} + \DeclareUnicodeCharacter{011A}{\v{E}} + \DeclareUnicodeCharacter{011B}{\v{e}} + \DeclareUnicodeCharacter{011C}{\^G} + \DeclareUnicodeCharacter{011D}{\^g} + \DeclareUnicodeCharacter{011E}{\u{G}} + \DeclareUnicodeCharacter{011F}{\u{g}} + + \DeclareUnicodeCharacter{0120}{\dotaccent{G}} + \DeclareUnicodeCharacter{0121}{\dotaccent{g}} + \DeclareUnicodeCharacter{0124}{\^H} + \DeclareUnicodeCharacter{0125}{\^h} + \DeclareUnicodeCharacter{0128}{\~I} + \DeclareUnicodeCharacter{0129}{\~{\dotless{i}}} + \DeclareUnicodeCharacter{012A}{\=I} + \DeclareUnicodeCharacter{012B}{\={\dotless{i}}} + \DeclareUnicodeCharacter{012C}{\u{I}} + \DeclareUnicodeCharacter{012D}{\u{\dotless{i}}} + + \DeclareUnicodeCharacter{0130}{\dotaccent{I}} + \DeclareUnicodeCharacter{0131}{\dotless{i}} + \DeclareUnicodeCharacter{0132}{IJ} + \DeclareUnicodeCharacter{0133}{ij} + \DeclareUnicodeCharacter{0134}{\^J} + \DeclareUnicodeCharacter{0135}{\^{\dotless{j}}} + \DeclareUnicodeCharacter{0139}{\'L} + \DeclareUnicodeCharacter{013A}{\'l} + + \DeclareUnicodeCharacter{0141}{\L} + \DeclareUnicodeCharacter{0142}{\l} + \DeclareUnicodeCharacter{0143}{\'N} + \DeclareUnicodeCharacter{0144}{\'n} + \DeclareUnicodeCharacter{0147}{\v{N}} + \DeclareUnicodeCharacter{0148}{\v{n}} + \DeclareUnicodeCharacter{014C}{\=O} + \DeclareUnicodeCharacter{014D}{\=o} + \DeclareUnicodeCharacter{014E}{\u{O}} + \DeclareUnicodeCharacter{014F}{\u{o}} + + \DeclareUnicodeCharacter{0150}{\H{O}} + \DeclareUnicodeCharacter{0151}{\H{o}} + \DeclareUnicodeCharacter{0152}{\OE} + \DeclareUnicodeCharacter{0153}{\oe} + \DeclareUnicodeCharacter{0154}{\'R} + \DeclareUnicodeCharacter{0155}{\'r} + \DeclareUnicodeCharacter{0158}{\v{R}} + \DeclareUnicodeCharacter{0159}{\v{r}} + \DeclareUnicodeCharacter{015A}{\'S} + \DeclareUnicodeCharacter{015B}{\'s} + \DeclareUnicodeCharacter{015C}{\^S} + \DeclareUnicodeCharacter{015D}{\^s} + \DeclareUnicodeCharacter{015E}{\cedilla{S}} + \DeclareUnicodeCharacter{015F}{\cedilla{s}} + + \DeclareUnicodeCharacter{0160}{\v{S}} + \DeclareUnicodeCharacter{0161}{\v{s}} + \DeclareUnicodeCharacter{0162}{\cedilla{t}} + \DeclareUnicodeCharacter{0163}{\cedilla{T}} + \DeclareUnicodeCharacter{0164}{\v{T}} + + \DeclareUnicodeCharacter{0168}{\~U} + \DeclareUnicodeCharacter{0169}{\~u} + \DeclareUnicodeCharacter{016A}{\=U} + \DeclareUnicodeCharacter{016B}{\=u} + \DeclareUnicodeCharacter{016C}{\u{U}} + \DeclareUnicodeCharacter{016D}{\u{u}} + \DeclareUnicodeCharacter{016E}{\ringaccent{U}} + \DeclareUnicodeCharacter{016F}{\ringaccent{u}} + + \DeclareUnicodeCharacter{0170}{\H{U}} + \DeclareUnicodeCharacter{0171}{\H{u}} + \DeclareUnicodeCharacter{0174}{\^W} + \DeclareUnicodeCharacter{0175}{\^w} + \DeclareUnicodeCharacter{0176}{\^Y} + \DeclareUnicodeCharacter{0177}{\^y} + \DeclareUnicodeCharacter{0178}{\"Y} + \DeclareUnicodeCharacter{0179}{\'Z} + \DeclareUnicodeCharacter{017A}{\'z} + \DeclareUnicodeCharacter{017B}{\dotaccent{Z}} + \DeclareUnicodeCharacter{017C}{\dotaccent{z}} + \DeclareUnicodeCharacter{017D}{\v{Z}} + \DeclareUnicodeCharacter{017E}{\v{z}} + + \DeclareUnicodeCharacter{01C4}{D\v{Z}} + \DeclareUnicodeCharacter{01C5}{D\v{z}} + \DeclareUnicodeCharacter{01C6}{d\v{z}} + \DeclareUnicodeCharacter{01C7}{LJ} + \DeclareUnicodeCharacter{01C8}{Lj} + \DeclareUnicodeCharacter{01C9}{lj} + \DeclareUnicodeCharacter{01CA}{NJ} + \DeclareUnicodeCharacter{01CB}{Nj} + \DeclareUnicodeCharacter{01CC}{nj} + \DeclareUnicodeCharacter{01CD}{\v{A}} + \DeclareUnicodeCharacter{01CE}{\v{a}} + \DeclareUnicodeCharacter{01CF}{\v{I}} + + \DeclareUnicodeCharacter{01D0}{\v{\dotless{i}}} + \DeclareUnicodeCharacter{01D1}{\v{O}} + \DeclareUnicodeCharacter{01D2}{\v{o}} + \DeclareUnicodeCharacter{01D3}{\v{U}} + \DeclareUnicodeCharacter{01D4}{\v{u}} + + \DeclareUnicodeCharacter{01E2}{\={\AE}} + \DeclareUnicodeCharacter{01E3}{\={\ae}} + \DeclareUnicodeCharacter{01E6}{\v{G}} + \DeclareUnicodeCharacter{01E7}{\v{g}} + \DeclareUnicodeCharacter{01E8}{\v{K}} + \DeclareUnicodeCharacter{01E9}{\v{k}} + + \DeclareUnicodeCharacter{01F0}{\v{\dotless{j}}} + \DeclareUnicodeCharacter{01F1}{DZ} + \DeclareUnicodeCharacter{01F2}{Dz} + \DeclareUnicodeCharacter{01F3}{dz} + \DeclareUnicodeCharacter{01F4}{\'G} + \DeclareUnicodeCharacter{01F5}{\'g} + \DeclareUnicodeCharacter{01F8}{\`N} + \DeclareUnicodeCharacter{01F9}{\`n} + \DeclareUnicodeCharacter{01FC}{\'{\AE}} + \DeclareUnicodeCharacter{01FD}{\'{\ae}} + \DeclareUnicodeCharacter{01FE}{\'{\O}} + \DeclareUnicodeCharacter{01FF}{\'{\o}} + + \DeclareUnicodeCharacter{021E}{\v{H}} + \DeclareUnicodeCharacter{021F}{\v{h}} + + \DeclareUnicodeCharacter{0226}{\dotaccent{A}} + \DeclareUnicodeCharacter{0227}{\dotaccent{a}} + \DeclareUnicodeCharacter{0228}{\cedilla{E}} + \DeclareUnicodeCharacter{0229}{\cedilla{e}} + \DeclareUnicodeCharacter{022E}{\dotaccent{O}} + \DeclareUnicodeCharacter{022F}{\dotaccent{o}} + + \DeclareUnicodeCharacter{0232}{\=Y} + \DeclareUnicodeCharacter{0233}{\=y} + \DeclareUnicodeCharacter{0237}{\dotless{j}} + + \DeclareUnicodeCharacter{1E02}{\dotaccent{B}} + \DeclareUnicodeCharacter{1E03}{\dotaccent{b}} + \DeclareUnicodeCharacter{1E04}{\udotaccent{B}} + \DeclareUnicodeCharacter{1E05}{\udotaccent{b}} + \DeclareUnicodeCharacter{1E06}{\ubaraccent{B}} + \DeclareUnicodeCharacter{1E07}{\ubaraccent{b}} + \DeclareUnicodeCharacter{1E0A}{\dotaccent{D}} + \DeclareUnicodeCharacter{1E0B}{\dotaccent{d}} + \DeclareUnicodeCharacter{1E0C}{\udotaccent{D}} + \DeclareUnicodeCharacter{1E0D}{\udotaccent{d}} + \DeclareUnicodeCharacter{1E0E}{\ubaraccent{D}} + \DeclareUnicodeCharacter{1E0F}{\ubaraccent{d}} + + \DeclareUnicodeCharacter{1E1E}{\dotaccent{F}} + \DeclareUnicodeCharacter{1E1F}{\dotaccent{f}} + + \DeclareUnicodeCharacter{1E20}{\=G} + \DeclareUnicodeCharacter{1E21}{\=g} + \DeclareUnicodeCharacter{1E22}{\dotaccent{H}} + \DeclareUnicodeCharacter{1E23}{\dotaccent{h}} + \DeclareUnicodeCharacter{1E24}{\udotaccent{H}} + \DeclareUnicodeCharacter{1E25}{\udotaccent{h}} + \DeclareUnicodeCharacter{1E26}{\"H} + \DeclareUnicodeCharacter{1E27}{\"h} + + \DeclareUnicodeCharacter{1E30}{\'K} + \DeclareUnicodeCharacter{1E31}{\'k} + \DeclareUnicodeCharacter{1E32}{\udotaccent{K}} + \DeclareUnicodeCharacter{1E33}{\udotaccent{k}} + \DeclareUnicodeCharacter{1E34}{\ubaraccent{K}} + \DeclareUnicodeCharacter{1E35}{\ubaraccent{k}} + \DeclareUnicodeCharacter{1E36}{\udotaccent{L}} + \DeclareUnicodeCharacter{1E37}{\udotaccent{l}} + \DeclareUnicodeCharacter{1E3A}{\ubaraccent{L}} + \DeclareUnicodeCharacter{1E3B}{\ubaraccent{l}} + \DeclareUnicodeCharacter{1E3E}{\'M} + \DeclareUnicodeCharacter{1E3F}{\'m} + + \DeclareUnicodeCharacter{1E40}{\dotaccent{M}} + \DeclareUnicodeCharacter{1E41}{\dotaccent{m}} + \DeclareUnicodeCharacter{1E42}{\udotaccent{M}} + \DeclareUnicodeCharacter{1E43}{\udotaccent{m}} + \DeclareUnicodeCharacter{1E44}{\dotaccent{N}} + \DeclareUnicodeCharacter{1E45}{\dotaccent{n}} + \DeclareUnicodeCharacter{1E46}{\udotaccent{N}} + \DeclareUnicodeCharacter{1E47}{\udotaccent{n}} + \DeclareUnicodeCharacter{1E48}{\ubaraccent{N}} + \DeclareUnicodeCharacter{1E49}{\ubaraccent{n}} + + \DeclareUnicodeCharacter{1E54}{\'P} + \DeclareUnicodeCharacter{1E55}{\'p} + \DeclareUnicodeCharacter{1E56}{\dotaccent{P}} + \DeclareUnicodeCharacter{1E57}{\dotaccent{p}} + \DeclareUnicodeCharacter{1E58}{\dotaccent{R}} + \DeclareUnicodeCharacter{1E59}{\dotaccent{r}} + \DeclareUnicodeCharacter{1E5A}{\udotaccent{R}} + \DeclareUnicodeCharacter{1E5B}{\udotaccent{r}} + \DeclareUnicodeCharacter{1E5E}{\ubaraccent{R}} + \DeclareUnicodeCharacter{1E5F}{\ubaraccent{r}} + + \DeclareUnicodeCharacter{1E60}{\dotaccent{S}} + \DeclareUnicodeCharacter{1E61}{\dotaccent{s}} + \DeclareUnicodeCharacter{1E62}{\udotaccent{S}} + \DeclareUnicodeCharacter{1E63}{\udotaccent{s}} + \DeclareUnicodeCharacter{1E6A}{\dotaccent{T}} + \DeclareUnicodeCharacter{1E6B}{\dotaccent{t}} + \DeclareUnicodeCharacter{1E6C}{\udotaccent{T}} + \DeclareUnicodeCharacter{1E6D}{\udotaccent{t}} + \DeclareUnicodeCharacter{1E6E}{\ubaraccent{T}} + \DeclareUnicodeCharacter{1E6F}{\ubaraccent{t}} + + \DeclareUnicodeCharacter{1E7C}{\~V} + \DeclareUnicodeCharacter{1E7D}{\~v} + \DeclareUnicodeCharacter{1E7E}{\udotaccent{V}} + \DeclareUnicodeCharacter{1E7F}{\udotaccent{v}} + + \DeclareUnicodeCharacter{1E80}{\`W} + \DeclareUnicodeCharacter{1E81}{\`w} + \DeclareUnicodeCharacter{1E82}{\'W} + \DeclareUnicodeCharacter{1E83}{\'w} + \DeclareUnicodeCharacter{1E84}{\"W} + \DeclareUnicodeCharacter{1E85}{\"w} + \DeclareUnicodeCharacter{1E86}{\dotaccent{W}} + \DeclareUnicodeCharacter{1E87}{\dotaccent{w}} + \DeclareUnicodeCharacter{1E88}{\udotaccent{W}} + \DeclareUnicodeCharacter{1E89}{\udotaccent{w}} + \DeclareUnicodeCharacter{1E8A}{\dotaccent{X}} + \DeclareUnicodeCharacter{1E8B}{\dotaccent{x}} + \DeclareUnicodeCharacter{1E8C}{\"X} + \DeclareUnicodeCharacter{1E8D}{\"x} + \DeclareUnicodeCharacter{1E8E}{\dotaccent{Y}} + \DeclareUnicodeCharacter{1E8F}{\dotaccent{y}} + + \DeclareUnicodeCharacter{1E90}{\^Z} + \DeclareUnicodeCharacter{1E91}{\^z} + \DeclareUnicodeCharacter{1E92}{\udotaccent{Z}} + \DeclareUnicodeCharacter{1E93}{\udotaccent{z}} + \DeclareUnicodeCharacter{1E94}{\ubaraccent{Z}} + \DeclareUnicodeCharacter{1E95}{\ubaraccent{z}} + \DeclareUnicodeCharacter{1E96}{\ubaraccent{h}} + \DeclareUnicodeCharacter{1E97}{\"t} + \DeclareUnicodeCharacter{1E98}{\ringaccent{w}} + \DeclareUnicodeCharacter{1E99}{\ringaccent{y}} + + \DeclareUnicodeCharacter{1EA0}{\udotaccent{A}} + \DeclareUnicodeCharacter{1EA1}{\udotaccent{a}} + + \DeclareUnicodeCharacter{1EB8}{\udotaccent{E}} + \DeclareUnicodeCharacter{1EB9}{\udotaccent{e}} + \DeclareUnicodeCharacter{1EBC}{\~E} + \DeclareUnicodeCharacter{1EBD}{\~e} + + \DeclareUnicodeCharacter{1ECA}{\udotaccent{I}} + \DeclareUnicodeCharacter{1ECB}{\udotaccent{i}} + \DeclareUnicodeCharacter{1ECC}{\udotaccent{O}} + \DeclareUnicodeCharacter{1ECD}{\udotaccent{o}} + + \DeclareUnicodeCharacter{1EE4}{\udotaccent{U}} + \DeclareUnicodeCharacter{1EE5}{\udotaccent{u}} + + \DeclareUnicodeCharacter{1EF2}{\`Y} + \DeclareUnicodeCharacter{1EF3}{\`y} + \DeclareUnicodeCharacter{1EF4}{\udotaccent{Y}} + + \DeclareUnicodeCharacter{1EF8}{\~Y} + \DeclareUnicodeCharacter{1EF9}{\~y} + + \DeclareUnicodeCharacter{2013}{--} + \DeclareUnicodeCharacter{2014}{---} + \DeclareUnicodeCharacter{2018}{\quoteleft} + \DeclareUnicodeCharacter{2019}{\quoteright} + \DeclareUnicodeCharacter{201A}{\quotesinglbase} + \DeclareUnicodeCharacter{201C}{\quotedblleft} + \DeclareUnicodeCharacter{201D}{\quotedblright} + \DeclareUnicodeCharacter{201E}{\quotedblbase} + \DeclareUnicodeCharacter{2022}{\bullet} + \DeclareUnicodeCharacter{2026}{\dots} + \DeclareUnicodeCharacter{2039}{\guilsinglleft} + \DeclareUnicodeCharacter{203A}{\guilsinglright} + \DeclareUnicodeCharacter{20AC}{\euro} + + \DeclareUnicodeCharacter{2192}{\expansion} + \DeclareUnicodeCharacter{21D2}{\result} + + \DeclareUnicodeCharacter{2212}{\minus} + \DeclareUnicodeCharacter{2217}{\point} + \DeclareUnicodeCharacter{2261}{\equiv} +}% end of \utfeightchardefs + + +% US-ASCII character definitions. +\def\asciichardefs{% nothing need be done + \relax +} + +% Make non-ASCII characters printable again for compatibility with +% existing Texinfo documents that may use them, even without declaring a +% document encoding. +% +\setnonasciicharscatcode \other + + +\message{formatting,} + \newdimen\defaultparindent \defaultparindent = 15pt \chapheadingskip = 15pt plus 4pt minus 2pt @@ -7110,7 +8586,7 @@ should work if nowhere else does.} % Don't be so finicky about underfull hboxes, either. \hbadness = 2000 -% Following George Bush, just get rid of widows and orphans. +% Following George Bush, get rid of widows and orphans. \widowpenalty=10000 \clubpenalty=10000 @@ -7157,6 +8633,10 @@ should work if nowhere else does.} \ifpdf \pdfpageheight #7\relax \pdfpagewidth #8\relax + % if we don't reset these, they will remain at "1 true in" of + % whatever layout pdftex was dumped with. + \pdfhorigin = 1 true in + \pdfvorigin = 1 true in \fi % \setleading{\textleading} @@ -7171,7 +8651,7 @@ should work if nowhere else does.} \textleading = 13.2pt % % If page is nothing but text, make it come out even. - \internalpagesizes{46\baselineskip}{6in}% + \internalpagesizes{607.2pt}{6in}% that's 46 lines {\voffset}{.25in}% {\bindingoffset}{36pt}% {11in}{8.5in}% @@ -7183,7 +8663,7 @@ should work if nowhere else does.} \textleading = 12pt % \internalpagesizes{7.5in}{5in}% - {\voffset}{.25in}% + {-.2in}{0in}% {\bindingoffset}{16pt}% {9.25in}{7in}% % @@ -7227,7 +8707,7 @@ should work if nowhere else does.} % \global\normaloffset = -6mm % \global\bindingoffset = 10mm % @end tex - \internalpagesizes{51\baselineskip}{160mm} + \internalpagesizes{673.2pt}{160mm}% that's 51 lines {\voffset}{\hoffset}% {\bindingoffset}{44pt}% {297mm}{210mm}% @@ -7292,7 +8772,7 @@ should work if nowhere else does.} \parskip = 3pt plus 2pt minus 1pt \setleading{\textleading}% % - \dimen0 = #1 + \dimen0 = #1\relax \advance\dimen0 by \voffset % \dimen2 = \hsize diff --git a/doc/tinc.conf.5.in b/doc/tinc.conf.5.in index 978bdc1..0ad3da3 100644 --- a/doc/tinc.conf.5.in +++ b/doc/tinc.conf.5.in @@ -1,21 +1,25 @@ -.Dd 2002-04-09 +.Dd 2008-12-22 .Dt TINC.CONF 5 .\" Manual page created by: .\" Ivo Timmermans .\" Guus Sliepen + .Sh NAME .Nm tinc.conf .Nd tinc daemon configuration + .Sh DESCRIPTION The files in the .Pa @sysconfdir@/tinc/ directory contain runtime and security information for the tinc daemon. + .Sh NETWORKS It is perfectly ok for you to run more than one tinc daemon. However, in its default form, you will soon notice that you can't use two different configuration files without the .Fl c option. + .Pp We have thought of another way of dealing with this: network names. This means that you call @@ -23,6 +27,7 @@ This means that you call with the .Fl n option, which will assign a name to this daemon. + .Pp The effect of this is that the daemon will set its configuration root to .Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa / , @@ -33,6 +38,7 @@ is your argument to the option. You'll notice that messages appear in syslog as coming from .Nm tincd. Ns Ar NETNAME . + .Pp However, it is not strictly necessary that you call tinc with the .Fl n @@ -48,21 +54,25 @@ the configuration file should be .Pa @sysconfdir@/tinc/tinc.conf , and the host configuration files are now expected to be in .Pa @sysconfdir@/tinc/hosts/ . + .Pp But it is highly recommended that you use this feature of .Nm tinc , because it will be so much clearer whom your daemon talks to. Hence, we will assume that you use it. + .Sh NAMES Each tinc daemon should have a name that is unique in the network which it will be part of. The name will be used by other tinc daemons for identification. The name has to be declared in the .Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa /tinc.conf file. + .Pp To make things easy, choose something that will give unique and easy to remember names to your tinc daemon(s). You could try things like hostnames, owner surnames or location names. + .Sh PUBLIC/PRIVATE KEYS You should use .Ic tincd -K @@ -81,14 +91,17 @@ The public key should be stored in the host configuration file .Va NAME stands for the name of the local tinc daemon (see .Sx NAMES ) . + .Sh SERVER CONFIGURATION The server configuration of the daemon is done in the file .Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa /tinc.conf . This file consists of comments (lines started with a .Li # ) or assignments in the form of: + .Pp .Va Variable Li = Ar Value . + .Pp The variable names are case insensitive, and any spaces, tabs, newlines and carriage returns are ignored. @@ -96,30 +109,37 @@ Note: it is not required that you put in the .Li = sign, but doing so improves readability. If you leave it out, remember to replace it with at least one space character. + .Pp Here are all valid variables, listed in alphabetical order. The default value is given between parentheses. .Bl -tag -width indent + .It Va AddressFamily Li = ipv4 | ipv6 | any Pq any This option affects the address family of listening and outgoing sockets. If .Qq any is selected, then depending on the operating system both IPv4 and IPv6 or just IPv6 listening sockets will be created. + .It Va BindToAddress Li = Ar address Bq experimental If your computer has more than one IPv4 or IPv6 address, .Nm tinc will by default listen on all of them for incoming connections. It is possible to bind only to a single address with this variable. + .Pp This option may not work on all platforms. + .It Va BindToInterface Li = Ar interface Bq experimental If your computer has more than one network interface, .Nm tinc will by default listen on all of them for incoming connections. It is possible to bind only to a single interface with this variable. + .Pp This option may not work on all platforms. + .It Va ConnectTo Li = Ar name Specifies which other tinc daemon to connect to on startup. Multiple @@ -130,12 +150,14 @@ The names should be known to this tinc daemon (i.e., there should be a host configuration file for the name on the .Va ConnectTo line). + .Pp If you don't specify a host with .Va ConnectTo , .Nm tinc won't try to connect to other daemons at all, and will instead just listen for incoming connections. + .It Va Device Li = Ar device Po Pa /dev/tap0 , Pa /dev/net/tun No or other depending on platform Pc The virtual network device to use. .Nm tinc @@ -147,6 +169,36 @@ instead of .Va Device . The info pages of the tinc package contain more information about configuring the virtual network device. + +.It Va DeviceType Li = tun | tunnohead | tunifhead | tap Po only supported on BSD platforms Pc +The type of the virtual network device. +Tinc will normally automatically select the right type, and this option should not be used. +However, in case tinc does not seem to correctly interpret packets received from the virtual network device, +using this option might help. +.Bl -tag -width indent + +.It tun +Set type to tun. +Depending on the platform, this can either be with or without an address family header (see below). + +.It tunnohead +Set type to tun without an address family header. +Tinc will expect packets read from the virtual network device to start with an IP header. +On some platforms IPv6 packets cannot be read from or written to the device in this mode. + +.It tunifhead +Set type to tun with an address family header. +Tinc will expect packets read from the virtual network device +to start with a four byte header containing the address family, +followed by an IP header. +This mode should support both IPv4 and IPv6 packets. + +.It tap +Set type to tap. +Tinc will expect packets read from the virtual network device +to start with an Ethernet header. +.El + .It Va GraphDumpFile Li = Ar filename Bq experimental If this option is present, .Nm tinc @@ -159,14 +211,17 @@ If starts with a pipe symbol |, then the rest of the filename is interpreted as a shell command that is executed, the graph is then sent to stdin. + .It Va Hostnames Li = yes | no Pq no This option selects whether IP addresses (both real and on the VPN) should be resolved. Since DNS lookups are blocking, it might affect tinc's efficiency, even stopping the daemon for a few seconds every time it does a lookup if your DNS server is not responding. + .Pp This does not affect resolving hostnames to IP addresses from the host configuration files. + .It Va Interface Li = Ar interface Defines the name of the interface corresponding to the virtual network device. Depending on the operating system and the type of device this may or may not actually set the name of the interface. @@ -174,58 +229,73 @@ Under Windows, this variable is used to select which network interface will be u If you specified a .Va Device , this variable is almost always already correctly set. + .It Va KeyExpire Li = Ar seconds Pq 3600 This option controls the period the encryption keys used to encrypt the data are valid. It is common practice to change keys at regular intervals to make it even harder for crackers, even though it is thought to be nearly impossible to crack a single key. + .It Va MACExpire Li = Ar seconds Pq 600 This option controls the amount of time MAC addresses are kept before they are removed. This only has effect when .Va Mode is set to .Qq switch . + .It Va MaxTimeout Li = Ar seconds Pq 900 This is the maximum delay before trying to reconnect to other tinc daemons. + .It Va Mode Li = router | switch | hub Pq router This option selects the way packets are routed to other daemons. .Bl -tag -width indent + .It router In this mode .Va Subnet variables in the host configuration files will be used to form a routing table. Only unicast packets of routable protocols (IPv4 and IPv6) are supported in this mode. + .Pp This is the default mode, and unless you really know you need another mode, don't change it. + .It switch In this mode the MAC addresses of the packets on the VPN will be used to dynamically create a routing table just like an Ethernet switch does. Unicast, multicast and broadcast packets of every protocol that runs over Ethernet are supported in this mode at the cost of frequent broadcast ARP requests and routing table updates. + .Pp This mode is primarily useful if you want to bridge Ethernet segments. + .It hub This mode is almost the same as the switch mode, but instead every packet will be broadcast to the other daemons while no routing table is managed. .El + .It Va Name Li = Ar name Bq required This is the name which identifies this tinc daemon. It must be unique for the virtual private network this daemon will connect to. + .It Va PingInterval Li = Ar seconds Pq 60 The number of seconds of inactivity that .Nm tinc will wait before sending a probe to the other end. + .It Va PingTimeout Li = Ar seconds Pq 5 The number of seconds to wait for a response to pings or to allow meta connections to block. If the other end doesn't respond within this time, the connection is terminated, and the others will be notified of this. + .It Va PriorityInheritance Li = yes | no Po no Pc Bq experimental When this option is enabled the value of the TOS field of tunneled IPv4 packets will be inherited by the UDP packets that are sent out. + .It Va PrivateKey Li = Ar key Bq obsolete The private RSA key of this tinc daemon. It will allow this tinc daemon to authenticate itself to other daemons. + .It Va PrivateKeyFile Li = Ar filename Po Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa /rsa_key.priv Pc The file in which the private RSA key of this tinc daemon resides. Note that there must be exactly one of @@ -233,17 +303,20 @@ Note that there must be exactly one of or .Va PrivateKeyFile specified in the configuration file. + .It Va TunnelServer Li = yes | no Po no Pc Bq experimental When this option is enabled tinc will no longer forward information between other tinc daemons, and will only allow nodes and subnets on the VPN which are present in the .Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa /hosts/ directory. .El + .Sh HOST CONFIGURATION FILES The host configuration files contain all information needed to establish a connection to those hosts. A host configuration file is also required for the local tinc daemon, it will use it to read in it's listen port, public key and subnets. + .Pp The idea is that these files are portable. You can safely mail your own host configuration file to someone else. @@ -252,6 +325,7 @@ and now his tinc daemon will be able to connect to your tinc daemon. Since host configuration files only contain public keys, no secrets are revealed by sending out this information. .Bl -tag -width indent + .It Va Address Li = Ar address Bq recommended The IP address or hostname of this tinc daemon on the real network. This will only be used when trying to make an outgoing connection to this tinc daemon. @@ -259,6 +333,7 @@ Multiple .Va Address variables can be specified, in which case each address will be tried until a working connection has been established. + .It Va Cipher Li = Ar cipher Pq blowfish The symmetric cipher algorithm used to encrypt UDP packets. Any cipher supported by OpenSSL is recognised. @@ -266,16 +341,19 @@ Furthermore, specifying .Qq none will turn off packet encryption. It is best to use only those ciphers which support CBC mode. + .It Va Compression Li = Ar level Pq 0 This option sets the level of compression used for UDP packets. Possible values are 0 (off), 1 (fast zlib) and any integer up to 9 (best zlib), 10 (fast lzo) and 11 (best lzo). + .It Va Digest Li = Ar digest Pq sha1 The digest algorithm used to authenticate UDP packets. Any digest supported by OpenSSL is recognised. Furthermore, specifying .Qq none will turn off packet authentication. + .It Va IndirectData Li = yes | no Pq no This option specifies whether other tinc daemons besides the one you specified with .Va ConnectTo @@ -283,23 +361,30 @@ can make a direct connection to you. This is especially useful if you are behind a firewall and it is impossible to make a connection from the outside to your tinc daemon. Otherwise, it is best to leave this option out or set it to no. + .It Va MACLength Li = Ar length Pq 4 The length of the message authentication code used to authenticate UDP packets. Can be anything from .Qq 0 up to the length of the digest produced by the digest algorithm. -.It Va PMTU Li = Ar mtu Po 1514 Pc Bq experimental + +.It Va PMTU Li = Ar mtu Po 1514 Pc This option controls the initial path MTU to this node. -.It Va PMTUDiscovery Li = yes | no Po no Pc Bq experimental + +.It Va PMTUDiscovery Li = yes | no Po yes Pc When this option is enabled, tinc will try to discover the path MTU to this node. After the path MTU has been discovered, it will be enforced on the VPN. + .It Va Port Li = Ar port Pq 655 The port number on which this tinc daemon is listening for incoming connections. + .It Va PublicKey Li = Ar key Bq obsolete The public RSA key of this tinc daemon. It will be used to cryptographically verify it's identity and to set up a secure connection. + .It Va PublicKeyFile Li = Ar filename Bq obsolete The file in which the public RSA key of this tinc daemon resides. + .Pp From version 1.0pre4 on .Nm tinc @@ -308,6 +393,7 @@ the above two options then are not necessary. Either the PEM format is used, or exactly one of the above two options must be specified in each host configuration file, if you want to be able to establish a connection with that host. + .It Va Subnet Li = Ar address Ns Op Li / Ns Ar prefixlength The subnet which this tinc daemon will serve. .Nm tinc @@ -317,6 +403,7 @@ it will be sent to the daemon who has this subnet in his host configuration file Multiple .Va Subnet variables can be specified. + .Pp Subnets can either be single MAC, IPv4 or IPv6 addresses, in which case a subnet consisting of only that single address is assumed, @@ -328,6 +415,7 @@ Note that subnets like 192.168.1.1/24 are invalid! Read a networking HOWTO/FAQ/guide if you don't understand this. IPv6 subnets are notated like fec0:0:0:1:0:0:0:0/64. MAC addresses are notated like 0:1a:2b:3c:4d:5e. + .It Va TCPOnly Li = yes | no Pq no If this variable is set to yes, then the packets are tunnelled over the TCP connection instead of a UDP connection. @@ -336,38 +424,48 @@ from behind a masquerading firewall, or if UDP packet routing is disabled somehow. Setting this options also implicitly sets IndirectData. .El + .Sh SCRIPTS Apart from reading the server and host configuration files, tinc can also run scripts at certain moments. Under Windows (not Cygwin), the scripts should have the extension .Pa .bat . .Bl -tag -width indent + .It Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa /tinc-up This is the most important script. If it is present it will be executed right after the tinc daemon has been started and has connected to the virtual network device. It should be used to set up the corresponding network interface, but can also be used to start other things. Under Windows you can use the Network Connections control panel instead of creating this script. + .It Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa /tinc-down This script is started right before the tinc daemon quits. + .It Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa /hosts/ Ns Ar HOST Ns Pa -up This script is started when the tinc daemon with name .Ar HOST becomes reachable. + .It Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa /hosts/ Ns Ar HOST Ns Pa -down This script is started when the tinc daemon with name .Ar HOST becomes unreachable. + .It Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa /host-up This script is started when any host becomes reachable. + .It Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa /host-down This script is started when any host becomes unreachable. + .It Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa /subnet-up This script is started when a Subnet becomes reachable. The Subnet and the node it belongs to are passed in environment variables. + .It Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa /subnet-down This script is started when a Subnet becomes unreachable. .El + .Pp The scripts are started without command line arguments, but can make use of certain environment variables. Under UNIX like operating systems the names of environment variables must be preceded by a @@ -379,49 +477,65 @@ files, they have to be put between .Li % signs. .Bl -tag -width indent + .It Ev NETNAME If a netname was specified, this environment variable contains it. + .It Ev NAME Contains the name of this tinc daemon. + .It Ev DEVICE Contains the name of the virtual network device that tinc uses. + .It Ev INTERFACE Contains the name of the virtual network interface that tinc uses. This should be used for commands like .Pa ifconfig . + .It Ev NODE When a host becomes (un)reachable, this is set to its name. If a subnet becomes (un)reachable, this is set to the owner of that subnet. + .It Ev REMOTEADDRESS When a host becomes (un)reachable, this is set to its real address. + .It Ev REMOTEPORT When a host becomes (un)reachable, this is set to the port number it uses for communication with other tinc daemons. + .It Ev SUBNET When a subnet becomes (un)reachable, this is set to the subnet. .El + .Sh FILES The most important files are: .Bl -tag -width indent + .It Pa @sysconfdir@/tinc/ The top directory for configuration files. + .It Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa /tinc.conf The default name of the server configuration file for net .Ar NETNAME . + .It Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa /hosts/ Host configuration files are kept in this directory. + .It Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa /tinc-up If an executable file with this name exists, it will be executed right after the tinc daemon has connected to the virtual network device. It can be used to set up the corresponding network interface. + .It Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa /tinc-down If an executable file with this name exists, it will be executed right before the tinc daemon is going to close its connection to the virtual network device. .El + .Sh SEE ALSO .Xr tincd 8 , .Pa http://www.tinc-vpn.org/ , .Pa http://www.linuxdoc.org/LDP/nag2/ . + .Pp The full documentation for .Nm tinc @@ -429,6 +543,7 @@ is maintained as a Texinfo manual. If the info and tinc programs are properly installed at your site, the command .Ic info tinc should give you access to the complete manual. + .Pp .Nm tinc comes with ABSOLUTELY NO WARRANTY. diff --git a/doc/tinc.info b/doc/tinc.info index c547042..a4f7858 100644 --- a/doc/tinc.info +++ b/doc/tinc.info @@ -1,17 +1,17 @@ -This is tinc.info, produced by makeinfo version 4.8 from tinc.texi. +This is tinc.info, produced by makeinfo version 4.11 from tinc.texi. INFO-DIR-SECTION Networking tools START-INFO-DIR-ENTRY * tinc: (tinc). The tinc Manual. END-INFO-DIR-ENTRY - This is the info manual for tinc version 1.0.8, a Virtual Private + This is the info manual for tinc version 1.0.9, a Virtual Private Network daemon. - Copyright (C) 1998-2006 Ivo Timmermans, Guus Sliepen + Copyright (C) 1998-2008 Ivo Timmermans, Guus Sliepen and Wessel Dankers . - $Id: tinc.texi 1467 2006-11-11 20:37:58Z guus $ + $Id: tinc.texi 1597 2008-12-22 21:29:21Z guus $ Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are @@ -173,8 +173,7 @@ File: tinc.info, Node: Configuring the kernel, Next: Libraries, Up: Preparati * Menu: -* Configuration of Linux kernels 2.1.60 up to 2.4.0:: -* Configuration of Linux kernels 2.4.0 and higher:: +* Configuration of Linux kernels:: * Configuration of FreeBSD kernels:: * Configuration of OpenBSD kernels:: * Configuration of NetBSD kernels:: @@ -183,53 +182,14 @@ File: tinc.info, Node: Configuring the kernel, Next: Libraries, Up: Preparati * Configuration of Windows::  -File: tinc.info, Node: Configuration of Linux kernels 2.1.60 up to 2.4.0, Next: Configuration of Linux kernels 2.4.0 and higher, Up: Configuring the kernel +File: tinc.info, Node: Configuration of Linux kernels, Next: Configuration of FreeBSD kernels, Up: Configuring the kernel -2.1.1 Configuration of Linux kernels 2.1.60 up to 2.4.0 -------------------------------------------------------- +2.1.1 Configuration of Linux kernels +------------------------------------ -For kernels up to 2.4.0, you need a kernel that supports the ethertap +For tinc to work, you need a kernel that supports the Universal tun/tap device. Most distributions come with kernels that already support this. -If not, here are the options you have to turn on when configuring a new -kernel: - - Code maturity level options - [*] Prompt for development and/or incomplete code/drivers - Networking options - [*] Kernel/User netlink socket - Netlink device emulation - Network device support - Ethertap network tap - - If you want to run more than one instance of tinc or other programs -that use the ethertap, you have to compile the ethertap driver as a -module, otherwise you can also choose to compile it directly into the -kernel. - - If you decide to build any of these as dynamic kernel modules, it's -a good idea to add these lines to `/etc/modules.conf': - - alias char-major-36 netlink_dev - alias tap0 ethertap - options tap0 -o tap0 unit=0 - alias tap1 ethertap - options tap1 -o tap1 unit=1 - ... - alias tap_N_ ethertap - options tap_N_ -o tap_N_ unit=_N_ - - Add as much alias/options lines as necessary. - - -File: tinc.info, Node: Configuration of Linux kernels 2.4.0 and higher, Next: Configuration of FreeBSD kernels, Prev: Configuration of Linux kernels 2.1.60 up to 2.4.0, Up: Configuring the kernel - -2.1.2 Configuration of Linux kernels 2.4.0 and higher ------------------------------------------------------ - -For kernels 2.4.0 and higher, you need a kernel that supports the -Universal tun/tap device. Most distributions come with kernels that -already support this. Here are the options you have to turn on when -configuring a new kernel: +Here are the options you have to turn on when configuring a new kernel: Code maturity level options [*] Prompt for development and/or incomplete code/drivers @@ -239,20 +199,15 @@ configuring a new kernel: It's not necessary to compile this driver as a module, even if you are going to run more than one instance of tinc. - If you have an early 2.4 kernel, you can choose both the tun/tap -driver and the `Ethertap network tap' device. This latter is marked -obsolete, and chances are that it won't even function correctly -anymore. Make sure you select the universal tun/tap driver. - If you decide to build the tun/tap driver as a kernel module, add these lines to `/etc/modules.conf': alias char-major-10-200 tun  -File: tinc.info, Node: Configuration of FreeBSD kernels, Next: Configuration of OpenBSD kernels, Prev: Configuration of Linux kernels 2.4.0 and higher, Up: Configuring the kernel +File: tinc.info, Node: Configuration of FreeBSD kernels, Next: Configuration of OpenBSD kernels, Prev: Configuration of Linux kernels, Up: Configuring the kernel -2.1.3 Configuration of FreeBSD kernels +2.1.2 Configuration of FreeBSD kernels -------------------------------------- For FreeBSD version 4.1 and higher, tun and tap drivers are included in @@ -261,18 +216,20 @@ the default kernel configuration. Using tap devices is recommended.  File: tinc.info, Node: Configuration of OpenBSD kernels, Next: Configuration of NetBSD kernels, Prev: Configuration of FreeBSD kernels, Up: Configuring the kernel -2.1.4 Configuration of OpenBSD kernels +2.1.3 Configuration of OpenBSD kernels -------------------------------------- For OpenBSD version 2.9 and higher, the tun driver is included in the default kernel configuration. There is also a kernel patch from `http://diehard.n-r-g.com/stuff/openbsd/' which adds a tap device to -OpenBSD. This should work with tinc. +OpenBSD which should work with tinc, but with recent versions of +OpenBSD, a tun device can act as a tap device by setting the link0 +option with ifconfig.  File: tinc.info, Node: Configuration of NetBSD kernels, Next: Configuration of Solaris kernels, Prev: Configuration of OpenBSD kernels, Up: Configuring the kernel -2.1.5 Configuration of NetBSD kernels +2.1.4 Configuration of NetBSD kernels ------------------------------------- For NetBSD version 1.5.2 and higher, the tun driver is included in the @@ -283,7 +240,7 @@ default kernel configuration.  File: tinc.info, Node: Configuration of Solaris kernels, Next: Configuration of Darwin (MacOS/X) kernels, Prev: Configuration of NetBSD kernels, Up: Configuring the kernel -2.1.6 Configuration of Solaris kernels +2.1.5 Configuration of Solaris kernels -------------------------------------- For Solaris 8 (SunOS 5.8) and higher, the tun driver may or may not be @@ -296,7 +253,7 @@ header file is missing, install it from the source package.  File: tinc.info, Node: Configuration of Darwin (MacOS/X) kernels, Next: Configuration of Windows, Prev: Configuration of Solaris kernels, Up: Configuring the kernel -2.1.7 Configuration of Darwin (MacOS/X) kernels +2.1.6 Configuration of Darwin (MacOS/X) kernels ----------------------------------------------- Tinc on Darwin relies on a tunnel driver for its data acquisition from @@ -312,7 +269,7 @@ with the following command:  File: tinc.info, Node: Configuration of Windows, Prev: Configuration of Darwin (MacOS/X) kernels, Up: Configuring the kernel -2.1.8 Configuration of Windows +2.1.7 Configuration of Windows ------------------------------ You will need to install the latest TAP-Win32 driver from OpenVPN. You @@ -550,35 +507,13 @@ File: tinc.info, Node: Device files, Next: Other files, Up: System files 3.2.1 Device files ------------------ -First, you'll need the special device file(s) that form the interface -between the kernel and the daemon. +Most operating systems nowadays come with the necessary device files by +default, or they have a mechanism to create them on demand. - The permissions for these files have to be such that only the super -user may read/write to this file. You'd want this, because otherwise -eavesdropping would become a bit too easy. This does, however, imply -that you'd have to run tincd as root. + If you use Linux and do not have udev installed, you may need to +create the following device file if it does not exist: - If you use Linux and have a kernel version prior to 2.4.0, you have -to make the ethertap devices: - - mknod -m 600 /dev/tap0 c 36 16 - mknod -m 600 /dev/tap1 c 36 17 - ... - mknod -m 600 /dev/tap_N_ c 36 _N+16_ - - There is a maximum of 16 ethertap devices. - - If you use the universal tun/tap driver, you have to create the -following device file (unless it already exist): - - mknod -m 600 /dev/tun c 10 200 - - If you use Linux, and you run the new 2.4 kernel using the devfs -filesystem, then the tun/tap device will probably be automatically -generated as `/dev/net/tun'. - - Unlike the ethertap device, you do not need multiple device files if -you are planning to run multiple tinc daemons. + mknod -m 600 /dev/net/tun c 10 200  File: tinc.info, Node: Other files, Prev: Device files, Up: System files @@ -774,9 +709,37 @@ Device = (`/dev/tap0', `/dev/net/tun' or other depending on platform) The virtual network device to use. Tinc will automatically detect what kind of device it is. Note that you can only use one device per daemon. Under Windows, use INTERFACE instead of DEVICE. Note - that you can only use one device per daemon. See also *Note + that you can only use one device per daemon. See also *note Device files::. +DeviceType = (only supported on BSD platforms) + The type of the virtual network device. Tinc will normally + automatically select the right type, and this option should not be + used. However, in case tinc does not seem to correctly interpret + packets received from the virtual network device, using this + option might help. + + tun + Set type to tun. Depending on the platform, this can either + be with or without an address family header (see below). + + tunnohead + Set type to tun without an address family header. Tinc will + expect packets read from the virtual network device to start + with an IP header. On some platforms IPv6 packets cannot be + read from or written to the device in this mode. + + tunifhead + Set type to tun with an address family header. Tinc will + expect packets read from the virtual network device to start + with a four byte header containing the address family, + followed by an IP header. This mode should support both IPv4 + and IPv6 packets. + + tap + Set type to tap. Tinc will expect packets read from the + virtual network device to start with an Ethernet header. + GraphDumpFile = [experimental] If this option is present, tinc will dump the current network graph to the file FILENAME every minute, unless there were no @@ -843,7 +806,9 @@ MACExpire = (600) "switch". Name = [required] - This is a symbolic name for this connection. It can be anything + This is a symbolic name for this connection. The name should + consist only of alfanumeric and underscore characters (a-z, A-Z, + 0-9 and _). PingInterval = (60) The number of seconds of inactivity that tinc will wait before @@ -921,6 +886,14 @@ MACLength = (4) UDP packets. Can be anything from 0 up to the length of the digest produced by the digest algorithm. +PMTU = (1514) + This option controls the initial path MTU to this node. + +PMTUDiscovery = (yes) + When this option is enabled, tinc will try to discover the path + MTU to this node. After the path MTU has been discovered, it will + be enforced on the VPN. + Port = (655) This is the port this tinc daemon listens on. You can use decimal portnumbers or symbolic names (as listed in `/etc/services'). @@ -963,7 +936,7 @@ Subnet = becomes /22. This conforms to standard CIDR notation as described in RFC1519 (ftp://ftp.isi.edu/in-notes/rfc1519.txt) -TCPonly = (no) [experimental] +TCPonly = (no) If this variable is set to yes, then the packets are tunnelled over a TCP connection instead of a UDP connection. This is especially useful for those who want to run a tinc daemon from @@ -1140,7 +1113,7 @@ subnet. The exact syntax of the ifconfig and route commands differs from platform to platform. You can look up the commands for setting -addresses and adding routes in *Note Platform specific information::, +addresses and adding routes in *note Platform specific information::, but it is best to consult the manpages of those utilities on your platform. @@ -1618,7 +1591,7 @@ File: tinc.info, Node: Sending bug reports, Prev: Error messages, Up: Running ======================= If you really can't find the cause of a problem, or if you suspect tinc -is not working right, you can send us a bugreport, see *Note Contact +is not working right, you can send us a bugreport, see *note Contact information::. Be sure to include the following information in your bugreport: @@ -1774,7 +1747,7 @@ possible to use tools such as telnet or netcat to connect to a tinc daemon started with the -bypass-security option and to read and write requests by hand, provided that one understands the numeric codes sent. - The authentication scheme is described in *Note Authentication + The authentication scheme is described in *note Authentication protocol::. After a successful authentication, the server and the client will exchange all the information about other tinc daemons and subnets they know of, so that both sides (and all the other tinc @@ -2219,7 +2192,7 @@ Concept Index * CHALLENGE: Authentication protocol. (line 10) * CIDR notation: Host configuration variables. - (line 77) + (line 85) * Cipher: Host configuration variables. (line 11) * client: How connections work. @@ -2240,51 +2213,51 @@ Concept Index * Device: Main configuration variables. (line 38) * device files: Device files. (line 6) +* DeviceType: Main configuration variables. + (line 45) * Digest: Host configuration variables. (line 22) * encapsulating: The UDP tunnel. (line 30) * encryption: Encryption of network packets. (line 6) * environment variables: Scripts. (line 43) -* ethertap: Configuration of Linux kernels 2.1.60 up to 2.4.0. - (line 6) * example: Example configuration. (line 6) * frame type: The UDP tunnel. (line 6) * GraphDumpFile: Main configuration variables. - (line 45) + (line 73) * Hostnames: Main configuration variables. - (line 53) + (line 81) * hub: Main configuration variables. - (line 94) + (line 122) * ID: Authentication protocol. (line 10) * IndirectData: Host configuration variables. (line 27) * INTERFACE: Scripts. (line 58) * Interface: Main configuration variables. - (line 63) + (line 91) * IRC: Contact information. (line 9) * key generation: Generating keypairs. (line 6) * KEY_CHANGED: The meta-protocol. (line 64) * KeyExpire: Main configuration variables. - (line 99) + (line 127) * libraries: Libraries. (line 6) * license: OpenSSL. (line 36) * lzo: lzo. (line 6) * MACExpire: Main configuration variables. - (line 105) + (line 133) * MACLength: Host configuration variables. (line 35) * meta-protocol: The meta-connection. (line 18) * META_KEY: Authentication protocol. (line 10) * Mode: Main configuration variables. - (line 71) + (line 99) * multiple networks: Multiple networks. (line 6) * NAME: Scripts. (line 52) * Name: Main configuration variables. - (line 110) + (line 138) * netmask: Network interfaces. (line 34) * NETNAME: Scripts. (line 49) * netname: Multiple networks. (line 6) @@ -2294,36 +2267,40 @@ Concept Index * OpenSSL: OpenSSL. (line 6) * options: Runtime options. (line 9) * PEM format: Host configuration variables. - (line 52) + (line 60) * PING: The meta-protocol. (line 89) * PingInterval: Main configuration variables. - (line 113) + (line 143) * PingTimeout: Main configuration variables. - (line 117) + (line 147) * platforms: Supported platforms. (line 6) +* PMTU: Host configuration variables. + (line 40) +* PMTUDiscovery: Host configuration variables. + (line 43) * PONG: The meta-protocol. (line 89) * Port: Host configuration variables. - (line 40) + (line 48) * port numbers: Other files. (line 17) * PriorityInheritance: Main configuration variables. - (line 123) + (line 153) * private: Virtual Private Networks. (line 10) * PrivateKey: Main configuration variables. - (line 128) + (line 158) * PrivateKeyFile: Main configuration variables. - (line 134) + (line 164) * PublicKey: Host configuration variables. - (line 44) + (line 52) * PublicKeyFile: Host configuration variables. - (line 47) + (line 55) * release: Supported platforms. (line 14) * REMOTEADDRESS: Scripts. (line 67) * REMOTEPORT: Scripts. (line 70) * REQ_KEY: The meta-protocol. (line 64) * requirements: Libraries. (line 6) * router: Main configuration variables. - (line 74) + (line 102) * runtime options: Runtime options. (line 9) * scalability: tinc. (line 19) * scripts: Scripts. (line 6) @@ -2332,13 +2309,13 @@ Concept Index * signals: Signals. (line 6) * SUBNET: Scripts. (line 74) * Subnet: Host configuration variables. - (line 59) + (line 67) * SVPN: Security. (line 11) * switch: Main configuration variables. - (line 83) + (line 111) * TCP: The meta-connection. (line 10) * TCPonly: Host configuration variables. - (line 82) + (line 90) * TINC: Security. (line 6) * tinc: Introduction. (line 6) * tinc-down: Scripts. (line 18) @@ -2346,12 +2323,16 @@ Concept Index * tinc-up: Scripts. (line 10) * tincd: tinc. (line 14) * traditional VPNs: tinc. (line 19) +* tunifhead: Main configuration variables. + (line 62) * TunnelServer: Main configuration variables. - (line 142) + (line 172) +* tunnohead: Main configuration variables. + (line 56) * UDP <1>: Encryption of network packets. (line 12) * UDP: The UDP tunnel. (line 30) -* Universal tun/tap: Configuration of Linux kernels 2.4.0 and higher. +* Universal tun/tap: Configuration of Linux kernels. (line 6) * virtual: Virtual Private Networks. (line 18) @@ -2365,67 +2346,66 @@ Concept Index  Tag Table: -Node: Top860 -Node: Introduction1159 -Node: Virtual Private Networks1969 -Node: tinc3694 -Node: Supported platforms5221 -Node: Preparations5919 -Node: Configuring the kernel6175 -Node: Configuration of Linux kernels 2.1.60 up to 2.4.06655 -Node: Configuration of Linux kernels 2.4.0 and higher8027 -Node: Configuration of FreeBSD kernels9267 -Node: Configuration of OpenBSD kernels9674 -Node: Configuration of NetBSD kernels10166 -Node: Configuration of Solaris kernels10571 -Node: Configuration of Darwin (MacOS/X) kernels11232 -Node: Configuration of Windows11935 -Node: Libraries12449 -Node: OpenSSL12837 -Node: zlib15113 -Node: lzo15942 -Node: Installation16729 -Node: Building and installing tinc17744 -Node: Darwin (MacOS/X) build environment18403 -Node: Cygwin (Windows) build environment18971 -Node: MinGW (Windows) build environment19559 -Node: System files20083 -Node: Device files20348 -Node: Other files21534 -Node: Configuration22147 -Node: Configuration introduction22458 -Node: Multiple networks23731 -Node: How connections work25157 -Node: Configuration files26379 -Node: Main configuration variables27386 -Node: Host configuration variables33863 -Node: Scripts38159 -Node: How to configure40838 -Node: Generating keypairs42101 -Node: Network interfaces42600 -Node: Example configuration44448 -Node: Running tinc49760 -Node: Runtime options50350 -Node: Signals52357 -Node: Debug levels53426 -Node: Solving problems54362 -Node: Error messages55792 -Node: Sending bug reports60114 -Node: Technical information61066 -Node: The connection61297 -Node: The UDP tunnel61609 -Node: The meta-connection64670 -Node: The meta-protocol66139 -Node: Security71148 -Node: Authentication protocol72278 -Node: Encryption of network packets77282 -Node: Security issues78655 -Node: Platform specific information80272 -Node: Interface configuration80500 -Node: Routes82399 -Node: About us84315 -Node: Contact information84490 -Node: Authors84894 -Node: Concept Index85320 +Node: Top861 +Node: Introduction1160 +Node: Virtual Private Networks1970 +Node: tinc3695 +Node: Supported platforms5222 +Node: Preparations5920 +Node: Configuring the kernel6176 +Node: Configuration of Linux kernels6585 +Node: Configuration of FreeBSD kernels7440 +Node: Configuration of OpenBSD kernels7830 +Node: Configuration of NetBSD kernels8438 +Node: Configuration of Solaris kernels8843 +Node: Configuration of Darwin (MacOS/X) kernels9504 +Node: Configuration of Windows10207 +Node: Libraries10721 +Node: OpenSSL11109 +Node: zlib13385 +Node: lzo14214 +Node: Installation15001 +Node: Building and installing tinc16016 +Node: Darwin (MacOS/X) build environment16675 +Node: Cygwin (Windows) build environment17243 +Node: MinGW (Windows) build environment17831 +Node: System files18355 +Node: Device files18620 +Node: Other files19036 +Node: Configuration19649 +Node: Configuration introduction19960 +Node: Multiple networks21233 +Node: How connections work22659 +Node: Configuration files23881 +Node: Main configuration variables24888 +Node: Host configuration variables32721 +Node: Scripts37286 +Node: How to configure39965 +Node: Generating keypairs41228 +Node: Network interfaces41727 +Node: Example configuration43575 +Node: Running tinc48887 +Node: Runtime options49477 +Node: Signals51484 +Node: Debug levels52553 +Node: Solving problems53489 +Node: Error messages54919 +Node: Sending bug reports59241 +Node: Technical information60193 +Node: The connection60424 +Node: The UDP tunnel60736 +Node: The meta-connection63797 +Node: The meta-protocol65266 +Node: Security70275 +Node: Authentication protocol71405 +Node: Encryption of network packets76409 +Node: Security issues77782 +Node: Platform specific information79399 +Node: Interface configuration79627 +Node: Routes81526 +Node: About us83442 +Node: Contact information83617 +Node: Authors84021 +Node: Concept Index84447  End Tag Table diff --git a/doc/tinc.texi b/doc/tinc.texi index cc45e7d..2341245 100644 --- a/doc/tinc.texi +++ b/doc/tinc.texi @@ -1,5 +1,5 @@ \input texinfo @c -*-texinfo-*- -@c $Id: tinc.texi 1467 2006-11-11 20:37:58Z guus $ +@c $Id: tinc.texi 1597 2008-12-22 21:29:21Z guus $ @c %**start of header @setfilename tinc.info @settitle tinc Manual @@ -16,11 +16,11 @@ This is the info manual for @value{PACKAGE} version @value{VERSION}, a Virtual Private Network daemon. -Copyright @copyright{} 1998-2006 Ivo Timmermans, +Copyright @copyright{} 1998-2008 Ivo Timmermans, Guus Sliepen and Wessel Dankers . -$Id: tinc.texi 1467 2006-11-11 20:37:58Z guus $ +$Id: tinc.texi 1597 2008-12-22 21:29:21Z guus $ Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are @@ -47,7 +47,7 @@ Copyright @copyright{} 1998-2006 Ivo Timmermans, Guus Sliepen and Wessel Dankers . -$Id: tinc.texi 1467 2006-11-11 20:37:58Z guus $ +$Id: tinc.texi 1597 2008-12-22 21:29:21Z guus $ Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are @@ -225,8 +225,7 @@ support tinc. @section Configuring the kernel @menu -* Configuration of Linux kernels 2.1.60 up to 2.4.0:: -* Configuration of Linux kernels 2.4.0 and higher:: +* Configuration of Linux kernels:: * Configuration of FreeBSD kernels:: * Configuration of OpenBSD kernels:: * Configuration of NetBSD kernels:: @@ -237,51 +236,11 @@ support tinc. @c ================================================================== -@node Configuration of Linux kernels 2.1.60 up to 2.4.0 -@subsection Configuration of Linux kernels 2.1.60 up to 2.4.0 - -@cindex ethertap -For kernels up to 2.4.0, you need a kernel that supports the ethertap device. -Most distributions come with kernels that already support this. -If not, here are the options you have to turn on when configuring a new kernel: - -@example -Code maturity level options -[*] Prompt for development and/or incomplete code/drivers -Networking options -[*] Kernel/User netlink socket - Netlink device emulation -Network device support - Ethertap network tap -@end example - -If you want to run more than one instance of tinc or other programs that use -the ethertap, you have to compile the ethertap driver as a module, otherwise -you can also choose to compile it directly into the kernel. - -If you decide to build any of these as dynamic kernel modules, it's a good idea -to add these lines to @file{/etc/modules.conf}: - -@example -alias char-major-36 netlink_dev -alias tap0 ethertap -options tap0 -o tap0 unit=0 -alias tap1 ethertap -options tap1 -o tap1 unit=1 -... -alias tap@emph{N} ethertap -options tap@emph{N} -o tap@emph{N} unit=@emph{N} -@end example - -Add as much alias/options lines as necessary. - - -@c ================================================================== -@node Configuration of Linux kernels 2.4.0 and higher -@subsection Configuration of Linux kernels 2.4.0 and higher +@node Configuration of Linux kernels +@subsection Configuration of Linux kernels @cindex Universal tun/tap -For kernels 2.4.0 and higher, you need a kernel that supports the Universal tun/tap device. +For tinc to work, you need a kernel that supports the Universal tun/tap device. Most distributions come with kernels that already support this. Here are the options you have to turn on when configuring a new kernel: @@ -295,11 +254,6 @@ Network device support It's not necessary to compile this driver as a module, even if you are going to run more than one instance of tinc. -If you have an early 2.4 kernel, you can choose both the tun/tap driver and the -`Ethertap network tap' device. This latter is marked obsolete, and chances are -that it won't even function correctly anymore. Make sure you select the -universal tun/tap driver. - If you decide to build the tun/tap driver as a kernel module, add these lines to @file{/etc/modules.conf}: @@ -323,9 +277,9 @@ Using tap devices is recommended. For OpenBSD version 2.9 and higher, the tun driver is included in the default kernel configuration. There is also a kernel patch from @uref{http://diehard.n-r-g.com/stuff/openbsd/} -which adds a tap device to OpenBSD. -This should work with tinc. - +which adds a tap device to OpenBSD which should work with tinc, +but with recent versions of OpenBSD, +a tun device can act as a tap device by setting the link0 option with ifconfig. @c ================================================================== @node Configuration of NetBSD kernels @@ -609,40 +563,16 @@ files on your system. @subsection Device files @cindex device files -First, you'll need the special device file(s) that form the interface -between the kernel and the daemon. +Most operating systems nowadays come with the necessary device files by default, +or they have a mechanism to create them on demand. -The permissions for these files have to be such that only the super user -may read/write to this file. You'd want this, because otherwise -eavesdropping would become a bit too easy. This does, however, imply -that you'd have to run tincd as root. - -If you use Linux and have a kernel version prior to 2.4.0, you have to make the -ethertap devices: +If you use Linux and do not have udev installed, +you may need to create the following device file if it does not exist: @example -mknod -m 600 /dev/tap0 c 36 16 -mknod -m 600 /dev/tap1 c 36 17 -... -mknod -m 600 /dev/tap@emph{N} c 36 @emph{N+16} +mknod -m 600 /dev/net/tun c 10 200 @end example -There is a maximum of 16 ethertap devices. - -If you use the universal tun/tap driver, you have to create the -following device file (unless it already exist): - -@example -mknod -m 600 /dev/tun c 10 200 -@end example - -If you use Linux, and you run the new 2.4 kernel using the devfs filesystem, -then the tun/tap device will probably be automatically generated as -@file{/dev/net/tun}. - -Unlike the ethertap device, you do not need multiple device files if -you are planning to run multiple tinc daemons. - @c ================================================================== @node Other files @@ -862,6 +792,38 @@ Under Windows, use @var{Interface} instead of @var{Device}. Note that you can only use one device per daemon. See also @ref{Device files}. +@cindex DeviceType +@item DeviceType = (only supported on BSD platforms) +The type of the virtual network device. +Tinc will normally automatically select the right type, and this option should not be used. +However, in case tinc does not seem to correctly interpret packets received from the virtual network device, +using this option might help. + +@table @asis +@item tun +Set type to tun. +Depending on the platform, this can either be with or without an address family header (see below). + +@cindex tunnohead +@item tunnohead +Set type to tun without an address family header. +Tinc will expect packets read from the virtual network device to start with an IP header. +On some platforms IPv6 packets cannot be read from or written to the device in this mode. + +@cindex tunifhead +@item tunifhead +Set type to tun with an address family header. +Tinc will expect packets read from the virtual network device +to start with a four byte header containing the address family, +followed by an IP header. +This mode should support both IPv4 and IPv6 packets. + +@item tap +Set type to tap. +Tinc will expect packets read from the virtual network device +to start with an Ethernet header. +@end table + @cindex GraphDumpFile @item GraphDumpFile = <@var{filename}> [experimental] If this option is present, @@ -932,7 +894,8 @@ This only has effect when Mode is set to "switch". @cindex Name @item Name = <@var{name}> [required] -This is a symbolic name for this connection. It can be anything +This is a symbolic name for this connection. +The name should consist only of alfanumeric and underscore characters (a-z, A-Z, 0-9 and _). @cindex PingInterval @item PingInterval = <@var{seconds}> (60) @@ -1019,6 +982,15 @@ The length of the message authentication code used to authenticate UDP packets. Can be anything from 0 up to the length of the digest produced by the digest algorithm. +@cindex PMTU +@item PMTU = <@var{mtu}> (1514) +This option controls the initial path MTU to this node. + +@cindex PMTUDiscovery +@item PMTUDiscovery = (yes) +When this option is enabled, tinc will try to discover the path MTU to this node. +After the path MTU has been discovered, it will be enforced on the VPN. + @cindex Port @item Port = <@var{port}> (655) This is the port this tinc daemon listens on. @@ -1068,7 +1040,7 @@ example: netmask 255.255.255.0 would become /24, 255.255.252.0 becomes @uref{ftp://ftp.isi.edu/in-notes/rfc1519.txt, RFC1519} @cindex TCPonly -@item TCPonly = (no) [experimental] +@item TCPonly = (no) If this variable is set to yes, then the packets are tunnelled over a TCP connection instead of a UDP connection. This is especially useful for those who want to run a tinc daemon from behind a masquerading diff --git a/install-sh b/install-sh index 4fbbae7..a5897de 100755 --- a/install-sh +++ b/install-sh @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2006-10-14.15 +scriptversion=2006-12-25.00 # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -48,7 +48,7 @@ IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. -doit="${DOITPROG-}" +doit=${DOITPROG-} if test -z "$doit"; then doit_exec=exec else @@ -58,34 +58,49 @@ fi # Put in absolute file names if you don't have them in your path; # or use environment vars. -mvprog="${MVPROG-mv}" -cpprog="${CPPROG-cp}" -chmodprog="${CHMODPROG-chmod}" -chownprog="${CHOWNPROG-chown}" -chgrpprog="${CHGRPPROG-chgrp}" -stripprog="${STRIPPROG-strip}" -rmprog="${RMPROG-rm}" -mkdirprog="${MKDIRPROG-mkdir}" +chgrpprog=${CHGRPPROG-chgrp} +chmodprog=${CHMODPROG-chmod} +chownprog=${CHOWNPROG-chown} +cmpprog=${CMPPROG-cmp} +cpprog=${CPPROG-cp} +mkdirprog=${MKDIRPROG-mkdir} +mvprog=${MVPROG-mv} +rmprog=${RMPROG-rm} +stripprog=${STRIPPROG-strip} + +posix_glob='?' +initialize_posix_glob=' + test "$posix_glob" != "?" || { + if (set -f) 2>/dev/null; then + posix_glob= + else + posix_glob=: + fi + } +' -posix_glob= posix_mkdir= # Desired mode of installed file. mode=0755 +chgrpcmd= chmodcmd=$chmodprog chowncmd= -chgrpcmd= -stripcmd= +mvcmd=$mvprog rmcmd="$rmprog -f" -mvcmd="$mvprog" +stripcmd= + src= dst= dir_arg= -dstarg= +dst_arg= + +copy_on_change=false no_target_directory= -usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE +usage="\ +Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... @@ -95,65 +110,55 @@ In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --c (ignored) --d create directories instead of installing files. --g GROUP $chgrpprog installed files to GROUP. --m MODE $chmodprog installed files to MODE. --o USER $chownprog installed files to USER. --s $stripprog installed files. --t DIRECTORY install into DIRECTORY. --T report an error if DSTFILE is a directory. ---help display this help and exit. ---version display version info and exit. + --help display this help and exit. + --version display version info and exit. + + -c (ignored) + -C install only if different (preserve the last data modification time) + -d create directories instead of installing files. + -g GROUP $chgrpprog installed files to GROUP. + -m MODE $chmodprog installed files to MODE. + -o USER $chownprog installed files to USER. + -s $stripprog installed files. + -t DIRECTORY install into DIRECTORY. + -T report an error if DSTFILE is a directory. Environment variables override the default commands: - CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG + CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG + RMPROG STRIPPROG " while test $# -ne 0; do case $1 in - -c) shift - continue;; + -c) ;; - -d) dir_arg=true - shift - continue;; + -C) copy_on_change=true;; + + -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" - shift - shift - continue;; + shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 - shift - shift case $mode in *' '* | *' '* | *' '* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac - continue;; + shift;; -o) chowncmd="$chownprog $2" - shift - shift - continue;; + shift;; - -s) stripcmd=$stripprog - shift - continue;; + -s) stripcmd=$stripprog;; - -t) dstarg=$2 - shift - shift - continue;; + -t) dst_arg=$2 + shift;; - -T) no_target_directory=true - shift - continue;; + -T) no_target_directory=true;; --version) echo "$0 $scriptversion"; exit $?;; @@ -165,21 +170,22 @@ while test $# -ne 0; do *) break;; esac + shift done -if test $# -ne 0 && test -z "$dir_arg$dstarg"; then +if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do - if test -n "$dstarg"; then + if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. - set fnord "$@" "$dstarg" + set fnord "$@" "$dst_arg" shift # fnord fi shift # arg - dstarg=$arg + dst_arg=$arg done fi @@ -224,7 +230,7 @@ for src do # Protect names starting with `-'. case $src in - -*) src=./$src ;; + -*) src=./$src;; esac if test -n "$dir_arg"; then @@ -242,22 +248,22 @@ do exit 1 fi - if test -z "$dstarg"; then + if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi - dst=$dstarg + dst=$dst_arg # Protect names starting with `-'. case $dst in - -*) dst=./$dst ;; + -*) dst=./$dst;; esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then - echo "$0: $dstarg: Is a directory" >&2 + echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst @@ -378,26 +384,19 @@ do # directory the slow way, step by step, checking for races as we go. case $dstdir in - /*) prefix=/ ;; - -*) prefix=./ ;; - *) prefix= ;; + /*) prefix='/';; + -*) prefix='./';; + *) prefix='';; esac - case $posix_glob in - '') - if (set -f) 2>/dev/null; then - posix_glob=true - else - posix_glob=false - fi ;; - esac + eval "$initialize_posix_glob" oIFS=$IFS IFS=/ - $posix_glob && set -f + $posix_glob set -f set fnord $dstdir shift - $posix_glob && set +f + $posix_glob set +f IFS=$oIFS prefixes= @@ -459,41 +458,54 @@ do # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # - { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \ - && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \ - && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \ - && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && + { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && + { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && + { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && - # Now rename the file to the real destination. - { $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null \ - || { - # The rename failed, perhaps because mv can't rename something else - # to itself, or perhaps because mv is so ancient that it does not - # support -f. + # If -C, don't bother to copy if it wouldn't change the file. + if $copy_on_change && + old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && + new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && - # Now remove or move aside any old file at destination location. - # We try this two ways since rm can't unlink itself on some - # systems and the destination file might be busy for other - # reasons. In this case, the final cleanup might fail but the new - # file should still install successfully. - { - if test -f "$dst"; then - $doit $rmcmd -f "$dst" 2>/dev/null \ - || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null \ - && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }; }\ - || { - echo "$0: cannot unlink or rename $dst" >&2 - (exit 1); exit 1 - } - else - : - fi - } && + eval "$initialize_posix_glob" && + $posix_glob set -f && + set X $old && old=:$2:$4:$5:$6 && + set X $new && new=:$2:$4:$5:$6 && + $posix_glob set +f && - # Now rename the file to the real destination. - $doit $mvcmd "$dsttmp" "$dst" - } - } || exit 1 + test "$old" = "$new" && + $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 + then + rm -f "$dsttmp" + else + # Rename the file to the real destination. + $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || + + # The rename failed, perhaps because mv can't rename something else + # to itself, or perhaps because mv is so ancient that it does not + # support -f. + { + # Now remove or move aside any old file at destination location. + # We try this two ways since rm can't unlink itself on some + # systems and the destination file might be busy for other + # reasons. In this case, the final cleanup might fail but the new + # file should still install successfully. + { + test ! -f "$dst" || + $doit $rmcmd -f "$dst" 2>/dev/null || + { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && + { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } + } || + { echo "$0: cannot unlink or rename $dst" >&2 + (exit 1); exit 1 + } + } && + + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dst" + } + fi || exit 1 trap '' 0 fi diff --git a/lib/Makefile.in b/lib/Makefile.in index f40448e..b810f1d 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. +# Makefile.in generated by automake 1.10.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -60,7 +60,7 @@ am_libvpn_a_OBJECTS = xmalloc.$(OBJEXT) pidfile.$(OBJEXT) \ list.$(OBJEXT) avl_tree.$(OBJEXT) dropin.$(OBJEXT) \ fake-getaddrinfo.$(OBJEXT) fake-getnameinfo.$(OBJEXT) libvpn_a_OBJECTS = $(am_libvpn_a_OBJECTS) -DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ @@ -269,8 +269,8 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS @@ -282,8 +282,8 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ @@ -293,13 +293,12 @@ ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ - here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique diff --git a/m4/Makefile.in b/m4/Makefile.in index ec05d6b..44c662e 100644 --- a/m4/Makefile.in +++ b/m4/Makefile.in @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. +# Makefile.in generated by automake 1.10.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. diff --git a/po/nl.gmo b/po/nl.gmo index 29f19b70492ed61576f3f3086fa8588cb22a06ee..fba538e82e907ac549f3773d0c358fb084e4d3bb 100644 GIT binary patch delta 6593 zcmY+}3w+P@9>?+T#5Tk1er5hP+t^%o!hU3L_nVkR+v6P6g#%F?y5H3wK|N>*w!nmOJxL@hH==_)yq)#J&av&DKhQmi1RAyzUY?ZKaxT=Ptya6@MawC zT;|#jA%is+Q8z|0p?X0U(q#IhGBgdf$eu^Na2I;;d(;2}((J%mpsw$k=Cy?icVaeb z5v@S2@-?ph1L{TRQ5z#R-Izw$#@PwgUWB@?6mxJcw#Ro+Q+L7HoQ0zHVlM^F&10C2 zTTwm#88zY%hNF>Yqv``tBbkIe%lME!nfH-tH)oK+nqXEgvt)8H1BWC3%mRM!XtNb{ zz4t7I6bg;$o?g%a^}wO16wO9G=oRGI<`dM~xPl&x<>|Lz9x4M~R0n++jq6bz-R0UZ zp)wSjS-Z%+CXa#|Zbz+whnzlC2iBrSvB8{m_eAOM9_9 z29n-fybYDnIhdpU{~85d@FjAsNnqlNuo&}j33kMTs1XG-alx2^jj%oHzV67*GLw)# znkA^~_n;Q-N!0fCW4@KKILZ6X2ntH+tH{nUAE8G06KX94^7dOX1*5PUHIjMQ89%^i zypFmqnv?fpIqHRbQ5`&mkr+o>m_3t$-h2upDd@yP1hY zMz$6;MTbxwzJ?k>RKD$4J}Skfs4093BXBdu;vQ^B3pujHX9501>G>k-zU<~TP z3tfE+>V+pU4*d$PO;982i0W7g>b~iy7rlnciO?rDt?NZnv3XFA?$Yh13crR+Ve1}>y*Im8E0Q+grM?HVu0P^38!X_G&n&YU91P-*O zq8`u_Jy?ahem-iOZNjE_5Y_QZn2u3{>|*PNMbxKaDeiFXiFeu$P>GiU(`J@q6`n;+ z!QjFCuE*yv5zk>HhOmcJPr* z!9$@O*_viHYGk`m4?K;!FkqPdWs-*4Zrzcut{H&^_=0Ociki}^7=umkvh@zAwNrw6 z{w(aO{r{3{IPNY`p7elJOvYPLH#~^y$U=91BL+}EgnS~*anzzp9&Wz_tx?-{7>3|@ z=WN&h3}$Hmuc45`1;;QO!$(+qIj3O<+Sj43``*>#N7~HwN3H7dsI{>So8d0hUreV_ z_eYi4#oQO$QlE>hy%gT0pv89rbz#sbyLbvQlll}?>Q*}spojWZY>9E@cF}dmMC#*E zFJ9#8+fbSO7WpWe`lIb%O1Gm|tGk>+JU)(EEU%&-v>!9@5^7N;SJ($IGFORepM!mH1u8QaPy=dkpZ%2Ifm)P47ot}AMpVXjVoN-Q0T?o_cDtDvY(;%AYOQ%^QSeaM zjO-wD7?ZH$1NK3~P!D<-<8TEkW7{zmFXL^P@F4%qfK{l0?8Fv$0<~5G7-c%9Vg?RC z?)RG6wqRbzcAWSE{ju(N``fSq4xk=~$v77C@M+Zb`%o{qj%~5o1l!?$sP@U2g^OK% zH|qW~n5q4rJkie8VAL9T5S7}eP${axY~6tBSi&Ux;$&1R2Vo9+Q6t}onu7hP%w0rg z*EE@IGcpgA;kB5+`^^CgX?Ou!>%xa@s*6w^8jVWbqt11xOdLVo=QqV}r`8xly%5!b z5{$&@*clgLBix4`Jc`~B3V%>gsv1wVe<-v=K87YA8{jh3NLQg&`xmZ$9@T-kY4(9V zFrWGu)W}z0816%@l@l0`LDOwUQ>K%DrJ{s}n{fuJr<+mx_!o@D?1$}d#lF~t`U3Re z>!=a#aej-+z*X#xVKZ!IhG7cz2QUy9V<;}4LH>g&Y@i_;x1$FSqZZ9IY>#cYPW!kV z!*L}>;JX-v`>_vxg|}krOgrN7m_U6Assmfl582K3Q2LwDQi=zOmwmJ$Y zfNq}+nCmR|%ui9?A5%AX-$6LVbOryv@BrP7#qgt&>i7V`>1M*#6< zZON|9zfjhP?`_wn_51?SkkHc55y&(AiB6QK5C;e?qvnK;*NC5MOJ2S|wFPz{H=LsU z1#yY+P;ZNA_yp?s-ctKTUPie;@h>8bh$BW3)x<1fETK(Ohx>IrN~|Il5c<<`5#G!D zYqx$6jG?g{pCWRIrqmz9UPLP8c0CD3uOQ9X-t8l(+ zEWu3O^XIFK`LC+f>l3YskEzG|v0RHOG^8Pl(6P?JR~#GPbS9-jVhyp9(9ywSKCPJ-JG`M^ zZq4cB%k}DvuJ9dCZ(DOLeWSmxdsbxQ%JH7D<0g2jE6U36DI0a4Z(CMU&5K!u(IL5Q zGPBxb<#;kP^K!D&GctYWi(>w-u|177F@2f^^XS|mi~M~<%OZVW4{uhpd-%8j--U|s cMx!dKD=Mo-m6cU{D#tInJHDptn02xL1I)oB9{>OV delta 6531 zcmYk>30&4i9>?(kl}l0KK@kvqP(VPCQ&7=RkuvY2%nMY!!Y#GDFCM$hEK7T;^(l~!G0>P*xR81-Hx=P4*aR@fqiK=lhsO`dTPn0NR~Gd_tW z_zPxWmqcUuVM^XL7lMbIc>P|taABsxxbYx8CUet|SP-}e< zn*|tCgG%A)6lQ>7?Tv}W6jZ$@>bWxPj*F4yHhY}4sQa$AC;u%dczBy$kcM5bx3kK% z??xtTj-VdAg6bfWg{5e6Q5hPI+GGn*9X^j<`~Wq7M?<}CD4$fGa~HR4UE zneIo;@M~9Zz_c`j6yzPI1Q~;wjx4iTi%ib!MOMe0!)$EI4%Q|v<}Y4lrlIa%hpe9Q z?W3R$zd^k)lwm5B`KT8SL*8ZPqcXG=z4$Tq#tW#KXVIGmSc1_w4mHquu6+wCGY3$6 z?t-oR%ykM{`_vq332Ff4s2MFry=W`)4Khbi$L^A|AzNPqh{J)Hg(X;po$*~%CVxjQ zNgV0c?}IT{=l=-`H`DMTcEt$pD#ZS%ncR;}aXp6Pi^#joo5)Er-y&l%5iGRsFF|e6 z(WrAj7nP}%&d*VqjAa9~r+?Fpf@U@mwFj!OAFjuicn&p_>(~uDGdguN8+G3boQk!m z4tsO623UqIa3!)z<~c0JW3Ig=N6n|yWKfX(u^HZhTFXVKy|D&$D&9t(HSeL8<`2}K zNg-`ovLQGMXP}<{6qSi{sI_m%ky1Sq)!)rU z25JV6U_9jeAkE3SxGHPIlQP2H|Z7{BbGatP= z|4&g+ir#S6pdPr0J+Z+}Zbs;(J_18zxzuN33OIHA37f+)e2)xA}vkcVv?~fYz zRMfeC1hv_AqdL5dW!Uvr+rApvhvqP{TBhZ2WB!EWeH63=hmgKZv)gQ{C!l7w)YaEx z1oeHcUV|F&&!~TtJe;-600xDc>7bEzpo>taWi4t6ccB++QG3Am8wGtpZWv`>SdO}J zF}A{us29A6d{xco*aIU++xB6oHJy&S-|y-#q4v&U)cddE4H!Mf)`ug%`^+2)dcg)v z#slt#v#5atlSloYj=?w(`2?8Zs78fW^)mF*{sd|_??mm1Q`iQ>#@R1hI_mim*cl%~4eTS-l3Ya{$E5N0 zzW!L~qv1XZIk*RvvP;gW3fplJrqVtJwb>rPw)i^glX}$E11H!FCZjf6KlI=#)TVwG zS>eg{gY7l`JFFg6!j00 zkD&Pqdt=gMyN4<#yYs(|2Cd0wsN)eZ#eR_bV?XLkP$~TkyJMrb*Z=0=BQTnY$5NQ?INf{{tv2rGamYIf`CPnQCWr6Dno1QSGa+FK$Q8^creL z(H!PpI0m%|pFzH9<_)|XL+-F0F2q9Wt5K)ru#bX1h3Byk#@uONP=Q*S1~Fpc^I)Mi|PUOb2#1ak)4Vaas+9^VuSdeK7|i`!8tJA~~qa0XvH zOh-NyW-cmqHJF6oq4tR9F1tDNFq`^V)blHyyD^LUDGb8qq@}6Oe>4Ss`BE?$7hqT1 zhiH{}gE_P8QcXbZfyJoIuEzqM|9uql^Z;sP z>9cLeIjB^Q$9#MkHS_(bB{+c^$aQ4(OzIq)ktb0pehby%NleFUn4$aT+DzYy3G{Df zQ0RbiVMP*_#cERPS zfgVI1hy5^*b<>P}n1EYR1NZ;~ zQ2U|&ilw29%28sY|1M9oe~G8L@0a?Yo%cJ{`_Hbt(pk^#6g<3b557Z;C6vCWh=Bx? zF>Eq(mf%BX-XrvN(xo$*%Cn7-k5Z)BMIn)f45F5DQ-5Mq`z_mfziF2q@*jwb_8q5mjtHeS ziD*MCr@osAr>yHQ#NUXEs&I9-)Fu8U%3r&>(EmK8YZlR#vbJ9&uE3E*Ys!B`J}Ty< zK0hHeT%n?aaSstdT`RkV&=pL4Sy!@K^C8Mf#2c=y8?Ggq5ZW2Kf_O(mqKNW5;xM6I zlt}2>OkA!jv0YxTE6^zqoT2=8;zuHZdPgiF9wBu7+fw&IUQc-_afFB@Vu=cZ@2got z@DD@XzbJM4k@CI7^TeY>2j0C3_4%ti`K8#B#tHZskx#@?Uy3&o$&{bQ`-l@n6YA}V zXyQ%k*N7JgT{A2ujo)5zfZ2k`;XftXKZ5(kL396XPIaCC_8Eoz~}B%=QM)D-2ZZ_1Ci$S`x{wA<*5!e>NN5D%STc&Bg8~@fq(}@X3_RvR~Nq$*NI@-(~0*f#{{rlhfoNkA&SuT zvOgfkQ}#KfkBI*e%ZO^?7UB}InyA0@|5bR2bu{cG(uu{y55$AStwjCxDupa!f&Z?U zxOnaNp2Um9bA+w}i}|?vg_!at0fp5eDOVa*cg)xk%9kO$?v%>}t${adrPUXzX>C-ZMkDoQEtC!aQyDwk&Rd4FsrfEQ-KO`lg`qYS7 VLH>aiEvh$+9Ti-iIb}!8{{X%|4j}*l diff --git a/po/nl.po b/po/nl.po index abe5fac..1c60b28 100644 --- a/po/nl.po +++ b/po/nl.po @@ -1,13 +1,13 @@ # Dutch messages for tinc -# Copyright (C) 1999-2007 Ivo Timmermans, Guus Sliepen. +# Copyright (C) 1999-2008 Ivo Timmermans, Guus Sliepen. # Ivo Timmermans , 1999-2006. -# Guus Sliepen , 2000-2007. +# Guus Sliepen , 2000-2008. msgid "" msgstr "" "Project-Id-Version: tinc 1.0-svn\n" "Report-Msgid-Bugs-To: tinc-devel@tinc-vpn.org\n" -"POT-Creation-Date: 2007-05-16 16:50+0200\n" -"PO-Revision-Date: 2007-05-16 16:40+0200\n" +"POT-Creation-Date: 2008-12-24 11:43+0100\n" +"PO-Revision-Date: 2008-12-24 11:45+0100\n" "Last-Translator: Guus Sliepen \n" "Language-Team: Dutch\n" "MIME-Version: 1.0\n" @@ -90,16 +90,16 @@ msgstr "iedereen" msgid "BROADCAST" msgstr "BROADCAST" -#: src/connection.c:123 +#: src/connection.c:142 msgid "Connections:" msgstr "Verbindingen:" -#: src/connection.c:127 +#: src/connection.c:146 #, c-format msgid " %s at %s options %lx socket %d status %04x outbuf %d/%d/%d" msgstr " %s op %s opties %lx socket %d status %04x outbuf %d/%d/%d" -#: src/connection.c:132 +#: src/connection.c:151 msgid "End of connections." msgstr "Einde van verbindingen." @@ -287,9 +287,9 @@ msgstr "Fout tijdens versleutelen pakket naar %s (%s): %s" msgid "Setting outgoing packet priority to %d" msgstr "Instellen prioriteit uitgaand pakket op %d" -#: src/net_packet.c:393 src/net_setup.c:478 src/net_socket.c:135 -#: src/net_socket.c:164 src/tincd.c:435 src/tincd.c:472 src/process.c:198 -#: src/process.c:231 src/process.c:430 src/bsd/device.c:93 +#: src/net_packet.c:393 src/net_setup.c:478 src/net_socket.c:140 +#: src/net_socket.c:169 src/tincd.c:435 src/tincd.c:472 src/process.c:201 +#: src/process.c:234 src/process.c:433 src/bsd/device.c:93 #: src/bsd/device.c:112 src/cygwin/device.c:140 src/cygwin/device.c:171 #: src/mingw/device.c:73 src/mingw/device.c:80 src/mingw/device.c:86 #: src/mingw/device.c:258 src/mingw/device.c:265 src/mingw/device.c:270 @@ -465,86 +465,86 @@ msgstr "ioctlsocket voor %s: WSA fout %d" msgid "Creating metasocket failed: %s" msgstr "Aanmaak van metasocket mislukt: %s" -#: src/net_socket.c:115 src/net_socket.c:217 +#: src/net_socket.c:120 src/net_socket.c:227 #, c-format msgid "Can't bind to interface %s: %s" msgstr "Kan niet aan interface %s binden: %s" -#: src/net_socket.c:120 +#: src/net_socket.c:125 msgid "BindToInterface not supported on this platform" msgstr "BindToInterface wordt niet ondersteund op dit platform" -#: src/net_socket.c:127 +#: src/net_socket.c:132 #, c-format msgid "Can't bind to %s/tcp: %s" msgstr "Kan niet aan %s/tcp binden: %s" -#: src/net_socket.c:154 +#: src/net_socket.c:159 #, c-format msgid "Creating UDP socket failed: %s" msgstr "Aanmaak UDP socket mislukte: %s" -#: src/net_socket.c:174 +#: src/net_socket.c:179 #, c-format msgid "Call to `%s' failed: WSA error %d" msgstr "Systeemaanroep `%s' mislukte: WSA fout %d" -#: src/net_socket.c:228 +#: src/net_socket.c:238 #, c-format msgid "Can't bind to %s/udp: %s" msgstr "Kan niet aan %s/udp binden: %s" -#: src/net_socket.c:255 +#: src/net_socket.c:265 #, c-format msgid "Trying to re-establish outgoing connection in %d seconds" msgstr "Poging tot herstellen van uitgaande verbinding over %d seconden" -#: src/net_socket.c:263 +#: src/net_socket.c:273 #, c-format msgid "Connected to %s (%s)" msgstr "Verbonden met %s (%s)" -#: src/net_socket.c:282 +#: src/net_socket.c:292 #, c-format msgid "Could not set up a meta connection to %s" msgstr "Kon geen metaverbinding aangaan met %s" -#: src/net_socket.c:316 +#: src/net_socket.c:327 #, c-format msgid "Trying to connect to %s (%s)" msgstr "Poging tot verbinden met %s (%s)" -#: src/net_socket.c:322 +#: src/net_socket.c:333 #, c-format msgid "Creating socket for %s failed: %s" msgstr "Aanmaken socket voor %s mislukt: %s" -#: src/net_socket.c:348 +#: src/net_socket.c:365 #, c-format msgid "%s: %s" msgstr "%s: %s" -#: src/net_socket.c:369 +#: src/net_socket.c:386 #, c-format msgid "Already connected to %s" msgstr "Reeds verbonden met %s" -#: src/net_socket.c:388 +#: src/net_socket.c:405 #, c-format msgid "No address specified for %s" msgstr "Geen adres gespecificeerd voor %s" -#: src/net_socket.c:419 +#: src/net_socket.c:436 #, c-format msgid "Accepting a new connection failed: %s" msgstr "Aanname van nieuwe verbinding is mislukt: %s" -#: src/net_socket.c:438 +#: src/net_socket.c:455 #, c-format msgid "Connection from %s" msgstr "Verbinding van %s" -#: src/net_socket.c:463 +#: src/net_socket.c:480 #, c-format msgid "Invalid name for outgoing connection in %s line %d" msgstr "Ongeldige naam voor uitgaande verbinding in %s regel %d" @@ -647,7 +647,7 @@ msgstr "Veroudering vorige verzoeken: %d gewist, %d overgebleven" #: src/protocol_auth.c:58 src/protocol_auth.c:214 src/protocol_auth.c:345 #: src/protocol_auth.c:412 src/protocol_auth.c:538 src/protocol_edge.c:73 #: src/protocol_edge.c:188 src/protocol_key.c:62 src/protocol_key.c:105 -#: src/protocol_key.c:173 src/protocol_misc.c:56 src/protocol_misc.c:85 +#: src/protocol_key.c:179 src/protocol_misc.c:56 src/protocol_misc.c:85 #: src/protocol_misc.c:176 src/protocol_subnet.c:58 src/protocol_subnet.c:170 #, c-format msgid "Got bad %s from %s (%s)" @@ -681,7 +681,7 @@ msgstr "Ander %s heeft onbekende identiteit (%s)" msgid "Generated random meta key (unencrypted): %s" msgstr "Willekeurige meta sleutel aangemaakt (niet versleuteld): %s" -#: src/protocol_auth.c:170 src/protocol_auth.c:243 +#: src/protocol_auth.c:170 #, c-format msgid "Error during encryption of meta key for %s (%s)" msgstr "Fout tijdens versleutelen van meta key voor %s (%s)" @@ -692,6 +692,11 @@ msgstr "Fout tijdens versleutelen van meta key voor %s (%s)" msgid "Possible intruder %s (%s): %s" msgstr "Mogelijke indringer %s (%s): %s" +#: src/protocol_auth.c:243 +#, c-format +msgid "Error during decryption of meta key for %s (%s)" +msgstr "Fout tijdens ontsleutelen van meta key voor %s (%s)" + #: src/protocol_auth.c:251 #, c-format msgid "Received random meta key (unencrypted): %s" @@ -707,7 +712,7 @@ msgstr "%s (%s) gebruikt onbekende cipher!" msgid "Error during initialisation of cipher from %s (%s): %s" msgstr "Fout tijdens initalisatie van cipher van %s (%s): %s" -#: src/protocol_auth.c:286 src/protocol_key.c:243 +#: src/protocol_auth.c:286 src/protocol_key.c:255 #, c-format msgid "Node %s (%s) uses unknown digest!" msgstr "Node %s (%s) gebruikt onbekende digest!" @@ -786,14 +791,14 @@ msgstr "Kreeg %s van %s (%s) voor onszelf" msgid "Got %s from %s (%s) origin %s which does not exist" msgstr "Kreeg %s van %s (%s) herkomst %s welke niet bestaat" -#: src/protocol_key.c:113 src/protocol_key.c:181 +#: src/protocol_key.c:113 src/protocol_key.c:187 #, c-format msgid "" "Got %s from %s (%s) origin %s which does not exist in our connection list" msgstr "" "Kreeg %s van %s (%s) herkomst %s welke niet voorkomt in de verbindingslijst" -#: src/protocol_key.c:121 src/protocol_key.c:189 +#: src/protocol_key.c:121 src/protocol_key.c:195 #, c-format msgid "" "Got %s from %s (%s) destination %s which does not exist in our connection " @@ -801,27 +806,32 @@ msgid "" msgstr "" "Kreeg %s van %s (%s) doel %s welke niet voorkomt in de verbindingslijst" -#: src/protocol_key.c:223 +#: src/protocol_key.c:138 src/protocol_key.c:207 +#, c-format +msgid "Got %s from %s (%s) destination %s which is not reachable" +msgstr "Kreeg %s van %s (%s) doel %s welke niet bereikbaar is" + +#: src/protocol_key.c:235 #, c-format msgid "Node %s (%s) uses unknown cipher!" msgstr "Node %s (%s) gebruikt onbekende cipher!" -#: src/protocol_key.c:229 +#: src/protocol_key.c:241 #, c-format msgid "Node %s (%s) uses wrong keylength!" msgstr "Node %s (%s) gebruikt verkeerde lengte sleutel!" -#: src/protocol_key.c:249 +#: src/protocol_key.c:261 #, c-format msgid "Node %s (%s) uses bogus MAC length!" msgstr "Node %s (%s) gebruikt onzinnige MAC lengte!" -#: src/protocol_key.c:258 +#: src/protocol_key.c:270 #, c-format msgid "Node %s (%s) uses bogus compression level!" msgstr "Node %s (%s) gebruikt onzinnig compressieniveau!" -#: src/protocol_key.c:266 +#: src/protocol_key.c:278 #, c-format msgid "Error during initialisation of key from %s (%s): %s" msgstr "Fout tijdens initialisatie van sleutel van %s (%s): %s" @@ -856,26 +866,26 @@ msgid "subnet_compare() was called with unknown subnet type %d, exitting!" msgstr "" "subnet_compare() werd aangeroepen met onbekend subnet type %d, beëindigen!" -#: src/subnet.c:251 +#: src/subnet.c:263 #, c-format msgid "net2str() was called with netstr=%p, subnet=%p!\n" msgstr "net2str() werd aangeroepen met netstr=%p, subnet=%p!\n" -#: src/subnet.c:288 +#: src/subnet.c:300 #, c-format msgid "net2str() was called with unknown subnet type %d, exiting!" msgstr "net2str() werd aangeroepen met onbekend subnet type %d, beëindigen!" -#: src/subnet.c:449 +#: src/subnet.c:465 msgid "Subnet list:" msgstr "Subnet lijst:" -#: src/subnet.c:455 +#: src/subnet.c:471 #, c-format msgid " %s owner %s" msgstr " %s eigenaar %s" -#: src/subnet.c:458 +#: src/subnet.c:474 msgid "End of subnet list." msgstr "Einde van subnet lijst." @@ -992,14 +1002,14 @@ msgstr "%s versie %s (gemaakt %s %s, protocol %d)\n" #: src/tincd.c:411 #, c-format msgid "" -"Copyright (C) 1998-2007 Ivo Timmermans, Guus Sliepen and others.\n" +"Copyright (C) 1998-2008 Ivo Timmermans, Guus Sliepen and others.\n" "See the AUTHORS file for a complete list.\n" "\n" "tinc comes with ABSOLUTELY NO WARRANTY. This is free software,\n" "and you are welcome to redistribute it under certain conditions;\n" "see the file COPYING for details.\n" msgstr "" -"Copyright (C) 1998-2007 Ivo Timmermans, Guus Sliepen en anderen.\n" +"Copyright (C) 1998-2008 Ivo Timmermans, Guus Sliepen en anderen.\n" "Zie het bestand AUTHORS voor een volledige lijst.\n" "\n" "tinc wordt gedistribueerd ZONDER ENIGE GARANTIE. Dit is vrije " @@ -1074,121 +1084,121 @@ msgstr "Kon %s service niet verwijderen: %s" msgid "%s service removed" msgstr "%s service verwijderd" -#: src/process.c:158 src/process.c:161 +#: src/process.c:161 src/process.c:164 #, c-format msgid "Got %s request" msgstr "Kreeg %s verzoek" -#: src/process.c:164 +#: src/process.c:167 #, c-format msgid "Got unexpected request %d" msgstr "Kreeg onverwacht verzoek %d" -#: src/process.c:252 +#: src/process.c:255 #, c-format msgid "A tincd is already running for net `%s' with pid %ld.\n" msgstr "Een tincd draait al voor net `%s' met pid %ld.\n" -#: src/process.c:255 +#: src/process.c:258 #, c-format msgid "A tincd is already running with pid %ld.\n" msgstr "Een tincd draait al met pid %ld.\n" -#: src/process.c:261 +#: src/process.c:264 #, c-format msgid "Could write pid file %s: %s\n" msgstr "Kon pid bestand %s niet openen: %s\n" -#: src/process.c:283 +#: src/process.c:286 #, c-format msgid "No other tincd is running for net `%s'.\n" msgstr "Geen andere tincd draait voor net `%s'.\n" -#: src/process.c:286 +#: src/process.c:289 #, c-format msgid "No other tincd is running.\n" msgstr "Geen andere tincd draait.\n" -#: src/process.c:295 +#: src/process.c:298 #, c-format msgid "The tincd for net `%s' is no longer running. " msgstr "De tincd voor net `%s' draait niet meer. " -#: src/process.c:298 +#: src/process.c:301 #, c-format msgid "The tincd is no longer running. " msgstr "De tincd draait niet meer. " -#: src/process.c:300 +#: src/process.c:303 #, c-format msgid "Removing stale lock file.\n" msgstr "Verwijdering oud vergrendelingsbestand.\n" -#: src/process.c:333 +#: src/process.c:336 #, c-format msgid "Couldn't detach from terminal: %s" msgstr "Kon niet ontkoppelen van terminal: %s" -#: src/process.c:341 +#: src/process.c:344 #, c-format msgid "Could not write pid file %s: %s\n" msgstr "Kon pid bestand %s niet schrijven: %s\n" -#: src/process.c:352 +#: src/process.c:355 #, c-format msgid "tincd %s (%s %s) starting, debug level %d" msgstr "tincd %s (%s %s) start, debug niveau %d" -#: src/process.c:387 +#: src/process.c:390 #, c-format msgid "Executing script %s" msgstr "Uitvoeren script %s" -#: src/process.c:417 +#: src/process.c:420 #, c-format msgid "Script %s exited with non-zero status %d" msgstr "Script %s beëindigde met status %d" -#: src/process.c:422 +#: src/process.c:425 #, c-format msgid "Script %s was killed by signal %d (%s)" msgstr "Script %s was gestopt door signaal %d (%s)" -#: src/process.c:426 +#: src/process.c:429 #, c-format msgid "Script %s terminated abnormally" msgstr "Script %s abnormaal beëindigd" -#: src/process.c:446 src/process.c:455 src/process.c:496 src/process.c:502 -#: src/process.c:520 +#: src/process.c:449 src/process.c:458 src/process.c:499 src/process.c:505 +#: src/process.c:523 #, c-format msgid "Got %s signal" msgstr "Kreeg %s signaal" -#: src/process.c:464 +#: src/process.c:467 #, c-format msgid "Got another fatal signal %d (%s): not restarting." msgstr "Kreeg nog een fataal signaal %d (%s): geen herstart." -#: src/process.c:473 +#: src/process.c:476 #, c-format msgid "Got fatal signal %d (%s)" msgstr "Kreeg fataal signaal %d (%s)" -#: src/process.c:477 +#: src/process.c:480 msgid "Trying to re-execute in 5 seconds..." msgstr "Poging tot herstarten over 5 seconden..." -#: src/process.c:489 +#: src/process.c:492 msgid "Not restarting." msgstr "Geen herstart." -#: src/process.c:505 +#: src/process.c:508 #, c-format msgid "Reverting to old debug level (%d)" msgstr "Herstellen van oud debug niveau (%d)" -#: src/process.c:511 +#: src/process.c:514 #, c-format msgid "" "Temporarily setting debug level to 5. Kill me with SIGINT again to go back " @@ -1197,17 +1207,17 @@ msgstr "" "Tijdelijk instellen debug niveau op 5. Zend nog een SIGINT signaal om niveau " "%d te herstellen." -#: src/process.c:544 +#: src/process.c:547 #, c-format msgid "Got unexpected signal %d (%s)" msgstr "Kreeg onverwacht signaal %d (%s)" -#: src/process.c:550 +#: src/process.c:553 #, c-format msgid "Ignored signal %d (%s)" msgstr "Signaal %d (%s) genegeerd" -#: src/process.c:604 +#: src/process.c:607 #, c-format msgid "Installing signal handler for signal %d (%s) failed: %s\n" msgstr "Installeren van signaal afhandelaar voor signaal %d (%s) faalde: %s\n" @@ -1222,7 +1232,7 @@ msgstr "Nieuw MAC adres %hx:%hx:%hx:%hx:%hx:%hx geleerd" msgid "Subnet %s expired" msgstr "Subnet %s is verlopen" -#: src/route.c:190 src/route.c:345 src/route.c:489 +#: src/route.c:190 src/route.c:345 src/route.c:496 #, c-format msgid "Packet looping back to %s (%s)!" msgstr "Pakket komt terug naar %s (%s)!" @@ -1246,12 +1256,12 @@ msgid "" msgstr "" "Kan pakket van %s (%s) niet routeren: onbekend IPv4 doeladres %d.%d.%d.%d" -#: src/route.c:358 src/route.c:499 +#: src/route.c:358 src/route.c:506 #, c-format msgid "Packet for %s (%s) length %d larger than MTU %d" msgstr "Packet voor %s (%s) lengte %d groter dan MTU %d" -#: src/route.c:473 +#: src/route.c:480 #, c-format msgid "" "Cannot route packet from %s (%s): unknown IPv6 destination address %hx:%hx:%" @@ -1260,26 +1270,26 @@ msgstr "" "Kan pakket van %s (%s) niet routeren: onbekend IPv6 doeladres %hx:%hx:%hx:%" "hx:%hx:%hx:%hx:%hx" -#: src/route.c:531 +#: src/route.c:538 #, c-format msgid "Got neighbor solicitation request from %s (%s) while in router mode!" msgstr "" "Kreeg neighbor solicitation request van %s (%s) terwijl we in router mode " "werken!" -#: src/route.c:550 +#: src/route.c:557 msgid "" "Cannot route packet: received unknown type neighbor solicitation request" msgstr "" "Kan pakket niet routeren: ontvangst van onbekend type neighbor solicitation " "verzoek" -#: src/route.c:569 +#: src/route.c:576 msgid "Cannot route packet: checksum error for neighbor solicitation request" msgstr "" "Kan pakket niet routeren: checksum fout voor neighbor solicitation verzoek" -#: src/route.c:578 +#: src/route.c:585 #, c-format msgid "" "Cannot route packet: neighbor solicitation request for unknown address %hx:%" @@ -1288,21 +1298,21 @@ msgstr "" "Kan pakket niet routeren: neighbor solicitation verzoek voor onbekend adres %" "hx:%hx:%hx:%hx:%hx:%hx:%hx:%hx" -#: src/route.c:665 +#: src/route.c:675 #, c-format msgid "Got ARP request from %s (%s) while in router mode!" msgstr "Kreeg ARP request van %s (%s) terwijl we in router mode werken!" -#: src/route.c:682 +#: src/route.c:692 msgid "Cannot route packet: received unknown type ARP request" msgstr "Kan pakket niet routeren: ontvangst van onbekend type ARP verzoek" -#: src/route.c:691 +#: src/route.c:701 #, c-format msgid "Cannot route packet: ARP request for unknown address %d.%d.%d.%d" msgstr "Kan pakket niet routeren: ARP verzoek voor onbekend adres %d.%d.%d.%d" -#: src/route.c:747 +#: src/route.c:757 #, c-format msgid "Cannot route packet from %s (%s): unknown type %hx" msgstr "Kan pakket van %s (%s) niet routeren: onbekend type %hx" diff --git a/po/tinc.pot b/po/tinc.pot index ffa3b13..d08f7dc 100644 --- a/po/tinc.pot +++ b/po/tinc.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: tinc-devel@tinc-vpn.org\n" -"POT-Creation-Date: 2007-05-16 16:50+0200\n" +"POT-Creation-Date: 2008-12-24 11:43+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -86,16 +86,16 @@ msgstr "" msgid "BROADCAST" msgstr "" -#: src/connection.c:123 +#: src/connection.c:142 msgid "Connections:" msgstr "" -#: src/connection.c:127 +#: src/connection.c:146 #, c-format msgid " %s at %s options %lx socket %d status %04x outbuf %d/%d/%d" msgstr "" -#: src/connection.c:132 +#: src/connection.c:151 msgid "End of connections." msgstr "" @@ -279,9 +279,9 @@ msgstr "" msgid "Setting outgoing packet priority to %d" msgstr "" -#: src/net_packet.c:393 src/net_setup.c:478 src/net_socket.c:135 -#: src/net_socket.c:164 src/tincd.c:435 src/tincd.c:472 src/process.c:198 -#: src/process.c:231 src/process.c:430 src/bsd/device.c:93 +#: src/net_packet.c:393 src/net_setup.c:478 src/net_socket.c:140 +#: src/net_socket.c:169 src/tincd.c:435 src/tincd.c:472 src/process.c:201 +#: src/process.c:234 src/process.c:433 src/bsd/device.c:93 #: src/bsd/device.c:112 src/cygwin/device.c:140 src/cygwin/device.c:171 #: src/mingw/device.c:73 src/mingw/device.c:80 src/mingw/device.c:86 #: src/mingw/device.c:258 src/mingw/device.c:265 src/mingw/device.c:270 @@ -456,86 +456,86 @@ msgstr "" msgid "Creating metasocket failed: %s" msgstr "" -#: src/net_socket.c:115 src/net_socket.c:217 +#: src/net_socket.c:120 src/net_socket.c:227 #, c-format msgid "Can't bind to interface %s: %s" msgstr "" -#: src/net_socket.c:120 +#: src/net_socket.c:125 msgid "BindToInterface not supported on this platform" msgstr "" -#: src/net_socket.c:127 +#: src/net_socket.c:132 #, c-format msgid "Can't bind to %s/tcp: %s" msgstr "" -#: src/net_socket.c:154 +#: src/net_socket.c:159 #, c-format msgid "Creating UDP socket failed: %s" msgstr "" -#: src/net_socket.c:174 +#: src/net_socket.c:179 #, c-format msgid "Call to `%s' failed: WSA error %d" msgstr "" -#: src/net_socket.c:228 +#: src/net_socket.c:238 #, c-format msgid "Can't bind to %s/udp: %s" msgstr "" -#: src/net_socket.c:255 +#: src/net_socket.c:265 #, c-format msgid "Trying to re-establish outgoing connection in %d seconds" msgstr "" -#: src/net_socket.c:263 +#: src/net_socket.c:273 #, c-format msgid "Connected to %s (%s)" msgstr "" -#: src/net_socket.c:282 +#: src/net_socket.c:292 #, c-format msgid "Could not set up a meta connection to %s" msgstr "" -#: src/net_socket.c:316 +#: src/net_socket.c:327 #, c-format msgid "Trying to connect to %s (%s)" msgstr "" -#: src/net_socket.c:322 +#: src/net_socket.c:333 #, c-format msgid "Creating socket for %s failed: %s" msgstr "" -#: src/net_socket.c:348 +#: src/net_socket.c:365 #, c-format msgid "%s: %s" msgstr "" -#: src/net_socket.c:369 +#: src/net_socket.c:386 #, c-format msgid "Already connected to %s" msgstr "" -#: src/net_socket.c:388 +#: src/net_socket.c:405 #, c-format msgid "No address specified for %s" msgstr "" -#: src/net_socket.c:419 +#: src/net_socket.c:436 #, c-format msgid "Accepting a new connection failed: %s" msgstr "" -#: src/net_socket.c:438 +#: src/net_socket.c:455 #, c-format msgid "Connection from %s" msgstr "" -#: src/net_socket.c:463 +#: src/net_socket.c:480 #, c-format msgid "Invalid name for outgoing connection in %s line %d" msgstr "" @@ -637,7 +637,7 @@ msgstr "" #: src/protocol_auth.c:58 src/protocol_auth.c:214 src/protocol_auth.c:345 #: src/protocol_auth.c:412 src/protocol_auth.c:538 src/protocol_edge.c:73 #: src/protocol_edge.c:188 src/protocol_key.c:62 src/protocol_key.c:105 -#: src/protocol_key.c:173 src/protocol_misc.c:56 src/protocol_misc.c:85 +#: src/protocol_key.c:179 src/protocol_misc.c:56 src/protocol_misc.c:85 #: src/protocol_misc.c:176 src/protocol_subnet.c:58 src/protocol_subnet.c:170 #, c-format msgid "Got bad %s from %s (%s)" @@ -671,7 +671,7 @@ msgstr "" msgid "Generated random meta key (unencrypted): %s" msgstr "" -#: src/protocol_auth.c:170 src/protocol_auth.c:243 +#: src/protocol_auth.c:170 #, c-format msgid "Error during encryption of meta key for %s (%s)" msgstr "" @@ -682,6 +682,11 @@ msgstr "" msgid "Possible intruder %s (%s): %s" msgstr "" +#: src/protocol_auth.c:243 +#, c-format +msgid "Error during decryption of meta key for %s (%s)" +msgstr "" + #: src/protocol_auth.c:251 #, c-format msgid "Received random meta key (unencrypted): %s" @@ -697,7 +702,7 @@ msgstr "" msgid "Error during initialisation of cipher from %s (%s): %s" msgstr "" -#: src/protocol_auth.c:286 src/protocol_key.c:243 +#: src/protocol_auth.c:286 src/protocol_key.c:255 #, c-format msgid "Node %s (%s) uses unknown digest!" msgstr "" @@ -775,40 +780,45 @@ msgstr "" msgid "Got %s from %s (%s) origin %s which does not exist" msgstr "" -#: src/protocol_key.c:113 src/protocol_key.c:181 +#: src/protocol_key.c:113 src/protocol_key.c:187 #, c-format msgid "" "Got %s from %s (%s) origin %s which does not exist in our connection list" msgstr "" -#: src/protocol_key.c:121 src/protocol_key.c:189 +#: src/protocol_key.c:121 src/protocol_key.c:195 #, c-format msgid "" "Got %s from %s (%s) destination %s which does not exist in our connection " "list" msgstr "" -#: src/protocol_key.c:223 +#: src/protocol_key.c:138 src/protocol_key.c:207 +#, c-format +msgid "Got %s from %s (%s) destination %s which is not reachable" +msgstr "" + +#: src/protocol_key.c:235 #, c-format msgid "Node %s (%s) uses unknown cipher!" msgstr "" -#: src/protocol_key.c:229 +#: src/protocol_key.c:241 #, c-format msgid "Node %s (%s) uses wrong keylength!" msgstr "" -#: src/protocol_key.c:249 +#: src/protocol_key.c:261 #, c-format msgid "Node %s (%s) uses bogus MAC length!" msgstr "" -#: src/protocol_key.c:258 +#: src/protocol_key.c:270 #, c-format msgid "Node %s (%s) uses bogus compression level!" msgstr "" -#: src/protocol_key.c:266 +#: src/protocol_key.c:278 #, c-format msgid "Error during initialisation of key from %s (%s): %s" msgstr "" @@ -842,26 +852,26 @@ msgstr "" msgid "subnet_compare() was called with unknown subnet type %d, exitting!" msgstr "" -#: src/subnet.c:251 +#: src/subnet.c:263 #, c-format msgid "net2str() was called with netstr=%p, subnet=%p!\n" msgstr "" -#: src/subnet.c:288 +#: src/subnet.c:300 #, c-format msgid "net2str() was called with unknown subnet type %d, exiting!" msgstr "" -#: src/subnet.c:449 +#: src/subnet.c:465 msgid "Subnet list:" msgstr "" -#: src/subnet.c:455 +#: src/subnet.c:471 #, c-format msgid " %s owner %s" msgstr "" -#: src/subnet.c:458 +#: src/subnet.c:474 msgid "End of subnet list." msgstr "" @@ -954,7 +964,7 @@ msgstr "" #: src/tincd.c:411 #, c-format msgid "" -"Copyright (C) 1998-2007 Ivo Timmermans, Guus Sliepen and others.\n" +"Copyright (C) 1998-2008 Ivo Timmermans, Guus Sliepen and others.\n" "See the AUTHORS file for a complete list.\n" "\n" "tinc comes with ABSOLUTELY NO WARRANTY. This is free software,\n" @@ -1029,138 +1039,138 @@ msgstr "" msgid "%s service removed" msgstr "" -#: src/process.c:158 src/process.c:161 +#: src/process.c:161 src/process.c:164 #, c-format msgid "Got %s request" msgstr "" -#: src/process.c:164 +#: src/process.c:167 #, c-format msgid "Got unexpected request %d" msgstr "" -#: src/process.c:252 +#: src/process.c:255 #, c-format msgid "A tincd is already running for net `%s' with pid %ld.\n" msgstr "" -#: src/process.c:255 +#: src/process.c:258 #, c-format msgid "A tincd is already running with pid %ld.\n" msgstr "" -#: src/process.c:261 +#: src/process.c:264 #, c-format msgid "Could write pid file %s: %s\n" msgstr "" -#: src/process.c:283 +#: src/process.c:286 #, c-format msgid "No other tincd is running for net `%s'.\n" msgstr "" -#: src/process.c:286 +#: src/process.c:289 #, c-format msgid "No other tincd is running.\n" msgstr "" -#: src/process.c:295 +#: src/process.c:298 #, c-format msgid "The tincd for net `%s' is no longer running. " msgstr "" -#: src/process.c:298 +#: src/process.c:301 #, c-format msgid "The tincd is no longer running. " msgstr "" -#: src/process.c:300 +#: src/process.c:303 #, c-format msgid "Removing stale lock file.\n" msgstr "" -#: src/process.c:333 +#: src/process.c:336 #, c-format msgid "Couldn't detach from terminal: %s" msgstr "" -#: src/process.c:341 +#: src/process.c:344 #, c-format msgid "Could not write pid file %s: %s\n" msgstr "" -#: src/process.c:352 +#: src/process.c:355 #, c-format msgid "tincd %s (%s %s) starting, debug level %d" msgstr "" -#: src/process.c:387 +#: src/process.c:390 #, c-format msgid "Executing script %s" msgstr "" -#: src/process.c:417 +#: src/process.c:420 #, c-format msgid "Script %s exited with non-zero status %d" msgstr "" -#: src/process.c:422 +#: src/process.c:425 #, c-format msgid "Script %s was killed by signal %d (%s)" msgstr "" -#: src/process.c:426 +#: src/process.c:429 #, c-format msgid "Script %s terminated abnormally" msgstr "" -#: src/process.c:446 src/process.c:455 src/process.c:496 src/process.c:502 -#: src/process.c:520 +#: src/process.c:449 src/process.c:458 src/process.c:499 src/process.c:505 +#: src/process.c:523 #, c-format msgid "Got %s signal" msgstr "" -#: src/process.c:464 +#: src/process.c:467 #, c-format msgid "Got another fatal signal %d (%s): not restarting." msgstr "" -#: src/process.c:473 +#: src/process.c:476 #, c-format msgid "Got fatal signal %d (%s)" msgstr "" -#: src/process.c:477 +#: src/process.c:480 msgid "Trying to re-execute in 5 seconds..." msgstr "" -#: src/process.c:489 +#: src/process.c:492 msgid "Not restarting." msgstr "" -#: src/process.c:505 +#: src/process.c:508 #, c-format msgid "Reverting to old debug level (%d)" msgstr "" -#: src/process.c:511 +#: src/process.c:514 #, c-format msgid "" "Temporarily setting debug level to 5. Kill me with SIGINT again to go back " "to level %d." msgstr "" -#: src/process.c:544 +#: src/process.c:547 #, c-format msgid "Got unexpected signal %d (%s)" msgstr "" -#: src/process.c:550 +#: src/process.c:553 #, c-format msgid "Ignored signal %d (%s)" msgstr "" -#: src/process.c:604 +#: src/process.c:607 #, c-format msgid "Installing signal handler for signal %d (%s) failed: %s\n" msgstr "" @@ -1175,7 +1185,7 @@ msgstr "" msgid "Subnet %s expired" msgstr "" -#: src/route.c:190 src/route.c:345 src/route.c:489 +#: src/route.c:190 src/route.c:345 src/route.c:496 #, c-format msgid "Packet looping back to %s (%s)!" msgstr "" @@ -1197,54 +1207,54 @@ msgid "" "d" msgstr "" -#: src/route.c:358 src/route.c:499 +#: src/route.c:358 src/route.c:506 #, c-format msgid "Packet for %s (%s) length %d larger than MTU %d" msgstr "" -#: src/route.c:473 +#: src/route.c:480 #, c-format msgid "" "Cannot route packet from %s (%s): unknown IPv6 destination address %hx:%hx:%" "hx:%hx:%hx:%hx:%hx:%hx" msgstr "" -#: src/route.c:531 +#: src/route.c:538 #, c-format msgid "Got neighbor solicitation request from %s (%s) while in router mode!" msgstr "" -#: src/route.c:550 +#: src/route.c:557 msgid "" "Cannot route packet: received unknown type neighbor solicitation request" msgstr "" -#: src/route.c:569 +#: src/route.c:576 msgid "Cannot route packet: checksum error for neighbor solicitation request" msgstr "" -#: src/route.c:578 +#: src/route.c:585 #, c-format msgid "" "Cannot route packet: neighbor solicitation request for unknown address %hx:%" "hx:%hx:%hx:%hx:%hx:%hx:%hx" msgstr "" -#: src/route.c:665 +#: src/route.c:675 #, c-format msgid "Got ARP request from %s (%s) while in router mode!" msgstr "" -#: src/route.c:682 +#: src/route.c:692 msgid "Cannot route packet: received unknown type ARP request" msgstr "" -#: src/route.c:691 +#: src/route.c:701 #, c-format msgid "Cannot route packet: ARP request for unknown address %d.%d.%d.%d" msgstr "" -#: src/route.c:747 +#: src/route.c:757 #, c-format msgid "Cannot route packet from %s (%s): unknown type %hx" msgstr "" diff --git a/src/Makefile.in b/src/Makefile.in index 23e2829..0ec0ddf 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. +# Makefile.in generated by automake 1.10.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -312,8 +312,8 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS @@ -325,8 +325,8 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ @@ -336,13 +336,12 @@ ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ - here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique diff --git a/src/bsd/device.c b/src/bsd/device.c index 5bd253c..1d4aeee 100644 --- a/src/bsd/device.c +++ b/src/bsd/device.c @@ -1,7 +1,7 @@ /* device.c -- Interaction BSD tun/tap device Copyright (C) 2001-2005 Ivo Timmermans, - 2001-2007 Guus Sliepen + 2001-2008 Guus Sliepen 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 @@ -42,7 +42,7 @@ char *iface; char *device_info; static int device_total_in = 0; static int device_total_out = 0; -#ifdef HAVE_OPENBSD +#if defined(HAVE_OPENBSD) || defined(HAVE_FREEBSD) static device_type_t device_type = DEVICE_TYPE_TUNIFHEAD; #else static device_type_t device_type = DEVICE_TYPE_TUN; @@ -78,7 +78,7 @@ bool setup_device(void) { return false; } } else { - if(strstr(device, "tap")) + if(strstr(device, "tap") || routing_mode != RMODE_ROUTER) device_type = DEVICE_TYPE_TAP; } diff --git a/src/conf.c b/src/conf.c index 55f3b93..1194c36 100644 --- a/src/conf.c +++ b/src/conf.c @@ -2,7 +2,7 @@ conf.c -- configuration code Copyright (C) 1998 Robert van der Meulen 1998-2005 Ivo Timmermans - 2000-2006 Guus Sliepen + 2000-2008 Guus Sliepen 2000 Cris van Pelt This program is free software; you can redistribute it and/or modify @@ -19,7 +19,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: conf.c 1452 2006-04-26 13:52:58Z guus $ + $Id: conf.c 1595 2008-12-22 20:27:52Z guus $ */ #include "system.h" @@ -343,6 +343,11 @@ int read_config_file(avl_tree_t *config_tree, const char *fname) buffer = xmalloc(bufsize); for(;;) { + if(feof(fp)) { + err = 0; + break; + } + line = readline(fp, &buffer, &bufsize); if(!line) { @@ -350,11 +355,6 @@ int read_config_file(avl_tree_t *config_tree, const char *fname) break; } - if(feof(fp)) { - err = 0; - break; - } - lineno++; if(!*line || *line == '#') diff --git a/src/connection.c b/src/connection.c index 5eab8c0..1e6bb00 100644 --- a/src/connection.c +++ b/src/connection.c @@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: connection.c 1508 2007-05-16 14:42:08Z guus $ + $Id: connection.c 1600 2008-12-23 23:14:37Z guus $ */ #include "system.h" @@ -90,12 +90,31 @@ void free_connection(connection_t *c) if(c->outkey) free(c->outkey); + if(c->inctx) { + EVP_CIPHER_CTX_cleanup(c->inctx); + free(c->inctx); + } + + if(c->outctx) { + EVP_CIPHER_CTX_cleanup(c->outctx); + free(c->outctx); + } + if(c->mychallenge) free(c->mychallenge); if(c->hischallenge) free(c->hischallenge); + if(c->config_tree) + exit_configuration(&c->config_tree); + + if(c->outbuf) + free(c->outbuf); + + if(c->rsa_key) + RSA_free(c->rsa_key); + free(c); } diff --git a/src/event.c b/src/event.c index e4d4132..29280e1 100644 --- a/src/event.c +++ b/src/event.c @@ -1,6 +1,6 @@ /* event.c -- event queue - Copyright (C) 2002-2006 Guus Sliepen , + Copyright (C) 2002-2007 Guus Sliepen , 2002-2005 Ivo Timmermans This program is free software; you can redistribute it and/or modify @@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: event.c 1498 2007-02-14 09:20:20Z guus $ + $Id: event.c 1595 2008-12-22 20:27:52Z guus $ */ #include "system.h" diff --git a/src/event.h b/src/event.h index 6e9b3f2..f898757 100644 --- a/src/event.h +++ b/src/event.h @@ -1,6 +1,6 @@ /* event.h -- header for event.c - Copyright (C) 2002-2006 Guus Sliepen , + Copyright (C) 2002-2007 Guus Sliepen , 2002-2005 Ivo Timmermans This program is free software; you can redistribute it and/or modify @@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: event.h 1498 2007-02-14 09:20:20Z guus $ + $Id: event.h 1595 2008-12-22 20:27:52Z guus $ */ #ifndef __TINC_EVENT_H__ diff --git a/src/graph.c b/src/graph.c index 10b3656..222f777 100644 --- a/src/graph.c +++ b/src/graph.c @@ -1,6 +1,6 @@ /* graph.c -- graph algorithms - Copyright (C) 2001-2006 Guus Sliepen , + Copyright (C) 2001-2007 Guus Sliepen , 2001-2005 Ivo Timmermans This program is free software; you can redistribute it and/or modify @@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: graph.c 1494 2007-01-05 05:44:01Z guus $ + $Id: graph.c 1595 2008-12-22 20:27:52Z guus $ */ /* We need to generate two trees from the graph: diff --git a/src/net.c b/src/net.c index b2c4d8d..5816e43 100644 --- a/src/net.c +++ b/src/net.c @@ -1,7 +1,7 @@ /* net.c -- most of the network code Copyright (C) 1998-2005 Ivo Timmermans, - 2000-2006 Guus Sliepen + 2000-2007 Guus Sliepen 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 @@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: net.c 1498 2007-02-14 09:20:20Z guus $ + $Id: net.c 1595 2008-12-22 20:27:52Z guus $ */ #include "system.h" diff --git a/src/net_setup.c b/src/net_setup.c index 3371e32..4e9b82b 100644 --- a/src/net_setup.c +++ b/src/net_setup.c @@ -1,7 +1,7 @@ /* net_setup.c -- Setup. Copyright (C) 1998-2005 Ivo Timmermans, - 2000-2006 Guus Sliepen + 2000-2008 Guus Sliepen 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 @@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: net_setup.c 1473 2006-11-29 16:57:46Z guus $ + $Id: net_setup.c 1596 2008-12-22 20:35:45Z guus $ */ #include "system.h" @@ -286,7 +286,7 @@ bool setup_myself(void) if(get_config_bool(lookup_config(myself->connection->config_tree, "TCPOnly"), &choice) && choice) myself->options |= OPTION_TCPONLY; - if(get_config_bool(lookup_config(myself->connection->config_tree, "PMTUDiscovery"), &choice) && choice) + if(!get_config_bool(lookup_config(myself->connection->config_tree, "PMTUDiscovery"), &choice) || choice) myself->options |= OPTION_PMTU_DISCOVERY; if(myself->options & OPTION_TCPONLY) diff --git a/src/net_socket.c b/src/net_socket.c index 56d0517..488fe12 100644 --- a/src/net_socket.c +++ b/src/net_socket.c @@ -1,7 +1,7 @@ /* net_socket.c -- Handle various kinds of sockets. Copyright (C) 1998-2005 Ivo Timmermans, - 2000-2007 Guus Sliepen + 2000-2008 Guus Sliepen 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 @@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: net_socket.c 1508 2007-05-16 14:42:08Z guus $ + $Id: net_socket.c 1596 2008-12-22 20:35:45Z guus $ */ #include "system.h" @@ -102,6 +102,11 @@ int setup_listen_socket(const sockaddr_t *sa) option = 1; setsockopt(nfd, SOL_SOCKET, SO_REUSEADDR, &option, sizeof(option)); +#if defined(SOL_IPV6) && defined(IPV6_V6ONLY) + if(sa->sa.sa_family == AF_INET6) + setsockopt(nfd, SOL_IPV6, IPV6_V6ONLY, &option, sizeof option); +#endif + if(get_config_string (lookup_config(config_tree, "BindToInterface"), &iface)) { #if defined(SOL_SOCKET) && defined(SO_BINDTODEVICE) @@ -181,11 +186,16 @@ int setup_vpn_in_socket(const sockaddr_t *sa) option = 1; setsockopt(nfd, SOL_SOCKET, SO_REUSEADDR, &option, sizeof(option)); +#if defined(SOL_IPV6) && defined(IPV6_V6ONLY) + if(sa->sa.sa_family == AF_INET6) + setsockopt(nfd, SOL_IPV6, IPV6_V6ONLY, &option, sizeof option); +#endif + #if defined(SOL_IP) && defined(IP_MTU_DISCOVER) && defined(IP_PMTUDISC_DO) { bool choice; - if(get_config_bool(lookup_config(myself->connection->config_tree, "PMTUDiscovery"), &choice) && choice) { + if(!get_config_bool(lookup_config(myself->connection->config_tree, "PMTUDiscovery"), &choice) || choice) { option = IP_PMTUDISC_DO; setsockopt(nfd, SOL_IP, IP_MTU_DISCOVER, &option, sizeof(option)); } @@ -196,7 +206,7 @@ int setup_vpn_in_socket(const sockaddr_t *sa) { bool choice; - if(get_config_bool(lookup_config(myself->connection->config_tree, "PMTUDiscovery"), &choice) && choice) { + if(!get_config_bool(lookup_config(myself->connection->config_tree, "PMTUDiscovery"), &choice) || choice) { option = IPV6_PMTUDISC_DO; setsockopt(nfd, SOL_IPV6, IPV6_MTU_DISCOVER, &option, sizeof(option)); } @@ -300,7 +310,8 @@ begin: } if(!c->outgoing->aip) { - freeaddrinfo(c->outgoing->ai); + if(c->outgoing->ai) + freeaddrinfo(c->outgoing->ai); c->outgoing->ai = NULL; goto begin; } @@ -325,6 +336,12 @@ begin: goto begin; } +#if defined(SOL_IPV6) && defined(IPV6_V6ONLY) + int option = 1; + if(c->address.sa.sa_family == AF_INET6) + setsockopt(c->socket, SOL_IPV6, IPV6_V6ONLY, &option, sizeof option); +#endif + /* Optimize TCP settings */ configure_tcp(c); diff --git a/src/process.c b/src/process.c index 3a57fab..e2b97ee 100644 --- a/src/process.c +++ b/src/process.c @@ -1,7 +1,7 @@ /* process.c -- process management functions Copyright (C) 1999-2005 Ivo Timmermans, - 2000-2006 Guus Sliepen + 2000-2007 Guus Sliepen 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 @@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: process.c 1499 2007-02-14 09:21:34Z guus $ + $Id: process.c 1595 2008-12-22 20:27:52Z guus $ */ #include "system.h" @@ -154,6 +154,9 @@ bool remove_service(void) { DWORD WINAPI controlhandler(DWORD request, DWORD type, LPVOID boe, LPVOID bah) { switch(request) { + case SERVICE_CONTROL_INTERROGATE: + SetServiceStatus(statushandle, &status); + return NO_ERROR; case SERVICE_CONTROL_STOP: logger(LOG_NOTICE, _("Got %s request"), "SERVICE_CONTROL_STOP"); break; diff --git a/src/protocol_auth.c b/src/protocol_auth.c index f0bd4fa..7eef800 100644 --- a/src/protocol_auth.c +++ b/src/protocol_auth.c @@ -1,7 +1,7 @@ /* protocol_auth.c -- handle the meta-protocol, authentication Copyright (C) 1999-2005 Ivo Timmermans, - 2000-2007 Guus Sliepen + 2000-2008 Guus Sliepen 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 @@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: protocol_auth.c 1508 2007-05-16 14:42:08Z guus $ + $Id: protocol_auth.c 1596 2008-12-22 20:35:45Z guus $ */ #include "system.h" @@ -240,7 +240,7 @@ bool metakey_h(connection_t *c) /* Decrypt the meta key */ if(RSA_private_decrypt(len, (unsigned char *)buffer, (unsigned char *)c->inkey, myself->connection->rsa_key, RSA_NO_PADDING) != len) { /* See challenge() */ - logger(LOG_ERR, _("Error during encryption of meta key for %s (%s)"), + logger(LOG_ERR, _("Error during decryption of meta key for %s (%s)"), c->name, c->hostname); return false; } @@ -483,7 +483,7 @@ bool send_ack(connection_t *c) if((get_config_bool(lookup_config(c->config_tree, "TCPOnly"), &choice) && choice) || myself->options & OPTION_TCPONLY) c->options |= OPTION_TCPONLY | OPTION_INDIRECT; - if((get_config_bool(lookup_config(c->config_tree, "PMTUDiscovery"), &choice) && choice) || myself->options & OPTION_PMTU_DISCOVERY) + if((!get_config_bool(lookup_config(c->config_tree, "PMTUDiscovery"), &choice) || choice) || myself->options & OPTION_PMTU_DISCOVERY) c->options |= OPTION_PMTU_DISCOVERY; get_config_int(lookup_config(c->config_tree, "Weight"), &c->estimated_weight); diff --git a/src/protocol_key.c b/src/protocol_key.c index 147cc02..e8ea1b1 100644 --- a/src/protocol_key.c +++ b/src/protocol_key.c @@ -1,7 +1,7 @@ /* protocol_key.c -- handle the meta-protocol, key exchange Copyright (C) 1999-2005 Ivo Timmermans, - 2000-2006 Guus Sliepen + 2000-2008 Guus Sliepen 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 @@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: protocol_key.c 1452 2006-04-26 13:52:58Z guus $ + $Id: protocol_key.c 1595 2008-12-22 20:27:52Z guus $ */ #include "system.h" @@ -134,6 +134,12 @@ bool req_key_h(connection_t *c) if(tunnelserver) return false; + if(!to->status.reachable) { + logger(LOG_WARNING, _("Got %s from %s (%s) destination %s which is not reachable"), + "REQ_KEY", c->name, c->hostname, to_name); + return true; + } + send_req_key(to->nexthop->connection, from, to); } @@ -197,6 +203,12 @@ bool ans_key_h(connection_t *c) if(tunnelserver) return false; + if(!to->status.reachable) { + logger(LOG_WARNING, _("Got %s from %s (%s) destination %s which is not reachable"), + "ANS_KEY", c->name, c->hostname, to_name); + return true; + } + return send_request(to->nexthop->connection, "%s", c->buffer); } diff --git a/src/route.c b/src/route.c index 6cf9425..ae2e33c 100644 --- a/src/route.c +++ b/src/route.c @@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: route.c 1461 2006-08-09 22:31:10Z guus $ + $Id: route.c 1601 2008-12-26 12:46:45Z guus $ */ #include "system.h" @@ -376,7 +376,14 @@ static void route_ipv4(node_t *source, vpn_packet_t *packet) if(!checklength(source, packet, ether_size + ip_size)) return; - route_ipv4_unicast(source, packet); + if(((packet->data[30] & 0xf0) == 0xe0) || + packet->data[30] == 255 && + packet->data[31] == 255 && + packet->data[32] == 255 && + packet->data[33] == 255) + broadcast_packet(source, packet); + else + route_ipv4_unicast(source, packet); } /* RFC 2463 */ @@ -645,7 +652,10 @@ static void route_ipv6(node_t *source, vpn_packet_t *packet) return; } - route_ipv6_unicast(source, packet); + if(packet->data[38] == 255) + broadcast_packet(source, packet); + else + route_ipv6_unicast(source, packet); } /* RFC 826 */ diff --git a/src/subnet.c b/src/subnet.c index 64603b2..a61ab9d 100644 --- a/src/subnet.c +++ b/src/subnet.c @@ -1,6 +1,6 @@ /* subnet.c -- handle subnet lookups and lists - Copyright (C) 2000-2006 Guus Sliepen , + Copyright (C) 2000-2007 Guus Sliepen , 2000-2005 Ivo Timmermans This program is free software; you can redistribute it and/or modify @@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: subnet.c 1459 2006-08-08 13:44:37Z guus $ + $Id: subnet.c 1595 2008-12-22 20:27:52Z guus $ */ #include "system.h" @@ -188,11 +188,17 @@ bool str2net(subnet_t *subnet, const char *subnetstr) if(sscanf(subnetstr, "%hu.%hu.%hu.%hu/%d", &x[0], &x[1], &x[2], &x[3], &l) == 5) { + if(l < 0 || l > 32) + return false; + subnet->type = SUBNET_IPV4; subnet->net.ipv4.prefixlength = l; - for(i = 0; i < 4; i++) + for(i = 0; i < 4; i++) { + if(x[i] > 255) + return false; subnet->net.ipv4.address.x[i] = x[i]; + } return true; } @@ -200,6 +206,9 @@ bool str2net(subnet_t *subnet, const char *subnetstr) if(sscanf(subnetstr, "%hx:%hx:%hx:%hx:%hx:%hx:%hx:%hx/%d", &x[0], &x[1], &x[2], &x[3], &x[4], &x[5], &x[6], &x[7], &l) == 9) { + if(l < 0 || l > 128) + return false; + subnet->type = SUBNET_IPV6; subnet->net.ipv6.prefixlength = l; @@ -213,8 +222,11 @@ bool str2net(subnet_t *subnet, const char *subnetstr) subnet->type = SUBNET_IPV4; subnet->net.ipv4.prefixlength = 32; - for(i = 0; i < 4; i++) + for(i = 0; i < 4; i++) { + if(x[i] > 255) + return false; subnet->net.ipv4.address.x[i] = x[i]; + } return true; } @@ -348,6 +360,8 @@ subnet_t *lookup_subnet_ipv4(const ipv4_t *address) /* Otherwise, see if there is a bigger enclosing subnet */ subnet.net.ipv4.prefixlength = p->net.ipv4.prefixlength - 1; + if(subnet.net.ipv4.prefixlength < 0 || subnet.net.ipv4.prefixlength > 32) + return NULL; maskcpy(&subnet.net.ipv4.address, &p->net.ipv4.address, subnet.net.ipv4.prefixlength, sizeof(ipv4_t)); } } @@ -384,6 +398,8 @@ subnet_t *lookup_subnet_ipv6(const ipv6_t *address) /* Otherwise, see if there is a bigger enclosing subnet */ subnet.net.ipv6.prefixlength = p->net.ipv6.prefixlength - 1; + if(subnet.net.ipv6.prefixlength < 0 || subnet.net.ipv6.prefixlength > 128) + return NULL; maskcpy(&subnet.net.ipv6.address, &p->net.ipv6.address, subnet.net.ipv6.prefixlength, sizeof(ipv6_t)); } } diff --git a/src/tincd.c b/src/tincd.c index d0d15c3..ae033ff 100644 --- a/src/tincd.c +++ b/src/tincd.c @@ -1,7 +1,7 @@ /* tincd.c -- the main file for tincd Copyright (C) 1998-2005 Ivo Timmermans - 2000-2007 Guus Sliepen + 2000-2008 Guus Sliepen 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 @@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: tincd.c 1496 2007-01-05 13:18:36Z guus $ + $Id: tincd.c 1600 2008-12-23 23:14:37Z guus $ */ #include "system.h" @@ -408,7 +408,7 @@ int main(int argc, char **argv) if(show_version) { printf(_("%s version %s (built %s %s, protocol %d)\n"), PACKAGE, VERSION, __DATE__, __TIME__, PROT_CURRENT); - printf(_("Copyright (C) 1998-2007 Ivo Timmermans, Guus Sliepen and others.\n" + printf(_("Copyright (C) 1998-2008 Ivo Timmermans, Guus Sliepen and others.\n" "See the AUTHORS file for a complete list.\n\n" "tinc comes with ABSOLUTELY NO WARRANTY. This is free software,\n" "and you are welcome to redistribute it under certain conditions;\n" @@ -510,7 +510,19 @@ end: remove_pid(pidfilename); #endif + if (identname) free(identname); + if (netname) free(netname); + if (pidfilename) free(pidfilename); + if (logfilename) free(logfilename); + if (myport) free(myport); + if (device) free(device); + if (confbase) free(confbase); + EVP_cleanup(); + ENGINE_cleanup(); + CRYPTO_cleanup_all_ex_data(); + ERR_remove_state(0); + ERR_free_strings(); return status; }