Compare commits
No commits in common. "master" and "upstream/1.1_pre8" have entirely different histories.
master
...
upstream/1
251 changed files with 32604 additions and 21619 deletions
2
COPYING
2
COPYING
|
|
@ -1,4 +1,4 @@
|
||||||
Copyright (C) 1998-2019 Ivo Timmermans, Guus Sliepen and others.
|
Copyright (C) 1998-2013 Ivo Timmermans, Guus Sliepen and others.
|
||||||
See the AUTHORS file for a complete list.
|
See the AUTHORS file for a complete list.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it under
|
This program is free software; you can redistribute it and/or modify it under
|
||||||
|
|
|
||||||
318
INSTALL
318
INSTALL
|
|
@ -1,8 +1,8 @@
|
||||||
Installation Instructions
|
Installation Instructions
|
||||||
*************************
|
*************************
|
||||||
|
|
||||||
Copyright (C) 1994-1996, 1999-2002, 2004-2016 Free Software
|
Copyright (C) 1994-1996, 1999-2002, 2004-2013 Free Software Foundation,
|
||||||
Foundation, Inc.
|
Inc.
|
||||||
|
|
||||||
Copying and distribution of this file, with or without modification,
|
Copying and distribution of this file, with or without modification,
|
||||||
are permitted in any medium without royalty provided the copyright
|
are permitted in any medium without royalty provided the copyright
|
||||||
|
|
@ -12,96 +12,97 @@ without warranty of any kind.
|
||||||
Basic Installation
|
Basic Installation
|
||||||
==================
|
==================
|
||||||
|
|
||||||
Briefly, the shell command './configure && make && make install'
|
Briefly, the shell commands `./configure; make; make install' should
|
||||||
should configure, build, and install this package. The following
|
configure, build, and install this package. The following
|
||||||
more-detailed instructions are generic; see the 'README' file for
|
more-detailed instructions are generic; see the `README' file for
|
||||||
instructions specific to this package. Some packages provide this
|
instructions specific to this package. Some packages provide this
|
||||||
'INSTALL' file but do not implement all of the features documented
|
`INSTALL' file but do not implement all of the features documented
|
||||||
below. The lack of an optional feature in a given package is not
|
below. The lack of an optional feature in a given package is not
|
||||||
necessarily a bug. More recommendations for GNU packages can be found
|
necessarily a bug. More recommendations for GNU packages can be found
|
||||||
in *note Makefile Conventions: (standards)Makefile Conventions.
|
in *note Makefile Conventions: (standards)Makefile Conventions.
|
||||||
|
|
||||||
The 'configure' shell script attempts to guess correct values for
|
The `configure' shell script attempts to guess correct values for
|
||||||
various system-dependent variables used during compilation. It uses
|
various system-dependent variables used during compilation. It uses
|
||||||
those values to create a 'Makefile' in each directory of the package.
|
those values to create a `Makefile' in each directory of the package.
|
||||||
It may also create one or more '.h' files containing system-dependent
|
It may also create one or more `.h' files containing system-dependent
|
||||||
definitions. Finally, it creates a shell script 'config.status' that
|
definitions. Finally, it creates a shell script `config.status' that
|
||||||
you can run in the future to recreate the current configuration, and a
|
you can run in the future to recreate the current configuration, and a
|
||||||
file 'config.log' containing compiler output (useful mainly for
|
file `config.log' containing compiler output (useful mainly for
|
||||||
debugging 'configure').
|
debugging `configure').
|
||||||
|
|
||||||
It can also use an optional file (typically called 'config.cache' and
|
It can also use an optional file (typically called `config.cache'
|
||||||
enabled with '--cache-file=config.cache' or simply '-C') that saves the
|
and enabled with `--cache-file=config.cache' or simply `-C') that saves
|
||||||
results of its tests to speed up reconfiguring. Caching is disabled by
|
the results of its tests to speed up reconfiguring. Caching is
|
||||||
default to prevent problems with accidental use of stale cache files.
|
disabled by default to prevent problems with accidental use of stale
|
||||||
|
cache files.
|
||||||
|
|
||||||
If you need to do unusual things to compile the package, please try
|
If you need to do unusual things to compile the package, please try
|
||||||
to figure out how 'configure' could check whether to do them, and mail
|
to figure out how `configure' could check whether to do them, and mail
|
||||||
diffs or instructions to the address given in the 'README' so they can
|
diffs or instructions to the address given in the `README' so they can
|
||||||
be considered for the next release. If you are using the cache, and at
|
be considered for the next release. If you are using the cache, and at
|
||||||
some point 'config.cache' contains results you don't want to keep, you
|
some point `config.cache' contains results you don't want to keep, you
|
||||||
may remove or edit it.
|
may remove or edit it.
|
||||||
|
|
||||||
The file 'configure.ac' (or 'configure.in') is used to create
|
The file `configure.ac' (or `configure.in') is used to create
|
||||||
'configure' by a program called 'autoconf'. You need 'configure.ac' if
|
`configure' by a program called `autoconf'. You need `configure.ac' if
|
||||||
you want to change it or regenerate 'configure' using a newer version of
|
you want to change it or regenerate `configure' using a newer version
|
||||||
'autoconf'.
|
of `autoconf'.
|
||||||
|
|
||||||
The simplest way to compile this package is:
|
The simplest way to compile this package is:
|
||||||
|
|
||||||
1. 'cd' to the directory containing the package's source code and type
|
1. `cd' to the directory containing the package's source code and type
|
||||||
'./configure' to configure the package for your system.
|
`./configure' to configure the package for your system.
|
||||||
|
|
||||||
Running 'configure' might take a while. While running, it prints
|
Running `configure' might take a while. While running, it prints
|
||||||
some messages telling which features it is checking for.
|
some messages telling which features it is checking for.
|
||||||
|
|
||||||
2. Type 'make' to compile the package.
|
2. Type `make' to compile the package.
|
||||||
|
|
||||||
3. Optionally, type 'make check' to run any self-tests that come with
|
3. Optionally, type `make check' to run any self-tests that come with
|
||||||
the package, generally using the just-built uninstalled binaries.
|
the package, generally using the just-built uninstalled binaries.
|
||||||
|
|
||||||
4. Type 'make install' to install the programs and any data files and
|
4. Type `make install' to install the programs and any data files and
|
||||||
documentation. When installing into a prefix owned by root, it is
|
documentation. When installing into a prefix owned by root, it is
|
||||||
recommended that the package be configured and built as a regular
|
recommended that the package be configured and built as a regular
|
||||||
user, and only the 'make install' phase executed with root
|
user, and only the `make install' phase executed with root
|
||||||
privileges.
|
privileges.
|
||||||
|
|
||||||
5. Optionally, type 'make installcheck' to repeat any self-tests, but
|
5. Optionally, type `make installcheck' to repeat any self-tests, but
|
||||||
this time using the binaries in their final installed location.
|
this time using the binaries in their final installed location.
|
||||||
This target does not install anything. Running this target as a
|
This target does not install anything. Running this target as a
|
||||||
regular user, particularly if the prior 'make install' required
|
regular user, particularly if the prior `make install' required
|
||||||
root privileges, verifies that the installation completed
|
root privileges, verifies that the installation completed
|
||||||
correctly.
|
correctly.
|
||||||
|
|
||||||
6. You can remove the program binaries and object files from the
|
6. You can remove the program binaries and object files from the
|
||||||
source code directory by typing 'make clean'. To also remove the
|
source code directory by typing `make clean'. To also remove the
|
||||||
files that 'configure' created (so you can compile the package for
|
files that `configure' created (so you can compile the package for
|
||||||
a different kind of computer), type 'make distclean'. There is
|
a different kind of computer), type `make distclean'. There is
|
||||||
also a 'make maintainer-clean' target, but that is intended mainly
|
also a `make maintainer-clean' target, but that is intended mainly
|
||||||
for the package's developers. If you use it, you may have to get
|
for the package's developers. If you use it, you may have to get
|
||||||
all sorts of other programs in order to regenerate files that came
|
all sorts of other programs in order to regenerate files that came
|
||||||
with the distribution.
|
with the distribution.
|
||||||
|
|
||||||
7. Often, you can also type 'make uninstall' to remove the installed
|
7. Often, you can also type `make uninstall' to remove the installed
|
||||||
files again. In practice, not all packages have tested that
|
files again. In practice, not all packages have tested that
|
||||||
uninstallation works correctly, even though it is required by the
|
uninstallation works correctly, even though it is required by the
|
||||||
GNU Coding Standards.
|
GNU Coding Standards.
|
||||||
|
|
||||||
8. Some packages, particularly those that use Automake, provide 'make
|
8. Some packages, particularly those that use Automake, provide `make
|
||||||
distcheck', which can by used by developers to test that all other
|
distcheck', which can by used by developers to test that all other
|
||||||
targets like 'make install' and 'make uninstall' work correctly.
|
targets like `make install' and `make uninstall' work correctly.
|
||||||
This target is generally not run by end users.
|
This target is generally not run by end users.
|
||||||
|
|
||||||
Compilers and Options
|
Compilers and Options
|
||||||
=====================
|
=====================
|
||||||
|
|
||||||
Some systems require unusual options for compilation or linking that
|
Some systems require unusual options for compilation or linking that
|
||||||
the 'configure' script does not know about. Run './configure --help'
|
the `configure' script does not know about. Run `./configure --help'
|
||||||
for details on some of the pertinent environment variables.
|
for details on some of the pertinent environment variables.
|
||||||
|
|
||||||
You can give 'configure' initial values for configuration parameters
|
You can give `configure' initial values for configuration parameters
|
||||||
by setting variables in the command line or in the environment. Here is
|
by setting variables in the command line or in the environment. Here
|
||||||
an example:
|
is an example:
|
||||||
|
|
||||||
./configure CC=c99 CFLAGS=-g LIBS=-lposix
|
./configure CC=c99 CFLAGS=-g LIBS=-lposix
|
||||||
|
|
||||||
|
|
@ -112,21 +113,21 @@ Compiling For Multiple Architectures
|
||||||
|
|
||||||
You can compile the package for more than one kind of computer at the
|
You can compile the package for more than one kind of computer at the
|
||||||
same time, by placing the object files for each architecture in their
|
same time, by placing the object files for each architecture in their
|
||||||
own directory. To do this, you can use GNU 'make'. 'cd' to the
|
own directory. To do this, you can use GNU `make'. `cd' to the
|
||||||
directory where you want the object files and executables to go and run
|
directory where you want the object files and executables to go and run
|
||||||
the 'configure' script. 'configure' automatically checks for the source
|
the `configure' script. `configure' automatically checks for the
|
||||||
code in the directory that 'configure' is in and in '..'. This is known
|
source code in the directory that `configure' is in and in `..'. This
|
||||||
as a "VPATH" build.
|
is known as a "VPATH" build.
|
||||||
|
|
||||||
With a non-GNU 'make', it is safer to compile the package for one
|
With a non-GNU `make', it is safer to compile the package for one
|
||||||
architecture at a time in the source code directory. After you have
|
architecture at a time in the source code directory. After you have
|
||||||
installed the package for one architecture, use 'make distclean' before
|
installed the package for one architecture, use `make distclean' before
|
||||||
reconfiguring for another architecture.
|
reconfiguring for another architecture.
|
||||||
|
|
||||||
On MacOS X 10.5 and later systems, you can create libraries and
|
On MacOS X 10.5 and later systems, you can create libraries and
|
||||||
executables that work on multiple system types--known as "fat" or
|
executables that work on multiple system types--known as "fat" or
|
||||||
"universal" binaries--by specifying multiple '-arch' options to the
|
"universal" binaries--by specifying multiple `-arch' options to the
|
||||||
compiler but only a single '-arch' option to the preprocessor. Like
|
compiler but only a single `-arch' option to the preprocessor. Like
|
||||||
this:
|
this:
|
||||||
|
|
||||||
./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
|
./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
|
||||||
|
|
@ -135,104 +136,105 @@ this:
|
||||||
|
|
||||||
This is not guaranteed to produce working output in all cases, you
|
This is not guaranteed to produce working output in all cases, you
|
||||||
may have to build one architecture at a time and combine the results
|
may have to build one architecture at a time and combine the results
|
||||||
using the 'lipo' tool if you have problems.
|
using the `lipo' tool if you have problems.
|
||||||
|
|
||||||
Installation Names
|
Installation Names
|
||||||
==================
|
==================
|
||||||
|
|
||||||
By default, 'make install' installs the package's commands under
|
By default, `make install' installs the package's commands under
|
||||||
'/usr/local/bin', include files under '/usr/local/include', etc. You
|
`/usr/local/bin', include files under `/usr/local/include', etc. You
|
||||||
can specify an installation prefix other than '/usr/local' by giving
|
can specify an installation prefix other than `/usr/local' by giving
|
||||||
'configure' the option '--prefix=PREFIX', where PREFIX must be an
|
`configure' the option `--prefix=PREFIX', where PREFIX must be an
|
||||||
absolute file name.
|
absolute file name.
|
||||||
|
|
||||||
You can specify separate installation prefixes for
|
You can specify separate installation prefixes for
|
||||||
architecture-specific files and architecture-independent files. If you
|
architecture-specific files and architecture-independent files. If you
|
||||||
pass the option '--exec-prefix=PREFIX' to 'configure', the package uses
|
pass the option `--exec-prefix=PREFIX' to `configure', the package uses
|
||||||
PREFIX as the prefix for installing programs and libraries.
|
PREFIX as the prefix for installing programs and libraries.
|
||||||
Documentation and other data files still use the regular prefix.
|
Documentation and other data files still use the regular prefix.
|
||||||
|
|
||||||
In addition, if you use an unusual directory layout you can give
|
In addition, if you use an unusual directory layout you can give
|
||||||
options like '--bindir=DIR' to specify different values for particular
|
options like `--bindir=DIR' to specify different values for particular
|
||||||
kinds of files. Run 'configure --help' for a list of the directories
|
kinds of files. Run `configure --help' for a list of the directories
|
||||||
you can set and what kinds of files go in them. In general, the default
|
you can set and what kinds of files go in them. In general, the
|
||||||
for these options is expressed in terms of '${prefix}', so that
|
default for these options is expressed in terms of `${prefix}', so that
|
||||||
specifying just '--prefix' will affect all of the other directory
|
specifying just `--prefix' will affect all of the other directory
|
||||||
specifications that were not explicitly provided.
|
specifications that were not explicitly provided.
|
||||||
|
|
||||||
The most portable way to affect installation locations is to pass the
|
The most portable way to affect installation locations is to pass the
|
||||||
correct locations to 'configure'; however, many packages provide one or
|
correct locations to `configure'; however, many packages provide one or
|
||||||
both of the following shortcuts of passing variable assignments to the
|
both of the following shortcuts of passing variable assignments to the
|
||||||
'make install' command line to change installation locations without
|
`make install' command line to change installation locations without
|
||||||
having to reconfigure or recompile.
|
having to reconfigure or recompile.
|
||||||
|
|
||||||
The first method involves providing an override variable for each
|
The first method involves providing an override variable for each
|
||||||
affected directory. For example, 'make install
|
affected directory. For example, `make install
|
||||||
prefix=/alternate/directory' will choose an alternate location for all
|
prefix=/alternate/directory' will choose an alternate location for all
|
||||||
directory configuration variables that were expressed in terms of
|
directory configuration variables that were expressed in terms of
|
||||||
'${prefix}'. Any directories that were specified during 'configure',
|
`${prefix}'. Any directories that were specified during `configure',
|
||||||
but not in terms of '${prefix}', must each be overridden at install time
|
but not in terms of `${prefix}', must each be overridden at install
|
||||||
for the entire installation to be relocated. The approach of makefile
|
time for the entire installation to be relocated. The approach of
|
||||||
variable overrides for each directory variable is required by the GNU
|
makefile variable overrides for each directory variable is required by
|
||||||
Coding Standards, and ideally causes no recompilation. However, some
|
the GNU Coding Standards, and ideally causes no recompilation.
|
||||||
platforms have known limitations with the semantics of shared libraries
|
However, some platforms have known limitations with the semantics of
|
||||||
that end up requiring recompilation when using this method, particularly
|
shared libraries that end up requiring recompilation when using this
|
||||||
noticeable in packages that use GNU Libtool.
|
method, particularly noticeable in packages that use GNU Libtool.
|
||||||
|
|
||||||
The second method involves providing the 'DESTDIR' variable. For
|
The second method involves providing the `DESTDIR' variable. For
|
||||||
example, 'make install DESTDIR=/alternate/directory' will prepend
|
example, `make install DESTDIR=/alternate/directory' will prepend
|
||||||
'/alternate/directory' before all installation names. The approach of
|
`/alternate/directory' before all installation names. The approach of
|
||||||
'DESTDIR' overrides is not required by the GNU Coding Standards, and
|
`DESTDIR' overrides is not required by the GNU Coding Standards, and
|
||||||
does not work on platforms that have drive letters. On the other hand,
|
does not work on platforms that have drive letters. On the other hand,
|
||||||
it does better at avoiding recompilation issues, and works well even
|
it does better at avoiding recompilation issues, and works well even
|
||||||
when some directory options were not specified in terms of '${prefix}'
|
when some directory options were not specified in terms of `${prefix}'
|
||||||
at 'configure' time.
|
at `configure' time.
|
||||||
|
|
||||||
Optional Features
|
Optional Features
|
||||||
=================
|
=================
|
||||||
|
|
||||||
If the package supports it, you can cause programs to be installed
|
If the package supports it, you can cause programs to be installed
|
||||||
with an extra prefix or suffix on their names by giving 'configure' the
|
with an extra prefix or suffix on their names by giving `configure' the
|
||||||
option '--program-prefix=PREFIX' or '--program-suffix=SUFFIX'.
|
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
|
||||||
|
|
||||||
Some packages pay attention to '--enable-FEATURE' options to
|
Some packages pay attention to `--enable-FEATURE' options to
|
||||||
'configure', where FEATURE indicates an optional part of the package.
|
`configure', where FEATURE indicates an optional part of the package.
|
||||||
They may also pay attention to '--with-PACKAGE' options, where PACKAGE
|
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
|
||||||
is something like 'gnu-as' or 'x' (for the X Window System). The
|
is something like `gnu-as' or `x' (for the X Window System). The
|
||||||
'README' should mention any '--enable-' and '--with-' options that the
|
`README' should mention any `--enable-' and `--with-' options that the
|
||||||
package recognizes.
|
package recognizes.
|
||||||
|
|
||||||
For packages that use the X Window System, 'configure' can usually
|
For packages that use the X Window System, `configure' can usually
|
||||||
find the X include and library files automatically, but if it doesn't,
|
find the X include and library files automatically, but if it doesn't,
|
||||||
you can use the 'configure' options '--x-includes=DIR' and
|
you can use the `configure' options `--x-includes=DIR' and
|
||||||
'--x-libraries=DIR' to specify their locations.
|
`--x-libraries=DIR' to specify their locations.
|
||||||
|
|
||||||
Some packages offer the ability to configure how verbose the
|
Some packages offer the ability to configure how verbose the
|
||||||
execution of 'make' will be. For these packages, running './configure
|
execution of `make' will be. For these packages, running `./configure
|
||||||
--enable-silent-rules' sets the default to minimal output, which can be
|
--enable-silent-rules' sets the default to minimal output, which can be
|
||||||
overridden with 'make V=1'; while running './configure
|
overridden with `make V=1'; while running `./configure
|
||||||
--disable-silent-rules' sets the default to verbose, which can be
|
--disable-silent-rules' sets the default to verbose, which can be
|
||||||
overridden with 'make V=0'.
|
overridden with `make V=0'.
|
||||||
|
|
||||||
Particular systems
|
Particular systems
|
||||||
==================
|
==================
|
||||||
|
|
||||||
On HP-UX, the default C compiler is not ANSI C compatible. If GNU CC
|
On HP-UX, the default C compiler is not ANSI C compatible. If GNU
|
||||||
is not installed, it is recommended to use the following options in
|
CC is not installed, it is recommended to use the following options in
|
||||||
order to use an ANSI C compiler:
|
order to use an ANSI C compiler:
|
||||||
|
|
||||||
./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
|
./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
|
||||||
|
|
||||||
and if that doesn't work, install pre-built binaries of GCC for HP-UX.
|
and if that doesn't work, install pre-built binaries of GCC for HP-UX.
|
||||||
|
|
||||||
HP-UX 'make' updates targets which have the same time stamps as their
|
HP-UX `make' updates targets which have the same time stamps as
|
||||||
prerequisites, which makes it generally unusable when shipped generated
|
their prerequisites, which makes it generally unusable when shipped
|
||||||
files such as 'configure' are involved. Use GNU 'make' instead.
|
generated files such as `configure' are involved. Use GNU `make'
|
||||||
|
instead.
|
||||||
|
|
||||||
On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
|
On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
|
||||||
parse its '<wchar.h>' header file. The option '-nodtk' can be used as a
|
parse its `<wchar.h>' header file. The option `-nodtk' can be used as
|
||||||
workaround. If GNU CC is not installed, it is therefore recommended to
|
a workaround. If GNU CC is not installed, it is therefore recommended
|
||||||
try
|
to try
|
||||||
|
|
||||||
./configure CC="cc"
|
./configure CC="cc"
|
||||||
|
|
||||||
|
|
@ -240,26 +242,26 @@ and if that doesn't work, try
|
||||||
|
|
||||||
./configure CC="cc -nodtk"
|
./configure CC="cc -nodtk"
|
||||||
|
|
||||||
On Solaris, don't put '/usr/ucb' early in your 'PATH'. This
|
On Solaris, don't put `/usr/ucb' early in your `PATH'. This
|
||||||
directory contains several dysfunctional programs; working variants of
|
directory contains several dysfunctional programs; working variants of
|
||||||
these programs are available in '/usr/bin'. So, if you need '/usr/ucb'
|
these programs are available in `/usr/bin'. So, if you need `/usr/ucb'
|
||||||
in your 'PATH', put it _after_ '/usr/bin'.
|
in your `PATH', put it _after_ `/usr/bin'.
|
||||||
|
|
||||||
On Haiku, software installed for all users goes in '/boot/common',
|
On Haiku, software installed for all users goes in `/boot/common',
|
||||||
not '/usr/local'. It is recommended to use the following options:
|
not `/usr/local'. It is recommended to use the following options:
|
||||||
|
|
||||||
./configure --prefix=/boot/common
|
./configure --prefix=/boot/common
|
||||||
|
|
||||||
Specifying the System Type
|
Specifying the System Type
|
||||||
==========================
|
==========================
|
||||||
|
|
||||||
There may be some features 'configure' cannot figure out
|
There may be some features `configure' cannot figure out
|
||||||
automatically, but needs to determine by the type of machine the package
|
automatically, but needs to determine by the type of machine the package
|
||||||
will run on. Usually, assuming the package is built to be run on the
|
will run on. Usually, assuming the package is built to be run on the
|
||||||
_same_ architectures, 'configure' can figure that out, but if it prints
|
_same_ architectures, `configure' can figure that out, but if it prints
|
||||||
a message saying it cannot guess the machine type, give it the
|
a message saying it cannot guess the machine type, give it the
|
||||||
'--build=TYPE' option. TYPE can either be a short name for the system
|
`--build=TYPE' option. TYPE can either be a short name for the system
|
||||||
type, such as 'sun4', or a canonical name which has the form:
|
type, such as `sun4', or a canonical name which has the form:
|
||||||
|
|
||||||
CPU-COMPANY-SYSTEM
|
CPU-COMPANY-SYSTEM
|
||||||
|
|
||||||
|
|
@ -268,101 +270,101 @@ where SYSTEM can have one of these forms:
|
||||||
OS
|
OS
|
||||||
KERNEL-OS
|
KERNEL-OS
|
||||||
|
|
||||||
See the file 'config.sub' for the possible values of each field. If
|
See the file `config.sub' for the possible values of each field. If
|
||||||
'config.sub' isn't included in this package, then this package doesn't
|
`config.sub' isn't included in this package, then this package doesn't
|
||||||
need to know the machine type.
|
need to know the machine type.
|
||||||
|
|
||||||
If you are _building_ compiler tools for cross-compiling, you should
|
If you are _building_ compiler tools for cross-compiling, you should
|
||||||
use the option '--target=TYPE' to select the type of system they will
|
use the option `--target=TYPE' to select the type of system they will
|
||||||
produce code for.
|
produce code for.
|
||||||
|
|
||||||
If you want to _use_ a cross compiler, that generates code for a
|
If you want to _use_ a cross compiler, that generates code for a
|
||||||
platform different from the build platform, you should specify the
|
platform different from the build platform, you should specify the
|
||||||
"host" platform (i.e., that on which the generated programs will
|
"host" platform (i.e., that on which the generated programs will
|
||||||
eventually be run) with '--host=TYPE'.
|
eventually be run) with `--host=TYPE'.
|
||||||
|
|
||||||
Sharing Defaults
|
Sharing Defaults
|
||||||
================
|
================
|
||||||
|
|
||||||
If you want to set default values for 'configure' scripts to share,
|
If you want to set default values for `configure' scripts to share,
|
||||||
you can create a site shell script called 'config.site' that gives
|
you can create a site shell script called `config.site' that gives
|
||||||
default values for variables like 'CC', 'cache_file', and 'prefix'.
|
default values for variables like `CC', `cache_file', and `prefix'.
|
||||||
'configure' looks for 'PREFIX/share/config.site' if it exists, then
|
`configure' looks for `PREFIX/share/config.site' if it exists, then
|
||||||
'PREFIX/etc/config.site' if it exists. Or, you can set the
|
`PREFIX/etc/config.site' if it exists. Or, you can set the
|
||||||
'CONFIG_SITE' environment variable to the location of the site script.
|
`CONFIG_SITE' environment variable to the location of the site script.
|
||||||
A warning: not all 'configure' scripts look for a site script.
|
A warning: not all `configure' scripts look for a site script.
|
||||||
|
|
||||||
Defining Variables
|
Defining Variables
|
||||||
==================
|
==================
|
||||||
|
|
||||||
Variables not defined in a site shell script can be set in the
|
Variables not defined in a site shell script can be set in the
|
||||||
environment passed to 'configure'. However, some packages may run
|
environment passed to `configure'. However, some packages may run
|
||||||
configure again during the build, and the customized values of these
|
configure again during the build, and the customized values of these
|
||||||
variables may be lost. In order to avoid this problem, you should set
|
variables may be lost. In order to avoid this problem, you should set
|
||||||
them in the 'configure' command line, using 'VAR=value'. For example:
|
them in the `configure' command line, using `VAR=value'. For example:
|
||||||
|
|
||||||
./configure CC=/usr/local2/bin/gcc
|
./configure CC=/usr/local2/bin/gcc
|
||||||
|
|
||||||
causes the specified 'gcc' to be used as the C compiler (unless it is
|
causes the specified `gcc' to be used as the C compiler (unless it is
|
||||||
overridden in the site shell script).
|
overridden in the site shell script).
|
||||||
|
|
||||||
Unfortunately, this technique does not work for 'CONFIG_SHELL' due to an
|
Unfortunately, this technique does not work for `CONFIG_SHELL' due to
|
||||||
Autoconf limitation. Until the limitation is lifted, you can use this
|
an Autoconf limitation. Until the limitation is lifted, you can use
|
||||||
workaround:
|
this workaround:
|
||||||
|
|
||||||
CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash
|
CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash
|
||||||
|
|
||||||
'configure' Invocation
|
`configure' Invocation
|
||||||
======================
|
======================
|
||||||
|
|
||||||
'configure' recognizes the following options to control how it
|
`configure' recognizes the following options to control how it
|
||||||
operates.
|
operates.
|
||||||
|
|
||||||
'--help'
|
`--help'
|
||||||
'-h'
|
`-h'
|
||||||
Print a summary of all of the options to 'configure', and exit.
|
Print a summary of all of the options to `configure', and exit.
|
||||||
|
|
||||||
'--help=short'
|
`--help=short'
|
||||||
'--help=recursive'
|
`--help=recursive'
|
||||||
Print a summary of the options unique to this package's
|
Print a summary of the options unique to this package's
|
||||||
'configure', and exit. The 'short' variant lists options used only
|
`configure', and exit. The `short' variant lists options used
|
||||||
in the top level, while the 'recursive' variant lists options also
|
only in the top level, while the `recursive' variant lists options
|
||||||
present in any nested packages.
|
also present in any nested packages.
|
||||||
|
|
||||||
'--version'
|
`--version'
|
||||||
'-V'
|
`-V'
|
||||||
Print the version of Autoconf used to generate the 'configure'
|
Print the version of Autoconf used to generate the `configure'
|
||||||
script, and exit.
|
script, and exit.
|
||||||
|
|
||||||
'--cache-file=FILE'
|
`--cache-file=FILE'
|
||||||
Enable the cache: use and save the results of the tests in FILE,
|
Enable the cache: use and save the results of the tests in FILE,
|
||||||
traditionally 'config.cache'. FILE defaults to '/dev/null' to
|
traditionally `config.cache'. FILE defaults to `/dev/null' to
|
||||||
disable caching.
|
disable caching.
|
||||||
|
|
||||||
'--config-cache'
|
`--config-cache'
|
||||||
'-C'
|
`-C'
|
||||||
Alias for '--cache-file=config.cache'.
|
Alias for `--cache-file=config.cache'.
|
||||||
|
|
||||||
'--quiet'
|
`--quiet'
|
||||||
'--silent'
|
`--silent'
|
||||||
'-q'
|
`-q'
|
||||||
Do not print messages saying which checks are being made. To
|
Do not print messages saying which checks are being made. To
|
||||||
suppress all normal output, redirect it to '/dev/null' (any error
|
suppress all normal output, redirect it to `/dev/null' (any error
|
||||||
messages will still be shown).
|
messages will still be shown).
|
||||||
|
|
||||||
'--srcdir=DIR'
|
`--srcdir=DIR'
|
||||||
Look for the package's source code in directory DIR. Usually
|
Look for the package's source code in directory DIR. Usually
|
||||||
'configure' can determine that directory automatically.
|
`configure' can determine that directory automatically.
|
||||||
|
|
||||||
'--prefix=DIR'
|
`--prefix=DIR'
|
||||||
Use DIR as the installation prefix. *note Installation Names:: for
|
Use DIR as the installation prefix. *note Installation Names::
|
||||||
more details, including other options available for fine-tuning the
|
for more details, including other options available for fine-tuning
|
||||||
installation locations.
|
the installation locations.
|
||||||
|
|
||||||
'--no-create'
|
`--no-create'
|
||||||
'-n'
|
`-n'
|
||||||
Run the configure checks, but stop before creating any output
|
Run the configure checks, but stop before creating any output
|
||||||
files.
|
files.
|
||||||
|
|
||||||
'configure' also accepts some other, not widely useful, options. Run
|
`configure' also accepts some other, not widely useful, options. Run
|
||||||
'configure --help' for more details.
|
`configure --help' for more details.
|
||||||
|
|
|
||||||
18
Makefile.am
18
Makefile.am
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
AUTOMAKE_OPTIONS = gnu
|
AUTOMAKE_OPTIONS = gnu
|
||||||
|
|
||||||
SUBDIRS = src doc systemd
|
SUBDIRS = m4 src doc gui
|
||||||
|
|
||||||
ACLOCAL_AMFLAGS = -I m4
|
ACLOCAL_AMFLAGS = -I m4
|
||||||
|
|
||||||
|
|
@ -11,5 +11,17 @@ EXTRA_DIST = COPYING.README README.android
|
||||||
ChangeLog:
|
ChangeLog:
|
||||||
git log > ChangeLog
|
git log > ChangeLog
|
||||||
|
|
||||||
astyle:
|
deb:
|
||||||
astyle --options=.astylerc -nQ src/*.[ch] src/*/*.[ch]
|
dpkg-buildpackage -rfakeroot
|
||||||
|
|
||||||
|
rpm: dist
|
||||||
|
cp $(distdir).tar.gz /usr/src/redhat/SOURCES/
|
||||||
|
cp redhat/tinc.spec /usr/src/redhat/SOURCES/
|
||||||
|
cd /usr/src/redhat/SOURCES/ && rpm -bb tinc.spec
|
||||||
|
|
||||||
|
release:
|
||||||
|
rm -f ChangeLog
|
||||||
|
$(MAKE) ChangeLog
|
||||||
|
echo "Please edit the NEWS file now..."
|
||||||
|
/usr/bin/editor NEWS
|
||||||
|
$(MAKE) dist
|
||||||
|
|
|
||||||
114
Makefile.in
114
Makefile.in
|
|
@ -1,7 +1,7 @@
|
||||||
# Makefile.in generated by automake 1.16.2 from Makefile.am.
|
# Makefile.in generated by automake 1.13.3 from Makefile.am.
|
||||||
# @configure_input@
|
# @configure_input@
|
||||||
|
|
||||||
# Copyright (C) 1994-2020 Free Software Foundation, Inc.
|
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
|
||||||
|
|
||||||
# This Makefile.in is free software; the Free Software Foundation
|
# This Makefile.in is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
|
@ -14,17 +14,7 @@
|
||||||
|
|
||||||
@SET_MAKE@
|
@SET_MAKE@
|
||||||
VPATH = @srcdir@
|
VPATH = @srcdir@
|
||||||
am__is_gnu_make = { \
|
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
|
||||||
if test -z '$(MAKELEVEL)'; then \
|
|
||||||
false; \
|
|
||||||
elif test -n '$(MAKE_HOST)'; then \
|
|
||||||
true; \
|
|
||||||
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
|
|
||||||
true; \
|
|
||||||
else \
|
|
||||||
false; \
|
|
||||||
fi; \
|
|
||||||
}
|
|
||||||
am__make_running_with_option = \
|
am__make_running_with_option = \
|
||||||
case $${target_option-} in \
|
case $${target_option-} in \
|
||||||
?) ;; \
|
?) ;; \
|
||||||
|
|
@ -88,19 +78,18 @@ POST_UNINSTALL = :
|
||||||
build_triplet = @build@
|
build_triplet = @build@
|
||||||
host_triplet = @host@
|
host_triplet = @host@
|
||||||
subdir = .
|
subdir = .
|
||||||
|
DIST_COMMON = INSTALL NEWS README AUTHORS ChangeLog \
|
||||||
|
$(srcdir)/Makefile.in $(srcdir)/Makefile.am \
|
||||||
|
$(top_srcdir)/configure $(am__configure_deps) \
|
||||||
|
$(srcdir)/config.h.in COPYING THANKS compile config.guess \
|
||||||
|
config.sub depcomp install-sh missing
|
||||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||||
am__aclocal_m4_deps = $(top_srcdir)/m4/attribute.m4 \
|
am__aclocal_m4_deps = $(top_srcdir)/m4/attribute.m4 \
|
||||||
$(top_srcdir)/m4/ax_append_flag.m4 \
|
$(top_srcdir)/m4/curses.m4 $(top_srcdir)/m4/lzo.m4 \
|
||||||
$(top_srcdir)/m4/ax_cflags_warn_all.m4 \
|
$(top_srcdir)/m4/openssl.m4 $(top_srcdir)/m4/readline.m4 \
|
||||||
$(top_srcdir)/m4/ax_check_compile_flag.m4 \
|
$(top_srcdir)/m4/zlib.m4 $(top_srcdir)/configure.ac
|
||||||
$(top_srcdir)/m4/ax_check_link_flag.m4 \
|
|
||||||
$(top_srcdir)/m4/ax_require_defined.m4 $(top_srcdir)/m4/lzo.m4 \
|
|
||||||
$(top_srcdir)/m4/openssl.m4 $(top_srcdir)/m4/zlib.m4 \
|
|
||||||
$(top_srcdir)/configure.ac
|
|
||||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||||
$(ACLOCAL_M4)
|
$(ACLOCAL_M4)
|
||||||
DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
|
|
||||||
$(am__configure_deps) $(am__DIST_COMMON)
|
|
||||||
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
|
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
|
||||||
configure.lineno config.status.lineno
|
configure.lineno config.status.lineno
|
||||||
mkinstalldirs = $(install_sh) -d
|
mkinstalldirs = $(install_sh) -d
|
||||||
|
|
@ -141,9 +130,9 @@ am__recursive_targets = \
|
||||||
$(RECURSIVE_CLEAN_TARGETS) \
|
$(RECURSIVE_CLEAN_TARGETS) \
|
||||||
$(am__extra_recursive_targets)
|
$(am__extra_recursive_targets)
|
||||||
AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
|
AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
|
||||||
cscope distdir distdir-am dist dist-all distcheck
|
cscope distdir dist dist-all distcheck
|
||||||
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) \
|
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \
|
||||||
config.h.in
|
$(LISP)config.h.in
|
||||||
# Read a list of newline-separated strings from the standard input,
|
# Read a list of newline-separated strings from the standard input,
|
||||||
# and print each of them once, without duplicates. Input order is
|
# and print each of them once, without duplicates. Input order is
|
||||||
# *not* preserved.
|
# *not* preserved.
|
||||||
|
|
@ -164,9 +153,6 @@ ETAGS = etags
|
||||||
CTAGS = ctags
|
CTAGS = ctags
|
||||||
CSCOPE = cscope
|
CSCOPE = cscope
|
||||||
DIST_SUBDIRS = $(SUBDIRS)
|
DIST_SUBDIRS = $(SUBDIRS)
|
||||||
am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in AUTHORS \
|
|
||||||
COPYING ChangeLog INSTALL NEWS README THANKS compile \
|
|
||||||
config.guess config.sub depcomp install-sh missing
|
|
||||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||||
distdir = $(PACKAGE)-$(VERSION)
|
distdir = $(PACKAGE)-$(VERSION)
|
||||||
top_distdir = $(distdir)
|
top_distdir = $(distdir)
|
||||||
|
|
@ -221,6 +207,7 @@ CCDEPMODE = @CCDEPMODE@
|
||||||
CFLAGS = @CFLAGS@
|
CFLAGS = @CFLAGS@
|
||||||
CPP = @CPP@
|
CPP = @CPP@
|
||||||
CPPFLAGS = @CPPFLAGS@
|
CPPFLAGS = @CPPFLAGS@
|
||||||
|
CURSES_LIBS = @CURSES_LIBS@
|
||||||
CYGPATH_W = @CYGPATH_W@
|
CYGPATH_W = @CYGPATH_W@
|
||||||
DEFS = @DEFS@
|
DEFS = @DEFS@
|
||||||
DEPDIR = @DEPDIR@
|
DEPDIR = @DEPDIR@
|
||||||
|
|
@ -236,8 +223,12 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||||
LDFLAGS = @LDFLAGS@
|
LDFLAGS = @LDFLAGS@
|
||||||
|
LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
|
||||||
|
LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
|
||||||
|
LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@
|
||||||
LIBOBJS = @LIBOBJS@
|
LIBOBJS = @LIBOBJS@
|
||||||
LIBS = @LIBS@
|
LIBS = @LIBS@
|
||||||
|
LN_S = @LN_S@
|
||||||
LTLIBOBJS = @LTLIBOBJS@
|
LTLIBOBJS = @LTLIBOBJS@
|
||||||
MAKEINFO = @MAKEINFO@
|
MAKEINFO = @MAKEINFO@
|
||||||
MKDIR_P = @MKDIR_P@
|
MKDIR_P = @MKDIR_P@
|
||||||
|
|
@ -250,6 +241,8 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||||
PACKAGE_URL = @PACKAGE_URL@
|
PACKAGE_URL = @PACKAGE_URL@
|
||||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||||
|
RANLIB = @RANLIB@
|
||||||
|
READLINE_LIBS = @READLINE_LIBS@
|
||||||
SET_MAKE = @SET_MAKE@
|
SET_MAKE = @SET_MAKE@
|
||||||
SHELL = @SHELL@
|
SHELL = @SHELL@
|
||||||
STRIP = @STRIP@
|
STRIP = @STRIP@
|
||||||
|
|
@ -296,18 +289,16 @@ pdfdir = @pdfdir@
|
||||||
prefix = @prefix@
|
prefix = @prefix@
|
||||||
program_transform_name = @program_transform_name@
|
program_transform_name = @program_transform_name@
|
||||||
psdir = @psdir@
|
psdir = @psdir@
|
||||||
runstatedir = @runstatedir@
|
|
||||||
sbindir = @sbindir@
|
sbindir = @sbindir@
|
||||||
sharedstatedir = @sharedstatedir@
|
sharedstatedir = @sharedstatedir@
|
||||||
srcdir = @srcdir@
|
srcdir = @srcdir@
|
||||||
sysconfdir = @sysconfdir@
|
sysconfdir = @sysconfdir@
|
||||||
systemd_path = @systemd_path@
|
|
||||||
target_alias = @target_alias@
|
target_alias = @target_alias@
|
||||||
top_build_prefix = @top_build_prefix@
|
top_build_prefix = @top_build_prefix@
|
||||||
top_builddir = @top_builddir@
|
top_builddir = @top_builddir@
|
||||||
top_srcdir = @top_srcdir@
|
top_srcdir = @top_srcdir@
|
||||||
AUTOMAKE_OPTIONS = gnu
|
AUTOMAKE_OPTIONS = gnu
|
||||||
SUBDIRS = src doc systemd
|
SUBDIRS = m4 src doc gui
|
||||||
ACLOCAL_AMFLAGS = -I m4
|
ACLOCAL_AMFLAGS = -I m4
|
||||||
EXTRA_DIST = COPYING.README README.android
|
EXTRA_DIST = COPYING.README README.android
|
||||||
all: config.h
|
all: config.h
|
||||||
|
|
@ -329,14 +320,15 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
|
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
|
||||||
$(am__cd) $(top_srcdir) && \
|
$(am__cd) $(top_srcdir) && \
|
||||||
$(AUTOMAKE) --gnu Makefile
|
$(AUTOMAKE) --gnu Makefile
|
||||||
|
.PRECIOUS: Makefile
|
||||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||||
@case '$?' in \
|
@case '$?' in \
|
||||||
*config.status*) \
|
*config.status*) \
|
||||||
echo ' $(SHELL) ./config.status'; \
|
echo ' $(SHELL) ./config.status'; \
|
||||||
$(SHELL) ./config.status;; \
|
$(SHELL) ./config.status;; \
|
||||||
*) \
|
*) \
|
||||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles)'; \
|
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
|
||||||
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \
|
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
|
||||||
esac;
|
esac;
|
||||||
|
|
||||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||||
|
|
@ -349,8 +341,8 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||||
$(am__aclocal_m4_deps):
|
$(am__aclocal_m4_deps):
|
||||||
|
|
||||||
config.h: stamp-h1
|
config.h: stamp-h1
|
||||||
@test -f $@ || rm -f stamp-h1
|
@if test ! -f $@; then rm -f stamp-h1; else :; fi
|
||||||
@test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1
|
@if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi
|
||||||
|
|
||||||
stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
|
stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
|
||||||
@rm -f stamp-h1
|
@rm -f stamp-h1
|
||||||
|
|
@ -469,10 +461,7 @@ distclean-tags:
|
||||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||||
-rm -f cscope.out cscope.in.out cscope.po.out cscope.files
|
-rm -f cscope.out cscope.in.out cscope.po.out cscope.files
|
||||||
|
|
||||||
distdir: $(BUILT_SOURCES)
|
distdir: $(DISTFILES)
|
||||||
$(MAKE) $(AM_MAKEFLAGS) distdir-am
|
|
||||||
|
|
||||||
distdir-am: $(DISTFILES)
|
|
||||||
@case `sed 15q $(srcdir)/NEWS` in \
|
@case `sed 15q $(srcdir)/NEWS` in \
|
||||||
*"$(VERSION)"*) : ;; \
|
*"$(VERSION)"*) : ;; \
|
||||||
*) \
|
*) \
|
||||||
|
|
@ -543,7 +532,7 @@ distdir-am: $(DISTFILES)
|
||||||
! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
|
! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
|
||||||
|| chmod -R a+r "$(distdir)"
|
|| chmod -R a+r "$(distdir)"
|
||||||
dist-gzip: distdir
|
dist-gzip: distdir
|
||||||
tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz
|
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||||
$(am__post_remove_distdir)
|
$(am__post_remove_distdir)
|
||||||
|
|
||||||
dist-bzip2: distdir
|
dist-bzip2: distdir
|
||||||
|
|
@ -558,22 +547,12 @@ dist-xz: distdir
|
||||||
tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
|
tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
|
||||||
$(am__post_remove_distdir)
|
$(am__post_remove_distdir)
|
||||||
|
|
||||||
dist-zstd: distdir
|
|
||||||
tardir=$(distdir) && $(am__tar) | zstd -c $${ZSTD_CLEVEL-$${ZSTD_OPT--19}} >$(distdir).tar.zst
|
|
||||||
$(am__post_remove_distdir)
|
|
||||||
|
|
||||||
dist-tarZ: distdir
|
dist-tarZ: distdir
|
||||||
@echo WARNING: "Support for distribution archives compressed with" \
|
|
||||||
"legacy program 'compress' is deprecated." >&2
|
|
||||||
@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
|
|
||||||
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
|
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
|
||||||
$(am__post_remove_distdir)
|
$(am__post_remove_distdir)
|
||||||
|
|
||||||
dist-shar: distdir
|
dist-shar: distdir
|
||||||
@echo WARNING: "Support for shar distribution archives is" \
|
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
|
||||||
"deprecated." >&2
|
|
||||||
@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
|
|
||||||
shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz
|
|
||||||
$(am__post_remove_distdir)
|
$(am__post_remove_distdir)
|
||||||
|
|
||||||
dist-zip: distdir
|
dist-zip: distdir
|
||||||
|
|
@ -591,7 +570,7 @@ dist dist-all:
|
||||||
distcheck: dist
|
distcheck: dist
|
||||||
case '$(DIST_ARCHIVES)' in \
|
case '$(DIST_ARCHIVES)' in \
|
||||||
*.tar.gz*) \
|
*.tar.gz*) \
|
||||||
eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\
|
GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
|
||||||
*.tar.bz2*) \
|
*.tar.bz2*) \
|
||||||
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
|
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
|
||||||
*.tar.lz*) \
|
*.tar.lz*) \
|
||||||
|
|
@ -601,25 +580,22 @@ distcheck: dist
|
||||||
*.tar.Z*) \
|
*.tar.Z*) \
|
||||||
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
|
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
|
||||||
*.shar.gz*) \
|
*.shar.gz*) \
|
||||||
eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\
|
GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
|
||||||
*.zip*) \
|
*.zip*) \
|
||||||
unzip $(distdir).zip ;;\
|
unzip $(distdir).zip ;;\
|
||||||
*.tar.zst*) \
|
|
||||||
zstd -dc $(distdir).tar.zst | $(am__untar) ;;\
|
|
||||||
esac
|
esac
|
||||||
chmod -R a-w $(distdir)
|
chmod -R a-w $(distdir)
|
||||||
chmod u+w $(distdir)
|
chmod u+w $(distdir)
|
||||||
mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst
|
mkdir $(distdir)/_build $(distdir)/_inst
|
||||||
chmod a-w $(distdir)
|
chmod a-w $(distdir)
|
||||||
test -d $(distdir)/_build || exit 0; \
|
test -d $(distdir)/_build || exit 0; \
|
||||||
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
|
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
|
||||||
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
|
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
|
||||||
&& am__cwd=`pwd` \
|
&& am__cwd=`pwd` \
|
||||||
&& $(am__cd) $(distdir)/_build/sub \
|
&& $(am__cd) $(distdir)/_build \
|
||||||
&& ../../configure \
|
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
|
||||||
$(AM_DISTCHECK_CONFIGURE_FLAGS) \
|
$(AM_DISTCHECK_CONFIGURE_FLAGS) \
|
||||||
$(DISTCHECK_CONFIGURE_FLAGS) \
|
$(DISTCHECK_CONFIGURE_FLAGS) \
|
||||||
--srcdir=../.. --prefix="$$dc_install_base" \
|
|
||||||
&& $(MAKE) $(AM_MAKEFLAGS) \
|
&& $(MAKE) $(AM_MAKEFLAGS) \
|
||||||
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
|
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
|
||||||
&& $(MAKE) $(AM_MAKEFLAGS) check \
|
&& $(MAKE) $(AM_MAKEFLAGS) check \
|
||||||
|
|
@ -782,7 +758,7 @@ uninstall-am:
|
||||||
am--refresh check check-am clean clean-cscope clean-generic \
|
am--refresh check check-am clean clean-cscope clean-generic \
|
||||||
cscope cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \
|
cscope cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \
|
||||||
dist-gzip dist-lzip dist-shar dist-tarZ dist-xz dist-zip \
|
dist-gzip dist-lzip dist-shar dist-tarZ dist-xz dist-zip \
|
||||||
dist-zstd distcheck distclean distclean-generic distclean-hdr \
|
distcheck distclean distclean-generic distclean-hdr \
|
||||||
distclean-tags distcleancheck distdir distuninstallcheck dvi \
|
distclean-tags distcleancheck distdir distuninstallcheck dvi \
|
||||||
dvi-am html html-am info info-am install install-am \
|
dvi-am html html-am info info-am install install-am \
|
||||||
install-data install-data-am install-dvi install-dvi-am \
|
install-data install-data-am install-dvi install-dvi-am \
|
||||||
|
|
@ -794,14 +770,24 @@ uninstall-am:
|
||||||
mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \
|
mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \
|
||||||
uninstall-am
|
uninstall-am
|
||||||
|
|
||||||
.PRECIOUS: Makefile
|
|
||||||
|
|
||||||
|
|
||||||
ChangeLog:
|
ChangeLog:
|
||||||
git log > ChangeLog
|
git log > ChangeLog
|
||||||
|
|
||||||
astyle:
|
deb:
|
||||||
astyle --options=.astylerc -nQ src/*.[ch] src/*/*.[ch]
|
dpkg-buildpackage -rfakeroot
|
||||||
|
|
||||||
|
rpm: dist
|
||||||
|
cp $(distdir).tar.gz /usr/src/redhat/SOURCES/
|
||||||
|
cp redhat/tinc.spec /usr/src/redhat/SOURCES/
|
||||||
|
cd /usr/src/redhat/SOURCES/ && rpm -bb tinc.spec
|
||||||
|
|
||||||
|
release:
|
||||||
|
rm -f ChangeLog
|
||||||
|
$(MAKE) ChangeLog
|
||||||
|
echo "Please edit the NEWS file now..."
|
||||||
|
/usr/bin/editor NEWS
|
||||||
|
$(MAKE) dist
|
||||||
|
|
||||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||||
|
|
|
||||||
662
NEWS
662
NEWS
|
|
@ -1,163 +1,125 @@
|
||||||
Version 1.0.36 August 26 2019
|
Version 1.1pre8 August 13 2013
|
||||||
|
|
||||||
* Fix compiling tinc with certain versions of the OpenSSL library.
|
* ExperimentalProtocol is now enabled by default.
|
||||||
* Fix parsing some IPv6 addresses with :: in them.
|
|
||||||
* Fix GraphDumpFile output to handle node names starting with a digit.
|
|
||||||
* Fix a potential segmentation fault when fragmenting packets.
|
|
||||||
|
|
||||||
Thanks to Rosen Penev, Quentin Rameau and Werner Schreiber for their
|
* Added an invitation protocol that makes it easy to invite new nodes.
|
||||||
contributions to this version of tinc.
|
|
||||||
|
|
||||||
Version 1.0.35 October 5 2018
|
* Added the LocalDiscoveryAddress option to change the broadcast address used
|
||||||
|
to find local nodes.
|
||||||
|
|
||||||
* Prevent oracle attacks (CVE-2018-16737, CVE-2018-16738).
|
* Limit the rate of incoming meta-connections.
|
||||||
* Prevent a MITM from forcing a NULL cipher for UDP (CVE-2018-16758).
|
|
||||||
* Minor fixes in the documentation.
|
|
||||||
|
|
||||||
Thanks to Amine Amri and Rafael Sadowski for their contributions to this
|
* Many small bug fixes and code cleanups.
|
||||||
|
|
||||||
|
Thanks to Etienne Dechamps and Sven-Haegar Koch for their contributions to this
|
||||||
version of tinc.
|
version of tinc.
|
||||||
|
|
||||||
Version 1.0.34 June 12 2018
|
Version 1.1pre7 April 22 2013
|
||||||
|
|
||||||
* Fix a potential segmentation fault when connecting to an IPv6 peer via a
|
* Fixed large latencies on Windows.
|
||||||
proxy.
|
|
||||||
* Minor improvements to the build system.
|
|
||||||
* Make the systemd service file identical to the one from the 1.1 branch.
|
|
||||||
* Fix a potential problem causing IPv4 sockets to not work on macOS.
|
|
||||||
|
|
||||||
Thanks to Maximilian Stein and Wang Liu Shuai for their contributions to this
|
* Renamed the tincctl tool to tinc.
|
||||||
version of tinc.
|
|
||||||
|
|
||||||
Version 1.0.33 November 4 2017
|
* Simplified changing the configuration using the tinc tool.
|
||||||
|
|
||||||
* Allow compilation from a build directory.
|
* Added a full description of the ExperimentalProtocol to the manual.
|
||||||
* Source code cleanups.
|
|
||||||
* Fix some options specified on the command line not surviving a HUP signal.
|
|
||||||
* Handle tun/tap device returning EPERM or EBUSY.
|
|
||||||
* Disable PMTUDiscovery when TCPOnly is used.
|
|
||||||
* Support the --runstatedir option of the autoconf 2.70.
|
|
||||||
|
|
||||||
Thanks to Rafael Sadowski and Pierre-Olivier Mercier for their contributions to
|
* Drop packets forwarded via TCP if they are too big (CVE-2013-1428).
|
||||||
this version of tinc.
|
|
||||||
|
|
||||||
Version 1.0.32 September 2 2017
|
Thanks to Martin Schobert for auditing tinc and reporting the vulnerability.
|
||||||
|
|
||||||
* Fix segmentation fault when using Cipher = none.
|
Version 1.1pre6 February 20 2013
|
||||||
* Fix Proxy = exec.
|
|
||||||
* Support PriorityInheritance for IPv6 packets.
|
|
||||||
* Fixes for Solaris tun/tap support.
|
|
||||||
* Bind outgoing TCP sockets when ListenAddress is used.
|
|
||||||
|
|
||||||
Thanks to Vittorio Gambaletta for his contribution to this version of tinc.
|
* Fixed tincd exitting immediately on Windows.
|
||||||
|
|
||||||
Version 1.0.31 January 15 2017
|
* Detect PMTU increases.
|
||||||
|
|
||||||
* Remove ExecStop in tinc@.service.
|
* Fixed crashes when using a SOCKS5 proxy.
|
||||||
|
|
||||||
Thanks to Élie Bouttier for his contribution to this version of tinc.
|
* Fixed control connection when using a proxy.
|
||||||
|
|
||||||
Version 1.0.30 October 30 2016
|
Version 1.1pre5 January 20 2013
|
||||||
|
|
||||||
* Fix troubles connecting to some HTTP proxies.
|
* Fixed long delays and possible hangs on Windows.
|
||||||
|
|
||||||
* Add mitigations for the Sweet32 attack when using a 64-bit block cipher.
|
* Fixed support for the tunemu device on iOS, the UML and VDE devices.
|
||||||
|
|
||||||
* Use AES256 and SHA256 as the default encryption and digest algorithms.
|
* Small improvements to the documentation and error messages.
|
||||||
|
|
||||||
Version 1.0.29 October 9 2016
|
* Fixed broadcast packets not reaching the whole VPN.
|
||||||
|
|
||||||
* Fix UDP communication with peers with link-local IPv6 addresses.
|
* Tincctl now connects via a UNIX socket to the tincd on platforms that
|
||||||
|
support this.
|
||||||
|
|
||||||
* Ensure compatibility with OpenSSL 1.1.0.
|
* The PriorityInheritance option now also works in switch mode.
|
||||||
|
|
||||||
* Ensure autoreconf can be run without requiring autoconf-archive.
|
Version 1.1pre4 December 5 2012
|
||||||
|
|
||||||
* Log warnings about dropped packets only at debug level 5.
|
* Added the "AutoConnect" option which will let tinc automatically select
|
||||||
|
which nodes to connect to.
|
||||||
|
|
||||||
Version 1.0.28 April 10 2016
|
* Improved performance of VLAN-tagged IP traffic inside the VPN.
|
||||||
|
|
||||||
* Fix compilation on BSD platforms.
|
* Ensured LocalDiscovery works with multiple BindToAddress statements and/or
|
||||||
|
IPv6-only LANs.
|
||||||
|
|
||||||
* Add systemd service files.
|
* Dropped dependency on libevent.
|
||||||
|
|
||||||
Version 1.0.27 April 10 2016
|
* Fixed Windows version not reading packets from the TAP adapter.
|
||||||
|
|
||||||
* When using Proxy, let the proxy resolve hostnames if tinc can't.
|
Version 1.1pre3 October 14 2012
|
||||||
|
|
||||||
* Fixes and improvements of the DecrementTTL option.
|
* New experimental protocol:
|
||||||
|
* Uses 521 bit ECDSA keys for authentication.
|
||||||
|
* Uses AES-256-CTR and HMAC-SHA256.
|
||||||
|
* Always provides perfect forward secrecy.
|
||||||
|
* Used for both meta-connections and VPN packets.
|
||||||
|
* VPN packets are encrypted end-to-end.
|
||||||
|
|
||||||
* Fixed the $NAME variable in subnet-up/down scripts for the local Subnets.
|
* Many improvements to tincctl:
|
||||||
|
* "config" command shows/adds/changes configuration variables.
|
||||||
|
* "export" and "import" commands help exchange configuration files.
|
||||||
|
* "init" command sets up initial configuration files.
|
||||||
|
* "info" command shows details about a node, subnet or address.
|
||||||
|
* "log" command shows live log messages.
|
||||||
|
* Without a command it acts as a shell, with history and TAB completion.
|
||||||
|
* Improved starting/stopping tincd.
|
||||||
|
* Improved graph output.
|
||||||
|
|
||||||
* Fixed potentially wrong checksum generation when clamping the MSS.
|
* When trying to directly send UDP packets to a node for which multiple
|
||||||
|
addresses are known, all of them are tried.
|
||||||
|
|
||||||
* Properly choose between the system's or our own copy of getopt.
|
* Many small fixes, code cleanups and documentation updates.
|
||||||
|
|
||||||
* Fixed compiling tinc for Cygwin with MinGW installed.
|
Version 1.1pre2 July 17 2011
|
||||||
|
|
||||||
* Added support for OS X utun interfaces.
|
* .cookie files are renamed to .pid files, which are compatible with 1.0.x.
|
||||||
|
|
||||||
* Documentation updates and minor fixes.
|
* Experimental protocol enhancements that can be enabled with the option
|
||||||
|
ExperimentalProtocol = yes:
|
||||||
|
|
||||||
Thanks to Vittorio Gambaletta, LunarShaddow, Florian Weik and Nathan Stratton
|
* Ephemeral ECDH key exchange will be used for both the meta protocol and
|
||||||
Treadway for their contributions to this version of tinc.
|
UDP session keys.
|
||||||
|
* Key exchanges are signed with ECDSA.
|
||||||
|
* ECDSA public keys are automatically exchanged after RSA authentication if
|
||||||
|
nodes do not know each other's ECDSA public key yet.
|
||||||
|
|
||||||
Version 1.0.26 July 5 2015
|
Version 1.1pre1 June 25 2011
|
||||||
|
|
||||||
* Tinc now forces glibc to reload /etc/resolv.conf for every hostname lookup.
|
* Control interface allows control of a running tinc daemon. Used by:
|
||||||
|
* tincctl, a commandline utility
|
||||||
|
* tinc-gui, a preliminary GUI implemented in Python/wxWidgets
|
||||||
|
|
||||||
* Fixed --logfile without a filename on Windows.
|
* Code cleanups and reorganization.
|
||||||
|
|
||||||
* Ensure tinc can be compiled when using musl libc.
|
* Repleacable cryptography backend, currently supports OpenSSL and libgcrypt.
|
||||||
|
|
||||||
Thanks to Jo-Philipp Wich for his contribution to this version of tinc.
|
* Use libevent to handle I/O events and timeouts.
|
||||||
|
|
||||||
Version 1.0.25 December 22 2014
|
* Use splay trees instead of AVL trees to manage internal datastructures.
|
||||||
|
|
||||||
* Documentation updates.
|
Thanks to Scott Lamb and Sven-Haegar Koch for their contributions to this
|
||||||
|
version of tinc.
|
||||||
* Support linking against -lresolv on Mac OS X.
|
|
||||||
|
|
||||||
* Fix scripts on Windows when using the ScriptsInterpreter option.
|
|
||||||
|
|
||||||
* Allow a minimum reconnect timeout to be specified.
|
|
||||||
|
|
||||||
* Support PriorityInheritance on IPv6 sockets.
|
|
||||||
|
|
||||||
Thanks to David Pflug, Baptiste Jonglez, Alexis Hildebrandt, Borg, Jochen Voss,
|
|
||||||
Tomislav Čohar and VittGam for their contributions to this version of tinc.
|
|
||||||
|
|
||||||
Version 1.0.24 May 11 2014
|
|
||||||
|
|
||||||
* Various compiler hardening flags are enabled by default.
|
|
||||||
|
|
||||||
* Updated support for Solaris, allowing switch mode on Solaris 11.
|
|
||||||
|
|
||||||
* Configuration will now also be read from a conf.d directory.
|
|
||||||
|
|
||||||
* Various updates to the documentation.
|
|
||||||
|
|
||||||
* Tinc now forces glibc to reload /etc/resolv.conf after it receives SIGALRM.
|
|
||||||
|
|
||||||
* Fixed a potential routing loop when IndirectData or TCPOnly is used and
|
|
||||||
broadcast packets are being sent.
|
|
||||||
|
|
||||||
* Improved security with constant time memcmp and stricter use of OpenSSL's
|
|
||||||
RNG functions.
|
|
||||||
|
|
||||||
* Fixed all issues found by Coverity.
|
|
||||||
|
|
||||||
Thanks to Florent Clairambault, Vilbrekin, luckyhacky, Armin Fisslthaler, Loïc
|
|
||||||
Dachary and Steffan Karger for their contributions to this version of tinc.
|
|
||||||
|
|
||||||
Version 1.0.23 October 19 2013
|
|
||||||
|
|
||||||
* Start authentication immediately on outgoing connections (useful for sslh).
|
|
||||||
|
|
||||||
* Fixed segfault when Name = $HOST but $HOST is not set.
|
|
||||||
|
|
||||||
* Updated the build system and the documentation.
|
|
||||||
|
|
||||||
* Clean up child processes left over from Proxy = exec.
|
|
||||||
|
|
||||||
Version 1.0.22 August 13 2013
|
Version 1.0.22 August 13 2013
|
||||||
|
|
||||||
|
|
@ -210,9 +172,6 @@ Version 1.0.19 June 25 2012
|
||||||
* Add basic support for SOCKS proxies, HTTP proxies, and proxying through an
|
* Add basic support for SOCKS proxies, HTTP proxies, and proxying through an
|
||||||
external command.
|
external command.
|
||||||
|
|
||||||
Thanks to Anthony G. Basile and Michael Tokarev for their contributions to
|
|
||||||
this version of tinc.
|
|
||||||
|
|
||||||
Version 1.0.18 March 25 2012
|
Version 1.0.18 March 25 2012
|
||||||
|
|
||||||
* Fixed IPv6 in switch mode by turning off DecrementTTL by default.
|
* Fixed IPv6 in switch mode by turning off DecrementTTL by default.
|
||||||
|
|
@ -239,8 +198,6 @@ Version 1.0.17 March 10 2012
|
||||||
* Disabling old RSA keys when generating new ones now also works properly on
|
* Disabling old RSA keys when generating new ones now also works properly on
|
||||||
Windows.
|
Windows.
|
||||||
|
|
||||||
Thanks to Nick Hibma for his contribution to this version of tinc.
|
|
||||||
|
|
||||||
Version 1.0.16 July 23 2011
|
Version 1.0.16 July 23 2011
|
||||||
|
|
||||||
* Fixed a performance issue with TCP communication under Windows.
|
* Fixed a performance issue with TCP communication under Windows.
|
||||||
|
|
@ -256,6 +213,8 @@ Version 1.0.15 June 24 2011
|
||||||
|
|
||||||
* Fixed ProcessPriority option under Windows.
|
* Fixed ProcessPriority option under Windows.
|
||||||
|
|
||||||
|
Thanks to Loïc Grenié for his contribution to this version of tinc.
|
||||||
|
|
||||||
Version 1.0.14 May 8 2011
|
Version 1.0.14 May 8 2011
|
||||||
|
|
||||||
* Fixed reading configuration files that do not end with a newline. Again.
|
* Fixed reading configuration files that do not end with a newline. Again.
|
||||||
|
|
@ -371,7 +330,7 @@ Version 1.0.9 Dec 26 2008
|
||||||
|
|
||||||
* Enable path MTU discovery by default.
|
* Enable path MTU discovery by default.
|
||||||
|
|
||||||
* Fixed a memory leak that occurred when connections were closed.
|
* Fixed a memory leak that occured when connections were closed.
|
||||||
|
|
||||||
Thanks to Max Rijevski for his contributions to this version of tinc.
|
Thanks to Max Rijevski for his contributions to this version of tinc.
|
||||||
|
|
||||||
|
|
@ -397,7 +356,7 @@ Version 1.0.6 Dec 18 2006
|
||||||
* Fixed a bug where broadcasts in switch and hub modes sometimes would not
|
* Fixed a bug where broadcasts in switch and hub modes sometimes would not
|
||||||
work anymore when part of the VPN had become disconnected from the rest.
|
work anymore when part of the VPN had become disconnected from the rest.
|
||||||
|
|
||||||
version 1.0.5 Nov 14 2006
|
Version 1.0.5 Nov 14 2006
|
||||||
|
|
||||||
* Lots of small fixes.
|
* Lots of small fixes.
|
||||||
|
|
||||||
|
|
@ -412,347 +371,354 @@ version 1.0.5 Nov 14 2006
|
||||||
|
|
||||||
Thanks to Scott Lamb for his contributions to this version of tinc.
|
Thanks to Scott Lamb for his contributions to this version of tinc.
|
||||||
|
|
||||||
version 1.0.4 May 4 2005
|
Version 1.0.4 May 4 2005
|
||||||
|
|
||||||
* Fix switch and hub modes.
|
* Fix switch and hub modes.
|
||||||
|
|
||||||
* Optionally start scripts when a Subnet becomes (un)reachable.
|
* Optionally start scripts when a Subnet becomes (un)reachable.
|
||||||
|
|
||||||
version 1.0.3 Nov 11 2004
|
Version 1.0.3 Nov 11 2004
|
||||||
|
|
||||||
* Show error message when failing to write a PID file.
|
* Show error message when failing to write a PID file.
|
||||||
|
|
||||||
* Ignore spaces at end of lines in config files.
|
* Ignore spaces at end of lines in config files.
|
||||||
|
|
||||||
* Fix handling of late packets.
|
* Fix handling of late packets.
|
||||||
|
|
||||||
* Unify BSD tun/tap device handling. This allows IPv6 on tun devices and
|
* Unify BSD tun/tap device handling. This allows IPv6 on tun devices and
|
||||||
anything on tap devices as long as the underlying OS supports it.
|
anything on tap devices as long as the underlying OS supports it.
|
||||||
|
|
||||||
* Handle IPv6 on Solaris tun devices.
|
* Handle IPv6 on Solaris tun devices.
|
||||||
|
|
||||||
* Allow tinc to work properly under Windows XP SP2.
|
* Allow tinc to work properly under Windows XP SP2.
|
||||||
|
|
||||||
* Allow VLAN tagged Ethernet frames in switch and hub mode.
|
* Allow VLAN tagged Ethernet frames in switch and hub mode.
|
||||||
|
|
||||||
* Experimental PMTUDiscovery, TunnelServer and BlockingTCP options.
|
* Experimental PMTUDiscovery, TunnelServer and BlockingTCP options.
|
||||||
|
|
||||||
version 1.0.2 Nov 8 2003
|
Version 1.0.2 Nov 8 2003
|
||||||
|
|
||||||
* Fix address and hostname resolving under Windows.
|
* Fix address and hostname resolving under Windows.
|
||||||
|
|
||||||
* Remove warnings about non-existing scripts and unsupported address families.
|
* Remove warnings about non-existing scripts and unsupported address families.
|
||||||
|
|
||||||
* Use the event logger under Windows.
|
* Use the event logger under Windows.
|
||||||
|
|
||||||
* Fix quoting of filenames and command line arguments under Windows.
|
* Fix quoting of filenames and command line arguments under Windows.
|
||||||
|
|
||||||
* Strict checks for length incoming network packets and return values of
|
* Strict checks for length incoming network packets and return values of
|
||||||
cryptographic functions,
|
cryptographic functions,
|
||||||
|
|
||||||
* Fix a bug in metadata handling that made the tinc daemon abort.
|
* Fix a bug in metadata handling that made the tinc daemon abort.
|
||||||
|
|
||||||
version 1.0.1 Aug 14 2003
|
Version 1.0.1 Aug 14 2003
|
||||||
|
|
||||||
* Allow empty lines in config files.
|
* Allow empty lines in config files.
|
||||||
|
|
||||||
* Fix handling of spaces and backslashes in filenames under native Windows.
|
* Fix handling of spaces and backslashes in filenames under native Windows.
|
||||||
|
|
||||||
* Allow scripts to be executed under native Windows.
|
* Allow scripts to be executed under native Windows.
|
||||||
|
|
||||||
* Update documentation, make it less Linux specific.
|
* Update documentation, make it less Linux specific.
|
||||||
|
|
||||||
version 1.0 Aug 4 2003
|
Version 1.0 Aug 4 2003
|
||||||
|
|
||||||
* Lots of small bugfixes and code cleanups.
|
* Lots of small bugfixes and code cleanups.
|
||||||
|
|
||||||
* Throughput doubled and latency reduced.
|
* Throughput doubled and latency reduced.
|
||||||
|
|
||||||
* Added support for LZO compression.
|
* Added support for LZO compression.
|
||||||
|
|
||||||
* No need to set MAC address or disable ARP anymore.
|
* No need to set MAC address or disable ARP anymore.
|
||||||
|
|
||||||
* Added support for Windows 2000 and XP, both natively and in a Cygwin
|
* Added support for Windows 2000 and XP, both natively and in a Cygwin
|
||||||
environment.
|
environment.
|
||||||
|
|
||||||
version 1.0pre8 Sep 16 2002
|
Version 1.0pre8 Sep 16 2002
|
||||||
|
|
||||||
* More fixes for subnets with prefixlength undivisible by 8.
|
* More fixes for subnets with prefixlength undivisible by 8.
|
||||||
|
|
||||||
* Added support for NetBSD and MacOS/X.
|
* Added support for NetBSD and MacOS/X.
|
||||||
|
|
||||||
* Switched from undirected graphs to directed graphs to avoid certain race
|
* Switched from undirected graphs to directed graphs to avoid certain race
|
||||||
conditions and improve scalability.
|
conditions and improve scalability.
|
||||||
|
|
||||||
* Generalized broadcasting and forwarding of protocol messages.
|
* Generalized broadcasting and forwarding of protocol messages.
|
||||||
|
|
||||||
* Cleanup of source code.
|
* Cleanup of source code.
|
||||||
|
|
||||||
|
Version 1.0pre7 Apr 7 2002
|
||||||
|
|
||||||
version 1.0pre7 Apr 7 2002
|
* Don't do blocking read()s when getting a signal.
|
||||||
|
|
||||||
* Don't do blocking read()s when getting a signal.
|
* Remove RSA key checking code, since it sometimes thinks perfectly good RSA
|
||||||
|
keys are bad.
|
||||||
|
|
||||||
* Remove RSA key checking code, since it sometimes thinks perfectly good RSA
|
* Fix handling of subnets when prefixlength isn't divisible by 8.
|
||||||
keys are bad.
|
|
||||||
|
|
||||||
* Fix handling of subnets when prefixlength isn't divisible by 8.
|
Version 1.0pre6 Mar 27 2002
|
||||||
|
|
||||||
|
* Improvement of redundant links:
|
||||||
|
* Non-blocking connects.
|
||||||
|
* Protocol broadcast messages can no longer go into an infinite loop.
|
||||||
|
* Graph algorithm updated to look harder for direct connections.
|
||||||
|
|
||||||
version 1.0pre6 Mar 27 2002
|
* Good support for routing IPv6 packets over the VPN. Works on Linux,
|
||||||
|
FreeBSD, possibly OpenBSD but not on Solaris.
|
||||||
|
|
||||||
* Improvement of redundant links:
|
* Support for tunnels over IPv6 networks. Works on all supported
|
||||||
|
operating systems.
|
||||||
|
|
||||||
* Non-blocking connects.
|
* Optional compression of UDP connections using zlib.
|
||||||
|
|
||||||
* Protocol broadcast messages can no longer go into an infinite loop.
|
* Optionally let UDP connections inherit TOS field of tunneled packets.
|
||||||
|
|
||||||
* Graph algorithm updated to look harder for direct connections.
|
* Optionally start scripts when certain hosts become (un)reachable.
|
||||||
|
|
||||||
* Good support for routing IPv6 packets over the VPN. Works on Linux,
|
Version 1.0pre5 Feb 9 2002
|
||||||
FreeBSD, possibly OpenBSD but not on Solaris.
|
|
||||||
|
|
||||||
* Support for tunnels over IPv6 networks. Works on all supported
|
* Security enhancements:
|
||||||
operating systems.
|
* Added sequence number and optional message authentication code to
|
||||||
|
the packets.
|
||||||
|
* Configurable encryption cipher and digest algorithms.
|
||||||
|
|
||||||
* Optional compression of UDP connections using zlib.
|
* More robust handling of dis- and reconnects.
|
||||||
|
|
||||||
* Optionally let UDP connections inherit TOS field of tunneled packets.
|
* Added a "switch" and a "hub" mode to allow bridging setups.
|
||||||
|
|
||||||
* Optionally start scripts when certain hosts become (un)reachable.
|
* Preliminary support for routing of IPv6 packets.
|
||||||
|
|
||||||
|
* Supports Linux, FreeBSD, OpenBSD and Solaris.
|
||||||
|
|
||||||
version 1.0pre5 Feb 9 2002
|
Version 1.0pre4 Jan 17 2001
|
||||||
|
|
||||||
* Security enhancements:
|
* Updated documentation; the documentation now reflects the
|
||||||
|
configuration as it is.
|
||||||
|
|
||||||
* Added sequence number and optional message authentication code to
|
* Some internal changes to make tinc scale better for large
|
||||||
the packets.
|
networks, such as using AVL trees instead of linked lists for the
|
||||||
|
connection list.
|
||||||
|
|
||||||
* Configurable encryption cipher and digest algorithms.
|
* RSA keys can be stored in separate files if needed. See the
|
||||||
|
documentation for more information.
|
||||||
|
|
||||||
* More robust handling of dis- and reconnects.
|
* Tinc has now been reported to run on Linux PowerPC and FreeBSD x86.
|
||||||
|
|
||||||
* Added a "switch" and a "hub" mode to allow bridging setups.
|
Version 1.0pre3 Oct 31 2000
|
||||||
|
|
||||||
* Preliminary support for routing of IPv6 packets.
|
* The protocol has been redesigned, and although some details are
|
||||||
|
still under discussion, this is secure. Care has been taken to
|
||||||
|
resist most, if not all, attacks.
|
||||||
|
|
||||||
* Supports Linux, FreeBSD, OpenBSD and Solaris.
|
* Unfortunately this protocol is not compatible with earlier versions,
|
||||||
|
nor are earlier versions compatible with this version. Because the
|
||||||
|
older protocol has huge security flaws, we feel that not
|
||||||
|
implementing backwards compatibility is justified.
|
||||||
|
|
||||||
|
* Some data about the protocol:
|
||||||
|
* It uses public/private RSA keys for authentication (this is the
|
||||||
|
actual fix for the security hole).
|
||||||
|
* All cryptographic functions have been taken out of tinc, instead
|
||||||
|
it uses the OpenSSL library functions.
|
||||||
|
* Offers support for multiple subnets per tinc daemon.
|
||||||
|
|
||||||
It looks like this might be the last release before 1.0.
|
* New is also the support for the universal tun/tap device. This
|
||||||
|
means better portability to FreeBSD and Solaris.
|
||||||
|
|
||||||
|
* Tinc is tested to compile on Solaris, Linux x86, Linux alpha.
|
||||||
|
|
||||||
version 1.0pre4 Jan 17 2001
|
* Tinc now uses the OpenSSL library for cryptographic operations.
|
||||||
|
More information on getting and installing OpenSSL is in the manual.
|
||||||
|
This also means that the GMP library is no longer required.
|
||||||
|
|
||||||
* Updated documentation; the documentation now reflects the
|
* Further, thanks to Enrique Zanardi, we have Spanish messages; Matias
|
||||||
configuration as it is.
|
Carrasco provided us with a Spanish translation of the manual.
|
||||||
|
|
||||||
* Some internal changes to make tinc scale better for large
|
Version 1.0pre2 May 31 2000
|
||||||
networks, such as using AVL trees instead of linked lists for the
|
|
||||||
connection list.
|
|
||||||
|
|
||||||
* RSA keys can be stored in separate files if needed. See the
|
* This version has been internationalized; and a Dutch translation has
|
||||||
documentation for more information.
|
been included.
|
||||||
|
|
||||||
* tinc has now been reported to run on Linux PowerPC and FreeBSD x86.
|
* Two configuration variables have been added:
|
||||||
|
* VpnMask - the IP network mask for the entire VPN, not just our
|
||||||
|
subnet (as given by MyVirtualIP). The Redhat and Debian packages
|
||||||
|
use this variable in their system startup scripts, but it is
|
||||||
|
ignored by tinc.
|
||||||
|
* Hostnames - if set to `yes', look up the names of IP addresses
|
||||||
|
trying to connect to us. Default set to `no', to prevent lockups
|
||||||
|
during lookups.
|
||||||
|
|
||||||
|
* The system startup scripts for Debian and Redhat use
|
||||||
|
/etc/tinc/nets.boot to find out which networks need to be started
|
||||||
|
during system boot.
|
||||||
|
|
||||||
|
* Fixes to prevent denial of service attacks by sending random data
|
||||||
|
after connecting (and even when the connection has been established),
|
||||||
|
either random garbage or just nonsensical protocol fields.
|
||||||
|
|
||||||
version 1.0pre3 Oct 31 2000
|
* Tinc will retry to connect upon startup, does not quit if it doesn't
|
||||||
|
work the first time.
|
||||||
|
|
||||||
* The protocol has been redesigned, and although some details are
|
* Hosts that are disconnected implicitly if we lose a connection get
|
||||||
still under discussion, this is secure. Care has been taken to
|
deleted from the internal list, to prevent hogging eachother with
|
||||||
resist most, if not all, attacks.
|
add and delete requests when the connection is restored.
|
||||||
|
|
||||||
* Unfortunately this protocol is not compatible with earlier versions,
|
Version 1.0pre1 May 12 2000
|
||||||
nor are earlier versions compatible with this version. Because the
|
|
||||||
older protocol has huge security flaws, we feel that not
|
|
||||||
implementing backwards compatibility is justified.
|
|
||||||
|
|
||||||
* Some data about the protocol:
|
|
||||||
|
|
||||||
* It uses public/private RSA keys for authentication (this is the
|
|
||||||
actual fix for the security hole).
|
|
||||||
|
|
||||||
* All cryptographic functions have been taken out of tinc, instead
|
|
||||||
it uses the OpenSSL library functions.
|
|
||||||
|
|
||||||
* Offers support for multiple subnets per tinc daemon.
|
|
||||||
|
|
||||||
* New is also the support for the universal tun/tap device. This
|
|
||||||
means better portability to FreeBSD and Solaris.
|
|
||||||
|
|
||||||
* tinc is tested to compile on Solaris, Linux x86, Linux alpha.
|
|
||||||
|
|
||||||
* tinc now uses the OpenSSL library for cryptographic operations.
|
|
||||||
More information on getting and installing OpenSSL is in the manual.
|
|
||||||
This also means that the GMP library is no longer required.
|
|
||||||
|
|
||||||
* Further, thanks to Enrique Zanardi, we have Spanish messages; Matias
|
|
||||||
Carrasco provided us with a Spanish translation of the manual.
|
|
||||||
|
|
||||||
|
|
||||||
What still needs to be done before 1.0:
|
|
||||||
|
|
||||||
* Documentation. Especially since the protocol has changed, and a lot
|
|
||||||
of configuration directives have been added.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
version 1.0pre2 May 31 2000
|
|
||||||
|
|
||||||
* This version has been internationalized; and a Dutch translation has
|
|
||||||
been included.
|
|
||||||
|
|
||||||
* Two configuration variables have been added:
|
|
||||||
* VpnMask - the IP network mask for the entire VPN, not just our
|
|
||||||
subnet (as given by MyVirtualIP). The Redhat and Debian packages
|
|
||||||
use this variable in their system startup scripts, but it is
|
|
||||||
ignored by tinc.
|
|
||||||
* Hostnames - if set to `yes', look up the names of IP addresses
|
|
||||||
trying to connect to us. Default set to `no', to prevent lockups
|
|
||||||
during lookups.
|
|
||||||
|
|
||||||
* The system startup scripts for Debian and Redhat use
|
|
||||||
/etc/tinc/nets.boot to find out which networks need to be started
|
|
||||||
during system boot.
|
|
||||||
|
|
||||||
* Fixes to prevent denial of service attacks by sending random data
|
|
||||||
after connecting (and even when the connection has been established),
|
|
||||||
either random garbage or just nonsensical protocol fields.
|
|
||||||
|
|
||||||
* tinc will retry to connect upon startup, does not quit if it doesn't
|
|
||||||
work the first time.
|
|
||||||
|
|
||||||
* Hosts that are disconnected implicitly if we lose a connection get
|
|
||||||
deleted from the internal list, to prevent hogging eachother with
|
|
||||||
add and delete requests when the connection is restored.
|
|
||||||
|
|
||||||
|
|
||||||
What still needs to be done before 1.0:
|
|
||||||
|
|
||||||
* Documentation.
|
|
||||||
* Failover ConnectTo lines, try another one if the first doesn't work.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
version 1.0pre1 May 12 2000
|
|
||||||
* New meta-protocol
|
* New meta-protocol
|
||||||
|
|
||||||
* Various other bugfixes
|
* Various other bugfixes
|
||||||
|
|
||||||
* Documentation updates
|
* Documentation updates
|
||||||
|
|
||||||
version 0.3.3 Feb 9 2000
|
Version 0.3.3 Feb 9 2000
|
||||||
* Fixed bug that made tinc stop working with latest kernels (Guus
|
|
||||||
Sliepen)
|
* Fixed bug that made tinc stop working with latest kernels
|
||||||
|
|
||||||
* Updated the manual
|
* Updated the manual
|
||||||
|
|
||||||
version 0.3.2 Nov 12 1999
|
Version 0.3.2 Nov 12 1999
|
||||||
* no more `Invalid filedescriptor' when working with multiple
|
|
||||||
connections
|
|
||||||
* forward unknown packets to uplink
|
|
||||||
|
|
||||||
version 0.3.1 Oct 20 1999
|
* No more `Invalid filedescriptor' when working with multiple
|
||||||
* fixed a bug where tinc would exit without a trace
|
connections.
|
||||||
|
|
||||||
version 0.3 Aug 20 1999
|
* Forward unknown packets to uplink.
|
||||||
* pings now work immediately
|
|
||||||
* all packet sizes get transmitted correctly
|
|
||||||
|
|
||||||
version 0.2.26 Aug 15 1999
|
Version 0.3.1 Oct 20 1999
|
||||||
* fixed some remaining bugs
|
|
||||||
* --sysconfdir works with configure
|
|
||||||
* last version before 0.3
|
|
||||||
|
|
||||||
version 0.2.25 Aug 8 1999
|
* Fixed a bug where tinc would exit without a trace.
|
||||||
* improved stability, going towards 0.3 now.
|
|
||||||
|
|
||||||
version 0.2.24 Aug 7 1999
|
Version 0.3 Aug 20 1999
|
||||||
* added key aging, there's a new config variable, KeyExpire.
|
|
||||||
* updated man and info pages
|
|
||||||
|
|
||||||
version 0.2.23 Aug 5 1999
|
* Pings now work immediately.
|
||||||
* all known bugs fixed, this is a candidate for 0.3
|
|
||||||
|
|
||||||
version 0.2.22 Apr 11 1999
|
* All packet sizes get transmitted correctly.
|
||||||
* multiconnection thing is now working nearly perfect :)
|
|
||||||
|
Version 0.2.26 Aug 15 1999
|
||||||
|
|
||||||
|
* Fixed some remaining bugs.
|
||||||
|
|
||||||
|
* --sysconfdir works with configure.
|
||||||
|
|
||||||
|
* Last version before 0.3.
|
||||||
|
|
||||||
|
Version 0.2.25 Aug 8 1999
|
||||||
|
|
||||||
|
* Improved stability, going towards 0.3 now.
|
||||||
|
|
||||||
|
Version 0.2.24 Aug 7 1999
|
||||||
|
|
||||||
|
* Added key aging, there's a new config variable, KeyExpire.
|
||||||
|
|
||||||
|
* Updated man and info pages.
|
||||||
|
|
||||||
|
Version 0.2.23 Aug 5 1999
|
||||||
|
|
||||||
|
* All known bugs fixed, this is a candidate for 0.3.
|
||||||
|
|
||||||
|
Version 0.2.22 Apr 11 1999
|
||||||
|
|
||||||
|
* Multiconnection thing is now working nearly perfect :)
|
||||||
|
|
||||||
|
Version 0.2.21 Apr 10 1999
|
||||||
|
|
||||||
version 0.2.21 Apr 10 1999
|
|
||||||
* You shouldn't notice a thing, but a lot has changed wrt key
|
* You shouldn't notice a thing, but a lot has changed wrt key
|
||||||
management - except that it refuses to talk to versions < 0.2.20
|
management - except that it refuses to talk to versions < 0.2.20
|
||||||
|
|
||||||
version 0.2.20
|
Version 0.2.19 Apr 3 1999
|
||||||
|
|
||||||
version 0.2.19 Apr 3 1999
|
* Don't install a libcipher.so.
|
||||||
* don't install a libcipher.so
|
|
||||||
|
|
||||||
version 0.2.18 Apr 3 1999
|
Version 0.2.18 Apr 3 1999
|
||||||
* blowfish library dynamically loaded upon execution
|
|
||||||
* included Eric Young's IDEA library
|
|
||||||
|
|
||||||
version 0.2.17 Apr 1 1999
|
* Blowfish library dynamically loaded upon execution.
|
||||||
* tincd now re-executes itself in case of a segmentation fault.
|
|
||||||
|
|
||||||
version 0.2.16 Apr 1 1999
|
* Included Eric Young's IDEA library.
|
||||||
* wrote tincd.conf(5) man page, which still needs a lot of work.
|
|
||||||
* config file now accepts and tolerates spaces, and any integer base
|
|
||||||
for integer variables, and better error reporting. See
|
|
||||||
doc/tincd.conf.sample for an example.
|
|
||||||
|
|
||||||
version 0.2.15 Mar 29 1999
|
Version 0.2.17 Apr 1 1999
|
||||||
* fixed bugs
|
|
||||||
|
|
||||||
version 0.2.14 Feb 10 1999
|
* Tincd now re-executes itself in case of a segmentation fault.
|
||||||
* added --timeout flag and PingTimeout configuration
|
|
||||||
* did some first syslog cleanup work
|
|
||||||
|
|
||||||
version 0.2.13 Jan 23 1999
|
Version 0.2.16 Apr 1 1999
|
||||||
* bugfixes
|
|
||||||
|
|
||||||
version 0.2.12 Jan 23 1999
|
* Wrote tincd.conf(5) man page, which still needs a lot of work.
|
||||||
* fixed nauseating bug so that it would crash whenever a connection
|
|
||||||
got lost
|
|
||||||
|
|
||||||
version 0.2.11 Jan 22 1999
|
* Config file now accepts and tolerates spaces, and any integer base
|
||||||
* framework for multiple connections has been done
|
for integer variables, and better error reporting. See
|
||||||
* simple manpage for tincd
|
doc/tincd.conf.sample for an example.
|
||||||
|
|
||||||
version 0.2.10 Jan 18 1999
|
Version 0.2.15 Mar 29 1999
|
||||||
* passphrase support added
|
|
||||||
|
|
||||||
version 0.2.9 Jan 13 1999
|
* Fixed bugs.
|
||||||
* bugs fixed.
|
|
||||||
|
|
||||||
version 0.2.8 Jan 11 1999
|
Version 0.2.14 Feb 10 1999
|
||||||
* a reworked protocol version
|
|
||||||
* a ping/pong system
|
|
||||||
* more reliable networking code
|
|
||||||
* automatic reconnection
|
|
||||||
* still does not work with more than one connection :)
|
|
||||||
* strips MAC addresses before sending, so there's less overhead, and
|
|
||||||
less redundancy
|
|
||||||
|
|
||||||
version 0.2.7 Jan 3 1999
|
* Added --timeout flag and PingTimeout configuration.
|
||||||
* several updates to make extending more easy.
|
* Did some first syslog cleanup work.
|
||||||
|
|
||||||
|
Version 0.2.13 Jan 23 1999
|
||||||
|
|
||||||
|
* Bugfixes.
|
||||||
|
|
||||||
|
Version 0.2.12 Jan 23 1999
|
||||||
|
|
||||||
|
* Fixed nauseating bug so that it would crash whenever a connection
|
||||||
|
got lost.
|
||||||
|
|
||||||
|
Version 0.2.11 Jan 22 1999
|
||||||
|
|
||||||
|
* Framework for multiple connections has been done.
|
||||||
|
|
||||||
|
* Simple manpage for tincd.
|
||||||
|
|
||||||
|
Version 0.2.10 Jan 18 1999
|
||||||
|
|
||||||
|
* Passphrase support added.
|
||||||
|
|
||||||
|
Version 0.2.9 Jan 13 1999
|
||||||
|
|
||||||
|
* Bugs fixed.
|
||||||
|
|
||||||
|
Version 0.2.8 Jan 11 1999
|
||||||
|
|
||||||
|
* A reworked protocol version.
|
||||||
|
|
||||||
|
* A ping/pong system.
|
||||||
|
|
||||||
|
* More reliable networking code.
|
||||||
|
|
||||||
|
* Automatic reconnection.
|
||||||
|
|
||||||
|
* Still does not work with more than one connection :)
|
||||||
|
|
||||||
|
* Strips MAC addresses before sending, so there's less overhead, and
|
||||||
|
less redundancy.
|
||||||
|
|
||||||
|
Version 0.2.7 Jan 3 1999
|
||||||
|
|
||||||
|
* Several updates to make extending more easy.
|
||||||
|
|
||||||
|
Version 0.2.6 Dec 20 1998
|
||||||
|
|
||||||
version 0.2.6 Dec 20 1998
|
|
||||||
* Point-to-Point connections have been established, including
|
* Point-to-Point connections have been established, including
|
||||||
blowfish encryption and a secret key-exchange.
|
Blowfish encryption and a secret key-exchange.
|
||||||
|
|
||||||
|
Version 0.2.5 Dec 16 1998
|
||||||
|
|
||||||
version 0.2.5 Dec 16 1998
|
|
||||||
* Project renamed to tinc, in honour of TINC.
|
* Project renamed to tinc, in honour of TINC.
|
||||||
|
|
||||||
version 0.2.4 Dec 16 1998
|
Version 0.2.4 Dec 16 1998
|
||||||
* now it really does ;)
|
|
||||||
|
|
||||||
version 0.2.3 Nov 24 1998
|
* Now it really does ;)
|
||||||
* it sort of works now
|
|
||||||
|
|
||||||
version 0.2.2 Nov 20 1998
|
Version 0.2.3 Nov 24 1998
|
||||||
* uses GNU gmp.
|
|
||||||
|
|
||||||
version 0.2.1 Nov 14 1998
|
* It sort of works now.
|
||||||
|
|
||||||
|
Version 0.2.2 Nov 20 1998
|
||||||
|
|
||||||
|
* Uses GNU gmp.
|
||||||
|
|
||||||
|
Version 0.2.1 Nov 14 1998
|
||||||
|
|
||||||
* Bare version.
|
* Bare version.
|
||||||
|
|
|
||||||
138
README
138
README
|
|
@ -1,7 +1,7 @@
|
||||||
This is the README file for tinc version 1.0.36. Installation
|
This is the README file for tinc version 1.1pre8. Installation
|
||||||
instructions may be found in the INSTALL file.
|
instructions may be found in the INSTALL file.
|
||||||
|
|
||||||
tinc is Copyright (C) 1998-2019 by:
|
tinc is Copyright (C) 1998-2013 by:
|
||||||
|
|
||||||
Ivo Timmermans,
|
Ivo Timmermans,
|
||||||
Guus Sliepen <guus@tinc-vpn.org>,
|
Guus Sliepen <guus@tinc-vpn.org>,
|
||||||
|
|
@ -15,119 +15,81 @@ the Free Software Foundation; either version 2 of the License, or (at
|
||||||
your option) any later version. See the file COPYING for more details.
|
your option) any later version. See the file COPYING for more details.
|
||||||
|
|
||||||
|
|
||||||
|
This is a pre-release
|
||||||
|
---------------------
|
||||||
|
|
||||||
|
Please note that this is NOT a stable release. Until version 1.1.0 is released,
|
||||||
|
please use one of the 1.0.x versions if you need a stable version of tinc.
|
||||||
|
|
||||||
|
Although tinc 1.1 will be protocol compatible with tinc 1.0.x, the
|
||||||
|
functionality of the tinc program may still change, and the control socket
|
||||||
|
protocol is not fixed yet.
|
||||||
|
|
||||||
|
|
||||||
Security statement
|
Security statement
|
||||||
------------------
|
------------------
|
||||||
|
|
||||||
In August 2000, we discovered the existence of a security hole in all versions
|
This version uses an experimental and unfinished cryptographic protocol. Use it
|
||||||
of tinc up to and including 1.0pre2. This had to do with the way we exchanged
|
at your own risk.
|
||||||
keys. Since then, we have been working on a new authentication scheme to make
|
|
||||||
tinc as secure as possible. The current version uses the OpenSSL library and
|
|
||||||
uses strong authentication with RSA keys.
|
|
||||||
|
|
||||||
On the 29th of December 2001, Jerome Etienne posted a security analysis of tinc
|
|
||||||
1.0pre4. Due to a lack of sequence numbers and a message authentication code
|
|
||||||
for each packet, an attacker could possibly disrupt certain network services or
|
|
||||||
launch a denial of service attack by replaying intercepted packets. The current
|
|
||||||
version adds sequence numbers and message authentication codes to prevent such
|
|
||||||
attacks.
|
|
||||||
|
|
||||||
On September the 15th of 2003, Peter Gutmann contacted us and showed us a
|
|
||||||
writeup describing various security issues in several VPN daemons. He showed
|
|
||||||
that tinc lacks perfect forward security, the connection authentication could
|
|
||||||
be done more properly, that the sequence number we use as an IV is not the best
|
|
||||||
practice and that the default length of the HMAC for packets is too short in
|
|
||||||
his opinion. We do not know of a way to exploit these weaknesses, but these
|
|
||||||
issues are being addressed in the tinc 1.1 branch.
|
|
||||||
|
|
||||||
The Sweet32 attack affects versions of tinc prior to 1.0.30.
|
|
||||||
|
|
||||||
On September 6th, 2018, Michael Yonly contacted us and provided
|
|
||||||
proof-of-concept code that allowed a remote attacker to create an
|
|
||||||
authenticated, one-way connection with a node, and also that there was a
|
|
||||||
possibility for a man-in-the-middle to force UDP packets from a node to be sent
|
|
||||||
in plaintext. The first issue was trivial to exploit on tinc versions prior to
|
|
||||||
1.0.30, but the changes in 1.0.30 to mitigate the Sweet32 attack made this
|
|
||||||
weakness much harder to exploit. These issues have been fixed in tinc 1.0.35.
|
|
||||||
The new protocol in the tinc 1.1 branch is not susceptible to these issues.
|
|
||||||
|
|
||||||
Cryptography is a hard thing to get right. We cannot make any
|
|
||||||
guarantees. Time, review and feedback are the only things that can
|
|
||||||
prove the security of any cryptographic product. If you wish to review
|
|
||||||
tinc or give us feedback, you are strongly encouraged to do so.
|
|
||||||
|
|
||||||
|
|
||||||
Compatibility
|
Compatibility
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
Version 1.0.35 is compatible with 1.0pre8, 1.0 and later, but not with older
|
Version 1.1pre8 is compatible with 1.0pre8, 1.0 and later, but not with older
|
||||||
versions of tinc. Note that since version 1.0.30, tinc requires all nodes in
|
versions of tinc.
|
||||||
the VPN to be compiled with a version of LibreSSL or OpenSSL that supports the
|
|
||||||
AES256 and SHA256 algorithms.
|
When the ExperimentalProtocol option is used, which is the default since
|
||||||
|
1.1pre8, tinc is still compatible with 1.0.X and 1.1pre8 itself, but not with
|
||||||
|
any other 1.1preX version.
|
||||||
|
|
||||||
|
|
||||||
Requirements
|
Requirements
|
||||||
------------
|
------------
|
||||||
|
|
||||||
The OpenSSL library is used for all cryptographic functions. You can find it at
|
In order to compile tinc, you will need a GNU C compiler environment. Please
|
||||||
https://www.openssl.org/. You will need version 1.0.1 or later with support for
|
ensure you have the latest stable versions of all the required libraries:
|
||||||
AES256 and SHA256 enabled. If this library is not installed on your system, the
|
|
||||||
configure script will fail. The manual in doc/tinc.texi contains more detailed
|
|
||||||
information on how to install this library. Alternatively, you may also use the
|
|
||||||
LibreSSL library.
|
|
||||||
|
|
||||||
The zlib library is used for optional compression. You can
|
- OpenSSL (http://www.openssl.org/) version 1.0.0 or later, with support for
|
||||||
find it at https://zlib.net/. Because of a possible exploit in
|
elliptic curve cryptography (ECC) enabeld.
|
||||||
earlier versions we recommend that you download version 1.1.4 or later.
|
|
||||||
|
|
||||||
The LZO library is also used for optional compression. You can
|
The following libraries are used by default, but can be disabled if necessary:
|
||||||
find it at https://www.oberhumer.com/opensource/lzo/.
|
|
||||||
|
|
||||||
In order to compile tinc, you will need a C99 compliant compiler.
|
- zlib (http://www.gzip.org/zlib/)
|
||||||
|
- lzo (http://www.oberhumer.com/opensource/lzo/)
|
||||||
|
- ncurses (http://invisible-island.net/ncurses/)
|
||||||
|
- readline (ftp://ftp.gnu.org/pub/gnu/readline/)
|
||||||
|
|
||||||
|
|
||||||
Features
|
Features
|
||||||
--------
|
--------
|
||||||
|
|
||||||
This version of tinc supports multiple virtual networks at once. To
|
Tinc is a peer-to-peer VPN daemon that supports VPNs with an arbitrary number
|
||||||
use this feature, you may supply a netname via the -n or --net
|
of nodes. Instead of configuring tunnels, you give tinc the location and
|
||||||
options. The standard locations for the config files will then be
|
public key of a few nodes in the VPN. After making the initial connections to
|
||||||
/etc/tinc/<net>/.
|
those nodes, tinc will learn about all other nodes on the VPN, and will make
|
||||||
|
connections automatically. When direct connections are not possible, data will
|
||||||
|
be forwarded by intermediate nodes.
|
||||||
|
|
||||||
tincd regenerates its encryption key pairs. It does this on the first
|
By default, nodes authenticate each other using 2048 bit RSA (or 521 bit
|
||||||
activity after the keys have expired. This period is adjustable in the
|
ECDSA*) keys. Traffic is encrypted using Blowfish in CBC mode (or AES-256 in
|
||||||
configuration file, and the default time is 3600 seconds (one hour).
|
CTR mode*), authenticated using HMAC-SHA1 (or HMAC-SHA-256*), and is protected
|
||||||
|
against replay attacks.
|
||||||
|
|
||||||
This version supports multiple subnets at once. They are also sorted
|
*) When using the ExperimentalProtocol option.
|
||||||
on subnet mask size. This means that it is possible to have
|
|
||||||
overlapping subnets on the VPN, as long as their subnet mask sizes
|
|
||||||
differ.
|
|
||||||
|
|
||||||
Since pre5, tinc can operate in several routing modes. The default mode,
|
Tinc fully supports IPv6.
|
||||||
"router", works exactly like the older version, and uses Subnet lines to
|
|
||||||
determine the destination of packets. The other two modes, "switch" and "hub",
|
|
||||||
allow the tinc daemons to work together like a single network switch or hub.
|
|
||||||
This is useful for bridging networks. The latter modes only work properly on
|
|
||||||
Linux, FreeBSD and Windows.
|
|
||||||
|
|
||||||
The algorithms used for encryption and generating message authentication codes
|
Tinc can operate in several routing modes. In the default mode, "router", every
|
||||||
can now be changed in the configuration files. All cipher and digest algorithms
|
node is associated with one or more IPv4 and/or IPv6 Subnets. The other two
|
||||||
supported by OpenSSL can be used. Useful ciphers are "blowfish" (default),
|
modes, "switch" and "hub", let the tinc daemons work together to form a virtual
|
||||||
"bf-ofb", "des", "des3", et cetera. Useful digests are "sha1" (default), "md5",
|
Ethernet network switch or hub.
|
||||||
et cetera.
|
|
||||||
|
|
||||||
Support for routing IPv6 packets has been added. Just add Subnet lines with
|
|
||||||
IPv6 addresses (without using :: abbreviations) and use ifconfig or ip (from
|
|
||||||
the iproute package) to give the virtual network interface corresponding IPv6
|
|
||||||
addresses. tinc does not provide autoconfiguration for IPv6 hosts. Consider
|
|
||||||
using radvd or zebra if you need it.
|
|
||||||
|
|
||||||
It is also possible to make tunnels to other tinc daemons over IPv6 networks,
|
|
||||||
if the operating system supports IPv6. tinc will automatically use both IPv6
|
|
||||||
and IPv4 when available, but this can be changed by adding the option
|
|
||||||
"AddressFamily = ipv4" or "AddressFamily = ipv6" to the tinc.conf file.
|
|
||||||
|
|
||||||
Normally, when started tinc will detach and run in the background. In a native
|
Normally, when started tinc will detach and run in the background. In a native
|
||||||
Windows environment this means tinc will install itself as a service, which will
|
Windows environment this means tinc will intall itself as a service, which will
|
||||||
restart after reboots. To prevent tinc from detaching or running as a service,
|
restart after reboots. To prevent tinc from detaching or running as a service,
|
||||||
use the -D option.
|
use the -D option.
|
||||||
|
|
||||||
|
The status of the VPN can be queried using the "tinc" command, which connects
|
||||||
|
to a running tinc daemon via a control connection. The same tool also makes it
|
||||||
|
easy to start and stop tinc, and to change its configuration.
|
||||||
|
|
|
||||||
|
|
@ -1,25 +1,20 @@
|
||||||
Quick how-to cross compile tinc for android (done from $HOME/android/):
|
Quick how-o cross compile tinc for android (done from $HOME/android/):
|
||||||
|
|
||||||
- Download android NDK and setup local ARM toolchain:
|
- Download android NDK and setup local ARM toolchain:
|
||||||
wget http://dl.google.com/android/ndk/android-ndk-r9d-linux-x86.tar.bz2
|
wget http://dl.google.com/android/ndk/android-ndk-r8b-linux-x86.tar.bz2
|
||||||
tar xfj android-ndk-r9d-linux-x86.tar.bz2
|
tar xfj android-ndk-r8b-linux-x86.tar.bz2
|
||||||
./android-ndk-r9d/build/tools/make-standalone-toolchain.sh --platform=android-5 --install-dir=/tmp/my-android-toolchain
|
./android-ndk-r8b/build/tools/make-standalone-toolchain.sh --platform=android-5 --install-dir=/tmp/my-android-toolchain
|
||||||
|
|
||||||
- Download and cross-compile openSSL for ARM:
|
- Download and cross-compile openSSL for ARM:
|
||||||
wget http://www.openssl.org/source/openssl-1.0.1h.tar.gz
|
wget http://www.openssl.org/source/openssl-1.0.1c.tar.gz
|
||||||
tar xfz openssl-1.0.1h.tar.gz
|
tar xfz openssl-1.0.1c.tar.gz
|
||||||
cd openssl-1.0.1h
|
cd openssl-1.0.1c
|
||||||
./Configure dist
|
./Configure dist
|
||||||
make CC=/tmp/my-android-toolchain/bin/arm-linux-androideabi-gcc AR="/tmp/my-android-toolchain/bin/arm-linux-androideabi-ar r" RANLIB=/tmp/my-android-toolchain/bin/arm-linux-androideabi-ranlib
|
make CC=/tmp/my-android-toolchain/bin/arm-linux-androideabi-gcc AR="/tmp/my-android-toolchain/bin/arm-linux-androideabi-ar r" RANLIB=/tmp/my-android-toolchain/bin/arm-linux-androideabi-ranlib
|
||||||
cd -
|
|
||||||
|
|
||||||
- Clone and cross-compile tinc:
|
- Clone and cross-compile tinc:
|
||||||
git clone git://tinc-vpn.org/tinc
|
git clone git://tinc-vpn.org/tinc
|
||||||
cd tinc
|
cd tinc
|
||||||
autoreconf -fsi
|
autoreconf -fsi
|
||||||
CC=/tmp/my-android-toolchain/bin/arm-linux-androideabi-gcc ./configure --host=arm-linux --disable-lzo --with-openssl-lib=$HOME/android/openssl-1.0.1g --with-openssl-include=$HOME/android/openssl-1.0.1g/include/ --disable-hardening
|
CC=/tmp/my-android-toolchain/bin/arm-linux-androideabi-gcc ./configure --host=arm-linux --disable-lzo --with-openssl-lib=$HOME/android/openssl-1.0.1c --with-openssl-include=$HOME/android/openssl-1.0.1c/include/
|
||||||
make -j5
|
make -j5
|
||||||
|
|
||||||
- Strip tincd binary to make it smaller
|
|
||||||
/tmp/my-android-toolchain/bin/arm-linux-androideabi-strip src/tincd
|
|
||||||
|
|
||||||
|
|
|
||||||
72
THANKS
72
THANKS
|
|
@ -1,126 +1,60 @@
|
||||||
We would like to thank the following people for their contributions to tinc:
|
We would like to thank the following people for their contributions to tinc:
|
||||||
|
|
||||||
* Alexander Reil and Gemeinde Berg
|
* Alexander Reil and Gemeinde Berg
|
||||||
* Alexander Ried
|
|
||||||
* Alexis Hildebrandt
|
|
||||||
* Allesandro Gatti
|
* Allesandro Gatti
|
||||||
* Andreas van Cranenburgh
|
* Andreas van Cranenburgh
|
||||||
* Andrew Hahn
|
|
||||||
* Anthony G. Basile
|
* Anthony G. Basile
|
||||||
* Armijn Hemel
|
* Armijn Hemel
|
||||||
* Armin Fisslthaler
|
|
||||||
* Aron Cowan
|
|
||||||
* Ashish Bajaj
|
|
||||||
* Baptiste Jonglez
|
|
||||||
* Borg
|
|
||||||
* Brandon Black
|
* Brandon Black
|
||||||
* Cheng LI
|
* Cheng LI
|
||||||
* Cris van Pelt
|
* Cris van Pelt
|
||||||
* Darius Jahandarie
|
* Darius Jahandarie
|
||||||
* Dato Simó
|
|
||||||
* David Pflug
|
|
||||||
* Delf Eldkraft
|
* Delf Eldkraft
|
||||||
* Dennis Joachimsthaler
|
|
||||||
* dnk
|
* dnk
|
||||||
* Егор Палкин
|
|
||||||
* Élie Bouttier
|
|
||||||
* Enrique Zanardi
|
* Enrique Zanardi
|
||||||
* Erik Tews
|
* Erik Tews
|
||||||
* Etienne Dechamps
|
* Etienne Dechamps
|
||||||
* Florent Clairambault
|
|
||||||
* Florian Forster
|
|
||||||
* Florian Klink
|
|
||||||
* Florian Weik
|
|
||||||
* Flynn Marquardt
|
* Flynn Marquardt
|
||||||
* Franz Pletz
|
|
||||||
* Gary Kessler and Claudia Gonzalez
|
|
||||||
* Grzegorz Dymarek
|
* Grzegorz Dymarek
|
||||||
* Gusariev Oleksandr
|
|
||||||
* Hans Bayle
|
* Hans Bayle
|
||||||
* Harvest
|
|
||||||
* Ivo van Dong
|
* Ivo van Dong
|
||||||
* Ivo Smits
|
|
||||||
* James Cook
|
|
||||||
* James MacLean
|
* James MacLean
|
||||||
* Jamie Briggs
|
* Jamie Briggs
|
||||||
* Jan Štembera
|
|
||||||
* Jason Harper
|
* Jason Harper
|
||||||
* Jason Livesay
|
|
||||||
* Jasper Krijgsman
|
|
||||||
* Jelle de Jong
|
|
||||||
* Jeroen Domburg
|
|
||||||
* Jeroen Ubbink
|
* Jeroen Ubbink
|
||||||
* Jerome Etienne
|
* Jerome Etienne
|
||||||
* Jo-Philipp Wich
|
|
||||||
* Jochen Voss
|
|
||||||
* Julien Muchembled
|
* Julien Muchembled
|
||||||
* Lavrans Laading
|
|
||||||
* Loïc Dachary
|
|
||||||
* Loïc Grenié
|
* Loïc Grenié
|
||||||
* Lubomír Bulej
|
* Lubomír Bulej
|
||||||
* luckyhacky
|
|
||||||
* LunarShaddow
|
|
||||||
* Mads Kiilerich
|
* Mads Kiilerich
|
||||||
* Marc A. Lehmann
|
* Marc A. Lehmann
|
||||||
* Mark Glines
|
* Mark Glines
|
||||||
* Mark Petryk
|
|
||||||
* Markus Goetz
|
* Markus Goetz
|
||||||
* Martin Kihlgren
|
* Martin Kihlgren
|
||||||
* Martin Schobert
|
* Martin Schobert
|
||||||
* Martin Schürrer
|
* Martin Schürrer
|
||||||
* Martin Weinelt
|
|
||||||
* Matias Carrasco
|
* Matias Carrasco
|
||||||
* Max Rijevski
|
* Max Rijevski
|
||||||
* Menno Smits
|
* Menno Smits
|
||||||
* Mesar Hameed
|
* Mesar Hameed
|
||||||
* Michael Taylor
|
|
||||||
* Michael Tokarev
|
* Michael Tokarev
|
||||||
* Michael Yonli
|
|
||||||
* Miles Nordin
|
* Miles Nordin
|
||||||
* Nathan Stratton Treadway
|
|
||||||
* Murat Donmez
|
|
||||||
* Nick Hibma
|
* Nick Hibma
|
||||||
* Nick Patavalis
|
* Nick Patavalis
|
||||||
* Paul Littlefield
|
* Paul Littlefield
|
||||||
* Philipp Babel
|
* Philipp Babel
|
||||||
* Pierre Emeriaud
|
|
||||||
* Pierre-Olivier Mercier
|
|
||||||
* Rafael Wolf
|
|
||||||
* Rafael Sadowski
|
|
||||||
* Rafał Leśniak
|
|
||||||
* Rhosyn Celyn
|
|
||||||
* Robert van der Meulen
|
* Robert van der Meulen
|
||||||
* Robert Waniek
|
|
||||||
* Rumko
|
* Rumko
|
||||||
* Ryan Miller
|
|
||||||
* Sam Bryan
|
|
||||||
* Samuel Thibault
|
|
||||||
* Saverio Proto
|
|
||||||
* Scott Lamb
|
* Scott Lamb
|
||||||
* Steffan Karger
|
|
||||||
* Stig Fagrell
|
|
||||||
* Sven-Haegar Koch
|
* Sven-Haegar Koch
|
||||||
* Teemu Kiviniemi
|
* Teemu Kiviniemi
|
||||||
* Thomas Tsiakalakis
|
|
||||||
* Timothy Redaelli
|
* Timothy Redaelli
|
||||||
* Tomasz Fortuna
|
|
||||||
* Tomislav Čohar
|
|
||||||
* Tommy Arnkværn
|
|
||||||
* Tonnerre Lombard
|
* Tonnerre Lombard
|
||||||
* Ulrich Seifert
|
|
||||||
* Vil Brekin
|
* Vil Brekin
|
||||||
* Vincent Laurent
|
|
||||||
* Vittorio Gambaletta
|
|
||||||
* Wendy Willard
|
|
||||||
* Wessel Dankers
|
* Wessel Dankers
|
||||||
* William A. Kennington III
|
|
||||||
* William McArthur
|
|
||||||
* Wouter van Heyst
|
* Wouter van Heyst
|
||||||
* xentec
|
|
||||||
* 戴 鸣
|
|
||||||
|
|
||||||
And everyone we forgot (if we did, please let us know). Thank you!
|
And everyone we forgot. Thank you!
|
||||||
|
|
||||||
---
|
Ivo Timmermans
|
||||||
Ivo Timmermans,
|
Guus Sliepen
|
||||||
Guus Sliepen.
|
|
||||||
|
|
|
||||||
477
aclocal.m4
vendored
477
aclocal.m4
vendored
|
|
@ -1,6 +1,6 @@
|
||||||
# generated automatically by aclocal 1.16.2 -*- Autoconf -*-
|
# generated automatically by aclocal 1.13.3 -*- Autoconf -*-
|
||||||
|
|
||||||
# Copyright (C) 1996-2020 Free Software Foundation, Inc.
|
# Copyright (C) 1996-2013 Free Software Foundation, Inc.
|
||||||
|
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
|
@ -20,7 +20,131 @@ 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.
|
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'.])])
|
To do so, use the procedure documented by the package, typically 'autoreconf'.])])
|
||||||
|
|
||||||
# Copyright (C) 2002-2020 Free Software Foundation, Inc.
|
dnl Autoconf macros for libgcrypt
|
||||||
|
dnl Copyright (C) 2002, 2004 Free Software Foundation, Inc.
|
||||||
|
dnl
|
||||||
|
dnl This file is free software; as a special exception the author gives
|
||||||
|
dnl unlimited permission to copy and/or distribute it, with or without
|
||||||
|
dnl modifications, as long as this notice is preserved.
|
||||||
|
dnl
|
||||||
|
dnl This file is distributed in the hope that it will be useful, but
|
||||||
|
dnl WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
|
||||||
|
dnl implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
|
||||||
|
dnl AM_PATH_LIBGCRYPT([MINIMUM-VERSION,
|
||||||
|
dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]])
|
||||||
|
dnl Test for libgcrypt and define LIBGCRYPT_CFLAGS and LIBGCRYPT_LIBS.
|
||||||
|
dnl MINIMUN-VERSION is a string with the version number optionalliy prefixed
|
||||||
|
dnl with the API version to also check the API compatibility. Example:
|
||||||
|
dnl a MINIMUN-VERSION of 1:1.2.5 won't pass the test unless the installed
|
||||||
|
dnl version of libgcrypt is at least 1.2.5 *and* the API number is 1. Using
|
||||||
|
dnl this features allows to prevent build against newer versions of libgcrypt
|
||||||
|
dnl with a changed API.
|
||||||
|
dnl
|
||||||
|
AC_DEFUN([AM_PATH_LIBGCRYPT],
|
||||||
|
[ AC_ARG_WITH(libgcrypt-prefix,
|
||||||
|
AC_HELP_STRING([--with-libgcrypt-prefix=PFX],
|
||||||
|
[prefix where LIBGCRYPT is installed (optional)]),
|
||||||
|
libgcrypt_config_prefix="$withval", libgcrypt_config_prefix="")
|
||||||
|
if test x$libgcrypt_config_prefix != x ; then
|
||||||
|
if test x${LIBGCRYPT_CONFIG+set} != xset ; then
|
||||||
|
LIBGCRYPT_CONFIG=$libgcrypt_config_prefix/bin/libgcrypt-config
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
AC_PATH_TOOL(LIBGCRYPT_CONFIG, libgcrypt-config, no)
|
||||||
|
tmp=ifelse([$1], ,1:1.2.0,$1)
|
||||||
|
if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then
|
||||||
|
req_libgcrypt_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'`
|
||||||
|
min_libgcrypt_version=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\2/'`
|
||||||
|
else
|
||||||
|
req_libgcrypt_api=0
|
||||||
|
min_libgcrypt_version="$tmp"
|
||||||
|
fi
|
||||||
|
|
||||||
|
AC_MSG_CHECKING(for LIBGCRYPT - version >= $min_libgcrypt_version)
|
||||||
|
ok=no
|
||||||
|
if test "$LIBGCRYPT_CONFIG" != "no" ; then
|
||||||
|
req_major=`echo $min_libgcrypt_version | \
|
||||||
|
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
|
||||||
|
req_minor=`echo $min_libgcrypt_version | \
|
||||||
|
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'`
|
||||||
|
req_micro=`echo $min_libgcrypt_version | \
|
||||||
|
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'`
|
||||||
|
libgcrypt_config_version=`$LIBGCRYPT_CONFIG --version`
|
||||||
|
major=`echo $libgcrypt_config_version | \
|
||||||
|
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
|
||||||
|
minor=`echo $libgcrypt_config_version | \
|
||||||
|
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'`
|
||||||
|
micro=`echo $libgcrypt_config_version | \
|
||||||
|
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\3/'`
|
||||||
|
if test "$major" -gt "$req_major"; then
|
||||||
|
ok=yes
|
||||||
|
else
|
||||||
|
if test "$major" -eq "$req_major"; then
|
||||||
|
if test "$minor" -gt "$req_minor"; then
|
||||||
|
ok=yes
|
||||||
|
else
|
||||||
|
if test "$minor" -eq "$req_minor"; then
|
||||||
|
if test "$micro" -ge "$req_micro"; then
|
||||||
|
ok=yes
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if test $ok = yes; then
|
||||||
|
AC_MSG_RESULT([yes ($libgcrypt_config_version)])
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
fi
|
||||||
|
if test $ok = yes; then
|
||||||
|
# If we have a recent libgcrypt, we should also check that the
|
||||||
|
# API is compatible
|
||||||
|
if test "$req_libgcrypt_api" -gt 0 ; then
|
||||||
|
tmp=`$LIBGCRYPT_CONFIG --api-version 2>/dev/null || echo 0`
|
||||||
|
if test "$tmp" -gt 0 ; then
|
||||||
|
AC_MSG_CHECKING([LIBGCRYPT API version])
|
||||||
|
if test "$req_libgcrypt_api" -eq "$tmp" ; then
|
||||||
|
AC_MSG_RESULT([okay])
|
||||||
|
else
|
||||||
|
ok=no
|
||||||
|
AC_MSG_RESULT([does not match. want=$req_libgcrypt_api got=$tmp])
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if test $ok = yes; then
|
||||||
|
LIBGCRYPT_CFLAGS=`$LIBGCRYPT_CONFIG --cflags`
|
||||||
|
LIBGCRYPT_LIBS=`$LIBGCRYPT_CONFIG --libs`
|
||||||
|
ifelse([$2], , :, [$2])
|
||||||
|
if test x"$host" != x ; then
|
||||||
|
libgcrypt_config_host=`$LIBGCRYPT_CONFIG --host 2>/dev/null || echo none`
|
||||||
|
if test x"$libgcrypt_config_host" != xnone ; then
|
||||||
|
if test x"$libgcrypt_config_host" != x"$host" ; then
|
||||||
|
AC_MSG_WARN([[
|
||||||
|
***
|
||||||
|
*** The config script $LIBGCRYPT_CONFIG was
|
||||||
|
*** built for $libgcrypt_config_host and thus may not match the
|
||||||
|
*** used host $host.
|
||||||
|
*** You may want to use the configure option --with-libgcrypt-prefix
|
||||||
|
*** to specify a matching config script.
|
||||||
|
***]])
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
LIBGCRYPT_CFLAGS=""
|
||||||
|
LIBGCRYPT_LIBS=""
|
||||||
|
ifelse([$3], , :, [$3])
|
||||||
|
fi
|
||||||
|
AC_SUBST(LIBGCRYPT_CFLAGS)
|
||||||
|
AC_SUBST(LIBGCRYPT_LIBS)
|
||||||
|
])
|
||||||
|
|
||||||
|
# Copyright (C) 2002-2013 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
|
@ -32,10 +156,10 @@ To do so, use the procedure documented by the package, typically 'autoreconf'.])
|
||||||
# generated from the m4 files accompanying Automake X.Y.
|
# generated from the m4 files accompanying Automake X.Y.
|
||||||
# (This private macro should not be called outside this file.)
|
# (This private macro should not be called outside this file.)
|
||||||
AC_DEFUN([AM_AUTOMAKE_VERSION],
|
AC_DEFUN([AM_AUTOMAKE_VERSION],
|
||||||
[am__api_version='1.16'
|
[am__api_version='1.13'
|
||||||
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
|
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.
|
dnl require some minimum version. Point them to the right macro.
|
||||||
m4_if([$1], [1.16.2], [],
|
m4_if([$1], [1.13.3], [],
|
||||||
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
|
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
@ -51,14 +175,14 @@ m4_define([_AM_AUTOCONF_VERSION], [])
|
||||||
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
|
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
|
||||||
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
|
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
|
||||||
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
|
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
|
||||||
[AM_AUTOMAKE_VERSION([1.16.2])dnl
|
[AM_AUTOMAKE_VERSION([1.13.3])dnl
|
||||||
m4_ifndef([AC_AUTOCONF_VERSION],
|
m4_ifndef([AC_AUTOCONF_VERSION],
|
||||||
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
|
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
|
||||||
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
|
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
|
||||||
|
|
||||||
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
|
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
|
||||||
|
|
||||||
# Copyright (C) 2001-2020 Free Software Foundation, Inc.
|
# Copyright (C) 2001-2013 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
|
@ -103,14 +227,15 @@ _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
|
||||||
# configured tree to be moved without reconfiguration.
|
# configured tree to be moved without reconfiguration.
|
||||||
|
|
||||||
AC_DEFUN([AM_AUX_DIR_EXPAND],
|
AC_DEFUN([AM_AUX_DIR_EXPAND],
|
||||||
[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
|
[dnl Rely on autoconf to set up CDPATH properly.
|
||||||
# Expand $ac_aux_dir to an absolute path.
|
AC_PREREQ([2.50])dnl
|
||||||
am_aux_dir=`cd "$ac_aux_dir" && pwd`
|
# expand $ac_aux_dir to an absolute path
|
||||||
|
am_aux_dir=`cd $ac_aux_dir && pwd`
|
||||||
])
|
])
|
||||||
|
|
||||||
# AM_CONDITIONAL -*- Autoconf -*-
|
# AM_CONDITIONAL -*- Autoconf -*-
|
||||||
|
|
||||||
# Copyright (C) 1997-2020 Free Software Foundation, Inc.
|
# Copyright (C) 1997-2013 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
|
@ -141,7 +266,7 @@ AC_CONFIG_COMMANDS_PRE(
|
||||||
Usually this means the macro was only invoked conditionally.]])
|
Usually this means the macro was only invoked conditionally.]])
|
||||||
fi])])
|
fi])])
|
||||||
|
|
||||||
# Copyright (C) 1999-2020 Free Software Foundation, Inc.
|
# Copyright (C) 1999-2013 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
|
@ -332,12 +457,13 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl
|
||||||
|
|
||||||
# Generate code to set up dependency tracking. -*- Autoconf -*-
|
# Generate code to set up dependency tracking. -*- Autoconf -*-
|
||||||
|
|
||||||
# Copyright (C) 1999-2020 Free Software Foundation, Inc.
|
# Copyright (C) 1999-2013 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
# with or without modifications, as long as this notice is preserved.
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
|
|
||||||
# _AM_OUTPUT_DEPENDENCY_COMMANDS
|
# _AM_OUTPUT_DEPENDENCY_COMMANDS
|
||||||
# ------------------------------
|
# ------------------------------
|
||||||
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
|
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
|
||||||
|
|
@ -345,43 +471,49 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
|
||||||
# Older Autoconf quotes --file arguments for eval, but not when files
|
# Older Autoconf quotes --file arguments for eval, but not when files
|
||||||
# are listed without --file. Let's play safe and only enable the eval
|
# are listed without --file. Let's play safe and only enable the eval
|
||||||
# if we detect the quoting.
|
# if we detect the quoting.
|
||||||
# TODO: see whether this extra hack can be removed once we start
|
case $CONFIG_FILES in
|
||||||
# requiring Autoconf 2.70 or later.
|
*\'*) eval set x "$CONFIG_FILES" ;;
|
||||||
AS_CASE([$CONFIG_FILES],
|
*) set x $CONFIG_FILES ;;
|
||||||
[*\'*], [eval set x "$CONFIG_FILES"],
|
esac
|
||||||
[*], [set x $CONFIG_FILES])
|
|
||||||
shift
|
shift
|
||||||
# Used to flag and report bootstrapping failures.
|
for mf
|
||||||
am_rc=0
|
|
||||||
for am_mf
|
|
||||||
do
|
do
|
||||||
# Strip MF so we end up with the name of the file.
|
# Strip MF so we end up with the name of the file.
|
||||||
am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'`
|
mf=`echo "$mf" | sed -e 's/:.*$//'`
|
||||||
# Check whether this is an Automake generated Makefile which includes
|
# Check whether this is an Automake generated Makefile or not.
|
||||||
# dependency-tracking related rules and includes.
|
# We used to match only the files named 'Makefile.in', but
|
||||||
# Grep'ing the whole file directly is not great: AIX grep has a line
|
# some people rename them; so instead we look at the file content.
|
||||||
|
# Grep'ing the first line is not enough: some people post-process
|
||||||
|
# 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.
|
# limit of 2048, but all sed's we know have understand at least 4000.
|
||||||
sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
|
if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
|
||||||
|| continue
|
dirpart=`AS_DIRNAME("$mf")`
|
||||||
am_dirpart=`AS_DIRNAME(["$am_mf"])`
|
else
|
||||||
am_filepart=`AS_BASENAME(["$am_mf"])`
|
continue
|
||||||
AM_RUN_LOG([cd "$am_dirpart" \
|
fi
|
||||||
&& sed -e '/# am--include-marker/d' "$am_filepart" \
|
# Extract the definition of DEPDIR, am__include, and am__quote
|
||||||
| $MAKE -f - am--depfiles]) || am_rc=$?
|
# from the Makefile without running 'make'.
|
||||||
|
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
|
||||||
|
test -z "$DEPDIR" && continue
|
||||||
|
am__include=`sed -n 's/^am__include = //p' < "$mf"`
|
||||||
|
test -z "$am__include" && continue
|
||||||
|
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
|
||||||
|
# Find all dependency output files, they are included files with
|
||||||
|
# $(DEPDIR) in their names. We invoke sed twice because it is the
|
||||||
|
# simplest approach to changing $(DEPDIR) to its actual value in the
|
||||||
|
# expansion.
|
||||||
|
for file in `sed -n "
|
||||||
|
s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
|
||||||
|
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
|
||||||
|
# Make sure the directory exists.
|
||||||
|
test -f "$dirpart/$file" && continue
|
||||||
|
fdir=`AS_DIRNAME(["$file"])`
|
||||||
|
AS_MKDIR_P([$dirpart/$fdir])
|
||||||
|
# echo "creating $dirpart/$file"
|
||||||
|
echo '# dummy' > "$dirpart/$file"
|
||||||
|
done
|
||||||
done
|
done
|
||||||
if test $am_rc -ne 0; then
|
|
||||||
AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments
|
|
||||||
for automatic dependency tracking. If GNU make was not used, consider
|
|
||||||
re-running the configure script with MAKE="gmake" (or whatever is
|
|
||||||
necessary). You can also try re-running configure with the
|
|
||||||
'--disable-dependency-tracking' option to at least be able to build
|
|
||||||
the package (albeit without support for automatic dependency tracking).])
|
|
||||||
fi
|
|
||||||
AS_UNSET([am_dirpart])
|
|
||||||
AS_UNSET([am_filepart])
|
|
||||||
AS_UNSET([am_mf])
|
|
||||||
AS_UNSET([am_rc])
|
|
||||||
rm -f conftest-deps.mk
|
|
||||||
}
|
}
|
||||||
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
|
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
|
||||||
|
|
||||||
|
|
@ -390,17 +522,18 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
|
||||||
# -----------------------------
|
# -----------------------------
|
||||||
# This macro should only be invoked once -- use via AC_REQUIRE.
|
# This macro should only be invoked once -- use via AC_REQUIRE.
|
||||||
#
|
#
|
||||||
# This code is only required when automatic dependency tracking is enabled.
|
# This code is only required when automatic dependency tracking
|
||||||
# This creates each '.Po' and '.Plo' makefile fragment that we'll need in
|
# is enabled. FIXME. This creates each '.P' file that we will
|
||||||
# order to bootstrap the dependency handling code.
|
# need in order to bootstrap the dependency handling code.
|
||||||
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
|
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
|
||||||
[AC_CONFIG_COMMANDS([depfiles],
|
[AC_CONFIG_COMMANDS([depfiles],
|
||||||
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
|
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
|
||||||
[AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])])
|
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
|
||||||
|
])
|
||||||
|
|
||||||
# Do all the work for Automake. -*- Autoconf -*-
|
# Do all the work for Automake. -*- Autoconf -*-
|
||||||
|
|
||||||
# Copyright (C) 1996-2020 Free Software Foundation, Inc.
|
# Copyright (C) 1996-2013 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
|
@ -409,12 +542,6 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
|
||||||
# This macro actually does too much. Some checks are only needed if
|
# 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.
|
# your package does certain things. But this isn't really a big deal.
|
||||||
|
|
||||||
dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
|
|
||||||
m4_define([AC_PROG_CC],
|
|
||||||
m4_defn([AC_PROG_CC])
|
|
||||||
[_AM_PROG_CC_C_O
|
|
||||||
])
|
|
||||||
|
|
||||||
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
|
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
|
||||||
# AM_INIT_AUTOMAKE([OPTIONS])
|
# AM_INIT_AUTOMAKE([OPTIONS])
|
||||||
# -----------------------------------------------
|
# -----------------------------------------------
|
||||||
|
|
@ -487,11 +614,11 @@ AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
|
||||||
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
|
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
|
||||||
# For better backward compatibility. To be removed once Automake 1.9.x
|
# For better backward compatibility. To be removed once Automake 1.9.x
|
||||||
# dies out for good. For more background, see:
|
# dies out for good. For more background, see:
|
||||||
# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
|
# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
|
||||||
# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
|
# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
|
||||||
AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
|
AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
|
||||||
# We need awk for the "check" target (and possibly the TAP driver). The
|
# We need awk for the "check" target. The system "awk" is bad on
|
||||||
# system "awk" is bad on some platforms.
|
# some platforms.
|
||||||
AC_REQUIRE([AC_PROG_AWK])dnl
|
AC_REQUIRE([AC_PROG_AWK])dnl
|
||||||
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
|
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
|
||||||
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
|
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
|
||||||
|
|
@ -523,51 +650,6 @@ dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
|
||||||
AC_CONFIG_COMMANDS_PRE(dnl
|
AC_CONFIG_COMMANDS_PRE(dnl
|
||||||
[m4_provide_if([_AM_COMPILER_EXEEXT],
|
[m4_provide_if([_AM_COMPILER_EXEEXT],
|
||||||
[AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
|
[AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
|
||||||
|
|
||||||
# POSIX will say in a future version that running "rm -f" with no argument
|
|
||||||
# is OK; and we want to be able to make that assumption in our Makefile
|
|
||||||
# recipes. So use an aggressive probe to check that the usage we want is
|
|
||||||
# actually supported "in the wild" to an acceptable degree.
|
|
||||||
# See automake bug#10828.
|
|
||||||
# To make any issue more visible, cause the running configure to be aborted
|
|
||||||
# by default if the 'rm' program in use doesn't match our expectations; the
|
|
||||||
# user can still override this though.
|
|
||||||
if rm -f && rm -fr && rm -rf; then : OK; else
|
|
||||||
cat >&2 <<'END'
|
|
||||||
Oops!
|
|
||||||
|
|
||||||
Your 'rm' program seems unable to run without file operands specified
|
|
||||||
on the command line, even when the '-f' option is present. This is contrary
|
|
||||||
to the behaviour of most rm programs out there, and not conforming with
|
|
||||||
the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
|
|
||||||
|
|
||||||
Please tell bug-automake@gnu.org about your system, including the value
|
|
||||||
of your $PATH and any error possibly output before this message. This
|
|
||||||
can help us improve future automake versions.
|
|
||||||
|
|
||||||
END
|
|
||||||
if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
|
|
||||||
echo 'Configuration will proceed anyway, since you have set the' >&2
|
|
||||||
echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
|
|
||||||
echo >&2
|
|
||||||
else
|
|
||||||
cat >&2 <<'END'
|
|
||||||
Aborting the configuration process, to ensure you take notice of the issue.
|
|
||||||
|
|
||||||
You can download and install GNU coreutils to get an 'rm' implementation
|
|
||||||
that behaves properly: <https://www.gnu.org/software/coreutils/>.
|
|
||||||
|
|
||||||
If you want to complete the configuration process using your problematic
|
|
||||||
'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
|
|
||||||
to "yes", and re-run configure.
|
|
||||||
|
|
||||||
END
|
|
||||||
AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
dnl The trailing newline in this macro's definition is deliberate, for
|
|
||||||
dnl backward compatibility and to allow trailing 'dnl'-style comments
|
|
||||||
dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
|
|
||||||
])
|
])
|
||||||
|
|
||||||
dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
|
dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
|
||||||
|
|
@ -576,6 +658,7 @@ dnl mangled by Autoconf and run in a shell conditional statement.
|
||||||
m4_define([_AC_COMPILER_EXEEXT],
|
m4_define([_AC_COMPILER_EXEEXT],
|
||||||
m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
|
m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
|
||||||
|
|
||||||
|
|
||||||
# When config.status generates a header, we must update the stamp-h file.
|
# When config.status generates a header, we must update the stamp-h file.
|
||||||
# This file resides in the same directory as the config header
|
# This file resides in the same directory as the config header
|
||||||
# that is generated. The stamp files are numbered to have different names.
|
# that is generated. The stamp files are numbered to have different names.
|
||||||
|
|
@ -597,7 +680,7 @@ for _am_header in $config_headers :; do
|
||||||
done
|
done
|
||||||
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
|
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
|
||||||
|
|
||||||
# Copyright (C) 2001-2020 Free Software Foundation, Inc.
|
# Copyright (C) 2001-2013 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
|
@ -608,7 +691,7 @@ echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_co
|
||||||
# Define $install_sh.
|
# Define $install_sh.
|
||||||
AC_DEFUN([AM_PROG_INSTALL_SH],
|
AC_DEFUN([AM_PROG_INSTALL_SH],
|
||||||
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
|
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
|
||||||
if test x"${install_sh+set}" != xset; then
|
if test x"${install_sh}" != xset; then
|
||||||
case $am_aux_dir in
|
case $am_aux_dir in
|
||||||
*\ * | *\ *)
|
*\ * | *\ *)
|
||||||
install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
|
install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
|
||||||
|
|
@ -618,7 +701,7 @@ if test x"${install_sh+set}" != xset; then
|
||||||
fi
|
fi
|
||||||
AC_SUBST([install_sh])])
|
AC_SUBST([install_sh])])
|
||||||
|
|
||||||
# Copyright (C) 2003-2020 Free Software Foundation, Inc.
|
# Copyright (C) 2003-2013 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
|
@ -639,7 +722,7 @@ AC_SUBST([am__leading_dot])])
|
||||||
|
|
||||||
# Check to see how 'make' treats includes. -*- Autoconf -*-
|
# Check to see how 'make' treats includes. -*- Autoconf -*-
|
||||||
|
|
||||||
# Copyright (C) 2001-2020 Free Software Foundation, Inc.
|
# Copyright (C) 2001-2013 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
|
@ -647,42 +730,81 @@ AC_SUBST([am__leading_dot])])
|
||||||
|
|
||||||
# AM_MAKE_INCLUDE()
|
# AM_MAKE_INCLUDE()
|
||||||
# -----------------
|
# -----------------
|
||||||
# Check whether make has an 'include' directive that can support all
|
# Check to see how make treats includes.
|
||||||
# the idioms we need for our automatic dependency tracking code.
|
|
||||||
AC_DEFUN([AM_MAKE_INCLUDE],
|
AC_DEFUN([AM_MAKE_INCLUDE],
|
||||||
[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive])
|
[am_make=${MAKE-make}
|
||||||
cat > confinc.mk << 'END'
|
cat > confinc << 'END'
|
||||||
am__doit:
|
am__doit:
|
||||||
@echo this is the am__doit target >confinc.out
|
@echo this is the am__doit target
|
||||||
.PHONY: am__doit
|
.PHONY: am__doit
|
||||||
END
|
END
|
||||||
|
# If we don't find an include directive, just comment out the code.
|
||||||
|
AC_MSG_CHECKING([for style of include used by $am_make])
|
||||||
am__include="#"
|
am__include="#"
|
||||||
am__quote=
|
am__quote=
|
||||||
# BSD make does it like this.
|
_am_result=none
|
||||||
echo '.include "confinc.mk" # ignored' > confmf.BSD
|
# First try GNU make style include.
|
||||||
# Other make implementations (GNU, Solaris 10, AIX) do it like this.
|
echo "include confinc" > confmf
|
||||||
echo 'include confinc.mk # ignored' > confmf.GNU
|
# Ignore all kinds of additional output from 'make'.
|
||||||
_am_result=no
|
case `$am_make -s -f confmf 2> /dev/null` in #(
|
||||||
for s in GNU BSD; do
|
*the\ am__doit\ target*)
|
||||||
AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out])
|
am__include=include
|
||||||
AS_CASE([$?:`cat confinc.out 2>/dev/null`],
|
am__quote=
|
||||||
['0:this is the am__doit target'],
|
_am_result=GNU
|
||||||
[AS_CASE([$s],
|
;;
|
||||||
[BSD], [am__include='.include' am__quote='"'],
|
esac
|
||||||
[am__include='include' am__quote=''])])
|
# Now try BSD make style include.
|
||||||
if test "$am__include" != "#"; then
|
if test "$am__include" = "#"; then
|
||||||
_am_result="yes ($s style)"
|
echo '.include "confinc"' > confmf
|
||||||
break
|
case `$am_make -s -f confmf 2> /dev/null` in #(
|
||||||
fi
|
*the\ am__doit\ target*)
|
||||||
done
|
am__include=.include
|
||||||
rm -f confinc.* confmf.*
|
am__quote="\""
|
||||||
AC_MSG_RESULT([${_am_result}])
|
_am_result=BSD
|
||||||
AC_SUBST([am__include])])
|
;;
|
||||||
AC_SUBST([am__quote])])
|
esac
|
||||||
|
fi
|
||||||
|
AC_SUBST([am__include])
|
||||||
|
AC_SUBST([am__quote])
|
||||||
|
AC_MSG_RESULT([$_am_result])
|
||||||
|
rm -f confinc confmf
|
||||||
|
])
|
||||||
|
|
||||||
|
# Copyright (C) 1999-2013 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.
|
||||||
|
|
||||||
|
# AM_PROG_CC_C_O
|
||||||
|
# --------------
|
||||||
|
# Like AC_PROG_CC_C_O, but changed for automake.
|
||||||
|
AC_DEFUN([AM_PROG_CC_C_O],
|
||||||
|
[AC_REQUIRE([AC_PROG_CC_C_O])dnl
|
||||||
|
AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
|
||||||
|
AC_REQUIRE_AUX_FILE([compile])dnl
|
||||||
|
# FIXME: we rely on the cache variable name because
|
||||||
|
# there is no other way.
|
||||||
|
set dummy $CC
|
||||||
|
am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
|
||||||
|
eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
|
||||||
|
if test "$am_t" != yes; then
|
||||||
|
# Losing compiler, so override with the script.
|
||||||
|
# FIXME: It is wrong to rewrite CC.
|
||||||
|
# But if we don't then we get into trouble of one sort or another.
|
||||||
|
# A longer-term fix would be to have automake use am__CC in this case,
|
||||||
|
# and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
|
||||||
|
CC="$am_aux_dir/compile $CC"
|
||||||
|
fi
|
||||||
|
dnl Make sure AC_PROG_CC is never called again, or it will override our
|
||||||
|
dnl setting of CC.
|
||||||
|
m4_define([AC_PROG_CC],
|
||||||
|
[m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
|
||||||
|
])
|
||||||
|
|
||||||
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
|
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
|
||||||
|
|
||||||
# Copyright (C) 1997-2020 Free Software Foundation, Inc.
|
# Copyright (C) 1997-2013 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
|
@ -721,7 +843,7 @@ fi
|
||||||
|
|
||||||
# Helper functions for option handling. -*- Autoconf -*-
|
# Helper functions for option handling. -*- Autoconf -*-
|
||||||
|
|
||||||
# Copyright (C) 2001-2020 Free Software Foundation, Inc.
|
# Copyright (C) 2001-2013 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
|
@ -750,73 +872,9 @@ AC_DEFUN([_AM_SET_OPTIONS],
|
||||||
AC_DEFUN([_AM_IF_OPTION],
|
AC_DEFUN([_AM_IF_OPTION],
|
||||||
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
|
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
|
||||||
|
|
||||||
# Copyright (C) 1999-2020 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.
|
|
||||||
|
|
||||||
# _AM_PROG_CC_C_O
|
|
||||||
# ---------------
|
|
||||||
# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC
|
|
||||||
# to automatically call this.
|
|
||||||
AC_DEFUN([_AM_PROG_CC_C_O],
|
|
||||||
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
|
|
||||||
AC_REQUIRE_AUX_FILE([compile])dnl
|
|
||||||
AC_LANG_PUSH([C])dnl
|
|
||||||
AC_CACHE_CHECK(
|
|
||||||
[whether $CC understands -c and -o together],
|
|
||||||
[am_cv_prog_cc_c_o],
|
|
||||||
[AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
|
|
||||||
# Make sure it works both with $CC and with simple cc.
|
|
||||||
# Following AC_PROG_CC_C_O, we do the test twice because some
|
|
||||||
# compilers refuse to overwrite an existing .o file with -o,
|
|
||||||
# though they will create one.
|
|
||||||
am_cv_prog_cc_c_o=yes
|
|
||||||
for am_i in 1 2; do
|
|
||||||
if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
|
|
||||||
&& test -f conftest2.$ac_objext; then
|
|
||||||
: OK
|
|
||||||
else
|
|
||||||
am_cv_prog_cc_c_o=no
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
rm -f core conftest*
|
|
||||||
unset am_i])
|
|
||||||
if test "$am_cv_prog_cc_c_o" != yes; then
|
|
||||||
# Losing compiler, so override with the script.
|
|
||||||
# FIXME: It is wrong to rewrite CC.
|
|
||||||
# But if we don't then we get into trouble of one sort or another.
|
|
||||||
# A longer-term fix would be to have automake use am__CC in this case,
|
|
||||||
# and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
|
|
||||||
CC="$am_aux_dir/compile $CC"
|
|
||||||
fi
|
|
||||||
AC_LANG_POP([C])])
|
|
||||||
|
|
||||||
# For backward compatibility.
|
|
||||||
AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
|
|
||||||
|
|
||||||
# Copyright (C) 2001-2020 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.
|
|
||||||
|
|
||||||
# AM_RUN_LOG(COMMAND)
|
|
||||||
# -------------------
|
|
||||||
# Run COMMAND, save the exit status in ac_status, and log it.
|
|
||||||
# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
|
|
||||||
AC_DEFUN([AM_RUN_LOG],
|
|
||||||
[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
|
|
||||||
($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
|
|
||||||
ac_status=$?
|
|
||||||
echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
|
|
||||||
(exit $ac_status); }])
|
|
||||||
|
|
||||||
# Check to make sure that the build environment is sane. -*- Autoconf -*-
|
# Check to make sure that the build environment is sane. -*- Autoconf -*-
|
||||||
|
|
||||||
# Copyright (C) 1996-2020 Free Software Foundation, Inc.
|
# Copyright (C) 1996-2013 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
|
@ -897,7 +955,7 @@ AC_CONFIG_COMMANDS_PRE(
|
||||||
rm -f conftest.file
|
rm -f conftest.file
|
||||||
])
|
])
|
||||||
|
|
||||||
# Copyright (C) 2009-2020 Free Software Foundation, Inc.
|
# Copyright (C) 2009-2013 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
|
@ -957,7 +1015,7 @@ AC_SUBST([AM_BACKSLASH])dnl
|
||||||
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
|
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
|
||||||
])
|
])
|
||||||
|
|
||||||
# Copyright (C) 2001-2020 Free Software Foundation, Inc.
|
# Copyright (C) 2001-2013 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
|
@ -985,7 +1043,7 @@ fi
|
||||||
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
|
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
|
||||||
AC_SUBST([INSTALL_STRIP_PROGRAM])])
|
AC_SUBST([INSTALL_STRIP_PROGRAM])])
|
||||||
|
|
||||||
# Copyright (C) 2006-2020 Free Software Foundation, Inc.
|
# Copyright (C) 2006-2013 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
|
@ -1004,7 +1062,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
|
||||||
|
|
||||||
# Check how to create a tarball. -*- Autoconf -*-
|
# Check how to create a tarball. -*- Autoconf -*-
|
||||||
|
|
||||||
# Copyright (C) 2004-2020 Free Software Foundation, Inc.
|
# Copyright (C) 2004-2013 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
|
@ -1136,11 +1194,8 @@ AC_SUBST([am__untar])
|
||||||
]) # _AM_PROG_TAR
|
]) # _AM_PROG_TAR
|
||||||
|
|
||||||
m4_include([m4/attribute.m4])
|
m4_include([m4/attribute.m4])
|
||||||
m4_include([m4/ax_append_flag.m4])
|
m4_include([m4/curses.m4])
|
||||||
m4_include([m4/ax_cflags_warn_all.m4])
|
|
||||||
m4_include([m4/ax_check_compile_flag.m4])
|
|
||||||
m4_include([m4/ax_check_link_flag.m4])
|
|
||||||
m4_include([m4/ax_require_defined.m4])
|
|
||||||
m4_include([m4/lzo.m4])
|
m4_include([m4/lzo.m4])
|
||||||
m4_include([m4/openssl.m4])
|
m4_include([m4/openssl.m4])
|
||||||
|
m4_include([m4/readline.m4])
|
||||||
m4_include([m4/zlib.m4])
|
m4_include([m4/zlib.m4])
|
||||||
|
|
|
||||||
17
compile
17
compile
|
|
@ -1,9 +1,9 @@
|
||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# Wrapper for compilers which do not understand '-c -o'.
|
# Wrapper for compilers which do not understand '-c -o'.
|
||||||
|
|
||||||
scriptversion=2018-03-07.03; # UTC
|
scriptversion=2012-10-14.11; # UTC
|
||||||
|
|
||||||
# Copyright (C) 1999-2020 Free Software Foundation, Inc.
|
# Copyright (C) 1999-2013 Free Software Foundation, Inc.
|
||||||
# Written by Tom Tromey <tromey@cygnus.com>.
|
# Written by Tom Tromey <tromey@cygnus.com>.
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
|
|
@ -17,7 +17,7 @@ scriptversion=2018-03-07.03; # UTC
|
||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
#
|
#
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
# As a special exception to the GNU General Public License, if you
|
# As a special exception to the GNU General Public License, if you
|
||||||
# distribute this file as part of a program that contains a
|
# distribute this file as part of a program that contains a
|
||||||
|
|
@ -53,7 +53,7 @@ func_file_conv ()
|
||||||
MINGW*)
|
MINGW*)
|
||||||
file_conv=mingw
|
file_conv=mingw
|
||||||
;;
|
;;
|
||||||
CYGWIN* | MSYS*)
|
CYGWIN*)
|
||||||
file_conv=cygwin
|
file_conv=cygwin
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
|
@ -67,7 +67,7 @@ func_file_conv ()
|
||||||
mingw/*)
|
mingw/*)
|
||||||
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
|
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
|
||||||
;;
|
;;
|
||||||
cygwin/* | msys/*)
|
cygwin/*)
|
||||||
file=`cygpath -m "$file" || echo "$file"`
|
file=`cygpath -m "$file" || echo "$file"`
|
||||||
;;
|
;;
|
||||||
wine/*)
|
wine/*)
|
||||||
|
|
@ -255,8 +255,7 @@ EOF
|
||||||
echo "compile $scriptversion"
|
echo "compile $scriptversion"
|
||||||
exit $?
|
exit $?
|
||||||
;;
|
;;
|
||||||
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \
|
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
|
||||||
icl | *[/\\]icl | icl.exe | *[/\\]icl.exe )
|
|
||||||
func_cl_wrapper "$@" # Doesn't return...
|
func_cl_wrapper "$@" # Doesn't return...
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
@ -340,9 +339,9 @@ exit $ret
|
||||||
# Local Variables:
|
# Local Variables:
|
||||||
# mode: shell-script
|
# mode: shell-script
|
||||||
# sh-indentation: 2
|
# sh-indentation: 2
|
||||||
# eval: (add-hook 'before-save-hook 'time-stamp)
|
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||||
# time-stamp-start: "scriptversion="
|
# time-stamp-start: "scriptversion="
|
||||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||||
# time-stamp-time-zone: "UTC0"
|
# time-stamp-time-zone: "UTC"
|
||||||
# time-stamp-end: "; # UTC"
|
# time-stamp-end: "; # UTC"
|
||||||
# End:
|
# End:
|
||||||
|
|
|
||||||
858
config.guess
vendored
858
config.guess
vendored
File diff suppressed because it is too large
Load diff
129
config.h.in
129
config.h.in
|
|
@ -15,18 +15,18 @@
|
||||||
/* Define to 1 if you have the <arpa/inet.h> header file. */
|
/* Define to 1 if you have the <arpa/inet.h> header file. */
|
||||||
#undef HAVE_ARPA_INET_H
|
#undef HAVE_ARPA_INET_H
|
||||||
|
|
||||||
/* Define to 1 if you have the <arpa/nameser.h> header file. */
|
|
||||||
#undef HAVE_ARPA_NAMESER_H
|
|
||||||
|
|
||||||
/* Define to 1 if you have the `asprintf' function. */
|
/* Define to 1 if you have the `asprintf' function. */
|
||||||
#undef HAVE_ASPRINTF
|
#undef HAVE_ASPRINTF
|
||||||
|
|
||||||
/* Define to 1 if you have the `BN_GENCB_new' function. */
|
|
||||||
#undef HAVE_BN_GENCB_NEW
|
|
||||||
|
|
||||||
/* Unknown BSD variant */
|
/* Unknown BSD variant */
|
||||||
#undef HAVE_BSD
|
#undef HAVE_BSD
|
||||||
|
|
||||||
|
/* have curses support */
|
||||||
|
#undef HAVE_CURSES
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <curses.h> header file. */
|
||||||
|
#undef HAVE_CURSES_H
|
||||||
|
|
||||||
/* Cygwin */
|
/* Cygwin */
|
||||||
#undef HAVE_CYGWIN
|
#undef HAVE_CYGWIN
|
||||||
|
|
||||||
|
|
@ -36,10 +36,6 @@
|
||||||
/* Darwin (MacOS/X) */
|
/* Darwin (MacOS/X) */
|
||||||
#undef HAVE_DARWIN
|
#undef HAVE_DARWIN
|
||||||
|
|
||||||
/* Define to 1 if you have the declaration of `EVP_aes_256_cfb', and to 0 if
|
|
||||||
you don't. */
|
|
||||||
#undef HAVE_DECL_EVP_AES_256_CFB
|
|
||||||
|
|
||||||
/* Define to 1 if you have the declaration of `freeaddrinfo', and to 0 if you
|
/* Define to 1 if you have the declaration of `freeaddrinfo', and to 0 if you
|
||||||
don't. */
|
don't. */
|
||||||
#undef HAVE_DECL_FREEADDRINFO
|
#undef HAVE_DECL_FREEADDRINFO
|
||||||
|
|
@ -56,25 +52,17 @@
|
||||||
don't. */
|
don't. */
|
||||||
#undef HAVE_DECL_GETNAMEINFO
|
#undef HAVE_DECL_GETNAMEINFO
|
||||||
|
|
||||||
/* Define to 1 if you have the declaration of `OpenSSL_add_all_algorithms',
|
|
||||||
and to 0 if you don't. */
|
|
||||||
#undef HAVE_DECL_OPENSSL_ADD_ALL_ALGORITHMS
|
|
||||||
|
|
||||||
/* Define to 1 if you have the declaration of `res_init', and to 0 if you
|
|
||||||
don't. */
|
|
||||||
#undef HAVE_DECL_RES_INIT
|
|
||||||
|
|
||||||
/* Define to 1 if you have the `devname' function. */
|
|
||||||
#undef HAVE_DEVNAME
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <dirent.h> header file. */
|
/* Define to 1 if you have the <dirent.h> header file. */
|
||||||
#undef HAVE_DIRENT_H
|
#undef HAVE_DIRENT_H
|
||||||
|
|
||||||
/* DragonFly */
|
/* DragonFly */
|
||||||
#undef HAVE_DRAGONFLY
|
#undef HAVE_DRAGONFLY
|
||||||
|
|
||||||
/* Define to 1 if you have the `EVP_CIPHER_CTX_new' function. */
|
/* Define to 1 if you have the `ECDH_compute_key' function. */
|
||||||
#undef HAVE_EVP_CIPHER_CTX_NEW
|
#undef HAVE_ECDH_COMPUTE_KEY
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `ECDSA_verify' function. */
|
||||||
|
#undef HAVE_ECDSA_VERIFY
|
||||||
|
|
||||||
/* Define to 1 if you have the `EVP_EncryptInit_ex' function. */
|
/* Define to 1 if you have the `EVP_EncryptInit_ex' function. */
|
||||||
#undef HAVE_EVP_ENCRYPTINIT_EX
|
#undef HAVE_EVP_ENCRYPTINIT_EX
|
||||||
|
|
@ -82,9 +70,6 @@
|
||||||
/* Define to 1 if you have the `fchmod' function. */
|
/* Define to 1 if you have the `fchmod' function. */
|
||||||
#undef HAVE_FCHMOD
|
#undef HAVE_FCHMOD
|
||||||
|
|
||||||
/* Define to 1 if you have the `fdevname' function. */
|
|
||||||
#undef HAVE_FDEVNAME
|
|
||||||
|
|
||||||
/* Define to 1 if you have the `flock' function. */
|
/* Define to 1 if you have the `flock' function. */
|
||||||
#undef HAVE_FLOCK
|
#undef HAVE_FLOCK
|
||||||
|
|
||||||
|
|
@ -94,24 +79,21 @@
|
||||||
/* FreeBSD */
|
/* FreeBSD */
|
||||||
#undef HAVE_FREEBSD
|
#undef HAVE_FREEBSD
|
||||||
|
|
||||||
/* Define to 1 if you have the <getopt.h> header file. */
|
/* Define to 1 if you have the `ftime' function. */
|
||||||
#undef HAVE_GETOPT_H
|
#undef HAVE_FTIME
|
||||||
|
|
||||||
/* getopt_long() */
|
|
||||||
#undef HAVE_GETOPT_LONG
|
|
||||||
|
|
||||||
/* Define to 1 if you have the `gettimeofday' function. */
|
/* Define to 1 if you have the `gettimeofday' function. */
|
||||||
#undef HAVE_GETTIMEOFDAY
|
#undef HAVE_GETTIMEOFDAY
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `get_current_dir_name' function. */
|
||||||
|
#undef HAVE_GET_CURRENT_DIR_NAME
|
||||||
|
|
||||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||||
#undef HAVE_INTTYPES_H
|
#undef HAVE_INTTYPES_H
|
||||||
|
|
||||||
/* Define to 1 if you have the `nsl' library (-lnsl). */
|
/* Define to 1 if you have the `nsl' library (-lnsl). */
|
||||||
#undef HAVE_LIBNSL
|
#undef HAVE_LIBNSL
|
||||||
|
|
||||||
/* Define to 1 if you have the `resolv' library (-lresolv). */
|
|
||||||
#undef HAVE_LIBRESOLV
|
|
||||||
|
|
||||||
/* Define to 1 if you have the `socket' library (-lsocket). */
|
/* Define to 1 if you have the `socket' library (-lsocket). */
|
||||||
#undef HAVE_LIBSOCKET
|
#undef HAVE_LIBSOCKET
|
||||||
|
|
||||||
|
|
@ -199,9 +181,6 @@
|
||||||
/* Define to 1 if you have the <net/if_types.h> header file. */
|
/* Define to 1 if you have the <net/if_types.h> header file. */
|
||||||
#undef HAVE_NET_IF_TYPES_H
|
#undef HAVE_NET_IF_TYPES_H
|
||||||
|
|
||||||
/* Define to 1 if you have the <net/if_utun.h> header file. */
|
|
||||||
#undef HAVE_NET_IF_UTUN_H
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <net/tap/if_tap.h> header file. */
|
/* Define to 1 if you have the <net/tap/if_tap.h> header file. */
|
||||||
#undef HAVE_NET_TAP_IF_TAP_H
|
#undef HAVE_NET_TAP_IF_TAP_H
|
||||||
|
|
||||||
|
|
@ -211,6 +190,12 @@
|
||||||
/* OpenBSD */
|
/* OpenBSD */
|
||||||
#undef HAVE_OPENBSD
|
#undef HAVE_OPENBSD
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <openssl/ecdh.h> header file. */
|
||||||
|
#undef HAVE_OPENSSL_ECDH_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <openssl/ec.h> header file. */
|
||||||
|
#undef HAVE_OPENSSL_EC_H
|
||||||
|
|
||||||
/* Define to 1 if you have the <openssl/engine.h> header file. */
|
/* Define to 1 if you have the <openssl/engine.h> header file. */
|
||||||
#undef HAVE_OPENSSL_ENGINE_H
|
#undef HAVE_OPENSSL_ENGINE_H
|
||||||
|
|
||||||
|
|
@ -232,20 +217,26 @@
|
||||||
/* Define to 1 if you have the <openssl/sha.h> header file. */
|
/* Define to 1 if you have the <openssl/sha.h> header file. */
|
||||||
#undef HAVE_OPENSSL_SHA_H
|
#undef HAVE_OPENSSL_SHA_H
|
||||||
|
|
||||||
/* Define to 1 if you have the `pselect' function. */
|
|
||||||
#undef HAVE_PSELECT
|
|
||||||
|
|
||||||
/* Define to 1 if you have the `putenv' function. */
|
/* Define to 1 if you have the `putenv' function. */
|
||||||
#undef HAVE_PUTENV
|
#undef HAVE_PUTENV
|
||||||
|
|
||||||
/* Define to 1 if you have the `RAND_bytes' function. */
|
/* Define to 1 if you have the `random' function. */
|
||||||
#undef HAVE_RAND_BYTES
|
#undef HAVE_RANDOM
|
||||||
|
|
||||||
/* Define to 1 if you have the <resolv.h> header file. */
|
/* Define to 1 if you have the `RAND_pseudo_bytes' function. */
|
||||||
#undef HAVE_RESOLV_H
|
#undef HAVE_RAND_PSEUDO_BYTES
|
||||||
|
|
||||||
/* Define to 1 if you have the `RSA_set0_key' function. */
|
/* have readline support */
|
||||||
#undef HAVE_RSA_SET0_KEY
|
#undef HAVE_READLINE
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <readline/history.h> header file. */
|
||||||
|
#undef HAVE_READLINE_HISTORY_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <readline/readline.h> header file. */
|
||||||
|
#undef HAVE_READLINE_READLINE_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `select' function. */
|
||||||
|
#undef HAVE_SELECT
|
||||||
|
|
||||||
/* Define to 1 if the system has the type `socklen_t'. */
|
/* Define to 1 if the system has the type `socklen_t'. */
|
||||||
#undef HAVE_SOCKLEN_T
|
#undef HAVE_SOCKLEN_T
|
||||||
|
|
@ -253,12 +244,21 @@
|
||||||
/* Solaris/SunOS */
|
/* Solaris/SunOS */
|
||||||
#undef HAVE_SOLARIS
|
#undef HAVE_SOLARIS
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <stdbool.h> header file. */
|
||||||
|
#undef HAVE_STDBOOL_H
|
||||||
|
|
||||||
/* Define to 1 if you have the <stdint.h> header file. */
|
/* Define to 1 if you have the <stdint.h> header file. */
|
||||||
#undef HAVE_STDINT_H
|
#undef HAVE_STDINT_H
|
||||||
|
|
||||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||||
#undef HAVE_STDLIB_H
|
#undef HAVE_STDLIB_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `strdup' function. */
|
||||||
|
#undef HAVE_STRDUP
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `strerror' function. */
|
||||||
|
#undef HAVE_STRERROR
|
||||||
|
|
||||||
/* Define to 1 if you have the <strings.h> header file. */
|
/* Define to 1 if you have the <strings.h> header file. */
|
||||||
#undef HAVE_STRINGS_H
|
#undef HAVE_STRINGS_H
|
||||||
|
|
||||||
|
|
@ -268,6 +268,9 @@
|
||||||
/* Define to 1 if you have the `strsignal' function. */
|
/* Define to 1 if you have the `strsignal' function. */
|
||||||
#undef HAVE_STRSIGNAL
|
#undef HAVE_STRSIGNAL
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `strtol' function. */
|
||||||
|
#undef HAVE_STRTOL
|
||||||
|
|
||||||
/* Define to 1 if the system has the type `struct addrinfo'. */
|
/* Define to 1 if the system has the type `struct addrinfo'. */
|
||||||
#undef HAVE_STRUCT_ADDRINFO
|
#undef HAVE_STRUCT_ADDRINFO
|
||||||
|
|
||||||
|
|
@ -343,9 +346,18 @@
|
||||||
/* Define to 1 if you have the <sys/uio.h> header file. */
|
/* Define to 1 if you have the <sys/uio.h> header file. */
|
||||||
#undef HAVE_SYS_UIO_H
|
#undef HAVE_SYS_UIO_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/un.h> header file. */
|
||||||
|
#undef HAVE_SYS_UN_H
|
||||||
|
|
||||||
/* Define to 1 if you have the <sys/wait.h> header file. */
|
/* Define to 1 if you have the <sys/wait.h> header file. */
|
||||||
#undef HAVE_SYS_WAIT_H
|
#undef HAVE_SYS_WAIT_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `time' function. */
|
||||||
|
#undef HAVE_TIME
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <time.h> header file. */
|
||||||
|
#undef HAVE_TIME_H
|
||||||
|
|
||||||
/* Define to 1 if you have the <unistd.h> header file. */
|
/* Define to 1 if you have the <unistd.h> header file. */
|
||||||
#undef HAVE_UNISTD_H
|
#undef HAVE_UNISTD_H
|
||||||
|
|
||||||
|
|
@ -358,6 +370,9 @@
|
||||||
/* Define to 1 if you have the `vsyslog' function. */
|
/* Define to 1 if you have the `vsyslog' function. */
|
||||||
#undef HAVE_VSYSLOG
|
#undef HAVE_VSYSLOG
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `writev' function. */
|
||||||
|
#undef HAVE_WRITEV
|
||||||
|
|
||||||
/* have zlib compression support */
|
/* have zlib compression support */
|
||||||
#undef HAVE_ZLIB
|
#undef HAVE_ZLIB
|
||||||
|
|
||||||
|
|
@ -367,6 +382,9 @@
|
||||||
/* Location of lzo1x.h */
|
/* Location of lzo1x.h */
|
||||||
#undef LZO1X_H
|
#undef LZO1X_H
|
||||||
|
|
||||||
|
/* Define to 1 if your C compiler doesn't accept -c and -o together. */
|
||||||
|
#undef NO_MINUS_C_MINUS_O
|
||||||
|
|
||||||
/* Name of package */
|
/* Name of package */
|
||||||
#undef PACKAGE
|
#undef PACKAGE
|
||||||
|
|
||||||
|
|
@ -394,6 +412,12 @@
|
||||||
/* Define to 1 if you have the ANSI C header files. */
|
/* Define to 1 if you have the ANSI C header files. */
|
||||||
#undef STDC_HEADERS
|
#undef STDC_HEADERS
|
||||||
|
|
||||||
|
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
|
||||||
|
#undef TIME_WITH_SYS_TIME
|
||||||
|
|
||||||
|
/* Define to 1 if your <sys/time.h> declares `struct tm'. */
|
||||||
|
#undef TM_IN_SYS_TIME
|
||||||
|
|
||||||
/* Enable extensions on AIX 3, Interix. */
|
/* Enable extensions on AIX 3, Interix. */
|
||||||
#ifndef _ALL_SOURCE
|
#ifndef _ALL_SOURCE
|
||||||
# undef _ALL_SOURCE
|
# undef _ALL_SOURCE
|
||||||
|
|
@ -438,5 +462,18 @@
|
||||||
/* Defined if the __malloc__ attribute is not supported. */
|
/* Defined if the __malloc__ attribute is not supported. */
|
||||||
#undef __malloc__
|
#undef __malloc__
|
||||||
|
|
||||||
|
/* Defined if the __warn_unused_result__ attribute is not supported. */
|
||||||
|
#undef __warn_unused_result__
|
||||||
|
|
||||||
|
/* Define to empty if `const' does not conform to ANSI C. */
|
||||||
|
#undef const
|
||||||
|
|
||||||
/* Define to `int' if <sys/types.h> does not define. */
|
/* Define to `int' if <sys/types.h> does not define. */
|
||||||
#undef pid_t
|
#undef pid_t
|
||||||
|
|
||||||
|
/* Define to `unsigned int' if <sys/types.h> does not define. */
|
||||||
|
#undef size_t
|
||||||
|
|
||||||
|
/* Define to empty if the keyword `volatile' does not work. Warning: valid
|
||||||
|
code using `volatile' can become incorrect without. Disable with care. */
|
||||||
|
#undef volatile
|
||||||
|
|
|
||||||
332
config.sub
vendored
332
config.sub
vendored
|
|
@ -1,8 +1,8 @@
|
||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# Configuration validation subroutine script.
|
# Configuration validation subroutine script.
|
||||||
# Copyright 1992-2018 Free Software Foundation, Inc.
|
# Copyright 1992-2013 Free Software Foundation, Inc.
|
||||||
|
|
||||||
timestamp='2018-02-22'
|
timestamp='2013-08-10'
|
||||||
|
|
||||||
# This file is free software; you can redistribute it and/or modify it
|
# 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
|
# under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -15,7 +15,7 @@ timestamp='2018-02-22'
|
||||||
# General Public License for more details.
|
# General Public License for more details.
|
||||||
#
|
#
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program; if not, see <https://www.gnu.org/licenses/>.
|
# along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
# As a special exception to the GNU General Public License, if you
|
# As a special exception to the GNU General Public License, if you
|
||||||
# distribute this file as part of a program that contains a
|
# distribute this file as part of a program that contains a
|
||||||
|
|
@ -25,7 +25,7 @@ timestamp='2018-02-22'
|
||||||
# of the GNU General Public License, version 3 ("GPLv3").
|
# of the GNU General Public License, version 3 ("GPLv3").
|
||||||
|
|
||||||
|
|
||||||
# Please send patches to <config-patches@gnu.org>.
|
# Please send patches with a ChangeLog entry to config-patches@gnu.org.
|
||||||
#
|
#
|
||||||
# Configuration subroutine to validate and canonicalize a configuration type.
|
# Configuration subroutine to validate and canonicalize a configuration type.
|
||||||
# Supply the specified configuration type as an argument.
|
# Supply the specified configuration type as an argument.
|
||||||
|
|
@ -33,7 +33,7 @@ timestamp='2018-02-22'
|
||||||
# Otherwise, we print the canonical config type on stdout and succeed.
|
# Otherwise, we print the canonical config type on stdout and succeed.
|
||||||
|
|
||||||
# You can get the latest version of this script from:
|
# You can get the latest version of this script from:
|
||||||
# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
|
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
|
||||||
|
|
||||||
# This file is supposed to be the same for all GNU packages
|
# This file is supposed to be the same for all GNU packages
|
||||||
# and recognize all the CPU types, system types and aliases
|
# and recognize all the CPU types, system types and aliases
|
||||||
|
|
@ -53,11 +53,12 @@ timestamp='2018-02-22'
|
||||||
me=`echo "$0" | sed -e 's,.*/,,'`
|
me=`echo "$0" | sed -e 's,.*/,,'`
|
||||||
|
|
||||||
usage="\
|
usage="\
|
||||||
Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
|
Usage: $0 [OPTION] CPU-MFR-OPSYS
|
||||||
|
$0 [OPTION] ALIAS
|
||||||
|
|
||||||
Canonicalize a configuration name.
|
Canonicalize a configuration name.
|
||||||
|
|
||||||
Options:
|
Operation modes:
|
||||||
-h, --help print this help, then exit
|
-h, --help print this help, then exit
|
||||||
-t, --time-stamp print date of last modification, then exit
|
-t, --time-stamp print date of last modification, then exit
|
||||||
-v, --version print version number, then exit
|
-v, --version print version number, then exit
|
||||||
|
|
@ -67,7 +68,7 @@ Report bugs and patches to <config-patches@gnu.org>."
|
||||||
version="\
|
version="\
|
||||||
GNU config.sub ($timestamp)
|
GNU config.sub ($timestamp)
|
||||||
|
|
||||||
Copyright 1992-2018 Free Software Foundation, Inc.
|
Copyright 1992-2013 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This is free software; see the source for copying conditions. There is NO
|
This is free software; see the source for copying conditions. There is NO
|
||||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
||||||
|
|
@ -94,7 +95,7 @@ while test $# -gt 0 ; do
|
||||||
|
|
||||||
*local*)
|
*local*)
|
||||||
# First pass through any local machine types.
|
# First pass through any local machine types.
|
||||||
echo "$1"
|
echo $1
|
||||||
exit ;;
|
exit ;;
|
||||||
|
|
||||||
* )
|
* )
|
||||||
|
|
@ -112,24 +113,24 @@ esac
|
||||||
|
|
||||||
# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
|
# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
|
||||||
# Here we must recognize all the valid KERNEL-OS combinations.
|
# Here we must recognize all the valid KERNEL-OS combinations.
|
||||||
maybe_os=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
|
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
|
||||||
case $maybe_os in
|
case $maybe_os in
|
||||||
nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
|
nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
|
||||||
linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
|
linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
|
||||||
knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \
|
knetbsd*-gnu* | netbsd*-gnu* | \
|
||||||
kopensolaris*-gnu* | cloudabi*-eabi* | \
|
kopensolaris*-gnu* | \
|
||||||
storm-chaos* | os2-emx* | rtmk-nova*)
|
storm-chaos* | os2-emx* | rtmk-nova*)
|
||||||
os=-$maybe_os
|
os=-$maybe_os
|
||||||
basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
|
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
|
||||||
;;
|
;;
|
||||||
android-linux)
|
android-linux)
|
||||||
os=-linux-android
|
os=-linux-android
|
||||||
basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
|
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
basic_machine=`echo "$1" | sed 's/-[^-]*$//'`
|
basic_machine=`echo $1 | sed 's/-[^-]*$//'`
|
||||||
if [ "$basic_machine" != "$1" ]
|
if [ $basic_machine != $1 ]
|
||||||
then os=`echo "$1" | sed 's/.*-/-/'`
|
then os=`echo $1 | sed 's/.*-/-/'`
|
||||||
else os=; fi
|
else os=; fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
@ -178,44 +179,44 @@ case $os in
|
||||||
;;
|
;;
|
||||||
-sco6)
|
-sco6)
|
||||||
os=-sco5v6
|
os=-sco5v6
|
||||||
basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
|
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||||
;;
|
;;
|
||||||
-sco5)
|
-sco5)
|
||||||
os=-sco3.2v5
|
os=-sco3.2v5
|
||||||
basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
|
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||||
;;
|
;;
|
||||||
-sco4)
|
-sco4)
|
||||||
os=-sco3.2v4
|
os=-sco3.2v4
|
||||||
basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
|
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||||
;;
|
;;
|
||||||
-sco3.2.[4-9]*)
|
-sco3.2.[4-9]*)
|
||||||
os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
|
os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
|
||||||
basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
|
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||||
;;
|
;;
|
||||||
-sco3.2v[4-9]*)
|
-sco3.2v[4-9]*)
|
||||||
# Don't forget version if it is 3.2v4 or newer.
|
# Don't forget version if it is 3.2v4 or newer.
|
||||||
basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
|
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||||
;;
|
;;
|
||||||
-sco5v6*)
|
-sco5v6*)
|
||||||
# Don't forget version if it is 3.2v4 or newer.
|
# Don't forget version if it is 3.2v4 or newer.
|
||||||
basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
|
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||||
;;
|
;;
|
||||||
-sco*)
|
-sco*)
|
||||||
os=-sco3.2v2
|
os=-sco3.2v2
|
||||||
basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
|
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||||
;;
|
;;
|
||||||
-udk*)
|
-udk*)
|
||||||
basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
|
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||||
;;
|
;;
|
||||||
-isc)
|
-isc)
|
||||||
os=-isc2.2
|
os=-isc2.2
|
||||||
basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
|
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||||
;;
|
;;
|
||||||
-clix*)
|
-clix*)
|
||||||
basic_machine=clipper-intergraph
|
basic_machine=clipper-intergraph
|
||||||
;;
|
;;
|
||||||
-isc*)
|
-isc*)
|
||||||
basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
|
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||||
;;
|
;;
|
||||||
-lynx*178)
|
-lynx*178)
|
||||||
os=-lynxos178
|
os=-lynxos178
|
||||||
|
|
@ -227,7 +228,10 @@ case $os in
|
||||||
os=-lynxos
|
os=-lynxos
|
||||||
;;
|
;;
|
||||||
-ptx*)
|
-ptx*)
|
||||||
basic_machine=`echo "$1" | sed -e 's/86-.*/86-sequent/'`
|
basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
|
||||||
|
;;
|
||||||
|
-windowsnt*)
|
||||||
|
os=`echo $os | sed -e 's/windowsnt/winnt/'`
|
||||||
;;
|
;;
|
||||||
-psos*)
|
-psos*)
|
||||||
os=-psos
|
os=-psos
|
||||||
|
|
@ -251,18 +255,16 @@ case $basic_machine in
|
||||||
| arc | arceb \
|
| arc | arceb \
|
||||||
| arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
|
| arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
|
||||||
| avr | avr32 \
|
| avr | avr32 \
|
||||||
| ba \
|
|
||||||
| be32 | be64 \
|
| be32 | be64 \
|
||||||
| bfin \
|
| bfin \
|
||||||
| c4x | c8051 | clipper \
|
| c4x | c8051 | clipper \
|
||||||
| d10v | d30v | dlx | dsp16xx \
|
| d10v | d30v | dlx | dsp16xx \
|
||||||
| e2k | epiphany \
|
| epiphany \
|
||||||
| fido | fr30 | frv | ft32 \
|
| fido | fr30 | frv \
|
||||||
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
|
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
|
||||||
| hexagon \
|
| hexagon \
|
||||||
| i370 | i860 | i960 | ia16 | ia64 \
|
| i370 | i860 | i960 | ia64 \
|
||||||
| ip2k | iq2000 \
|
| ip2k | iq2000 \
|
||||||
| k1om \
|
|
||||||
| le32 | le64 \
|
| le32 | le64 \
|
||||||
| lm32 \
|
| lm32 \
|
||||||
| m32c | m32r | m32rle | m68000 | m68k | m88k \
|
| m32c | m32r | m32rle | m68000 | m68k | m88k \
|
||||||
|
|
@ -280,10 +282,8 @@ case $basic_machine in
|
||||||
| mips64vr5900 | mips64vr5900el \
|
| mips64vr5900 | mips64vr5900el \
|
||||||
| mipsisa32 | mipsisa32el \
|
| mipsisa32 | mipsisa32el \
|
||||||
| mipsisa32r2 | mipsisa32r2el \
|
| mipsisa32r2 | mipsisa32r2el \
|
||||||
| mipsisa32r6 | mipsisa32r6el \
|
|
||||||
| mipsisa64 | mipsisa64el \
|
| mipsisa64 | mipsisa64el \
|
||||||
| mipsisa64r2 | mipsisa64r2el \
|
| mipsisa64r2 | mipsisa64r2el \
|
||||||
| mipsisa64r6 | mipsisa64r6el \
|
|
||||||
| mipsisa64sb1 | mipsisa64sb1el \
|
| mipsisa64sb1 | mipsisa64sb1el \
|
||||||
| mipsisa64sr71k | mipsisa64sr71kel \
|
| mipsisa64sr71k | mipsisa64sr71kel \
|
||||||
| mipsr5900 | mipsr5900el \
|
| mipsr5900 | mipsr5900el \
|
||||||
|
|
@ -295,15 +295,14 @@ case $basic_machine in
|
||||||
| nds32 | nds32le | nds32be \
|
| nds32 | nds32le | nds32be \
|
||||||
| nios | nios2 | nios2eb | nios2el \
|
| nios | nios2 | nios2eb | nios2el \
|
||||||
| ns16k | ns32k \
|
| ns16k | ns32k \
|
||||||
| open8 | or1k | or1knd | or32 \
|
| open8 \
|
||||||
| pdp10 | pj | pjl \
|
| or1k | or32 \
|
||||||
|
| pdp10 | pdp11 | pj | pjl \
|
||||||
| powerpc | powerpc64 | powerpc64le | powerpcle \
|
| powerpc | powerpc64 | powerpc64le | powerpcle \
|
||||||
| pru \
|
|
||||||
| pyramid \
|
| pyramid \
|
||||||
| riscv32 | riscv64 \
|
|
||||||
| rl78 | rx \
|
| rl78 | rx \
|
||||||
| score \
|
| score \
|
||||||
| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
|
| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
|
||||||
| sh64 | sh64le \
|
| sh64 | sh64le \
|
||||||
| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
|
| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
|
||||||
| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
|
| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
|
||||||
|
|
@ -311,8 +310,7 @@ case $basic_machine in
|
||||||
| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
|
| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
|
||||||
| ubicom32 \
|
| ubicom32 \
|
||||||
| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
|
| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
|
||||||
| visium \
|
| we32k \
|
||||||
| wasm32 \
|
|
||||||
| x86 | xc16x | xstormy16 | xtensa \
|
| x86 | xc16x | xstormy16 | xtensa \
|
||||||
| z8k | z80)
|
| z8k | z80)
|
||||||
basic_machine=$basic_machine-unknown
|
basic_machine=$basic_machine-unknown
|
||||||
|
|
@ -326,14 +324,11 @@ case $basic_machine in
|
||||||
c6x)
|
c6x)
|
||||||
basic_machine=tic6x-unknown
|
basic_machine=tic6x-unknown
|
||||||
;;
|
;;
|
||||||
leon|leon[3-9])
|
m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
|
||||||
basic_machine=sparc-$basic_machine
|
|
||||||
;;
|
|
||||||
m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
|
|
||||||
basic_machine=$basic_machine-unknown
|
basic_machine=$basic_machine-unknown
|
||||||
os=-none
|
os=-none
|
||||||
;;
|
;;
|
||||||
m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65)
|
m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
|
||||||
;;
|
;;
|
||||||
ms1)
|
ms1)
|
||||||
basic_machine=mt-unknown
|
basic_machine=mt-unknown
|
||||||
|
|
@ -362,7 +357,7 @@ case $basic_machine in
|
||||||
;;
|
;;
|
||||||
# Object if more than one company name word.
|
# Object if more than one company name word.
|
||||||
*-*-*)
|
*-*-*)
|
||||||
echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2
|
echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
# Recognize the basic CPU types with company name.
|
# Recognize the basic CPU types with company name.
|
||||||
|
|
@ -374,20 +369,18 @@ case $basic_machine in
|
||||||
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
|
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
|
||||||
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
|
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
|
||||||
| avr-* | avr32-* \
|
| avr-* | avr32-* \
|
||||||
| ba-* \
|
|
||||||
| be32-* | be64-* \
|
| be32-* | be64-* \
|
||||||
| bfin-* | bs2000-* \
|
| bfin-* | bs2000-* \
|
||||||
| c[123]* | c30-* | [cjt]90-* | c4x-* \
|
| c[123]* | c30-* | [cjt]90-* | c4x-* \
|
||||||
| c8051-* | clipper-* | craynv-* | cydra-* \
|
| c8051-* | clipper-* | craynv-* | cydra-* \
|
||||||
| d10v-* | d30v-* | dlx-* \
|
| d10v-* | d30v-* | dlx-* \
|
||||||
| e2k-* | elxsi-* \
|
| elxsi-* \
|
||||||
| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
|
| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
|
||||||
| h8300-* | h8500-* \
|
| h8300-* | h8500-* \
|
||||||
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
|
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
|
||||||
| hexagon-* \
|
| hexagon-* \
|
||||||
| i*86-* | i860-* | i960-* | ia16-* | ia64-* \
|
| i*86-* | i860-* | i960-* | ia64-* \
|
||||||
| ip2k-* | iq2000-* \
|
| ip2k-* | iq2000-* \
|
||||||
| k1om-* \
|
|
||||||
| le32-* | le64-* \
|
| le32-* | le64-* \
|
||||||
| lm32-* \
|
| lm32-* \
|
||||||
| m32c-* | m32r-* | m32rle-* \
|
| m32c-* | m32r-* | m32rle-* \
|
||||||
|
|
@ -407,10 +400,8 @@ case $basic_machine in
|
||||||
| mips64vr5900-* | mips64vr5900el-* \
|
| mips64vr5900-* | mips64vr5900el-* \
|
||||||
| mipsisa32-* | mipsisa32el-* \
|
| mipsisa32-* | mipsisa32el-* \
|
||||||
| mipsisa32r2-* | mipsisa32r2el-* \
|
| mipsisa32r2-* | mipsisa32r2el-* \
|
||||||
| mipsisa32r6-* | mipsisa32r6el-* \
|
|
||||||
| mipsisa64-* | mipsisa64el-* \
|
| mipsisa64-* | mipsisa64el-* \
|
||||||
| mipsisa64r2-* | mipsisa64r2el-* \
|
| mipsisa64r2-* | mipsisa64r2el-* \
|
||||||
| mipsisa64r6-* | mipsisa64r6el-* \
|
|
||||||
| mipsisa64sb1-* | mipsisa64sb1el-* \
|
| mipsisa64sb1-* | mipsisa64sb1el-* \
|
||||||
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
|
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
|
||||||
| mipsr5900-* | mipsr5900el-* \
|
| mipsr5900-* | mipsr5900el-* \
|
||||||
|
|
@ -422,19 +413,16 @@ case $basic_machine in
|
||||||
| nios-* | nios2-* | nios2eb-* | nios2el-* \
|
| nios-* | nios2-* | nios2eb-* | nios2el-* \
|
||||||
| none-* | np1-* | ns16k-* | ns32k-* \
|
| none-* | np1-* | ns16k-* | ns32k-* \
|
||||||
| open8-* \
|
| open8-* \
|
||||||
| or1k*-* \
|
|
||||||
| orion-* \
|
| orion-* \
|
||||||
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
|
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
|
||||||
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
|
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
|
||||||
| pru-* \
|
|
||||||
| pyramid-* \
|
| pyramid-* \
|
||||||
| riscv32-* | riscv64-* \
|
|
||||||
| rl78-* | romp-* | rs6000-* | rx-* \
|
| rl78-* | romp-* | rs6000-* | rx-* \
|
||||||
| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
|
| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
|
||||||
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
|
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
|
||||||
| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
|
| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
|
||||||
| sparclite-* \
|
| sparclite-* \
|
||||||
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \
|
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
|
||||||
| tahoe-* \
|
| tahoe-* \
|
||||||
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
|
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
|
||||||
| tile*-* \
|
| tile*-* \
|
||||||
|
|
@ -442,8 +430,6 @@ case $basic_machine in
|
||||||
| ubicom32-* \
|
| ubicom32-* \
|
||||||
| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
|
| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
|
||||||
| vax-* \
|
| vax-* \
|
||||||
| visium-* \
|
|
||||||
| wasm32-* \
|
|
||||||
| we32k-* \
|
| we32k-* \
|
||||||
| x86-* | x86_64-* | xc16x-* | xps100-* \
|
| x86-* | x86_64-* | xc16x-* | xps100-* \
|
||||||
| xstormy16-* | xtensa*-* \
|
| xstormy16-* | xtensa*-* \
|
||||||
|
|
@ -457,7 +443,7 @@ case $basic_machine in
|
||||||
# Recognize the various machine names and aliases which stand
|
# Recognize the various machine names and aliases which stand
|
||||||
# for a CPU type and a company and sometimes even an OS.
|
# for a CPU type and a company and sometimes even an OS.
|
||||||
386bsd)
|
386bsd)
|
||||||
basic_machine=i386-pc
|
basic_machine=i386-unknown
|
||||||
os=-bsd
|
os=-bsd
|
||||||
;;
|
;;
|
||||||
3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
|
3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
|
||||||
|
|
@ -491,7 +477,7 @@ case $basic_machine in
|
||||||
basic_machine=x86_64-pc
|
basic_machine=x86_64-pc
|
||||||
;;
|
;;
|
||||||
amd64-*)
|
amd64-*)
|
||||||
basic_machine=x86_64-`echo "$basic_machine" | sed 's/^[^-]*-//'`
|
basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||||
;;
|
;;
|
||||||
amdahl)
|
amdahl)
|
||||||
basic_machine=580-amdahl
|
basic_machine=580-amdahl
|
||||||
|
|
@ -520,9 +506,6 @@ case $basic_machine in
|
||||||
basic_machine=i386-pc
|
basic_machine=i386-pc
|
||||||
os=-aros
|
os=-aros
|
||||||
;;
|
;;
|
||||||
asmjs)
|
|
||||||
basic_machine=asmjs-unknown
|
|
||||||
;;
|
|
||||||
aux)
|
aux)
|
||||||
basic_machine=m68k-apple
|
basic_machine=m68k-apple
|
||||||
os=-aux
|
os=-aux
|
||||||
|
|
@ -536,7 +519,7 @@ case $basic_machine in
|
||||||
os=-linux
|
os=-linux
|
||||||
;;
|
;;
|
||||||
blackfin-*)
|
blackfin-*)
|
||||||
basic_machine=bfin-`echo "$basic_machine" | sed 's/^[^-]*-//'`
|
basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||||
os=-linux
|
os=-linux
|
||||||
;;
|
;;
|
||||||
bluegene*)
|
bluegene*)
|
||||||
|
|
@ -544,13 +527,13 @@ case $basic_machine in
|
||||||
os=-cnk
|
os=-cnk
|
||||||
;;
|
;;
|
||||||
c54x-*)
|
c54x-*)
|
||||||
basic_machine=tic54x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
|
basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||||
;;
|
;;
|
||||||
c55x-*)
|
c55x-*)
|
||||||
basic_machine=tic55x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
|
basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||||
;;
|
;;
|
||||||
c6x-*)
|
c6x-*)
|
||||||
basic_machine=tic6x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
|
basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||||
;;
|
;;
|
||||||
c90)
|
c90)
|
||||||
basic_machine=c90-cray
|
basic_machine=c90-cray
|
||||||
|
|
@ -639,18 +622,10 @@ case $basic_machine in
|
||||||
basic_machine=rs6000-bull
|
basic_machine=rs6000-bull
|
||||||
os=-bosx
|
os=-bosx
|
||||||
;;
|
;;
|
||||||
dpx2*)
|
dpx2* | dpx2*-bull)
|
||||||
basic_machine=m68k-bull
|
basic_machine=m68k-bull
|
||||||
os=-sysv3
|
os=-sysv3
|
||||||
;;
|
;;
|
||||||
e500v[12])
|
|
||||||
basic_machine=powerpc-unknown
|
|
||||||
os=$os"spe"
|
|
||||||
;;
|
|
||||||
e500v[12]-*)
|
|
||||||
basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'`
|
|
||||||
os=$os"spe"
|
|
||||||
;;
|
|
||||||
ebmon29k)
|
ebmon29k)
|
||||||
basic_machine=a29k-amd
|
basic_machine=a29k-amd
|
||||||
os=-ebmon
|
os=-ebmon
|
||||||
|
|
@ -740,6 +715,9 @@ case $basic_machine in
|
||||||
hp9k8[0-9][0-9] | hp8[0-9][0-9])
|
hp9k8[0-9][0-9] | hp8[0-9][0-9])
|
||||||
basic_machine=hppa1.0-hp
|
basic_machine=hppa1.0-hp
|
||||||
;;
|
;;
|
||||||
|
hppa-next)
|
||||||
|
os=-nextstep3
|
||||||
|
;;
|
||||||
hppaosf)
|
hppaosf)
|
||||||
basic_machine=hppa1.1-hp
|
basic_machine=hppa1.1-hp
|
||||||
os=-osf
|
os=-osf
|
||||||
|
|
@ -752,26 +730,26 @@ case $basic_machine in
|
||||||
basic_machine=i370-ibm
|
basic_machine=i370-ibm
|
||||||
;;
|
;;
|
||||||
i*86v32)
|
i*86v32)
|
||||||
basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
|
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
|
||||||
os=-sysv32
|
os=-sysv32
|
||||||
;;
|
;;
|
||||||
i*86v4*)
|
i*86v4*)
|
||||||
basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
|
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
|
||||||
os=-sysv4
|
os=-sysv4
|
||||||
;;
|
;;
|
||||||
i*86v)
|
i*86v)
|
||||||
basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
|
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
|
||||||
os=-sysv
|
os=-sysv
|
||||||
;;
|
;;
|
||||||
i*86sol2)
|
i*86sol2)
|
||||||
basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
|
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
|
||||||
os=-solaris2
|
os=-solaris2
|
||||||
;;
|
;;
|
||||||
i386mach)
|
i386mach)
|
||||||
basic_machine=i386-mach
|
basic_machine=i386-mach
|
||||||
os=-mach
|
os=-mach
|
||||||
;;
|
;;
|
||||||
vsta)
|
i386-vsta | vsta)
|
||||||
basic_machine=i386-unknown
|
basic_machine=i386-unknown
|
||||||
os=-vsta
|
os=-vsta
|
||||||
;;
|
;;
|
||||||
|
|
@ -789,17 +767,17 @@ case $basic_machine in
|
||||||
basic_machine=m68k-isi
|
basic_machine=m68k-isi
|
||||||
os=-sysv
|
os=-sysv
|
||||||
;;
|
;;
|
||||||
leon-*|leon[3-9]-*)
|
|
||||||
basic_machine=sparc-`echo "$basic_machine" | sed 's/-.*//'`
|
|
||||||
;;
|
|
||||||
m68knommu)
|
m68knommu)
|
||||||
basic_machine=m68k-unknown
|
basic_machine=m68k-unknown
|
||||||
os=-linux
|
os=-linux
|
||||||
;;
|
;;
|
||||||
m68knommu-*)
|
m68knommu-*)
|
||||||
basic_machine=m68k-`echo "$basic_machine" | sed 's/^[^-]*-//'`
|
basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||||
os=-linux
|
os=-linux
|
||||||
;;
|
;;
|
||||||
|
m88k-omron*)
|
||||||
|
basic_machine=m88k-omron
|
||||||
|
;;
|
||||||
magnum | m3230)
|
magnum | m3230)
|
||||||
basic_machine=mips-mips
|
basic_machine=mips-mips
|
||||||
os=-sysv
|
os=-sysv
|
||||||
|
|
@ -831,10 +809,10 @@ case $basic_machine in
|
||||||
os=-mint
|
os=-mint
|
||||||
;;
|
;;
|
||||||
mips3*-*)
|
mips3*-*)
|
||||||
basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`
|
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
|
||||||
;;
|
;;
|
||||||
mips3*)
|
mips3*)
|
||||||
basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`-unknown
|
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
|
||||||
;;
|
;;
|
||||||
monitor)
|
monitor)
|
||||||
basic_machine=m68k-rom68k
|
basic_machine=m68k-rom68k
|
||||||
|
|
@ -844,16 +822,12 @@ case $basic_machine in
|
||||||
basic_machine=powerpc-unknown
|
basic_machine=powerpc-unknown
|
||||||
os=-morphos
|
os=-morphos
|
||||||
;;
|
;;
|
||||||
moxiebox)
|
|
||||||
basic_machine=moxie-unknown
|
|
||||||
os=-moxiebox
|
|
||||||
;;
|
|
||||||
msdos)
|
msdos)
|
||||||
basic_machine=i386-pc
|
basic_machine=i386-pc
|
||||||
os=-msdos
|
os=-msdos
|
||||||
;;
|
;;
|
||||||
ms1-*)
|
ms1-*)
|
||||||
basic_machine=`echo "$basic_machine" | sed -e 's/ms1-/mt-/'`
|
basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
|
||||||
;;
|
;;
|
||||||
msys)
|
msys)
|
||||||
basic_machine=i686-pc
|
basic_machine=i686-pc
|
||||||
|
|
@ -895,7 +869,7 @@ case $basic_machine in
|
||||||
basic_machine=v70-nec
|
basic_machine=v70-nec
|
||||||
os=-sysv
|
os=-sysv
|
||||||
;;
|
;;
|
||||||
next | m*-next)
|
next | m*-next )
|
||||||
basic_machine=m68k-next
|
basic_machine=m68k-next
|
||||||
case $os in
|
case $os in
|
||||||
-nextstep* )
|
-nextstep* )
|
||||||
|
|
@ -940,12 +914,6 @@ case $basic_machine in
|
||||||
nsr-tandem)
|
nsr-tandem)
|
||||||
basic_machine=nsr-tandem
|
basic_machine=nsr-tandem
|
||||||
;;
|
;;
|
||||||
nsv-tandem)
|
|
||||||
basic_machine=nsv-tandem
|
|
||||||
;;
|
|
||||||
nsx-tandem)
|
|
||||||
basic_machine=nsx-tandem
|
|
||||||
;;
|
|
||||||
op50n-* | op60c-*)
|
op50n-* | op60c-*)
|
||||||
basic_machine=hppa1.1-oki
|
basic_machine=hppa1.1-oki
|
||||||
os=-proelf
|
os=-proelf
|
||||||
|
|
@ -978,7 +946,7 @@ case $basic_machine in
|
||||||
os=-linux
|
os=-linux
|
||||||
;;
|
;;
|
||||||
parisc-*)
|
parisc-*)
|
||||||
basic_machine=hppa-`echo "$basic_machine" | sed 's/^[^-]*-//'`
|
basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||||
os=-linux
|
os=-linux
|
||||||
;;
|
;;
|
||||||
pbd)
|
pbd)
|
||||||
|
|
@ -994,7 +962,7 @@ case $basic_machine in
|
||||||
basic_machine=i386-pc
|
basic_machine=i386-pc
|
||||||
;;
|
;;
|
||||||
pc98-*)
|
pc98-*)
|
||||||
basic_machine=i386-`echo "$basic_machine" | sed 's/^[^-]*-//'`
|
basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||||
;;
|
;;
|
||||||
pentium | p5 | k5 | k6 | nexgen | viac3)
|
pentium | p5 | k5 | k6 | nexgen | viac3)
|
||||||
basic_machine=i586-pc
|
basic_machine=i586-pc
|
||||||
|
|
@ -1009,16 +977,16 @@ case $basic_machine in
|
||||||
basic_machine=i786-pc
|
basic_machine=i786-pc
|
||||||
;;
|
;;
|
||||||
pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
|
pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
|
||||||
basic_machine=i586-`echo "$basic_machine" | sed 's/^[^-]*-//'`
|
basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||||
;;
|
;;
|
||||||
pentiumpro-* | p6-* | 6x86-* | athlon-*)
|
pentiumpro-* | p6-* | 6x86-* | athlon-*)
|
||||||
basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'`
|
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||||
;;
|
;;
|
||||||
pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
|
pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
|
||||||
basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'`
|
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||||
;;
|
;;
|
||||||
pentium4-*)
|
pentium4-*)
|
||||||
basic_machine=i786-`echo "$basic_machine" | sed 's/^[^-]*-//'`
|
basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||||
;;
|
;;
|
||||||
pn)
|
pn)
|
||||||
basic_machine=pn-gould
|
basic_machine=pn-gould
|
||||||
|
|
@ -1028,23 +996,23 @@ case $basic_machine in
|
||||||
ppc | ppcbe) basic_machine=powerpc-unknown
|
ppc | ppcbe) basic_machine=powerpc-unknown
|
||||||
;;
|
;;
|
||||||
ppc-* | ppcbe-*)
|
ppc-* | ppcbe-*)
|
||||||
basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'`
|
basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||||
;;
|
;;
|
||||||
ppcle | powerpclittle)
|
ppcle | powerpclittle | ppc-le | powerpc-little)
|
||||||
basic_machine=powerpcle-unknown
|
basic_machine=powerpcle-unknown
|
||||||
;;
|
;;
|
||||||
ppcle-* | powerpclittle-*)
|
ppcle-* | powerpclittle-*)
|
||||||
basic_machine=powerpcle-`echo "$basic_machine" | sed 's/^[^-]*-//'`
|
basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||||
;;
|
;;
|
||||||
ppc64) basic_machine=powerpc64-unknown
|
ppc64) basic_machine=powerpc64-unknown
|
||||||
;;
|
;;
|
||||||
ppc64-*) basic_machine=powerpc64-`echo "$basic_machine" | sed 's/^[^-]*-//'`
|
ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||||
;;
|
;;
|
||||||
ppc64le | powerpc64little)
|
ppc64le | powerpc64little | ppc64-le | powerpc64-little)
|
||||||
basic_machine=powerpc64le-unknown
|
basic_machine=powerpc64le-unknown
|
||||||
;;
|
;;
|
||||||
ppc64le-* | powerpc64little-*)
|
ppc64le-* | powerpc64little-*)
|
||||||
basic_machine=powerpc64le-`echo "$basic_machine" | sed 's/^[^-]*-//'`
|
basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||||
;;
|
;;
|
||||||
ps2)
|
ps2)
|
||||||
basic_machine=i386-ibm
|
basic_machine=i386-ibm
|
||||||
|
|
@ -1098,10 +1066,17 @@ case $basic_machine in
|
||||||
sequent)
|
sequent)
|
||||||
basic_machine=i386-sequent
|
basic_machine=i386-sequent
|
||||||
;;
|
;;
|
||||||
|
sh)
|
||||||
|
basic_machine=sh-hitachi
|
||||||
|
os=-hms
|
||||||
|
;;
|
||||||
sh5el)
|
sh5el)
|
||||||
basic_machine=sh5le-unknown
|
basic_machine=sh5le-unknown
|
||||||
;;
|
;;
|
||||||
simso-wrs)
|
sh64)
|
||||||
|
basic_machine=sh64-unknown
|
||||||
|
;;
|
||||||
|
sparclite-wrs | simso-wrs)
|
||||||
basic_machine=sparclite-wrs
|
basic_machine=sparclite-wrs
|
||||||
os=-vxworks
|
os=-vxworks
|
||||||
;;
|
;;
|
||||||
|
|
@ -1120,7 +1095,7 @@ case $basic_machine in
|
||||||
os=-sysv4
|
os=-sysv4
|
||||||
;;
|
;;
|
||||||
strongarm-* | thumb-*)
|
strongarm-* | thumb-*)
|
||||||
basic_machine=arm-`echo "$basic_machine" | sed 's/^[^-]*-//'`
|
basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||||
;;
|
;;
|
||||||
sun2)
|
sun2)
|
||||||
basic_machine=m68000-sun
|
basic_machine=m68000-sun
|
||||||
|
|
@ -1242,9 +1217,6 @@ case $basic_machine in
|
||||||
basic_machine=hppa1.1-winbond
|
basic_machine=hppa1.1-winbond
|
||||||
os=-proelf
|
os=-proelf
|
||||||
;;
|
;;
|
||||||
x64)
|
|
||||||
basic_machine=x86_64-pc
|
|
||||||
;;
|
|
||||||
xbox)
|
xbox)
|
||||||
basic_machine=i686-pc
|
basic_machine=i686-pc
|
||||||
os=-mingw32
|
os=-mingw32
|
||||||
|
|
@ -1253,12 +1225,20 @@ case $basic_machine in
|
||||||
basic_machine=xps100-honeywell
|
basic_machine=xps100-honeywell
|
||||||
;;
|
;;
|
||||||
xscale-* | xscalee[bl]-*)
|
xscale-* | xscalee[bl]-*)
|
||||||
basic_machine=`echo "$basic_machine" | sed 's/^xscale/arm/'`
|
basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
|
||||||
;;
|
;;
|
||||||
ymp)
|
ymp)
|
||||||
basic_machine=ymp-cray
|
basic_machine=ymp-cray
|
||||||
os=-unicos
|
os=-unicos
|
||||||
;;
|
;;
|
||||||
|
z8k-*-coff)
|
||||||
|
basic_machine=z8k-unknown
|
||||||
|
os=-sim
|
||||||
|
;;
|
||||||
|
z80-*-coff)
|
||||||
|
basic_machine=z80-unknown
|
||||||
|
os=-sim
|
||||||
|
;;
|
||||||
none)
|
none)
|
||||||
basic_machine=none-none
|
basic_machine=none-none
|
||||||
os=-none
|
os=-none
|
||||||
|
|
@ -1287,6 +1267,10 @@ case $basic_machine in
|
||||||
vax)
|
vax)
|
||||||
basic_machine=vax-dec
|
basic_machine=vax-dec
|
||||||
;;
|
;;
|
||||||
|
pdp10)
|
||||||
|
# there are many clones, so DEC is not a safe bet
|
||||||
|
basic_machine=pdp10-unknown
|
||||||
|
;;
|
||||||
pdp11)
|
pdp11)
|
||||||
basic_machine=pdp11-dec
|
basic_machine=pdp11-dec
|
||||||
;;
|
;;
|
||||||
|
|
@ -1296,6 +1280,9 @@ case $basic_machine in
|
||||||
sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
|
sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
|
||||||
basic_machine=sh-unknown
|
basic_machine=sh-unknown
|
||||||
;;
|
;;
|
||||||
|
sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
|
||||||
|
basic_machine=sparc-sun
|
||||||
|
;;
|
||||||
cydra)
|
cydra)
|
||||||
basic_machine=cydra-cydrome
|
basic_machine=cydra-cydrome
|
||||||
;;
|
;;
|
||||||
|
|
@ -1315,7 +1302,7 @@ case $basic_machine in
|
||||||
# Make sure to match an already-canonicalized machine name.
|
# Make sure to match an already-canonicalized machine name.
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2
|
echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
@ -1323,10 +1310,10 @@ esac
|
||||||
# Here we canonicalize certain aliases for manufacturers.
|
# Here we canonicalize certain aliases for manufacturers.
|
||||||
case $basic_machine in
|
case $basic_machine in
|
||||||
*-digital*)
|
*-digital*)
|
||||||
basic_machine=`echo "$basic_machine" | sed 's/digital.*/dec/'`
|
basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
|
||||||
;;
|
;;
|
||||||
*-commodore*)
|
*-commodore*)
|
||||||
basic_machine=`echo "$basic_machine" | sed 's/commodore.*/cbm/'`
|
basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
;;
|
;;
|
||||||
|
|
@ -1337,8 +1324,8 @@ esac
|
||||||
if [ x"$os" != x"" ]
|
if [ x"$os" != x"" ]
|
||||||
then
|
then
|
||||||
case $os in
|
case $os in
|
||||||
# First match some system type aliases that might get confused
|
# First match some system type aliases
|
||||||
# with valid system types.
|
# that might get confused with valid system types.
|
||||||
# -solaris* is a basic system type, with this one exception.
|
# -solaris* is a basic system type, with this one exception.
|
||||||
-auroraux)
|
-auroraux)
|
||||||
os=-auroraux
|
os=-auroraux
|
||||||
|
|
@ -1349,48 +1336,45 @@ case $os in
|
||||||
-solaris)
|
-solaris)
|
||||||
os=-solaris2
|
os=-solaris2
|
||||||
;;
|
;;
|
||||||
|
-svr4*)
|
||||||
|
os=-sysv4
|
||||||
|
;;
|
||||||
-unixware*)
|
-unixware*)
|
||||||
os=-sysv4.2uw
|
os=-sysv4.2uw
|
||||||
;;
|
;;
|
||||||
-gnu/linux*)
|
-gnu/linux*)
|
||||||
os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
|
os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
|
||||||
;;
|
;;
|
||||||
# es1800 is here to avoid being matched by es* (a different OS)
|
# First accept the basic system types.
|
||||||
-es1800*)
|
|
||||||
os=-ose
|
|
||||||
;;
|
|
||||||
# Now accept the basic system types.
|
|
||||||
# The portable systems comes first.
|
# The portable systems comes first.
|
||||||
# Each alternative MUST end in a * to match a version number.
|
# Each alternative MUST END IN A *, to match a version number.
|
||||||
# -sysv* is not here because it comes later, after sysvr4.
|
# -sysv* is not here because it comes later, after sysvr4.
|
||||||
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
|
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
|
||||||
| -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
|
| -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
|
||||||
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
|
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
|
||||||
| -sym* | -kopensolaris* | -plan9* \
|
| -sym* | -kopensolaris* | -plan9* \
|
||||||
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
|
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
|
||||||
| -aos* | -aros* | -cloudabi* | -sortix* \
|
| -aos* | -aros* \
|
||||||
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
|
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
|
||||||
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
|
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
|
||||||
| -hiux* | -knetbsd* | -mirbsd* | -netbsd* \
|
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
|
||||||
| -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \
|
| -bitrig* | -openbsd* | -solidbsd* \
|
||||||
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
|
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
|
||||||
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
|
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
|
||||||
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
|
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
|
||||||
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
|
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
|
||||||
| -chorusos* | -chorusrdb* | -cegcc* | -glidix* \
|
| -chorusos* | -chorusrdb* | -cegcc* \
|
||||||
| -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
|
| -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
|
||||||
| -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
|
| -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
|
||||||
| -linux-newlib* | -linux-musl* | -linux-uclibc* \
|
| -linux-newlib* | -linux-musl* | -linux-uclibc* \
|
||||||
| -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
|
| -uxpv* | -beos* | -mpeix* | -udk* \
|
||||||
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* \
|
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
|
||||||
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
|
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
|
||||||
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
|
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
|
||||||
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
|
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
|
||||||
| -morphos* | -superux* | -rtmk* | -windiss* \
|
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
|
||||||
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
|
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
|
||||||
| -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
|
| -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
|
||||||
| -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox* | -bme* \
|
|
||||||
| -midnightbsd*)
|
|
||||||
# Remember, each alternative MUST END IN *, to match a version number.
|
# Remember, each alternative MUST END IN *, to match a version number.
|
||||||
;;
|
;;
|
||||||
-qnx*)
|
-qnx*)
|
||||||
|
|
@ -1407,12 +1391,12 @@ case $os in
|
||||||
-nto*)
|
-nto*)
|
||||||
os=`echo $os | sed -e 's|nto|nto-qnx|'`
|
os=`echo $os | sed -e 's|nto|nto-qnx|'`
|
||||||
;;
|
;;
|
||||||
-sim | -xray | -os68k* | -v88r* \
|
-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
|
||||||
| -windows* | -osx | -abug | -netware* | -os9* \
|
| -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
|
||||||
| -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
|
| -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
|
||||||
;;
|
;;
|
||||||
-mac*)
|
-mac*)
|
||||||
os=`echo "$os" | sed -e 's|mac|macos|'`
|
os=`echo $os | sed -e 's|mac|macos|'`
|
||||||
;;
|
;;
|
||||||
-linux-dietlibc)
|
-linux-dietlibc)
|
||||||
os=-linux-dietlibc
|
os=-linux-dietlibc
|
||||||
|
|
@ -1421,10 +1405,10 @@ case $os in
|
||||||
os=`echo $os | sed -e 's|linux|linux-gnu|'`
|
os=`echo $os | sed -e 's|linux|linux-gnu|'`
|
||||||
;;
|
;;
|
||||||
-sunos5*)
|
-sunos5*)
|
||||||
os=`echo "$os" | sed -e 's|sunos5|solaris2|'`
|
os=`echo $os | sed -e 's|sunos5|solaris2|'`
|
||||||
;;
|
;;
|
||||||
-sunos6*)
|
-sunos6*)
|
||||||
os=`echo "$os" | sed -e 's|sunos6|solaris3|'`
|
os=`echo $os | sed -e 's|sunos6|solaris3|'`
|
||||||
;;
|
;;
|
||||||
-opened*)
|
-opened*)
|
||||||
os=-openedition
|
os=-openedition
|
||||||
|
|
@ -1435,6 +1419,12 @@ case $os in
|
||||||
-wince*)
|
-wince*)
|
||||||
os=-wince
|
os=-wince
|
||||||
;;
|
;;
|
||||||
|
-osfrose*)
|
||||||
|
os=-osfrose
|
||||||
|
;;
|
||||||
|
-osf*)
|
||||||
|
os=-osf
|
||||||
|
;;
|
||||||
-utek*)
|
-utek*)
|
||||||
os=-bsd
|
os=-bsd
|
||||||
;;
|
;;
|
||||||
|
|
@ -1459,7 +1449,7 @@ case $os in
|
||||||
-nova*)
|
-nova*)
|
||||||
os=-rtmk-nova
|
os=-rtmk-nova
|
||||||
;;
|
;;
|
||||||
-ns2)
|
-ns2 )
|
||||||
os=-nextstep2
|
os=-nextstep2
|
||||||
;;
|
;;
|
||||||
-nsk*)
|
-nsk*)
|
||||||
|
|
@ -1481,7 +1471,7 @@ case $os in
|
||||||
-oss*)
|
-oss*)
|
||||||
os=-sysv3
|
os=-sysv3
|
||||||
;;
|
;;
|
||||||
-svr4*)
|
-svr4)
|
||||||
os=-sysv4
|
os=-sysv4
|
||||||
;;
|
;;
|
||||||
-svr3)
|
-svr3)
|
||||||
|
|
@ -1496,38 +1486,32 @@ case $os in
|
||||||
-ose*)
|
-ose*)
|
||||||
os=-ose
|
os=-ose
|
||||||
;;
|
;;
|
||||||
|
-es1800*)
|
||||||
|
os=-ose
|
||||||
|
;;
|
||||||
|
-xenix)
|
||||||
|
os=-xenix
|
||||||
|
;;
|
||||||
-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
|
-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
|
||||||
os=-mint
|
os=-mint
|
||||||
;;
|
;;
|
||||||
|
-aros*)
|
||||||
|
os=-aros
|
||||||
|
;;
|
||||||
-zvmoe)
|
-zvmoe)
|
||||||
os=-zvmoe
|
os=-zvmoe
|
||||||
;;
|
;;
|
||||||
-dicos*)
|
-dicos*)
|
||||||
os=-dicos
|
os=-dicos
|
||||||
;;
|
;;
|
||||||
-pikeos*)
|
|
||||||
# Until real need of OS specific support for
|
|
||||||
# particular features comes up, bare metal
|
|
||||||
# configurations are quite functional.
|
|
||||||
case $basic_machine in
|
|
||||||
arm*)
|
|
||||||
os=-eabi
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
os=-elf
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
-nacl*)
|
-nacl*)
|
||||||
;;
|
;;
|
||||||
-ios)
|
|
||||||
;;
|
|
||||||
-none)
|
-none)
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
# Get rid of the `-' at the beginning of $os.
|
# Get rid of the `-' at the beginning of $os.
|
||||||
os=`echo $os | sed 's/[^-]*-//'`
|
os=`echo $os | sed 's/[^-]*-//'`
|
||||||
echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2
|
echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
@ -1608,6 +1592,9 @@ case $basic_machine in
|
||||||
mips*-*)
|
mips*-*)
|
||||||
os=-elf
|
os=-elf
|
||||||
;;
|
;;
|
||||||
|
or1k-*)
|
||||||
|
os=-elf
|
||||||
|
;;
|
||||||
or32-*)
|
or32-*)
|
||||||
os=-coff
|
os=-coff
|
||||||
;;
|
;;
|
||||||
|
|
@ -1617,12 +1604,12 @@ case $basic_machine in
|
||||||
sparc-* | *-sun)
|
sparc-* | *-sun)
|
||||||
os=-sunos4.1.1
|
os=-sunos4.1.1
|
||||||
;;
|
;;
|
||||||
pru-*)
|
|
||||||
os=-elf
|
|
||||||
;;
|
|
||||||
*-be)
|
*-be)
|
||||||
os=-beos
|
os=-beos
|
||||||
;;
|
;;
|
||||||
|
*-haiku)
|
||||||
|
os=-haiku
|
||||||
|
;;
|
||||||
*-ibm)
|
*-ibm)
|
||||||
os=-aix
|
os=-aix
|
||||||
;;
|
;;
|
||||||
|
|
@ -1662,7 +1649,7 @@ case $basic_machine in
|
||||||
m88k-omron*)
|
m88k-omron*)
|
||||||
os=-luna
|
os=-luna
|
||||||
;;
|
;;
|
||||||
*-next)
|
*-next )
|
||||||
os=-nextstep
|
os=-nextstep
|
||||||
;;
|
;;
|
||||||
*-sequent)
|
*-sequent)
|
||||||
|
|
@ -1677,6 +1664,9 @@ case $basic_machine in
|
||||||
i370-*)
|
i370-*)
|
||||||
os=-mvs
|
os=-mvs
|
||||||
;;
|
;;
|
||||||
|
*-next)
|
||||||
|
os=-nextstep3
|
||||||
|
;;
|
||||||
*-gould)
|
*-gould)
|
||||||
os=-sysv
|
os=-sysv
|
||||||
;;
|
;;
|
||||||
|
|
@ -1786,15 +1776,15 @@ case $basic_machine in
|
||||||
vendor=stratus
|
vendor=stratus
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
basic_machine=`echo "$basic_machine" | sed "s/unknown/$vendor/"`
|
basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
echo "$basic_machine$os"
|
echo $basic_machine$os
|
||||||
exit
|
exit
|
||||||
|
|
||||||
# Local variables:
|
# Local variables:
|
||||||
# eval: (add-hook 'write-file-functions 'time-stamp)
|
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||||
# time-stamp-start: "timestamp='"
|
# time-stamp-start: "timestamp='"
|
||||||
# time-stamp-format: "%:y-%02m-%02d"
|
# time-stamp-format: "%:y-%02m-%02d"
|
||||||
# time-stamp-end: "'"
|
# time-stamp-end: "'"
|
||||||
|
|
|
||||||
110
configure.ac
110
configure.ac
|
|
@ -1,12 +1,11 @@
|
||||||
dnl Process this file with autoconf to produce a configure script.
|
dnl Process this file with autoconf to produce a configure script.
|
||||||
|
|
||||||
AC_PREREQ(2.61)
|
AC_PREREQ(2.61)
|
||||||
AC_INIT([tinc], [1.0.36])
|
AC_INIT([tinc], [1.1pre8])
|
||||||
AC_CONFIG_SRCDIR([src/tincd.c])
|
AC_CONFIG_SRCDIR([src/tincd.c])
|
||||||
AM_INIT_AUTOMAKE([1.11 check-news std-options subdir-objects nostdinc silent-rules -Wall])
|
AC_GNU_SOURCE
|
||||||
|
AM_INIT_AUTOMAKE([check-news std-options subdir-objects -Wall])
|
||||||
AC_CONFIG_HEADERS([config.h])
|
AC_CONFIG_HEADERS([config.h])
|
||||||
AC_CONFIG_MACRO_DIR([m4])
|
|
||||||
AM_SILENT_RULES([yes])
|
|
||||||
|
|
||||||
# Enable GNU extensions.
|
# Enable GNU extensions.
|
||||||
# Define this here, not in acconfig's @TOP@ section, since definitions
|
# Define this here, not in acconfig's @TOP@ section, since definitions
|
||||||
|
|
@ -18,6 +17,8 @@ dnl Checks for programs.
|
||||||
AC_PROG_CC_C99
|
AC_PROG_CC_C99
|
||||||
AC_PROG_CPP
|
AC_PROG_CPP
|
||||||
AC_PROG_INSTALL
|
AC_PROG_INSTALL
|
||||||
|
AC_PROG_LN_S
|
||||||
|
AC_PROG_RANLIB
|
||||||
|
|
||||||
AM_PROG_CC_C_O
|
AM_PROG_CC_C_O
|
||||||
|
|
||||||
|
|
@ -108,23 +109,12 @@ AC_ARG_ENABLE(tunemu,
|
||||||
)
|
)
|
||||||
|
|
||||||
AC_ARG_WITH(windows2000,
|
AC_ARG_WITH(windows2000,
|
||||||
AS_HELP_STRING([--with-windows2000], [compile with support for Windows 2000. This disables support for tunneling over existing IPv6 networks.]),
|
AS_HELP_STRING([--without-windows2000], [compile with support for Windows 2000. This disables support for tunneling over existing IPv6 networks.]),
|
||||||
[ AS_IF([test "x$with_windows2000" = "xyes"],
|
[ AS_IF([test "x$with_windows2000" = "xyes"],
|
||||||
[AC_DEFINE(WITH_WINDOWS2000, 1, [Compile with support for Windows 2000])])
|
[AC_DEFINE(WITH_WINDOWS2000, 1, [Compile with support for Windows 2000])])
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
AC_ARG_WITH(systemd,
|
|
||||||
AS_HELP_STRING([--with-systemd@<:@=DIR@:>@], [install systemd service files @<:@to DIR if specified@:>@]),
|
|
||||||
[ systemd=true; systemd_path="$with_systemd" ],
|
|
||||||
[ systemd=false ]
|
|
||||||
)
|
|
||||||
|
|
||||||
AS_IF([test "x$with_systemd" = "xyes"], [systemd_path="\${libdir}/systemd/system"],
|
|
||||||
[AS_IF([test "x$with_systemd" = "xno"], [systemd=false])])
|
|
||||||
|
|
||||||
AC_SUBST(systemd_path, $systemd_path)
|
|
||||||
|
|
||||||
AM_CONDITIONAL(LINUX, test "$linux" = true)
|
AM_CONDITIONAL(LINUX, test "$linux" = true)
|
||||||
AM_CONDITIONAL(BSD, test "$bsd" = true)
|
AM_CONDITIONAL(BSD, test "$bsd" = true)
|
||||||
AM_CONDITIONAL(SOLARIS, test "$solaris" = true)
|
AM_CONDITIONAL(SOLARIS, test "$solaris" = true)
|
||||||
|
|
@ -133,7 +123,6 @@ AM_CONDITIONAL(CYGWIN, test "$cygwin" = true)
|
||||||
AM_CONDITIONAL(UML, test "$uml" = true)
|
AM_CONDITIONAL(UML, test "$uml" = true)
|
||||||
AM_CONDITIONAL(VDE, test "$vde" = true)
|
AM_CONDITIONAL(VDE, test "$vde" = true)
|
||||||
AM_CONDITIONAL(TUNEMU, test "$tunemu" = true)
|
AM_CONDITIONAL(TUNEMU, test "$tunemu" = true)
|
||||||
AM_CONDITIONAL(WITH_SYSTEMD, test "$systemd" = true)
|
|
||||||
|
|
||||||
AC_CACHE_SAVE
|
AC_CACHE_SAVE
|
||||||
|
|
||||||
|
|
@ -144,65 +133,42 @@ if test -d /sw/lib ; then
|
||||||
LIBS="$LIBS -L/sw/lib"
|
LIBS="$LIBS -L/sw/lib"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dnl Compiler hardening flags
|
|
||||||
dnl No -fstack-protector-all because it doesn't work on all platforms or architectures.
|
|
||||||
|
|
||||||
AX_CFLAGS_WARN_ALL(CFLAGS)
|
|
||||||
|
|
||||||
AC_ARG_ENABLE([hardening], AS_HELP_STRING([--disable-hardening], [disable compiler and linker hardening flags]))
|
|
||||||
AS_IF([test "x$enable_hardening" != "xno"],
|
|
||||||
[AX_CHECK_COMPILE_FLAG([-DFORTIFY_SOURCE=2], [CPPFLAGS="$CPPFLAGS -DFORTIFY_SOURCE=2"])
|
|
||||||
AX_CHECK_COMPILE_FLAG([-fwrapv], [CPPFLAGS="$CPPFLAGS -fwrapv"],
|
|
||||||
AX_CHECK_COMPILE_FLAG([-fno-strict-overflow], [CPPFLAGS="$CPPFLAGS -fno-strict-overflow"]))
|
|
||||||
case $host_os in
|
|
||||||
*mingw*)
|
|
||||||
AX_CHECK_LINK_FLAG([-Wl,--dynamicbase], [LDFLAGS="$LDFLAGS -Wl,--dynamicbase"])
|
|
||||||
AX_CHECK_LINK_FLAG([-Wl,--nxcompat], [LDFLAGS="$LDFLAGS -Wl,--nxcompat"])
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
AX_CHECK_COMPILE_FLAG([-fPIE], [CPPFLAGS="$CPPFLAGS -fPIE"])
|
|
||||||
AX_CHECK_LINK_FLAG([-pie], [LDFLAGS="$LDFLAGS -pie"])
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
AX_CHECK_LINK_FLAG([-Wl,-z,relro], [LDFLAGS="$LDFLAGS -Wl,-z,relro"])
|
|
||||||
AX_CHECK_LINK_FLAG([-Wl,-z,now], [LDFLAGS="$LDFLAGS -Wl,-z,now"])
|
|
||||||
]
|
|
||||||
);
|
|
||||||
|
|
||||||
dnl Checks for libraries.
|
|
||||||
|
|
||||||
dnl Checks for header files.
|
dnl Checks for header files.
|
||||||
dnl We do this in multiple stages, because unlike Linux all the other operating systems really suck and don't include their own dependencies.
|
dnl We do this in multiple stages, because unlike Linux all the other operating systems really suck and don't include their own dependencies.
|
||||||
|
|
||||||
AC_CHECK_HEADERS([syslog.h sys/file.h sys/ioctl.h sys/mman.h sys/param.h sys/resource.h sys/socket.h sys/time.h sys/uio.h sys/wait.h netdb.h arpa/inet.h arpa/nameser.h dirent.h getopt.h])
|
AC_HEADER_STDC
|
||||||
AC_CHECK_HEADERS([net/if.h net/if_types.h linux/if_tun.h net/if_tun.h net/if_utun.h net/tun/if_tun.h net/if_tap.h net/tap/if_tap.h net/ethernet.h net/if_arp.h netinet/in_systm.h netinet/in.h netinet/in6.h netpacket/packet.h],
|
AC_CHECK_HEADERS([stdbool.h syslog.h sys/file.h sys/ioctl.h sys/mman.h sys/param.h sys/resource.h sys/socket.h sys/time.h sys/uio.h sys/un.h sys/wait.h netdb.h arpa/inet.h dirent.h])
|
||||||
[], [], [#include "$srcdir/src/have.h"]
|
AC_CHECK_HEADERS([net/if.h net/if_types.h linux/if_tun.h net/if_tun.h net/tun/if_tun.h net/if_tap.h net/tap/if_tap.h net/ethernet.h net/if_arp.h netinet/in_systm.h netinet/in.h netinet/in6.h time.h netpacket/packet.h],
|
||||||
|
[], [], [#include "src/have.h"]
|
||||||
)
|
)
|
||||||
AC_CHECK_HEADERS([netinet/if_ether.h netinet/ip.h netinet/ip6.h resolv.h],
|
AC_CHECK_HEADERS([netinet/if_ether.h netinet/ip.h netinet/ip6.h],
|
||||||
[], [], [#include "$srcdir/src/have.h"]
|
[], [], [#include "src/have.h"]
|
||||||
)
|
)
|
||||||
AC_CHECK_HEADERS([netinet/tcp.h netinet/ip_icmp.h netinet/icmp6.h],
|
AC_CHECK_HEADERS([netinet/tcp.h netinet/ip_icmp.h netinet/icmp6.h],
|
||||||
[], [], [#include "$srcdir/src/have.h"]
|
[], [], [#include "src/have.h"]
|
||||||
)
|
)
|
||||||
|
|
||||||
dnl Checks for typedefs, structures, and compiler characteristics.
|
dnl Checks for typedefs, structures, and compiler characteristics.
|
||||||
|
AC_C_CONST
|
||||||
|
AC_C_VOLATILE
|
||||||
AC_TYPE_PID_T
|
AC_TYPE_PID_T
|
||||||
|
AC_TYPE_SIZE_T
|
||||||
|
AC_HEADER_TIME
|
||||||
|
AC_STRUCT_TM
|
||||||
|
|
||||||
tinc_ATTRIBUTE(__malloc__)
|
tinc_ATTRIBUTE(__malloc__)
|
||||||
|
tinc_ATTRIBUTE(__warn_unused_result__)
|
||||||
|
|
||||||
AC_CHECK_TYPES([socklen_t, struct ether_header, struct arphdr, struct ether_arp, struct in_addr, struct addrinfo, struct ip, struct icmp, struct in6_addr, struct sockaddr_in6, struct ip6_hdr, struct icmp6_hdr, struct nd_neighbor_solicit, struct nd_opt_hdr], , ,
|
AC_CHECK_TYPES([socklen_t, struct ether_header, struct arphdr, struct ether_arp, struct in_addr, struct addrinfo, struct ip, struct icmp, struct in6_addr, struct sockaddr_in6, struct ip6_hdr, struct icmp6_hdr, struct nd_neighbor_solicit, struct nd_opt_hdr], , ,
|
||||||
[#include "$srcdir/src/have.h"]
|
[#include "src/have.h"]
|
||||||
)
|
)
|
||||||
|
|
||||||
dnl Checks for library functions.
|
dnl Checks for library functions.
|
||||||
AC_TYPE_SIGNAL
|
AC_TYPE_SIGNAL
|
||||||
AC_CHECK_FUNCS([asprintf daemon fchmod flock fork gettimeofday mlockall pselect putenv strsignal system unsetenv usleep vsyslog devname fdevname],
|
AC_CHECK_FUNCS([asprintf daemon fchmod flock ftime fork get_current_dir_name gettimeofday mlockall putenv random select strdup strerror strsignal strtol system time usleep unsetenv vsyslog writev],
|
||||||
[], [], [#include "$srcdir/src/have.h"]
|
[], [], [#include "src/have.h"]
|
||||||
)
|
)
|
||||||
|
|
||||||
AC_CHECK_FUNC(getopt_long, [getopt=true; AC_DEFINE(HAVE_GETOPT_LONG, 1, [getopt_long()])], [getopt=false])
|
|
||||||
AM_CONDITIONAL(GETOPT, test "$getopt" = true)
|
|
||||||
|
|
||||||
dnl Support for SunOS
|
dnl Support for SunOS
|
||||||
|
|
||||||
AC_CHECK_FUNC(socket, [], [
|
AC_CHECK_FUNC(socket, [], [
|
||||||
|
|
@ -213,35 +179,39 @@ AC_CHECK_FUNC(gethostbyname, [], [
|
||||||
])
|
])
|
||||||
|
|
||||||
AC_CHECK_DECLS([freeaddrinfo, gai_strerror, getaddrinfo, getnameinfo],
|
AC_CHECK_DECLS([freeaddrinfo, gai_strerror, getaddrinfo, getnameinfo],
|
||||||
[], [], [#include "$srcdir/src/have.h"]
|
[], [], [#include "src/have.h"]
|
||||||
)
|
)
|
||||||
|
|
||||||
AC_CHECK_DECLS([res_init], [AC_CHECK_LIB(resolv, res_init)], [], [
|
|
||||||
#include <netinet/in.h>
|
|
||||||
#include <resolv.h>
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_CACHE_SAVE
|
AC_CACHE_SAVE
|
||||||
|
|
||||||
dnl These are defined in files in m4/
|
dnl These are defined in files in m4/
|
||||||
|
|
||||||
|
dnl AC_ARG_WITH(libgcrypt, AC_HELP_STRING([--with-libgcrypt], [enable use of libgcrypt instead of OpenSSL])], [])
|
||||||
|
|
||||||
|
tinc_CURSES
|
||||||
|
tinc_READLINE
|
||||||
tinc_ZLIB
|
tinc_ZLIB
|
||||||
tinc_LZO
|
tinc_LZO
|
||||||
tinc_OPENSSL
|
|
||||||
|
if test "$with_libgcrypt" = yes; then
|
||||||
|
gcrypt=true
|
||||||
|
AM_PATH_LIBGCRYPT([1.4.0], [], [])
|
||||||
|
else
|
||||||
|
openssl=true
|
||||||
|
tinc_OPENSSL
|
||||||
|
fi
|
||||||
|
|
||||||
|
AM_CONDITIONAL(OPENSSL, test "$openssl" = true)
|
||||||
|
AM_CONDITIONAL(GCRYPT, test "$grypt" = true)
|
||||||
|
|
||||||
dnl Check if support for jumbograms is requested
|
dnl Check if support for jumbograms is requested
|
||||||
AC_ARG_ENABLE(jumbograms,
|
AC_ARG_ENABLE(jumbograms,
|
||||||
AS_HELP_STRING([--enable-jumbograms], [enable support for jumbograms (packets up to 9000 bytes)]),
|
AS_HELP_STRING([--disable-jumbograms], [enable support for jumbograms (packets up to 9000 bytes)]),
|
||||||
[ AS_IF([test "x$enable_jumbograms" = "xyes"],
|
[ AS_IF([test "x$enable_jumbograms" = "xyes"],
|
||||||
[ AC_DEFINE(ENABLE_JUMBOGRAMS, 1, [Support for jumbograms (packets up to 9000 bytes)]) ])
|
[ AC_DEFINE(ENABLE_JUMBOGRAMS, 1, [Support for jumbograms (packets up to 9000 bytes)]) ])
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
dnl Ensure runstatedir is set if we are using a version of autoconf that does not support it
|
AC_CONFIG_FILES([Makefile src/Makefile doc/Makefile m4/Makefile gui/Makefile])
|
||||||
if test "x$runstatedir" = "x"; then
|
|
||||||
AC_SUBST([runstatedir], ['${localstatedir}/run'])
|
|
||||||
fi
|
|
||||||
|
|
||||||
AC_CONFIG_FILES([Makefile src/Makefile doc/Makefile systemd/Makefile])
|
|
||||||
|
|
||||||
AC_OUTPUT
|
AC_OUTPUT
|
||||||
|
|
|
||||||
14
debian/NEWS
vendored
14
debian/NEWS
vendored
|
|
@ -1,14 +0,0 @@
|
||||||
tinc (1.0.27-1) unstable; urgency=medium
|
|
||||||
|
|
||||||
This package now provides native systemd service files, allowing multiple
|
|
||||||
instances of tinc to be managed. Existing networks listed in
|
|
||||||
/etc/tinc/nets.boot will be converted to service instances once during this
|
|
||||||
upgrade. Afterwards, you can enable and disable networks using:
|
|
||||||
|
|
||||||
systemctl enable tinc@<netname>
|
|
||||||
systemctl disable tinc@<netname>
|
|
||||||
|
|
||||||
If you do not have systemd installed, the SysV init script will continue to
|
|
||||||
work as usual. For more information, see README.Debian.
|
|
||||||
|
|
||||||
-- Guus Sliepen <guus@debian.org> Sun, 10 Apr 2016 01:33:55 +0200
|
|
||||||
80
debian/README.Debian
vendored
80
debian/README.Debian
vendored
|
|
@ -1,80 +0,0 @@
|
||||||
tinc for Debian
|
|
||||||
---------------
|
|
||||||
|
|
||||||
The manual for tinc is also available as info pages, type `info tinc'
|
|
||||||
to read it.
|
|
||||||
|
|
||||||
There are several ways in which tinc may be automatically started at boot:
|
|
||||||
|
|
||||||
Systemd
|
|
||||||
-------
|
|
||||||
|
|
||||||
Since 1.0.27-1, the tinc package comes with native systemd service files.
|
|
||||||
To enable and start a net, call:
|
|
||||||
|
|
||||||
systemctl enable tinc@<netname>
|
|
||||||
systemctl start tinc@<netname>
|
|
||||||
|
|
||||||
This will cause a tincd to be started which uses the configuration from
|
|
||||||
/etc/tinc/<netname>, and also makes sure that it will be started next time your
|
|
||||||
system boots.
|
|
||||||
|
|
||||||
Apart from controlling individual instances, you can also start/stop/reload all
|
|
||||||
enabled instances simultaneously by omitting @<netname>, for example:
|
|
||||||
|
|
||||||
systemctl reload tinc
|
|
||||||
|
|
||||||
Note that when you have systemd installed on your system, the file
|
|
||||||
/etc/tinc/nets.boot will not be used anymore to automatically start tinc
|
|
||||||
daemons. If the variable EXTRA is defined in /etc/default/tinc, it will be
|
|
||||||
passed on to tinc. The variable LIMITS is however not used.
|
|
||||||
|
|
||||||
The service files that come with this package start tinc unconditionally.
|
|
||||||
However, tinc does support socket activation. If you wish to write a socket
|
|
||||||
unit for tinc, use the ListenStream option to specify on which port(s) and
|
|
||||||
address(es) tinc should listen.
|
|
||||||
|
|
||||||
SysVinit
|
|
||||||
--------
|
|
||||||
|
|
||||||
The system startup script for tinc, /etc/init.d/tinc, uses the file
|
|
||||||
/etc/tinc/nets.boot to find out which networks have to be started. Use one
|
|
||||||
netname per line. Lines starting with a # are ignored.
|
|
||||||
|
|
||||||
/etc/network/interfaces
|
|
||||||
-----------------------
|
|
||||||
|
|
||||||
You can create a stanza in /etc/network/interfaces, and add a line with
|
|
||||||
"tinc-net <netname>". This will cause a tincd to be started which uses the
|
|
||||||
configuration from /etc/tinc/<netname>. You can use an inet static (with
|
|
||||||
address and netmask options) or inet dhcp stanza, in which case the ifup will
|
|
||||||
configure the VPN interface and you do not need to have a tinc-up script.
|
|
||||||
|
|
||||||
The following options are also recognized and map directly to the corresponding
|
|
||||||
command line options for tincd:
|
|
||||||
|
|
||||||
tinc-config <directory>
|
|
||||||
tinc-debug <level>
|
|
||||||
tinc-mlock yes
|
|
||||||
tinc-logfile <filename>
|
|
||||||
tinc-pidfile <filename>
|
|
||||||
tinc-chroot yes
|
|
||||||
tinc-user <username>
|
|
||||||
|
|
||||||
An example stanza:
|
|
||||||
|
|
||||||
iface vpn inet static
|
|
||||||
address 192.168.2.42
|
|
||||||
netmask 255.255.0.0
|
|
||||||
tinc-net myvpn
|
|
||||||
tinc-debug 1
|
|
||||||
tinc-mlock yes
|
|
||||||
tinc-user nobody
|
|
||||||
tinc-pidfile /tmp/tinc.pid
|
|
||||||
|
|
||||||
This will start a tinc daemon that reads its configuration from
|
|
||||||
/etc/tinc/myvpn, logs at debug level 1, locks itself in RAM, runs as user
|
|
||||||
nobody, and creates a network interface called "vpn". Ifup then sets the
|
|
||||||
address and netmask on that interface.
|
|
||||||
|
|
||||||
-- Guus Sliepen <guus@debian.org>, Sun, 10 April 2016, 01:38:08 +0200
|
|
||||||
685
debian/changelog
vendored
685
debian/changelog
vendored
|
|
@ -1,685 +0,0 @@
|
||||||
tinc (1.0.36-2) unstable; urgency=medium
|
|
||||||
|
|
||||||
* Disable support for libvdeplug. Closes: #973233
|
|
||||||
|
|
||||||
-- Guus Sliepen <guus@debian.org> Sun, 22 Nov 2020 10:40:27 +0100
|
|
||||||
|
|
||||||
tinc (1.0.36-1) unstable; urgency=medium
|
|
||||||
|
|
||||||
* New upstream version 1.0.36
|
|
||||||
* Add Vcs tags to debian/control.
|
|
||||||
* Bump Standards-Version.
|
|
||||||
|
|
||||||
-- Guus Sliepen <guus@debian.org> Mon, 26 Aug 2019 14:17:21 +0200
|
|
||||||
|
|
||||||
tinc (1.0.35-2) unstable; urgency=medium
|
|
||||||
|
|
||||||
* Bump Standards-Version and Build-Depend on debhelper-compat (= 12).
|
|
||||||
* Remove calls to dh_installinit and dh_systemd_start from debian/rules,
|
|
||||||
compat level 12 does the right thing by default.
|
|
||||||
* Ensure we clean up doc/tinc.info.
|
|
||||||
|
|
||||||
-- Guus Sliepen <guus@debian.org> Mon, 28 Jan 2019 21:54:45 +0100
|
|
||||||
|
|
||||||
tinc (1.0.35-1) unstable; urgency=medium
|
|
||||||
|
|
||||||
* New upstream release.
|
|
||||||
- Includes fixes for CVE-2018-16737, CVE-2018-16738, CVE-2018-16758.
|
|
||||||
|
|
||||||
-- Guus Sliepen <guus@debian.org> Mon, 08 Oct 2018 16:09:06 +0200
|
|
||||||
|
|
||||||
tinc (1.0.34-1) unstable; urgency=medium
|
|
||||||
|
|
||||||
[ Guus Sliepen ]
|
|
||||||
* New upstream release.
|
|
||||||
- Fixes a potential segmentation fault when connecting to an IPv6
|
|
||||||
peer via a proxy. Closes: #887401
|
|
||||||
* Add support for the $EXTRA variable in /etc/default/tinc when using
|
|
||||||
systemd. Closes: #887116
|
|
||||||
|
|
||||||
[ Benda Xu ]
|
|
||||||
* Prevent possible incorrect IPv6 checksums due to function inlining.
|
|
||||||
Closes: #891400
|
|
||||||
|
|
||||||
-- Guus Sliepen <guus@debian.org> Tue, 12 Jun 2018 23:00:49 +0200
|
|
||||||
|
|
||||||
tinc (1.0.33-1) unstable; urgency=medium
|
|
||||||
|
|
||||||
* New upstream release.
|
|
||||||
* Test for /etc/default/tinc before trying to source it. Closes: #777262
|
|
||||||
* Use --runstatedir=/run.
|
|
||||||
|
|
||||||
-- Guus Sliepen <guus@debian.org> Sat, 04 Nov 2017 16:22:06 +0100
|
|
||||||
|
|
||||||
tinc (1.0.32-1) unstable; urgency=medium
|
|
||||||
|
|
||||||
* New upstream release.
|
|
||||||
* Add a note to new nets.boot files that it is not used with systemd.
|
|
||||||
Closes: #841052
|
|
||||||
* In the post-down script, read the pid file only once. Closes: #832784
|
|
||||||
* Explicitly use /bin/sleep from coreutils. Closes: #772379
|
|
||||||
* Bump Standards-Version.
|
|
||||||
|
|
||||||
-- Guus Sliepen <guus@debian.org> Tue, 05 Sep 2017 20:23:36 +0200
|
|
||||||
|
|
||||||
tinc (1.0.31-1) unstable; urgency=medium
|
|
||||||
|
|
||||||
* New upstream release.
|
|
||||||
* Bump Standards-Version.
|
|
||||||
* Bump debian/compat.
|
|
||||||
* Add missing Depends: lsb-base.
|
|
||||||
|
|
||||||
-- Guus Sliepen <guus@debian.org> Sun, 15 Jan 2017 16:20:40 +0100
|
|
||||||
|
|
||||||
tinc (1.0.29-2) unstable; urgency=medium
|
|
||||||
|
|
||||||
* Rebuild with libssl-dev from unstable.
|
|
||||||
|
|
||||||
-- Guus Sliepen <guus@debian.org> Thu, 27 Oct 2016 13:09:46 +0200
|
|
||||||
|
|
||||||
tinc (1.0.29-1) unstable; urgency=medium
|
|
||||||
|
|
||||||
* New upstream release.
|
|
||||||
* Bump debian/compat.
|
|
||||||
|
|
||||||
-- Guus Sliepen <guus@debian.org> Mon, 10 Oct 2016 22:30:25 +0200
|
|
||||||
|
|
||||||
tinc (1.0.28-1) unstable; urgency=medium
|
|
||||||
|
|
||||||
* New upstream release.
|
|
||||||
- Fixes FTBFS on kfreebsd.
|
|
||||||
* Systemd service files are now provided by upstream.
|
|
||||||
|
|
||||||
-- Guus Sliepen <guus@debian.org> Sun, 10 Apr 2016 15:44:28 +0200
|
|
||||||
|
|
||||||
tinc (1.0.27-2) unstable; urgency=medium
|
|
||||||
|
|
||||||
* Fix tinc@.service.
|
|
||||||
|
|
||||||
-- Guus Sliepen <guus@debian.org> Sun, 10 Apr 2016 12:45:33 +0200
|
|
||||||
|
|
||||||
tinc (1.0.27-1) unstable; urgency=medium
|
|
||||||
|
|
||||||
* New upstream release.
|
|
||||||
* Bump Standards-Version.
|
|
||||||
* Add native systemd unit files.
|
|
||||||
* Automatically convert networks listed in nets.boot to systemd service
|
|
||||||
instances on upgrade.
|
|
||||||
|
|
||||||
-- Guus Sliepen <guus@debian.org> Sun, 10 Apr 2016 01:39:16 +0200
|
|
||||||
|
|
||||||
tinc (1.0.26-1) unstable; urgency=medium
|
|
||||||
|
|
||||||
* New upstream release.
|
|
||||||
* Use the contents, not the presence, of the pidfile to check that tincd is
|
|
||||||
shut down properly. Closes: #774682
|
|
||||||
* Bump Standards-Version.
|
|
||||||
|
|
||||||
-- Guus Sliepen <guus@debian.org> Sun, 05 Jul 2015 17:23:08 +0200
|
|
||||||
|
|
||||||
tinc (1.0.24-2) unstable; urgency=medium
|
|
||||||
|
|
||||||
* Improve the init script: stopping tinc now waits for the process to
|
|
||||||
terminate. If that doesn't happen in 5 seconds, it will send the TERM
|
|
||||||
signal again (which helps if tinc is waiting for a script to finish
|
|
||||||
executing). It now also detects whether the process mentioned in the PID
|
|
||||||
file is actually running, and if not it will exit early and without
|
|
||||||
warnings. Closes: #748107
|
|
||||||
|
|
||||||
-- Guus Sliepen <guus@debian.org> Wed, 14 May 2014 21:44:16 +0200
|
|
||||||
|
|
||||||
tinc (1.0.24-1) unstable; urgency=medium
|
|
||||||
|
|
||||||
[ Guus Sliepen ]
|
|
||||||
* New upstream release
|
|
||||||
* Add a debian/watch file.
|
|
||||||
* Bump Standards-Version.
|
|
||||||
|
|
||||||
[ Gian Piero Carrubba ]
|
|
||||||
* Allow resource limits to be set in /etc/default/tinc.
|
|
||||||
Closes: #690685, #704702
|
|
||||||
|
|
||||||
-- Guus Sliepen <guus@debian.org> Sun, 11 May 2014 21:17:13 +0200
|
|
||||||
|
|
||||||
tinc (1.0.23-2) unstable; urgency=low
|
|
||||||
|
|
||||||
* Use if-statements instead of && in shell scripts. Closes: #731279
|
|
||||||
The && operator does not clear the error status, and if the next statement
|
|
||||||
in a shell script does not change the error status it would cause the
|
|
||||||
script to prematurely exit. Thanks to Peter Reinholdtsen for spotting it.
|
|
||||||
* Use absolute path to tincd in the if-post-down script.
|
|
||||||
|
|
||||||
-- Guus Sliepen <guus@debian.org> Thu, 05 Dec 2013 09:41:13 +0000
|
|
||||||
|
|
||||||
tinc (1.0.23-1) unstable; urgency=low
|
|
||||||
|
|
||||||
* New upstream release.
|
|
||||||
|
|
||||||
-- Guus Sliepen <guus@debian.org> Sat, 19 Oct 2013 21:06:05 +0200
|
|
||||||
|
|
||||||
tinc (1.0.22-1) unstable; urgency=low
|
|
||||||
|
|
||||||
* New upstream release.
|
|
||||||
- Handles whitespace between command line flags and optional arguments.
|
|
||||||
Closes: #710267
|
|
||||||
* Bump Standards-Version.
|
|
||||||
* Source /lib/lsb/init-functions in the init.d script.
|
|
||||||
* Don't use texi2html anymore, use automake's install-html target which uses
|
|
||||||
makeinfo.
|
|
||||||
|
|
||||||
-- Guus Sliepen <guus@debian.org> Wed, 14 Aug 2013 15:34:29 +0200
|
|
||||||
|
|
||||||
tinc (1.0.21-1) unstable; urgency=low
|
|
||||||
|
|
||||||
* New upstream release.
|
|
||||||
- Includes fix for CVE-2013-1428.
|
|
||||||
|
|
||||||
-- Guus Sliepen <guus@debian.org> Sun, 05 May 2013 10:42:33 +0200
|
|
||||||
|
|
||||||
tinc (1.0.19-3) unstable; urgency=high
|
|
||||||
|
|
||||||
* Drop packets forwarded via TCP if they are too big (CVE-2013-1428).
|
|
||||||
|
|
||||||
-- Guus Sliepen <guus@debian.org> Fri, 12 Apr 2013 22:52:10 +0200
|
|
||||||
|
|
||||||
tinc (1.0.19-2) unstable; urgency=low
|
|
||||||
|
|
||||||
* Fix behaviour of tinc-pidfile. Closes: #679130
|
|
||||||
* Enable parallel building in debian/rules.
|
|
||||||
|
|
||||||
-- Guus Sliepen <guus@debian.org> Tue, 26 Jun 2012 18:28:34 +0200
|
|
||||||
|
|
||||||
tinc (1.0.19-1) unstable; urgency=low
|
|
||||||
|
|
||||||
* New upstream release.
|
|
||||||
* Bump debian/compat so tinc gets built with hardening flags.
|
|
||||||
* Allow tinc-pidfile in /etc/network/interfaces.
|
|
||||||
|
|
||||||
-- Guus Sliepen <guus@debian.org> Mon, 25 Jun 2012 20:29:22 +0200
|
|
||||||
|
|
||||||
tinc (1.0.18-1) unstable; urgency=low
|
|
||||||
|
|
||||||
* New upstream release.
|
|
||||||
|
|
||||||
-- Guus Sliepen <guus@debian.org> Sun, 25 Mar 2012 18:52:15 +0200
|
|
||||||
|
|
||||||
tinc (1.0.17-1) unstable; urgency=low
|
|
||||||
|
|
||||||
* New upstream release.
|
|
||||||
* Enable support for UML and VDE.
|
|
||||||
|
|
||||||
-- Guus Sliepen <guus@debian.org> Sat, 10 Mar 2012 14:50:00 +0100
|
|
||||||
|
|
||||||
tinc (1.0.16-1) unstable; urgency=low
|
|
||||||
|
|
||||||
* New upstream release.
|
|
||||||
* Mention alarm option in /etc/init.d/tinc's usage information.
|
|
||||||
Closes: #631761
|
|
||||||
|
|
||||||
-- Guus Sliepen <guus@debian.org> Sat, 23 Jul 2011 14:37:56 +0200
|
|
||||||
|
|
||||||
tinc (1.0.15-1) unstable; urgency=low
|
|
||||||
|
|
||||||
* New upstream release.
|
|
||||||
* Send SIGALRM to running tinc daemons whenever an interface is brought up
|
|
||||||
with the ifupdown framework. Based on a patch from Joachim Breitner.
|
|
||||||
Closes: #629880
|
|
||||||
* Allow tinc daemons to be started using ifupdown.
|
|
||||||
|
|
||||||
-- Guus Sliepen <guus@debian.org> Fri, 24 Jun 2011 18:21:51 +0200
|
|
||||||
|
|
||||||
tinc (1.0.14-1) unstable; urgency=low
|
|
||||||
|
|
||||||
* New upstream release.
|
|
||||||
* Bump Standards-Version.
|
|
||||||
|
|
||||||
-- Guus Sliepen <guus@debian.org> Mon, 09 May 2011 00:25:37 +0200
|
|
||||||
|
|
||||||
tinc (1.0.13-1) unstable; urgency=low
|
|
||||||
|
|
||||||
* New upstream release.
|
|
||||||
|
|
||||||
-- Guus Sliepen <guus@debian.org> Tue, 13 Apr 2010 12:06:36 +0200
|
|
||||||
|
|
||||||
tinc (1.0.12-2) unstable; urgency=low
|
|
||||||
|
|
||||||
* Remove debconf questions. Closes: #572116
|
|
||||||
Apparently debconf may not be used to ask a question at install time and
|
|
||||||
use the answer at upgrade time. Instead of kludging around this
|
|
||||||
restriction, no questions are asked anymore, and tinc will now always be
|
|
||||||
restarted when upgrading.
|
|
||||||
* Wait up to 5 seconds for tinc daemon to stop before restarting it.
|
|
||||||
|
|
||||||
-- Guus Sliepen <guus@debian.org> Tue, 02 Mar 2010 14:01:36 +0100
|
|
||||||
|
|
||||||
tinc (1.0.12-1) unstable; urgency=low
|
|
||||||
|
|
||||||
* New upstream release.
|
|
||||||
* Bump Standards-Version.
|
|
||||||
* Migrate from CDBS to debhelper.
|
|
||||||
* Convert source package to 3.0 (quilt) format.
|
|
||||||
* Remove useless tinc.modules.
|
|
||||||
* Use init.d script from Michael Tokarev, allowing per-network arguments to
|
|
||||||
tincd.
|
|
||||||
* Remove update-rc.d calls from postinst and postrm.
|
|
||||||
* Let the init.d script depend on $remote_fs.
|
|
||||||
|
|
||||||
-- Guus Sliepen <guus@debian.org> Thu, 04 Feb 2010 00:56:45 +0100
|
|
||||||
|
|
||||||
tinc (1.0.11-1) unstable; urgency=low
|
|
||||||
|
|
||||||
* New upstream release.
|
|
||||||
* Cope with texi2html arbitrarily changing its output directory.
|
|
||||||
Closes: #552927
|
|
||||||
* Do not stop tinc when configuring a new version, just restart after
|
|
||||||
the upgrade.
|
|
||||||
|
|
||||||
-- Guus Sliepen <guus@debian.org> Sun, 01 Nov 2009 20:37:16 +0100
|
|
||||||
|
|
||||||
tinc (1.0.10-1) unstable; urgency=low
|
|
||||||
|
|
||||||
* New upstream release.
|
|
||||||
* Include Russian debconf translation. Closes: #548759
|
|
||||||
|
|
||||||
-- Guus Sliepen <guus@debian.org> Sun, 18 Oct 2009 16:31:49 +0200
|
|
||||||
|
|
||||||
tinc (1.0.9-1) unstable; urgency=low
|
|
||||||
|
|
||||||
* New upstream release.
|
|
||||||
- Binds IPv6 sockets only to IPv6. Closes: #440150
|
|
||||||
* Update copyright file. Closes: #482566
|
|
||||||
|
|
||||||
-- Guus Sliepen <guus@debian.org> Fri, 26 Dec 2008 13:25:05 +0100
|
|
||||||
|
|
||||||
tinc (1.0.8-2) unstable; urgency=low
|
|
||||||
|
|
||||||
* Include Portugese debconf translation. Closes: #434191
|
|
||||||
|
|
||||||
-- Guus Sliepen <guus@debian.org> Tue, 14 Aug 2007 13:50:27 +0200
|
|
||||||
|
|
||||||
tinc (1.0.8-1) unstable; urgency=low
|
|
||||||
|
|
||||||
* New upstream release. Closes: #173987
|
|
||||||
* Include german debconf translation. Closes: #412351
|
|
||||||
* Build-Depend on texinfo. Closes: #424209
|
|
||||||
|
|
||||||
-- Guus Sliepen <guus@debian.org> Wed, 16 May 2007 17:59:16 +0200
|
|
||||||
|
|
||||||
tinc (1.0.7-1) unstable; urgency=low
|
|
||||||
|
|
||||||
* New upstream release.
|
|
||||||
|
|
||||||
-- Guus Sliepen <guus@debian.org> Fri, 5 Jan 2007 15:55:42 +0100
|
|
||||||
|
|
||||||
tinc (1.0.6-1) unstable; urgency=low
|
|
||||||
|
|
||||||
* New upstream release.
|
|
||||||
|
|
||||||
-- Guus Sliepen <guus@debian.org> Mon, 18 Dec 2006 15:41:03 +0100
|
|
||||||
|
|
||||||
tinc (1.0.5-1) unstable; urgency=low
|
|
||||||
|
|
||||||
* New upstream release. Closes: #391610
|
|
||||||
* Add an LSB section to the init script.
|
|
||||||
|
|
||||||
-- Guus Sliepen <guus@debian.org> Tue, 14 Nov 2006 16:32:20 +0100
|
|
||||||
|
|
||||||
tinc (1.0.4-4) unstable; urgency=low
|
|
||||||
|
|
||||||
* Include swedish debconf translation. Closes: #332963
|
|
||||||
* Remove nets.boot on purge. Closes: #333303
|
|
||||||
|
|
||||||
-- Guus Sliepen <guus@debian.org> Mon, 17 Oct 2005 12:34:32 +0200
|
|
||||||
|
|
||||||
tinc (1.0.4-3) unstable; urgency=low
|
|
||||||
|
|
||||||
* Depend on debconf | debconf-2.0.
|
|
||||||
* Include vietnamese debconf translation. Closes: #322305
|
|
||||||
* Include japanese debconf translation. Closes: #319591
|
|
||||||
|
|
||||||
-- Guus Sliepen <guus@debian.org> Thu, 29 Sep 2005 11:15:34 +0200
|
|
||||||
|
|
||||||
tinc (1.0.4-2) unstable; urgency=low
|
|
||||||
|
|
||||||
* Compensate for change in texinfo's output directory. Closes: #318562
|
|
||||||
* Include Czech translation of the debconf questions. Closes: #312982
|
|
||||||
|
|
||||||
-- Guus Sliepen <guus@debian.org> Sat, 16 Jul 2005 11:42:04 +0200
|
|
||||||
|
|
||||||
tinc (1.0.4-1) unstable; urgency=low
|
|
||||||
|
|
||||||
* New upstream release. Closes: #294819
|
|
||||||
* Update french translation of debconf template. Closes: #293371, #296148
|
|
||||||
* Allow dashes in nets.boot. Closes: #296281
|
|
||||||
|
|
||||||
-- Guus Sliepen <guus@debian.org> Wed, 4 May 2005 21:56:22 +0200
|
|
||||||
|
|
||||||
tinc (1.0.3-4) unstable; urgency=low
|
|
||||||
|
|
||||||
* Call debconf early in postinst so it won't get confused by output
|
|
||||||
from other commands in the postinst script. Closes: #292920
|
|
||||||
* If MAKEDEV doesn't know about net/tun, fall back to tun.
|
|
||||||
|
|
||||||
-- Guus Sliepen <guus@debian.org> Mon, 31 Jan 2005 13:27:16 +0100
|
|
||||||
|
|
||||||
tinc (1.0.3-3) unstable; urgency=low
|
|
||||||
|
|
||||||
* Fix clean rule in debian/rules.
|
|
||||||
|
|
||||||
-- Guus Sliepen <guus@debian.org> Thu, 27 Jan 2005 23:16:59 +0000
|
|
||||||
|
|
||||||
tinc (1.0.3-2) unstable; urgency=low
|
|
||||||
|
|
||||||
* Don't check for /dev/tap* in postinst if we don't create them anyway.
|
|
||||||
* MAKEDEV expects net/tun instead of tun.
|
|
||||||
* Don't ask if /dev/net/tun should be created, just do it.
|
|
||||||
Closes: #259489, #292450
|
|
||||||
* Move $EXTRA from init.d/tinc to /etc/default/tinc. Closes: #281366
|
|
||||||
|
|
||||||
-- Guus Sliepen <guus@debian.org> Thu, 27 Jan 2005 14:10:02 +0100
|
|
||||||
|
|
||||||
tinc (1.0.3-1) unstable; urgency=low
|
|
||||||
|
|
||||||
* New upstream release.
|
|
||||||
* Adopting the package from Ivo.
|
|
||||||
* Use invoke-rc.d, and tell user to do so as well. Closes: #223276
|
|
||||||
* Let force-reload do the same thing as reload. Closes: #230180
|
|
||||||
|
|
||||||
-- Guus Sliepen <guus@debian.org> Fri, 1 Oct 2004 21:04:14 +0200
|
|
||||||
|
|
||||||
tinc (1.0.2-2) unstable; urgency=low
|
|
||||||
|
|
||||||
* debian/control: Oops, really make that automake1.7.
|
|
||||||
|
|
||||||
-- Ivo Timmermans <ivo@debian.org> Sat, 8 Nov 2003 21:53:04 +0100
|
|
||||||
|
|
||||||
tinc (1.0.2-1) unstable; urgency=low
|
|
||||||
|
|
||||||
* New upstream release:
|
|
||||||
* Fix broken replies to CHAL_RESP. (Closes: #217646)
|
|
||||||
* debian/control: Updated automake build dependency to automake1.7.
|
|
||||||
(Closes: #219360)
|
|
||||||
|
|
||||||
-- Ivo Timmermans <ivo@debian.org> Sat, 8 Nov 2003 19:56:04 +0100
|
|
||||||
|
|
||||||
tinc (1.0.1-2) unstable; urgency=low
|
|
||||||
|
|
||||||
* debian/dirs: Removed, moved contents to tinc.dirs.
|
|
||||||
(Closes: #208591)
|
|
||||||
* debian/docs: Renamed to tinc.docs.
|
|
||||||
* debian/rules: Install the contents of doc/sample-config.tar.gz in
|
|
||||||
/usr/share/doc/tinc/examples instead of /etc/tinc.
|
|
||||||
* debian/Makefile*: Removed.
|
|
||||||
|
|
||||||
-- Ivo Timmermans <ivo@debian.org> Wed, 10 Sep 2003 12:19:32 +0200
|
|
||||||
|
|
||||||
tinc (1.0.1-1) unstable; urgency=low
|
|
||||||
|
|
||||||
* New upstream release.
|
|
||||||
* debian/patches/001_openbsd_device.c.patch: Removed.
|
|
||||||
|
|
||||||
-- Ivo Timmermans <ivo@debian.org> Thu, 14 Aug 2003 17:03:28 +0200
|
|
||||||
|
|
||||||
tinc (1.0release-1) unstable; urgency=low
|
|
||||||
|
|
||||||
* New upstream version. (Closes: #204639)
|
|
||||||
* Fixes switching back to normal logging mode when killing with
|
|
||||||
SIGINT twice. (Closes: #175633)
|
|
||||||
* Uses one SSL context struct for each connection, speeding up
|
|
||||||
encrypting/decrypting data; don't throw away out of sequence
|
|
||||||
packets. (Closes: #188874)
|
|
||||||
* Fixes handling of broadcast messages. (Closes: #175632)
|
|
||||||
* debian/rules: Use cdbs.
|
|
||||||
* debian/control: Build-Depend on cdbs, liblzo-dev.
|
|
||||||
* debian/patches/001_openbsd_device.c.patch: Sync openbsd/device.c to
|
|
||||||
latest CVS version.
|
|
||||||
|
|
||||||
-- Ivo Timmermans <ivo@debian.org> Sun, 10 Aug 2003 16:13:29 +0200
|
|
||||||
|
|
||||||
tinc (1.0pre8-6) unstable; urgency=low
|
|
||||||
|
|
||||||
* debian/po/fr.po: Added French debconf translation. (Closes: #201803)
|
|
||||||
|
|
||||||
-- Ivo Timmermans <ivo@debian.org> Fri, 18 Jul 2003 10:03:20 +0200
|
|
||||||
|
|
||||||
tinc (1.0pre8-5) unstable; urgency=low
|
|
||||||
|
|
||||||
* debian/*: Change to po-debconf, thanks to From: Michel Grentzinger
|
|
||||||
<mic.grentz@online.fr> for the patch:
|
|
||||||
- change debhelper dependency to 4.1.16 (according to man
|
|
||||||
po-debconf),
|
|
||||||
- manually add nl translation in old tinc.templates (master),
|
|
||||||
- run debconf-gettextize debian/tinc.templates,
|
|
||||||
- move old templates files (debian/tinc.templates.*),
|
|
||||||
- change construction "If you say no" to "If you refuse",
|
|
||||||
* debian/rules: Call po2debconf.
|
|
||||||
* debian/rules: Don't copy COPYING.README to the package.
|
|
||||||
* debian/control: Update Standards-Version.
|
|
||||||
* debian/conffiles: Removed.
|
|
||||||
* debian/postinst: No longer use mknod directly, use MAKEDEV.
|
|
||||||
|
|
||||||
-- Ivo Timmermans <ivo@debian.org> Tue, 15 Jul 2003 20:13:47 +0200
|
|
||||||
|
|
||||||
tinc (1.0pre8-4) unstable; urgency=low
|
|
||||||
|
|
||||||
* src/net.h, src/net_packet.c, src/net_setup.c: Apply fix from CVS
|
|
||||||
for OpenSSL-related memory leaks. (Closes: #189432)
|
|
||||||
|
|
||||||
-- Ivo Timmermans <ivo@debian.org> Mon, 5 May 2003 15:00:29 +0200
|
|
||||||
|
|
||||||
tinc (1.0pre8-3) unstable; urgency=low
|
|
||||||
|
|
||||||
* m4/openssl.m4: Updated to CVS version. (Closes: #184400)
|
|
||||||
|
|
||||||
-- Ivo Timmermans <ivo@debian.org> Thu, 13 Mar 2003 17:24:42 +0100
|
|
||||||
|
|
||||||
tinc (1.0pre8-2) unstable; urgency=low
|
|
||||||
|
|
||||||
* debian/postinst: Create /dev/net/tun if it doesn't exist.
|
|
||||||
* debian/tinc.modules: Add alias for /dev/net/tun.
|
|
||||||
* debian/rules: Install tinc.modules.
|
|
||||||
* These things together: (Closes: #151967, #153156)
|
|
||||||
|
|
||||||
-- Ivo Timmermans <ivo@debian.org> Wed, 13 Nov 2002 22:45:38 +0100
|
|
||||||
|
|
||||||
tinc (1.0pre8-1) unstable; urgency=low
|
|
||||||
|
|
||||||
* New upstream version.
|
|
||||||
* debian/rules:
|
|
||||||
- DEB_BUILD_OPTIONS support.
|
|
||||||
- Enable --enable-tracing by default.
|
|
||||||
|
|
||||||
-- Ivo Timmermans <ivo@debian.org> Tue, 17 Sep 2002 13:50:44 +0200
|
|
||||||
|
|
||||||
tinc (1.0pre7-3) unstable; urgency=low
|
|
||||||
|
|
||||||
* Properly install _all_ info pages. (Closes: #144718)
|
|
||||||
|
|
||||||
-- Ivo Timmermans <ivo@debian.org> Wed, 29 May 2002 14:01:21 +0200
|
|
||||||
|
|
||||||
tinc (1.0pre7-2) unstable; urgency=low
|
|
||||||
|
|
||||||
* Dutch translation wasn't being installed.
|
|
||||||
|
|
||||||
-- Ivo Timmermans <ivo@debian.org> Thu, 11 Apr 2002 09:26:14 +0200
|
|
||||||
|
|
||||||
tinc (1.0pre7-1) unstable; urgency=medium
|
|
||||||
|
|
||||||
* New upstream release.
|
|
||||||
|
|
||||||
-- Ivo Timmermans <ivo@debian.org> Tue, 9 Apr 2002 16:04:46 +0200
|
|
||||||
|
|
||||||
tinc (1.0pre6-3) unstable; urgency=medium
|
|
||||||
|
|
||||||
* Synched with upstream CVS.
|
|
||||||
* Added build dependency on zlib1g-dev. (Closes: #141705)
|
|
||||||
|
|
||||||
-- Ivo Timmermans <ivo@debian.org> Mon, 8 Apr 2002 21:19:31 +0200
|
|
||||||
|
|
||||||
tinc (1.0pre6-2) unstable; urgency=low
|
|
||||||
|
|
||||||
* The Section was non-US again, so changed it back to main/net.
|
|
||||||
|
|
||||||
-- Ivo Timmermans <ivo@debian.org> Thu, 28 Mar 2002 07:26:10 +0100
|
|
||||||
|
|
||||||
tinc (1.0pre6-1) unstable; urgency=low
|
|
||||||
|
|
||||||
* New upstream release.
|
|
||||||
* Fixed text in debian/copyright
|
|
||||||
|
|
||||||
-- Ivo Timmermans <ivo@debian.org> Wed, 27 Mar 2002 23:10:07 +0100
|
|
||||||
|
|
||||||
tinc (1.0pre5-4) unstable; urgency=low
|
|
||||||
|
|
||||||
* Added a debconf question for restarting on upgrade.
|
|
||||||
* Added reload option to init.d, start with EXTRA='-d' default.
|
|
||||||
* Moved from non-US to main.
|
|
||||||
* Install example configuration files.
|
|
||||||
* The HTML documentation wasn't installed; fixed.
|
|
||||||
|
|
||||||
-- Ivo Timmermans <ivo@debian.org> Tue, 26 Mar 2002 20:14:19 +0100
|
|
||||||
|
|
||||||
tinc (1.0pre5-3) unstable; urgency=low
|
|
||||||
|
|
||||||
* Config variables are now treated case sentitivly again.
|
|
||||||
* Added a forgotten xstrdup.
|
|
||||||
|
|
||||||
-- Ivo Timmermans <ivo@debian.org> Fri, 15 Feb 2002 12:35:17 +0100
|
|
||||||
|
|
||||||
tinc (1.0pre5-2) unstable; urgency=low
|
|
||||||
|
|
||||||
* MaxTimeout accidentally wasn't configurable. (Closes: #119653)
|
|
||||||
|
|
||||||
-- Ivo Timmermans <ivo@debian.org> Wed, 13 Feb 2002 13:36:54 +0100
|
|
||||||
|
|
||||||
tinc (1.0pre5-1) unstable; urgency=low
|
|
||||||
|
|
||||||
* New upstream version. (Closes: #119653)
|
|
||||||
* Init script redone in sh.
|
|
||||||
|
|
||||||
-- Ivo Timmermans <ivo@debian.org> Sun, 10 Feb 2002 16:39:53 +0100
|
|
||||||
|
|
||||||
tinc (1.0pre4-1.cvs010621.6) unstable; urgency=low
|
|
||||||
|
|
||||||
* Somehow po-Makefile.in.in.diff got lost, readded. (Closes: #119157)
|
|
||||||
|
|
||||||
-- Ivo Timmermans <ivo@debian.org> Thu, 15 Nov 2001 17:00:03 +0100
|
|
||||||
|
|
||||||
tinc (1.0pre4-1.cvs010621.5) unstable; urgency=low
|
|
||||||
|
|
||||||
* Fix a typo in postinst that let it MAKEDEV even on devfs.
|
|
||||||
(Closes: #116034)
|
|
||||||
|
|
||||||
-- Ivo Timmermans <ivo@debian.org> Thu, 18 Oct 2001 09:35:16 +0200
|
|
||||||
|
|
||||||
tinc (1.0pre4-1.cvs010621.4) unstable; urgency=low
|
|
||||||
|
|
||||||
* Ask before creating the device files. (Closes: #111099)
|
|
||||||
* Add a section to the info file.
|
|
||||||
|
|
||||||
-- Ivo Timmermans <ivo@debian.org> Fri, 12 Oct 2001 20:47:09 +0200
|
|
||||||
|
|
||||||
tinc (1.0pre4-1.cvs010621.3) unstable; urgency=low
|
|
||||||
|
|
||||||
* Build and install html documentation. (Closes: #106843)
|
|
||||||
* Remove build-time dependency on libc6-dev.
|
|
||||||
|
|
||||||
-- Ivo Timmermans <ivo@debian.org> Mon, 30 Jul 2001 22:03:52 +0200
|
|
||||||
|
|
||||||
tinc (1.0pre4-1.cvs010621.2) unstable; urgency=low
|
|
||||||
|
|
||||||
* Changed location of the pidfile. (Closes: #102798)
|
|
||||||
|
|
||||||
-- Ivo Timmermans <ivo@debian.org> Sun, 1 Jul 2001 01:57:43 +0200
|
|
||||||
|
|
||||||
tinc (1.0pre4-1.cvs010621.1) unstable; urgency=low
|
|
||||||
|
|
||||||
* New upstream version. (Closes: #98730)
|
|
||||||
* Rebuilding automatically inserted new config.{sub|guess}.
|
|
||||||
(Closes: #98165)
|
|
||||||
* Updated Standards-Version.
|
|
||||||
* Don't include a sample configuration file.
|
|
||||||
|
|
||||||
-- Ivo Timmermans <ivo@debian.org> Thu, 21 Jun 2001 14:08:49 +0200
|
|
||||||
|
|
||||||
tinc (1.0pre3-5) unstable; urgency=low
|
|
||||||
|
|
||||||
* Fixed an error in the init script that prevented tinc from
|
|
||||||
starting correctly.
|
|
||||||
|
|
||||||
-- Ivo Timmermans <ivo@debian.org> Thu, 8 Feb 2001 02:45:09 +0100
|
|
||||||
|
|
||||||
tinc (1.0pre3-4) unstable; urgency=low
|
|
||||||
|
|
||||||
* Change build-depends for OpenSSL to libssl096-dev
|
|
||||||
(Closes: #84197, #84873).
|
|
||||||
|
|
||||||
-- Ivo Timmermans <ivo@debian.org> Sun, 4 Feb 2001 22:43:22 +0100
|
|
||||||
|
|
||||||
tinc (1.0pre3-3) unstable; urgency=low
|
|
||||||
|
|
||||||
* Set architecture to any (really this time!) (Closes: #80451).
|
|
||||||
* Section set to non-US
|
|
||||||
|
|
||||||
-- Ivo Timmermans <ivo@debian.org> Tue, 23 Jan 2001 22:52:53 +0100
|
|
||||||
|
|
||||||
tinc (1.0pre3-2) unstable; urgency=low
|
|
||||||
|
|
||||||
* Set architecture to any (Closes: #80451).
|
|
||||||
* Added tinc.modules with some useful module aliases.
|
|
||||||
|
|
||||||
-- Ivo Timmermans <ivo@debian.org> Sat, 13 Jan 2001 16:10:57 +0100
|
|
||||||
|
|
||||||
tinc (1.0pre3-1) unstable; urgency=low
|
|
||||||
|
|
||||||
* New upstream version (1.0pre3) (Closes: #71274).
|
|
||||||
* Better Depends and Build-Depends lines.
|
|
||||||
* Dropped dependencies on libgmp, added libssl.
|
|
||||||
* doc-base.tinc: New file.
|
|
||||||
* Deleted the file shlibs, as there on longer is a libblowfish.
|
|
||||||
* Patch po/Makefile.in.in from po-Makefile.in.in.diff if necessary.
|
|
||||||
* Use dh_perl to get accurate perl dependencies.
|
|
||||||
|
|
||||||
-- Ivo Timmermans <ivo@debian.org> Thu, 9 Nov 2000 21:58:40 +0100
|
|
||||||
|
|
||||||
tinc (1.0pre2-1.1) unstable; urgency=low
|
|
||||||
|
|
||||||
* NMU at Ivo's request as his application is being processed, and his
|
|
||||||
sponsor is based in the US.
|
|
||||||
|
|
||||||
-- J.H.M. Dassen (Ray) <jdassen@debian.org> Wed, 28 Jun 2000 21:52:30 +0200
|
|
||||||
|
|
||||||
tinc (1.0pre2-1) unstable; urgency=low
|
|
||||||
|
|
||||||
* postinst creates a file /etc/tinc/nets.boot, containing all networks
|
|
||||||
to be started upon system startup;
|
|
||||||
* init.d script starts all networks from that list.
|
|
||||||
* postinst script creates tap devices.
|
|
||||||
|
|
||||||
-- Ivo Timmermans <itimmermans@bigfoot.com> Tue, 16 May 2000 00:06:25 +0200
|
|
||||||
|
|
||||||
tinc (1.0pre1-0.4) unstable; urgency=low
|
|
||||||
|
|
||||||
* postinst script.
|
|
||||||
|
|
||||||
-- Ivo Timmermans <itimmermans@bigfoot.com> Mon, 15 May 2000 19:22:05 +0200
|
|
||||||
|
|
||||||
tinc (1.0pre1-0.3) unstable; urgency=low
|
|
||||||
|
|
||||||
* system startup script.
|
|
||||||
|
|
||||||
-- Ivo Timmermans <itimmermans@bigfoot.com> Sun, 14 May 2000 22:58:02 +0200
|
|
||||||
|
|
||||||
tinc (1.0pre1-0.2) unstable; urgency=low
|
|
||||||
|
|
||||||
* Included the blowfish license.
|
|
||||||
|
|
||||||
-- Ivo Timmermans <itimmermans@bigfoot.com> Fri, 21 Apr 2000 17:07:50 +0200
|
|
||||||
|
|
||||||
tinc (1.0pre1-0.1) unstable; urgency=low
|
|
||||||
|
|
||||||
* Initial Release.
|
|
||||||
|
|
||||||
-- Ivo Timmermans <itimmermans@bigfoot.com> Fri, 21 Apr 2000 17:07:50 +0200
|
|
||||||
|
|
||||||
|
|
||||||
20
debian/control
vendored
20
debian/control
vendored
|
|
@ -1,20 +0,0 @@
|
||||||
Source: tinc
|
|
||||||
Section: net
|
|
||||||
Priority: optional
|
|
||||||
Maintainer: Guus Sliepen <guus@debian.org>
|
|
||||||
Standards-Version: 4.4.0
|
|
||||||
Build-Depends: libssl-dev, debhelper-compat (= 12), gettext, texinfo, zlib1g-dev, liblzo2-dev
|
|
||||||
Homepage: http://www.tinc-vpn.org/
|
|
||||||
Vcs-Browser: https://salsa.debian.org/guus/tinc
|
|
||||||
Vcs-Git: https://salsa.debian.org/guus/tinc.git
|
|
||||||
Rules-Requires-Root: no
|
|
||||||
|
|
||||||
Package: tinc
|
|
||||||
Architecture: any
|
|
||||||
Pre-Depends: ${misc:Pre-Depends}
|
|
||||||
Depends: ${shlibs:Depends}, ${misc:Depends}, lsb-base (>= 3.0-6)
|
|
||||||
Description: Virtual Private Network daemon
|
|
||||||
tinc is a daemon with which you can create a virtual private network
|
|
||||||
(VPN). One daemon can handle multiple connections, so you can
|
|
||||||
create an entire (moderately sized) VPN with only one daemon per
|
|
||||||
participating computer.
|
|
||||||
34
debian/copyright
vendored
34
debian/copyright
vendored
|
|
@ -1,34 +0,0 @@
|
||||||
This package was debianized by Ivo Timmermans <ivo@debian.org> on
|
|
||||||
Fri, 21 Apr 2000 17:07:50 +0200.
|
|
||||||
|
|
||||||
It was downloaded from http://www.tinc-vpn.org/
|
|
||||||
|
|
||||||
Upstream Authors:
|
|
||||||
Guus Sliepen <guus@tinc-vpn.org>
|
|
||||||
Ivo Timmermans <ivo@tinc-vpn.org>
|
|
||||||
|
|
||||||
Copyright (C) 1998-2005 Ivo Timmermans
|
|
||||||
1998-2008 Guus Sliepen <guus@tinc-vpn.org>
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
On Debian GNU/Linux systems, the complete text of the GNU General Public
|
|
||||||
License version 2 can be found in /usr/share/common-licenses/GPL-2.
|
|
||||||
|
|
||||||
The following applies to tinc:
|
|
||||||
|
|
||||||
This program is released under the GPL with the additional exemption
|
|
||||||
that compiling, linking, and/or using OpenSSL is allowed. You may
|
|
||||||
provide binary packages linked to the OpenSSL libraries, provided that
|
|
||||||
all other requirements of the GPL are met.
|
|
||||||
|
|
||||||
The following applies to the LZO library:
|
|
||||||
|
|
||||||
Hereby I grant a special exception to the tinc VPN project
|
|
||||||
(http://tinc.nl.linux.org/) to link the LZO library with the OpenSSL library
|
|
||||||
(http://www.openssl.org).
|
|
||||||
|
|
||||||
Markus F.X.J. Oberhumer
|
|
||||||
10
debian/doc-base.tinc
vendored
10
debian/doc-base.tinc
vendored
|
|
@ -1,10 +0,0 @@
|
||||||
Document: tinc
|
|
||||||
Title: tinc Manual
|
|
||||||
Author: Ivo Timmermans, Guus Sliepen
|
|
||||||
Abstract: This manual describes how to set up a Virtual Private
|
|
||||||
Network with tinc.
|
|
||||||
Section: System/Security
|
|
||||||
|
|
||||||
Format: HTML
|
|
||||||
Files: /usr/share/doc/tinc/tinc.html/*
|
|
||||||
Index: /usr/share/doc/tinc/tinc.html/index.html
|
|
||||||
1
debian/info
vendored
1
debian/info
vendored
|
|
@ -1 +0,0 @@
|
||||||
doc/tinc.info
|
|
||||||
65
debian/patches/fix-incorrect-icmpv6-checksum
vendored
65
debian/patches/fix-incorrect-icmpv6-checksum
vendored
|
|
@ -1,65 +0,0 @@
|
||||||
Package: tinc
|
|
||||||
Version: 1.0.33-1
|
|
||||||
Severity: important
|
|
||||||
|
|
||||||
Dear Guus,
|
|
||||||
|
|
||||||
I have been using tinc since 2009 and it is great!
|
|
||||||
|
|
||||||
When PMTUDiscovery=yes and Mode=switch, and if ipv6 is used inside
|
|
||||||
tinc, the ICMPv6 "Packet Too Big" packets have incorrect checksums.
|
|
||||||
It can be reproduced by `ping6 <host in tinc> -s 1800` and `tcpdump -i
|
|
||||||
<tinc interface>`. Consequently, the host ignores the tinc-generated
|
|
||||||
ICMPv6 packets, PMTUDiscovery does not work and the connections freeze
|
|
||||||
when data flows are big.
|
|
||||||
|
|
||||||
I find the bug is gone if the function "inet_checksum" in route.c is
|
|
||||||
not inlined, either by compiling tinc with "-O2
|
|
||||||
-fno-inline-functions", or apply a patch such as,
|
|
||||||
|
|
||||||
diff --git a/src/route.c b/src/route.c
|
|
||||||
index ff82c06e..cd55383a 100644
|
|
||||||
--- a/src/route.c
|
|
||||||
+++ b/src/route.c
|
|
||||||
@@ -60,7 +60,7 @@ static const size_t opt_size = sizeof(struct nd_opt_hdr);
|
|
||||||
|
|
||||||
/* RFC 1071 */
|
|
||||||
|
|
||||||
-static uint16_t inet_checksum(void *data, int len, uint16_t prevsum) {
|
|
||||||
+__attribute__ ((noinline)) static uint16_t inet_checksum(void *data, int len, uint16_t prevsum) {
|
|
||||||
uint16_t *p = data;
|
|
||||||
uint32_t checksum = prevsum ^ 0xFFFF;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
I have tested with gcc-7.3.0 and gcc-5.4.0. They behaved the same. I
|
|
||||||
am not good at assembly to find out what really happened, but it is
|
|
||||||
for sure that inet_checksum does not work as expected if compiled
|
|
||||||
inline.
|
|
||||||
|
|
||||||
Thanks!
|
|
||||||
|
|
||||||
Yours,
|
|
||||||
Benda
|
|
||||||
|
|
||||||
-- System Information:
|
|
||||||
Debian Release: buster/sid
|
|
||||||
APT prefers unstable
|
|
||||||
APT policy: (500, 'unstable')
|
|
||||||
Architecture: amd64 (x86_64)
|
|
||||||
|
|
||||||
Kernel: Linux 4.9.0-5-amd64 (SMP w/8 CPU cores)
|
|
||||||
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to en_US.UTF-8), LANGUAGE=en_US:en (charmap=UTF-8) (ignored: LC_ALL set to en_US.UTF-8)
|
|
||||||
Shell: /bin/sh linked to /bin/dash
|
|
||||||
Init: sysvinit (via /sbin/init)
|
|
||||||
|
|
||||||
Versions of packages tinc depends on:
|
|
||||||
ii libc6 2.26-2
|
|
||||||
ii liblzo2-2 2.08-1.2+b2
|
|
||||||
ii libssl1.1 1.1.0g-2
|
|
||||||
ii lsb-base 9.20170808
|
|
||||||
ii zlib1g 1:1.2.8.dfsg-5
|
|
||||||
|
|
||||||
tinc recommends no packages.
|
|
||||||
|
|
||||||
tinc suggests no packages.
|
|
||||||
2
debian/patches/series
vendored
2
debian/patches/series
vendored
|
|
@ -1,2 +0,0 @@
|
||||||
fix-incorrect-icmpv6-checksum
|
|
||||||
support-etc-defaults-tinc
|
|
||||||
12
debian/patches/support-etc-defaults-tinc
vendored
12
debian/patches/support-etc-defaults-tinc
vendored
|
|
@ -1,12 +0,0 @@
|
||||||
--- a/systemd/tinc@.service.in
|
|
||||||
+++ b/systemd/tinc@.service.in
|
|
||||||
@@ -9,7 +9,8 @@
|
|
||||||
[Service]
|
|
||||||
Type=simple
|
|
||||||
WorkingDirectory=@sysconfdir@/tinc/%i
|
|
||||||
-ExecStart=@sbindir@/tincd -n %i -D
|
|
||||||
+EnvironmentFile=/etc/default/tinc
|
|
||||||
+ExecStart=@sbindir@/tincd -n %i -D $EXTRA
|
|
||||||
ExecReload=@sbindir@/tincd -n %i -kHUP
|
|
||||||
KillMode=mixed
|
|
||||||
Restart=on-failure
|
|
||||||
31
debian/postinst
vendored
31
debian/postinst
vendored
|
|
@ -1,31 +0,0 @@
|
||||||
#! /bin/sh
|
|
||||||
|
|
||||||
NETSFILE="/etc/tinc/nets.boot"
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
case "$1" in
|
|
||||||
configure)
|
|
||||||
if [ ! -e /dev/.devfsd ] ; then if [ ! -e /dev/.devfs ] ; then
|
|
||||||
if [ ! -e /dev/net/tun ] ; then if [ ! -e /dev/tun ] ; then if [ -e /dev/MAKEDEV ]; then
|
|
||||||
echo "Creating tun device..."
|
|
||||||
cd /dev && ./MAKEDEV net/tun 2>/dev/null || ./MAKEDEV tun 2>/dev/null || echo "Failed to create tun device."
|
|
||||||
fi; fi; fi
|
|
||||||
fi; fi
|
|
||||||
|
|
||||||
if [ ! -e $NETSFILE ] ; then
|
|
||||||
echo "## This file contains all names of the networks to be started on system startup when using sysvinit." > $NETSFILE
|
|
||||||
echo "## If you are using systemd, use systemctl enable tinc@netname to enable individual networks." >> $NETSFILE
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
|
|
||||||
abort-upgrade|abort-remove|abort-deconfigure)
|
|
||||||
;;
|
|
||||||
|
|
||||||
*)
|
|
||||||
echo "postinst called with unknown argument \`$1'" >&2
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
#DEBHELPER#
|
|
||||||
9
debian/postrm
vendored
9
debian/postrm
vendored
|
|
@ -1,9 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
if [ "$1" = purge ]; then
|
|
||||||
rm -f /etc/tinc/nets.boot
|
|
||||||
fi
|
|
||||||
|
|
||||||
#DEBHELPER#
|
|
||||||
28
debian/preinst
vendored
28
debian/preinst
vendored
|
|
@ -1,28 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
NETSFILE="/etc/tinc/nets.boot"
|
|
||||||
SYSTEM="/lib/systemd/system"
|
|
||||||
WANTS="/etc/systemd/system/multi-user.target.wants"
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
case "$1" in
|
|
||||||
upgrade)
|
|
||||||
if dpkg --compare-versions "$2" '<<' "1.0.27-1"; then
|
|
||||||
if [ -f "$NETSFILE" ]; then
|
|
||||||
echo -n "Creating systemd service instances from nets.boot:"
|
|
||||||
mkdir -p "$WANTS"
|
|
||||||
egrep '^[ ]*[a-zA-Z0-9_-]+' $NETSFILE | while read net args; do
|
|
||||||
echo -n " $net"
|
|
||||||
ln -s "$SYSTEM/tinc@.service" "$WANTS/tinc@$net.service" 2>/dev/null || true
|
|
||||||
done
|
|
||||||
echo "."
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
|
|
||||||
*)
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
#DEBHELPER#
|
|
||||||
16
debian/rules
vendored
16
debian/rules
vendored
|
|
@ -1,16 +0,0 @@
|
||||||
#!/usr/bin/make -f
|
|
||||||
|
|
||||||
%:
|
|
||||||
dh $@
|
|
||||||
|
|
||||||
override_dh_clean:
|
|
||||||
dh_clean
|
|
||||||
rm -f doc/tinc.info
|
|
||||||
|
|
||||||
override_dh_auto_configure:
|
|
||||||
dh_auto_configure -- --enable-uml --with-systemd=/lib/systemd/system --runstatedir=/run
|
|
||||||
|
|
||||||
override_dh_auto_install:
|
|
||||||
dh_auto_install -- install-html
|
|
||||||
# Remove info dir file
|
|
||||||
rm -f debian/tinc/usr/share/info/dir
|
|
||||||
1
debian/source/format
vendored
1
debian/source/format
vendored
|
|
@ -1 +0,0 @@
|
||||||
3.0 (quilt)
|
|
||||||
7
debian/tinc.default
vendored
7
debian/tinc.default
vendored
|
|
@ -1,7 +0,0 @@
|
||||||
# Extra options to be passed to tincd.
|
|
||||||
# EXTRA="-d"
|
|
||||||
|
|
||||||
# Limits to be configured for the tincd process. Please read your shell
|
|
||||||
# (pointed by /bin/sh) documentation for ulimit. You probably want to raise the
|
|
||||||
# max locked memory value if using both --mlock and --user flags.
|
|
||||||
# LIMITS="-l 1024"
|
|
||||||
7
debian/tinc.dirs
vendored
7
debian/tinc.dirs
vendored
|
|
@ -1,7 +0,0 @@
|
||||||
usr/sbin
|
|
||||||
usr/share
|
|
||||||
etc
|
|
||||||
etc/init.d
|
|
||||||
usr/share/locale
|
|
||||||
usr/share/doc/tinc
|
|
||||||
etc/tinc
|
|
||||||
3
debian/tinc.docs
vendored
3
debian/tinc.docs
vendored
|
|
@ -1,3 +0,0 @@
|
||||||
NEWS
|
|
||||||
README
|
|
||||||
AUTHORS
|
|
||||||
6
debian/tinc.files
vendored
6
debian/tinc.files
vendored
|
|
@ -1,6 +0,0 @@
|
||||||
usr/sbin/tincd
|
|
||||||
usr/share/man
|
|
||||||
etc
|
|
||||||
usr/share/doc/tinc
|
|
||||||
usr/share/locale
|
|
||||||
usr/share/info
|
|
||||||
41
debian/tinc.if-post-down
vendored
41
debian/tinc.if-post-down
vendored
|
|
@ -1,41 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
if [ "$METHOD" = loopback -o -z "$IF_TINC_NET" ]; then
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Determine location of the PID file
|
|
||||||
|
|
||||||
EXTRA=""
|
|
||||||
if [ -n "$IF_TINC_PIDFILE" ]; then
|
|
||||||
EXTRA="--pidfile=$IF_TINC_PIDFILE"
|
|
||||||
else
|
|
||||||
IF_TINC_PIDFILE=/var/run/tinc.$IF_TINC_NET.pid
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Stop the tinc daemon
|
|
||||||
|
|
||||||
read pid rest < $IF_TINC_PIDFILE 2>/dev/null
|
|
||||||
|
|
||||||
/usr/sbin/tincd -n "$IF_TINC_NET" -k $EXTRA
|
|
||||||
|
|
||||||
# Wait for it to shut down properly
|
|
||||||
|
|
||||||
/bin/sleep 0.1
|
|
||||||
i=0;
|
|
||||||
while [ -f $IF_TINC_PIDFILE ] ; do
|
|
||||||
if [ ! -e "/proc/$pid" ] ; then
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ $i = '30' ] ; then
|
|
||||||
echo 'Failed to stop tinc daemon!'
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
/bin/sleep 0.1
|
|
||||||
i=$(($i+1))
|
|
||||||
done
|
|
||||||
|
|
||||||
exit 0
|
|
||||||
70
debian/tinc.if-pre-up
vendored
70
debian/tinc.if-pre-up
vendored
|
|
@ -1,70 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
if [ "$METHOD" = loopback -o -z "$IF_TINC_NET" ]; then
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Read options from /etc/default
|
|
||||||
|
|
||||||
[ -r /etc/default/tinc ] && . /etc/default/tinc
|
|
||||||
|
|
||||||
# Set process limits
|
|
||||||
|
|
||||||
setlimits() {
|
|
||||||
while [ $# -gt 0 ]; do
|
|
||||||
parm=$1 ; shift
|
|
||||||
if [ -n "$1" -a "${1#-}" = "$1" ]; then
|
|
||||||
value=$1 ; shift
|
|
||||||
ulimit $parm $value
|
|
||||||
else
|
|
||||||
ulimit $parm
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
test -n "$LIMITS" && setlimits $LIMITS
|
|
||||||
|
|
||||||
# Read options from /etc/network/interfaces
|
|
||||||
|
|
||||||
[ -n "$IF_TINC_CONFIG" ] && EXTRA="$EXTRA -c $IF_TINC_CONFIG"
|
|
||||||
[ -n "$IF_TINC_DEBUG" ] && EXTRA="$EXTRA -d$IF_TINC_DEBUG"
|
|
||||||
[ -n "$IF_TINC_MLOCK" ] && EXTRA="$EXTRA --mlock"
|
|
||||||
[ -n "$IF_TINC_LOGFILE" ] && EXTRA="$EXTRA --logfile=$IF_TINC_LOGFILE"
|
|
||||||
[ -n "$IF_TINC_PIDFILE" ] && EXTRA="$EXTRA --pidfile=$IF_TINC_PIDFILE" || IF_TINC_PIDFILE=/var/run/tinc.$IF_TINC_NET.pid
|
|
||||||
[ -n "$IF_TINC_CHROOT" ] && EXTRA="$EXTRA --chroot"
|
|
||||||
[ -n "$IF_TINC_USER" ] && EXTRA="$EXTRA --user=$IF_TINC_USER"
|
|
||||||
|
|
||||||
|
|
||||||
# Start tinc daemon
|
|
||||||
|
|
||||||
/usr/sbin/tincd -n "$IF_TINC_NET" -o "Interface=$IFACE" $EXTRA
|
|
||||||
|
|
||||||
# Wait for it to come up properly
|
|
||||||
|
|
||||||
/bin/sleep 0.1
|
|
||||||
i=0;
|
|
||||||
while [ ! -f $IF_TINC_PIDFILE ] ; do
|
|
||||||
if [ $i = '30' ] ; then
|
|
||||||
echo 'Failed to start tinc daemon!'
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
/bin/sleep 0.1
|
|
||||||
i=$(($i+1))
|
|
||||||
done
|
|
||||||
|
|
||||||
while read pid rest < $IF_TINC_PIDFILE ; do
|
|
||||||
if [ -e "/proc/$pid" ] ; then
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ $i = '30' ] ; then
|
|
||||||
echo 'Failed to start tinc daemon!'
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
/bin/sleep 0.1
|
|
||||||
i=$(($i+1))
|
|
||||||
done
|
|
||||||
|
|
||||||
exit 0
|
|
||||||
9
debian/tinc.if-up
vendored
9
debian/tinc.if-up
vendored
|
|
@ -1,9 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
if [ "$METHOD" = loopback -o -n "$IF_TINC_NET" ]; then
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
invoke-rc.d tinc alarm || exit 0
|
|
||||||
140
debian/tinc.init
vendored
140
debian/tinc.init
vendored
|
|
@ -1,140 +0,0 @@
|
||||||
#! /bin/sh
|
|
||||||
#
|
|
||||||
### BEGIN INIT INFO
|
|
||||||
# Provides: tinc
|
|
||||||
# Required-Start: $remote_fs $network
|
|
||||||
# Required-Stop: $remote_fs $network
|
|
||||||
# Should-Start: $syslog $named
|
|
||||||
# Should-Stop: $syslog
|
|
||||||
# Default-Start: 2 3 4 5
|
|
||||||
# Default-Stop: 0 1 6
|
|
||||||
# Short-Description: Start tinc daemons
|
|
||||||
# Description: Create a file $NETSFILE (/etc/tinc/nets.boot),
|
|
||||||
# and put all the names of the networks in there.
|
|
||||||
# These names must be valid directory names under
|
|
||||||
# $TCONF (/etc/tinc). Lines starting with a # will be
|
|
||||||
# ignored in this file.
|
|
||||||
### END INIT INFO
|
|
||||||
#
|
|
||||||
# Based on Lubomir Bulej's Redhat init script.
|
|
||||||
|
|
||||||
. /lib/lsb/init-functions
|
|
||||||
|
|
||||||
DAEMON="/usr/sbin/tincd"
|
|
||||||
NAME="tinc"
|
|
||||||
DESC="tinc daemons"
|
|
||||||
TCONF="/etc/tinc"
|
|
||||||
NETSFILE="$TCONF/nets.boot"
|
|
||||||
NETS=""
|
|
||||||
|
|
||||||
test -f $DAEMON || exit 0
|
|
||||||
|
|
||||||
[ -r /etc/default/tinc ] && . /etc/default/tinc
|
|
||||||
|
|
||||||
# foreach_net "what-to-say" action [arguments...]
|
|
||||||
foreach_net() {
|
|
||||||
if [ ! -f $NETSFILE ] ; then
|
|
||||||
echo "Please create $NETSFILE."
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
echo -n "$1"
|
|
||||||
shift
|
|
||||||
egrep '^[ ]*[a-zA-Z0-9_-]+' $NETSFILE | while read net args; do
|
|
||||||
echo -n " $net"
|
|
||||||
"$@" $net $args
|
|
||||||
done
|
|
||||||
echo "."
|
|
||||||
}
|
|
||||||
|
|
||||||
signal_running() {
|
|
||||||
for i in /var/run/tinc.*pid; do
|
|
||||||
if [ -f "$i" ]; then
|
|
||||||
head -1 $i | while read pid; do
|
|
||||||
kill -$1 $pid
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
setlimits() {
|
|
||||||
while [ $# -gt 0 ]; do
|
|
||||||
parm=$1 ; shift
|
|
||||||
if [ -n "$1" -a "${1#-}" = "$1" ]; then
|
|
||||||
value=$1 ; shift
|
|
||||||
ulimit $parm $value
|
|
||||||
else
|
|
||||||
ulimit $parm
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
test -n "$LIMITS" && setlimits $LIMITS
|
|
||||||
|
|
||||||
start() {
|
|
||||||
$DAEMON $EXTRA -n "$@"
|
|
||||||
}
|
|
||||||
|
|
||||||
stop() {
|
|
||||||
[ -f /var/run/tinc.$1.pid ] || return
|
|
||||||
read pid rest </var/run/tinc.$1.pid || return
|
|
||||||
kill -0 "$pid" 2>/dev/null || return
|
|
||||||
|
|
||||||
$DAEMON -n $1 -k || return
|
|
||||||
|
|
||||||
i=0;
|
|
||||||
/bin/sleep 0.5
|
|
||||||
|
|
||||||
# Wait for the pidfile to disappear
|
|
||||||
while [ -f /var/run/tinc.$1.pid ]; do
|
|
||||||
# And check that there is an actual process running
|
|
||||||
kill -0 "$pid" 2>/dev/null || return
|
|
||||||
|
|
||||||
if [ $i = '10' ] ; then
|
|
||||||
# It's still alive, kill it again and give up
|
|
||||||
$DAEMON -n $1 -k && /bin/sleep 0.5
|
|
||||||
break
|
|
||||||
else
|
|
||||||
echo -n "."
|
|
||||||
i=$(($i+1))
|
|
||||||
fi
|
|
||||||
|
|
||||||
/bin/sleep 0.5
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
reload() {
|
|
||||||
$DAEMON -n $1 -kHUP
|
|
||||||
}
|
|
||||||
|
|
||||||
alarm() {
|
|
||||||
$DAEMON -n $1 -kALRM
|
|
||||||
}
|
|
||||||
|
|
||||||
restart() {
|
|
||||||
stop "$@"
|
|
||||||
start "$@"
|
|
||||||
}
|
|
||||||
|
|
||||||
case "$1" in
|
|
||||||
start)
|
|
||||||
foreach_net "Starting $DESC:" start
|
|
||||||
;;
|
|
||||||
stop)
|
|
||||||
foreach_net "Stopping $DESC:" stop
|
|
||||||
;;
|
|
||||||
reload|force-reload)
|
|
||||||
foreach_net "Reloading $DESC configuration:" reload
|
|
||||||
;;
|
|
||||||
restart)
|
|
||||||
foreach_net "Restarting $DESC:" restart
|
|
||||||
;;
|
|
||||||
alarm)
|
|
||||||
signal_running ALRM
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "Usage: /etc/init.d/$NAME {start|stop|reload|restart|force-reload|alarm}"
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
exit 0
|
|
||||||
70
debian/upstream/signing-key.asc
vendored
70
debian/upstream/signing-key.asc
vendored
|
|
@ -1,70 +0,0 @@
|
||||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
|
||||||
Version: GnuPG v1
|
|
||||||
|
|
||||||
mQINBEVZzTABEADawFv/ibQ48uA1eRhL07vdM36Pcq2HDyuyNA+vYEalNH4jLmha
|
|
||||||
nGPvDALWwX0DXIWDAG8zeTj8s8zliLIjuPS4WRI2YdKIvWeG9fEvpKSXVWa42ica
|
|
||||||
dpzn/H2aBd4Ax6rQaiTXKOvxANAp2Veb+73ssPV5AL00uGTpzhh98xQzfFQCZ9ZL
|
|
||||||
YSVPqbMed5oCt/4jM9FBO2CuBtkfiO0dVVYtW7FAVjcIlE2NaZol/KGvz7wsS+yA
|
|
||||||
dE42W0l5MdQueLmTF4AIUSSTyPFGMQoyqh+MPif73Y589IGcW6GdfKYWnVDo6Trh
|
|
||||||
HOhcEky+uTYKb6NL0vrJgUiYVMzAOXFDdJni1eQGO6EfZRNYtTga3alWq/jVelK7
|
|
||||||
BID5JyNbkrTAqdPnhJGivVyk8gGX3+Hng8rkXTfWhp6yAYau1QfBm0F2tIQmpL1C
|
|
||||||
+7DoLvFErboQf685jXJBjzyvsJxB2ZLH1OOw6mNL0hy2LFkIyGza/bktY2em4apo
|
|
||||||
KWV5AM5LpyW6THH1oDS7706xFNkf4IFhKE0hKPzBiRnMDjRtMI131lkc5+P8Lqf5
|
|
||||||
jLTCFUgbEhU6Dz2YjhHAumVm0NWJETUpFDtVvMrqk+mp5xldUOWRNlYQC5aQOyda
|
|
||||||
eHOlNzB/BFbPhKMWI/zWlEH6f0t6WjHb4iwpWO47511aVNHF59aPzbAHxwARAQAB
|
|
||||||
tC9UaW5jIERldmVsb3BtZW50IFRlYW0gPHRpbmMtZGV2ZWxAdGluYy12cG4ub3Jn
|
|
||||||
PokCNgQTAQIAIAUCRVnNMAIbAwYLCQgHAwIEFQIIAwQWAgMBAh4BAheAAAoJEEpg
|
|
||||||
hLnA1x9KxOAQAMPhO2WTXv9AaGQBQhyyoGseKoSfcRjtI9YEfE0OInQQ2E+SPYF/
|
|
||||||
dkfeLGAUqa4foTYQlMqfw70vBhTdVCb7HLTGn6/ICFUtDwakUQCgUQGlUVQiondA
|
|
||||||
8W6jj+QWrh5BQhHuXy2nCVaKnksu0/xQPsJotghxuYqaot3iJ4qVw9iT/Yeo9irH
|
|
||||||
Ffftqu0OVCdQ5zQuFNI9YCv/C83L59ecH7bOzYz2efTyobvxrhmgQtgOQwCWOE09
|
|
||||||
Kr3veM9KLG33YoXlqv8QN/3CwtsJvSwfhj+R2JowZC7RqHe/yznRzmRMsgbrolxi
|
|
||||||
uiJLonGxcNNkD7WhXi7/zL4A/JaC27XrFf1MPLv8aiTwnOIfrXd5jawpauUOZOXK
|
|
||||||
UjIZHlIqviB0r5s7A+AFeHW38Tp9VzNuQ7aEl5bHbSXV+s7DTAwGb279z0AVaJ3h
|
|
||||||
5hWFxupw7UoGdzROwCBYzeX3sioAL6QvkXua8X6zOH45VEiSwrRX3Hlx/MLo7Z4g
|
|
||||||
PWgFLf6WviHQXCG834To1XIwUk9RgNsL7OzGjtaCuRymADImKMNwierq2zTfoRFQ
|
|
||||||
v9onIadIMF1fsc70hiBG9yAi36MEuk4VxG8Jc3PQQfSFm4RWazv1k3E0AAIob2Ek
|
|
||||||
DLVjvLO62Navo/OQ6D7yyiX0qes5S7/k3F1h8+87eRn3yxZE2kbxPg8KuQENBEVZ
|
|
||||||
zYYBCACoYgExmMKEtABL3pir/IXI4exR/45hkP6txFIrkVQb8DGJ9H39kiDr4gtj
|
|
||||||
F+pvcgMpec35S3m4fJ7WhDNvbDB4ZvONc1NMKs9cqDXfB+TLWPm4W+SkcKUrs+nK
|
|
||||||
i8l7ieggTALJcvRoLTX2EFmUFrD6y870W3rK2SfC/0VJX8Ou5cPbwCeueExjo5x0
|
|
||||||
3gNfu0jWUS0cyA9y+1rVVekrLuJY/+SI4jv3gdzrYbxD0f6dpbpC37QHoJdd0KGF
|
|
||||||
acPtT2azjY+HxW10EA3Aw9oZWFXnb1nFg2RbDpkaGLmLbaXweltLyw154UmCXxym
|
|
||||||
PXPqi9bSfEkj0GiYrapk4mW114u9ABEBAAGJA0QEGAECAA8FAkVZzYcCGwIFCQHh
|
|
||||||
M4ABKQkQSmCEucDXH0rAXSAEGQECAAYFAkVZzYcACgkQ017duBDeLmmu3wf/TFZM
|
|
||||||
tLKxiyQPtGSTE3eULPdWCEMDZXdSPTY0QHM7Zvh+qn1ei+iFpD0549MYnBEAwDIV
|
|
||||||
4o62Nrcg8IPu0CEkZIAn2JiFFGYvMGk91awZGV1GS3umd7Dt349E1oKDPZVzRn+j
|
|
||||||
QIKarXxxabRmx2s/dZZgSs/eguWTboBFmvls9tVfe8x/xPvcHFmqHVUoGKEJy6Tm
|
|
||||||
no+s4yNjpc5wAaRml+GYf1tK9WMFuZn79qKxkYv4WI96dXR0FL59YbFRkkaI+1/b
|
|
||||||
G31MvWTqVjY1nJGslByFPUUB8Ca1djtp1gx6NXnOYr3V5MEDfdbjjPu79No+/y6M
|
|
||||||
tIua5yNtSRlk2nKhIqo3D/sGQ/uHijiMRAtoLhiyqYMc9W9vx/KOoCUHoMJqE39a
|
|
||||||
Eputvgwwo0rwgSmNfB1dzneFojBdJ47WBSHC8NKtkpJj6mzvvlaI9jmEpK54x3nl
|
|
||||||
OmBj3X/xaepoRGAtrmgTBP4A9hSjrTMGu/tUQjlX+Xcr6n3g7GSVe5FpUyIMPXEU
|
|
||||||
+JZDTiEUyn1OdzfNGmnWP+KJX5pQVq4czf5XK6otLZJELDVw/Hbjnjmdz5WOKgEH
|
|
||||||
jSof3WPeMBgPAcd/cMAZeiGtWM1UpJBHqEXTkthmrpmtRftJKDbooNM9d5OwKiT+
|
|
||||||
I3vNBv/plMSr8NDjhTWC+ihrN6RBj1vaqpDgGpucPhoO2hwNqWuI4q5WUKtCyw6J
|
|
||||||
An7ErNaH4c0nVaZq6kJ8Vxdt+LpKYmOsJ8y9xtl6StcrkKNn+6ZfCfee7DEo2bvb
|
|
||||||
scfpqJqqOqb5KOagTpYs8mo6yQ3leRvFtoeBOQHVQzct23EwOMxbDyeunT50a1eH
|
|
||||||
MZTEWuIiuCUudM81QXU46oIcaAtj8tpG0Tmnku9g27EjwxUt+8kVmhlPHMb2TdoF
|
|
||||||
k5d0ce+JuxIG5+i+t8sUCorMc8zfp4g1bxZeMOcPnfyO3bSW11EVcN7ZxHlFC+XE
|
|
||||||
YOByP50CM3P8lItPlQ+WpY9kYWjiwu9kVPaGQ16G47nspngJInU5dhka3KJGtIZe
|
|
||||||
q7kBDQRFWc3GAQgAz/JUs24niKsd0ZtOjUWd4R4y0gjS0kC/vvLL2gbXYkA9tcjG
|
|
||||||
5iEvVWJY34QsudX0v1ULsVnJ89X/gsk8hAhAia1TQm+0Qq+MSxEaQkMSaOO8N70U
|
|
||||||
XzgH1dielvpea20WO4MyWQuRIJ0K2nsGmEPnt6ZP7fK8HVHFNggP/mQ6LMu1reAF
|
|
||||||
gvb8cEtjb9B5QaCUEoLjsbsuo+vLW7AWy4GfIRNESHw2Qt08AUaGrihpu6zi7N2b
|
|
||||||
QkHHJtqa63GzYJ+kYzAVvrFJXdwL/TRXLBzv+6yyvYSIHi8uB6/o6CZN6hpjfpME
|
|
||||||
ph+oYPqXeNOyMd1E9Kg8ymcPrNyQKfE3WnCRXQARAQABiQIlBBgBAgAPBQJFWc3H
|
|
||||||
AhsMBQkB4TOAAAoJEEpghLnA1x9KXYMP/3D9JYti6C8DWuX2hWv+2SUbLcMa5u1e
|
|
||||||
ETewIo5S3mqGWSaxX4YLPVRkZ1lOLmFysOLimf0thYm7IsatLcWmBdYUpK92ilvr
|
|
||||||
Sk2sKlhrOoBXEX/79Kz+Aj5PjeyiQxgQ7Ba/afwhU6aTqs2Dp1T0YNu2eBvV+1QH
|
|
||||||
lZnW2Wh96zzwc0dJUuY9eBk5Fgpu08Wce7o6jxFPtVyAaQa0zcNAmw2TSY7wbunJ
|
|
||||||
WTl9OgATAyqVCuhWW7AnPcSqkH8lQigSc00wfqJKOD2Us0FqN6UKDCZTyQkdP6hx
|
|
||||||
G+3aUkkvGSOxy7u9bVWmrikuJMoiIY/CH/m+GcJJATVibI7t5MhhtBGySKc3PAwc
|
|
||||||
58sVe9AnbDvs84efrNP59j2KG2KKqcqjTGAmKyJnG3N50xJGakDIsqfneIRNWpEE
|
|
||||||
pOOPaOqR4qnPAS9OSt9A3hqBpWPjQcScd6AuO+J2PE5y23pTnb9PtLBQb5e4VFiv
|
|
||||||
N54u8j4bU2CO0SC2isZ3CR68dPHthWsxt4XbjhgktjbpQRQ8L2EDBQ8oE13GOrOw
|
|
||||||
P8x4Q0eC5uzkXNyRqzKOsxlZEuc+75aDDd3M2GDw08FG7GI1p/L+NgenwT+9TmFX
|
|
||||||
2hOKVrjgyx+fPut1t5DJJubDWXGOK33qvrL7HTCEv1zz7LNbbPwwNHK4lfMAWuJW
|
|
||||||
D9wc3Y9Se/P/
|
|
||||||
=5MAs
|
|
||||||
-----END PGP PUBLIC KEY BLOCK-----
|
|
||||||
2
debian/watch
vendored
2
debian/watch
vendored
|
|
@ -1,2 +0,0 @@
|
||||||
version=3
|
|
||||||
opts=pgpsigurlmangle=s/$/.sig/ http://www.tinc-vpn.org/packages/tinc-(1\.0\.\d+)\.tar\.gz
|
|
||||||
10
depcomp
10
depcomp
|
|
@ -1,9 +1,9 @@
|
||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# depcomp - compile a program generating dependencies as side-effects
|
# depcomp - compile a program generating dependencies as side-effects
|
||||||
|
|
||||||
scriptversion=2018-03-07.03; # UTC
|
scriptversion=2013-05-30.07; # UTC
|
||||||
|
|
||||||
# Copyright (C) 1999-2020 Free Software Foundation, Inc.
|
# Copyright (C) 1999-2013 Free Software Foundation, Inc.
|
||||||
|
|
||||||
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -16,7 +16,7 @@ scriptversion=2018-03-07.03; # UTC
|
||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
# As a special exception to the GNU General Public License, if you
|
# As a special exception to the GNU General Public License, if you
|
||||||
# distribute this file as part of a program that contains a
|
# distribute this file as part of a program that contains a
|
||||||
|
|
@ -783,9 +783,9 @@ exit 0
|
||||||
# Local Variables:
|
# Local Variables:
|
||||||
# mode: shell-script
|
# mode: shell-script
|
||||||
# sh-indentation: 2
|
# sh-indentation: 2
|
||||||
# eval: (add-hook 'before-save-hook 'time-stamp)
|
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||||
# time-stamp-start: "scriptversion="
|
# time-stamp-start: "scriptversion="
|
||||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||||
# time-stamp-time-zone: "UTC0"
|
# time-stamp-time-zone: "UTC"
|
||||||
# time-stamp-end: "; # UTC"
|
# time-stamp-end: "; # UTC"
|
||||||
# End:
|
# End:
|
||||||
|
|
|
||||||
|
|
@ -1,35 +1,58 @@
|
||||||
## Process this file with automake to get Makefile.in
|
## Process this file with automake to get Makefile.in
|
||||||
|
|
||||||
info_TEXINFOS = tinc.texi
|
info_TEXINFOS = tinc.texi
|
||||||
tinc_TEXINFOS = tincinclude.texi
|
|
||||||
|
|
||||||
man_MANS = tincd.8 tinc.conf.5
|
man_MANS = tincd.8 tinc.8 tinc.conf.5 tinc-gui.8
|
||||||
|
|
||||||
EXTRA_DIST = tincinclude.texi.in tincd.8.in tinc.conf.5.in sample-config
|
EXTRA_DIST = tincinclude.texi.in tincd.8.in tinc.8.in tinc.conf.5.in tinc-gui.8.in sample-config.tar.gz
|
||||||
|
|
||||||
CLEANFILES = *.html tincd.8 tinc.conf.5 tincinclude.texi
|
CLEANFILES = *.html tinc.info tincd.8 tinc.8 tinc.conf.5 tinc-gui.8 tincinclude.texi
|
||||||
|
|
||||||
|
# Use `ginstall' in the definition of man_MANS to avoid
|
||||||
|
# confusion with the `install' target. The install rule transforms `ginstall'
|
||||||
|
# to install before applying any user-specified name transformations.
|
||||||
|
transform = s/ginstall/install/; @program_transform_name@
|
||||||
|
|
||||||
|
# For additional rules usually of interest only to the maintainer,
|
||||||
|
# see GNUmakefile and Makefile.maint.
|
||||||
|
|
||||||
|
sample-config.tar.gz: sample-config
|
||||||
|
GZIP=$(GZIP_ENV) $(AMTAR) chozf sample-config.tar.gz --exclude .svn sample-config
|
||||||
|
|
||||||
texi2html: tinc.texi
|
texi2html: tinc.texi
|
||||||
$(AM_V_GEN)texi2html -split=chapter $<
|
texi2html -split=chapter tinc.texi
|
||||||
|
|
||||||
tincd.8.html: tincd.8
|
tincd.8.html: tincd.8
|
||||||
$(AM_V_GEN)w3mman2html $< > $@
|
w3mman2html $? > $@
|
||||||
|
|
||||||
|
tinc.8.html: tinc.8
|
||||||
|
w3mman2html $? > $@
|
||||||
|
|
||||||
|
tinc-gui.8.html: tinc-gui.8
|
||||||
|
w3mman2html $? > $@
|
||||||
|
|
||||||
tinc.conf.5.html: tinc.conf.5
|
tinc.conf.5.html: tinc.conf.5
|
||||||
$(AM_V_GEN)w3mman2html $< > $@
|
w3mman2html $? > $@
|
||||||
|
|
||||||
substitute = sed \
|
substitute = sed \
|
||||||
-e s,'@PACKAGE\@',"$(PACKAGE)",g \
|
-e s,'@PACKAGE\@',"$(PACKAGE)",g \
|
||||||
-e s,'@VERSION\@',"$(VERSION)",g \
|
-e s,'@VERSION\@',"$(VERSION)",g \
|
||||||
-e s,'@sysconfdir\@',"$(sysconfdir)",g \
|
-e s,'@sysconfdir\@',"$(sysconfdir)",g \
|
||||||
-e s,'@runstatedir\@',"$(runstatedir)",g \
|
|
||||||
-e s,'@localstatedir\@',"$(localstatedir)",g
|
-e s,'@localstatedir\@',"$(localstatedir)",g
|
||||||
|
|
||||||
tincd.8: $(srcdir)/tincd.8.in
|
tincd.8: tincd.8.in
|
||||||
$(AM_V_GEN)$(substitute) $(srcdir)/tincd.8.in > $@
|
$(substitute) $? > $@
|
||||||
|
|
||||||
tinc.conf.5: $(srcdir)/tinc.conf.5.in
|
tinc.8: tinc.8.in
|
||||||
$(AM_V_GEN)$(substitute) $(srcdir)/tinc.conf.5.in > $@
|
$(substitute) $? > $@
|
||||||
|
|
||||||
tincinclude.texi: $(srcdir)/tincinclude.texi.in
|
tinc-gui.8: tinc-gui.8.in
|
||||||
$(AM_V_GEN)$(substitute) $(srcdir)/tincinclude.texi.in > $@
|
$(substitute) $? > $@
|
||||||
|
|
||||||
|
tinc.conf.5: tinc.conf.5.in
|
||||||
|
$(substitute) $? > $@
|
||||||
|
|
||||||
|
tincinclude.texi: tincinclude.texi.in
|
||||||
|
$(substitute) $? > $@
|
||||||
|
|
||||||
|
tinc.texi: tincinclude.texi
|
||||||
|
|
|
||||||
136
doc/Makefile.in
136
doc/Makefile.in
|
|
@ -1,7 +1,7 @@
|
||||||
# Makefile.in generated by automake 1.16.2 from Makefile.am.
|
# Makefile.in generated by automake 1.13.3 from Makefile.am.
|
||||||
# @configure_input@
|
# @configure_input@
|
||||||
|
|
||||||
# Copyright (C) 1994-2020 Free Software Foundation, Inc.
|
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
|
||||||
|
|
||||||
# This Makefile.in is free software; the Free Software Foundation
|
# This Makefile.in is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
|
@ -14,17 +14,7 @@
|
||||||
|
|
||||||
@SET_MAKE@
|
@SET_MAKE@
|
||||||
VPATH = @srcdir@
|
VPATH = @srcdir@
|
||||||
am__is_gnu_make = { \
|
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
|
||||||
if test -z '$(MAKELEVEL)'; then \
|
|
||||||
false; \
|
|
||||||
elif test -n '$(MAKE_HOST)'; then \
|
|
||||||
true; \
|
|
||||||
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
|
|
||||||
true; \
|
|
||||||
else \
|
|
||||||
false; \
|
|
||||||
fi; \
|
|
||||||
}
|
|
||||||
am__make_running_with_option = \
|
am__make_running_with_option = \
|
||||||
case $${target_option-} in \
|
case $${target_option-} in \
|
||||||
?) ;; \
|
?) ;; \
|
||||||
|
|
@ -78,7 +68,6 @@ install_sh_DATA = $(install_sh) -c -m 644
|
||||||
install_sh_PROGRAM = $(install_sh) -c
|
install_sh_PROGRAM = $(install_sh) -c
|
||||||
install_sh_SCRIPT = $(install_sh) -c
|
install_sh_SCRIPT = $(install_sh) -c
|
||||||
INSTALL_HEADER = $(INSTALL_DATA)
|
INSTALL_HEADER = $(INSTALL_DATA)
|
||||||
transform = $(program_transform_name)
|
|
||||||
NORMAL_INSTALL = :
|
NORMAL_INSTALL = :
|
||||||
PRE_INSTALL = :
|
PRE_INSTALL = :
|
||||||
POST_INSTALL = :
|
POST_INSTALL = :
|
||||||
|
|
@ -88,18 +77,14 @@ POST_UNINSTALL = :
|
||||||
build_triplet = @build@
|
build_triplet = @build@
|
||||||
host_triplet = @host@
|
host_triplet = @host@
|
||||||
subdir = doc
|
subdir = doc
|
||||||
|
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am texinfo.tex
|
||||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||||
am__aclocal_m4_deps = $(top_srcdir)/m4/attribute.m4 \
|
am__aclocal_m4_deps = $(top_srcdir)/m4/attribute.m4 \
|
||||||
$(top_srcdir)/m4/ax_append_flag.m4 \
|
$(top_srcdir)/m4/curses.m4 $(top_srcdir)/m4/lzo.m4 \
|
||||||
$(top_srcdir)/m4/ax_cflags_warn_all.m4 \
|
$(top_srcdir)/m4/openssl.m4 $(top_srcdir)/m4/readline.m4 \
|
||||||
$(top_srcdir)/m4/ax_check_compile_flag.m4 \
|
$(top_srcdir)/m4/zlib.m4 $(top_srcdir)/configure.ac
|
||||||
$(top_srcdir)/m4/ax_check_link_flag.m4 \
|
|
||||||
$(top_srcdir)/m4/ax_require_defined.m4 $(top_srcdir)/m4/lzo.m4 \
|
|
||||||
$(top_srcdir)/m4/openssl.m4 $(top_srcdir)/m4/zlib.m4 \
|
|
||||||
$(top_srcdir)/configure.ac
|
|
||||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||||
$(ACLOCAL_M4)
|
$(ACLOCAL_M4)
|
||||||
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
|
|
||||||
mkinstalldirs = $(install_sh) -d
|
mkinstalldirs = $(install_sh) -d
|
||||||
CONFIG_HEADER = $(top_builddir)/config.h
|
CONFIG_HEADER = $(top_builddir)/config.h
|
||||||
CONFIG_CLEAN_FILES =
|
CONFIG_CLEAN_FILES =
|
||||||
|
|
@ -146,7 +131,7 @@ AM_V_texidevnull = $(am__v_texidevnull_@AM_V@)
|
||||||
am__v_texidevnull_ = $(am__v_texidevnull_@AM_DEFAULT_V@)
|
am__v_texidevnull_ = $(am__v_texidevnull_@AM_DEFAULT_V@)
|
||||||
am__v_texidevnull_0 = > /dev/null
|
am__v_texidevnull_0 = > /dev/null
|
||||||
am__v_texidevnull_1 =
|
am__v_texidevnull_1 =
|
||||||
INFO_DEPS = $(srcdir)/tinc.info
|
INFO_DEPS = tinc.info
|
||||||
am__TEXINFO_TEX_DIR = $(srcdir)
|
am__TEXINFO_TEX_DIR = $(srcdir)
|
||||||
DVIS = tinc.dvi
|
DVIS = tinc.dvi
|
||||||
PDFS = tinc.pdf
|
PDFS = tinc.pdf
|
||||||
|
|
@ -197,8 +182,12 @@ man8dir = $(mandir)/man8
|
||||||
NROFF = nroff
|
NROFF = nroff
|
||||||
MANS = $(man_MANS)
|
MANS = $(man_MANS)
|
||||||
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
|
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
|
||||||
am__DIST_COMMON = $(srcdir)/Makefile.in $(tinc_TEXINFOS) texinfo.tex
|
|
||||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||||
|
|
||||||
|
# Use `ginstall' in the definition of man_MANS to avoid
|
||||||
|
# confusion with the `install' target. The install rule transforms `ginstall'
|
||||||
|
# to install before applying any user-specified name transformations.
|
||||||
|
transform = s/ginstall/install/; @program_transform_name@
|
||||||
ACLOCAL = @ACLOCAL@
|
ACLOCAL = @ACLOCAL@
|
||||||
AMTAR = @AMTAR@
|
AMTAR = @AMTAR@
|
||||||
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||||
|
|
@ -211,6 +200,7 @@ CCDEPMODE = @CCDEPMODE@
|
||||||
CFLAGS = @CFLAGS@
|
CFLAGS = @CFLAGS@
|
||||||
CPP = @CPP@
|
CPP = @CPP@
|
||||||
CPPFLAGS = @CPPFLAGS@
|
CPPFLAGS = @CPPFLAGS@
|
||||||
|
CURSES_LIBS = @CURSES_LIBS@
|
||||||
CYGPATH_W = @CYGPATH_W@
|
CYGPATH_W = @CYGPATH_W@
|
||||||
DEFS = @DEFS@
|
DEFS = @DEFS@
|
||||||
DEPDIR = @DEPDIR@
|
DEPDIR = @DEPDIR@
|
||||||
|
|
@ -226,8 +216,12 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||||
LDFLAGS = @LDFLAGS@
|
LDFLAGS = @LDFLAGS@
|
||||||
|
LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
|
||||||
|
LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
|
||||||
|
LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@
|
||||||
LIBOBJS = @LIBOBJS@
|
LIBOBJS = @LIBOBJS@
|
||||||
LIBS = @LIBS@
|
LIBS = @LIBS@
|
||||||
|
LN_S = @LN_S@
|
||||||
LTLIBOBJS = @LTLIBOBJS@
|
LTLIBOBJS = @LTLIBOBJS@
|
||||||
MAKEINFO = @MAKEINFO@
|
MAKEINFO = @MAKEINFO@
|
||||||
MKDIR_P = @MKDIR_P@
|
MKDIR_P = @MKDIR_P@
|
||||||
|
|
@ -240,6 +234,8 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||||
PACKAGE_URL = @PACKAGE_URL@
|
PACKAGE_URL = @PACKAGE_URL@
|
||||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||||
|
RANLIB = @RANLIB@
|
||||||
|
READLINE_LIBS = @READLINE_LIBS@
|
||||||
SET_MAKE = @SET_MAKE@
|
SET_MAKE = @SET_MAKE@
|
||||||
SHELL = @SHELL@
|
SHELL = @SHELL@
|
||||||
STRIP = @STRIP@
|
STRIP = @STRIP@
|
||||||
|
|
@ -286,32 +282,28 @@ pdfdir = @pdfdir@
|
||||||
prefix = @prefix@
|
prefix = @prefix@
|
||||||
program_transform_name = @program_transform_name@
|
program_transform_name = @program_transform_name@
|
||||||
psdir = @psdir@
|
psdir = @psdir@
|
||||||
runstatedir = @runstatedir@
|
|
||||||
sbindir = @sbindir@
|
sbindir = @sbindir@
|
||||||
sharedstatedir = @sharedstatedir@
|
sharedstatedir = @sharedstatedir@
|
||||||
srcdir = @srcdir@
|
srcdir = @srcdir@
|
||||||
sysconfdir = @sysconfdir@
|
sysconfdir = @sysconfdir@
|
||||||
systemd_path = @systemd_path@
|
|
||||||
target_alias = @target_alias@
|
target_alias = @target_alias@
|
||||||
top_build_prefix = @top_build_prefix@
|
top_build_prefix = @top_build_prefix@
|
||||||
top_builddir = @top_builddir@
|
top_builddir = @top_builddir@
|
||||||
top_srcdir = @top_srcdir@
|
top_srcdir = @top_srcdir@
|
||||||
info_TEXINFOS = tinc.texi
|
info_TEXINFOS = tinc.texi
|
||||||
tinc_TEXINFOS = tincinclude.texi
|
man_MANS = tincd.8 tinc.8 tinc.conf.5 tinc-gui.8
|
||||||
man_MANS = tincd.8 tinc.conf.5
|
EXTRA_DIST = tincinclude.texi.in tincd.8.in tinc.8.in tinc.conf.5.in tinc-gui.8.in sample-config.tar.gz
|
||||||
EXTRA_DIST = tincinclude.texi.in tincd.8.in tinc.conf.5.in sample-config
|
CLEANFILES = *.html tinc.info tincd.8 tinc.8 tinc.conf.5 tinc-gui.8 tincinclude.texi
|
||||||
CLEANFILES = *.html tincd.8 tinc.conf.5 tincinclude.texi
|
|
||||||
substitute = sed \
|
substitute = sed \
|
||||||
-e s,'@PACKAGE\@',"$(PACKAGE)",g \
|
-e s,'@PACKAGE\@',"$(PACKAGE)",g \
|
||||||
-e s,'@VERSION\@',"$(VERSION)",g \
|
-e s,'@VERSION\@',"$(VERSION)",g \
|
||||||
-e s,'@sysconfdir\@',"$(sysconfdir)",g \
|
-e s,'@sysconfdir\@',"$(sysconfdir)",g \
|
||||||
-e s,'@runstatedir\@',"$(runstatedir)",g \
|
|
||||||
-e s,'@localstatedir\@',"$(localstatedir)",g
|
-e s,'@localstatedir\@',"$(localstatedir)",g
|
||||||
|
|
||||||
all: all-am
|
all: all-am
|
||||||
|
|
||||||
.SUFFIXES:
|
.SUFFIXES:
|
||||||
.SUFFIXES: .dvi .html .info .pdf .ps .texi
|
.SUFFIXES: .dvi .ps
|
||||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||||
@for dep in $?; do \
|
@for dep in $?; do \
|
||||||
case '$(am__configure_deps)' in \
|
case '$(am__configure_deps)' in \
|
||||||
|
|
@ -324,13 +316,14 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \
|
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \
|
||||||
$(am__cd) $(top_srcdir) && \
|
$(am__cd) $(top_srcdir) && \
|
||||||
$(AUTOMAKE) --gnu doc/Makefile
|
$(AUTOMAKE) --gnu doc/Makefile
|
||||||
|
.PRECIOUS: Makefile
|
||||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||||
@case '$?' in \
|
@case '$?' in \
|
||||||
*config.status*) \
|
*config.status*) \
|
||||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||||
*) \
|
*) \
|
||||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
|
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
|
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||||
esac;
|
esac;
|
||||||
|
|
||||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||||
|
|
@ -342,53 +335,49 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||||
$(am__aclocal_m4_deps):
|
$(am__aclocal_m4_deps):
|
||||||
|
|
||||||
.texi.info:
|
tinc.info: tinc.texi
|
||||||
$(AM_V_MAKEINFO)restore=: && backupdir="$(am__leading_dot)am$$$$" && \
|
$(AM_V_MAKEINFO)restore=: && backupdir="$(am__leading_dot)am$$$$" && \
|
||||||
am__cwd=`pwd` && $(am__cd) $(srcdir) && \
|
|
||||||
rm -rf $$backupdir && mkdir $$backupdir && \
|
rm -rf $$backupdir && mkdir $$backupdir && \
|
||||||
if ($(MAKEINFO) --version) >/dev/null 2>&1; then \
|
if ($(MAKEINFO) --version) >/dev/null 2>&1; then \
|
||||||
for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \
|
for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \
|
||||||
if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \
|
if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \
|
||||||
done; \
|
done; \
|
||||||
else :; fi && \
|
else :; fi && \
|
||||||
cd "$$am__cwd"; \
|
|
||||||
if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
|
if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
|
||||||
-o $@ $<; \
|
-o $@ `test -f 'tinc.texi' || echo '$(srcdir)/'`tinc.texi; \
|
||||||
then \
|
then \
|
||||||
rc=0; \
|
rc=0; \
|
||||||
$(am__cd) $(srcdir); \
|
|
||||||
else \
|
else \
|
||||||
rc=$$?; \
|
rc=$$?; \
|
||||||
$(am__cd) $(srcdir) && \
|
|
||||||
$$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \
|
$$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \
|
||||||
fi; \
|
fi; \
|
||||||
rm -rf $$backupdir; exit $$rc
|
rm -rf $$backupdir; exit $$rc
|
||||||
|
|
||||||
.texi.dvi:
|
tinc.dvi: tinc.texi
|
||||||
$(AM_V_TEXI2DVI)TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
|
$(AM_V_TEXI2DVI)TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
|
||||||
MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
|
MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
|
||||||
$(TEXI2DVI) $(AM_V_texinfo) --build-dir=$(@:.dvi=.t2d) -o $@ $(AM_V_texidevnull) \
|
$(TEXI2DVI) $(AM_V_texinfo) --build-dir=$(@:.dvi=.t2d) -o $@ $(AM_V_texidevnull) \
|
||||||
$<
|
`test -f 'tinc.texi' || echo '$(srcdir)/'`tinc.texi
|
||||||
|
|
||||||
.texi.pdf:
|
tinc.pdf: tinc.texi
|
||||||
$(AM_V_TEXI2PDF)TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
|
$(AM_V_TEXI2PDF)TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
|
||||||
MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
|
MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
|
||||||
$(TEXI2PDF) $(AM_V_texinfo) --build-dir=$(@:.pdf=.t2p) -o $@ $(AM_V_texidevnull) \
|
$(TEXI2PDF) $(AM_V_texinfo) --build-dir=$(@:.pdf=.t2p) -o $@ $(AM_V_texidevnull) \
|
||||||
$<
|
`test -f 'tinc.texi' || echo '$(srcdir)/'`tinc.texi
|
||||||
|
|
||||||
.texi.html:
|
tinc.html: tinc.texi
|
||||||
$(AM_V_MAKEINFO)rm -rf $(@:.html=.htp)
|
$(AM_V_MAKEINFO)rm -rf $(@:.html=.htp)
|
||||||
$(AM_V_at)if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
|
$(AM_V_at)if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
|
||||||
-o $(@:.html=.htp) $<; \
|
-o $(@:.html=.htp) `test -f 'tinc.texi' || echo '$(srcdir)/'`tinc.texi; \
|
||||||
then \
|
then \
|
||||||
rm -rf $@ && mv $(@:.html=.htp) $@; \
|
rm -rf $@; \
|
||||||
|
if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \
|
||||||
|
mv $(@:.html=) $@; else mv $(@:.html=.htp) $@; fi; \
|
||||||
else \
|
else \
|
||||||
rm -rf $(@:.html=.htp); exit 1; \
|
if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \
|
||||||
|
rm -rf $(@:.html=); else rm -Rf $(@:.html=.htp) $@; fi; \
|
||||||
|
exit 1; \
|
||||||
fi
|
fi
|
||||||
$(srcdir)/tinc.info: tinc.texi $(tinc_TEXINFOS)
|
|
||||||
tinc.dvi: tinc.texi $(tinc_TEXINFOS)
|
|
||||||
tinc.pdf: tinc.texi $(tinc_TEXINFOS)
|
|
||||||
tinc.html: tinc.texi $(tinc_TEXINFOS)
|
|
||||||
.dvi.ps:
|
.dvi.ps:
|
||||||
$(AM_V_DVIPS)TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
|
$(AM_V_DVIPS)TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
|
||||||
$(DVIPS) $(AM_V_texinfo) -o $@ $<
|
$(DVIPS) $(AM_V_texinfo) -o $@ $<
|
||||||
|
|
@ -575,10 +564,7 @@ ctags CTAGS:
|
||||||
cscope cscopelist:
|
cscope cscopelist:
|
||||||
|
|
||||||
|
|
||||||
distdir: $(BUILT_SOURCES)
|
distdir: $(DISTFILES)
|
||||||
$(MAKE) $(AM_MAKEFLAGS) distdir-am
|
|
||||||
|
|
||||||
distdir-am: $(DISTFILES)
|
|
||||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||||
list='$(DISTFILES)'; \
|
list='$(DISTFILES)'; \
|
||||||
|
|
@ -827,26 +813,44 @@ uninstall-man: uninstall-man5 uninstall-man8
|
||||||
uninstall-html-am uninstall-info-am uninstall-man \
|
uninstall-html-am uninstall-info-am uninstall-man \
|
||||||
uninstall-man5 uninstall-man8 uninstall-pdf-am uninstall-ps-am
|
uninstall-man5 uninstall-man8 uninstall-pdf-am uninstall-ps-am
|
||||||
|
|
||||||
.PRECIOUS: Makefile
|
|
||||||
|
|
||||||
|
# For additional rules usually of interest only to the maintainer,
|
||||||
|
# see GNUmakefile and Makefile.maint.
|
||||||
|
|
||||||
|
sample-config.tar.gz: sample-config
|
||||||
|
GZIP=$(GZIP_ENV) $(AMTAR) chozf sample-config.tar.gz --exclude .svn sample-config
|
||||||
|
|
||||||
texi2html: tinc.texi
|
texi2html: tinc.texi
|
||||||
$(AM_V_GEN)texi2html -split=chapter $<
|
texi2html -split=chapter tinc.texi
|
||||||
|
|
||||||
tincd.8.html: tincd.8
|
tincd.8.html: tincd.8
|
||||||
$(AM_V_GEN)w3mman2html $< > $@
|
w3mman2html $? > $@
|
||||||
|
|
||||||
|
tinc.8.html: tinc.8
|
||||||
|
w3mman2html $? > $@
|
||||||
|
|
||||||
|
tinc-gui.8.html: tinc-gui.8
|
||||||
|
w3mman2html $? > $@
|
||||||
|
|
||||||
tinc.conf.5.html: tinc.conf.5
|
tinc.conf.5.html: tinc.conf.5
|
||||||
$(AM_V_GEN)w3mman2html $< > $@
|
w3mman2html $? > $@
|
||||||
|
|
||||||
tincd.8: $(srcdir)/tincd.8.in
|
tincd.8: tincd.8.in
|
||||||
$(AM_V_GEN)$(substitute) $(srcdir)/tincd.8.in > $@
|
$(substitute) $? > $@
|
||||||
|
|
||||||
tinc.conf.5: $(srcdir)/tinc.conf.5.in
|
tinc.8: tinc.8.in
|
||||||
$(AM_V_GEN)$(substitute) $(srcdir)/tinc.conf.5.in > $@
|
$(substitute) $? > $@
|
||||||
|
|
||||||
tincinclude.texi: $(srcdir)/tincinclude.texi.in
|
tinc-gui.8: tinc-gui.8.in
|
||||||
$(AM_V_GEN)$(substitute) $(srcdir)/tincinclude.texi.in > $@
|
$(substitute) $? > $@
|
||||||
|
|
||||||
|
tinc.conf.5: tinc.conf.5.in
|
||||||
|
$(substitute) $? > $@
|
||||||
|
|
||||||
|
tincinclude.texi: tincinclude.texi.in
|
||||||
|
$(substitute) $? > $@
|
||||||
|
|
||||||
|
tinc.texi: tincinclude.texi
|
||||||
|
|
||||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||||
|
|
|
||||||
BIN
doc/sample-config.tar.gz
Normal file
BIN
doc/sample-config.tar.gz
Normal file
Binary file not shown.
|
|
@ -1,15 +0,0 @@
|
||||||
# Sample host configuration file
|
|
||||||
|
|
||||||
# The real IP address of this tinc host. Can be used by other tinc hosts.
|
|
||||||
Address = 123.234.35.67
|
|
||||||
|
|
||||||
# Portnumber for incoming connections. Default is 655.
|
|
||||||
Port = 655
|
|
||||||
|
|
||||||
# Subnet on the virtual private network that is local for this host.
|
|
||||||
Subnet = 192.168.1.0/24
|
|
||||||
|
|
||||||
# The public key generated by `tincd -n example -K' is stored here
|
|
||||||
-----BEGIN RSA PUBLIC KEY-----
|
|
||||||
...
|
|
||||||
-----END RSA PUBLIC KEY-----
|
|
||||||
|
|
@ -1,16 +0,0 @@
|
||||||
# Sample host configuration file
|
|
||||||
# This file was generated by host beta.
|
|
||||||
|
|
||||||
# The real IP address of this tinc host. Can be used by other tinc hosts.
|
|
||||||
Address = 123.45.67.189
|
|
||||||
|
|
||||||
# Portnumber for incoming connections. Default is 655.
|
|
||||||
Port = 6500
|
|
||||||
|
|
||||||
# Subnet on the virtual private network that is local for this host.
|
|
||||||
Subnet = 192.168.2.0/24
|
|
||||||
|
|
||||||
# The public key generated by `tincd -n example -K' is stored here
|
|
||||||
-----BEGIN RSA PUBLIC KEY-----
|
|
||||||
...
|
|
||||||
-----END RSA PUBLIC KEY-----
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
# Generate this file with `tincd -n example -K`
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
# This file closes down the tap device.
|
|
||||||
|
|
||||||
ifconfig $INTERFACE down
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
# This file sets up the tap device.
|
|
||||||
# It gives you the freedom to do anything you want with it.
|
|
||||||
# Use the correct name for the tap device:
|
|
||||||
# The environment variable $INTERFACE is set to the right name
|
|
||||||
# on most platforms, but if it doesn't work try to set it manually.
|
|
||||||
|
|
||||||
# Give it the right ip and netmask. Remember, the subnet of the
|
|
||||||
# tap device must be larger than that of the individual Subnets
|
|
||||||
# as defined in the host configuration file!
|
|
||||||
ifconfig $INTERFACE 192.168.1.1 netmask 255.255.0.0
|
|
||||||
|
|
@ -1,22 +0,0 @@
|
||||||
# Sample tinc configuration file
|
|
||||||
|
|
||||||
# This is a comment.
|
|
||||||
# Spaces and tabs are eliminated.
|
|
||||||
# The = sign isn't strictly necessary any longer, though you may want
|
|
||||||
# to leave it in as it improves readability :)
|
|
||||||
# Variable names are treated case insensitive.
|
|
||||||
|
|
||||||
# The name of this tinc host. Required.
|
|
||||||
Name = alpha
|
|
||||||
|
|
||||||
# The internet host to connect with.
|
|
||||||
# Comment these out to make yourself a listen-only connection
|
|
||||||
# You must use the name of another tinc host.
|
|
||||||
# May be used multiple times for redundance.
|
|
||||||
ConnectTo = beta
|
|
||||||
|
|
||||||
# The tap device tinc will use.
|
|
||||||
# /dev/tap0 for ethertap, FreeBSD or OpenBSD
|
|
||||||
# /dev/tun0 for Solaris
|
|
||||||
# /dev/net/tun for Linux tun/tap
|
|
||||||
Device = /dev/net/tun
|
|
||||||
5685
doc/texinfo.tex
5685
doc/texinfo.tex
File diff suppressed because it is too large
Load diff
57
doc/tinc-gui.8.in
Normal file
57
doc/tinc-gui.8.in
Normal file
|
|
@ -0,0 +1,57 @@
|
||||||
|
.Dd 2011-06-26
|
||||||
|
.Dt TINC-GUI 8
|
||||||
|
.\" Manual page created by:
|
||||||
|
.\" Guus Sliepen <guus@tinc-vpn.org>
|
||||||
|
.Sh NAME
|
||||||
|
.Nm tinc-gui
|
||||||
|
.Nd tinc GUI
|
||||||
|
.Sh SYNOPSIS
|
||||||
|
.Nm
|
||||||
|
.Op Fl n
|
||||||
|
.Op Fl -net Ns = Ns Ar NETNAME
|
||||||
|
.Op Fl -pidfile Ns = Ns Ar FILENAME
|
||||||
|
.Op Fl -help
|
||||||
|
.Sh DESCRIPTION
|
||||||
|
This is a Python/wxWidgets based graphical user interface for tinc, a secure virtual private network (VPN) project.
|
||||||
|
.Nm
|
||||||
|
communicates with
|
||||||
|
.Xr tincd 8
|
||||||
|
to alter and inspect the running VPN's state.
|
||||||
|
It can show the current settings, the list of connections, nodes, subnets, and edges.
|
||||||
|
For now, the debug level can be changed from the GUI, and by right-clicking on a node in the list of connections,
|
||||||
|
a pop-up menu will appear that allows one to disconnect that node.
|
||||||
|
.Sh OPTIONS
|
||||||
|
.Bl -tag -width indent
|
||||||
|
.It Fl n, -net Ns = Ns Ar NETNAME
|
||||||
|
Communicate with tincd(8) connected with
|
||||||
|
.Ar NETNAME .
|
||||||
|
.It Fl -pidfile Ns = Ns Ar FILENAME
|
||||||
|
Use the cookie from
|
||||||
|
.Ar FILENAME
|
||||||
|
to authenticate with a running tinc daemon.
|
||||||
|
If unspecified, the default is
|
||||||
|
.Pa @localstatedir@/run/tinc. Ns Ar NETNAME Ns Pa .pid.
|
||||||
|
.It Fl -help
|
||||||
|
Display short list of options.
|
||||||
|
.El
|
||||||
|
.Sh BUGS
|
||||||
|
The GUI is not finished yet, the final version will have much more functionality.
|
||||||
|
If you find any bugs, report them to tinc@tinc-vpn.org.
|
||||||
|
.Sh SEE ALSO
|
||||||
|
.Xr tincd 8 ,
|
||||||
|
.Pa http://www.tinc-vpn.org/ .
|
||||||
|
.Pp
|
||||||
|
The full documentation for tinc 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
|
||||||
|
tinc comes with ABSOLUTELY NO WARRANTY.
|
||||||
|
This is free software, and you are welcome to redistribute it under certain conditions;
|
||||||
|
see the file COPYING for details.
|
||||||
|
.Sh AUTHORS
|
||||||
|
.An "Ivo Timmermans"
|
||||||
|
.An "Guus Sliepen" Aq guus@tinc-vpn.org
|
||||||
|
.Pp
|
||||||
|
And thanks to many others for their contributions to tinc!
|
||||||
276
doc/tinc.8.in
Normal file
276
doc/tinc.8.in
Normal file
|
|
@ -0,0 +1,276 @@
|
||||||
|
.Dd 2013-01-15
|
||||||
|
.Dt TINCCTL 8
|
||||||
|
.\" Manual page created by:
|
||||||
|
.\" Scott Lamb
|
||||||
|
.Sh NAME
|
||||||
|
.Nm tinc
|
||||||
|
.Nd tinc VPN control
|
||||||
|
.Sh SYNOPSIS
|
||||||
|
.Nm
|
||||||
|
.Op Fl cn
|
||||||
|
.Op Fl -config Ns = Ns Ar DIR
|
||||||
|
.Op Fl -net Ns = Ns Ar NETNAME
|
||||||
|
.Op Fl -pidfile Ns = Ns Ar FILENAME
|
||||||
|
.Op Fl -help
|
||||||
|
.Op Fl -version
|
||||||
|
.Ar COMMAND
|
||||||
|
.Sh DESCRIPTION
|
||||||
|
This is the control program of tinc, a secure virtual private network (VPN)
|
||||||
|
project.
|
||||||
|
.Nm
|
||||||
|
communicates with
|
||||||
|
.Xr tincd 8
|
||||||
|
to alter and inspect the running VPN's state.
|
||||||
|
.Sh OPTIONS
|
||||||
|
.Bl -tag -width indent
|
||||||
|
.It Fl n, -net Ns = Ns Ar NETNAME
|
||||||
|
Communicate with tincd(8) connected with
|
||||||
|
.Ar NETNAME .
|
||||||
|
.It Fl -pidfile Ns = Ns Ar FILENAME
|
||||||
|
Use the cookie from
|
||||||
|
.Ar FILENAME
|
||||||
|
to authenticate with a running tinc daemon.
|
||||||
|
If unspecified, the default is
|
||||||
|
.Pa @localstatedir@/run/tinc. Ns Ar NETNAME Ns Pa .pid.
|
||||||
|
.It Fl -help
|
||||||
|
Display short list of options.
|
||||||
|
.It Fl -version
|
||||||
|
Output version information and exit.
|
||||||
|
.El
|
||||||
|
.Sh ENVIRONMENT VARIABLES
|
||||||
|
.Bl -tag -width indent
|
||||||
|
.It Ev NETNAME
|
||||||
|
If no netname is specified on the command line with the
|
||||||
|
.Fl n
|
||||||
|
option, the value of this environment variable is used.
|
||||||
|
.El
|
||||||
|
.Sh COMMANDS
|
||||||
|
.Bl -tag -width indent
|
||||||
|
.It init Op Ar name
|
||||||
|
Create initial configuration files and RSA and ECDSA keypairs with default length.
|
||||||
|
If no
|
||||||
|
.Ar name
|
||||||
|
for this node is given, it will be asked for.
|
||||||
|
.It get Ar variable
|
||||||
|
Print the current value of configuration variable
|
||||||
|
.Ar variable .
|
||||||
|
If more than one variable with the same name exists,
|
||||||
|
the value of each of them will be printed on a separate line.
|
||||||
|
.It set Ar variable Ar value
|
||||||
|
Set configuration variable
|
||||||
|
.Ar variable
|
||||||
|
to the given
|
||||||
|
.Ar value .
|
||||||
|
All previously existing configuration variables with the same name are removed.
|
||||||
|
To set a variable for a specific host, use the notation
|
||||||
|
.Ar host Ns Li . Ns Ar variable .
|
||||||
|
.It add Ar variable Ar value
|
||||||
|
As above, but without removing any previously existing configuration variables.
|
||||||
|
.It del Ar variable Op Ar value
|
||||||
|
Remove configuration variables with the same name and
|
||||||
|
.Ar value .
|
||||||
|
If no
|
||||||
|
.Ar value
|
||||||
|
is given, all configuration variables with the same name will be removed.
|
||||||
|
.It edit Ar filename
|
||||||
|
Start an editor for the given configuration file.
|
||||||
|
You do not need to specify the full path to the file.
|
||||||
|
.It export
|
||||||
|
Export the host configuration file of the local node to standard output.
|
||||||
|
.It export-all
|
||||||
|
Export all host configuration files to standard output.
|
||||||
|
.It import Op Fl -force
|
||||||
|
Import host configuration data generated by the
|
||||||
|
.Nm
|
||||||
|
export command from standard input.
|
||||||
|
Already existing host configuration files are not overwritten unless the option
|
||||||
|
.Fl -force
|
||||||
|
is used.
|
||||||
|
.It exchange Op Fl -force
|
||||||
|
The same as export followed by import.
|
||||||
|
.It exchange-all Op Fl -force
|
||||||
|
The same as export-all followed by import.
|
||||||
|
.It invite Ar name
|
||||||
|
Prepares an invitation for a new node with the given
|
||||||
|
.Ar name ,
|
||||||
|
and prints a short invitation URL that can be used with the join command.
|
||||||
|
.It join Op Ar URL
|
||||||
|
Join an existing VPN using an invitation URL created using the invite command.
|
||||||
|
If no
|
||||||
|
.Ar URL
|
||||||
|
is given, it will be read from standard input.
|
||||||
|
.It start Op tincd options
|
||||||
|
Start
|
||||||
|
.Xr tincd 8 ,
|
||||||
|
optionally with the given extra options.
|
||||||
|
.It stop
|
||||||
|
Stop
|
||||||
|
.Xr tincd 8 .
|
||||||
|
.It restart Op tincd options
|
||||||
|
Restart
|
||||||
|
.Xr tincd 8 ,
|
||||||
|
optionally with the given extra options.
|
||||||
|
.It reload
|
||||||
|
Partially rereads configuration files. Connections to hosts whose host
|
||||||
|
config files are removed are closed. New outgoing connections specified
|
||||||
|
in
|
||||||
|
.Xr tinc.conf 5
|
||||||
|
will be made.
|
||||||
|
.It pid
|
||||||
|
Shows the PID of the currently running
|
||||||
|
.Xr tincd 8 .
|
||||||
|
.It generate-keys Op bits
|
||||||
|
Generate both RSA and ECDSA keypairs (see below) and exit.
|
||||||
|
.It generate-ecdsa-keys
|
||||||
|
Generate public/private ECDSA keypair and exit.
|
||||||
|
.It generate-rsa-keys Op bits
|
||||||
|
Generate public/private RSA keypair and exit.
|
||||||
|
If
|
||||||
|
.Ar bits
|
||||||
|
is omitted, the default length will be 2048 bits.
|
||||||
|
When saving keys to existing files, tinc will not delete the old keys;
|
||||||
|
you have to remove them manually.
|
||||||
|
.It dump [reachable] nodes
|
||||||
|
Dump a list of all known nodes in the VPN.
|
||||||
|
If the keyword reachable is used, only lists reachable nodes.
|
||||||
|
.It dump edges
|
||||||
|
Dump a list of all known connections in the VPN.
|
||||||
|
.It dump subnets
|
||||||
|
Dump a list of all known subnets in the VPN.
|
||||||
|
.It dump connections
|
||||||
|
Dump a list of all meta connections with ourself.
|
||||||
|
.It dump graph | digraph
|
||||||
|
Dump a graph of the VPN in
|
||||||
|
.Xr dotty 1
|
||||||
|
format.
|
||||||
|
Nodes are colored according to their reachability:
|
||||||
|
red nodes are unreachable, orange nodes are indirectly reachable, green nodes are directly reachable.
|
||||||
|
Black nodes are either directly or indirectly reachable, but direct reachability has not been tried yet.
|
||||||
|
.It info Ar node | subnet | address
|
||||||
|
Show information about a particular node, subnet or address.
|
||||||
|
If an address is given, any matching subnet will be shown.
|
||||||
|
.It purge
|
||||||
|
Purges all information remembered about unreachable nodes.
|
||||||
|
.It debug Ar N
|
||||||
|
Sets debug level to
|
||||||
|
.Ar N .
|
||||||
|
.It log Op Ar N
|
||||||
|
Capture log messages from a running tinc daemon.
|
||||||
|
An optional debug level can be given that will be applied only for log messages sent to
|
||||||
|
.Nm tinc .
|
||||||
|
.It retry
|
||||||
|
Forces
|
||||||
|
.Xr tincd 8
|
||||||
|
to try to connect to all uplinks immediately.
|
||||||
|
Usually
|
||||||
|
.Xr tincd 8
|
||||||
|
attempts to do this itself,
|
||||||
|
but increases the time it waits between the attempts each time it failed,
|
||||||
|
and if
|
||||||
|
.Xr tincd 8
|
||||||
|
didn't succeed to connect to an uplink the first time after it started,
|
||||||
|
it defaults to the maximum time of 15 minutes.
|
||||||
|
.It disconnect Ar NODE
|
||||||
|
Closes the meta connection with the given
|
||||||
|
.Ar NODE .
|
||||||
|
.It top
|
||||||
|
If
|
||||||
|
.Nm
|
||||||
|
is compiled with libcurses support, this will display live traffic statistics
|
||||||
|
for all the known nodes, similar to the UNIX
|
||||||
|
.Xr top 1
|
||||||
|
command.
|
||||||
|
See below for more information.
|
||||||
|
.It pcap
|
||||||
|
Dump VPN traffic going through the local tinc node in
|
||||||
|
.Xr pcap-savefile 5
|
||||||
|
format to standard output,
|
||||||
|
from where it can be redirected to a file or piped through a program that can parse it directly,
|
||||||
|
such as
|
||||||
|
.Xr tcpdump 8 .
|
||||||
|
.El
|
||||||
|
.Sh EXAMPLES
|
||||||
|
Examples of some commands:
|
||||||
|
.Bd -literal -offset indent
|
||||||
|
tinc -n vpn dump graph | circo -Txlib
|
||||||
|
tinc -n vpn pcap | tcpdump -r -
|
||||||
|
tinc -n vpn top
|
||||||
|
.Pp
|
||||||
|
.Ed
|
||||||
|
Example of configuring tinc using
|
||||||
|
.Nm :
|
||||||
|
.Bd -literal -offset indent
|
||||||
|
tinc -n vpn init foo
|
||||||
|
tinc -n vpn add Subnet 192.168.1.0/24
|
||||||
|
tinc -n vpn add bar.Address bar.example.com
|
||||||
|
tinc -n vpn add ConnectTo bar
|
||||||
|
tinc -n vpn export | gpg --clearsign | mail -s "My config" vpnmaster@example.com
|
||||||
|
.Ed
|
||||||
|
.Sh TOP
|
||||||
|
The top command connects to a running tinc daemon and repeatedly queries its per-node traffic counters.
|
||||||
|
It displays a list of all the known nodes in the left-most column,
|
||||||
|
and the amount of bytes and packets read from and sent to each node in the other columns.
|
||||||
|
By default, the information is updated every second.
|
||||||
|
The behaviour of the top command can be changed using the following keys:
|
||||||
|
.Bl -tag
|
||||||
|
.It Ic s
|
||||||
|
Change the interval between updates.
|
||||||
|
After pressing the
|
||||||
|
.Ic s
|
||||||
|
key, enter the desired interval in seconds, followed by enter.
|
||||||
|
Fractional seconds are honored.
|
||||||
|
Intervals lower than 0.1 seconds are not allowed.
|
||||||
|
.It Ic c
|
||||||
|
Toggle between displaying current traffic rates (in packets and bytes per second)
|
||||||
|
and cumulative traffic (total packets and bytes since the tinc daemon started).
|
||||||
|
.It Ic n
|
||||||
|
Sort the list of nodes by name.
|
||||||
|
.It Ic i
|
||||||
|
Sort the list of nodes by incoming amount of bytes.
|
||||||
|
.It Ic I
|
||||||
|
Sort the list of nodes by incoming amount of packets.
|
||||||
|
.It Ic o
|
||||||
|
Sort the list of nodes by outgoing amount of bytes.
|
||||||
|
.It Ic O
|
||||||
|
Sort the list of nodes by outgoing amount of packets.
|
||||||
|
.It Ic t
|
||||||
|
Sort the list of nodes by sum of incoming and outgoing amount of bytes.
|
||||||
|
.It Ic T
|
||||||
|
Sort the list of nodes by sum of incoming and outgoing amount of packets.
|
||||||
|
.It Ic b
|
||||||
|
Show amount of traffic in bytes.
|
||||||
|
.It Ic k
|
||||||
|
Show amount of traffic in kilobytes.
|
||||||
|
.It Ic M
|
||||||
|
Show amount of traffic in megabytes.
|
||||||
|
.It Ic G
|
||||||
|
Show amount of traffic in gigabytes.
|
||||||
|
.It Ic q
|
||||||
|
Quit.
|
||||||
|
.El
|
||||||
|
.Sh BUGS
|
||||||
|
If you find any bugs, report them to tinc@tinc-vpn.org.
|
||||||
|
.Sh SEE ALSO
|
||||||
|
.Xr tincd 8 ,
|
||||||
|
.Xr tinc.conf 5 ,
|
||||||
|
.Xr dotty 1 ,
|
||||||
|
.Xr pcap-savefile 5 ,
|
||||||
|
.Xr tcpdump 8 ,
|
||||||
|
.Xr top 1 ,
|
||||||
|
.Pa http://www.tinc-vpn.org/ ,
|
||||||
|
.Pa http://www.cabal.org/ .
|
||||||
|
.Pp
|
||||||
|
The full documentation for tinc 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
|
||||||
|
tinc comes with ABSOLUTELY NO WARRANTY.
|
||||||
|
This is free software, and you are welcome to redistribute it under certain conditions;
|
||||||
|
see the file COPYING for details.
|
||||||
|
.Sh AUTHORS
|
||||||
|
.An "Ivo Timmermans"
|
||||||
|
.An "Guus Sliepen" Aq guus@tinc-vpn.org
|
||||||
|
.Pp
|
||||||
|
And thanks to many others for their contributions to tinc!
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
.Dd 2016-10-29
|
.Dd 2013-01-14
|
||||||
.Dt TINC.CONF 5
|
.Dt TINC.CONF 5
|
||||||
.\" Manual page created by:
|
.\" Manual page created by:
|
||||||
.\" Ivo Timmermans
|
.\" Ivo Timmermans
|
||||||
|
|
@ -11,20 +11,12 @@ The files in the
|
||||||
.Pa @sysconfdir@/tinc/
|
.Pa @sysconfdir@/tinc/
|
||||||
directory contain runtime and security information for the tinc daemon.
|
directory contain runtime and security information for the tinc daemon.
|
||||||
.Sh NETWORKS
|
.Sh NETWORKS
|
||||||
It is perfectly ok for you to run more than one tinc daemon.
|
To distinguish multiple instances of tinc running on one computer,
|
||||||
However, in its default form,
|
you can use the
|
||||||
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
|
|
||||||
.Nm
|
|
||||||
with the
|
|
||||||
.Fl n
|
.Fl n
|
||||||
option, which will assign a name to this daemon.
|
option to assign a network name to each tinc daemon.
|
||||||
.Pp
|
.Pp
|
||||||
The effect of this is that the daemon will set its configuration root to
|
The effect of this option is that the daemon will set its configuration root to
|
||||||
.Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa / ,
|
.Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa / ,
|
||||||
where
|
where
|
||||||
.Ar NETNAME
|
.Ar NETNAME
|
||||||
|
|
@ -32,13 +24,14 @@ is your argument to the
|
||||||
.Fl n
|
.Fl n
|
||||||
option.
|
option.
|
||||||
You'll notice that messages appear in syslog as coming from
|
You'll notice that messages appear in syslog as coming from
|
||||||
.Nm tincd. Ns Ar NETNAME .
|
.Nm tincd. Ns Ar NETNAME ,
|
||||||
|
and on Linux, unless specified otherwise, the name of the virtual network interface will be the same as the network name.
|
||||||
.Pp
|
.Pp
|
||||||
However, it is not strictly necessary that you call tinc with the
|
It is recommended that you use network names even if you run only one instance of tinc.
|
||||||
|
However, you can choose not to use the
|
||||||
.Fl n
|
.Fl n
|
||||||
option.
|
option.
|
||||||
In this case, the network name would just be empty,
|
In this case, the network name would just be empty, and
|
||||||
and it will be used as such.
|
|
||||||
.Nm tinc
|
.Nm tinc
|
||||||
now looks for files in
|
now looks for files in
|
||||||
.Pa @sysconfdir@/tinc/ ,
|
.Pa @sysconfdir@/tinc/ ,
|
||||||
|
|
@ -48,13 +41,8 @@ the configuration file should be
|
||||||
.Pa @sysconfdir@/tinc/tinc.conf ,
|
.Pa @sysconfdir@/tinc/tinc.conf ,
|
||||||
and the host configuration files are now expected to be in
|
and the host configuration files are now expected to be in
|
||||||
.Pa @sysconfdir@/tinc/hosts/ .
|
.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
|
.Sh NAMES
|
||||||
Each tinc daemon must have a name that is unique in the network which it will be part of.
|
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 will be used by other tinc daemons for identification.
|
||||||
The name has to be declared in the
|
The name has to be declared in the
|
||||||
.Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa /tinc.conf
|
.Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa /tinc.conf
|
||||||
|
|
@ -63,24 +51,34 @@ file.
|
||||||
To make things easy,
|
To make things easy,
|
||||||
choose something that will give unique and easy to remember names to your tinc daemon(s).
|
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.
|
You could try things like hostnames, owner surnames or location names.
|
||||||
|
However, you are only allowed to use alphanumerical characters (a-z, A-Z, and 0-9) and underscores (_) in the name.
|
||||||
|
.Sh INITIAL CONFIGURATION
|
||||||
|
If you have not configured tinc yet, you can easily create a basic configuration using the following command:
|
||||||
|
.Bd -literal -offset indent
|
||||||
|
.Nm tinc Fl n Ar NETNAME Li init Ar NAME
|
||||||
|
.Ed
|
||||||
|
.Pp
|
||||||
|
You can further change the configuration as needed either by manually editing the configuration files,
|
||||||
|
or by using
|
||||||
|
.Xr tinc 8 .
|
||||||
.Sh PUBLIC/PRIVATE KEYS
|
.Sh PUBLIC/PRIVATE KEYS
|
||||||
You should use
|
The
|
||||||
.Ic tincd -K
|
.Nm tinc Li init
|
||||||
to generate public/private keypairs.
|
command will have generated both RSA and ECDSA public/private keypairs.
|
||||||
It will generate two keys.
|
The private keys should be stored in files named
|
||||||
The private key should be stored in a separate file
|
.Pa rsa_key.priv
|
||||||
.Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa /rsa_key.priv
|
and
|
||||||
\-\- where
|
.Pa ecdsa_key.priv
|
||||||
.Ar NETNAME
|
in the directory
|
||||||
stands for the network (see
|
.Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa /
|
||||||
.Sx NETWORKS )
|
The public keys should be stored in the host configuration file
|
||||||
above.
|
.Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa /hosts/ Ns Va NAME .
|
||||||
The public key should be stored in the host configuration file
|
The RSA keys are used for backwards compatibility with tinc version 1.0.
|
||||||
.Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa /hosts/ Ns Va NAME
|
If you are upgrading from version 1.0 to 1.1, you can keep the old configuration files,
|
||||||
\-\- where
|
but you will need to create ECDSA keys using the following command:
|
||||||
.Va NAME
|
.Bd -literal -offset indent
|
||||||
stands for the name of the local tinc daemon (see
|
.Nm tinc Fl n Ar NETNAME Li generate-ecdsa-keys
|
||||||
.Sx NAMES ) .
|
.Ed
|
||||||
.Sh SERVER CONFIGURATION
|
.Sh SERVER CONFIGURATION
|
||||||
The server configuration of the daemon is done in the file
|
The server configuration of the daemon is done in the file
|
||||||
.Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa /tinc.conf .
|
.Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa /tinc.conf .
|
||||||
|
|
@ -103,6 +101,10 @@ Although all configuration options for the local host listed in this document ca
|
||||||
it is recommended to put host specific configuration options in the host configuration file,
|
it is recommended to put host specific configuration options in the host configuration file,
|
||||||
as this makes it easy to exchange with other nodes.
|
as this makes it easy to exchange with other nodes.
|
||||||
.Pp
|
.Pp
|
||||||
|
You can edit the config file manually, but it is recommended that you use
|
||||||
|
.Xr tinc 8
|
||||||
|
to change configuration variables for you.
|
||||||
|
.Pp
|
||||||
Here are all valid variables, listed in alphabetical order.
|
Here are all valid variables, listed in alphabetical order.
|
||||||
The default value is given between parentheses.
|
The default value is given between parentheses.
|
||||||
.Bl -tag -width indent
|
.Bl -tag -width indent
|
||||||
|
|
@ -112,7 +114,16 @@ If
|
||||||
.Qq any
|
.Qq any
|
||||||
is selected, then depending on the operating system both IPv4 and IPv6 or just
|
is selected, then depending on the operating system both IPv4 and IPv6 or just
|
||||||
IPv6 listening sockets will be created.
|
IPv6 listening sockets will be created.
|
||||||
.It Va BindToAddress Li = Ar address Oo Ar port Oc Bq experimental
|
.It Va AutoConnect Li = Ar count Po 0 Pc Bq experimental
|
||||||
|
If set to a non-zero value,
|
||||||
|
.Nm
|
||||||
|
will try to only have
|
||||||
|
.Ar count
|
||||||
|
meta connections to other nodes,
|
||||||
|
by automatically making or breaking connections to known nodes.
|
||||||
|
Higher values increase redundancy but also increase meta data overhead.
|
||||||
|
When using this option, a good value is 3.
|
||||||
|
.It Va BindToAddress Li = Ar address Op Ar port
|
||||||
If your computer has more than one IPv4 or IPv6 address,
|
If your computer has more than one IPv4 or IPv6 address,
|
||||||
.Nm tinc
|
.Nm tinc
|
||||||
will by default listen on all of them for incoming connections.
|
will by default listen on all of them for incoming connections.
|
||||||
|
|
@ -130,8 +141,6 @@ To only bind to a specific port but not to a specific address, use
|
||||||
.Li *
|
.Li *
|
||||||
for the
|
for the
|
||||||
.Ar address .
|
.Ar address .
|
||||||
.Pp
|
|
||||||
This option may not work on all platforms.
|
|
||||||
.It Va BindToInterface Li = Ar interface Bq experimental
|
.It Va BindToInterface Li = Ar interface Bq experimental
|
||||||
If your computer has more than one network interface,
|
If your computer has more than one network interface,
|
||||||
.Nm tinc
|
.Nm tinc
|
||||||
|
|
@ -222,7 +231,7 @@ Also note that this can cause decrypted VPN packets to be sent out on a real net
|
||||||
Create a UNIX socket with the filename specified by
|
Create a UNIX socket with the filename specified by
|
||||||
.Va Device ,
|
.Va Device ,
|
||||||
or
|
or
|
||||||
.Pa @runstatedir@/ Ns Ar NETNAME Ns Pa .umlsocket
|
.Pa @localstatedir@/run/ Ns Ar NETNAME Ns Pa .umlsocket
|
||||||
if not specified.
|
if not specified.
|
||||||
.Nm tinc
|
.Nm tinc
|
||||||
will wait for a User Mode Linux instance to connect to this socket.
|
will wait for a User Mode Linux instance to connect to this socket.
|
||||||
|
|
@ -231,7 +240,7 @@ Uses the libvdeplug library to connect to a Virtual Distributed Ethernet switch,
|
||||||
using the UNIX socket specified by
|
using the UNIX socket specified by
|
||||||
.Va Device ,
|
.Va Device ,
|
||||||
or
|
or
|
||||||
.Pa @runstatedir@/vde.ctl
|
.Pa @localstatedir@/run/vde.ctl
|
||||||
if not specified.
|
if not specified.
|
||||||
.El
|
.El
|
||||||
Also, in case tinc does not seem to correctly interpret packets received from the virtual network device,
|
Also, in case tinc does not seem to correctly interpret packets received from the virtual network device,
|
||||||
|
|
@ -250,10 +259,6 @@ Tinc will expect packets read from the virtual network device
|
||||||
to start with a four byte header containing the address family,
|
to start with a four byte header containing the address family,
|
||||||
followed by an IP header.
|
followed by an IP header.
|
||||||
This mode should support both IPv4 and IPv6 packets.
|
This mode should support both IPv4 and IPv6 packets.
|
||||||
.It utun Pq OS X
|
|
||||||
Set type to utun.
|
|
||||||
This is only supported on OS X version 10.6.8 and higher, but doesn't require the tuntaposx module.
|
|
||||||
This mode should support both IPv4 and IPv6 packets.
|
|
||||||
.It tap Pq BSD and Linux
|
.It tap Pq BSD and Linux
|
||||||
Set type to tap.
|
Set type to tap.
|
||||||
Tinc will expect packets read from the virtual network device
|
Tinc will expect packets read from the virtual network device
|
||||||
|
|
@ -264,6 +269,17 @@ When this option is enabled, packets that cannot be sent directly to the destina
|
||||||
but which would have to be forwarded by an intermediate node, are dropped instead.
|
but which would have to be forwarded by an intermediate node, are dropped instead.
|
||||||
When combined with the IndirectData option,
|
When combined with the IndirectData option,
|
||||||
packets for nodes for which we do not have a meta connection with are also dropped.
|
packets for nodes for which we do not have a meta connection with are also dropped.
|
||||||
|
.It Va ECDSAPrivateKeyFile Li = Ar filename Po Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa /ecdsa_key.priv Pc
|
||||||
|
The file in which the private ECDSA key of this tinc daemon resides.
|
||||||
|
This is only used if
|
||||||
|
.Va ExperimentalProtocol
|
||||||
|
is enabled.
|
||||||
|
.It Va ExperimentalProtocol Li = yes | no Pq yes
|
||||||
|
When this option is enabled, the SPTPS protocol will be used when connecting to nodes that also support it.
|
||||||
|
Ephemeral ECDH will be used for key exchanges,
|
||||||
|
and ECDSA will be used instead of RSA for authentication.
|
||||||
|
When enabled, an ECDSA key must have been generated before with
|
||||||
|
.Nm tinc generate-ecdsa-keys .
|
||||||
.It Va Forwarding Li = off | internal | kernel Po internal Pc Bq experimental
|
.It Va Forwarding Li = off | internal | kernel Po internal Pc Bq experimental
|
||||||
This option selects the way indirect packets are forwarded.
|
This option selects the way indirect packets are forwarded.
|
||||||
.Bl -tag -width indent
|
.Bl -tag -width indent
|
||||||
|
|
@ -279,18 +295,6 @@ Incoming packets are always sent to the TUN/TAP device, even if the packets are
|
||||||
This is less efficient, but allows the kernel to apply its routing and firewall rules on them,
|
This is less efficient, but allows the kernel to apply its routing and firewall rules on them,
|
||||||
and can also help debugging.
|
and can also help debugging.
|
||||||
.El
|
.El
|
||||||
.It Va GraphDumpFile Li = Ar filename Bq experimental
|
|
||||||
If this option is present,
|
|
||||||
.Nm tinc
|
|
||||||
will dump the current network graph to the file
|
|
||||||
.Ar filename
|
|
||||||
every minute, unless there were no changes to the graph.
|
|
||||||
The file is in a format that can be read by graphviz tools.
|
|
||||||
If
|
|
||||||
.Ar filename
|
|
||||||
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
|
.It Va Hostnames Li = yes | no Pq no
|
||||||
This option selects whether IP addresses (both real and on the VPN) should
|
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
|
be resolved. Since DNS lookups are blocking, it might affect tinc's
|
||||||
|
|
@ -312,7 +316,7 @@ this variable is almost always already correctly set.
|
||||||
This option controls the period the encryption keys used to encrypt the data are valid.
|
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,
|
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.
|
even though it is thought to be nearly impossible to crack a single key.
|
||||||
.It Va LocalDiscovery Li = yes | no Po no Pc Bq experimental
|
.It Va LocalDiscovery Li = yes | no Pq no
|
||||||
When enabled,
|
When enabled,
|
||||||
.Nm tinc
|
.Nm tinc
|
||||||
will try to detect peers that are on the same local network.
|
will try to detect peers that are on the same local network.
|
||||||
|
|
@ -322,12 +326,20 @@ which normally would prevent the peers from learning each other's LAN address.
|
||||||
.Pp
|
.Pp
|
||||||
Currently, local discovery is implemented by sending broadcast packets to the LAN during path MTU discovery.
|
Currently, local discovery is implemented by sending broadcast packets to the LAN during path MTU discovery.
|
||||||
This feature may not work in all possible situations.
|
This feature may not work in all possible situations.
|
||||||
|
.It Va LocalDiscoveryAddress Li = Ar address
|
||||||
|
If this variable is specified, local discovery packets are sent to the given
|
||||||
|
.Ar address .
|
||||||
.It Va MACExpire Li = Ar seconds Pq 600
|
.It Va MACExpire Li = Ar seconds Pq 600
|
||||||
This option controls the amount of time MAC addresses are kept before they are removed.
|
This option controls the amount of time MAC addresses are kept before they are removed.
|
||||||
This only has effect when
|
This only has effect when
|
||||||
.Va Mode
|
.Va Mode
|
||||||
is set to
|
is set to
|
||||||
.Qq switch .
|
.Qq switch .
|
||||||
|
.It Va MaxConnectionBurst Li = Ar count Pq 100
|
||||||
|
This option controls how many connections tinc accepts in quick succession.
|
||||||
|
If there are more connections than the given number in a short time interval,
|
||||||
|
tinc will reduce the number of accepted connections to only one per second,
|
||||||
|
until the burst has passed.
|
||||||
.It Va MaxTimeout Li = Ar seconds Pq 900
|
.It Va MaxTimeout Li = Ar seconds Pq 900
|
||||||
This is the maximum delay before trying to reconnect to other tinc daemons.
|
This is the maximum delay before trying to reconnect to other tinc daemons.
|
||||||
.It Va Mode Li = router | switch | hub Pq router
|
.It Va Mode Li = router | switch | hub Pq router
|
||||||
|
|
@ -337,7 +349,7 @@ This option selects the way packets are routed to other daemons.
|
||||||
In this mode
|
In this mode
|
||||||
.Va Subnet
|
.Va Subnet
|
||||||
variables in the host configuration files will be used to form a routing table.
|
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.
|
Only packets of routable protocols (IPv4 and IPv6) are supported in this mode.
|
||||||
.Pp
|
.Pp
|
||||||
This is the default mode, and unless you really know you need another mode, don't change it.
|
This is the default mode, and unless you really know you need another mode, don't change it.
|
||||||
.It switch
|
.It switch
|
||||||
|
|
@ -355,7 +367,7 @@ while no routing table is managed.
|
||||||
.It Va Name Li = Ar name Bq required
|
.It Va Name Li = Ar name Bq required
|
||||||
This is the name which identifies this tinc daemon.
|
This is the name which identifies this tinc daemon.
|
||||||
It must be unique for the virtual private network this daemon will connect to.
|
It must be unique for the virtual private network this daemon will connect to.
|
||||||
The Name may only consist of alphanumeric and underscore characters.
|
The Name may only consist of alphanumeric and underscore characters (a-z, A-Z, 0-9 and _), and is case sensitive.
|
||||||
If
|
If
|
||||||
.Va Name
|
.Va Name
|
||||||
starts with a
|
starts with a
|
||||||
|
|
@ -385,7 +397,9 @@ 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
|
.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.
|
The file in which the private RSA key of this tinc daemon resides.
|
||||||
.It Va ProcessPriority Li = low | normal | high
|
.It Va ProcessPriority Li = low | normal | high
|
||||||
When this option is used the priority of the tincd process will be adjusted.
|
When this option is used the priority of the
|
||||||
|
.Nm tincd
|
||||||
|
process will be adjusted.
|
||||||
Increasing the priority may help to reduce latency and packet loss on the VPN.
|
Increasing the priority may help to reduce latency and packet loss on the VPN.
|
||||||
.It Va Proxy Li = socks4 | socks5 | http | exec Ar ... Bq experimental
|
.It Va Proxy Li = socks4 | socks5 | http | exec Ar ... Bq experimental
|
||||||
Use a proxy when making outgoing connections.
|
Use a proxy when making outgoing connections.
|
||||||
|
|
@ -432,8 +446,7 @@ traffic.
|
||||||
When this option is enabled tinc will only use Subnet statements which are
|
When this option is enabled tinc will only use Subnet statements which are
|
||||||
present in the host config files in the local
|
present in the host config files in the local
|
||||||
.Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa /hosts/
|
.Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa /hosts/
|
||||||
directory. Subnets learned via connections to other nodes and which are not
|
directory.
|
||||||
present in the local host config files are ignored.
|
|
||||||
.It Va TunnelServer Li = yes | no Po no Pc Bq experimental
|
.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,
|
When this option is enabled tinc will no longer forward information between other tinc daemons,
|
||||||
and will only allow connections with nodes for which host config files are present in the local
|
and will only allow connections with nodes for which host config files are present in the local
|
||||||
|
|
@ -468,13 +481,15 @@ Multiple
|
||||||
.Va Address
|
.Va Address
|
||||||
variables can be specified, in which case each address will be tried until a working
|
variables can be specified, in which case each address will be tried until a working
|
||||||
connection has been established.
|
connection has been established.
|
||||||
.It Va Cipher Li = Ar cipher Pq aes-256-cbc
|
.It Va Cipher Li = Ar cipher Pq blowfish
|
||||||
The symmetric cipher algorithm used to encrypt UDP packets.
|
The symmetric cipher algorithm used to encrypt UDP packets.
|
||||||
Any cipher supported by LibreSSL or OpenSSL is recognised.
|
Any cipher supported by OpenSSL is recognised.
|
||||||
Furthermore, specifying
|
Furthermore, specifying
|
||||||
.Qq none
|
.Qq none
|
||||||
will turn off packet encryption.
|
will turn off packet encryption.
|
||||||
It is best to use only those ciphers which support CBC mode.
|
It is best to use only those ciphers which support CBC mode.
|
||||||
|
This option has no effect for connections between nodes using
|
||||||
|
.Va ExperimentalProtocol .
|
||||||
.It Va ClampMSS Li = yes | no Pq yes
|
.It Va ClampMSS Li = yes | no Pq yes
|
||||||
This option specifies whether tinc should clamp the maximum segment size (MSS)
|
This option specifies whether tinc should clamp the maximum segment size (MSS)
|
||||||
of TCP packets to the path MTU. This helps in situations where ICMP
|
of TCP packets to the path MTU. This helps in situations where ICMP
|
||||||
|
|
@ -483,21 +498,25 @@ Fragmentation Needed or Packet too Big messages are dropped by firewalls.
|
||||||
This option sets the level of compression used for UDP packets.
|
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),
|
Possible values are 0 (off), 1 (fast zlib) and any integer up to 9 (best zlib),
|
||||||
10 (fast lzo) and 11 (best lzo).
|
10 (fast lzo) and 11 (best lzo).
|
||||||
.It Va Digest Li = Ar digest Pq sha256
|
.It Va Digest Li = Ar digest Pq sha1
|
||||||
The digest algorithm used to authenticate UDP packets.
|
The digest algorithm used to authenticate UDP packets.
|
||||||
Any digest supported by LibreSSL or OpenSSL is recognised.
|
Any digest supported by OpenSSL is recognised.
|
||||||
Furthermore, specifying
|
Furthermore, specifying
|
||||||
.Qq none
|
.Qq none
|
||||||
will turn off packet authentication.
|
will turn off packet authentication.
|
||||||
|
This option has no effect for connections between nodes using
|
||||||
|
.Va ExperimentalProtocol .
|
||||||
.It Va IndirectData Li = yes | no Pq no
|
.It Va IndirectData Li = yes | no Pq no
|
||||||
When set to yes, only nodes which already have a meta connection to you
|
When set to yes, other nodes which do not already have a meta connection to you
|
||||||
will try to establish direct communication with you.
|
will not try to establish direct communication with you.
|
||||||
It is best to leave this option out or set it to no.
|
It is best to leave this option out or set it to no.
|
||||||
.It Va MACLength Li = Ar length Pq 4
|
.It Va MACLength Li = Ar length Pq 4
|
||||||
The length of the message authentication code used to authenticate UDP packets.
|
The length of the message authentication code used to authenticate UDP packets.
|
||||||
Can be anything from
|
Can be anything from
|
||||||
.Qq 0
|
.Qq 0
|
||||||
up to the length of the digest produced by the digest algorithm.
|
up to the length of the digest produced by the digest algorithm.
|
||||||
|
This option has no effect for connections between nodes using
|
||||||
|
.Va ExperimentalProtocol .
|
||||||
.It Va PMTU Li = Ar mtu Po 1514 Pc
|
.It Va PMTU Li = Ar mtu Po 1514 Pc
|
||||||
This option controls the initial path MTU to this node.
|
This option controls the initial path MTU to this node.
|
||||||
.It Va PMTUDiscovery Li = yes | no Po yes Pc
|
.It Va PMTUDiscovery Li = yes | no Po yes Pc
|
||||||
|
|
@ -560,15 +579,7 @@ UDP is possible or not.
|
||||||
.Sh SCRIPTS
|
.Sh SCRIPTS
|
||||||
Apart from reading the server and host configuration files,
|
Apart from reading the server and host configuration files,
|
||||||
tinc can also run scripts at certain moments.
|
tinc can also run scripts at certain moments.
|
||||||
Below is a list of filenames of scripts and a description of when they are run.
|
Under Windows (not Cygwin), the scripts should have the extension
|
||||||
A script is only run if it exists and if it is executable.
|
|
||||||
.Pp
|
|
||||||
Scripts are run synchronously;
|
|
||||||
this means that tinc will temporarily stop processing packets until the called script finishes executing.
|
|
||||||
This guarantees that scripts will execute in the exact same order as the events that trigger them.
|
|
||||||
If you need to run commands asynchronously, you have to ensure yourself that they are being run in the background.
|
|
||||||
.Pp
|
|
||||||
Under Windows (not Cygwin), the scripts must have the extension
|
|
||||||
.Pa .bat .
|
.Pa .bat .
|
||||||
.Bl -tag -width indent
|
.Bl -tag -width indent
|
||||||
.It Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa /tinc-up
|
.It Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa /tinc-up
|
||||||
|
|
@ -576,7 +587,6 @@ 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.
|
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,
|
It should be used to set up the corresponding network interface,
|
||||||
but can also be used to start other things.
|
but can also be used to start other things.
|
||||||
.Pp
|
|
||||||
Under Windows you can use the Network Connections control panel instead of creating this script.
|
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
|
.It Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa /tinc-down
|
||||||
This script is started right before the tinc daemon quits.
|
This script is started right before the tinc daemon quits.
|
||||||
|
|
@ -642,8 +652,6 @@ The top directory for configuration files.
|
||||||
.It Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa /tinc.conf
|
.It Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa /tinc.conf
|
||||||
The default name of the server configuration file for net
|
The default name of the server configuration file for net
|
||||||
.Ar NETNAME .
|
.Ar NETNAME .
|
||||||
.It Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa /conf.d/
|
|
||||||
Optional directory from which any *.conf file will be loaded
|
|
||||||
.It Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa /hosts/
|
.It Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa /hosts/
|
||||||
Host configuration files are kept in this directory.
|
Host configuration files are kept in this directory.
|
||||||
.It Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa /tinc-up
|
.It Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa /tinc-up
|
||||||
|
|
@ -657,7 +665,8 @@ its connection to the virtual network device.
|
||||||
.El
|
.El
|
||||||
.Sh SEE ALSO
|
.Sh SEE ALSO
|
||||||
.Xr tincd 8 ,
|
.Xr tincd 8 ,
|
||||||
.Pa https://www.tinc-vpn.org/ ,
|
.Xr tinc 8 ,
|
||||||
|
.Pa http://www.tinc-vpn.org/ ,
|
||||||
.Pa http://www.tldp.org/LDP/nag2/ .
|
.Pa http://www.tldp.org/LDP/nag2/ .
|
||||||
.Pp
|
.Pp
|
||||||
The full documentation for
|
The full documentation for
|
||||||
|
|
|
||||||
2284
doc/tinc.info
2284
doc/tinc.info
File diff suppressed because it is too large
Load diff
1360
doc/tinc.texi
1360
doc/tinc.texi
File diff suppressed because it is too large
Load diff
|
|
@ -1,4 +1,4 @@
|
||||||
.Dd 2014-05-11
|
.Dd 2013-01-14
|
||||||
.Dt TINCD 8
|
.Dt TINCD 8
|
||||||
.\" Manual page created by:
|
.\" Manual page created by:
|
||||||
.\" Ivo Timmermans
|
.\" Ivo Timmermans
|
||||||
|
|
@ -8,17 +8,14 @@
|
||||||
.Nd tinc VPN daemon
|
.Nd tinc VPN daemon
|
||||||
.Sh SYNOPSIS
|
.Sh SYNOPSIS
|
||||||
.Nm
|
.Nm
|
||||||
.Op Fl cdDkKnoLRU
|
.Op Fl cdDKnoLRU
|
||||||
.Op Fl -config Ns = Ns Ar DIR
|
.Op Fl -config Ns = Ns Ar DIR
|
||||||
.Op Fl -no-detach
|
.Op Fl -no-detach
|
||||||
.Op Fl -debug Ns Op = Ns Ar LEVEL
|
.Op Fl -debug Ns Op = Ns Ar LEVEL
|
||||||
.Op Fl -kill Ns Op = Ns Ar SIGNAL
|
|
||||||
.Op Fl -net Ns = Ns Ar NETNAME
|
.Op Fl -net Ns = Ns Ar NETNAME
|
||||||
.Op Fl -generate-keys Ns Op = Ns Ar BITS
|
|
||||||
.Op Fl -option Ns = Ns Ar [HOST.]KEY=VALUE
|
.Op Fl -option Ns = Ns Ar [HOST.]KEY=VALUE
|
||||||
.Op Fl -mlock
|
.Op Fl -mlock
|
||||||
.Op Fl -logfile Ns Op = Ns Ar FILE
|
.Op Fl -logfile Ns Op = Ns Ar FILE
|
||||||
.Op Fl -pidfile Ns = Ns Ar FILE
|
|
||||||
.Op Fl -bypass-security
|
.Op Fl -bypass-security
|
||||||
.Op Fl -chroot
|
.Op Fl -chroot
|
||||||
.Op Fl -user Ns = Ns Ar USER
|
.Op Fl -user Ns = Ns Ar USER
|
||||||
|
|
@ -54,14 +51,6 @@ If not mentioned otherwise, this will show log messages on the standard error ou
|
||||||
Increase debug level or set it to
|
Increase debug level or set it to
|
||||||
.Ar LEVEL
|
.Ar LEVEL
|
||||||
(see below).
|
(see below).
|
||||||
.It Fl k, -kill Ns Op = Ns Ar SIGNAL
|
|
||||||
Attempt to kill a running
|
|
||||||
.Nm
|
|
||||||
(optionally with the specified
|
|
||||||
.Ar SIGNAL
|
|
||||||
instead of SIGTERM) and exit.
|
|
||||||
Under Windows (not Cygwin) the optional argument is ignored,
|
|
||||||
the service will always be stopped and removed.
|
|
||||||
.It Fl n, -net Ns = Ns Ar NETNAME
|
.It Fl n, -net Ns = Ns Ar NETNAME
|
||||||
Connect to net
|
Connect to net
|
||||||
.Ar NETNAME .
|
.Ar NETNAME .
|
||||||
|
|
@ -73,13 +62,6 @@ for
|
||||||
.Ar NETNAME
|
.Ar NETNAME
|
||||||
is the same as not specifying any
|
is the same as not specifying any
|
||||||
.Ar NETNAME .
|
.Ar NETNAME .
|
||||||
.It Fl K, -generate-keys Ns Op = Ns Ar BITS
|
|
||||||
Generate public/private RSA keypair and exit.
|
|
||||||
If
|
|
||||||
.Ar BITS
|
|
||||||
is omitted, the default length will be 2048 bits.
|
|
||||||
When saving keys to existing files, tinc will not delete the old keys,
|
|
||||||
you have to remove them manually.
|
|
||||||
.It Fl o, -option Ns = Ns Ar [HOST.]KEY=VALUE
|
.It Fl o, -option Ns = Ns Ar [HOST.]KEY=VALUE
|
||||||
Without specifying a
|
Without specifying a
|
||||||
.Ar HOST ,
|
.Ar HOST ,
|
||||||
|
|
@ -99,18 +81,23 @@ This option can be used more than once to specify multiple configuration variabl
|
||||||
.It Fl L, -mlock
|
.It Fl L, -mlock
|
||||||
Lock tinc into main memory.
|
Lock tinc into main memory.
|
||||||
This will prevent sensitive data like shared private keys to be written to the system swap files/partitions.
|
This will prevent sensitive data like shared private keys to be written to the system swap files/partitions.
|
||||||
|
This option is not supported on all platforms.
|
||||||
.It Fl -logfile Ns Op = Ns Ar FILE
|
.It Fl -logfile Ns Op = Ns Ar FILE
|
||||||
Write log entries to a file instead of to the system logging facility.
|
Write log entries to a file instead of to the system logging facility.
|
||||||
If
|
If
|
||||||
.Ar FILE
|
.Ar FILE
|
||||||
is omitted, the default is
|
is omitted, the default is
|
||||||
.Pa @localstatedir@/log/tinc. Ns Ar NETNAME Ns Pa .log.
|
.Pa @localstatedir@/log/tinc. Ns Ar NETNAME Ns Pa .log.
|
||||||
.It Fl -pidfile Ns = Ns Ar FILE
|
.It Fl -pidfile Ns = Ns Ar FILENAME
|
||||||
Write PID to
|
Store a cookie in
|
||||||
|
.Ar FILENAME
|
||||||
|
which allows
|
||||||
|
.Xr tinc 8
|
||||||
|
to authenticate.
|
||||||
|
If
|
||||||
.Ar FILE
|
.Ar FILE
|
||||||
instead of
|
is omitted, the default is
|
||||||
.Pa @runstatedir@/tinc. Ns Ar NETNAME Ns Pa .pid.
|
.Pa @localstatedir@/run/tinc. Ns Ar NETNAME Ns Pa .pid.
|
||||||
Under Windows this option will be ignored.
|
|
||||||
.It Fl -bypass-security
|
.It Fl -bypass-security
|
||||||
Disables encryption and authentication of the meta protocol.
|
Disables encryption and authentication of the meta protocol.
|
||||||
Only useful for debugging.
|
Only useful for debugging.
|
||||||
|
|
@ -118,10 +105,12 @@ Only useful for debugging.
|
||||||
With this option tinc chroots into the directory where network
|
With this option tinc chroots into the directory where network
|
||||||
config is located (@sysconfdir@/tinc/NETNAME if -n option is used,
|
config is located (@sysconfdir@/tinc/NETNAME if -n option is used,
|
||||||
or to the directory specified with -c option) after initialization.
|
or to the directory specified with -c option) after initialization.
|
||||||
|
This option is not supported on all platforms.
|
||||||
.It Fl U, -user Ns = Ns Ar USER
|
.It Fl U, -user Ns = Ns Ar USER
|
||||||
setuid to the specified
|
setuid to the specified
|
||||||
.Ar USER
|
.Ar USER
|
||||||
after initialization.
|
after initialization.
|
||||||
|
This option is not supported on all platforms.
|
||||||
.It Fl -help
|
.It Fl -help
|
||||||
Display short list of options.
|
Display short list of options.
|
||||||
.It Fl -version
|
.It Fl -version
|
||||||
|
|
@ -151,15 +140,6 @@ If the
|
||||||
.Fl -logfile
|
.Fl -logfile
|
||||||
option is used, this will also close and reopen the log file,
|
option is used, this will also close and reopen the log file,
|
||||||
useful when log rotation is used.
|
useful when log rotation is used.
|
||||||
.It INT
|
|
||||||
Temporarily increases debug level to 5.
|
|
||||||
Send this signal again to revert to the original level.
|
|
||||||
.It USR1
|
|
||||||
Dumps the connection list to syslog.
|
|
||||||
.It USR2
|
|
||||||
Dumps virtual network device statistics, all known nodes, edges and subnets to syslog.
|
|
||||||
.It WINCH
|
|
||||||
Purges all information remembered about unreachable nodes.
|
|
||||||
.El
|
.El
|
||||||
.Sh DEBUG LEVELS
|
.Sh DEBUG LEVELS
|
||||||
The tinc daemon can send a lot of messages to the syslog.
|
The tinc daemon can send a lot of messages to the syslog.
|
||||||
|
|
@ -190,7 +170,7 @@ This will log all network traffic over the virtual private network.
|
||||||
Directory containing the configuration files tinc uses.
|
Directory containing the configuration files tinc uses.
|
||||||
For more information, see
|
For more information, see
|
||||||
.Xr tinc.conf 5 .
|
.Xr tinc.conf 5 .
|
||||||
.It Pa @runstatedir@/tinc. Ns Ar NETNAME Ns Pa .pid
|
.It Pa @localstatedir@/run/tinc. Ns Ar NETNAME Ns Pa .pid
|
||||||
The PID of the currently running
|
The PID of the currently running
|
||||||
.Nm
|
.Nm
|
||||||
is stored in this file.
|
is stored in this file.
|
||||||
|
|
@ -206,8 +186,9 @@ If you find any bugs, report them to tinc@tinc-vpn.org.
|
||||||
.Sh TODO
|
.Sh TODO
|
||||||
A lot, especially security auditing.
|
A lot, especially security auditing.
|
||||||
.Sh SEE ALSO
|
.Sh SEE ALSO
|
||||||
|
.Xr tinc 8 ,
|
||||||
.Xr tinc.conf 5 ,
|
.Xr tinc.conf 5 ,
|
||||||
.Pa https://www.tinc-vpn.org/ ,
|
.Pa http://www.tinc-vpn.org/ ,
|
||||||
.Pa http://www.cabal.org/ .
|
.Pa http://www.cabal.org/ .
|
||||||
.Pp
|
.Pp
|
||||||
The full documentation for tinc is maintained as a Texinfo manual.
|
The full documentation for tinc is maintained as a Texinfo manual.
|
||||||
|
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
@set VERSION 1.0.36
|
|
||||||
@set PACKAGE tinc
|
|
||||||
@set sysconfdir /etc
|
|
||||||
@set localstatedir /var
|
|
||||||
@set runstatedir /run
|
|
||||||
|
|
@ -2,4 +2,3 @@
|
||||||
@set PACKAGE @PACKAGE@
|
@set PACKAGE @PACKAGE@
|
||||||
@set sysconfdir @sysconfdir@
|
@set sysconfdir @sysconfdir@
|
||||||
@set localstatedir @localstatedir@
|
@set localstatedir @localstatedir@
|
||||||
@set runstatedir @runstatedir@
|
|
||||||
|
|
|
||||||
3
gui/Makefile.am
Normal file
3
gui/Makefile.am
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
dist_bin_SCRIPTS = tinc-gui
|
||||||
|
|
||||||
|
extra_DIST = README.gui
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
# Makefile.in generated by automake 1.16.2 from Makefile.am.
|
# Makefile.in generated by automake 1.13.3 from Makefile.am.
|
||||||
# @configure_input@
|
# @configure_input@
|
||||||
|
|
||||||
# Copyright (C) 1994-2020 Free Software Foundation, Inc.
|
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
|
||||||
|
|
||||||
# This Makefile.in is free software; the Free Software Foundation
|
# This Makefile.in is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
|
@ -15,17 +15,7 @@
|
||||||
@SET_MAKE@
|
@SET_MAKE@
|
||||||
|
|
||||||
VPATH = @srcdir@
|
VPATH = @srcdir@
|
||||||
am__is_gnu_make = { \
|
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
|
||||||
if test -z '$(MAKELEVEL)'; then \
|
|
||||||
false; \
|
|
||||||
elif test -n '$(MAKE_HOST)'; then \
|
|
||||||
true; \
|
|
||||||
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
|
|
||||||
true; \
|
|
||||||
else \
|
|
||||||
false; \
|
|
||||||
fi; \
|
|
||||||
}
|
|
||||||
am__make_running_with_option = \
|
am__make_running_with_option = \
|
||||||
case $${target_option-} in \
|
case $${target_option-} in \
|
||||||
?) ;; \
|
?) ;; \
|
||||||
|
|
@ -88,42 +78,20 @@ PRE_UNINSTALL = :
|
||||||
POST_UNINSTALL = :
|
POST_UNINSTALL = :
|
||||||
build_triplet = @build@
|
build_triplet = @build@
|
||||||
host_triplet = @host@
|
host_triplet = @host@
|
||||||
subdir = systemd
|
subdir = gui
|
||||||
|
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
|
||||||
|
$(dist_bin_SCRIPTS)
|
||||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||||
am__aclocal_m4_deps = $(top_srcdir)/m4/attribute.m4 \
|
am__aclocal_m4_deps = $(top_srcdir)/m4/attribute.m4 \
|
||||||
$(top_srcdir)/m4/ax_append_flag.m4 \
|
$(top_srcdir)/m4/curses.m4 $(top_srcdir)/m4/lzo.m4 \
|
||||||
$(top_srcdir)/m4/ax_cflags_warn_all.m4 \
|
$(top_srcdir)/m4/openssl.m4 $(top_srcdir)/m4/readline.m4 \
|
||||||
$(top_srcdir)/m4/ax_check_compile_flag.m4 \
|
$(top_srcdir)/m4/zlib.m4 $(top_srcdir)/configure.ac
|
||||||
$(top_srcdir)/m4/ax_check_link_flag.m4 \
|
|
||||||
$(top_srcdir)/m4/ax_require_defined.m4 $(top_srcdir)/m4/lzo.m4 \
|
|
||||||
$(top_srcdir)/m4/openssl.m4 $(top_srcdir)/m4/zlib.m4 \
|
|
||||||
$(top_srcdir)/configure.ac
|
|
||||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||||
$(ACLOCAL_M4)
|
$(ACLOCAL_M4)
|
||||||
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
|
|
||||||
mkinstalldirs = $(install_sh) -d
|
mkinstalldirs = $(install_sh) -d
|
||||||
CONFIG_HEADER = $(top_builddir)/config.h
|
CONFIG_HEADER = $(top_builddir)/config.h
|
||||||
CONFIG_CLEAN_FILES =
|
CONFIG_CLEAN_FILES =
|
||||||
CONFIG_CLEAN_VPATH_FILES =
|
CONFIG_CLEAN_VPATH_FILES =
|
||||||
AM_V_P = $(am__v_P_@AM_V@)
|
|
||||||
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
|
||||||
am__v_P_0 = false
|
|
||||||
am__v_P_1 = :
|
|
||||||
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
|
||||||
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
|
||||||
am__v_GEN_0 = @echo " GEN " $@;
|
|
||||||
am__v_GEN_1 =
|
|
||||||
AM_V_at = $(am__v_at_@AM_V@)
|
|
||||||
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
|
||||||
am__v_at_0 = @
|
|
||||||
am__v_at_1 =
|
|
||||||
SOURCES =
|
|
||||||
DIST_SOURCES =
|
|
||||||
am__can_run_installinfo = \
|
|
||||||
case $$AM_UPDATE_INFO_DIR in \
|
|
||||||
n|no|NO) false;; \
|
|
||||||
*) (install-info --version) >/dev/null 2>&1;; \
|
|
||||||
esac
|
|
||||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||||
am__vpath_adj = case $$p in \
|
am__vpath_adj = case $$p in \
|
||||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||||
|
|
@ -151,10 +119,28 @@ am__uninstall_files_from_dir = { \
|
||||||
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
|
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
|
||||||
$(am__cd) "$$dir" && rm -f $$files; }; \
|
$(am__cd) "$$dir" && rm -f $$files; }; \
|
||||||
}
|
}
|
||||||
am__installdirs = "$(DESTDIR)$(systemddir)"
|
am__installdirs = "$(DESTDIR)$(bindir)"
|
||||||
DATA = $(nodist_systemd_DATA)
|
SCRIPTS = $(dist_bin_SCRIPTS)
|
||||||
|
AM_V_P = $(am__v_P_@AM_V@)
|
||||||
|
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||||
|
am__v_P_0 = false
|
||||||
|
am__v_P_1 = :
|
||||||
|
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||||
|
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||||
|
am__v_GEN_0 = @echo " GEN " $@;
|
||||||
|
am__v_GEN_1 =
|
||||||
|
AM_V_at = $(am__v_at_@AM_V@)
|
||||||
|
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||||
|
am__v_at_0 = @
|
||||||
|
am__v_at_1 =
|
||||||
|
SOURCES =
|
||||||
|
DIST_SOURCES =
|
||||||
|
am__can_run_installinfo = \
|
||||||
|
case $$AM_UPDATE_INFO_DIR in \
|
||||||
|
n|no|NO) false;; \
|
||||||
|
*) (install-info --version) >/dev/null 2>&1;; \
|
||||||
|
esac
|
||||||
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
|
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
|
||||||
am__DIST_COMMON = $(srcdir)/Makefile.in
|
|
||||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||||
ACLOCAL = @ACLOCAL@
|
ACLOCAL = @ACLOCAL@
|
||||||
AMTAR = @AMTAR@
|
AMTAR = @AMTAR@
|
||||||
|
|
@ -168,6 +154,7 @@ CCDEPMODE = @CCDEPMODE@
|
||||||
CFLAGS = @CFLAGS@
|
CFLAGS = @CFLAGS@
|
||||||
CPP = @CPP@
|
CPP = @CPP@
|
||||||
CPPFLAGS = @CPPFLAGS@
|
CPPFLAGS = @CPPFLAGS@
|
||||||
|
CURSES_LIBS = @CURSES_LIBS@
|
||||||
CYGPATH_W = @CYGPATH_W@
|
CYGPATH_W = @CYGPATH_W@
|
||||||
DEFS = @DEFS@
|
DEFS = @DEFS@
|
||||||
DEPDIR = @DEPDIR@
|
DEPDIR = @DEPDIR@
|
||||||
|
|
@ -183,8 +170,12 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||||
LDFLAGS = @LDFLAGS@
|
LDFLAGS = @LDFLAGS@
|
||||||
|
LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
|
||||||
|
LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
|
||||||
|
LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@
|
||||||
LIBOBJS = @LIBOBJS@
|
LIBOBJS = @LIBOBJS@
|
||||||
LIBS = @LIBS@
|
LIBS = @LIBS@
|
||||||
|
LN_S = @LN_S@
|
||||||
LTLIBOBJS = @LTLIBOBJS@
|
LTLIBOBJS = @LTLIBOBJS@
|
||||||
MAKEINFO = @MAKEINFO@
|
MAKEINFO = @MAKEINFO@
|
||||||
MKDIR_P = @MKDIR_P@
|
MKDIR_P = @MKDIR_P@
|
||||||
|
|
@ -197,6 +188,8 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||||
PACKAGE_URL = @PACKAGE_URL@
|
PACKAGE_URL = @PACKAGE_URL@
|
||||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||||
|
RANLIB = @RANLIB@
|
||||||
|
READLINE_LIBS = @READLINE_LIBS@
|
||||||
SET_MAKE = @SET_MAKE@
|
SET_MAKE = @SET_MAKE@
|
||||||
SHELL = @SHELL@
|
SHELL = @SHELL@
|
||||||
STRIP = @STRIP@
|
STRIP = @STRIP@
|
||||||
|
|
@ -243,24 +236,16 @@ pdfdir = @pdfdir@
|
||||||
prefix = @prefix@
|
prefix = @prefix@
|
||||||
program_transform_name = @program_transform_name@
|
program_transform_name = @program_transform_name@
|
||||||
psdir = @psdir@
|
psdir = @psdir@
|
||||||
runstatedir = @runstatedir@
|
|
||||||
sbindir = @sbindir@
|
sbindir = @sbindir@
|
||||||
sharedstatedir = @sharedstatedir@
|
sharedstatedir = @sharedstatedir@
|
||||||
srcdir = @srcdir@
|
srcdir = @srcdir@
|
||||||
sysconfdir = @sysconfdir@
|
sysconfdir = @sysconfdir@
|
||||||
systemd_path = @systemd_path@
|
|
||||||
target_alias = @target_alias@
|
target_alias = @target_alias@
|
||||||
top_build_prefix = @top_build_prefix@
|
top_build_prefix = @top_build_prefix@
|
||||||
top_builddir = @top_builddir@
|
top_builddir = @top_builddir@
|
||||||
top_srcdir = @top_srcdir@
|
top_srcdir = @top_srcdir@
|
||||||
EXTRA_DIST = tinc.service.in tinc@.service.in
|
dist_bin_SCRIPTS = tinc-gui
|
||||||
CLEANFILES = tinc.service tinc@.service
|
extra_DIST = README.gui
|
||||||
@WITH_SYSTEMD_TRUE@systemddir = @systemd_path@
|
|
||||||
@WITH_SYSTEMD_TRUE@nodist_systemd_DATA = tinc.service tinc@.service
|
|
||||||
substitute = sed \
|
|
||||||
-e s,'@sbindir\@',"$(sbindir)",g \
|
|
||||||
-e s,'@sysconfdir\@',"$(sysconfdir)",g
|
|
||||||
|
|
||||||
all: all-am
|
all: all-am
|
||||||
|
|
||||||
.SUFFIXES:
|
.SUFFIXES:
|
||||||
|
|
@ -273,16 +258,17 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||||
exit 1;; \
|
exit 1;; \
|
||||||
esac; \
|
esac; \
|
||||||
done; \
|
done; \
|
||||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu systemd/Makefile'; \
|
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gui/Makefile'; \
|
||||||
$(am__cd) $(top_srcdir) && \
|
$(am__cd) $(top_srcdir) && \
|
||||||
$(AUTOMAKE) --gnu systemd/Makefile
|
$(AUTOMAKE) --gnu gui/Makefile
|
||||||
|
.PRECIOUS: Makefile
|
||||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||||
@case '$?' in \
|
@case '$?' in \
|
||||||
*config.status*) \
|
*config.status*) \
|
||||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||||
*) \
|
*) \
|
||||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
|
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
|
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||||
esac;
|
esac;
|
||||||
|
|
||||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||||
|
|
@ -293,27 +279,56 @@ $(top_srcdir)/configure: $(am__configure_deps)
|
||||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||||
$(am__aclocal_m4_deps):
|
$(am__aclocal_m4_deps):
|
||||||
install-nodist_systemdDATA: $(nodist_systemd_DATA)
|
install-dist_binSCRIPTS: $(dist_bin_SCRIPTS)
|
||||||
@$(NORMAL_INSTALL)
|
@$(NORMAL_INSTALL)
|
||||||
@list='$(nodist_systemd_DATA)'; test -n "$(systemddir)" || list=; \
|
@list='$(dist_bin_SCRIPTS)'; test -n "$(bindir)" || list=; \
|
||||||
if test -n "$$list"; then \
|
if test -n "$$list"; then \
|
||||||
echo " $(MKDIR_P) '$(DESTDIR)$(systemddir)'"; \
|
echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
|
||||||
$(MKDIR_P) "$(DESTDIR)$(systemddir)" || exit 1; \
|
$(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
|
||||||
fi; \
|
fi; \
|
||||||
for p in $$list; do \
|
for p in $$list; do \
|
||||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||||
echo "$$d$$p"; \
|
if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
|
||||||
done | $(am__base_list) | \
|
done | \
|
||||||
while read files; do \
|
sed -e 'p;s,.*/,,;n' \
|
||||||
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(systemddir)'"; \
|
-e 'h;s|.*|.|' \
|
||||||
$(INSTALL_DATA) $$files "$(DESTDIR)$(systemddir)" || exit $$?; \
|
-e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
|
||||||
done
|
$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
|
||||||
|
{ d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
|
||||||
|
if ($$2 == $$4) { files[d] = files[d] " " $$1; \
|
||||||
|
if (++n[d] == $(am__install_max)) { \
|
||||||
|
print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
|
||||||
|
else { print "f", d "/" $$4, $$1 } } \
|
||||||
|
END { for (d in files) print "f", d, files[d] }' | \
|
||||||
|
while read type dir files; do \
|
||||||
|
if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
|
||||||
|
test -z "$$files" || { \
|
||||||
|
echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \
|
||||||
|
$(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
|
||||||
|
} \
|
||||||
|
; done
|
||||||
|
|
||||||
uninstall-nodist_systemdDATA:
|
uninstall-dist_binSCRIPTS:
|
||||||
@$(NORMAL_UNINSTALL)
|
@$(NORMAL_UNINSTALL)
|
||||||
@list='$(nodist_systemd_DATA)'; test -n "$(systemddir)" || list=; \
|
@list='$(dist_bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \
|
||||||
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
|
files=`for p in $$list; do echo "$$p"; done | \
|
||||||
dir='$(DESTDIR)$(systemddir)'; $(am__uninstall_files_from_dir)
|
sed -e 's,.*/,,;$(transform)'`; \
|
||||||
|
dir='$(DESTDIR)$(bindir)'; $(am__uninstall_files_from_dir)
|
||||||
|
|
||||||
|
installcheck-dist_binSCRIPTS: $(dist_bin_SCRIPTS)
|
||||||
|
bad=0; pid=$$$$; list="$(dist_bin_SCRIPTS)"; for p in $$list; do \
|
||||||
|
case ' $(AM_INSTALLCHECK_STD_OPTIONS_EXEMPT) ' in \
|
||||||
|
*" $$p "* | *" $(srcdir)/$$p "*) continue;; \
|
||||||
|
esac; \
|
||||||
|
f=`echo "$$p" | sed 's,^.*/,,;$(transform)'`; \
|
||||||
|
for opt in --help --version; do \
|
||||||
|
if "$(DESTDIR)$(bindir)/$$f" $$opt >c$${pid}_.out \
|
||||||
|
2>c$${pid}_.err </dev/null \
|
||||||
|
&& test -n "`cat c$${pid}_.out`" \
|
||||||
|
&& test -z "`cat c$${pid}_.err`"; then :; \
|
||||||
|
else echo "$$f does not support $$opt" 1>&2; bad=1; fi; \
|
||||||
|
done; \
|
||||||
|
done; rm -f c$${pid}_.???; exit $$bad
|
||||||
tags TAGS:
|
tags TAGS:
|
||||||
|
|
||||||
ctags CTAGS:
|
ctags CTAGS:
|
||||||
|
|
@ -321,10 +336,7 @@ ctags CTAGS:
|
||||||
cscope cscopelist:
|
cscope cscopelist:
|
||||||
|
|
||||||
|
|
||||||
distdir: $(BUILT_SOURCES)
|
distdir: $(DISTFILES)
|
||||||
$(MAKE) $(AM_MAKEFLAGS) distdir-am
|
|
||||||
|
|
||||||
distdir-am: $(DISTFILES)
|
|
||||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||||
list='$(DISTFILES)'; \
|
list='$(DISTFILES)'; \
|
||||||
|
|
@ -356,9 +368,9 @@ distdir-am: $(DISTFILES)
|
||||||
done
|
done
|
||||||
check-am: all-am
|
check-am: all-am
|
||||||
check: check-am
|
check: check-am
|
||||||
all-am: Makefile $(DATA)
|
all-am: Makefile $(SCRIPTS)
|
||||||
installdirs:
|
installdirs:
|
||||||
for dir in "$(DESTDIR)$(systemddir)"; do \
|
for dir in "$(DESTDIR)$(bindir)"; do \
|
||||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||||
done
|
done
|
||||||
install: install-am
|
install: install-am
|
||||||
|
|
@ -383,7 +395,6 @@ install-strip:
|
||||||
mostlyclean-generic:
|
mostlyclean-generic:
|
||||||
|
|
||||||
clean-generic:
|
clean-generic:
|
||||||
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
|
|
||||||
|
|
||||||
distclean-generic:
|
distclean-generic:
|
||||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||||
|
|
@ -412,13 +423,13 @@ info: info-am
|
||||||
|
|
||||||
info-am:
|
info-am:
|
||||||
|
|
||||||
install-data-am: install-nodist_systemdDATA
|
install-data-am:
|
||||||
|
|
||||||
install-dvi: install-dvi-am
|
install-dvi: install-dvi-am
|
||||||
|
|
||||||
install-dvi-am:
|
install-dvi-am:
|
||||||
|
|
||||||
install-exec-am:
|
install-exec-am: install-dist_binSCRIPTS
|
||||||
|
|
||||||
install-html: install-html-am
|
install-html: install-html-am
|
||||||
|
|
||||||
|
|
@ -438,7 +449,7 @@ install-ps: install-ps-am
|
||||||
|
|
||||||
install-ps-am:
|
install-ps-am:
|
||||||
|
|
||||||
installcheck-am:
|
installcheck-am: installcheck-dist_binSCRIPTS
|
||||||
|
|
||||||
maintainer-clean: maintainer-clean-am
|
maintainer-clean: maintainer-clean-am
|
||||||
-rm -f Makefile
|
-rm -f Makefile
|
||||||
|
|
@ -456,30 +467,23 @@ ps: ps-am
|
||||||
|
|
||||||
ps-am:
|
ps-am:
|
||||||
|
|
||||||
uninstall-am: uninstall-nodist_systemdDATA
|
uninstall-am: uninstall-dist_binSCRIPTS
|
||||||
|
|
||||||
.MAKE: install-am install-strip
|
.MAKE: install-am install-strip
|
||||||
|
|
||||||
.PHONY: all all-am check check-am clean clean-generic cscopelist-am \
|
.PHONY: all all-am check check-am clean clean-generic cscopelist-am \
|
||||||
ctags-am distclean distclean-generic distdir dvi dvi-am html \
|
ctags-am distclean distclean-generic distdir dvi dvi-am html \
|
||||||
html-am info info-am install install-am install-data \
|
html-am info info-am install install-am install-data \
|
||||||
install-data-am install-dvi install-dvi-am install-exec \
|
install-data-am install-dist_binSCRIPTS install-dvi \
|
||||||
install-exec-am install-html install-html-am install-info \
|
install-dvi-am install-exec install-exec-am install-html \
|
||||||
install-info-am install-man install-nodist_systemdDATA \
|
install-html-am install-info install-info-am install-man \
|
||||||
install-pdf install-pdf-am install-ps install-ps-am \
|
install-pdf install-pdf-am install-ps install-ps-am \
|
||||||
install-strip installcheck installcheck-am installdirs \
|
install-strip installcheck installcheck-am \
|
||||||
maintainer-clean maintainer-clean-generic mostlyclean \
|
installcheck-dist_binSCRIPTS installdirs maintainer-clean \
|
||||||
mostlyclean-generic pdf pdf-am ps ps-am tags-am uninstall \
|
maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
|
||||||
uninstall-am uninstall-nodist_systemdDATA
|
pdf-am ps ps-am tags-am uninstall uninstall-am \
|
||||||
|
uninstall-dist_binSCRIPTS
|
||||||
|
|
||||||
.PRECIOUS: Makefile
|
|
||||||
|
|
||||||
|
|
||||||
tinc.service: $(srcdir)/tinc.service.in
|
|
||||||
$(AM_V_GEN)$(substitute) $(srcdir)/tinc.service.in > $@
|
|
||||||
|
|
||||||
tinc@.service: $(srcdir)/tinc@.service.in
|
|
||||||
$(AM_V_GEN)$(substitute) $(srcdir)/tinc@.service.in > $@
|
|
||||||
|
|
||||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||||
609
gui/tinc-gui
Executable file
609
gui/tinc-gui
Executable file
|
|
@ -0,0 +1,609 @@
|
||||||
|
#!/usr/bin/python
|
||||||
|
|
||||||
|
# tinc-gui -- GUI for controlling a running tincd
|
||||||
|
# Copyright (C) 2009-2012 Guus Sliepen <guus@tinc-vpn.org>
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 2 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License along
|
||||||
|
# with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
|
||||||
|
import string
|
||||||
|
import socket
|
||||||
|
import wx
|
||||||
|
import sys
|
||||||
|
import os
|
||||||
|
import platform
|
||||||
|
import time
|
||||||
|
from wx.lib.mixins.listctrl import ColumnSorterMixin
|
||||||
|
from wx.lib.mixins.listctrl import ListCtrlAutoWidthMixin
|
||||||
|
|
||||||
|
if platform.system == 'Windows':
|
||||||
|
import _winreg
|
||||||
|
|
||||||
|
# Classes to interface with a running tinc daemon
|
||||||
|
|
||||||
|
REQ_STOP = 0
|
||||||
|
REQ_RELOAD = 1
|
||||||
|
REQ_RESTART = 2
|
||||||
|
REQ_DUMP_NODES = 3
|
||||||
|
REQ_DUMP_EDGES = 4
|
||||||
|
REQ_DUMP_SUBNETS = 5
|
||||||
|
REQ_DUMP_CONNECTIONS = 6
|
||||||
|
REQ_DUMP_GRAPH = 7
|
||||||
|
REQ_PURGE = 8
|
||||||
|
REQ_SET_DEBUG = 9
|
||||||
|
REQ_RETRY = 10
|
||||||
|
REQ_CONNECT = 11
|
||||||
|
REQ_DISCONNECT = 12
|
||||||
|
|
||||||
|
ID = 0
|
||||||
|
ACK = 4
|
||||||
|
CONTROL = 18
|
||||||
|
|
||||||
|
class Node:
|
||||||
|
def parse(self, args):
|
||||||
|
self.name = args[0]
|
||||||
|
self.address = args[1]
|
||||||
|
self.port = args[3]
|
||||||
|
self.cipher = int(args[4])
|
||||||
|
self.digest = int(args[5])
|
||||||
|
self.maclength = int(args[6])
|
||||||
|
self.compression = int(args[7])
|
||||||
|
self.options = int(args[8], 0x10)
|
||||||
|
self.status = int(args[9], 0x10)
|
||||||
|
self.nexthop = args[10]
|
||||||
|
self.via = args[11]
|
||||||
|
self.distance = int(args[12])
|
||||||
|
self.pmtu = int(args[13])
|
||||||
|
self.minmtu = int(args[14])
|
||||||
|
self.maxmtu = int(args[15])
|
||||||
|
self.last_state_change = float(args[16])
|
||||||
|
|
||||||
|
self.subnets = {}
|
||||||
|
|
||||||
|
class Edge:
|
||||||
|
def parse(self, args):
|
||||||
|
self.fr = args[0]
|
||||||
|
self.to = args[1]
|
||||||
|
self.address = args[2]
|
||||||
|
self.port = args[4]
|
||||||
|
self.options = int(args[5], 16)
|
||||||
|
self.weight = int(args[6])
|
||||||
|
|
||||||
|
class Subnet:
|
||||||
|
def parse(self, args):
|
||||||
|
if args[0].find('#') >= 0:
|
||||||
|
(address, self.weight) = args[0].split('#', 1)
|
||||||
|
else:
|
||||||
|
self.weight = 10
|
||||||
|
address = args[0]
|
||||||
|
|
||||||
|
if address.find('/') >= 0:
|
||||||
|
(self.address, self.prefixlen) = address.split('/', 1)
|
||||||
|
else:
|
||||||
|
self.address = address
|
||||||
|
self.prefixlen = '48'
|
||||||
|
|
||||||
|
self.owner = args[1]
|
||||||
|
|
||||||
|
class Connection:
|
||||||
|
def parse(self, args):
|
||||||
|
self.name = args[0]
|
||||||
|
self.address = args[1]
|
||||||
|
self.port = args[3]
|
||||||
|
self.options = int(args[4], 0x10)
|
||||||
|
self.socket = int(args[5])
|
||||||
|
self.status = int(args[6], 0x10)
|
||||||
|
self.weight = 123
|
||||||
|
|
||||||
|
class VPN:
|
||||||
|
confdir = '/etc/tinc'
|
||||||
|
piddir = '/var/run/'
|
||||||
|
|
||||||
|
def connect(self):
|
||||||
|
# read the pidfile
|
||||||
|
f = open(self.pidfile)
|
||||||
|
info = string.split(f.readline())
|
||||||
|
f.close()
|
||||||
|
|
||||||
|
# check if there is a UNIX socket as well
|
||||||
|
if self.pidfile.endswith(".pid"):
|
||||||
|
unixfile = self.pidfile.replace(".pid", ".socket");
|
||||||
|
else:
|
||||||
|
unixfile = self.pidfile + ".socket";
|
||||||
|
|
||||||
|
if os.path.exists(unixfile):
|
||||||
|
# use it if it exists
|
||||||
|
print(unixfile + " exists!");
|
||||||
|
s = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
|
||||||
|
s.connect(unixfile)
|
||||||
|
else:
|
||||||
|
# otherwise connect via TCP
|
||||||
|
print(unixfile + " does not exist.");
|
||||||
|
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||||
|
s.connect((info[2], int(info[4])))
|
||||||
|
|
||||||
|
self.sf = s.makefile()
|
||||||
|
s.close()
|
||||||
|
hello = string.split(self.sf.readline())
|
||||||
|
self.name = hello[1]
|
||||||
|
self.sf.write('0 ^' + info[1] + ' 17\r\n')
|
||||||
|
self.sf.flush()
|
||||||
|
resp = string.split(self.sf.readline())
|
||||||
|
self.port = info[4]
|
||||||
|
self.nodes = {}
|
||||||
|
self.edges = {}
|
||||||
|
self.subnets = {}
|
||||||
|
self.connections = {}
|
||||||
|
self.refresh()
|
||||||
|
|
||||||
|
def refresh(self):
|
||||||
|
self.sf.write('18 3\r\n18 4\r\n18 5\r\n18 6\r\n')
|
||||||
|
self.sf.flush()
|
||||||
|
|
||||||
|
for node in self.nodes.values():
|
||||||
|
node.visited = False
|
||||||
|
for edge in self.edges.values():
|
||||||
|
edge.visited = False
|
||||||
|
for subnet in self.subnets.values():
|
||||||
|
subnet.visited = False
|
||||||
|
for connections in self.connections.values():
|
||||||
|
connections.visited = False
|
||||||
|
|
||||||
|
while True:
|
||||||
|
resp = string.split(self.sf.readline())
|
||||||
|
if len(resp) < 2:
|
||||||
|
break
|
||||||
|
if resp[0] != '18':
|
||||||
|
break
|
||||||
|
if resp[1] == '3':
|
||||||
|
if len(resp) < 19:
|
||||||
|
continue
|
||||||
|
node = self.nodes.get(resp[2]) or Node()
|
||||||
|
node.parse(resp[2:])
|
||||||
|
node.visited = True
|
||||||
|
self.nodes[resp[2]] = node
|
||||||
|
elif resp[1] == '4':
|
||||||
|
if len(resp) < 9:
|
||||||
|
continue
|
||||||
|
edge = self.nodes.get((resp[2], resp[3])) or Edge()
|
||||||
|
edge.parse(resp[2:])
|
||||||
|
edge.visited = True
|
||||||
|
self.edges[(resp[2], resp[3])] = edge
|
||||||
|
elif resp[1] == '5':
|
||||||
|
if len(resp) < 4:
|
||||||
|
continue
|
||||||
|
subnet = self.subnets.get((resp[2], resp[3])) or Subnet()
|
||||||
|
subnet.parse(resp[2:])
|
||||||
|
subnet.visited = True
|
||||||
|
self.subnets[(resp[2], resp[3])] = subnet
|
||||||
|
self.nodes[subnet.owner].subnets[resp[2]] = subnet
|
||||||
|
elif resp[1] == '6':
|
||||||
|
if len(resp) < 9:
|
||||||
|
break
|
||||||
|
connection = self.connections.get((resp[2], resp[3], resp[5])) or Connection()
|
||||||
|
connection.parse(resp[2:])
|
||||||
|
connection.visited = True
|
||||||
|
self.connections[(resp[2], resp[3], resp[5])] = connection
|
||||||
|
else:
|
||||||
|
break
|
||||||
|
|
||||||
|
for key, subnet in self.subnets.items():
|
||||||
|
if not subnet.visited:
|
||||||
|
del self.subnets[key]
|
||||||
|
|
||||||
|
for key, edge in self.edges.items():
|
||||||
|
if not edge.visited:
|
||||||
|
del self.edges[key]
|
||||||
|
|
||||||
|
for key, node in self.nodes.items():
|
||||||
|
if not node.visited:
|
||||||
|
del self.nodes[key]
|
||||||
|
else:
|
||||||
|
for key, subnet in node.subnets.items():
|
||||||
|
if not subnet.visited:
|
||||||
|
del node.subnets[key]
|
||||||
|
|
||||||
|
for key, connection in self.connections.items():
|
||||||
|
if not connection.visited:
|
||||||
|
del self.connections[key]
|
||||||
|
|
||||||
|
def close(self):
|
||||||
|
self.sf.close()
|
||||||
|
|
||||||
|
def disconnect(self, name):
|
||||||
|
self.sf.write('18 12 ' + name + '\r\n')
|
||||||
|
self.sf.flush()
|
||||||
|
resp = string.split(self.sf.readline())
|
||||||
|
|
||||||
|
def debug(self, level = -1):
|
||||||
|
self.sf.write('18 9 ' + str(level) + '\r\n')
|
||||||
|
self.sf.flush()
|
||||||
|
resp = string.split(self.sf.readline())
|
||||||
|
return int(resp[2])
|
||||||
|
|
||||||
|
def __init__(self, netname = None, pidfile = None):
|
||||||
|
if platform.system == 'Windows':
|
||||||
|
try:
|
||||||
|
reg = _winreg.ConnectRegistry(None, HKEY_LOCAL_MACHINE)
|
||||||
|
key = _winreg.OpenKey(reg, "SOFTWARE\\tinc")
|
||||||
|
VPN.confdir = _winreg.QueryValue(key, None)
|
||||||
|
except WindowsError:
|
||||||
|
pass
|
||||||
|
|
||||||
|
if netname:
|
||||||
|
self.netname = netname
|
||||||
|
self.confbase = os.path.join(VPN.confdir, netname)
|
||||||
|
else:
|
||||||
|
self.confbase = VPN.confdir
|
||||||
|
|
||||||
|
self.tincconf = os.path.join(self.confbase, 'tinc.conf')
|
||||||
|
|
||||||
|
if pidfile != None:
|
||||||
|
self.pidfile = pidfile
|
||||||
|
else:
|
||||||
|
if platform.system == 'Windows':
|
||||||
|
self.pidfile = os.path.join(self.confbase, 'pid')
|
||||||
|
else:
|
||||||
|
if netname:
|
||||||
|
self.pidfile = os.path.join(VPN.piddir, 'tinc.' + netname + '.pid')
|
||||||
|
else:
|
||||||
|
self.pidfile = os.path.join(VPN.piddir, 'tinc.pid')
|
||||||
|
|
||||||
|
# GUI starts here
|
||||||
|
|
||||||
|
argv0 = sys.argv[0]
|
||||||
|
del sys.argv[0]
|
||||||
|
netname = None
|
||||||
|
pidfile = None
|
||||||
|
|
||||||
|
def usage(exitcode = 0):
|
||||||
|
print('Usage: ' + argv0 + ' [options]')
|
||||||
|
print('\nValid options are:')
|
||||||
|
print(' -n, --net=NETNAME Connect to net NETNAME.')
|
||||||
|
print(' --pidfile=FILENAME Read control cookie from FILENAME.')
|
||||||
|
print(' --help Display this help and exit.')
|
||||||
|
print('\nReport bugs to tinc@tinc-vpn.org.')
|
||||||
|
sys.exit(exitcode)
|
||||||
|
|
||||||
|
while sys.argv:
|
||||||
|
if sys.argv[0] in ('-n', '--net'):
|
||||||
|
del sys.argv[0]
|
||||||
|
netname = sys.argv[0]
|
||||||
|
elif sys.argv[0] in ('--pidfile'):
|
||||||
|
del sys.argv[0]
|
||||||
|
pidfile = sys.argv[0]
|
||||||
|
elif sys.argv[0] in ('--help'):
|
||||||
|
usage(0)
|
||||||
|
else:
|
||||||
|
print(argv0 + ': unrecognized option \'' + sys.argv[0] + '\'')
|
||||||
|
usage(1)
|
||||||
|
|
||||||
|
del sys.argv[0]
|
||||||
|
|
||||||
|
if netname == None:
|
||||||
|
netname = os.getenv("NETNAME")
|
||||||
|
|
||||||
|
if netname == ".":
|
||||||
|
netname = None
|
||||||
|
|
||||||
|
vpn = VPN(netname, pidfile)
|
||||||
|
vpn.connect()
|
||||||
|
|
||||||
|
class SuperListCtrl(wx.ListCtrl, ColumnSorterMixin, ListCtrlAutoWidthMixin):
|
||||||
|
def __init__(self, parent, style):
|
||||||
|
wx.ListCtrl.__init__(self, parent, -1, style=wx.LC_REPORT | wx.LC_HRULES | wx.LC_VRULES)
|
||||||
|
ListCtrlAutoWidthMixin.__init__(self)
|
||||||
|
ColumnSorterMixin.__init__(self, 16)
|
||||||
|
|
||||||
|
def GetListCtrl(self):
|
||||||
|
return self
|
||||||
|
|
||||||
|
|
||||||
|
class SettingsPage(wx.Panel):
|
||||||
|
def OnDebugLevel(self, event):
|
||||||
|
vpn.debug(self.debug.GetValue())
|
||||||
|
|
||||||
|
def __init__(self, parent, id):
|
||||||
|
wx.Panel.__init__(self, parent, id)
|
||||||
|
grid = wx.FlexGridSizer(cols = 2)
|
||||||
|
grid.AddGrowableCol(1, 1)
|
||||||
|
|
||||||
|
namelabel = wx.StaticText(self, -1, 'Name:')
|
||||||
|
self.name = wx.TextCtrl(self, -1, vpn.name)
|
||||||
|
grid.Add(namelabel)
|
||||||
|
grid.Add(self.name, 1, wx.EXPAND)
|
||||||
|
|
||||||
|
portlabel = wx.StaticText(self, -1, 'Port:')
|
||||||
|
self.port = wx.TextCtrl(self, -1, vpn.port)
|
||||||
|
grid.Add(portlabel)
|
||||||
|
grid.Add(self.port)
|
||||||
|
|
||||||
|
debuglabel = wx.StaticText(self, -1, 'Debug level:')
|
||||||
|
self.debug = wx.SpinCtrl(self, min = 0, max = 5, initial = vpn.debug())
|
||||||
|
self.debug.Bind(wx.EVT_SPINCTRL, self.OnDebugLevel)
|
||||||
|
grid.Add(debuglabel)
|
||||||
|
grid.Add(self.debug)
|
||||||
|
|
||||||
|
modelabel = wx.StaticText(self, -1, 'Mode:')
|
||||||
|
self.mode = wx.ComboBox(self, -1, style = wx.CB_READONLY, value = 'Router', choices = ['Router', 'Switch', 'Hub'])
|
||||||
|
grid.Add(modelabel)
|
||||||
|
grid.Add(self.mode)
|
||||||
|
|
||||||
|
self.SetSizer(grid)
|
||||||
|
|
||||||
|
class ConnectionsPage(wx.Panel):
|
||||||
|
def __init__(self, parent, id):
|
||||||
|
wx.Panel.__init__(self, parent, id)
|
||||||
|
self.list = SuperListCtrl(self, id)
|
||||||
|
self.list.InsertColumn(0, 'Name')
|
||||||
|
self.list.InsertColumn(1, 'Address')
|
||||||
|
self.list.InsertColumn(2, 'Port')
|
||||||
|
self.list.InsertColumn(3, 'Options')
|
||||||
|
self.list.InsertColumn(4, 'Weight')
|
||||||
|
|
||||||
|
hbox = wx.BoxSizer(wx.HORIZONTAL)
|
||||||
|
hbox.Add(self.list, 1, wx.EXPAND)
|
||||||
|
self.SetSizer(hbox)
|
||||||
|
self.refresh()
|
||||||
|
|
||||||
|
class ContextMenu(wx.Menu):
|
||||||
|
def __init__(self, item):
|
||||||
|
wx.Menu.__init__(self)
|
||||||
|
|
||||||
|
self.item = item
|
||||||
|
|
||||||
|
disconnect = wx.MenuItem(self, -1, 'Disconnect')
|
||||||
|
self.AppendItem(disconnect)
|
||||||
|
self.Bind(wx.EVT_MENU, self.OnDisconnect, id=disconnect.GetId())
|
||||||
|
|
||||||
|
def OnDisconnect(self, event):
|
||||||
|
vpn.disconnect(self.item[0])
|
||||||
|
|
||||||
|
def OnContext(self, event):
|
||||||
|
i = event.GetIndex()
|
||||||
|
self.PopupMenu(self.ContextMenu(self.list.itemDataMap[event.GetIndex()]), event.GetPosition())
|
||||||
|
|
||||||
|
def refresh(self):
|
||||||
|
sortstate = self.list.GetSortState()
|
||||||
|
self.list.itemDataMap = {}
|
||||||
|
i = 0
|
||||||
|
|
||||||
|
for key, connection in vpn.connections.items():
|
||||||
|
if self.list.GetItemCount() <= i:
|
||||||
|
self.list.InsertStringItem(i, connection.name)
|
||||||
|
else:
|
||||||
|
self.list.SetStringItem(i, 0, connection.name)
|
||||||
|
self.list.SetStringItem(i, 1, connection.address)
|
||||||
|
self.list.SetStringItem(i, 2, connection.port)
|
||||||
|
self.list.SetStringItem(i, 3, str(connection.options))
|
||||||
|
self.list.SetStringItem(i, 4, str(connection.weight))
|
||||||
|
self.list.itemDataMap[i] = (connection.name, connection.address, connection.port, connection.options, connection.weight)
|
||||||
|
self.list.Bind(wx.EVT_LIST_ITEM_RIGHT_CLICK, self.OnContext)
|
||||||
|
self.list.SetItemData(i, i)
|
||||||
|
i += 1
|
||||||
|
|
||||||
|
while self.list.GetItemCount() > i:
|
||||||
|
self.list.DeleteItem(self.list.GetItemCount() - 1)
|
||||||
|
|
||||||
|
self.list.SortListItems(sortstate[0], sortstate[1])
|
||||||
|
|
||||||
|
class NodesPage(wx.Panel):
|
||||||
|
def __init__(self, parent, id):
|
||||||
|
wx.Panel.__init__(self, parent, id)
|
||||||
|
self.list = SuperListCtrl(self, id)
|
||||||
|
self.list.InsertColumn( 0, 'Name')
|
||||||
|
self.list.InsertColumn( 1, 'Address')
|
||||||
|
self.list.InsertColumn( 2, 'Port')
|
||||||
|
self.list.InsertColumn( 3, 'Cipher')
|
||||||
|
self.list.InsertColumn( 4, 'Digest')
|
||||||
|
self.list.InsertColumn( 5, 'MACLength')
|
||||||
|
self.list.InsertColumn( 6, 'Compression')
|
||||||
|
self.list.InsertColumn( 7, 'Options')
|
||||||
|
self.list.InsertColumn( 8, 'Status')
|
||||||
|
self.list.InsertColumn( 9, 'Nexthop')
|
||||||
|
self.list.InsertColumn(10, 'Via')
|
||||||
|
self.list.InsertColumn(11, 'Distance')
|
||||||
|
self.list.InsertColumn(12, 'PMTU')
|
||||||
|
self.list.InsertColumn(13, 'Min MTU')
|
||||||
|
self.list.InsertColumn(14, 'Max MTU')
|
||||||
|
self.list.InsertColumn(15, 'Since')
|
||||||
|
|
||||||
|
hbox = wx.BoxSizer(wx.HORIZONTAL)
|
||||||
|
hbox.Add(self.list, 1, wx.EXPAND)
|
||||||
|
self.SetSizer(hbox)
|
||||||
|
self.refresh()
|
||||||
|
|
||||||
|
def refresh(self):
|
||||||
|
sortstate = self.list.GetSortState()
|
||||||
|
self.list.itemDataMap = {}
|
||||||
|
i = 0
|
||||||
|
|
||||||
|
for key, node in vpn.nodes.items():
|
||||||
|
if self.list.GetItemCount() <= i:
|
||||||
|
self.list.InsertStringItem(i, node.name)
|
||||||
|
else:
|
||||||
|
self.list.SetStringItem(i, 0, node.name)
|
||||||
|
self.list.SetStringItem(i, 1, node.address)
|
||||||
|
self.list.SetStringItem(i, 2, node.port)
|
||||||
|
self.list.SetStringItem(i, 3, str(node.cipher))
|
||||||
|
self.list.SetStringItem(i, 4, str(node.digest))
|
||||||
|
self.list.SetStringItem(i, 5, str(node.maclength))
|
||||||
|
self.list.SetStringItem(i, 6, str(node.compression))
|
||||||
|
self.list.SetStringItem(i, 7, format(node.options, "x"))
|
||||||
|
self.list.SetStringItem(i, 8, format(node.status, "04x"))
|
||||||
|
self.list.SetStringItem(i, 9, node.nexthop)
|
||||||
|
self.list.SetStringItem(i, 10, node.via)
|
||||||
|
self.list.SetStringItem(i, 11, str(node.distance))
|
||||||
|
self.list.SetStringItem(i, 12, str(node.pmtu))
|
||||||
|
self.list.SetStringItem(i, 13, str(node.minmtu))
|
||||||
|
self.list.SetStringItem(i, 14, str(node.maxmtu))
|
||||||
|
if node.last_state_change:
|
||||||
|
since = time.strftime("%Y-%m-%d %H:%M", time.localtime(node.last_state_change))
|
||||||
|
else:
|
||||||
|
since = "never"
|
||||||
|
self.list.SetStringItem(i, 15, since)
|
||||||
|
self.list.itemDataMap[i] = (node.name, node.address, node.port, node.cipher, node.digest, node.maclength, node.compression, node.options, node.status, node.nexthop, node.via, node.distance, node.pmtu, node.minmtu, node.maxmtu, since)
|
||||||
|
self.list.SetItemData(i, i)
|
||||||
|
i += 1
|
||||||
|
|
||||||
|
while self.list.GetItemCount() > i:
|
||||||
|
self.list.DeleteItem(self.list.GetItemCount() - 1)
|
||||||
|
|
||||||
|
self.list.SortListItems(sortstate[0], sortstate[1])
|
||||||
|
|
||||||
|
class EdgesPage(wx.Panel):
|
||||||
|
def __init__(self, parent, id):
|
||||||
|
wx.Panel.__init__(self, parent, id)
|
||||||
|
self.list = SuperListCtrl(self, id)
|
||||||
|
self.list.InsertColumn(0, 'From')
|
||||||
|
self.list.InsertColumn(1, 'To')
|
||||||
|
self.list.InsertColumn(2, 'Address')
|
||||||
|
self.list.InsertColumn(3, 'Port')
|
||||||
|
self.list.InsertColumn(4, 'Options')
|
||||||
|
self.list.InsertColumn(5, 'Weight')
|
||||||
|
|
||||||
|
hbox = wx.BoxSizer(wx.HORIZONTAL)
|
||||||
|
hbox.Add(self.list, 1, wx.EXPAND)
|
||||||
|
self.SetSizer(hbox)
|
||||||
|
self.refresh()
|
||||||
|
|
||||||
|
def refresh(self):
|
||||||
|
sortstate = self.list.GetSortState()
|
||||||
|
self.list.itemDataMap = {}
|
||||||
|
i = 0
|
||||||
|
|
||||||
|
for key, edge in vpn.edges.items():
|
||||||
|
if self.list.GetItemCount() <= i:
|
||||||
|
self.list.InsertStringItem(i, edge.fr)
|
||||||
|
else:
|
||||||
|
self.list.SetStringItem(i, 0, edge.fr)
|
||||||
|
self.list.SetStringItem(i, 1, edge.to)
|
||||||
|
self.list.SetStringItem(i, 2, edge.address)
|
||||||
|
self.list.SetStringItem(i, 3, edge.port)
|
||||||
|
self.list.SetStringItem(i, 4, format(edge.options, "x"))
|
||||||
|
self.list.SetStringItem(i, 5, str(edge.weight))
|
||||||
|
self.list.itemDataMap[i] = (edge.fr, edge.to, edge.address, edge.port, edge.options, edge.weight)
|
||||||
|
self.list.SetItemData(i, i)
|
||||||
|
i += 1
|
||||||
|
|
||||||
|
while self.list.GetItemCount() > i:
|
||||||
|
self.list.DeleteItem(self.list.GetItemCount() - 1)
|
||||||
|
|
||||||
|
self.list.SortListItems(sortstate[0], sortstate[1])
|
||||||
|
|
||||||
|
class SubnetsPage(wx.Panel):
|
||||||
|
def __init__(self, parent, id):
|
||||||
|
wx.Panel.__init__(self, parent, id)
|
||||||
|
self.list = SuperListCtrl(self, id)
|
||||||
|
self.list.InsertColumn(0, 'Subnet', wx.LIST_FORMAT_RIGHT)
|
||||||
|
self.list.InsertColumn(1, 'Weight', wx.LIST_FORMAT_RIGHT)
|
||||||
|
self.list.InsertColumn(2, 'Owner')
|
||||||
|
hbox = wx.BoxSizer(wx.HORIZONTAL)
|
||||||
|
hbox.Add(self.list, 1, wx.EXPAND)
|
||||||
|
self.SetSizer(hbox)
|
||||||
|
self.refresh()
|
||||||
|
|
||||||
|
def refresh(self):
|
||||||
|
sortstate = self.list.GetSortState()
|
||||||
|
self.list.itemDataMap = {}
|
||||||
|
i = 0
|
||||||
|
|
||||||
|
for key, subnet in vpn.subnets.items():
|
||||||
|
if self.list.GetItemCount() <= i:
|
||||||
|
self.list.InsertStringItem(i, subnet.address + '/' + subnet.prefixlen)
|
||||||
|
else:
|
||||||
|
self.list.SetStringItem(i, 0, subnet.address + '/' + subnet.prefixlen)
|
||||||
|
self.list.SetStringItem(i, 1, subnet.weight)
|
||||||
|
self.list.SetStringItem(i, 2, subnet.owner)
|
||||||
|
self.list.itemDataMap[i] = (subnet.address + '/' + subnet.prefixlen, subnet.weight, subnet.owner)
|
||||||
|
self.list.SetItemData(i, i)
|
||||||
|
i += 1
|
||||||
|
|
||||||
|
while self.list.GetItemCount() > i:
|
||||||
|
self.list.DeleteItem(self.list.GetItemCount() - 1)
|
||||||
|
|
||||||
|
self.list.SortListItems(sortstate[0], sortstate[1])
|
||||||
|
|
||||||
|
class StatusPage(wx.Panel):
|
||||||
|
def __init__(self, parent, id):
|
||||||
|
wx.Panel.__init__(self, parent, id)
|
||||||
|
|
||||||
|
class GraphPage(wx.Window):
|
||||||
|
def __init__(self, parent, id):
|
||||||
|
wx.Window.__init__(self, parent, id)
|
||||||
|
|
||||||
|
class NetPage(wx.Notebook):
|
||||||
|
def __init__(self, parent, id):
|
||||||
|
wx.Notebook.__init__(self, parent)
|
||||||
|
self.settings = SettingsPage(self, id)
|
||||||
|
self.connections = ConnectionsPage(self, id)
|
||||||
|
self.nodes = NodesPage(self, id)
|
||||||
|
self.edges = EdgesPage(self, id)
|
||||||
|
self.subnets = SubnetsPage(self, id)
|
||||||
|
self.graph = GraphPage(self, id)
|
||||||
|
self.status = StatusPage(self, id)
|
||||||
|
|
||||||
|
self.AddPage(self.settings, 'Settings')
|
||||||
|
#self.AddPage(self.status, 'Status')
|
||||||
|
self.AddPage(self.connections, 'Connections')
|
||||||
|
self.AddPage(self.nodes, 'Nodes')
|
||||||
|
self.AddPage(self.edges, 'Edges')
|
||||||
|
self.AddPage(self.subnets, 'Subnets')
|
||||||
|
#self.AddPage(self.graph, 'Graph')
|
||||||
|
|
||||||
|
|
||||||
|
class MainWindow(wx.Frame):
|
||||||
|
def OnQuit(self, event):
|
||||||
|
app.ExitMainLoop()
|
||||||
|
|
||||||
|
def OnTimer(self, event):
|
||||||
|
vpn.refresh()
|
||||||
|
self.np.nodes.refresh()
|
||||||
|
self.np.subnets.refresh()
|
||||||
|
self.np.edges.refresh()
|
||||||
|
self.np.connections.refresh()
|
||||||
|
|
||||||
|
def __init__(self, parent, id, title):
|
||||||
|
wx.Frame.__init__(self, parent, id, title)
|
||||||
|
|
||||||
|
menubar = wx.MenuBar()
|
||||||
|
file = wx.Menu()
|
||||||
|
file.Append(1, '&Quit\tCtrl-X', 'Quit tinc GUI')
|
||||||
|
menubar.Append(file, '&File')
|
||||||
|
|
||||||
|
#nb = wx.Notebook(self, -1)
|
||||||
|
#nb.SetPadding((0, 0))
|
||||||
|
self.np = NetPage(self, -1)
|
||||||
|
#nb.AddPage(np, 'VPN')
|
||||||
|
|
||||||
|
self.timer = wx.Timer(self, -1)
|
||||||
|
self.Bind(wx.EVT_TIMER, self.OnTimer, self.timer)
|
||||||
|
self.timer.Start(1000)
|
||||||
|
self.Bind(wx.EVT_MENU, self.OnQuit, id=1)
|
||||||
|
self.SetMenuBar(menubar)
|
||||||
|
self.Show()
|
||||||
|
|
||||||
|
app = wx.App()
|
||||||
|
mw = MainWindow(None, -1, 'Tinc GUI')
|
||||||
|
|
||||||
|
#def OnTaskBarIcon(event):
|
||||||
|
# mw.Raise()
|
||||||
|
#
|
||||||
|
#icon = wx.Icon("tincgui.ico", wx.BITMAP_TYPE_PNG)
|
||||||
|
#taskbaricon = wx.TaskBarIcon()
|
||||||
|
#taskbaricon.SetIcon(icon, 'Tinc GUI')
|
||||||
|
#wx.EVT_TASKBAR_RIGHT_UP(taskbaricon, OnTaskBarIcon)
|
||||||
|
|
||||||
|
app.MainLoop()
|
||||||
|
vpn.close()
|
||||||
398
install-sh
398
install-sh
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# install - install a program, script, or datafile
|
# install - install a program, script, or datafile
|
||||||
|
|
||||||
scriptversion=2018-03-11.20; # UTC
|
scriptversion=2011-11-20.07; # UTC
|
||||||
|
|
||||||
# This originates from X11R5 (mit/util/scripts/install.sh), which was
|
# This originates from X11R5 (mit/util/scripts/install.sh), which was
|
||||||
# later released in X11R6 (xc/config/util/install.sh) with the
|
# later released in X11R6 (xc/config/util/install.sh) with the
|
||||||
|
|
@ -41,15 +41,19 @@ scriptversion=2018-03-11.20; # UTC
|
||||||
# This script is compatible with the BSD install script, but was written
|
# This script is compatible with the BSD install script, but was written
|
||||||
# from scratch.
|
# from scratch.
|
||||||
|
|
||||||
tab=' '
|
|
||||||
nl='
|
nl='
|
||||||
'
|
'
|
||||||
IFS=" $tab$nl"
|
IFS=" "" $nl"
|
||||||
|
|
||||||
# Set DOITPROG to "echo" to test this script.
|
# 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-}
|
||||||
doit_exec=${doit:-exec}
|
if test -z "$doit"; then
|
||||||
|
doit_exec=exec
|
||||||
|
else
|
||||||
|
doit_exec=$doit
|
||||||
|
fi
|
||||||
|
|
||||||
# Put in absolute file names if you don't have them in your path;
|
# Put in absolute file names if you don't have them in your path;
|
||||||
# or use environment vars.
|
# or use environment vars.
|
||||||
|
|
@ -64,6 +68,17 @@ mvprog=${MVPROG-mv}
|
||||||
rmprog=${RMPROG-rm}
|
rmprog=${RMPROG-rm}
|
||||||
stripprog=${STRIPPROG-strip}
|
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_mkdir=
|
posix_mkdir=
|
||||||
|
|
||||||
# Desired mode of installed file.
|
# Desired mode of installed file.
|
||||||
|
|
@ -82,7 +97,7 @@ dir_arg=
|
||||||
dst_arg=
|
dst_arg=
|
||||||
|
|
||||||
copy_on_change=false
|
copy_on_change=false
|
||||||
is_target_a_directory=possibly
|
no_target_directory=
|
||||||
|
|
||||||
usage="\
|
usage="\
|
||||||
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
|
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
|
||||||
|
|
@ -122,57 +137,46 @@ while test $# -ne 0; do
|
||||||
-d) dir_arg=true;;
|
-d) dir_arg=true;;
|
||||||
|
|
||||||
-g) chgrpcmd="$chgrpprog $2"
|
-g) chgrpcmd="$chgrpprog $2"
|
||||||
shift;;
|
shift;;
|
||||||
|
|
||||||
--help) echo "$usage"; exit $?;;
|
--help) echo "$usage"; exit $?;;
|
||||||
|
|
||||||
-m) mode=$2
|
-m) mode=$2
|
||||||
case $mode in
|
case $mode in
|
||||||
*' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*)
|
*' '* | *' '* | *'
|
||||||
echo "$0: invalid mode: $mode" >&2
|
'* | *'*'* | *'?'* | *'['*)
|
||||||
exit 1;;
|
echo "$0: invalid mode: $mode" >&2
|
||||||
esac
|
exit 1;;
|
||||||
shift;;
|
esac
|
||||||
|
shift;;
|
||||||
|
|
||||||
-o) chowncmd="$chownprog $2"
|
-o) chowncmd="$chownprog $2"
|
||||||
shift;;
|
shift;;
|
||||||
|
|
||||||
-s) stripcmd=$stripprog;;
|
-s) stripcmd=$stripprog;;
|
||||||
|
|
||||||
-t)
|
-t) dst_arg=$2
|
||||||
is_target_a_directory=always
|
# Protect names problematic for 'test' and other utilities.
|
||||||
dst_arg=$2
|
case $dst_arg in
|
||||||
# Protect names problematic for 'test' and other utilities.
|
-* | [=\(\)!]) dst_arg=./$dst_arg;;
|
||||||
case $dst_arg in
|
esac
|
||||||
-* | [=\(\)!]) dst_arg=./$dst_arg;;
|
shift;;
|
||||||
esac
|
|
||||||
shift;;
|
|
||||||
|
|
||||||
-T) is_target_a_directory=never;;
|
-T) no_target_directory=true;;
|
||||||
|
|
||||||
--version) echo "$0 $scriptversion"; exit $?;;
|
--version) echo "$0 $scriptversion"; exit $?;;
|
||||||
|
|
||||||
--) shift
|
--) shift
|
||||||
break;;
|
break;;
|
||||||
|
|
||||||
-*) echo "$0: invalid option: $1" >&2
|
-*) echo "$0: invalid option: $1" >&2
|
||||||
exit 1;;
|
exit 1;;
|
||||||
|
|
||||||
*) break;;
|
*) break;;
|
||||||
esac
|
esac
|
||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
|
|
||||||
# We allow the use of options -d and -T together, by making -d
|
|
||||||
# take the precedence; this is for compatibility with GNU install.
|
|
||||||
|
|
||||||
if test -n "$dir_arg"; then
|
|
||||||
if test -n "$dst_arg"; then
|
|
||||||
echo "$0: target directory not allowed when installing a directory." >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
|
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
|
||||||
# When -d is used, all remaining arguments are directories to create.
|
# When -d is used, all remaining arguments are directories to create.
|
||||||
# When -t is used, the destination is already specified.
|
# When -t is used, the destination is already specified.
|
||||||
|
|
@ -203,15 +207,6 @@ if test $# -eq 0; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test -z "$dir_arg"; then
|
|
||||||
if test $# -gt 1 || test "$is_target_a_directory" = always; then
|
|
||||||
if test ! -d "$dst_arg"; then
|
|
||||||
echo "$0: $dst_arg: Is not a directory." >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test -z "$dir_arg"; then
|
if test -z "$dir_arg"; then
|
||||||
do_exit='(exit $ret); exit $ret'
|
do_exit='(exit $ret); exit $ret'
|
||||||
trap "ret=129; $do_exit" 1
|
trap "ret=129; $do_exit" 1
|
||||||
|
|
@ -228,16 +223,16 @@ if test -z "$dir_arg"; then
|
||||||
|
|
||||||
*[0-7])
|
*[0-7])
|
||||||
if test -z "$stripcmd"; then
|
if test -z "$stripcmd"; then
|
||||||
u_plus_rw=
|
u_plus_rw=
|
||||||
else
|
else
|
||||||
u_plus_rw='% 200'
|
u_plus_rw='% 200'
|
||||||
fi
|
fi
|
||||||
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
|
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
|
||||||
*)
|
*)
|
||||||
if test -z "$stripcmd"; then
|
if test -z "$stripcmd"; then
|
||||||
u_plus_rw=
|
u_plus_rw=
|
||||||
else
|
else
|
||||||
u_plus_rw=,u+rw
|
u_plus_rw=,u+rw
|
||||||
fi
|
fi
|
||||||
cp_umask=$mode$u_plus_rw;;
|
cp_umask=$mode$u_plus_rw;;
|
||||||
esac
|
esac
|
||||||
|
|
@ -271,113 +266,122 @@ do
|
||||||
fi
|
fi
|
||||||
dst=$dst_arg
|
dst=$dst_arg
|
||||||
|
|
||||||
# If destination is a directory, append the input filename.
|
# 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 -d "$dst"; then
|
||||||
if test "$is_target_a_directory" = never; then
|
if test -n "$no_target_directory"; then
|
||||||
echo "$0: $dst_arg: Is a directory" >&2
|
echo "$0: $dst_arg: Is a directory" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
dstdir=$dst
|
dstdir=$dst
|
||||||
dstbase=`basename "$src"`
|
dst=$dstdir/`basename "$src"`
|
||||||
case $dst in
|
|
||||||
*/) dst=$dst$dstbase;;
|
|
||||||
*) dst=$dst/$dstbase;;
|
|
||||||
esac
|
|
||||||
dstdir_status=0
|
dstdir_status=0
|
||||||
else
|
else
|
||||||
dstdir=`dirname "$dst"`
|
# Prefer dirname, but fall back on a substitute if dirname fails.
|
||||||
|
dstdir=`
|
||||||
|
(dirname "$dst") 2>/dev/null ||
|
||||||
|
expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
|
||||||
|
X"$dst" : 'X\(//\)[^/]' \| \
|
||||||
|
X"$dst" : 'X\(//\)$' \| \
|
||||||
|
X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
|
||||||
|
echo X"$dst" |
|
||||||
|
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
|
||||||
|
s//\1/
|
||||||
|
q
|
||||||
|
}
|
||||||
|
/^X\(\/\/\)[^/].*/{
|
||||||
|
s//\1/
|
||||||
|
q
|
||||||
|
}
|
||||||
|
/^X\(\/\/\)$/{
|
||||||
|
s//\1/
|
||||||
|
q
|
||||||
|
}
|
||||||
|
/^X\(\/\).*/{
|
||||||
|
s//\1/
|
||||||
|
q
|
||||||
|
}
|
||||||
|
s/.*/./; q'
|
||||||
|
`
|
||||||
|
|
||||||
test -d "$dstdir"
|
test -d "$dstdir"
|
||||||
dstdir_status=$?
|
dstdir_status=$?
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
case $dstdir in
|
|
||||||
*/) dstdirslash=$dstdir;;
|
|
||||||
*) dstdirslash=$dstdir/;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
obsolete_mkdir_used=false
|
obsolete_mkdir_used=false
|
||||||
|
|
||||||
if test $dstdir_status != 0; then
|
if test $dstdir_status != 0; then
|
||||||
case $posix_mkdir in
|
case $posix_mkdir in
|
||||||
'')
|
'')
|
||||||
# Create intermediate dirs using mode 755 as modified by the umask.
|
# Create intermediate dirs using mode 755 as modified by the umask.
|
||||||
# This is like FreeBSD 'install' as of 1997-10-28.
|
# This is like FreeBSD 'install' as of 1997-10-28.
|
||||||
umask=`umask`
|
umask=`umask`
|
||||||
case $stripcmd.$umask in
|
case $stripcmd.$umask in
|
||||||
# Optimize common cases.
|
# Optimize common cases.
|
||||||
*[2367][2367]) mkdir_umask=$umask;;
|
*[2367][2367]) mkdir_umask=$umask;;
|
||||||
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
|
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
|
||||||
|
|
||||||
*[0-7])
|
*[0-7])
|
||||||
mkdir_umask=`expr $umask + 22 \
|
mkdir_umask=`expr $umask + 22 \
|
||||||
- $umask % 100 % 40 + $umask % 20 \
|
- $umask % 100 % 40 + $umask % 20 \
|
||||||
- $umask % 10 % 4 + $umask % 2
|
- $umask % 10 % 4 + $umask % 2
|
||||||
`;;
|
`;;
|
||||||
*) mkdir_umask=$umask,go-w;;
|
*) mkdir_umask=$umask,go-w;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# With -d, create the new directory with the user-specified mode.
|
# With -d, create the new directory with the user-specified mode.
|
||||||
# Otherwise, rely on $mkdir_umask.
|
# Otherwise, rely on $mkdir_umask.
|
||||||
if test -n "$dir_arg"; then
|
if test -n "$dir_arg"; then
|
||||||
mkdir_mode=-m$mode
|
mkdir_mode=-m$mode
|
||||||
else
|
else
|
||||||
mkdir_mode=
|
mkdir_mode=
|
||||||
fi
|
fi
|
||||||
|
|
||||||
posix_mkdir=false
|
posix_mkdir=false
|
||||||
case $umask in
|
case $umask in
|
||||||
*[123567][0-7][0-7])
|
*[123567][0-7][0-7])
|
||||||
# POSIX mkdir -p sets u+wx bits regardless of umask, which
|
# POSIX mkdir -p sets u+wx bits regardless of umask, which
|
||||||
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
|
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
# Note that $RANDOM variable is not portable (e.g. dash); Use it
|
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
|
||||||
# here however when possible just to lower collision chance.
|
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
|
||||||
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
|
|
||||||
|
|
||||||
trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0
|
if (umask $mkdir_umask &&
|
||||||
|
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
|
||||||
# Because "mkdir -p" follows existing symlinks and we likely work
|
then
|
||||||
# directly in world-writeable /tmp, make sure that the '$tmpdir'
|
if test -z "$dir_arg" || {
|
||||||
# directory is successfully created first before we actually test
|
# Check for POSIX incompatibilities with -m.
|
||||||
# 'mkdir -p' feature.
|
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
|
||||||
if (umask $mkdir_umask &&
|
# other-writable bit of parent directory when it shouldn't.
|
||||||
$mkdirprog $mkdir_mode "$tmpdir" &&
|
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
|
||||||
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
|
ls_ld_tmpdir=`ls -ld "$tmpdir"`
|
||||||
then
|
case $ls_ld_tmpdir in
|
||||||
if test -z "$dir_arg" || {
|
d????-?r-*) different_mode=700;;
|
||||||
# Check for POSIX incompatibilities with -m.
|
d????-?--*) different_mode=755;;
|
||||||
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
|
*) false;;
|
||||||
# other-writable bit of parent directory when it shouldn't.
|
esac &&
|
||||||
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
|
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
|
||||||
test_tmpdir="$tmpdir/a"
|
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
|
||||||
ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
|
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
|
||||||
case $ls_ld_tmpdir in
|
}
|
||||||
d????-?r-*) different_mode=700;;
|
}
|
||||||
d????-?--*) different_mode=755;;
|
then posix_mkdir=:
|
||||||
*) false;;
|
fi
|
||||||
esac &&
|
rmdir "$tmpdir/d" "$tmpdir"
|
||||||
$mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
|
else
|
||||||
ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
|
# Remove any dirs left behind by ancient mkdir implementations.
|
||||||
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
|
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
|
||||||
}
|
fi
|
||||||
}
|
trap '' 0;;
|
||||||
then posix_mkdir=:
|
esac;;
|
||||||
fi
|
|
||||||
rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
|
|
||||||
else
|
|
||||||
# Remove any dirs left behind by ancient mkdir implementations.
|
|
||||||
rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
|
|
||||||
fi
|
|
||||||
trap '' 0;;
|
|
||||||
esac;;
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if
|
if
|
||||||
$posix_mkdir && (
|
$posix_mkdir && (
|
||||||
umask $mkdir_umask &&
|
umask $mkdir_umask &&
|
||||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
|
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
|
||||||
)
|
)
|
||||||
then :
|
then :
|
||||||
else
|
else
|
||||||
|
|
@ -387,51 +391,53 @@ do
|
||||||
# directory the slow way, step by step, checking for races as we go.
|
# directory the slow way, step by step, checking for races as we go.
|
||||||
|
|
||||||
case $dstdir in
|
case $dstdir in
|
||||||
/*) prefix='/';;
|
/*) prefix='/';;
|
||||||
[-=\(\)!]*) prefix='./';;
|
[-=\(\)!]*) prefix='./';;
|
||||||
*) prefix='';;
|
*) prefix='';;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
eval "$initialize_posix_glob"
|
||||||
|
|
||||||
oIFS=$IFS
|
oIFS=$IFS
|
||||||
IFS=/
|
IFS=/
|
||||||
set -f
|
$posix_glob set -f
|
||||||
set fnord $dstdir
|
set fnord $dstdir
|
||||||
shift
|
shift
|
||||||
set +f
|
$posix_glob set +f
|
||||||
IFS=$oIFS
|
IFS=$oIFS
|
||||||
|
|
||||||
prefixes=
|
prefixes=
|
||||||
|
|
||||||
for d
|
for d
|
||||||
do
|
do
|
||||||
test X"$d" = X && continue
|
test X"$d" = X && continue
|
||||||
|
|
||||||
prefix=$prefix$d
|
prefix=$prefix$d
|
||||||
if test -d "$prefix"; then
|
if test -d "$prefix"; then
|
||||||
prefixes=
|
prefixes=
|
||||||
else
|
else
|
||||||
if $posix_mkdir; then
|
if $posix_mkdir; then
|
||||||
(umask=$mkdir_umask &&
|
(umask=$mkdir_umask &&
|
||||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
|
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
|
||||||
# Don't fail if two instances are running concurrently.
|
# Don't fail if two instances are running concurrently.
|
||||||
test -d "$prefix" || exit 1
|
test -d "$prefix" || exit 1
|
||||||
else
|
else
|
||||||
case $prefix in
|
case $prefix in
|
||||||
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
|
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
|
||||||
*) qprefix=$prefix;;
|
*) qprefix=$prefix;;
|
||||||
esac
|
esac
|
||||||
prefixes="$prefixes '$qprefix'"
|
prefixes="$prefixes '$qprefix'"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
prefix=$prefix/
|
prefix=$prefix/
|
||||||
done
|
done
|
||||||
|
|
||||||
if test -n "$prefixes"; then
|
if test -n "$prefixes"; then
|
||||||
# Don't fail if two instances are running concurrently.
|
# Don't fail if two instances are running concurrently.
|
||||||
(umask $mkdir_umask &&
|
(umask $mkdir_umask &&
|
||||||
eval "\$doit_exec \$mkdirprog $prefixes") ||
|
eval "\$doit_exec \$mkdirprog $prefixes") ||
|
||||||
test -d "$dstdir" || exit 1
|
test -d "$dstdir" || exit 1
|
||||||
obsolete_mkdir_used=true
|
obsolete_mkdir_used=true
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
@ -444,25 +450,14 @@ do
|
||||||
else
|
else
|
||||||
|
|
||||||
# Make a couple of temp file names in the proper directory.
|
# Make a couple of temp file names in the proper directory.
|
||||||
dsttmp=${dstdirslash}_inst.$$_
|
dsttmp=$dstdir/_inst.$$_
|
||||||
rmtmp=${dstdirslash}_rm.$$_
|
rmtmp=$dstdir/_rm.$$_
|
||||||
|
|
||||||
# Trap to clean up those temp files at exit.
|
# Trap to clean up those temp files at exit.
|
||||||
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
|
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
|
||||||
|
|
||||||
# Copy the file name to the temp name.
|
# Copy the file name to the temp name.
|
||||||
(umask $cp_umask &&
|
(umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
|
||||||
{ test -z "$stripcmd" || {
|
|
||||||
# Create $dsttmp read-write so that cp doesn't create it read-only,
|
|
||||||
# which would cause strip to fail.
|
|
||||||
if test -z "$doit"; then
|
|
||||||
: >"$dsttmp" # No need to fork-exec 'touch'.
|
|
||||||
else
|
|
||||||
$doit touch "$dsttmp"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
} &&
|
|
||||||
$doit_exec $cpprog "$src" "$dsttmp") &&
|
|
||||||
|
|
||||||
# and set any options; do chmod last to preserve setuid bits.
|
# and set any options; do chmod last to preserve setuid bits.
|
||||||
#
|
#
|
||||||
|
|
@ -477,12 +472,15 @@ do
|
||||||
|
|
||||||
# If -C, don't bother to copy if it wouldn't change the file.
|
# If -C, don't bother to copy if it wouldn't change the file.
|
||||||
if $copy_on_change &&
|
if $copy_on_change &&
|
||||||
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
|
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
|
||||||
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
|
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
|
||||||
set -f &&
|
|
||||||
|
eval "$initialize_posix_glob" &&
|
||||||
|
$posix_glob set -f &&
|
||||||
set X $old && old=:$2:$4:$5:$6 &&
|
set X $old && old=:$2:$4:$5:$6 &&
|
||||||
set X $new && new=:$2:$4:$5:$6 &&
|
set X $new && new=:$2:$4:$5:$6 &&
|
||||||
set +f &&
|
$posix_glob set +f &&
|
||||||
|
|
||||||
test "$old" = "$new" &&
|
test "$old" = "$new" &&
|
||||||
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
|
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
|
||||||
then
|
then
|
||||||
|
|
@ -495,24 +493,24 @@ do
|
||||||
# to itself, or perhaps because mv is so ancient that it does not
|
# to itself, or perhaps because mv is so ancient that it does not
|
||||||
# support -f.
|
# support -f.
|
||||||
{
|
{
|
||||||
# Now remove or move aside any old file at destination location.
|
# Now remove or move aside any old file at destination location.
|
||||||
# We try this two ways since rm can't unlink itself on some
|
# We try this two ways since rm can't unlink itself on some
|
||||||
# systems and the destination file might be busy for other
|
# systems and the destination file might be busy for other
|
||||||
# reasons. In this case, the final cleanup might fail but the new
|
# reasons. In this case, the final cleanup might fail but the new
|
||||||
# file should still install successfully.
|
# file should still install successfully.
|
||||||
{
|
{
|
||||||
test ! -f "$dst" ||
|
test ! -f "$dst" ||
|
||||||
$doit $rmcmd -f "$dst" 2>/dev/null ||
|
$doit $rmcmd -f "$dst" 2>/dev/null ||
|
||||||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
|
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
|
||||||
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
|
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
|
||||||
} ||
|
} ||
|
||||||
{ echo "$0: cannot unlink or rename $dst" >&2
|
{ echo "$0: cannot unlink or rename $dst" >&2
|
||||||
(exit 1); exit 1
|
(exit 1); exit 1
|
||||||
}
|
}
|
||||||
} &&
|
} &&
|
||||||
|
|
||||||
# Now rename the file to the real destination.
|
# Now rename the file to the real destination.
|
||||||
$doit $mvcmd "$dsttmp" "$dst"
|
$doit $mvcmd "$dsttmp" "$dst"
|
||||||
}
|
}
|
||||||
fi || exit 1
|
fi || exit 1
|
||||||
|
|
||||||
|
|
@ -521,9 +519,9 @@ do
|
||||||
done
|
done
|
||||||
|
|
||||||
# Local variables:
|
# Local variables:
|
||||||
# eval: (add-hook 'before-save-hook 'time-stamp)
|
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||||
# time-stamp-start: "scriptversion="
|
# time-stamp-start: "scriptversion="
|
||||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||||
# time-stamp-time-zone: "UTC0"
|
# time-stamp-time-zone: "UTC"
|
||||||
# time-stamp-end: "; # UTC"
|
# time-stamp-end: "; # UTC"
|
||||||
# End:
|
# End:
|
||||||
|
|
|
||||||
4
m4/Makefile.am
Normal file
4
m4/Makefile.am
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
## Process this file with automake to produce Makefile.in -*-Makefile-*-
|
||||||
|
|
||||||
|
EXTRA_DIST = README *.m4
|
||||||
|
|
||||||
403
m4/Makefile.in
Normal file
403
m4/Makefile.in
Normal file
|
|
@ -0,0 +1,403 @@
|
||||||
|
# Makefile.in generated by automake 1.13.3 from Makefile.am.
|
||||||
|
# @configure_input@
|
||||||
|
|
||||||
|
# Copyright (C) 1994-2013 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.
|
||||||
|
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||||
|
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
# PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
@SET_MAKE@
|
||||||
|
VPATH = @srcdir@
|
||||||
|
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
|
||||||
|
am__make_running_with_option = \
|
||||||
|
case $${target_option-} in \
|
||||||
|
?) ;; \
|
||||||
|
*) echo "am__make_running_with_option: internal error: invalid" \
|
||||||
|
"target option '$${target_option-}' specified" >&2; \
|
||||||
|
exit 1;; \
|
||||||
|
esac; \
|
||||||
|
has_opt=no; \
|
||||||
|
sane_makeflags=$$MAKEFLAGS; \
|
||||||
|
if $(am__is_gnu_make); then \
|
||||||
|
sane_makeflags=$$MFLAGS; \
|
||||||
|
else \
|
||||||
|
case $$MAKEFLAGS in \
|
||||||
|
*\\[\ \ ]*) \
|
||||||
|
bs=\\; \
|
||||||
|
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
|
||||||
|
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
|
||||||
|
esac; \
|
||||||
|
fi; \
|
||||||
|
skip_next=no; \
|
||||||
|
strip_trailopt () \
|
||||||
|
{ \
|
||||||
|
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
|
||||||
|
}; \
|
||||||
|
for flg in $$sane_makeflags; do \
|
||||||
|
test $$skip_next = yes && { skip_next=no; continue; }; \
|
||||||
|
case $$flg in \
|
||||||
|
*=*|--*) continue;; \
|
||||||
|
-*I) strip_trailopt 'I'; skip_next=yes;; \
|
||||||
|
-*I?*) strip_trailopt 'I';; \
|
||||||
|
-*O) strip_trailopt 'O'; skip_next=yes;; \
|
||||||
|
-*O?*) strip_trailopt 'O';; \
|
||||||
|
-*l) strip_trailopt 'l'; skip_next=yes;; \
|
||||||
|
-*l?*) strip_trailopt 'l';; \
|
||||||
|
-[dEDm]) skip_next=yes;; \
|
||||||
|
-[JT]) skip_next=yes;; \
|
||||||
|
esac; \
|
||||||
|
case $$flg in \
|
||||||
|
*$$target_option*) has_opt=yes; break;; \
|
||||||
|
esac; \
|
||||||
|
done; \
|
||||||
|
test $$has_opt = yes
|
||||||
|
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
|
||||||
|
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
|
||||||
|
pkgdatadir = $(datadir)/@PACKAGE@
|
||||||
|
pkgincludedir = $(includedir)/@PACKAGE@
|
||||||
|
pkglibdir = $(libdir)/@PACKAGE@
|
||||||
|
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||||
|
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||||
|
install_sh_DATA = $(install_sh) -c -m 644
|
||||||
|
install_sh_PROGRAM = $(install_sh) -c
|
||||||
|
install_sh_SCRIPT = $(install_sh) -c
|
||||||
|
INSTALL_HEADER = $(INSTALL_DATA)
|
||||||
|
transform = $(program_transform_name)
|
||||||
|
NORMAL_INSTALL = :
|
||||||
|
PRE_INSTALL = :
|
||||||
|
POST_INSTALL = :
|
||||||
|
NORMAL_UNINSTALL = :
|
||||||
|
PRE_UNINSTALL = :
|
||||||
|
POST_UNINSTALL = :
|
||||||
|
build_triplet = @build@
|
||||||
|
host_triplet = @host@
|
||||||
|
subdir = m4
|
||||||
|
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am README
|
||||||
|
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||||
|
am__aclocal_m4_deps = $(top_srcdir)/m4/attribute.m4 \
|
||||||
|
$(top_srcdir)/m4/curses.m4 $(top_srcdir)/m4/lzo.m4 \
|
||||||
|
$(top_srcdir)/m4/openssl.m4 $(top_srcdir)/m4/readline.m4 \
|
||||||
|
$(top_srcdir)/m4/zlib.m4 $(top_srcdir)/configure.ac
|
||||||
|
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||||
|
$(ACLOCAL_M4)
|
||||||
|
mkinstalldirs = $(install_sh) -d
|
||||||
|
CONFIG_HEADER = $(top_builddir)/config.h
|
||||||
|
CONFIG_CLEAN_FILES =
|
||||||
|
CONFIG_CLEAN_VPATH_FILES =
|
||||||
|
AM_V_P = $(am__v_P_@AM_V@)
|
||||||
|
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||||
|
am__v_P_0 = false
|
||||||
|
am__v_P_1 = :
|
||||||
|
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||||
|
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||||
|
am__v_GEN_0 = @echo " GEN " $@;
|
||||||
|
am__v_GEN_1 =
|
||||||
|
AM_V_at = $(am__v_at_@AM_V@)
|
||||||
|
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||||
|
am__v_at_0 = @
|
||||||
|
am__v_at_1 =
|
||||||
|
SOURCES =
|
||||||
|
DIST_SOURCES =
|
||||||
|
am__can_run_installinfo = \
|
||||||
|
case $$AM_UPDATE_INFO_DIR in \
|
||||||
|
n|no|NO) false;; \
|
||||||
|
*) (install-info --version) >/dev/null 2>&1;; \
|
||||||
|
esac
|
||||||
|
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
|
||||||
|
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||||
|
ACLOCAL = @ACLOCAL@
|
||||||
|
AMTAR = @AMTAR@
|
||||||
|
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||||
|
AUTOCONF = @AUTOCONF@
|
||||||
|
AUTOHEADER = @AUTOHEADER@
|
||||||
|
AUTOMAKE = @AUTOMAKE@
|
||||||
|
AWK = @AWK@
|
||||||
|
CC = @CC@
|
||||||
|
CCDEPMODE = @CCDEPMODE@
|
||||||
|
CFLAGS = @CFLAGS@
|
||||||
|
CPP = @CPP@
|
||||||
|
CPPFLAGS = @CPPFLAGS@
|
||||||
|
CURSES_LIBS = @CURSES_LIBS@
|
||||||
|
CYGPATH_W = @CYGPATH_W@
|
||||||
|
DEFS = @DEFS@
|
||||||
|
DEPDIR = @DEPDIR@
|
||||||
|
ECHO_C = @ECHO_C@
|
||||||
|
ECHO_N = @ECHO_N@
|
||||||
|
ECHO_T = @ECHO_T@
|
||||||
|
EGREP = @EGREP@
|
||||||
|
EXEEXT = @EXEEXT@
|
||||||
|
GREP = @GREP@
|
||||||
|
INSTALL = @INSTALL@
|
||||||
|
INSTALL_DATA = @INSTALL_DATA@
|
||||||
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||||
|
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||||
|
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||||
|
LDFLAGS = @LDFLAGS@
|
||||||
|
LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
|
||||||
|
LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
|
||||||
|
LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@
|
||||||
|
LIBOBJS = @LIBOBJS@
|
||||||
|
LIBS = @LIBS@
|
||||||
|
LN_S = @LN_S@
|
||||||
|
LTLIBOBJS = @LTLIBOBJS@
|
||||||
|
MAKEINFO = @MAKEINFO@
|
||||||
|
MKDIR_P = @MKDIR_P@
|
||||||
|
OBJEXT = @OBJEXT@
|
||||||
|
PACKAGE = @PACKAGE@
|
||||||
|
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||||
|
PACKAGE_NAME = @PACKAGE_NAME@
|
||||||
|
PACKAGE_STRING = @PACKAGE_STRING@
|
||||||
|
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||||
|
PACKAGE_URL = @PACKAGE_URL@
|
||||||
|
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||||
|
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||||
|
RANLIB = @RANLIB@
|
||||||
|
READLINE_LIBS = @READLINE_LIBS@
|
||||||
|
SET_MAKE = @SET_MAKE@
|
||||||
|
SHELL = @SHELL@
|
||||||
|
STRIP = @STRIP@
|
||||||
|
VERSION = @VERSION@
|
||||||
|
abs_builddir = @abs_builddir@
|
||||||
|
abs_srcdir = @abs_srcdir@
|
||||||
|
abs_top_builddir = @abs_top_builddir@
|
||||||
|
abs_top_srcdir = @abs_top_srcdir@
|
||||||
|
ac_ct_CC = @ac_ct_CC@
|
||||||
|
am__include = @am__include@
|
||||||
|
am__leading_dot = @am__leading_dot@
|
||||||
|
am__quote = @am__quote@
|
||||||
|
am__tar = @am__tar@
|
||||||
|
am__untar = @am__untar@
|
||||||
|
bindir = @bindir@
|
||||||
|
build = @build@
|
||||||
|
build_alias = @build_alias@
|
||||||
|
build_cpu = @build_cpu@
|
||||||
|
build_os = @build_os@
|
||||||
|
build_vendor = @build_vendor@
|
||||||
|
builddir = @builddir@
|
||||||
|
datadir = @datadir@
|
||||||
|
datarootdir = @datarootdir@
|
||||||
|
docdir = @docdir@
|
||||||
|
dvidir = @dvidir@
|
||||||
|
exec_prefix = @exec_prefix@
|
||||||
|
host = @host@
|
||||||
|
host_alias = @host_alias@
|
||||||
|
host_cpu = @host_cpu@
|
||||||
|
host_os = @host_os@
|
||||||
|
host_vendor = @host_vendor@
|
||||||
|
htmldir = @htmldir@
|
||||||
|
includedir = @includedir@
|
||||||
|
infodir = @infodir@
|
||||||
|
install_sh = @install_sh@
|
||||||
|
libdir = @libdir@
|
||||||
|
libexecdir = @libexecdir@
|
||||||
|
localedir = @localedir@
|
||||||
|
localstatedir = @localstatedir@
|
||||||
|
mandir = @mandir@
|
||||||
|
mkdir_p = @mkdir_p@
|
||||||
|
oldincludedir = @oldincludedir@
|
||||||
|
pdfdir = @pdfdir@
|
||||||
|
prefix = @prefix@
|
||||||
|
program_transform_name = @program_transform_name@
|
||||||
|
psdir = @psdir@
|
||||||
|
sbindir = @sbindir@
|
||||||
|
sharedstatedir = @sharedstatedir@
|
||||||
|
srcdir = @srcdir@
|
||||||
|
sysconfdir = @sysconfdir@
|
||||||
|
target_alias = @target_alias@
|
||||||
|
top_build_prefix = @top_build_prefix@
|
||||||
|
top_builddir = @top_builddir@
|
||||||
|
top_srcdir = @top_srcdir@
|
||||||
|
EXTRA_DIST = README *.m4
|
||||||
|
all: all-am
|
||||||
|
|
||||||
|
.SUFFIXES:
|
||||||
|
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||||
|
@for dep in $?; do \
|
||||||
|
case '$(am__configure_deps)' in \
|
||||||
|
*$$dep*) \
|
||||||
|
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||||
|
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||||
|
exit 1;; \
|
||||||
|
esac; \
|
||||||
|
done; \
|
||||||
|
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu m4/Makefile'; \
|
||||||
|
$(am__cd) $(top_srcdir) && \
|
||||||
|
$(AUTOMAKE) --gnu m4/Makefile
|
||||||
|
.PRECIOUS: Makefile
|
||||||
|
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||||
|
@case '$?' in \
|
||||||
|
*config.status*) \
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||||
|
*) \
|
||||||
|
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||||
|
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||||
|
esac;
|
||||||
|
|
||||||
|
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||||
|
|
||||||
|
$(top_srcdir)/configure: $(am__configure_deps)
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||||
|
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||||
|
$(am__aclocal_m4_deps):
|
||||||
|
tags TAGS:
|
||||||
|
|
||||||
|
ctags CTAGS:
|
||||||
|
|
||||||
|
cscope cscopelist:
|
||||||
|
|
||||||
|
|
||||||
|
distdir: $(DISTFILES)
|
||||||
|
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||||
|
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||||
|
list='$(DISTFILES)'; \
|
||||||
|
dist_files=`for file in $$list; do echo $$file; done | \
|
||||||
|
sed -e "s|^$$srcdirstrip/||;t" \
|
||||||
|
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||||
|
case $$dist_files in \
|
||||||
|
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||||
|
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||||
|
sort -u` ;; \
|
||||||
|
esac; \
|
||||||
|
for file in $$dist_files; do \
|
||||||
|
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||||
|
if test -d $$d/$$file; then \
|
||||||
|
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||||
|
if test -d "$(distdir)/$$file"; then \
|
||||||
|
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||||
|
fi; \
|
||||||
|
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||||
|
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||||
|
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||||
|
fi; \
|
||||||
|
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||||
|
else \
|
||||||
|
test -f "$(distdir)/$$file" \
|
||||||
|
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||||
|
|| exit 1; \
|
||||||
|
fi; \
|
||||||
|
done
|
||||||
|
check-am: all-am
|
||||||
|
check: check-am
|
||||||
|
all-am: Makefile
|
||||||
|
installdirs:
|
||||||
|
install: install-am
|
||||||
|
install-exec: install-exec-am
|
||||||
|
install-data: install-data-am
|
||||||
|
uninstall: uninstall-am
|
||||||
|
|
||||||
|
install-am: all-am
|
||||||
|
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||||
|
|
||||||
|
installcheck: installcheck-am
|
||||||
|
install-strip:
|
||||||
|
if test -z '$(STRIP)'; then \
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||||
|
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||||
|
install; \
|
||||||
|
else \
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||||
|
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||||
|
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||||
|
fi
|
||||||
|
mostlyclean-generic:
|
||||||
|
|
||||||
|
clean-generic:
|
||||||
|
|
||||||
|
distclean-generic:
|
||||||
|
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||||
|
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||||
|
|
||||||
|
maintainer-clean-generic:
|
||||||
|
@echo "This command is intended for maintainers to use"
|
||||||
|
@echo "it deletes files that may require special tools to rebuild."
|
||||||
|
clean: clean-am
|
||||||
|
|
||||||
|
clean-am: clean-generic mostlyclean-am
|
||||||
|
|
||||||
|
distclean: distclean-am
|
||||||
|
-rm -f Makefile
|
||||||
|
distclean-am: clean-am distclean-generic
|
||||||
|
|
||||||
|
dvi: dvi-am
|
||||||
|
|
||||||
|
dvi-am:
|
||||||
|
|
||||||
|
html: html-am
|
||||||
|
|
||||||
|
html-am:
|
||||||
|
|
||||||
|
info: info-am
|
||||||
|
|
||||||
|
info-am:
|
||||||
|
|
||||||
|
install-data-am:
|
||||||
|
|
||||||
|
install-dvi: install-dvi-am
|
||||||
|
|
||||||
|
install-dvi-am:
|
||||||
|
|
||||||
|
install-exec-am:
|
||||||
|
|
||||||
|
install-html: install-html-am
|
||||||
|
|
||||||
|
install-html-am:
|
||||||
|
|
||||||
|
install-info: install-info-am
|
||||||
|
|
||||||
|
install-info-am:
|
||||||
|
|
||||||
|
install-man:
|
||||||
|
|
||||||
|
install-pdf: install-pdf-am
|
||||||
|
|
||||||
|
install-pdf-am:
|
||||||
|
|
||||||
|
install-ps: install-ps-am
|
||||||
|
|
||||||
|
install-ps-am:
|
||||||
|
|
||||||
|
installcheck-am:
|
||||||
|
|
||||||
|
maintainer-clean: maintainer-clean-am
|
||||||
|
-rm -f Makefile
|
||||||
|
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||||
|
|
||||||
|
mostlyclean: mostlyclean-am
|
||||||
|
|
||||||
|
mostlyclean-am: mostlyclean-generic
|
||||||
|
|
||||||
|
pdf: pdf-am
|
||||||
|
|
||||||
|
pdf-am:
|
||||||
|
|
||||||
|
ps: ps-am
|
||||||
|
|
||||||
|
ps-am:
|
||||||
|
|
||||||
|
uninstall-am:
|
||||||
|
|
||||||
|
.MAKE: install-am install-strip
|
||||||
|
|
||||||
|
.PHONY: all all-am check check-am clean clean-generic cscopelist-am \
|
||||||
|
ctags-am distclean distclean-generic distdir dvi dvi-am html \
|
||||||
|
html-am info info-am install install-am install-data \
|
||||||
|
install-data-am install-dvi install-dvi-am install-exec \
|
||||||
|
install-exec-am install-html install-html-am install-info \
|
||||||
|
install-info-am install-man install-pdf install-pdf-am \
|
||||||
|
install-ps install-ps-am install-strip installcheck \
|
||||||
|
installcheck-am installdirs maintainer-clean \
|
||||||
|
maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
|
||||||
|
pdf-am ps ps-am tags-am uninstall uninstall-am
|
||||||
|
|
||||||
|
|
||||||
|
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||||
|
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||||
|
.NOEXPORT:
|
||||||
8
m4/README
Normal file
8
m4/README
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
These files are used by a program called aclocal (part of the GNU automake
|
||||||
|
package). aclocal uses these files to create aclocal.m4 which is in turn
|
||||||
|
used by autoconf to create the configure script at the the top level in
|
||||||
|
this distribution.
|
||||||
|
|
||||||
|
The Makefile.am file in this directory is automatically generated
|
||||||
|
from the template file, Makefile.am.in. The generation will fail
|
||||||
|
if you don't have all the right tools.
|
||||||
|
|
@ -9,8 +9,8 @@ AC_DEFUN([tinc_ATTRIBUTE],
|
||||||
CFLAGS="$CFLAGS -Wall -Werror"
|
CFLAGS="$CFLAGS -Wall -Werror"
|
||||||
AC_COMPILE_IFELSE(
|
AC_COMPILE_IFELSE(
|
||||||
[AC_LANG_SOURCE(
|
[AC_LANG_SOURCE(
|
||||||
[void *test(void) __attribute__ (($1));
|
[void test(void) __attribute__ (($1));
|
||||||
void *test(void) { return (void *)0; }
|
void test(void) { return; }
|
||||||
],
|
],
|
||||||
)],
|
)],
|
||||||
[tinc_cv_attribute_$1=yes],
|
[tinc_cv_attribute_$1=yes],
|
||||||
|
|
|
||||||
|
|
@ -1,69 +0,0 @@
|
||||||
# ===========================================================================
|
|
||||||
# http://www.gnu.org/software/autoconf-archive/ax_append_flag.html
|
|
||||||
# ===========================================================================
|
|
||||||
#
|
|
||||||
# SYNOPSIS
|
|
||||||
#
|
|
||||||
# AX_APPEND_FLAG(FLAG, [FLAGS-VARIABLE])
|
|
||||||
#
|
|
||||||
# DESCRIPTION
|
|
||||||
#
|
|
||||||
# FLAG is appended to the FLAGS-VARIABLE shell variable, with a space
|
|
||||||
# added in between.
|
|
||||||
#
|
|
||||||
# If FLAGS-VARIABLE is not specified, the current language's flags (e.g.
|
|
||||||
# CFLAGS) is used. FLAGS-VARIABLE is not changed if it already contains
|
|
||||||
# FLAG. If FLAGS-VARIABLE is unset in the shell, it is set to exactly
|
|
||||||
# FLAG.
|
|
||||||
#
|
|
||||||
# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION.
|
|
||||||
#
|
|
||||||
# LICENSE
|
|
||||||
#
|
|
||||||
# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
|
|
||||||
# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
|
|
||||||
#
|
|
||||||
# This program is free software: you can redistribute it and/or modify it
|
|
||||||
# under the terms of the GNU General Public License as published by the
|
|
||||||
# Free Software Foundation, either version 3 of the License, or (at your
|
|
||||||
# option) any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful, but
|
|
||||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
|
||||||
# Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License along
|
|
||||||
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
#
|
|
||||||
# As a special exception, the respective Autoconf Macro's copyright owner
|
|
||||||
# gives unlimited permission to copy, distribute and modify the configure
|
|
||||||
# scripts that are the output of Autoconf when processing the Macro. You
|
|
||||||
# need not follow the terms of the GNU General Public License when using
|
|
||||||
# or distributing such scripts, even though portions of the text of the
|
|
||||||
# Macro appear in them. The GNU General Public License (GPL) does govern
|
|
||||||
# all other use of the material that constitutes the Autoconf Macro.
|
|
||||||
#
|
|
||||||
# This special exception to the GPL applies to versions of the Autoconf
|
|
||||||
# Macro released by the Autoconf Archive. When you make and distribute a
|
|
||||||
# modified version of the Autoconf Macro, you may extend this special
|
|
||||||
# exception to the GPL to apply to your modified version as well.
|
|
||||||
|
|
||||||
#serial 2
|
|
||||||
|
|
||||||
AC_DEFUN([AX_APPEND_FLAG],
|
|
||||||
[AC_PREREQ(2.59)dnl for _AC_LANG_PREFIX
|
|
||||||
AS_VAR_PUSHDEF([FLAGS], [m4_default($2,_AC_LANG_PREFIX[FLAGS])])dnl
|
|
||||||
AS_VAR_SET_IF(FLAGS,
|
|
||||||
[case " AS_VAR_GET(FLAGS) " in
|
|
||||||
*" $1 "*)
|
|
||||||
AC_RUN_LOG([: FLAGS already contains $1])
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
AC_RUN_LOG([: FLAGS="$FLAGS $1"])
|
|
||||||
AS_VAR_SET(FLAGS, ["AS_VAR_GET(FLAGS) $1"])
|
|
||||||
;;
|
|
||||||
esac],
|
|
||||||
[AS_VAR_SET(FLAGS,["$1"])])
|
|
||||||
AS_VAR_POPDEF([FLAGS])dnl
|
|
||||||
])dnl AX_APPEND_FLAG
|
|
||||||
|
|
@ -1,122 +0,0 @@
|
||||||
# ===========================================================================
|
|
||||||
# http://www.gnu.org/software/autoconf-archive/ax_cflags_warn_all.html
|
|
||||||
# ===========================================================================
|
|
||||||
#
|
|
||||||
# SYNOPSIS
|
|
||||||
#
|
|
||||||
# AX_CFLAGS_WARN_ALL [(shellvar [,default, [A/NA]])]
|
|
||||||
# AX_CXXFLAGS_WARN_ALL [(shellvar [,default, [A/NA]])]
|
|
||||||
# AX_FCFLAGS_WARN_ALL [(shellvar [,default, [A/NA]])]
|
|
||||||
#
|
|
||||||
# DESCRIPTION
|
|
||||||
#
|
|
||||||
# Try to find a compiler option that enables most reasonable warnings.
|
|
||||||
#
|
|
||||||
# For the GNU compiler it will be -Wall (and -ansi -pedantic) The result
|
|
||||||
# is added to the shellvar being CFLAGS, CXXFLAGS, or FCFLAGS by default.
|
|
||||||
#
|
|
||||||
# Currently this macro knows about the GCC, Solaris, Digital Unix, AIX,
|
|
||||||
# HP-UX, IRIX, NEC SX-5 (Super-UX 10), Cray J90 (Unicos 10.0.0.8), and
|
|
||||||
# Intel compilers. For a given compiler, the Fortran flags are much more
|
|
||||||
# experimental than their C equivalents.
|
|
||||||
#
|
|
||||||
# - $1 shell-variable-to-add-to : CFLAGS, CXXFLAGS, or FCFLAGS
|
|
||||||
# - $2 add-value-if-not-found : nothing
|
|
||||||
# - $3 action-if-found : add value to shellvariable
|
|
||||||
# - $4 action-if-not-found : nothing
|
|
||||||
#
|
|
||||||
# NOTE: These macros depend on AX_APPEND_FLAG.
|
|
||||||
#
|
|
||||||
# LICENSE
|
|
||||||
#
|
|
||||||
# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
|
|
||||||
# Copyright (c) 2010 Rhys Ulerich <rhys.ulerich@gmail.com>
|
|
||||||
#
|
|
||||||
# This program is free software; you can redistribute it and/or modify it
|
|
||||||
# under the terms of the GNU General Public License as published by the
|
|
||||||
# Free Software Foundation; either version 3 of the License, or (at your
|
|
||||||
# option) any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful, but
|
|
||||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
|
||||||
# Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License along
|
|
||||||
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
#
|
|
||||||
# As a special exception, the respective Autoconf Macro's copyright owner
|
|
||||||
# gives unlimited permission to copy, distribute and modify the configure
|
|
||||||
# scripts that are the output of Autoconf when processing the Macro. You
|
|
||||||
# need not follow the terms of the GNU General Public License when using
|
|
||||||
# or distributing such scripts, even though portions of the text of the
|
|
||||||
# Macro appear in them. The GNU General Public License (GPL) does govern
|
|
||||||
# all other use of the material that constitutes the Autoconf Macro.
|
|
||||||
#
|
|
||||||
# This special exception to the GPL applies to versions of the Autoconf
|
|
||||||
# Macro released by the Autoconf Archive. When you make and distribute a
|
|
||||||
# modified version of the Autoconf Macro, you may extend this special
|
|
||||||
# exception to the GPL to apply to your modified version as well.
|
|
||||||
|
|
||||||
#serial 15
|
|
||||||
|
|
||||||
AC_DEFUN([AX_FLAGS_WARN_ALL],[dnl
|
|
||||||
AS_VAR_PUSHDEF([FLAGS],[_AC_LANG_PREFIX[]FLAGS])dnl
|
|
||||||
AS_VAR_PUSHDEF([VAR],[ac_cv_[]_AC_LANG_ABBREV[]flags_warn_all])dnl
|
|
||||||
AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for maximum warnings],
|
|
||||||
VAR,[VAR="no, unknown"
|
|
||||||
ac_save_[]FLAGS="$[]FLAGS"
|
|
||||||
for ac_arg dnl
|
|
||||||
in "-warn all % -warn all" dnl Intel
|
|
||||||
"-pedantic % -Wall" dnl GCC
|
|
||||||
"-xstrconst % -v" dnl Solaris C
|
|
||||||
"-std1 % -verbose -w0 -warnprotos" dnl Digital Unix
|
|
||||||
"-qlanglvl=ansi % -qsrcmsg -qinfo=all:noppt:noppc:noobs:nocnd" dnl AIX
|
|
||||||
"-ansi -ansiE % -fullwarn" dnl IRIX
|
|
||||||
"+ESlit % +w1" dnl HP-UX C
|
|
||||||
"-Xc % -pvctl[,]fullmsg" dnl NEC SX-5 (Super-UX 10)
|
|
||||||
"-h conform % -h msglevel 2" dnl Cray C (Unicos)
|
|
||||||
#
|
|
||||||
do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
|
|
||||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
|
|
||||||
[VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
|
|
||||||
done
|
|
||||||
FLAGS="$ac_save_[]FLAGS"
|
|
||||||
])
|
|
||||||
AS_VAR_POPDEF([FLAGS])dnl
|
|
||||||
AX_REQUIRE_DEFINED([AX_APPEND_FLAG])
|
|
||||||
case ".$VAR" in
|
|
||||||
.ok|.ok,*) m4_ifvaln($3,$3) ;;
|
|
||||||
.|.no|.no,*) m4_default($4,[m4_ifval($2,[AX_APPEND_FLAG([$2], [$1])])]) ;;
|
|
||||||
*) m4_default($3,[AX_APPEND_FLAG([$VAR], [$1])]) ;;
|
|
||||||
esac
|
|
||||||
AS_VAR_POPDEF([VAR])dnl
|
|
||||||
])dnl AX_FLAGS_WARN_ALL
|
|
||||||
dnl implementation tactics:
|
|
||||||
dnl the for-argument contains a list of options. The first part of
|
|
||||||
dnl these does only exist to detect the compiler - usually it is
|
|
||||||
dnl a global option to enable -ansi or -extrawarnings. All other
|
|
||||||
dnl compilers will fail about it. That was needed since a lot of
|
|
||||||
dnl compilers will give false positives for some option-syntax
|
|
||||||
dnl like -Woption or -Xoption as they think of it is a pass-through
|
|
||||||
dnl to later compile stages or something. The "%" is used as a
|
|
||||||
dnl delimiter. A non-option comment can be given after "%%" marks
|
|
||||||
dnl which will be shown but not added to the respective C/CXXFLAGS.
|
|
||||||
|
|
||||||
AC_DEFUN([AX_CFLAGS_WARN_ALL],[dnl
|
|
||||||
AC_LANG_PUSH([C])
|
|
||||||
AX_FLAGS_WARN_ALL([$1], [$2], [$3], [$4])
|
|
||||||
AC_LANG_POP([C])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([AX_CXXFLAGS_WARN_ALL],[dnl
|
|
||||||
AC_LANG_PUSH([C++])
|
|
||||||
AX_FLAGS_WARN_ALL([$1], [$2], [$3], [$4])
|
|
||||||
AC_LANG_POP([C++])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([AX_FCFLAGS_WARN_ALL],[dnl
|
|
||||||
AC_LANG_PUSH([Fortran])
|
|
||||||
AX_FLAGS_WARN_ALL([$1], [$2], [$3], [$4])
|
|
||||||
AC_LANG_POP([Fortran])
|
|
||||||
])
|
|
||||||
|
|
@ -1,72 +0,0 @@
|
||||||
# ===========================================================================
|
|
||||||
# http://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html
|
|
||||||
# ===========================================================================
|
|
||||||
#
|
|
||||||
# SYNOPSIS
|
|
||||||
#
|
|
||||||
# AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS])
|
|
||||||
#
|
|
||||||
# DESCRIPTION
|
|
||||||
#
|
|
||||||
# Check whether the given FLAG works with the current language's compiler
|
|
||||||
# or gives an error. (Warnings, however, are ignored)
|
|
||||||
#
|
|
||||||
# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
|
|
||||||
# success/failure.
|
|
||||||
#
|
|
||||||
# If EXTRA-FLAGS is defined, it is added to the current language's default
|
|
||||||
# flags (e.g. CFLAGS) when the check is done. The check is thus made with
|
|
||||||
# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to
|
|
||||||
# force the compiler to issue an error when a bad flag is given.
|
|
||||||
#
|
|
||||||
# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this
|
|
||||||
# macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG.
|
|
||||||
#
|
|
||||||
# LICENSE
|
|
||||||
#
|
|
||||||
# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
|
|
||||||
# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
|
|
||||||
#
|
|
||||||
# This program is free software: you can redistribute it and/or modify it
|
|
||||||
# under the terms of the GNU General Public License as published by the
|
|
||||||
# Free Software Foundation, either version 3 of the License, or (at your
|
|
||||||
# option) any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful, but
|
|
||||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
|
||||||
# Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License along
|
|
||||||
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
#
|
|
||||||
# As a special exception, the respective Autoconf Macro's copyright owner
|
|
||||||
# gives unlimited permission to copy, distribute and modify the configure
|
|
||||||
# scripts that are the output of Autoconf when processing the Macro. You
|
|
||||||
# need not follow the terms of the GNU General Public License when using
|
|
||||||
# or distributing such scripts, even though portions of the text of the
|
|
||||||
# Macro appear in them. The GNU General Public License (GPL) does govern
|
|
||||||
# all other use of the material that constitutes the Autoconf Macro.
|
|
||||||
#
|
|
||||||
# This special exception to the GPL applies to versions of the Autoconf
|
|
||||||
# Macro released by the Autoconf Archive. When you make and distribute a
|
|
||||||
# modified version of the Autoconf Macro, you may extend this special
|
|
||||||
# exception to the GPL to apply to your modified version as well.
|
|
||||||
|
|
||||||
#serial 2
|
|
||||||
|
|
||||||
AC_DEFUN([AX_CHECK_COMPILE_FLAG],
|
|
||||||
[AC_PREREQ(2.59)dnl for _AC_LANG_PREFIX
|
|
||||||
AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl
|
|
||||||
AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [
|
|
||||||
ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS
|
|
||||||
_AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1"
|
|
||||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
|
|
||||||
[AS_VAR_SET(CACHEVAR,[yes])],
|
|
||||||
[AS_VAR_SET(CACHEVAR,[no])])
|
|
||||||
_AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags])
|
|
||||||
AS_IF([test x"AS_VAR_GET(CACHEVAR)" = xyes],
|
|
||||||
[m4_default([$2], :)],
|
|
||||||
[m4_default([$3], :)])
|
|
||||||
AS_VAR_POPDEF([CACHEVAR])dnl
|
|
||||||
])dnl AX_CHECK_COMPILE_FLAGS
|
|
||||||
|
|
@ -1,71 +0,0 @@
|
||||||
# ===========================================================================
|
|
||||||
# http://www.gnu.org/software/autoconf-archive/ax_check_link_flag.html
|
|
||||||
# ===========================================================================
|
|
||||||
#
|
|
||||||
# SYNOPSIS
|
|
||||||
#
|
|
||||||
# AX_CHECK_LINK_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS])
|
|
||||||
#
|
|
||||||
# DESCRIPTION
|
|
||||||
#
|
|
||||||
# Check whether the given FLAG works with the linker or gives an error.
|
|
||||||
# (Warnings, however, are ignored)
|
|
||||||
#
|
|
||||||
# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
|
|
||||||
# success/failure.
|
|
||||||
#
|
|
||||||
# If EXTRA-FLAGS is defined, it is added to the linker's default flags
|
|
||||||
# when the check is done. The check is thus made with the flags: "LDFLAGS
|
|
||||||
# EXTRA-FLAGS FLAG". This can for example be used to force the linker to
|
|
||||||
# issue an error when a bad flag is given.
|
|
||||||
#
|
|
||||||
# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this
|
|
||||||
# macro in sync with AX_CHECK_{PREPROC,COMPILE}_FLAG.
|
|
||||||
#
|
|
||||||
# LICENSE
|
|
||||||
#
|
|
||||||
# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
|
|
||||||
# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
|
|
||||||
#
|
|
||||||
# This program is free software: you can redistribute it and/or modify it
|
|
||||||
# under the terms of the GNU General Public License as published by the
|
|
||||||
# Free Software Foundation, either version 3 of the License, or (at your
|
|
||||||
# option) any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful, but
|
|
||||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
|
||||||
# Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License along
|
|
||||||
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
#
|
|
||||||
# As a special exception, the respective Autoconf Macro's copyright owner
|
|
||||||
# gives unlimited permission to copy, distribute and modify the configure
|
|
||||||
# scripts that are the output of Autoconf when processing the Macro. You
|
|
||||||
# need not follow the terms of the GNU General Public License when using
|
|
||||||
# or distributing such scripts, even though portions of the text of the
|
|
||||||
# Macro appear in them. The GNU General Public License (GPL) does govern
|
|
||||||
# all other use of the material that constitutes the Autoconf Macro.
|
|
||||||
#
|
|
||||||
# This special exception to the GPL applies to versions of the Autoconf
|
|
||||||
# Macro released by the Autoconf Archive. When you make and distribute a
|
|
||||||
# modified version of the Autoconf Macro, you may extend this special
|
|
||||||
# exception to the GPL to apply to your modified version as well.
|
|
||||||
|
|
||||||
#serial 2
|
|
||||||
|
|
||||||
AC_DEFUN([AX_CHECK_LINK_FLAG],
|
|
||||||
[AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_ldflags_$4_$1])dnl
|
|
||||||
AC_CACHE_CHECK([whether the linker accepts $1], CACHEVAR, [
|
|
||||||
ax_check_save_flags=$LDFLAGS
|
|
||||||
LDFLAGS="$LDFLAGS $4 $1"
|
|
||||||
AC_LINK_IFELSE([AC_LANG_PROGRAM()],
|
|
||||||
[AS_VAR_SET(CACHEVAR,[yes])],
|
|
||||||
[AS_VAR_SET(CACHEVAR,[no])])
|
|
||||||
LDFLAGS=$ax_check_save_flags])
|
|
||||||
AS_IF([test x"AS_VAR_GET(CACHEVAR)" = xyes],
|
|
||||||
[m4_default([$2], :)],
|
|
||||||
[m4_default([$3], :)])
|
|
||||||
AS_VAR_POPDEF([CACHEVAR])dnl
|
|
||||||
])dnl AX_CHECK_LINK_FLAGS
|
|
||||||
|
|
@ -1,37 +0,0 @@
|
||||||
# ===========================================================================
|
|
||||||
# http://www.gnu.org/software/autoconf-archive/ax_require_defined.html
|
|
||||||
# ===========================================================================
|
|
||||||
#
|
|
||||||
# SYNOPSIS
|
|
||||||
#
|
|
||||||
# AX_REQUIRE_DEFINED(MACRO)
|
|
||||||
#
|
|
||||||
# DESCRIPTION
|
|
||||||
#
|
|
||||||
# AX_REQUIRE_DEFINED is a simple helper for making sure other macros have
|
|
||||||
# been defined and thus are available for use. This avoids random issues
|
|
||||||
# where a macro isn't expanded. Instead the configure script emits a
|
|
||||||
# non-fatal:
|
|
||||||
#
|
|
||||||
# ./configure: line 1673: AX_CFLAGS_WARN_ALL: command not found
|
|
||||||
#
|
|
||||||
# It's like AC_REQUIRE except it doesn't expand the required macro.
|
|
||||||
#
|
|
||||||
# Here's an example:
|
|
||||||
#
|
|
||||||
# AX_REQUIRE_DEFINED([AX_CHECK_LINK_FLAG])
|
|
||||||
#
|
|
||||||
# LICENSE
|
|
||||||
#
|
|
||||||
# Copyright (c) 2014 Mike Frysinger <vapier@gentoo.org>
|
|
||||||
#
|
|
||||||
# Copying and distribution of this file, with or without modification, are
|
|
||||||
# permitted in any medium without royalty provided the copyright notice
|
|
||||||
# and this notice are preserved. This file is offered as-is, without any
|
|
||||||
# warranty.
|
|
||||||
|
|
||||||
#serial 1
|
|
||||||
|
|
||||||
AC_DEFUN([AX_REQUIRE_DEFINED], [dnl
|
|
||||||
m4_ifndef([$1], [m4_fatal([macro ]$1[ is not defined; is a m4 file missing?])])
|
|
||||||
])dnl AX_REQUIRE_DEFINED
|
|
||||||
41
m4/curses.m4
Normal file
41
m4/curses.m4
Normal file
|
|
@ -0,0 +1,41 @@
|
||||||
|
dnl Check to find the curses headers/libraries
|
||||||
|
|
||||||
|
AC_DEFUN([tinc_CURSES],
|
||||||
|
[
|
||||||
|
AC_ARG_ENABLE([curses],
|
||||||
|
AS_HELP_STRING([--disable-curses], [disable curses support]))
|
||||||
|
AS_IF([test "x$enable_curses" != "xno"], [
|
||||||
|
AC_DEFINE(HAVE_CURSES, 1, [have curses support])
|
||||||
|
curses=true
|
||||||
|
AC_ARG_WITH(curses,
|
||||||
|
AS_HELP_STRING([--with-curses=DIR], [curses base directory, or:]),
|
||||||
|
[curses="$withval"
|
||||||
|
CPPFLAGS="$CPPFLAGS -I$withval/include"
|
||||||
|
LDFLAGS="$LDFLAGS -L$withval/lib"]
|
||||||
|
)
|
||||||
|
|
||||||
|
AC_ARG_WITH(curses-include,
|
||||||
|
AS_HELP_STRING([--with-curses-include=DIR], [curses headers directory]),
|
||||||
|
[curses_include="$withval"
|
||||||
|
CPPFLAGS="$CPPFLAGS -I$withval"]
|
||||||
|
)
|
||||||
|
|
||||||
|
AC_ARG_WITH(curses-lib,
|
||||||
|
AS_HELP_STRING([--with-curses-lib=DIR], [curses library directory]),
|
||||||
|
[curses_lib="$withval"
|
||||||
|
LDFLAGS="$LDFLAGS -L$withval"]
|
||||||
|
)
|
||||||
|
|
||||||
|
AC_CHECK_HEADERS(curses.h,
|
||||||
|
[],
|
||||||
|
[AC_MSG_ERROR("curses header files not found."); break]
|
||||||
|
)
|
||||||
|
|
||||||
|
AC_CHECK_LIB(curses, initscr,
|
||||||
|
[CURSES_LIBS="-lcurses"],
|
||||||
|
[AC_MSG_ERROR("curses libraries not found.")]
|
||||||
|
)
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_SUBST(CURSES_LIBS)
|
||||||
|
])
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
dnl Check to find the LibreSSL/OpenSSL headers/libraries
|
dnl Check to find the OpenSSL headers/libraries
|
||||||
|
|
||||||
AC_DEFUN([tinc_OPENSSL],
|
AC_DEFUN([tinc_OPENSSL],
|
||||||
[
|
[
|
||||||
|
|
@ -10,49 +10,47 @@ AC_DEFUN([tinc_OPENSSL],
|
||||||
[],
|
[],
|
||||||
[AC_CHECK_LIB(dl, dlopen,
|
[AC_CHECK_LIB(dl, dlopen,
|
||||||
[LIBS="$LIBS -ldl"],
|
[LIBS="$LIBS -ldl"],
|
||||||
[AC_MSG_ERROR([LibreSSL/OpenSSL depends on libdl.]); break]
|
[AC_MSG_ERROR([OpenSSL depends on libdl.]); break]
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
AC_ARG_WITH(openssl,
|
AC_ARG_WITH(openssl,
|
||||||
AS_HELP_STRING([--with-openssl=DIR], [LibreSSL/OpenSSL base directory, or:]),
|
AS_HELP_STRING([--with-openssl=DIR], [OpenSSL base directory, or:]),
|
||||||
[openssl="$withval"
|
[openssl="$withval"
|
||||||
CPPFLAGS="$CPPFLAGS -I$withval/include"
|
CPPFLAGS="$CPPFLAGS -I$withval/include"
|
||||||
LDFLAGS="$LDFLAGS -L$withval/lib"]
|
LDFLAGS="$LDFLAGS -L$withval/lib"]
|
||||||
)
|
)
|
||||||
|
|
||||||
AC_ARG_WITH(openssl-include,
|
AC_ARG_WITH(openssl-include,
|
||||||
AS_HELP_STRING([--with-openssl-include=DIR], [LibreSSL/OpenSSL headers directory (without trailing /openssl)]),
|
AS_HELP_STRING([--with-openssl-include=DIR], [OpenSSL headers directory (without trailing /openssl)]),
|
||||||
[openssl_include="$withval"
|
[openssl_include="$withval"
|
||||||
CPPFLAGS="$CPPFLAGS -I$withval"]
|
CPPFLAGS="$CPPFLAGS -I$withval"]
|
||||||
)
|
)
|
||||||
|
|
||||||
AC_ARG_WITH(openssl-lib,
|
AC_ARG_WITH(openssl-lib,
|
||||||
AS_HELP_STRING([--with-openssl-lib=DIR], [LibreSSL/OpenSSL library directory]),
|
AS_HELP_STRING([--with-openssl-lib=DIR], [OpenSSL library directory]),
|
||||||
[openssl_lib="$withval"
|
[openssl_lib="$withval"
|
||||||
LDFLAGS="$LDFLAGS -L$withval"]
|
LDFLAGS="$LDFLAGS -L$withval"]
|
||||||
)
|
)
|
||||||
|
|
||||||
AC_CHECK_HEADERS(openssl/evp.h openssl/rsa.h openssl/rand.h openssl/err.h openssl/sha.h openssl/pem.h openssl/engine.h,
|
AC_CHECK_HEADERS([openssl/evp.h openssl/rsa.h openssl/rand.h openssl/err.h openssl/sha.h openssl/pem.h openssl/engine.h openssl/ecdh.h openssl/ec.h],
|
||||||
[],
|
[],
|
||||||
[AC_MSG_ERROR([LibreSSL/OpenSSL header files not found.]); break]
|
[AC_MSG_ERROR([OpenSSL header files not found.]); break]
|
||||||
)
|
)
|
||||||
|
|
||||||
AC_CHECK_LIB(crypto, EVP_EncryptInit_ex,
|
AC_CHECK_LIB(crypto, EVP_EncryptInit_ex,
|
||||||
[LIBS="-lcrypto $LIBS"],
|
[LIBS="-lcrypto $LIBS"],
|
||||||
[AC_MSG_ERROR([LibreSSL/OpenSSL libraries not found.])]
|
[AC_MSG_ERROR([OpenSSL libraries not found.])]
|
||||||
)
|
)
|
||||||
|
|
||||||
AC_CHECK_FUNCS([RAND_bytes EVP_EncryptInit_ex EVP_CIPHER_CTX_new], ,
|
AC_CHECK_FUNCS([RAND_pseudo_bytes EVP_EncryptInit_ex ECDH_compute_key ECDSA_verify], ,
|
||||||
[AC_MSG_ERROR([Missing LibreSSL/OpenSSL functionality, make sure you have installed the latest version.]); break],
|
[AC_MSG_ERROR([Missing OpenSSL functionality, make sure you have installed the latest version.]); break],
|
||||||
)
|
)
|
||||||
|
|
||||||
AC_CHECK_DECLS([OpenSSL_add_all_algorithms, EVP_aes_256_cfb], ,
|
AC_CHECK_DECL([OpenSSL_add_all_algorithms], ,
|
||||||
[AC_MSG_ERROR([Missing LibreSSL/OpenSSL functionality, make sure you have installed the latest version.]); break],
|
[AC_MSG_ERROR([Missing OpenSSL functionality, make sure you have installed the latest version.]); break],
|
||||||
[#include <openssl/evp.h>]
|
[#include <openssl/evp.h>]
|
||||||
)
|
)
|
||||||
|
|
||||||
AC_CHECK_FUNCS([BN_GENCB_new RSA_set0_key], , , [#include <openssl/rsa.h>])
|
|
||||||
])
|
])
|
||||||
|
|
|
||||||
42
m4/readline.m4
Normal file
42
m4/readline.m4
Normal file
|
|
@ -0,0 +1,42 @@
|
||||||
|
dnl Check to find the readline headers/libraries
|
||||||
|
|
||||||
|
AC_DEFUN([tinc_READLINE],
|
||||||
|
[
|
||||||
|
AC_ARG_ENABLE([readline],
|
||||||
|
AS_HELP_STRING([--disable-readline], [disable readline support]))
|
||||||
|
AS_IF([test "x$enable_readline" != "xno"], [
|
||||||
|
AC_DEFINE(HAVE_READLINE, 1, [have readline support])
|
||||||
|
readline=true
|
||||||
|
AC_ARG_WITH(readline,
|
||||||
|
AS_HELP_STRING([--with-readline=DIR], [readline base directory, or:]),
|
||||||
|
[readline="$withval"
|
||||||
|
CPPFLAGS="$CPPFLAGS -I$withval/include"
|
||||||
|
LDFLAGS="$LDFLAGS -L$withval/lib"]
|
||||||
|
)
|
||||||
|
|
||||||
|
AC_ARG_WITH(readline-include,
|
||||||
|
AS_HELP_STRING([--with-readline-include=DIR], [readline headers directory]),
|
||||||
|
[readline_include="$withval"
|
||||||
|
CPPFLAGS="$CPPFLAGS -I$withval"]
|
||||||
|
)
|
||||||
|
|
||||||
|
AC_ARG_WITH(readline-lib,
|
||||||
|
AS_HELP_STRING([--with-readline-lib=DIR], [readline library directory]),
|
||||||
|
[readline_lib="$withval"
|
||||||
|
LDFLAGS="$LDFLAGS -L$withval"]
|
||||||
|
)
|
||||||
|
|
||||||
|
AC_CHECK_HEADERS([readline/readline.h readline/history.h],
|
||||||
|
[],
|
||||||
|
[AC_MSG_ERROR("readline header files not found."); break]
|
||||||
|
)
|
||||||
|
|
||||||
|
AC_CHECK_LIB(readline, readline,
|
||||||
|
[READLINE_LIBS="-lreadline"],
|
||||||
|
[AC_MSG_ERROR("readline library not found.")],
|
||||||
|
[$CURSES_LIBS]
|
||||||
|
)
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_SUBST(READLINE_LIBS)
|
||||||
|
])
|
||||||
18
missing
18
missing
|
|
@ -1,9 +1,9 @@
|
||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# Common wrapper for a few potentially missing GNU programs.
|
# Common wrapper for a few potentially missing GNU programs.
|
||||||
|
|
||||||
scriptversion=2018-03-07.03; # UTC
|
scriptversion=2012-06-26.16; # UTC
|
||||||
|
|
||||||
# Copyright (C) 1996-2020 Free Software Foundation, Inc.
|
# Copyright (C) 1996-2013 Free Software Foundation, Inc.
|
||||||
# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
|
# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
|
||||||
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
|
|
@ -17,7 +17,7 @@ scriptversion=2018-03-07.03; # UTC
|
||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
# As a special exception to the GNU General Public License, if you
|
# As a special exception to the GNU General Public License, if you
|
||||||
# distribute this file as part of a program that contains a
|
# distribute this file as part of a program that contains a
|
||||||
|
|
@ -101,9 +101,9 @@ else
|
||||||
exit $st
|
exit $st
|
||||||
fi
|
fi
|
||||||
|
|
||||||
perl_URL=https://www.perl.org/
|
perl_URL=http://www.perl.org/
|
||||||
flex_URL=https://github.com/westes/flex
|
flex_URL=http://flex.sourceforge.net/
|
||||||
gnu_software_URL=https://www.gnu.org/software
|
gnu_software_URL=http://www.gnu.org/software
|
||||||
|
|
||||||
program_details ()
|
program_details ()
|
||||||
{
|
{
|
||||||
|
|
@ -160,7 +160,7 @@ give_advice ()
|
||||||
;;
|
;;
|
||||||
autom4te*)
|
autom4te*)
|
||||||
echo "You might have modified some maintainer files that require"
|
echo "You might have modified some maintainer files that require"
|
||||||
echo "the 'autom4te' program to be rebuilt."
|
echo "the 'automa4te' program to be rebuilt."
|
||||||
program_details 'autom4te'
|
program_details 'autom4te'
|
||||||
;;
|
;;
|
||||||
bison*|yacc*)
|
bison*|yacc*)
|
||||||
|
|
@ -207,9 +207,9 @@ give_advice "$1" | sed -e '1s/^/WARNING: /' \
|
||||||
exit $st
|
exit $st
|
||||||
|
|
||||||
# Local variables:
|
# Local variables:
|
||||||
# eval: (add-hook 'before-save-hook 'time-stamp)
|
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||||
# time-stamp-start: "scriptversion="
|
# time-stamp-start: "scriptversion="
|
||||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||||
# time-stamp-time-zone: "UTC0"
|
# time-stamp-time-zone: "UTC"
|
||||||
# time-stamp-end: "; # UTC"
|
# time-stamp-end: "; # UTC"
|
||||||
# End:
|
# End:
|
||||||
|
|
|
||||||
129
src/Makefile.am
129
src/Makefile.am
|
|
@ -1,55 +1,93 @@
|
||||||
## Produce this file with automake to get Makefile.in
|
## Produce this file with automake to get Makefile.in
|
||||||
|
|
||||||
sbin_PROGRAMS = tincd
|
sbin_PROGRAMS = tincd tinc sptps_test
|
||||||
|
|
||||||
|
EXTRA_DIST = linux bsd solaris cygwin mingw openssl gcrypt
|
||||||
|
|
||||||
|
DEFAULT_INCLUDES =
|
||||||
|
|
||||||
tincd_SOURCES = \
|
tincd_SOURCES = \
|
||||||
have.h \
|
buffer.c buffer.h \
|
||||||
system.h \
|
cipher.h \
|
||||||
avl_tree.c avl_tree.h \
|
|
||||||
conf.c conf.h \
|
conf.c conf.h \
|
||||||
connection.c connection.h \
|
connection.c connection.h \
|
||||||
|
control.c control.h \
|
||||||
|
control_common.h \
|
||||||
|
crypto.h \
|
||||||
device.h \
|
device.h \
|
||||||
|
digest.h \
|
||||||
dropin.c dropin.h \
|
dropin.c dropin.h \
|
||||||
dummy_device.c \
|
dummy_device.c \
|
||||||
|
ecdh.h \
|
||||||
|
ecdsa.h \
|
||||||
|
ecdsagen.h \
|
||||||
edge.c edge.h \
|
edge.c edge.h \
|
||||||
ethernet.h \
|
ethernet.h \
|
||||||
event.c event.h \
|
event.c event.h \
|
||||||
|
fake-gai-errnos.h \
|
||||||
fake-getaddrinfo.c fake-getaddrinfo.h \
|
fake-getaddrinfo.c fake-getaddrinfo.h \
|
||||||
fake-getnameinfo.c fake-getnameinfo.h \
|
fake-getnameinfo.c fake-getnameinfo.h \
|
||||||
|
getopt.c getopt.h \
|
||||||
|
getopt1.c \
|
||||||
graph.c graph.h \
|
graph.c graph.h \
|
||||||
|
hash.c hash.h \
|
||||||
|
have.h \
|
||||||
ipv4.h \
|
ipv4.h \
|
||||||
ipv6.h \
|
ipv6.h \
|
||||||
list.c list.h \
|
list.c list.h \
|
||||||
logger.c logger.h \
|
logger.c logger.h \
|
||||||
meta.c meta.h \
|
meta.c meta.h \
|
||||||
multicast_device.c \
|
multicast_device.c \
|
||||||
|
names.c names.h \
|
||||||
net.c net.h \
|
net.c net.h \
|
||||||
net_packet.c \
|
net_packet.c \
|
||||||
net_setup.c \
|
net_setup.c \
|
||||||
net_socket.c \
|
net_socket.c \
|
||||||
netutl.c netutl.h \
|
netutl.c netutl.h \
|
||||||
node.c node.h \
|
node.c node.h \
|
||||||
pidfile.c pidfile.h \
|
prf.h \
|
||||||
process.c process.h \
|
process.c process.h \
|
||||||
protocol.c protocol.h \
|
protocol.c protocol.h \
|
||||||
protocol_auth.c \
|
protocol_auth.c \
|
||||||
protocol_edge.c \
|
protocol_edge.c \
|
||||||
protocol_misc.c \
|
|
||||||
protocol_key.c \
|
protocol_key.c \
|
||||||
|
protocol_misc.c \
|
||||||
protocol_subnet.c \
|
protocol_subnet.c \
|
||||||
proxy.c proxy.h \
|
|
||||||
raw_socket_device.c \
|
raw_socket_device.c \
|
||||||
route.c route.h \
|
route.c route.h \
|
||||||
|
rsa.h \
|
||||||
|
rsagen.h \
|
||||||
|
splay_tree.c splay_tree.h \
|
||||||
|
sptps.c sptps.h \
|
||||||
subnet.c subnet.h \
|
subnet.c subnet.h \
|
||||||
|
subnet_parse.c \
|
||||||
|
system.h \
|
||||||
tincd.c \
|
tincd.c \
|
||||||
utils.c utils.h \
|
utils.c utils.h \
|
||||||
xalloc.h
|
xalloc.h
|
||||||
|
|
||||||
if !GETOPT
|
tinc_SOURCES = \
|
||||||
tincd_SOURCES += \
|
dropin.c dropin.h \
|
||||||
getopt.c getopt.h \
|
getopt.c getopt.h \
|
||||||
getopt1.c
|
getopt1.c \
|
||||||
endif
|
info.c info.h \
|
||||||
|
invitation.c invitation.h \
|
||||||
|
list.c list.h \
|
||||||
|
names.c names.h \
|
||||||
|
netutl.c netutl.h \
|
||||||
|
sptps.c sptps.h \
|
||||||
|
subnet_parse.c subnet.h \
|
||||||
|
tincctl.c tincctl.h \
|
||||||
|
top.c top.h \
|
||||||
|
utils.c utils.h
|
||||||
|
|
||||||
|
sptps_test_SOURCES = \
|
||||||
|
logger.c logger.h \
|
||||||
|
sptps.c sptps.h \
|
||||||
|
sptps_test.c \
|
||||||
|
utils.c utils.h
|
||||||
|
|
||||||
|
## Conditionally compile device drivers
|
||||||
|
|
||||||
if LINUX
|
if LINUX
|
||||||
tincd_SOURCES += linux/device.c
|
tincd_SOURCES += linux/device.c
|
||||||
|
|
@ -58,7 +96,7 @@ endif
|
||||||
if BSD
|
if BSD
|
||||||
tincd_SOURCES += bsd/device.c
|
tincd_SOURCES += bsd/device.c
|
||||||
if TUNEMU
|
if TUNEMU
|
||||||
tincd_SOURCES += bsd/tunemu.c bsd/tunemu.h
|
tincd_SOURCES += bsd/tunemu.c
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
@ -67,7 +105,7 @@ tincd_SOURCES += solaris/device.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if MINGW
|
if MINGW
|
||||||
tincd_SOURCES += mingw/device.c mingw/common.h
|
tincd_SOURCES += mingw/device.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if CYGWIN
|
if CYGWIN
|
||||||
|
|
@ -82,8 +120,71 @@ if VDE
|
||||||
tincd_SOURCES += vde_device.c
|
tincd_SOURCES += vde_device.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if OPENSSL
|
||||||
|
tincd_SOURCES += \
|
||||||
|
openssl/cipher.c \
|
||||||
|
openssl/crypto.c \
|
||||||
|
openssl/digest.c \
|
||||||
|
openssl/ecdh.c \
|
||||||
|
openssl/ecdsa.c \
|
||||||
|
openssl/prf.c \
|
||||||
|
openssl/rsa.c
|
||||||
|
tinc_SOURCES += \
|
||||||
|
openssl/cipher.c \
|
||||||
|
openssl/crypto.c \
|
||||||
|
openssl/digest.c \
|
||||||
|
openssl/ecdh.c \
|
||||||
|
openssl/ecdsa.c \
|
||||||
|
openssl/ecdsagen.c \
|
||||||
|
openssl/prf.c \
|
||||||
|
openssl/rsa.c \
|
||||||
|
openssl/rsagen.c
|
||||||
|
sptps_test_SOURCES += \
|
||||||
|
openssl/cipher.c \
|
||||||
|
openssl/crypto.c \
|
||||||
|
openssl/digest.c \
|
||||||
|
openssl/ecdh.c \
|
||||||
|
openssl/ecdsa.c \
|
||||||
|
openssl/prf.c
|
||||||
|
endif
|
||||||
|
|
||||||
|
if GCRYPT
|
||||||
|
tincd_SOURCES += \
|
||||||
|
gcrypt/cipher.c \
|
||||||
|
gcrypt/crypto.c \
|
||||||
|
gcrypt/digest.c \
|
||||||
|
gcrypt/ecdh.c \
|
||||||
|
gcrypt/ecdsa.c \
|
||||||
|
gcrypt/prf.c \
|
||||||
|
gcrypt/rsa.c
|
||||||
|
tinc_SOURCES += \
|
||||||
|
gcrypt/cipher.c \
|
||||||
|
gcrypt/crypto.c \
|
||||||
|
gcrypt/digest.c \
|
||||||
|
gcrypt/ecdh.c \
|
||||||
|
gcrypt/ecdsa.c \
|
||||||
|
gcrypt/ecdsagen.c \
|
||||||
|
gcrypt/prf.c \
|
||||||
|
gcrypt/rsa.c \
|
||||||
|
gcrypt/rsagen.c
|
||||||
|
sptps_test_SOURCES += \
|
||||||
|
gcrypt/cipher.c \
|
||||||
|
gcrypt/crypto.c \
|
||||||
|
gcrypt/digest.c \
|
||||||
|
gcrypt/ecdh.c \
|
||||||
|
gcrypt/ecdsa.c \
|
||||||
|
gcrypt/prf.c
|
||||||
|
endif
|
||||||
|
|
||||||
|
tinc_LDADD = $(READLINE_LIBS) $(CURSES_LIBS)
|
||||||
|
|
||||||
|
LIBS = @LIBS@ @LIBGCRYPT_LIBS@
|
||||||
|
|
||||||
if TUNEMU
|
if TUNEMU
|
||||||
LIBS += -lpcap
|
LIBS += -lpcap
|
||||||
endif
|
endif
|
||||||
|
|
||||||
AM_CPPFLAGS = -DCONFDIR=\"$(sysconfdir)\" -DRUNSTATEDIR=\"$(runstatedir)\" -DLOCALSTATEDIR=\"$(localstatedir)\" -I $(abs_top_builddir)/
|
AM_CFLAGS = -DCONFDIR=\"$(sysconfdir)\" -DLOCALSTATEDIR=\"$(localstatedir)\" -DSBINDIR=\"$(sbindir)\"
|
||||||
|
|
||||||
|
dist-hook:
|
||||||
|
rm -f `find . -type l`
|
||||||
|
|
|
||||||
629
src/Makefile.in
629
src/Makefile.in
|
|
@ -1,7 +1,7 @@
|
||||||
# Makefile.in generated by automake 1.16.2 from Makefile.am.
|
# Makefile.in generated by automake 1.13.3 from Makefile.am.
|
||||||
# @configure_input@
|
# @configure_input@
|
||||||
|
|
||||||
# Copyright (C) 1994-2020 Free Software Foundation, Inc.
|
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
|
||||||
|
|
||||||
# This Makefile.in is free software; the Free Software Foundation
|
# This Makefile.in is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
|
@ -15,17 +15,7 @@
|
||||||
@SET_MAKE@
|
@SET_MAKE@
|
||||||
|
|
||||||
VPATH = @srcdir@
|
VPATH = @srcdir@
|
||||||
am__is_gnu_make = { \
|
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
|
||||||
if test -z '$(MAKELEVEL)'; then \
|
|
||||||
false; \
|
|
||||||
elif test -n '$(MAKE_HOST)'; then \
|
|
||||||
true; \
|
|
||||||
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
|
|
||||||
true; \
|
|
||||||
else \
|
|
||||||
false; \
|
|
||||||
fi; \
|
|
||||||
}
|
|
||||||
am__make_running_with_option = \
|
am__make_running_with_option = \
|
||||||
case $${target_option-} in \
|
case $${target_option-} in \
|
||||||
?) ;; \
|
?) ;; \
|
||||||
|
|
@ -88,80 +78,192 @@ PRE_UNINSTALL = :
|
||||||
POST_UNINSTALL = :
|
POST_UNINSTALL = :
|
||||||
build_triplet = @build@
|
build_triplet = @build@
|
||||||
host_triplet = @host@
|
host_triplet = @host@
|
||||||
sbin_PROGRAMS = tincd$(EXEEXT)
|
sbin_PROGRAMS = tincd$(EXEEXT) tinc$(EXEEXT) sptps_test$(EXEEXT)
|
||||||
@GETOPT_FALSE@am__append_1 = \
|
@LINUX_TRUE@am__append_1 = linux/device.c
|
||||||
@GETOPT_FALSE@ getopt.c getopt.h \
|
@BSD_TRUE@am__append_2 = bsd/device.c
|
||||||
@GETOPT_FALSE@ getopt1.c
|
@BSD_TRUE@@TUNEMU_TRUE@am__append_3 = bsd/tunemu.c
|
||||||
|
@SOLARIS_TRUE@am__append_4 = solaris/device.c
|
||||||
|
@MINGW_TRUE@am__append_5 = mingw/device.c
|
||||||
|
@CYGWIN_TRUE@am__append_6 = cygwin/device.c
|
||||||
|
@UML_TRUE@am__append_7 = uml_device.c
|
||||||
|
@VDE_TRUE@am__append_8 = vde_device.c
|
||||||
|
@OPENSSL_TRUE@am__append_9 = \
|
||||||
|
@OPENSSL_TRUE@ openssl/cipher.c \
|
||||||
|
@OPENSSL_TRUE@ openssl/crypto.c \
|
||||||
|
@OPENSSL_TRUE@ openssl/digest.c \
|
||||||
|
@OPENSSL_TRUE@ openssl/ecdh.c \
|
||||||
|
@OPENSSL_TRUE@ openssl/ecdsa.c \
|
||||||
|
@OPENSSL_TRUE@ openssl/prf.c \
|
||||||
|
@OPENSSL_TRUE@ openssl/rsa.c
|
||||||
|
|
||||||
@LINUX_TRUE@am__append_2 = linux/device.c
|
@OPENSSL_TRUE@am__append_10 = \
|
||||||
@BSD_TRUE@am__append_3 = bsd/device.c
|
@OPENSSL_TRUE@ openssl/cipher.c \
|
||||||
@BSD_TRUE@@TUNEMU_TRUE@am__append_4 = bsd/tunemu.c bsd/tunemu.h
|
@OPENSSL_TRUE@ openssl/crypto.c \
|
||||||
@SOLARIS_TRUE@am__append_5 = solaris/device.c
|
@OPENSSL_TRUE@ openssl/digest.c \
|
||||||
@MINGW_TRUE@am__append_6 = mingw/device.c mingw/common.h
|
@OPENSSL_TRUE@ openssl/ecdh.c \
|
||||||
@CYGWIN_TRUE@am__append_7 = cygwin/device.c
|
@OPENSSL_TRUE@ openssl/ecdsa.c \
|
||||||
@UML_TRUE@am__append_8 = uml_device.c
|
@OPENSSL_TRUE@ openssl/ecdsagen.c \
|
||||||
@VDE_TRUE@am__append_9 = vde_device.c
|
@OPENSSL_TRUE@ openssl/prf.c \
|
||||||
@TUNEMU_TRUE@am__append_10 = -lpcap
|
@OPENSSL_TRUE@ openssl/rsa.c \
|
||||||
|
@OPENSSL_TRUE@ openssl/rsagen.c
|
||||||
|
|
||||||
|
@OPENSSL_TRUE@am__append_11 = \
|
||||||
|
@OPENSSL_TRUE@ openssl/cipher.c \
|
||||||
|
@OPENSSL_TRUE@ openssl/crypto.c \
|
||||||
|
@OPENSSL_TRUE@ openssl/digest.c \
|
||||||
|
@OPENSSL_TRUE@ openssl/ecdh.c \
|
||||||
|
@OPENSSL_TRUE@ openssl/ecdsa.c \
|
||||||
|
@OPENSSL_TRUE@ openssl/prf.c
|
||||||
|
|
||||||
|
@GCRYPT_TRUE@am__append_12 = \
|
||||||
|
@GCRYPT_TRUE@ gcrypt/cipher.c \
|
||||||
|
@GCRYPT_TRUE@ gcrypt/crypto.c \
|
||||||
|
@GCRYPT_TRUE@ gcrypt/digest.c \
|
||||||
|
@GCRYPT_TRUE@ gcrypt/ecdh.c \
|
||||||
|
@GCRYPT_TRUE@ gcrypt/ecdsa.c \
|
||||||
|
@GCRYPT_TRUE@ gcrypt/prf.c \
|
||||||
|
@GCRYPT_TRUE@ gcrypt/rsa.c
|
||||||
|
|
||||||
|
@GCRYPT_TRUE@am__append_13 = \
|
||||||
|
@GCRYPT_TRUE@ gcrypt/cipher.c \
|
||||||
|
@GCRYPT_TRUE@ gcrypt/crypto.c \
|
||||||
|
@GCRYPT_TRUE@ gcrypt/digest.c \
|
||||||
|
@GCRYPT_TRUE@ gcrypt/ecdh.c \
|
||||||
|
@GCRYPT_TRUE@ gcrypt/ecdsa.c \
|
||||||
|
@GCRYPT_TRUE@ gcrypt/ecdsagen.c \
|
||||||
|
@GCRYPT_TRUE@ gcrypt/prf.c \
|
||||||
|
@GCRYPT_TRUE@ gcrypt/rsa.c \
|
||||||
|
@GCRYPT_TRUE@ gcrypt/rsagen.c
|
||||||
|
|
||||||
|
@GCRYPT_TRUE@am__append_14 = \
|
||||||
|
@GCRYPT_TRUE@ gcrypt/cipher.c \
|
||||||
|
@GCRYPT_TRUE@ gcrypt/crypto.c \
|
||||||
|
@GCRYPT_TRUE@ gcrypt/digest.c \
|
||||||
|
@GCRYPT_TRUE@ gcrypt/ecdh.c \
|
||||||
|
@GCRYPT_TRUE@ gcrypt/ecdsa.c \
|
||||||
|
@GCRYPT_TRUE@ gcrypt/prf.c
|
||||||
|
|
||||||
|
@TUNEMU_TRUE@am__append_15 = -lpcap
|
||||||
subdir = src
|
subdir = src
|
||||||
|
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
|
||||||
|
$(top_srcdir)/depcomp
|
||||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||||
am__aclocal_m4_deps = $(top_srcdir)/m4/attribute.m4 \
|
am__aclocal_m4_deps = $(top_srcdir)/m4/attribute.m4 \
|
||||||
$(top_srcdir)/m4/ax_append_flag.m4 \
|
$(top_srcdir)/m4/curses.m4 $(top_srcdir)/m4/lzo.m4 \
|
||||||
$(top_srcdir)/m4/ax_cflags_warn_all.m4 \
|
$(top_srcdir)/m4/openssl.m4 $(top_srcdir)/m4/readline.m4 \
|
||||||
$(top_srcdir)/m4/ax_check_compile_flag.m4 \
|
$(top_srcdir)/m4/zlib.m4 $(top_srcdir)/configure.ac
|
||||||
$(top_srcdir)/m4/ax_check_link_flag.m4 \
|
|
||||||
$(top_srcdir)/m4/ax_require_defined.m4 $(top_srcdir)/m4/lzo.m4 \
|
|
||||||
$(top_srcdir)/m4/openssl.m4 $(top_srcdir)/m4/zlib.m4 \
|
|
||||||
$(top_srcdir)/configure.ac
|
|
||||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||||
$(ACLOCAL_M4)
|
$(ACLOCAL_M4)
|
||||||
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
|
|
||||||
mkinstalldirs = $(install_sh) -d
|
mkinstalldirs = $(install_sh) -d
|
||||||
CONFIG_HEADER = $(top_builddir)/config.h
|
CONFIG_HEADER = $(top_builddir)/config.h
|
||||||
CONFIG_CLEAN_FILES =
|
CONFIG_CLEAN_FILES =
|
||||||
CONFIG_CLEAN_VPATH_FILES =
|
CONFIG_CLEAN_VPATH_FILES =
|
||||||
am__installdirs = "$(DESTDIR)$(sbindir)"
|
am__installdirs = "$(DESTDIR)$(sbindir)"
|
||||||
PROGRAMS = $(sbin_PROGRAMS)
|
PROGRAMS = $(sbin_PROGRAMS)
|
||||||
am__tincd_SOURCES_DIST = have.h system.h avl_tree.c avl_tree.h conf.c \
|
am__sptps_test_SOURCES_DIST = logger.c logger.h sptps.c sptps.h \
|
||||||
conf.h connection.c connection.h device.h dropin.c dropin.h \
|
sptps_test.c utils.c utils.h openssl/cipher.c openssl/crypto.c \
|
||||||
dummy_device.c edge.c edge.h ethernet.h event.c event.h \
|
openssl/digest.c openssl/ecdh.c openssl/ecdsa.c openssl/prf.c \
|
||||||
fake-getaddrinfo.c fake-getaddrinfo.h fake-getnameinfo.c \
|
gcrypt/cipher.c gcrypt/crypto.c gcrypt/digest.c gcrypt/ecdh.c \
|
||||||
fake-getnameinfo.h graph.c graph.h ipv4.h ipv6.h list.c list.h \
|
gcrypt/ecdsa.c gcrypt/prf.c
|
||||||
logger.c logger.h meta.c meta.h multicast_device.c net.c net.h \
|
|
||||||
net_packet.c net_setup.c net_socket.c netutl.c netutl.h node.c \
|
|
||||||
node.h pidfile.c pidfile.h process.c process.h protocol.c \
|
|
||||||
protocol.h protocol_auth.c protocol_edge.c protocol_misc.c \
|
|
||||||
protocol_key.c protocol_subnet.c proxy.c proxy.h \
|
|
||||||
raw_socket_device.c route.c route.h subnet.c subnet.h tincd.c \
|
|
||||||
utils.c utils.h xalloc.h getopt.c getopt.h getopt1.c \
|
|
||||||
linux/device.c bsd/device.c bsd/tunemu.c bsd/tunemu.h \
|
|
||||||
solaris/device.c mingw/device.c mingw/common.h cygwin/device.c \
|
|
||||||
uml_device.c vde_device.c
|
|
||||||
@GETOPT_FALSE@am__objects_1 = getopt.$(OBJEXT) getopt1.$(OBJEXT)
|
|
||||||
am__dirstamp = $(am__leading_dot)dirstamp
|
am__dirstamp = $(am__leading_dot)dirstamp
|
||||||
@LINUX_TRUE@am__objects_2 = linux/device.$(OBJEXT)
|
@OPENSSL_TRUE@am__objects_1 = openssl/cipher.$(OBJEXT) \
|
||||||
@BSD_TRUE@am__objects_3 = bsd/device.$(OBJEXT)
|
@OPENSSL_TRUE@ openssl/crypto.$(OBJEXT) \
|
||||||
@BSD_TRUE@@TUNEMU_TRUE@am__objects_4 = bsd/tunemu.$(OBJEXT)
|
@OPENSSL_TRUE@ openssl/digest.$(OBJEXT) openssl/ecdh.$(OBJEXT) \
|
||||||
@SOLARIS_TRUE@am__objects_5 = solaris/device.$(OBJEXT)
|
@OPENSSL_TRUE@ openssl/ecdsa.$(OBJEXT) openssl/prf.$(OBJEXT)
|
||||||
@MINGW_TRUE@am__objects_6 = mingw/device.$(OBJEXT)
|
@GCRYPT_TRUE@am__objects_2 = gcrypt/cipher.$(OBJEXT) \
|
||||||
@CYGWIN_TRUE@am__objects_7 = cygwin/device.$(OBJEXT)
|
@GCRYPT_TRUE@ gcrypt/crypto.$(OBJEXT) gcrypt/digest.$(OBJEXT) \
|
||||||
@UML_TRUE@am__objects_8 = uml_device.$(OBJEXT)
|
@GCRYPT_TRUE@ gcrypt/ecdh.$(OBJEXT) gcrypt/ecdsa.$(OBJEXT) \
|
||||||
@VDE_TRUE@am__objects_9 = vde_device.$(OBJEXT)
|
@GCRYPT_TRUE@ gcrypt/prf.$(OBJEXT)
|
||||||
am_tincd_OBJECTS = avl_tree.$(OBJEXT) conf.$(OBJEXT) \
|
am_sptps_test_OBJECTS = logger.$(OBJEXT) sptps.$(OBJEXT) \
|
||||||
connection.$(OBJEXT) dropin.$(OBJEXT) dummy_device.$(OBJEXT) \
|
sptps_test.$(OBJEXT) utils.$(OBJEXT) $(am__objects_1) \
|
||||||
edge.$(OBJEXT) event.$(OBJEXT) fake-getaddrinfo.$(OBJEXT) \
|
$(am__objects_2)
|
||||||
fake-getnameinfo.$(OBJEXT) graph.$(OBJEXT) list.$(OBJEXT) \
|
sptps_test_OBJECTS = $(am_sptps_test_OBJECTS)
|
||||||
logger.$(OBJEXT) meta.$(OBJEXT) multicast_device.$(OBJEXT) \
|
sptps_test_LDADD = $(LDADD)
|
||||||
net.$(OBJEXT) net_packet.$(OBJEXT) net_setup.$(OBJEXT) \
|
am__tinc_SOURCES_DIST = dropin.c dropin.h getopt.c getopt.h getopt1.c \
|
||||||
net_socket.$(OBJEXT) netutl.$(OBJEXT) node.$(OBJEXT) \
|
info.c info.h invitation.c invitation.h list.c list.h names.c \
|
||||||
pidfile.$(OBJEXT) process.$(OBJEXT) protocol.$(OBJEXT) \
|
names.h netutl.c netutl.h sptps.c sptps.h subnet_parse.c \
|
||||||
protocol_auth.$(OBJEXT) protocol_edge.$(OBJEXT) \
|
subnet.h tincctl.c tincctl.h top.c top.h utils.c utils.h \
|
||||||
protocol_misc.$(OBJEXT) protocol_key.$(OBJEXT) \
|
openssl/cipher.c openssl/crypto.c openssl/digest.c \
|
||||||
protocol_subnet.$(OBJEXT) proxy.$(OBJEXT) \
|
openssl/ecdh.c openssl/ecdsa.c openssl/ecdsagen.c \
|
||||||
raw_socket_device.$(OBJEXT) route.$(OBJEXT) subnet.$(OBJEXT) \
|
openssl/prf.c openssl/rsa.c openssl/rsagen.c gcrypt/cipher.c \
|
||||||
tincd.$(OBJEXT) utils.$(OBJEXT) $(am__objects_1) \
|
gcrypt/crypto.c gcrypt/digest.c gcrypt/ecdh.c gcrypt/ecdsa.c \
|
||||||
$(am__objects_2) $(am__objects_3) $(am__objects_4) \
|
gcrypt/ecdsagen.c gcrypt/prf.c gcrypt/rsa.c gcrypt/rsagen.c
|
||||||
|
@OPENSSL_TRUE@am__objects_3 = openssl/cipher.$(OBJEXT) \
|
||||||
|
@OPENSSL_TRUE@ openssl/crypto.$(OBJEXT) \
|
||||||
|
@OPENSSL_TRUE@ openssl/digest.$(OBJEXT) openssl/ecdh.$(OBJEXT) \
|
||||||
|
@OPENSSL_TRUE@ openssl/ecdsa.$(OBJEXT) \
|
||||||
|
@OPENSSL_TRUE@ openssl/ecdsagen.$(OBJEXT) openssl/prf.$(OBJEXT) \
|
||||||
|
@OPENSSL_TRUE@ openssl/rsa.$(OBJEXT) openssl/rsagen.$(OBJEXT)
|
||||||
|
@GCRYPT_TRUE@am__objects_4 = gcrypt/cipher.$(OBJEXT) \
|
||||||
|
@GCRYPT_TRUE@ gcrypt/crypto.$(OBJEXT) gcrypt/digest.$(OBJEXT) \
|
||||||
|
@GCRYPT_TRUE@ gcrypt/ecdh.$(OBJEXT) gcrypt/ecdsa.$(OBJEXT) \
|
||||||
|
@GCRYPT_TRUE@ gcrypt/ecdsagen.$(OBJEXT) gcrypt/prf.$(OBJEXT) \
|
||||||
|
@GCRYPT_TRUE@ gcrypt/rsa.$(OBJEXT) gcrypt/rsagen.$(OBJEXT)
|
||||||
|
am_tinc_OBJECTS = dropin.$(OBJEXT) getopt.$(OBJEXT) getopt1.$(OBJEXT) \
|
||||||
|
info.$(OBJEXT) invitation.$(OBJEXT) list.$(OBJEXT) \
|
||||||
|
names.$(OBJEXT) netutl.$(OBJEXT) sptps.$(OBJEXT) \
|
||||||
|
subnet_parse.$(OBJEXT) tincctl.$(OBJEXT) top.$(OBJEXT) \
|
||||||
|
utils.$(OBJEXT) $(am__objects_3) $(am__objects_4)
|
||||||
|
tinc_OBJECTS = $(am_tinc_OBJECTS)
|
||||||
|
am__DEPENDENCIES_1 =
|
||||||
|
tinc_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
|
||||||
|
am__tincd_SOURCES_DIST = buffer.c buffer.h cipher.h conf.c conf.h \
|
||||||
|
connection.c connection.h control.c control.h control_common.h \
|
||||||
|
crypto.h device.h digest.h dropin.c dropin.h dummy_device.c \
|
||||||
|
ecdh.h ecdsa.h ecdsagen.h edge.c edge.h ethernet.h event.c \
|
||||||
|
event.h fake-gai-errnos.h fake-getaddrinfo.c \
|
||||||
|
fake-getaddrinfo.h fake-getnameinfo.c fake-getnameinfo.h \
|
||||||
|
getopt.c getopt.h getopt1.c graph.c graph.h hash.c hash.h \
|
||||||
|
have.h ipv4.h ipv6.h list.c list.h logger.c logger.h meta.c \
|
||||||
|
meta.h multicast_device.c names.c names.h net.c net.h \
|
||||||
|
net_packet.c net_setup.c net_socket.c netutl.c netutl.h node.c \
|
||||||
|
node.h prf.h process.c process.h protocol.c protocol.h \
|
||||||
|
protocol_auth.c protocol_edge.c protocol_key.c protocol_misc.c \
|
||||||
|
protocol_subnet.c raw_socket_device.c route.c route.h rsa.h \
|
||||||
|
rsagen.h splay_tree.c splay_tree.h sptps.c sptps.h subnet.c \
|
||||||
|
subnet.h subnet_parse.c system.h tincd.c utils.c utils.h \
|
||||||
|
xalloc.h linux/device.c bsd/device.c bsd/tunemu.c \
|
||||||
|
solaris/device.c mingw/device.c cygwin/device.c uml_device.c \
|
||||||
|
vde_device.c openssl/cipher.c openssl/crypto.c \
|
||||||
|
openssl/digest.c openssl/ecdh.c openssl/ecdsa.c openssl/prf.c \
|
||||||
|
openssl/rsa.c gcrypt/cipher.c gcrypt/crypto.c gcrypt/digest.c \
|
||||||
|
gcrypt/ecdh.c gcrypt/ecdsa.c gcrypt/prf.c gcrypt/rsa.c
|
||||||
|
@LINUX_TRUE@am__objects_5 = linux/device.$(OBJEXT)
|
||||||
|
@BSD_TRUE@am__objects_6 = bsd/device.$(OBJEXT)
|
||||||
|
@BSD_TRUE@@TUNEMU_TRUE@am__objects_7 = bsd/tunemu.$(OBJEXT)
|
||||||
|
@SOLARIS_TRUE@am__objects_8 = solaris/device.$(OBJEXT)
|
||||||
|
@MINGW_TRUE@am__objects_9 = mingw/device.$(OBJEXT)
|
||||||
|
@CYGWIN_TRUE@am__objects_10 = cygwin/device.$(OBJEXT)
|
||||||
|
@UML_TRUE@am__objects_11 = uml_device.$(OBJEXT)
|
||||||
|
@VDE_TRUE@am__objects_12 = vde_device.$(OBJEXT)
|
||||||
|
@OPENSSL_TRUE@am__objects_13 = openssl/cipher.$(OBJEXT) \
|
||||||
|
@OPENSSL_TRUE@ openssl/crypto.$(OBJEXT) \
|
||||||
|
@OPENSSL_TRUE@ openssl/digest.$(OBJEXT) openssl/ecdh.$(OBJEXT) \
|
||||||
|
@OPENSSL_TRUE@ openssl/ecdsa.$(OBJEXT) openssl/prf.$(OBJEXT) \
|
||||||
|
@OPENSSL_TRUE@ openssl/rsa.$(OBJEXT)
|
||||||
|
@GCRYPT_TRUE@am__objects_14 = gcrypt/cipher.$(OBJEXT) \
|
||||||
|
@GCRYPT_TRUE@ gcrypt/crypto.$(OBJEXT) gcrypt/digest.$(OBJEXT) \
|
||||||
|
@GCRYPT_TRUE@ gcrypt/ecdh.$(OBJEXT) gcrypt/ecdsa.$(OBJEXT) \
|
||||||
|
@GCRYPT_TRUE@ gcrypt/prf.$(OBJEXT) gcrypt/rsa.$(OBJEXT)
|
||||||
|
am_tincd_OBJECTS = buffer.$(OBJEXT) conf.$(OBJEXT) \
|
||||||
|
connection.$(OBJEXT) control.$(OBJEXT) dropin.$(OBJEXT) \
|
||||||
|
dummy_device.$(OBJEXT) edge.$(OBJEXT) event.$(OBJEXT) \
|
||||||
|
fake-getaddrinfo.$(OBJEXT) fake-getnameinfo.$(OBJEXT) \
|
||||||
|
getopt.$(OBJEXT) getopt1.$(OBJEXT) graph.$(OBJEXT) \
|
||||||
|
hash.$(OBJEXT) list.$(OBJEXT) logger.$(OBJEXT) meta.$(OBJEXT) \
|
||||||
|
multicast_device.$(OBJEXT) names.$(OBJEXT) net.$(OBJEXT) \
|
||||||
|
net_packet.$(OBJEXT) net_setup.$(OBJEXT) net_socket.$(OBJEXT) \
|
||||||
|
netutl.$(OBJEXT) node.$(OBJEXT) process.$(OBJEXT) \
|
||||||
|
protocol.$(OBJEXT) protocol_auth.$(OBJEXT) \
|
||||||
|
protocol_edge.$(OBJEXT) protocol_key.$(OBJEXT) \
|
||||||
|
protocol_misc.$(OBJEXT) protocol_subnet.$(OBJEXT) \
|
||||||
|
raw_socket_device.$(OBJEXT) route.$(OBJEXT) \
|
||||||
|
splay_tree.$(OBJEXT) sptps.$(OBJEXT) subnet.$(OBJEXT) \
|
||||||
|
subnet_parse.$(OBJEXT) tincd.$(OBJEXT) utils.$(OBJEXT) \
|
||||||
$(am__objects_5) $(am__objects_6) $(am__objects_7) \
|
$(am__objects_5) $(am__objects_6) $(am__objects_7) \
|
||||||
$(am__objects_8) $(am__objects_9)
|
$(am__objects_8) $(am__objects_9) $(am__objects_10) \
|
||||||
|
$(am__objects_11) $(am__objects_12) $(am__objects_13) \
|
||||||
|
$(am__objects_14)
|
||||||
tincd_OBJECTS = $(am_tincd_OBJECTS)
|
tincd_OBJECTS = $(am_tincd_OBJECTS)
|
||||||
tincd_LDADD = $(LDADD)
|
tincd_LDADD = $(LDADD)
|
||||||
AM_V_P = $(am__v_P_@AM_V@)
|
AM_V_P = $(am__v_P_@AM_V@)
|
||||||
|
|
@ -176,31 +278,8 @@ AM_V_at = $(am__v_at_@AM_V@)
|
||||||
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||||
am__v_at_0 = @
|
am__v_at_0 = @
|
||||||
am__v_at_1 =
|
am__v_at_1 =
|
||||||
DEFAULT_INCLUDES =
|
|
||||||
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||||
am__maybe_remake_depfiles = depfiles
|
am__depfiles_maybe = depfiles
|
||||||
am__depfiles_remade = ./$(DEPDIR)/avl_tree.Po ./$(DEPDIR)/conf.Po \
|
|
||||||
./$(DEPDIR)/connection.Po ./$(DEPDIR)/dropin.Po \
|
|
||||||
./$(DEPDIR)/dummy_device.Po ./$(DEPDIR)/edge.Po \
|
|
||||||
./$(DEPDIR)/event.Po ./$(DEPDIR)/fake-getaddrinfo.Po \
|
|
||||||
./$(DEPDIR)/fake-getnameinfo.Po ./$(DEPDIR)/getopt.Po \
|
|
||||||
./$(DEPDIR)/getopt1.Po ./$(DEPDIR)/graph.Po \
|
|
||||||
./$(DEPDIR)/list.Po ./$(DEPDIR)/logger.Po ./$(DEPDIR)/meta.Po \
|
|
||||||
./$(DEPDIR)/multicast_device.Po ./$(DEPDIR)/net.Po \
|
|
||||||
./$(DEPDIR)/net_packet.Po ./$(DEPDIR)/net_setup.Po \
|
|
||||||
./$(DEPDIR)/net_socket.Po ./$(DEPDIR)/netutl.Po \
|
|
||||||
./$(DEPDIR)/node.Po ./$(DEPDIR)/pidfile.Po \
|
|
||||||
./$(DEPDIR)/process.Po ./$(DEPDIR)/protocol.Po \
|
|
||||||
./$(DEPDIR)/protocol_auth.Po ./$(DEPDIR)/protocol_edge.Po \
|
|
||||||
./$(DEPDIR)/protocol_key.Po ./$(DEPDIR)/protocol_misc.Po \
|
|
||||||
./$(DEPDIR)/protocol_subnet.Po ./$(DEPDIR)/proxy.Po \
|
|
||||||
./$(DEPDIR)/raw_socket_device.Po ./$(DEPDIR)/route.Po \
|
|
||||||
./$(DEPDIR)/subnet.Po ./$(DEPDIR)/tincd.Po \
|
|
||||||
./$(DEPDIR)/uml_device.Po ./$(DEPDIR)/utils.Po \
|
|
||||||
./$(DEPDIR)/vde_device.Po bsd/$(DEPDIR)/device.Po \
|
|
||||||
bsd/$(DEPDIR)/tunemu.Po cygwin/$(DEPDIR)/device.Po \
|
|
||||||
linux/$(DEPDIR)/device.Po mingw/$(DEPDIR)/device.Po \
|
|
||||||
solaris/$(DEPDIR)/device.Po
|
|
||||||
am__mv = mv -f
|
am__mv = mv -f
|
||||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||||
|
|
@ -214,8 +293,9 @@ AM_V_CCLD = $(am__v_CCLD_@AM_V@)
|
||||||
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
|
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
|
||||||
am__v_CCLD_0 = @echo " CCLD " $@;
|
am__v_CCLD_0 = @echo " CCLD " $@;
|
||||||
am__v_CCLD_1 =
|
am__v_CCLD_1 =
|
||||||
SOURCES = $(tincd_SOURCES)
|
SOURCES = $(sptps_test_SOURCES) $(tinc_SOURCES) $(tincd_SOURCES)
|
||||||
DIST_SOURCES = $(am__tincd_SOURCES_DIST)
|
DIST_SOURCES = $(am__sptps_test_SOURCES_DIST) $(am__tinc_SOURCES_DIST) \
|
||||||
|
$(am__tincd_SOURCES_DIST)
|
||||||
am__can_run_installinfo = \
|
am__can_run_installinfo = \
|
||||||
case $$AM_UPDATE_INFO_DIR in \
|
case $$AM_UPDATE_INFO_DIR in \
|
||||||
n|no|NO) false;; \
|
n|no|NO) false;; \
|
||||||
|
|
@ -240,7 +320,6 @@ am__define_uniq_tagged_files = \
|
||||||
done | $(am__uniquify_input)`
|
done | $(am__uniquify_input)`
|
||||||
ETAGS = etags
|
ETAGS = etags
|
||||||
CTAGS = ctags
|
CTAGS = ctags
|
||||||
am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
|
|
||||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||||
ACLOCAL = @ACLOCAL@
|
ACLOCAL = @ACLOCAL@
|
||||||
AMTAR = @AMTAR@
|
AMTAR = @AMTAR@
|
||||||
|
|
@ -254,6 +333,7 @@ CCDEPMODE = @CCDEPMODE@
|
||||||
CFLAGS = @CFLAGS@
|
CFLAGS = @CFLAGS@
|
||||||
CPP = @CPP@
|
CPP = @CPP@
|
||||||
CPPFLAGS = @CPPFLAGS@
|
CPPFLAGS = @CPPFLAGS@
|
||||||
|
CURSES_LIBS = @CURSES_LIBS@
|
||||||
CYGPATH_W = @CYGPATH_W@
|
CYGPATH_W = @CYGPATH_W@
|
||||||
DEFS = @DEFS@
|
DEFS = @DEFS@
|
||||||
DEPDIR = @DEPDIR@
|
DEPDIR = @DEPDIR@
|
||||||
|
|
@ -269,8 +349,12 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||||
LDFLAGS = @LDFLAGS@
|
LDFLAGS = @LDFLAGS@
|
||||||
|
LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
|
||||||
|
LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
|
||||||
|
LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@
|
||||||
LIBOBJS = @LIBOBJS@
|
LIBOBJS = @LIBOBJS@
|
||||||
LIBS = @LIBS@ $(am__append_10)
|
LIBS = @LIBS@ @LIBGCRYPT_LIBS@ $(am__append_15)
|
||||||
|
LN_S = @LN_S@
|
||||||
LTLIBOBJS = @LTLIBOBJS@
|
LTLIBOBJS = @LTLIBOBJS@
|
||||||
MAKEINFO = @MAKEINFO@
|
MAKEINFO = @MAKEINFO@
|
||||||
MKDIR_P = @MKDIR_P@
|
MKDIR_P = @MKDIR_P@
|
||||||
|
|
@ -283,6 +367,8 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||||
PACKAGE_URL = @PACKAGE_URL@
|
PACKAGE_URL = @PACKAGE_URL@
|
||||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||||
|
RANLIB = @RANLIB@
|
||||||
|
READLINE_LIBS = @READLINE_LIBS@
|
||||||
SET_MAKE = @SET_MAKE@
|
SET_MAKE = @SET_MAKE@
|
||||||
SHELL = @SHELL@
|
SHELL = @SHELL@
|
||||||
STRIP = @STRIP@
|
STRIP = @STRIP@
|
||||||
|
|
@ -329,32 +415,44 @@ pdfdir = @pdfdir@
|
||||||
prefix = @prefix@
|
prefix = @prefix@
|
||||||
program_transform_name = @program_transform_name@
|
program_transform_name = @program_transform_name@
|
||||||
psdir = @psdir@
|
psdir = @psdir@
|
||||||
runstatedir = @runstatedir@
|
|
||||||
sbindir = @sbindir@
|
sbindir = @sbindir@
|
||||||
sharedstatedir = @sharedstatedir@
|
sharedstatedir = @sharedstatedir@
|
||||||
srcdir = @srcdir@
|
srcdir = @srcdir@
|
||||||
sysconfdir = @sysconfdir@
|
sysconfdir = @sysconfdir@
|
||||||
systemd_path = @systemd_path@
|
|
||||||
target_alias = @target_alias@
|
target_alias = @target_alias@
|
||||||
top_build_prefix = @top_build_prefix@
|
top_build_prefix = @top_build_prefix@
|
||||||
top_builddir = @top_builddir@
|
top_builddir = @top_builddir@
|
||||||
top_srcdir = @top_srcdir@
|
top_srcdir = @top_srcdir@
|
||||||
tincd_SOURCES = have.h system.h avl_tree.c avl_tree.h conf.c conf.h \
|
EXTRA_DIST = linux bsd solaris cygwin mingw openssl gcrypt
|
||||||
connection.c connection.h device.h dropin.c dropin.h \
|
DEFAULT_INCLUDES =
|
||||||
dummy_device.c edge.c edge.h ethernet.h event.c event.h \
|
tincd_SOURCES = buffer.c buffer.h cipher.h conf.c conf.h connection.c \
|
||||||
fake-getaddrinfo.c fake-getaddrinfo.h fake-getnameinfo.c \
|
connection.h control.c control.h control_common.h crypto.h \
|
||||||
fake-getnameinfo.h graph.c graph.h ipv4.h ipv6.h list.c list.h \
|
device.h digest.h dropin.c dropin.h dummy_device.c ecdh.h \
|
||||||
logger.c logger.h meta.c meta.h multicast_device.c net.c net.h \
|
ecdsa.h ecdsagen.h edge.c edge.h ethernet.h event.c event.h \
|
||||||
net_packet.c net_setup.c net_socket.c netutl.c netutl.h node.c \
|
fake-gai-errnos.h fake-getaddrinfo.c fake-getaddrinfo.h \
|
||||||
node.h pidfile.c pidfile.h process.c process.h protocol.c \
|
fake-getnameinfo.c fake-getnameinfo.h getopt.c getopt.h \
|
||||||
protocol.h protocol_auth.c protocol_edge.c protocol_misc.c \
|
getopt1.c graph.c graph.h hash.c hash.h have.h ipv4.h ipv6.h \
|
||||||
protocol_key.c protocol_subnet.c proxy.c proxy.h \
|
list.c list.h logger.c logger.h meta.c meta.h \
|
||||||
raw_socket_device.c route.c route.h subnet.c subnet.h tincd.c \
|
multicast_device.c names.c names.h net.c net.h net_packet.c \
|
||||||
utils.c utils.h xalloc.h $(am__append_1) $(am__append_2) \
|
net_setup.c net_socket.c netutl.c netutl.h node.c node.h prf.h \
|
||||||
$(am__append_3) $(am__append_4) $(am__append_5) \
|
process.c process.h protocol.c protocol.h protocol_auth.c \
|
||||||
$(am__append_6) $(am__append_7) $(am__append_8) \
|
protocol_edge.c protocol_key.c protocol_misc.c \
|
||||||
$(am__append_9)
|
protocol_subnet.c raw_socket_device.c route.c route.h rsa.h \
|
||||||
AM_CPPFLAGS = -DCONFDIR=\"$(sysconfdir)\" -DRUNSTATEDIR=\"$(runstatedir)\" -DLOCALSTATEDIR=\"$(localstatedir)\" -I $(abs_top_builddir)/
|
rsagen.h splay_tree.c splay_tree.h sptps.c sptps.h subnet.c \
|
||||||
|
subnet.h subnet_parse.c system.h tincd.c utils.c utils.h \
|
||||||
|
xalloc.h $(am__append_1) $(am__append_2) $(am__append_3) \
|
||||||
|
$(am__append_4) $(am__append_5) $(am__append_6) \
|
||||||
|
$(am__append_7) $(am__append_8) $(am__append_9) \
|
||||||
|
$(am__append_12)
|
||||||
|
tinc_SOURCES = dropin.c dropin.h getopt.c getopt.h getopt1.c info.c \
|
||||||
|
info.h invitation.c invitation.h list.c list.h names.c names.h \
|
||||||
|
netutl.c netutl.h sptps.c sptps.h subnet_parse.c subnet.h \
|
||||||
|
tincctl.c tincctl.h top.c top.h utils.c utils.h \
|
||||||
|
$(am__append_10) $(am__append_13)
|
||||||
|
sptps_test_SOURCES = logger.c logger.h sptps.c sptps.h sptps_test.c \
|
||||||
|
utils.c utils.h $(am__append_11) $(am__append_14)
|
||||||
|
tinc_LDADD = $(READLINE_LIBS) $(CURSES_LIBS)
|
||||||
|
AM_CFLAGS = -DCONFDIR=\"$(sysconfdir)\" -DLOCALSTATEDIR=\"$(localstatedir)\" -DSBINDIR=\"$(sbindir)\"
|
||||||
all: all-am
|
all: all-am
|
||||||
|
|
||||||
.SUFFIXES:
|
.SUFFIXES:
|
||||||
|
|
@ -371,13 +469,14 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \
|
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \
|
||||||
$(am__cd) $(top_srcdir) && \
|
$(am__cd) $(top_srcdir) && \
|
||||||
$(AUTOMAKE) --gnu src/Makefile
|
$(AUTOMAKE) --gnu src/Makefile
|
||||||
|
.PRECIOUS: Makefile
|
||||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||||
@case '$?' in \
|
@case '$?' in \
|
||||||
*config.status*) \
|
*config.status*) \
|
||||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||||
*) \
|
*) \
|
||||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
|
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
|
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||||
esac;
|
esac;
|
||||||
|
|
||||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||||
|
|
@ -446,6 +545,62 @@ installcheck-sbinPROGRAMS: $(sbin_PROGRAMS)
|
||||||
else echo "$$f does not support $$opt" 1>&2; bad=1; fi; \
|
else echo "$$f does not support $$opt" 1>&2; bad=1; fi; \
|
||||||
done; \
|
done; \
|
||||||
done; rm -f c$${pid}_.???; exit $$bad
|
done; rm -f c$${pid}_.???; exit $$bad
|
||||||
|
openssl/$(am__dirstamp):
|
||||||
|
@$(MKDIR_P) openssl
|
||||||
|
@: > openssl/$(am__dirstamp)
|
||||||
|
openssl/$(DEPDIR)/$(am__dirstamp):
|
||||||
|
@$(MKDIR_P) openssl/$(DEPDIR)
|
||||||
|
@: > openssl/$(DEPDIR)/$(am__dirstamp)
|
||||||
|
openssl/cipher.$(OBJEXT): openssl/$(am__dirstamp) \
|
||||||
|
openssl/$(DEPDIR)/$(am__dirstamp)
|
||||||
|
openssl/crypto.$(OBJEXT): openssl/$(am__dirstamp) \
|
||||||
|
openssl/$(DEPDIR)/$(am__dirstamp)
|
||||||
|
openssl/digest.$(OBJEXT): openssl/$(am__dirstamp) \
|
||||||
|
openssl/$(DEPDIR)/$(am__dirstamp)
|
||||||
|
openssl/ecdh.$(OBJEXT): openssl/$(am__dirstamp) \
|
||||||
|
openssl/$(DEPDIR)/$(am__dirstamp)
|
||||||
|
openssl/ecdsa.$(OBJEXT): openssl/$(am__dirstamp) \
|
||||||
|
openssl/$(DEPDIR)/$(am__dirstamp)
|
||||||
|
openssl/prf.$(OBJEXT): openssl/$(am__dirstamp) \
|
||||||
|
openssl/$(DEPDIR)/$(am__dirstamp)
|
||||||
|
gcrypt/$(am__dirstamp):
|
||||||
|
@$(MKDIR_P) gcrypt
|
||||||
|
@: > gcrypt/$(am__dirstamp)
|
||||||
|
gcrypt/$(DEPDIR)/$(am__dirstamp):
|
||||||
|
@$(MKDIR_P) gcrypt/$(DEPDIR)
|
||||||
|
@: > gcrypt/$(DEPDIR)/$(am__dirstamp)
|
||||||
|
gcrypt/cipher.$(OBJEXT): gcrypt/$(am__dirstamp) \
|
||||||
|
gcrypt/$(DEPDIR)/$(am__dirstamp)
|
||||||
|
gcrypt/crypto.$(OBJEXT): gcrypt/$(am__dirstamp) \
|
||||||
|
gcrypt/$(DEPDIR)/$(am__dirstamp)
|
||||||
|
gcrypt/digest.$(OBJEXT): gcrypt/$(am__dirstamp) \
|
||||||
|
gcrypt/$(DEPDIR)/$(am__dirstamp)
|
||||||
|
gcrypt/ecdh.$(OBJEXT): gcrypt/$(am__dirstamp) \
|
||||||
|
gcrypt/$(DEPDIR)/$(am__dirstamp)
|
||||||
|
gcrypt/ecdsa.$(OBJEXT): gcrypt/$(am__dirstamp) \
|
||||||
|
gcrypt/$(DEPDIR)/$(am__dirstamp)
|
||||||
|
gcrypt/prf.$(OBJEXT): gcrypt/$(am__dirstamp) \
|
||||||
|
gcrypt/$(DEPDIR)/$(am__dirstamp)
|
||||||
|
|
||||||
|
sptps_test$(EXEEXT): $(sptps_test_OBJECTS) $(sptps_test_DEPENDENCIES) $(EXTRA_sptps_test_DEPENDENCIES)
|
||||||
|
@rm -f sptps_test$(EXEEXT)
|
||||||
|
$(AM_V_CCLD)$(LINK) $(sptps_test_OBJECTS) $(sptps_test_LDADD) $(LIBS)
|
||||||
|
openssl/ecdsagen.$(OBJEXT): openssl/$(am__dirstamp) \
|
||||||
|
openssl/$(DEPDIR)/$(am__dirstamp)
|
||||||
|
openssl/rsa.$(OBJEXT): openssl/$(am__dirstamp) \
|
||||||
|
openssl/$(DEPDIR)/$(am__dirstamp)
|
||||||
|
openssl/rsagen.$(OBJEXT): openssl/$(am__dirstamp) \
|
||||||
|
openssl/$(DEPDIR)/$(am__dirstamp)
|
||||||
|
gcrypt/ecdsagen.$(OBJEXT): gcrypt/$(am__dirstamp) \
|
||||||
|
gcrypt/$(DEPDIR)/$(am__dirstamp)
|
||||||
|
gcrypt/rsa.$(OBJEXT): gcrypt/$(am__dirstamp) \
|
||||||
|
gcrypt/$(DEPDIR)/$(am__dirstamp)
|
||||||
|
gcrypt/rsagen.$(OBJEXT): gcrypt/$(am__dirstamp) \
|
||||||
|
gcrypt/$(DEPDIR)/$(am__dirstamp)
|
||||||
|
|
||||||
|
tinc$(EXEEXT): $(tinc_OBJECTS) $(tinc_DEPENDENCIES) $(EXTRA_tinc_DEPENDENCIES)
|
||||||
|
@rm -f tinc$(EXEEXT)
|
||||||
|
$(AM_V_CCLD)$(LINK) $(tinc_OBJECTS) $(tinc_LDADD) $(LIBS)
|
||||||
linux/$(am__dirstamp):
|
linux/$(am__dirstamp):
|
||||||
@$(MKDIR_P) linux
|
@$(MKDIR_P) linux
|
||||||
@: > linux/$(am__dirstamp)
|
@: > linux/$(am__dirstamp)
|
||||||
|
|
@ -497,63 +652,86 @@ mostlyclean-compile:
|
||||||
-rm -f *.$(OBJEXT)
|
-rm -f *.$(OBJEXT)
|
||||||
-rm -f bsd/*.$(OBJEXT)
|
-rm -f bsd/*.$(OBJEXT)
|
||||||
-rm -f cygwin/*.$(OBJEXT)
|
-rm -f cygwin/*.$(OBJEXT)
|
||||||
|
-rm -f gcrypt/*.$(OBJEXT)
|
||||||
-rm -f linux/*.$(OBJEXT)
|
-rm -f linux/*.$(OBJEXT)
|
||||||
-rm -f mingw/*.$(OBJEXT)
|
-rm -f mingw/*.$(OBJEXT)
|
||||||
|
-rm -f openssl/*.$(OBJEXT)
|
||||||
-rm -f solaris/*.$(OBJEXT)
|
-rm -f solaris/*.$(OBJEXT)
|
||||||
|
|
||||||
distclean-compile:
|
distclean-compile:
|
||||||
-rm -f *.tab.c
|
-rm -f *.tab.c
|
||||||
|
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/avl_tree.Po@am__quote@ # am--include-marker
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/buffer.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/conf.Po@am__quote@ # am--include-marker
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/conf.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/connection.Po@am__quote@ # am--include-marker
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/connection.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dropin.Po@am__quote@ # am--include-marker
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/control.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dummy_device.Po@am__quote@ # am--include-marker
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dropin.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/edge.Po@am__quote@ # am--include-marker
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dummy_device.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/event.Po@am__quote@ # am--include-marker
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/edge.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fake-getaddrinfo.Po@am__quote@ # am--include-marker
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/event.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fake-getnameinfo.Po@am__quote@ # am--include-marker
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fake-getaddrinfo.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt.Po@am__quote@ # am--include-marker
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fake-getnameinfo.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt1.Po@am__quote@ # am--include-marker
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/graph.Po@am__quote@ # am--include-marker
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt1.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/list.Po@am__quote@ # am--include-marker
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/graph.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/logger.Po@am__quote@ # am--include-marker
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hash.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/meta.Po@am__quote@ # am--include-marker
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/info.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/multicast_device.Po@am__quote@ # am--include-marker
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/invitation.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/net.Po@am__quote@ # am--include-marker
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/list.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/net_packet.Po@am__quote@ # am--include-marker
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/logger.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/net_setup.Po@am__quote@ # am--include-marker
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/meta.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/net_socket.Po@am__quote@ # am--include-marker
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/multicast_device.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/netutl.Po@am__quote@ # am--include-marker
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/names.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/node.Po@am__quote@ # am--include-marker
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/net.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pidfile.Po@am__quote@ # am--include-marker
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/net_packet.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/process.Po@am__quote@ # am--include-marker
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/net_setup.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/protocol.Po@am__quote@ # am--include-marker
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/net_socket.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/protocol_auth.Po@am__quote@ # am--include-marker
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/netutl.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/protocol_edge.Po@am__quote@ # am--include-marker
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/node.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/protocol_key.Po@am__quote@ # am--include-marker
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/process.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/protocol_misc.Po@am__quote@ # am--include-marker
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/protocol.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/protocol_subnet.Po@am__quote@ # am--include-marker
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/protocol_auth.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/proxy.Po@am__quote@ # am--include-marker
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/protocol_edge.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raw_socket_device.Po@am__quote@ # am--include-marker
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/protocol_key.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/route.Po@am__quote@ # am--include-marker
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/protocol_misc.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/subnet.Po@am__quote@ # am--include-marker
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/protocol_subnet.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tincd.Po@am__quote@ # am--include-marker
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raw_socket_device.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uml_device.Po@am__quote@ # am--include-marker
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/route.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utils.Po@am__quote@ # am--include-marker
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/splay_tree.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vde_device.Po@am__quote@ # am--include-marker
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sptps.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@bsd/$(DEPDIR)/device.Po@am__quote@ # am--include-marker
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sptps_test.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@bsd/$(DEPDIR)/tunemu.Po@am__quote@ # am--include-marker
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/subnet.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@cygwin/$(DEPDIR)/device.Po@am__quote@ # am--include-marker
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/subnet_parse.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@linux/$(DEPDIR)/device.Po@am__quote@ # am--include-marker
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tincctl.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@mingw/$(DEPDIR)/device.Po@am__quote@ # am--include-marker
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tincd.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@solaris/$(DEPDIR)/device.Po@am__quote@ # am--include-marker
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/top.Po@am__quote@
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uml_device.Po@am__quote@
|
||||||
$(am__depfiles_remade):
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utils.Po@am__quote@
|
||||||
@$(MKDIR_P) $(@D)
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vde_device.Po@am__quote@
|
||||||
@echo '# dummy' >$@-t && $(am__mv) $@-t $@
|
@AMDEP_TRUE@@am__include@ @am__quote@bsd/$(DEPDIR)/device.Po@am__quote@
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@bsd/$(DEPDIR)/tunemu.Po@am__quote@
|
||||||
am--depfiles: $(am__depfiles_remade)
|
@AMDEP_TRUE@@am__include@ @am__quote@cygwin/$(DEPDIR)/device.Po@am__quote@
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@gcrypt/$(DEPDIR)/cipher.Po@am__quote@
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@gcrypt/$(DEPDIR)/crypto.Po@am__quote@
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@gcrypt/$(DEPDIR)/digest.Po@am__quote@
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@gcrypt/$(DEPDIR)/ecdh.Po@am__quote@
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@gcrypt/$(DEPDIR)/ecdsa.Po@am__quote@
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@gcrypt/$(DEPDIR)/ecdsagen.Po@am__quote@
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@gcrypt/$(DEPDIR)/prf.Po@am__quote@
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@gcrypt/$(DEPDIR)/rsa.Po@am__quote@
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@gcrypt/$(DEPDIR)/rsagen.Po@am__quote@
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@linux/$(DEPDIR)/device.Po@am__quote@
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@mingw/$(DEPDIR)/device.Po@am__quote@
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@openssl/$(DEPDIR)/cipher.Po@am__quote@
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@openssl/$(DEPDIR)/crypto.Po@am__quote@
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@openssl/$(DEPDIR)/digest.Po@am__quote@
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@openssl/$(DEPDIR)/ecdh.Po@am__quote@
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@openssl/$(DEPDIR)/ecdsa.Po@am__quote@
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@openssl/$(DEPDIR)/ecdsagen.Po@am__quote@
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@openssl/$(DEPDIR)/prf.Po@am__quote@
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@openssl/$(DEPDIR)/rsa.Po@am__quote@
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@openssl/$(DEPDIR)/rsagen.Po@am__quote@
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@solaris/$(DEPDIR)/device.Po@am__quote@
|
||||||
|
|
||||||
.c.o:
|
.c.o:
|
||||||
@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
|
@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
|
||||||
|
|
@ -623,10 +801,7 @@ cscopelist-am: $(am__tagged_files)
|
||||||
distclean-tags:
|
distclean-tags:
|
||||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||||
|
|
||||||
distdir: $(BUILT_SOURCES)
|
distdir: $(DISTFILES)
|
||||||
$(MAKE) $(AM_MAKEFLAGS) distdir-am
|
|
||||||
|
|
||||||
distdir-am: $(DISTFILES)
|
|
||||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||||
list='$(DISTFILES)'; \
|
list='$(DISTFILES)'; \
|
||||||
|
|
@ -656,6 +831,9 @@ distdir-am: $(DISTFILES)
|
||||||
|| exit 1; \
|
|| exit 1; \
|
||||||
fi; \
|
fi; \
|
||||||
done
|
done
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) \
|
||||||
|
top_distdir="$(top_distdir)" distdir="$(distdir)" \
|
||||||
|
dist-hook
|
||||||
check-am: all-am
|
check-am: all-am
|
||||||
check: check-am
|
check: check-am
|
||||||
all-am: Makefile $(PROGRAMS)
|
all-am: Makefile $(PROGRAMS)
|
||||||
|
|
@ -693,10 +871,14 @@ distclean-generic:
|
||||||
-rm -f bsd/$(am__dirstamp)
|
-rm -f bsd/$(am__dirstamp)
|
||||||
-rm -f cygwin/$(DEPDIR)/$(am__dirstamp)
|
-rm -f cygwin/$(DEPDIR)/$(am__dirstamp)
|
||||||
-rm -f cygwin/$(am__dirstamp)
|
-rm -f cygwin/$(am__dirstamp)
|
||||||
|
-rm -f gcrypt/$(DEPDIR)/$(am__dirstamp)
|
||||||
|
-rm -f gcrypt/$(am__dirstamp)
|
||||||
-rm -f linux/$(DEPDIR)/$(am__dirstamp)
|
-rm -f linux/$(DEPDIR)/$(am__dirstamp)
|
||||||
-rm -f linux/$(am__dirstamp)
|
-rm -f linux/$(am__dirstamp)
|
||||||
-rm -f mingw/$(DEPDIR)/$(am__dirstamp)
|
-rm -f mingw/$(DEPDIR)/$(am__dirstamp)
|
||||||
-rm -f mingw/$(am__dirstamp)
|
-rm -f mingw/$(am__dirstamp)
|
||||||
|
-rm -f openssl/$(DEPDIR)/$(am__dirstamp)
|
||||||
|
-rm -f openssl/$(am__dirstamp)
|
||||||
-rm -f solaris/$(DEPDIR)/$(am__dirstamp)
|
-rm -f solaris/$(DEPDIR)/$(am__dirstamp)
|
||||||
-rm -f solaris/$(am__dirstamp)
|
-rm -f solaris/$(am__dirstamp)
|
||||||
|
|
||||||
|
|
@ -708,50 +890,7 @@ clean: clean-am
|
||||||
clean-am: clean-generic clean-sbinPROGRAMS mostlyclean-am
|
clean-am: clean-generic clean-sbinPROGRAMS mostlyclean-am
|
||||||
|
|
||||||
distclean: distclean-am
|
distclean: distclean-am
|
||||||
-rm -f ./$(DEPDIR)/avl_tree.Po
|
-rm -rf ./$(DEPDIR) bsd/$(DEPDIR) cygwin/$(DEPDIR) gcrypt/$(DEPDIR) linux/$(DEPDIR) mingw/$(DEPDIR) openssl/$(DEPDIR) solaris/$(DEPDIR)
|
||||||
-rm -f ./$(DEPDIR)/conf.Po
|
|
||||||
-rm -f ./$(DEPDIR)/connection.Po
|
|
||||||
-rm -f ./$(DEPDIR)/dropin.Po
|
|
||||||
-rm -f ./$(DEPDIR)/dummy_device.Po
|
|
||||||
-rm -f ./$(DEPDIR)/edge.Po
|
|
||||||
-rm -f ./$(DEPDIR)/event.Po
|
|
||||||
-rm -f ./$(DEPDIR)/fake-getaddrinfo.Po
|
|
||||||
-rm -f ./$(DEPDIR)/fake-getnameinfo.Po
|
|
||||||
-rm -f ./$(DEPDIR)/getopt.Po
|
|
||||||
-rm -f ./$(DEPDIR)/getopt1.Po
|
|
||||||
-rm -f ./$(DEPDIR)/graph.Po
|
|
||||||
-rm -f ./$(DEPDIR)/list.Po
|
|
||||||
-rm -f ./$(DEPDIR)/logger.Po
|
|
||||||
-rm -f ./$(DEPDIR)/meta.Po
|
|
||||||
-rm -f ./$(DEPDIR)/multicast_device.Po
|
|
||||||
-rm -f ./$(DEPDIR)/net.Po
|
|
||||||
-rm -f ./$(DEPDIR)/net_packet.Po
|
|
||||||
-rm -f ./$(DEPDIR)/net_setup.Po
|
|
||||||
-rm -f ./$(DEPDIR)/net_socket.Po
|
|
||||||
-rm -f ./$(DEPDIR)/netutl.Po
|
|
||||||
-rm -f ./$(DEPDIR)/node.Po
|
|
||||||
-rm -f ./$(DEPDIR)/pidfile.Po
|
|
||||||
-rm -f ./$(DEPDIR)/process.Po
|
|
||||||
-rm -f ./$(DEPDIR)/protocol.Po
|
|
||||||
-rm -f ./$(DEPDIR)/protocol_auth.Po
|
|
||||||
-rm -f ./$(DEPDIR)/protocol_edge.Po
|
|
||||||
-rm -f ./$(DEPDIR)/protocol_key.Po
|
|
||||||
-rm -f ./$(DEPDIR)/protocol_misc.Po
|
|
||||||
-rm -f ./$(DEPDIR)/protocol_subnet.Po
|
|
||||||
-rm -f ./$(DEPDIR)/proxy.Po
|
|
||||||
-rm -f ./$(DEPDIR)/raw_socket_device.Po
|
|
||||||
-rm -f ./$(DEPDIR)/route.Po
|
|
||||||
-rm -f ./$(DEPDIR)/subnet.Po
|
|
||||||
-rm -f ./$(DEPDIR)/tincd.Po
|
|
||||||
-rm -f ./$(DEPDIR)/uml_device.Po
|
|
||||||
-rm -f ./$(DEPDIR)/utils.Po
|
|
||||||
-rm -f ./$(DEPDIR)/vde_device.Po
|
|
||||||
-rm -f bsd/$(DEPDIR)/device.Po
|
|
||||||
-rm -f bsd/$(DEPDIR)/tunemu.Po
|
|
||||||
-rm -f cygwin/$(DEPDIR)/device.Po
|
|
||||||
-rm -f linux/$(DEPDIR)/device.Po
|
|
||||||
-rm -f mingw/$(DEPDIR)/device.Po
|
|
||||||
-rm -f solaris/$(DEPDIR)/device.Po
|
|
||||||
-rm -f Makefile
|
-rm -f Makefile
|
||||||
distclean-am: clean-am distclean-compile distclean-generic \
|
distclean-am: clean-am distclean-compile distclean-generic \
|
||||||
distclean-tags
|
distclean-tags
|
||||||
|
|
@ -797,50 +936,7 @@ install-ps-am:
|
||||||
installcheck-am: installcheck-sbinPROGRAMS
|
installcheck-am: installcheck-sbinPROGRAMS
|
||||||
|
|
||||||
maintainer-clean: maintainer-clean-am
|
maintainer-clean: maintainer-clean-am
|
||||||
-rm -f ./$(DEPDIR)/avl_tree.Po
|
-rm -rf ./$(DEPDIR) bsd/$(DEPDIR) cygwin/$(DEPDIR) gcrypt/$(DEPDIR) linux/$(DEPDIR) mingw/$(DEPDIR) openssl/$(DEPDIR) solaris/$(DEPDIR)
|
||||||
-rm -f ./$(DEPDIR)/conf.Po
|
|
||||||
-rm -f ./$(DEPDIR)/connection.Po
|
|
||||||
-rm -f ./$(DEPDIR)/dropin.Po
|
|
||||||
-rm -f ./$(DEPDIR)/dummy_device.Po
|
|
||||||
-rm -f ./$(DEPDIR)/edge.Po
|
|
||||||
-rm -f ./$(DEPDIR)/event.Po
|
|
||||||
-rm -f ./$(DEPDIR)/fake-getaddrinfo.Po
|
|
||||||
-rm -f ./$(DEPDIR)/fake-getnameinfo.Po
|
|
||||||
-rm -f ./$(DEPDIR)/getopt.Po
|
|
||||||
-rm -f ./$(DEPDIR)/getopt1.Po
|
|
||||||
-rm -f ./$(DEPDIR)/graph.Po
|
|
||||||
-rm -f ./$(DEPDIR)/list.Po
|
|
||||||
-rm -f ./$(DEPDIR)/logger.Po
|
|
||||||
-rm -f ./$(DEPDIR)/meta.Po
|
|
||||||
-rm -f ./$(DEPDIR)/multicast_device.Po
|
|
||||||
-rm -f ./$(DEPDIR)/net.Po
|
|
||||||
-rm -f ./$(DEPDIR)/net_packet.Po
|
|
||||||
-rm -f ./$(DEPDIR)/net_setup.Po
|
|
||||||
-rm -f ./$(DEPDIR)/net_socket.Po
|
|
||||||
-rm -f ./$(DEPDIR)/netutl.Po
|
|
||||||
-rm -f ./$(DEPDIR)/node.Po
|
|
||||||
-rm -f ./$(DEPDIR)/pidfile.Po
|
|
||||||
-rm -f ./$(DEPDIR)/process.Po
|
|
||||||
-rm -f ./$(DEPDIR)/protocol.Po
|
|
||||||
-rm -f ./$(DEPDIR)/protocol_auth.Po
|
|
||||||
-rm -f ./$(DEPDIR)/protocol_edge.Po
|
|
||||||
-rm -f ./$(DEPDIR)/protocol_key.Po
|
|
||||||
-rm -f ./$(DEPDIR)/protocol_misc.Po
|
|
||||||
-rm -f ./$(DEPDIR)/protocol_subnet.Po
|
|
||||||
-rm -f ./$(DEPDIR)/proxy.Po
|
|
||||||
-rm -f ./$(DEPDIR)/raw_socket_device.Po
|
|
||||||
-rm -f ./$(DEPDIR)/route.Po
|
|
||||||
-rm -f ./$(DEPDIR)/subnet.Po
|
|
||||||
-rm -f ./$(DEPDIR)/tincd.Po
|
|
||||||
-rm -f ./$(DEPDIR)/uml_device.Po
|
|
||||||
-rm -f ./$(DEPDIR)/utils.Po
|
|
||||||
-rm -f ./$(DEPDIR)/vde_device.Po
|
|
||||||
-rm -f bsd/$(DEPDIR)/device.Po
|
|
||||||
-rm -f bsd/$(DEPDIR)/tunemu.Po
|
|
||||||
-rm -f cygwin/$(DEPDIR)/device.Po
|
|
||||||
-rm -f linux/$(DEPDIR)/device.Po
|
|
||||||
-rm -f mingw/$(DEPDIR)/device.Po
|
|
||||||
-rm -f solaris/$(DEPDIR)/device.Po
|
|
||||||
-rm -f Makefile
|
-rm -f Makefile
|
||||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||||
|
|
||||||
|
|
@ -860,8 +956,8 @@ uninstall-am: uninstall-sbinPROGRAMS
|
||||||
|
|
||||||
.MAKE: install-am install-strip
|
.MAKE: install-am install-strip
|
||||||
|
|
||||||
.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \
|
.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
|
||||||
clean-generic clean-sbinPROGRAMS cscopelist-am ctags ctags-am \
|
clean-sbinPROGRAMS cscopelist-am ctags ctags-am dist-hook \
|
||||||
distclean distclean-compile distclean-generic distclean-tags \
|
distclean distclean-compile distclean-generic distclean-tags \
|
||||||
distdir dvi dvi-am html html-am info info-am install \
|
distdir dvi dvi-am html html-am info info-am install \
|
||||||
install-am install-data install-data-am install-dvi \
|
install-am install-data install-data-am install-dvi \
|
||||||
|
|
@ -874,8 +970,9 @@ uninstall-am: uninstall-sbinPROGRAMS
|
||||||
mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \
|
mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \
|
||||||
tags tags-am uninstall uninstall-am uninstall-sbinPROGRAMS
|
tags tags-am uninstall uninstall-am uninstall-sbinPROGRAMS
|
||||||
|
|
||||||
.PRECIOUS: Makefile
|
|
||||||
|
|
||||||
|
dist-hook:
|
||||||
|
rm -f `find . -type l`
|
||||||
|
|
||||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||||
|
|
|
||||||
757
src/avl_tree.c
757
src/avl_tree.c
|
|
@ -1,757 +0,0 @@
|
||||||
/*
|
|
||||||
avl_tree.c -- avl_ tree and linked list convenience
|
|
||||||
Copyright (C) 1998 Michael H. Buselli
|
|
||||||
2000-2005 Ivo Timmermans,
|
|
||||||
2000-2015 Guus Sliepen <guus@tinc-vpn.org>
|
|
||||||
2000-2005 Wessel Dankers <wsl@tinc-vpn.org>
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License along
|
|
||||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
|
||||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
|
|
||||||
Original AVL tree library by Michael H. Buselli <cosine@cosine.org>.
|
|
||||||
|
|
||||||
Modified 2000-11-28 by Wessel Dankers <wsl@tinc-vpn.org> to use counts
|
|
||||||
instead of depths, to add the ->next and ->prev and to generally obfuscate
|
|
||||||
the code. Mail me if you found a bug.
|
|
||||||
|
|
||||||
Cleaned up and incorporated some of the ideas from the red-black tree
|
|
||||||
library for inclusion into tinc (https://www.tinc-vpn.org/) by
|
|
||||||
Guus Sliepen <guus@tinc-vpn.org>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "system.h"
|
|
||||||
|
|
||||||
#include "avl_tree.h"
|
|
||||||
#include "xalloc.h"
|
|
||||||
|
|
||||||
#ifdef AVL_COUNT
|
|
||||||
#define AVL_NODE_COUNT(n) ((n) ? (n)->count : 0)
|
|
||||||
#define AVL_L_COUNT(n) (AVL_NODE_COUNT((n)->left))
|
|
||||||
#define AVL_R_COUNT(n) (AVL_NODE_COUNT((n)->right))
|
|
||||||
#define AVL_CALC_COUNT(n) (AVL_L_COUNT(n) + AVL_R_COUNT(n) + 1)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef AVL_DEPTH
|
|
||||||
#define AVL_NODE_DEPTH(n) ((n) ? (n)->depth : 0)
|
|
||||||
#define L_AVL_DEPTH(n) (AVL_NODE_DEPTH((n)->left))
|
|
||||||
#define R_AVL_DEPTH(n) (AVL_NODE_DEPTH((n)->right))
|
|
||||||
#define AVL_CALC_DEPTH(n) ((L_AVL_DEPTH(n)>R_AVL_DEPTH(n)?L_AVL_DEPTH(n):R_AVL_DEPTH(n)) + 1)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef AVL_DEPTH
|
|
||||||
static int lg(unsigned int u) __attribute__((__const__));
|
|
||||||
|
|
||||||
static int lg(unsigned int u) {
|
|
||||||
int r = 1;
|
|
||||||
|
|
||||||
if(!u) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(u & 0xffff0000) {
|
|
||||||
u >>= 16;
|
|
||||||
r += 16;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(u & 0x0000ff00) {
|
|
||||||
u >>= 8;
|
|
||||||
r += 8;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(u & 0x000000f0) {
|
|
||||||
u >>= 4;
|
|
||||||
r += 4;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(u & 0x0000000c) {
|
|
||||||
u >>= 2;
|
|
||||||
r += 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(u & 0x00000002) {
|
|
||||||
r++;
|
|
||||||
}
|
|
||||||
|
|
||||||
return r;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Internal helper functions */
|
|
||||||
|
|
||||||
static int avl_check_balance(const avl_node_t *node) {
|
|
||||||
#ifdef AVL_DEPTH
|
|
||||||
int d;
|
|
||||||
|
|
||||||
d = R_AVL_DEPTH(node) - L_AVL_DEPTH(node);
|
|
||||||
|
|
||||||
return d < -1 ? -1 : d > 1 ? 1 : 0;
|
|
||||||
#else
|
|
||||||
/* int d;
|
|
||||||
* d = lg(AVL_R_COUNT(node)) - lg(AVL_L_COUNT(node));
|
|
||||||
* d = d<-1?-1:d>1?1:0;
|
|
||||||
*/
|
|
||||||
int pl, r;
|
|
||||||
|
|
||||||
pl = lg(AVL_L_COUNT(node));
|
|
||||||
r = AVL_R_COUNT(node);
|
|
||||||
|
|
||||||
if(r >> pl + 1) {
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(pl < 2 || r >> pl - 2) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
return -1;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
static void avl_rebalance(avl_tree_t *tree, avl_node_t *node) {
|
|
||||||
avl_node_t *child;
|
|
||||||
avl_node_t *gchild;
|
|
||||||
avl_node_t *parent;
|
|
||||||
avl_node_t **superparent;
|
|
||||||
|
|
||||||
while(node) {
|
|
||||||
parent = node->parent;
|
|
||||||
|
|
||||||
superparent =
|
|
||||||
parent ? node ==
|
|
||||||
parent->left ? &parent->left : &parent->right : &tree->root;
|
|
||||||
|
|
||||||
switch(avl_check_balance(node)) {
|
|
||||||
case -1:
|
|
||||||
child = node->left;
|
|
||||||
#ifdef AVL_DEPTH
|
|
||||||
|
|
||||||
if(L_AVL_DEPTH(child) >= R_AVL_DEPTH(child)) {
|
|
||||||
#else
|
|
||||||
|
|
||||||
if(AVL_L_COUNT(child) >= AVL_R_COUNT(child)) {
|
|
||||||
#endif
|
|
||||||
node->left = child->right;
|
|
||||||
|
|
||||||
if(node->left) {
|
|
||||||
node->left->parent = node;
|
|
||||||
}
|
|
||||||
|
|
||||||
child->right = node;
|
|
||||||
node->parent = child;
|
|
||||||
*superparent = child;
|
|
||||||
child->parent = parent;
|
|
||||||
#ifdef AVL_COUNT
|
|
||||||
node->count = AVL_CALC_COUNT(node);
|
|
||||||
child->count = AVL_CALC_COUNT(child);
|
|
||||||
#endif
|
|
||||||
#ifdef AVL_DEPTH
|
|
||||||
node->depth = AVL_CALC_DEPTH(node);
|
|
||||||
child->depth = AVL_CALC_DEPTH(child);
|
|
||||||
#endif
|
|
||||||
} else {
|
|
||||||
gchild = child->right;
|
|
||||||
node->left = gchild->right;
|
|
||||||
|
|
||||||
if(node->left) {
|
|
||||||
node->left->parent = node;
|
|
||||||
}
|
|
||||||
|
|
||||||
child->right = gchild->left;
|
|
||||||
|
|
||||||
if(child->right) {
|
|
||||||
child->right->parent = child;
|
|
||||||
}
|
|
||||||
|
|
||||||
gchild->right = node;
|
|
||||||
|
|
||||||
gchild->right->parent = gchild;
|
|
||||||
gchild->left = child;
|
|
||||||
|
|
||||||
gchild->left->parent = gchild;
|
|
||||||
|
|
||||||
*superparent = gchild;
|
|
||||||
gchild->parent = parent;
|
|
||||||
#ifdef AVL_COUNT
|
|
||||||
node->count = AVL_CALC_COUNT(node);
|
|
||||||
child->count = AVL_CALC_COUNT(child);
|
|
||||||
gchild->count = AVL_CALC_COUNT(gchild);
|
|
||||||
#endif
|
|
||||||
#ifdef AVL_DEPTH
|
|
||||||
node->depth = AVL_CALC_DEPTH(node);
|
|
||||||
child->depth = AVL_CALC_DEPTH(child);
|
|
||||||
gchild->depth = AVL_CALC_DEPTH(gchild);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 1:
|
|
||||||
child = node->right;
|
|
||||||
#ifdef AVL_DEPTH
|
|
||||||
|
|
||||||
if(R_AVL_DEPTH(child) >= L_AVL_DEPTH(child)) {
|
|
||||||
#else
|
|
||||||
|
|
||||||
if(AVL_R_COUNT(child) >= AVL_L_COUNT(child)) {
|
|
||||||
#endif
|
|
||||||
node->right = child->left;
|
|
||||||
|
|
||||||
if(node->right) {
|
|
||||||
node->right->parent = node;
|
|
||||||
}
|
|
||||||
|
|
||||||
child->left = node;
|
|
||||||
node->parent = child;
|
|
||||||
*superparent = child;
|
|
||||||
child->parent = parent;
|
|
||||||
#ifdef AVL_COUNT
|
|
||||||
node->count = AVL_CALC_COUNT(node);
|
|
||||||
child->count = AVL_CALC_COUNT(child);
|
|
||||||
#endif
|
|
||||||
#ifdef AVL_DEPTH
|
|
||||||
node->depth = AVL_CALC_DEPTH(node);
|
|
||||||
child->depth = AVL_CALC_DEPTH(child);
|
|
||||||
#endif
|
|
||||||
} else {
|
|
||||||
gchild = child->left;
|
|
||||||
node->right = gchild->left;
|
|
||||||
|
|
||||||
if(node->right) {
|
|
||||||
node->right->parent = node;
|
|
||||||
}
|
|
||||||
|
|
||||||
child->left = gchild->right;
|
|
||||||
|
|
||||||
if(child->left) {
|
|
||||||
child->left->parent = child;
|
|
||||||
}
|
|
||||||
|
|
||||||
gchild->left = node;
|
|
||||||
|
|
||||||
gchild->left->parent = gchild;
|
|
||||||
gchild->right = child;
|
|
||||||
|
|
||||||
gchild->right->parent = gchild;
|
|
||||||
|
|
||||||
*superparent = gchild;
|
|
||||||
gchild->parent = parent;
|
|
||||||
#ifdef AVL_COUNT
|
|
||||||
node->count = AVL_CALC_COUNT(node);
|
|
||||||
child->count = AVL_CALC_COUNT(child);
|
|
||||||
gchild->count = AVL_CALC_COUNT(gchild);
|
|
||||||
#endif
|
|
||||||
#ifdef AVL_DEPTH
|
|
||||||
node->depth = AVL_CALC_DEPTH(node);
|
|
||||||
child->depth = AVL_CALC_DEPTH(child);
|
|
||||||
gchild->depth = AVL_CALC_DEPTH(gchild);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
#ifdef AVL_COUNT
|
|
||||||
node->count = AVL_CALC_COUNT(node);
|
|
||||||
#endif
|
|
||||||
#ifdef AVL_DEPTH
|
|
||||||
node->depth = AVL_CALC_DEPTH(node);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
node = parent;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* (De)constructors */
|
|
||||||
|
|
||||||
avl_tree_t *avl_alloc_tree(avl_compare_t compare, avl_action_t delete) {
|
|
||||||
avl_tree_t *tree;
|
|
||||||
|
|
||||||
tree = xmalloc_and_zero(sizeof(avl_tree_t));
|
|
||||||
tree->compare = compare;
|
|
||||||
tree->delete = delete;
|
|
||||||
|
|
||||||
return tree;
|
|
||||||
}
|
|
||||||
|
|
||||||
void avl_free_tree(avl_tree_t *tree) {
|
|
||||||
free(tree);
|
|
||||||
}
|
|
||||||
|
|
||||||
avl_node_t *avl_alloc_node(void) {
|
|
||||||
return xmalloc_and_zero(sizeof(avl_node_t));
|
|
||||||
}
|
|
||||||
|
|
||||||
void avl_free_node(avl_tree_t *tree, avl_node_t *node) {
|
|
||||||
if(node->data && tree->delete) {
|
|
||||||
tree->delete(node->data);
|
|
||||||
}
|
|
||||||
|
|
||||||
free(node);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Searching */
|
|
||||||
|
|
||||||
void *avl_search(const avl_tree_t *tree, const void *data) {
|
|
||||||
avl_node_t *node;
|
|
||||||
|
|
||||||
node = avl_search_node(tree, data);
|
|
||||||
|
|
||||||
return node ? node->data : NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
void *avl_search_closest(const avl_tree_t *tree, const void *data, int *result) {
|
|
||||||
avl_node_t *node;
|
|
||||||
|
|
||||||
node = avl_search_closest_node(tree, data, result);
|
|
||||||
|
|
||||||
return node ? node->data : NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
void *avl_search_closest_smaller(const avl_tree_t *tree, const void *data) {
|
|
||||||
avl_node_t *node;
|
|
||||||
|
|
||||||
node = avl_search_closest_smaller_node(tree, data);
|
|
||||||
|
|
||||||
return node ? node->data : NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
void *avl_search_closest_greater(const avl_tree_t *tree, const void *data) {
|
|
||||||
avl_node_t *node;
|
|
||||||
|
|
||||||
node = avl_search_closest_greater_node(tree, data);
|
|
||||||
|
|
||||||
return node ? node->data : NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
avl_node_t *avl_search_node(const avl_tree_t *tree, const void *data) {
|
|
||||||
avl_node_t *node;
|
|
||||||
int result;
|
|
||||||
|
|
||||||
node = avl_search_closest_node(tree, data, &result);
|
|
||||||
|
|
||||||
return result ? NULL : node;
|
|
||||||
}
|
|
||||||
|
|
||||||
avl_node_t *avl_search_closest_node(const avl_tree_t *tree, const void *data,
|
|
||||||
int *result) {
|
|
||||||
avl_node_t *node;
|
|
||||||
int c;
|
|
||||||
|
|
||||||
node = tree->root;
|
|
||||||
|
|
||||||
if(!node) {
|
|
||||||
if(result) {
|
|
||||||
*result = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
for(;;) {
|
|
||||||
c = tree->compare(data, node->data);
|
|
||||||
|
|
||||||
if(c < 0) {
|
|
||||||
if(node->left) {
|
|
||||||
node = node->left;
|
|
||||||
} else {
|
|
||||||
if(result) {
|
|
||||||
*result = -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
} else if(c > 0) {
|
|
||||||
if(node->right) {
|
|
||||||
node = node->right;
|
|
||||||
} else {
|
|
||||||
if(result) {
|
|
||||||
*result = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if(result) {
|
|
||||||
*result = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return node;
|
|
||||||
}
|
|
||||||
|
|
||||||
avl_node_t *avl_search_closest_smaller_node(const avl_tree_t *tree,
|
|
||||||
const void *data) {
|
|
||||||
avl_node_t *node;
|
|
||||||
int result;
|
|
||||||
|
|
||||||
node = avl_search_closest_node(tree, data, &result);
|
|
||||||
|
|
||||||
if(result < 0) {
|
|
||||||
node = node->prev;
|
|
||||||
}
|
|
||||||
|
|
||||||
return node;
|
|
||||||
}
|
|
||||||
|
|
||||||
avl_node_t *avl_search_closest_greater_node(const avl_tree_t *tree,
|
|
||||||
const void *data) {
|
|
||||||
avl_node_t *node;
|
|
||||||
int result;
|
|
||||||
|
|
||||||
node = avl_search_closest_node(tree, data, &result);
|
|
||||||
|
|
||||||
if(result > 0) {
|
|
||||||
node = node->next;
|
|
||||||
}
|
|
||||||
|
|
||||||
return node;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Insertion and deletion */
|
|
||||||
|
|
||||||
avl_node_t *avl_insert(avl_tree_t *tree, void *data) {
|
|
||||||
avl_node_t *closest, *new;
|
|
||||||
int result;
|
|
||||||
|
|
||||||
if(!tree->root) {
|
|
||||||
new = avl_alloc_node();
|
|
||||||
new->data = data;
|
|
||||||
avl_insert_top(tree, new);
|
|
||||||
} else {
|
|
||||||
closest = avl_search_closest_node(tree, data, &result);
|
|
||||||
|
|
||||||
switch(result) {
|
|
||||||
case -1:
|
|
||||||
new = avl_alloc_node();
|
|
||||||
new->data = data;
|
|
||||||
avl_insert_before(tree, closest, new);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 1:
|
|
||||||
new = avl_alloc_node();
|
|
||||||
new->data = data;
|
|
||||||
avl_insert_after(tree, closest, new);
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef AVL_COUNT
|
|
||||||
new->count = 1;
|
|
||||||
#endif
|
|
||||||
#ifdef AVL_DEPTH
|
|
||||||
new->depth = 1;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return new;
|
|
||||||
}
|
|
||||||
|
|
||||||
avl_node_t *avl_insert_node(avl_tree_t *tree, avl_node_t *node) {
|
|
||||||
avl_node_t *closest;
|
|
||||||
int result;
|
|
||||||
|
|
||||||
if(!tree->root) {
|
|
||||||
avl_insert_top(tree, node);
|
|
||||||
} else {
|
|
||||||
closest = avl_search_closest_node(tree, node->data, &result);
|
|
||||||
|
|
||||||
switch(result) {
|
|
||||||
case -1:
|
|
||||||
avl_insert_before(tree, closest, node);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 1:
|
|
||||||
avl_insert_after(tree, closest, node);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 0:
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef AVL_COUNT
|
|
||||||
node->count = 1;
|
|
||||||
#endif
|
|
||||||
#ifdef AVL_DEPTH
|
|
||||||
node->depth = 1;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return node;
|
|
||||||
}
|
|
||||||
|
|
||||||
void avl_insert_top(avl_tree_t *tree, avl_node_t *node) {
|
|
||||||
node->prev = node->next = node->parent = NULL;
|
|
||||||
tree->head = tree->tail = tree->root = node;
|
|
||||||
}
|
|
||||||
|
|
||||||
void avl_insert_before(avl_tree_t *tree, avl_node_t *before,
|
|
||||||
avl_node_t *node) {
|
|
||||||
if(!before) {
|
|
||||||
if(tree->tail) {
|
|
||||||
avl_insert_after(tree, tree->tail, node);
|
|
||||||
} else {
|
|
||||||
avl_insert_top(tree, node);
|
|
||||||
}
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
node->next = before;
|
|
||||||
node->parent = before;
|
|
||||||
node->prev = before->prev;
|
|
||||||
|
|
||||||
if(before->left) {
|
|
||||||
avl_insert_after(tree, before->prev, node);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(before->prev) {
|
|
||||||
before->prev->next = node;
|
|
||||||
} else {
|
|
||||||
tree->head = node;
|
|
||||||
}
|
|
||||||
|
|
||||||
before->prev = node;
|
|
||||||
before->left = node;
|
|
||||||
|
|
||||||
avl_rebalance(tree, before);
|
|
||||||
}
|
|
||||||
|
|
||||||
void avl_insert_after(avl_tree_t *tree, avl_node_t *after, avl_node_t *node) {
|
|
||||||
if(!after) {
|
|
||||||
if(tree->head) {
|
|
||||||
avl_insert_before(tree, tree->head, node);
|
|
||||||
} else {
|
|
||||||
avl_insert_top(tree, node);
|
|
||||||
}
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(after->right) {
|
|
||||||
avl_insert_before(tree, after->next, node);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
node->prev = after;
|
|
||||||
node->parent = after;
|
|
||||||
node->next = after->next;
|
|
||||||
|
|
||||||
if(after->next) {
|
|
||||||
after->next->prev = node;
|
|
||||||
} else {
|
|
||||||
tree->tail = node;
|
|
||||||
}
|
|
||||||
|
|
||||||
after->next = node;
|
|
||||||
after->right = node;
|
|
||||||
|
|
||||||
avl_rebalance(tree, after);
|
|
||||||
}
|
|
||||||
|
|
||||||
avl_node_t *avl_unlink(avl_tree_t *tree, void *data) {
|
|
||||||
avl_node_t *node;
|
|
||||||
|
|
||||||
node = avl_search_node(tree, data);
|
|
||||||
|
|
||||||
if(node) {
|
|
||||||
avl_unlink_node(tree, node);
|
|
||||||
}
|
|
||||||
|
|
||||||
return node;
|
|
||||||
}
|
|
||||||
|
|
||||||
void avl_unlink_node(avl_tree_t *tree, avl_node_t *node) {
|
|
||||||
avl_node_t *parent;
|
|
||||||
avl_node_t **superparent;
|
|
||||||
avl_node_t *subst, *left, *right;
|
|
||||||
avl_node_t *balnode;
|
|
||||||
|
|
||||||
if(node->prev) {
|
|
||||||
node->prev->next = node->next;
|
|
||||||
} else {
|
|
||||||
tree->head = node->next;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(node->next) {
|
|
||||||
node->next->prev = node->prev;
|
|
||||||
} else {
|
|
||||||
tree->tail = node->prev;
|
|
||||||
}
|
|
||||||
|
|
||||||
parent = node->parent;
|
|
||||||
|
|
||||||
superparent =
|
|
||||||
parent ? node ==
|
|
||||||
parent->left ? &parent->left : &parent->right : &tree->root;
|
|
||||||
|
|
||||||
left = node->left;
|
|
||||||
right = node->right;
|
|
||||||
|
|
||||||
if(!left) {
|
|
||||||
*superparent = right;
|
|
||||||
|
|
||||||
if(right) {
|
|
||||||
right->parent = parent;
|
|
||||||
}
|
|
||||||
|
|
||||||
balnode = parent;
|
|
||||||
} else if(!right) {
|
|
||||||
*superparent = left;
|
|
||||||
left->parent = parent;
|
|
||||||
balnode = parent;
|
|
||||||
} else {
|
|
||||||
subst = node->prev;
|
|
||||||
|
|
||||||
if(!subst) { // This only happens if node is not actually in a tree at all.
|
|
||||||
abort();
|
|
||||||
}
|
|
||||||
|
|
||||||
if(subst == left) {
|
|
||||||
balnode = subst;
|
|
||||||
} else {
|
|
||||||
balnode = subst->parent;
|
|
||||||
balnode->right = subst->left;
|
|
||||||
|
|
||||||
if(balnode->right) {
|
|
||||||
balnode->right->parent = balnode;
|
|
||||||
}
|
|
||||||
|
|
||||||
subst->left = left;
|
|
||||||
left->parent = subst;
|
|
||||||
}
|
|
||||||
|
|
||||||
subst->right = right;
|
|
||||||
subst->parent = parent;
|
|
||||||
right->parent = subst;
|
|
||||||
*superparent = subst;
|
|
||||||
}
|
|
||||||
|
|
||||||
avl_rebalance(tree, balnode);
|
|
||||||
|
|
||||||
node->next = node->prev = node->parent = node->left = node->right = NULL;
|
|
||||||
|
|
||||||
#ifdef AVL_COUNT
|
|
||||||
node->count = 0;
|
|
||||||
#endif
|
|
||||||
#ifdef AVL_DEPTH
|
|
||||||
node->depth = 0;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
void avl_delete_node(avl_tree_t *tree, avl_node_t *node) {
|
|
||||||
avl_unlink_node(tree, node);
|
|
||||||
avl_free_node(tree, node);
|
|
||||||
}
|
|
||||||
|
|
||||||
void avl_delete(avl_tree_t *tree, void *data) {
|
|
||||||
avl_node_t *node;
|
|
||||||
|
|
||||||
node = avl_search_node(tree, data);
|
|
||||||
|
|
||||||
if(node) {
|
|
||||||
avl_delete_node(tree, node);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Fast tree cleanup */
|
|
||||||
|
|
||||||
void avl_delete_tree(avl_tree_t *tree) {
|
|
||||||
avl_node_t *node, *next;
|
|
||||||
|
|
||||||
for(node = tree->head; node; node = next) {
|
|
||||||
next = node->next;
|
|
||||||
avl_free_node(tree, node);
|
|
||||||
}
|
|
||||||
|
|
||||||
avl_free_tree(tree);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Tree walking */
|
|
||||||
|
|
||||||
void avl_foreach(const avl_tree_t *tree, avl_action_t action) {
|
|
||||||
avl_node_t *node, *next;
|
|
||||||
|
|
||||||
for(node = tree->head; node; node = next) {
|
|
||||||
next = node->next;
|
|
||||||
action(node->data);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void avl_foreach_node(const avl_tree_t *tree, avl_action_t action) {
|
|
||||||
avl_node_t *node, *next;
|
|
||||||
|
|
||||||
for(node = tree->head; node; node = next) {
|
|
||||||
next = node->next;
|
|
||||||
action(node);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Indexing */
|
|
||||||
|
|
||||||
#ifdef AVL_COUNT
|
|
||||||
unsigned int avl_count(const avl_tree_t *tree) {
|
|
||||||
return AVL_NODE_COUNT(tree->root);
|
|
||||||
}
|
|
||||||
|
|
||||||
avl_node_t *avl_get_node(const avl_tree_t *tree, unsigned int index) {
|
|
||||||
avl_node_t *node;
|
|
||||||
unsigned int c;
|
|
||||||
|
|
||||||
node = tree->root;
|
|
||||||
|
|
||||||
while(node) {
|
|
||||||
c = AVL_L_COUNT(node);
|
|
||||||
|
|
||||||
if(index < c) {
|
|
||||||
node = node->left;
|
|
||||||
} else if(index > c) {
|
|
||||||
node = node->right;
|
|
||||||
index -= c + 1;
|
|
||||||
} else {
|
|
||||||
return node;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
unsigned int avl_index(const avl_node_t *node) {
|
|
||||||
avl_node_t *next;
|
|
||||||
unsigned int index;
|
|
||||||
|
|
||||||
index = AVL_L_COUNT(node);
|
|
||||||
|
|
||||||
while((next = node->parent)) {
|
|
||||||
if(node == next->right) {
|
|
||||||
index += AVL_L_COUNT(next) + 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
node = next;
|
|
||||||
}
|
|
||||||
|
|
||||||
return index;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
#ifdef AVL_DEPTH
|
|
||||||
unsigned int avl_depth(const avl_tree_t *tree) {
|
|
||||||
return AVL_NODE_DEPTH(tree->root);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
142
src/avl_tree.h
142
src/avl_tree.h
|
|
@ -1,142 +0,0 @@
|
||||||
#ifndef TINC_AVL_TREE_H
|
|
||||||
#define TINC_AVL_TREE_H
|
|
||||||
|
|
||||||
/*
|
|
||||||
avl_tree.h -- header file for avl_tree.c
|
|
||||||
Copyright (C) 1998 Michael H. Buselli
|
|
||||||
2000-2005 Ivo Timmermans,
|
|
||||||
2000-2006 Guus Sliepen <guus@tinc-vpn.org>
|
|
||||||
2000-2005 Wessel Dankers <wsl@tinc-vpn.org>
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License along
|
|
||||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
|
||||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
|
|
||||||
Original AVL tree library by Michael H. Buselli <cosine@cosine.org>.
|
|
||||||
|
|
||||||
Modified 2000-11-28 by Wessel Dankers <wsl@tinc-vpn.org> to use counts
|
|
||||||
instead of depths, to add the ->next and ->prev and to generally obfuscate
|
|
||||||
the code. Mail me if you found a bug.
|
|
||||||
|
|
||||||
Cleaned up and incorporated some of the ideas from the red-black tree
|
|
||||||
library for inclusion into tinc (https://www.tinc-vpn.org/) by
|
|
||||||
Guus Sliepen <guus@tinc-vpn.org>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef AVL_DEPTH
|
|
||||||
#ifndef AVL_COUNT
|
|
||||||
#define AVL_DEPTH
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
typedef struct avl_node_t {
|
|
||||||
|
|
||||||
/* Linked list part */
|
|
||||||
|
|
||||||
struct avl_node_t *next;
|
|
||||||
struct avl_node_t *prev;
|
|
||||||
|
|
||||||
/* Tree part */
|
|
||||||
|
|
||||||
struct avl_node_t *parent;
|
|
||||||
struct avl_node_t *left;
|
|
||||||
struct avl_node_t *right;
|
|
||||||
|
|
||||||
#ifdef AVL_COUNT
|
|
||||||
unsigned int count;
|
|
||||||
#endif
|
|
||||||
#ifdef AVL_DEPTH
|
|
||||||
unsigned char depth;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Payload */
|
|
||||||
|
|
||||||
void *data;
|
|
||||||
|
|
||||||
} avl_node_t;
|
|
||||||
|
|
||||||
typedef int (*avl_compare_t)(const void *data1, const void *data2);
|
|
||||||
typedef void (*avl_action_t)(const void *data);
|
|
||||||
typedef void (*avl_action_node_t)(const avl_node_t *node);
|
|
||||||
|
|
||||||
typedef struct avl_tree_t {
|
|
||||||
|
|
||||||
/* Linked list part */
|
|
||||||
|
|
||||||
avl_node_t *head;
|
|
||||||
avl_node_t *tail;
|
|
||||||
|
|
||||||
/* Tree part */
|
|
||||||
|
|
||||||
avl_node_t *root;
|
|
||||||
|
|
||||||
avl_compare_t compare;
|
|
||||||
avl_action_t delete;
|
|
||||||
|
|
||||||
} avl_tree_t;
|
|
||||||
|
|
||||||
/* (De)constructors */
|
|
||||||
|
|
||||||
extern avl_tree_t *avl_alloc_tree(avl_compare_t compare, avl_action_t delete);
|
|
||||||
extern void avl_free_tree(avl_tree_t *tree);
|
|
||||||
|
|
||||||
extern avl_node_t *avl_alloc_node(void);
|
|
||||||
extern void avl_free_node(avl_tree_t *tree, avl_node_t *node);
|
|
||||||
|
|
||||||
/* Insertion and deletion */
|
|
||||||
|
|
||||||
extern avl_node_t *avl_insert(avl_tree_t *tree, void *data);
|
|
||||||
extern avl_node_t *avl_insert_node(avl_tree_t *tree, avl_node_t *node);
|
|
||||||
|
|
||||||
extern void avl_insert_top(avl_tree_t *tree, avl_node_t *node);
|
|
||||||
extern void avl_insert_before(avl_tree_t *tree, avl_node_t *before, avl_node_t *node);
|
|
||||||
extern void avl_insert_after(avl_tree_t *tree, avl_node_t *after, avl_node_t *node);
|
|
||||||
|
|
||||||
extern avl_node_t *avl_unlink(avl_tree_t *tree, void *data);
|
|
||||||
extern void avl_unlink_node(avl_tree_t *tree, avl_node_t *node);
|
|
||||||
extern void avl_delete(avl_tree_t *tree, void *data);
|
|
||||||
extern void avl_delete_node(avl_tree_t *tree, avl_node_t *node);
|
|
||||||
|
|
||||||
/* Fast tree cleanup */
|
|
||||||
|
|
||||||
extern void avl_delete_tree(avl_tree_t *tree);
|
|
||||||
|
|
||||||
/* Searching */
|
|
||||||
|
|
||||||
extern void *avl_search(const avl_tree_t *tree, const void *data);
|
|
||||||
extern void *avl_search_closest(const avl_tree_t *tree, const void *data, int *result);
|
|
||||||
extern void *avl_search_closest_smaller(const avl_tree_t *tree, const void *data);
|
|
||||||
extern void *avl_search_closest_greater(const avl_tree_t *tree, const void *data);
|
|
||||||
|
|
||||||
extern avl_node_t *avl_search_node(const avl_tree_t *tree, const void *data);
|
|
||||||
extern avl_node_t *avl_search_closest_node(const avl_tree_t *tree, const void *data, int *result);
|
|
||||||
extern avl_node_t *avl_search_closest_smaller_node(const avl_tree_t *tree, const void *data);
|
|
||||||
extern avl_node_t *avl_search_closest_greater_node(const avl_tree_t *tree, const void *data);
|
|
||||||
|
|
||||||
/* Tree walking */
|
|
||||||
|
|
||||||
extern void avl_foreach(const avl_tree_t *tree, avl_action_t action);
|
|
||||||
extern void avl_foreach_node(const avl_tree_t *tree, avl_action_t action);
|
|
||||||
|
|
||||||
/* Indexing */
|
|
||||||
|
|
||||||
#ifdef AVL_COUNT
|
|
||||||
extern unsigned int avl_count(const avl_tree_t *tree);
|
|
||||||
extern avl_node_t *avl_get_node(const avl_tree_t *tree, unsigned int index);
|
|
||||||
extern unsigned int avl_index(const avl_node_t *node);
|
|
||||||
#endif
|
|
||||||
#ifdef AVL_DEPTH
|
|
||||||
extern unsigned int avl_depth(const avl_tree_t *tree);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
||||||
1
src/bsd/.deps/device.Po
Normal file
1
src/bsd/.deps/device.Po
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
# dummy
|
||||||
1
src/bsd/.deps/tunemu.Po
Normal file
1
src/bsd/.deps/tunemu.Po
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
# dummy
|
||||||
528
src/bsd/device.c
528
src/bsd/device.c
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
device.c -- Interaction BSD tun/tap device
|
device.c -- Interaction BSD tun/tap device
|
||||||
Copyright (C) 2001-2005 Ivo Timmermans,
|
Copyright (C) 2001-2005 Ivo Timmermans,
|
||||||
2001-2016 Guus Sliepen <guus@tinc-vpn.org>
|
2001-2013 Guus Sliepen <guus@tinc-vpn.org>
|
||||||
2009 Grzegorz Dymarek <gregd72002@googlemail.com>
|
2009 Grzegorz Dymarek <gregd72002@googlemail.com>
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
|
@ -24,23 +24,22 @@
|
||||||
#include "../conf.h"
|
#include "../conf.h"
|
||||||
#include "../device.h"
|
#include "../device.h"
|
||||||
#include "../logger.h"
|
#include "../logger.h"
|
||||||
|
#include "../names.h"
|
||||||
#include "../net.h"
|
#include "../net.h"
|
||||||
#include "../route.h"
|
#include "../route.h"
|
||||||
#include "../utils.h"
|
#include "../utils.h"
|
||||||
#include "../xalloc.h"
|
#include "../xalloc.h"
|
||||||
|
|
||||||
#ifdef ENABLE_TUNEMU
|
#ifdef ENABLE_TUNEMU
|
||||||
#include "tunemu.h"
|
#include "bsd/tunemu.h"
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAVE_NET_IF_UTUN_H
|
|
||||||
#include <sys/sys_domain.h>
|
|
||||||
#include <sys/kern_control.h>
|
|
||||||
#include <net/if_utun.h>
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define DEFAULT_TUN_DEVICE "/dev/tun0"
|
#define DEFAULT_TUN_DEVICE "/dev/tun0"
|
||||||
|
#if defined(HAVE_FREEBSD) || defined(HAVE_NETBSD)
|
||||||
#define DEFAULT_TAP_DEVICE "/dev/tap0"
|
#define DEFAULT_TAP_DEVICE "/dev/tap0"
|
||||||
|
#else
|
||||||
|
#define DEFAULT_TAP_DEVICE "/dev/tun0"
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef enum device_type {
|
typedef enum device_type {
|
||||||
DEVICE_TYPE_TUN,
|
DEVICE_TYPE_TUN,
|
||||||
|
|
@ -49,13 +48,12 @@ typedef enum device_type {
|
||||||
#ifdef ENABLE_TUNEMU
|
#ifdef ENABLE_TUNEMU
|
||||||
DEVICE_TYPE_TUNEMU,
|
DEVICE_TYPE_TUNEMU,
|
||||||
#endif
|
#endif
|
||||||
DEVICE_TYPE_UTUN,
|
|
||||||
} device_type_t;
|
} device_type_t;
|
||||||
|
|
||||||
int device_fd = -1;
|
int device_fd = -1;
|
||||||
char *device = NULL;
|
char *device = NULL;
|
||||||
char *iface = NULL;
|
char *iface = NULL;
|
||||||
static const char *device_info = "OS X utun device";
|
static char *device_info = NULL;
|
||||||
static uint64_t device_total_in = 0;
|
static uint64_t device_total_in = 0;
|
||||||
static uint64_t device_total_out = 0;
|
static uint64_t device_total_out = 0;
|
||||||
#if defined(ENABLE_TUNEMU)
|
#if defined(ENABLE_TUNEMU)
|
||||||
|
|
@ -66,144 +64,55 @@ static device_type_t device_type = DEVICE_TYPE_TUNIFHEAD;
|
||||||
static device_type_t device_type = DEVICE_TYPE_TUN;
|
static device_type_t device_type = DEVICE_TYPE_TUN;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_NET_IF_UTUN_H
|
|
||||||
static bool setup_utun(void) {
|
|
||||||
device_fd = socket(PF_SYSTEM, SOCK_DGRAM, SYSPROTO_CONTROL);
|
|
||||||
|
|
||||||
if(device_fd == -1) {
|
|
||||||
logger(LOG_ERR, "Could not open PF_SYSTEM socket: %s\n", strerror(errno));
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
struct ctl_info info = {};
|
|
||||||
|
|
||||||
strlcpy(info.ctl_name, UTUN_CONTROL_NAME, sizeof(info.ctl_name));
|
|
||||||
|
|
||||||
if(ioctl(device_fd, CTLIOCGINFO, &info) == -1) {
|
|
||||||
logger(LOG_ERR, "ioctl(CTLIOCGINFO) failed: %s", strerror(errno));
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
int unit = -1;
|
|
||||||
char *p = strstr(device, "utun"), *e = NULL;
|
|
||||||
|
|
||||||
if(p) {
|
|
||||||
unit = strtol(p + 4, &e, 10);
|
|
||||||
|
|
||||||
if(!e) {
|
|
||||||
unit = -1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
struct sockaddr_ctl sc = {
|
|
||||||
.sc_id = info.ctl_id,
|
|
||||||
.sc_len = sizeof(sc),
|
|
||||||
.sc_family = AF_SYSTEM,
|
|
||||||
.ss_sysaddr = AF_SYS_CONTROL,
|
|
||||||
.sc_unit = unit + 1,
|
|
||||||
};
|
|
||||||
|
|
||||||
if(connect(device_fd, (struct sockaddr *)&sc, sizeof(sc)) == -1) {
|
|
||||||
logger(LOG_ERR, "Could not connect utun socket: %s\n", strerror(errno));
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
char name[64] = "";
|
|
||||||
socklen_t len = sizeof(name);
|
|
||||||
|
|
||||||
if(getsockopt(device_fd, SYSPROTO_CONTROL, UTUN_OPT_IFNAME, name, &len)) {
|
|
||||||
iface = xstrdup(device);
|
|
||||||
} else {
|
|
||||||
iface = xstrdup(name);
|
|
||||||
}
|
|
||||||
|
|
||||||
logger(LOG_INFO, "%s is a %s", device, device_info);
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static bool setup_device(void) {
|
static bool setup_device(void) {
|
||||||
// Find out which device file to open
|
char *type;
|
||||||
|
|
||||||
if(!get_config_string(lookup_config(config_tree, "Device"), &device)) {
|
if(!get_config_string(lookup_config(config_tree, "Device"), &device)) {
|
||||||
if(routing_mode == RMODE_ROUTER) {
|
if(routing_mode == RMODE_ROUTER)
|
||||||
device = xstrdup(DEFAULT_TUN_DEVICE);
|
device = xstrdup(DEFAULT_TUN_DEVICE);
|
||||||
} else {
|
else
|
||||||
device = xstrdup(DEFAULT_TAP_DEVICE);
|
device = xstrdup(DEFAULT_TAP_DEVICE);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Find out if it's supposed to be a tun or a tap device
|
if(!get_config_string(lookup_config(config_tree, "Interface"), &iface))
|
||||||
|
iface = xstrdup(strrchr(device, '/') ? strrchr(device, '/') + 1 : device);
|
||||||
char *type;
|
|
||||||
|
|
||||||
if(get_config_string(lookup_config(config_tree, "DeviceType"), &type)) {
|
if(get_config_string(lookup_config(config_tree, "DeviceType"), &type)) {
|
||||||
if(!strcasecmp(type, "tun"))
|
if(!strcasecmp(type, "tun"))
|
||||||
/* use default */;
|
/* use default */;
|
||||||
|
|
||||||
#ifdef ENABLE_TUNEMU
|
#ifdef ENABLE_TUNEMU
|
||||||
else if(!strcasecmp(type, "tunemu")) {
|
else if(!strcasecmp(type, "tunemu"))
|
||||||
device_type = DEVICE_TYPE_TUNEMU;
|
device_type = DEVICE_TYPE_TUNEMU;
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_NET_IF_UTUN_H
|
else if(!strcasecmp(type, "tunnohead"))
|
||||||
else if(!strcasecmp(type, "utun")) {
|
|
||||||
device_type = DEVICE_TYPE_UTUN;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
else if(!strcasecmp(type, "tunnohead")) {
|
|
||||||
device_type = DEVICE_TYPE_TUN;
|
device_type = DEVICE_TYPE_TUN;
|
||||||
} else if(!strcasecmp(type, "tunifhead")) {
|
else if(!strcasecmp(type, "tunifhead"))
|
||||||
device_type = DEVICE_TYPE_TUNIFHEAD;
|
device_type = DEVICE_TYPE_TUNIFHEAD;
|
||||||
} else if(!strcasecmp(type, "tap")) {
|
else if(!strcasecmp(type, "tap"))
|
||||||
device_type = DEVICE_TYPE_TAP;
|
device_type = DEVICE_TYPE_TAP;
|
||||||
} else {
|
else {
|
||||||
logger(LOG_ERR, "Unknown device type %s!", type);
|
logger(DEBUG_ALWAYS, LOG_ERR, "Unknown device type %s!", type);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
#ifdef HAVE_NET_IF_UTUN_H
|
if(strstr(device, "tap") || routing_mode != RMODE_ROUTER)
|
||||||
|
device_type = DEVICE_TYPE_TAP;
|
||||||
if(strncmp(device, "utun", 4) == 0 || strncmp(device, "/dev/utun", 9) == 0) {
|
|
||||||
device_type = DEVICE_TYPE_UTUN;
|
|
||||||
} else
|
|
||||||
#endif
|
|
||||||
if(strstr(device, "tap") || routing_mode != RMODE_ROUTER) {
|
|
||||||
device_type = DEVICE_TYPE_TAP;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(routing_mode == RMODE_SWITCH && device_type != DEVICE_TYPE_TAP) {
|
|
||||||
logger(LOG_ERR, "Only tap devices support switch mode!");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Open the device
|
|
||||||
|
|
||||||
switch(device_type) {
|
switch(device_type) {
|
||||||
#ifdef ENABLE_TUNEMU
|
#ifdef ENABLE_TUNEMU
|
||||||
|
case DEVICE_TYPE_TUNEMU: {
|
||||||
case DEVICE_TYPE_TUNEMU: {
|
char dynamic_name[256] = "";
|
||||||
char dynamic_name[256] = "";
|
device_fd = tunemu_open(dynamic_name);
|
||||||
device_fd = tunemu_open(dynamic_name);
|
}
|
||||||
}
|
break;
|
||||||
break;
|
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_NET_IF_UTUN_H
|
default:
|
||||||
|
device_fd = open(device, O_RDWR | O_NONBLOCK);
|
||||||
case DEVICE_TYPE_UTUN:
|
|
||||||
return setup_utun();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
default:
|
|
||||||
device_fd = open(device, O_RDWR | O_NONBLOCK);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(device_fd < 0) {
|
if(device_fd < 0) {
|
||||||
logger(LOG_ERR, "Could not open %s: %s", device, strerror(errno));
|
logger(DEBUG_ALWAYS, LOG_ERR, "Could not open %s: %s", device, strerror(errno));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -211,119 +120,71 @@ static bool setup_device(void) {
|
||||||
fcntl(device_fd, F_SETFD, FD_CLOEXEC);
|
fcntl(device_fd, F_SETFD, FD_CLOEXEC);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Guess what the corresponding interface is called
|
|
||||||
|
|
||||||
char *realname = NULL;
|
|
||||||
|
|
||||||
#if defined(HAVE_FDEVNAME)
|
|
||||||
realname = fdevname(device_fd);
|
|
||||||
#elif defined(HAVE_DEVNAME)
|
|
||||||
struct stat buf;
|
|
||||||
|
|
||||||
if(!fstat(device_fd, &buf)) {
|
|
||||||
realname = devname(buf.st_rdev, S_IFCHR);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if(!realname) {
|
|
||||||
realname = device;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!get_config_string(lookup_config(config_tree, "Interface"), &iface)) {
|
|
||||||
iface = xstrdup(strrchr(realname, '/') ? strrchr(realname, '/') + 1 : realname);
|
|
||||||
} else if(strcmp(iface, strrchr(realname, '/') ? strrchr(realname, '/') + 1 : realname)) {
|
|
||||||
logger(LOG_WARNING, "Warning: Interface does not match Device. $INTERFACE might be set incorrectly.");
|
|
||||||
}
|
|
||||||
|
|
||||||
// Configure the device as best as we can
|
|
||||||
|
|
||||||
switch(device_type) {
|
switch(device_type) {
|
||||||
default:
|
default:
|
||||||
device_type = DEVICE_TYPE_TUN;
|
device_type = DEVICE_TYPE_TUN;
|
||||||
|
case DEVICE_TYPE_TUN:
|
||||||
case DEVICE_TYPE_TUN:
|
|
||||||
#ifdef TUNSIFHEAD
|
#ifdef TUNSIFHEAD
|
||||||
{
|
{
|
||||||
const int zero = 0;
|
const int zero = 0;
|
||||||
|
if(ioctl(device_fd, TUNSIFHEAD, &zero, sizeof zero) == -1) {
|
||||||
if(ioctl(device_fd, TUNSIFHEAD, &zero, sizeof(zero)) == -1) {
|
logger(DEBUG_ALWAYS, LOG_ERR, "System call `%s' failed: %s", "ioctl", strerror(errno));
|
||||||
logger(LOG_ERR, "System call `%s' failed: %s", "ioctl", strerror(errno));
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
#if defined(TUNSIFMODE) && defined(IFF_BROADCAST) && defined(IFF_MULTICAST)
|
#if defined(TUNSIFMODE) && defined(IFF_BROADCAST) && defined(IFF_MULTICAST)
|
||||||
{
|
{
|
||||||
const int mode = IFF_BROADCAST | IFF_MULTICAST;
|
const int mode = IFF_BROADCAST | IFF_MULTICAST;
|
||||||
ioctl(device_fd, TUNSIFMODE, &mode, sizeof(mode));
|
ioctl(device_fd, TUNSIFMODE, &mode, sizeof mode);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
device_info = "Generic BSD tun device";
|
device_info = "Generic BSD tun device";
|
||||||
break;
|
break;
|
||||||
|
case DEVICE_TYPE_TUNIFHEAD:
|
||||||
case DEVICE_TYPE_TUNIFHEAD:
|
|
||||||
#ifdef TUNSIFHEAD
|
#ifdef TUNSIFHEAD
|
||||||
{
|
{
|
||||||
const int one = 1;
|
const int one = 1;
|
||||||
|
if(ioctl(device_fd, TUNSIFHEAD, &one, sizeof one) == -1) {
|
||||||
if(ioctl(device_fd, TUNSIFHEAD, &one, sizeof(one)) == -1) {
|
logger(DEBUG_ALWAYS, LOG_ERR, "System call `%s' failed: %s", "ioctl", strerror(errno));
|
||||||
logger(LOG_ERR, "System call `%s' failed: %s", "ioctl", strerror(errno));
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
#if defined(TUNSIFMODE) && defined(IFF_BROADCAST) && defined(IFF_MULTICAST)
|
#if defined(TUNSIFMODE) && defined(IFF_BROADCAST) && defined(IFF_MULTICAST)
|
||||||
{
|
{
|
||||||
const int mode = IFF_BROADCAST | IFF_MULTICAST;
|
const int mode = IFF_BROADCAST | IFF_MULTICAST;
|
||||||
ioctl(device_fd, TUNSIFMODE, &mode, sizeof(mode));
|
ioctl(device_fd, TUNSIFMODE, &mode, sizeof mode);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
device_info = "Generic BSD tun device";
|
device_info = "Generic BSD tun device";
|
||||||
break;
|
break;
|
||||||
|
case DEVICE_TYPE_TAP:
|
||||||
case DEVICE_TYPE_TAP:
|
if(routing_mode == RMODE_ROUTER)
|
||||||
if(routing_mode == RMODE_ROUTER) {
|
overwrite_mac = true;
|
||||||
overwrite_mac = true;
|
device_info = "Generic BSD tap device";
|
||||||
}
|
|
||||||
|
|
||||||
device_info = "Generic BSD tap device";
|
|
||||||
#ifdef TAPGIFNAME
|
#ifdef TAPGIFNAME
|
||||||
{
|
{
|
||||||
struct ifreq ifr;
|
struct ifreq ifr;
|
||||||
|
if(ioctl(device_fd, TAPGIFNAME, (void*)&ifr) == 0) {
|
||||||
if(ioctl(device_fd, TAPGIFNAME, (void *)&ifr) == 0) {
|
if(iface)
|
||||||
if(iface) {
|
free(iface);
|
||||||
free(iface);
|
iface = xstrdup(ifr.ifr_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
iface = xstrdup(ifr.ifr_name);
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
#ifdef ENABLE_TUNEMU
|
#ifdef ENABLE_TUNEMU
|
||||||
|
case DEVICE_TYPE_TUNEMU:
|
||||||
case DEVICE_TYPE_TUNEMU:
|
device_info = "BSD tunemu device";
|
||||||
device_info = "BSD tunemu device";
|
break;
|
||||||
break;
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef SIOCGIFADDR
|
logger(DEBUG_ALWAYS, LOG_INFO, "%s is a %s", device, device_info);
|
||||||
|
|
||||||
if(overwrite_mac) {
|
|
||||||
ioctl(device_fd, SIOCGIFADDR, mymac.x);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
logger(LOG_INFO, "%s is a %s", device, device_info);
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
@ -331,14 +192,12 @@ static bool setup_device(void) {
|
||||||
static void close_device(void) {
|
static void close_device(void) {
|
||||||
switch(device_type) {
|
switch(device_type) {
|
||||||
#ifdef ENABLE_TUNEMU
|
#ifdef ENABLE_TUNEMU
|
||||||
|
case DEVICE_TYPE_TUNEMU:
|
||||||
case DEVICE_TYPE_TUNEMU:
|
tunemu_close(device_fd);
|
||||||
tunemu_close(device_fd);
|
break;
|
||||||
break;
|
|
||||||
#endif
|
#endif
|
||||||
|
default:
|
||||||
default:
|
close(device_fd);
|
||||||
close(device_fd);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
free(device);
|
free(device);
|
||||||
|
|
@ -346,168 +205,161 @@ static void close_device(void) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool read_packet(vpn_packet_t *packet) {
|
static bool read_packet(vpn_packet_t *packet) {
|
||||||
int lenin;
|
int inlen;
|
||||||
|
|
||||||
switch(device_type) {
|
switch(device_type) {
|
||||||
case DEVICE_TYPE_TUN:
|
case DEVICE_TYPE_TUN:
|
||||||
#ifdef ENABLE_TUNEMU
|
#ifdef ENABLE_TUNEMU
|
||||||
case DEVICE_TYPE_TUNEMU:
|
case DEVICE_TYPE_TUNEMU:
|
||||||
if(device_type == DEVICE_TYPE_TUNEMU) {
|
if(device_type == DEVICE_TYPE_TUNEMU)
|
||||||
lenin = tunemu_read(device_fd, packet->data + 14, MTU - 14);
|
inlen = tunemu_read(device_fd, packet->data + 14, MTU - 14);
|
||||||
} else
|
else
|
||||||
#endif
|
#endif
|
||||||
lenin = read(device_fd, packet->data + 14, MTU - 14);
|
inlen = read(device_fd, packet->data + 14, MTU - 14);
|
||||||
|
|
||||||
if(lenin <= 0) {
|
if(inlen <= 0) {
|
||||||
logger(LOG_ERR, "Error while reading from %s %s: %s", device_info,
|
logger(DEBUG_ALWAYS, LOG_ERR, "Error while reading from %s %s: %s", device_info,
|
||||||
device, strerror(errno));
|
device, strerror(errno));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch(packet->data[14] >> 4) {
|
switch(packet->data[14] >> 4) {
|
||||||
case 4:
|
case 4:
|
||||||
packet->data[12] = 0x08;
|
packet->data[12] = 0x08;
|
||||||
packet->data[13] = 0x00;
|
packet->data[13] = 0x00;
|
||||||
|
break;
|
||||||
|
case 6:
|
||||||
|
packet->data[12] = 0x86;
|
||||||
|
packet->data[13] = 0xDD;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
logger(DEBUG_TRAFFIC, LOG_ERR,
|
||||||
|
"Unknown IP version %d while reading packet from %s %s",
|
||||||
|
packet->data[14] >> 4, device_info, device);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
memset(packet->data, 0, 12);
|
||||||
|
packet->len = inlen + 14;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 6:
|
case DEVICE_TYPE_TUNIFHEAD: {
|
||||||
packet->data[12] = 0x86;
|
u_int32_t type;
|
||||||
packet->data[13] = 0xDD;
|
struct iovec vector[2] = {{&type, sizeof type}, {packet->data + 14, MTU - 14}};
|
||||||
|
|
||||||
|
if((inlen = readv(device_fd, vector, 2)) <= 0) {
|
||||||
|
logger(DEBUG_ALWAYS, LOG_ERR, "Error while reading from %s %s: %s", device_info,
|
||||||
|
device, strerror(errno));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (ntohl(type)) {
|
||||||
|
case AF_INET:
|
||||||
|
packet->data[12] = 0x08;
|
||||||
|
packet->data[13] = 0x00;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case AF_INET6:
|
||||||
|
packet->data[12] = 0x86;
|
||||||
|
packet->data[13] = 0xDD;
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
logger(DEBUG_TRAFFIC, LOG_ERR,
|
||||||
|
"Unknown address family %x while reading packet from %s %s",
|
||||||
|
ntohl(type), device_info, device);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
memset(packet->data, 0, 12);
|
||||||
|
packet->len = inlen + 10;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case DEVICE_TYPE_TAP:
|
||||||
|
if((inlen = read(device_fd, packet->data, MTU)) <= 0) {
|
||||||
|
logger(DEBUG_ALWAYS, LOG_ERR, "Error while reading from %s %s: %s", device_info,
|
||||||
|
device, strerror(errno));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
packet->len = inlen;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
ifdebug(TRAFFIC) logger(LOG_ERR,
|
|
||||||
"Unknown IP version %d while reading packet from %s %s",
|
|
||||||
packet->data[14] >> 4, device_info, device);
|
|
||||||
return false;
|
return false;
|
||||||
}
|
|
||||||
|
|
||||||
memset(packet->data, 0, 12);
|
|
||||||
packet->len = lenin + 14;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case DEVICE_TYPE_UTUN:
|
|
||||||
case DEVICE_TYPE_TUNIFHEAD: {
|
|
||||||
if((lenin = read(device_fd, packet->data + 10, MTU - 10)) <= 0) {
|
|
||||||
logger(LOG_ERR, "Error while reading from %s %s: %s", device_info,
|
|
||||||
device, strerror(errno));
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch(packet->data[14] >> 4) {
|
|
||||||
case 4:
|
|
||||||
packet->data[12] = 0x08;
|
|
||||||
packet->data[13] = 0x00;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 6:
|
|
||||||
packet->data[12] = 0x86;
|
|
||||||
packet->data[13] = 0xDD;
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
ifdebug(TRAFFIC) logger(LOG_ERR,
|
|
||||||
"Unknown IP version %d while reading packet from %s %s",
|
|
||||||
packet->data[14] >> 4, device_info, device);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
memset(packet->data, 0, 12);
|
|
||||||
packet->len = lenin + 10;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
case DEVICE_TYPE_TAP:
|
|
||||||
if((lenin = read(device_fd, packet->data, MTU)) <= 0) {
|
|
||||||
logger(LOG_ERR, "Error while reading from %s %s: %s", device_info,
|
|
||||||
device, strerror(errno));
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
packet->len = lenin;
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
device_total_in += packet->len;
|
device_total_in += packet->len;
|
||||||
|
|
||||||
ifdebug(TRAFFIC) logger(LOG_DEBUG, "Read packet of %d bytes from %s",
|
logger(DEBUG_TRAFFIC, LOG_DEBUG, "Read packet of %d bytes from %s",
|
||||||
packet->len, device_info);
|
packet->len, device_info);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool write_packet(vpn_packet_t *packet) {
|
static bool write_packet(vpn_packet_t *packet) {
|
||||||
ifdebug(TRAFFIC) logger(LOG_DEBUG, "Writing packet of %d bytes to %s",
|
logger(DEBUG_TRAFFIC, LOG_DEBUG, "Writing packet of %d bytes to %s",
|
||||||
packet->len, device_info);
|
packet->len, device_info);
|
||||||
|
|
||||||
switch(device_type) {
|
switch(device_type) {
|
||||||
case DEVICE_TYPE_TUN:
|
case DEVICE_TYPE_TUN:
|
||||||
if(write(device_fd, packet->data + 14, packet->len - 14) < 0) {
|
if(write(device_fd, packet->data + 14, packet->len - 14) < 0) {
|
||||||
logger(LOG_ERR, "Error while writing to %s %s: %s", device_info,
|
logger(DEBUG_ALWAYS, LOG_ERR, "Error while writing to %s %s: %s", device_info,
|
||||||
device, strerror(errno));
|
device, strerror(errno));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
|
||||||
|
|
||||||
case DEVICE_TYPE_UTUN:
|
|
||||||
case DEVICE_TYPE_TUNIFHEAD: {
|
|
||||||
int af = (packet->data[12] << 8) + packet->data[13];
|
|
||||||
uint32_t type;
|
|
||||||
|
|
||||||
switch(af) {
|
|
||||||
case 0x0800:
|
|
||||||
type = htonl(AF_INET);
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x86DD:
|
case DEVICE_TYPE_TUNIFHEAD: {
|
||||||
type = htonl(AF_INET6);
|
u_int32_t type;
|
||||||
|
struct iovec vector[2] = {{&type, sizeof type}, {packet->data + 14, packet->len - 14}};
|
||||||
|
int af;
|
||||||
|
|
||||||
|
af = (packet->data[12] << 8) + packet->data[13];
|
||||||
|
|
||||||
|
switch (af) {
|
||||||
|
case 0x0800:
|
||||||
|
type = htonl(AF_INET);
|
||||||
|
break;
|
||||||
|
case 0x86DD:
|
||||||
|
type = htonl(AF_INET6);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
logger(DEBUG_TRAFFIC, LOG_ERR,
|
||||||
|
"Unknown address family %x while writing packet to %s %s",
|
||||||
|
af, device_info, device);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(writev(device_fd, vector, 2) < 0) {
|
||||||
|
logger(DEBUG_ALWAYS, LOG_ERR, "Can't write to %s %s: %s", device_info, device,
|
||||||
|
strerror(errno));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
|
||||||
ifdebug(TRAFFIC) logger(LOG_ERR,
|
|
||||||
"Unknown address family %x while writing packet to %s %s",
|
|
||||||
af, device_info, device);
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
memcpy(packet->data + 10, &type, sizeof(type));
|
case DEVICE_TYPE_TAP:
|
||||||
|
if(write(device_fd, packet->data, packet->len) < 0) {
|
||||||
if(write(device_fd, packet->data + 10, packet->len - 10) < 0) {
|
logger(DEBUG_ALWAYS, LOG_ERR, "Error while writing to %s %s: %s", device_info,
|
||||||
logger(LOG_ERR, "Can't write to %s %s: %s", device_info, device,
|
device, strerror(errno));
|
||||||
strerror(errno));
|
return false;
|
||||||
return false;
|
}
|
||||||
}
|
break;
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
case DEVICE_TYPE_TAP:
|
|
||||||
if(write(device_fd, packet->data, packet->len) < 0) {
|
|
||||||
logger(LOG_ERR, "Error while writing to %s %s: %s", device_info,
|
|
||||||
device, strerror(errno));
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
|
|
||||||
#ifdef ENABLE_TUNEMU
|
#ifdef ENABLE_TUNEMU
|
||||||
|
case DEVICE_TYPE_TUNEMU:
|
||||||
case DEVICE_TYPE_TUNEMU:
|
if(tunemu_write(device_fd, packet->data + 14, packet->len - 14) < 0) {
|
||||||
if(tunemu_write(device_fd, packet->data + 14, packet->len - 14) < 0) {
|
logger(DEBUG_ALWAYS, LOG_ERR, "Error while writing to %s %s: %s", device_info,
|
||||||
logger(LOG_ERR, "Error while writing to %s %s: %s", device_info,
|
device, strerror(errno));
|
||||||
device, strerror(errno));
|
return false;
|
||||||
return false;
|
}
|
||||||
}
|
break;
|
||||||
|
|
||||||
break;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
device_total_out += packet->len;
|
device_total_out += packet->len;
|
||||||
|
|
@ -516,9 +368,9 @@ static bool write_packet(vpn_packet_t *packet) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static void dump_device_stats(void) {
|
static void dump_device_stats(void) {
|
||||||
logger(LOG_DEBUG, "Statistics for %s %s:", device_info, device);
|
logger(DEBUG_ALWAYS, LOG_DEBUG, "Statistics for %s %s:", device_info, device);
|
||||||
logger(LOG_DEBUG, " total bytes in: %10"PRIu64, device_total_in);
|
logger(DEBUG_ALWAYS, LOG_DEBUG, " total bytes in: %10"PRIu64, device_total_in);
|
||||||
logger(LOG_DEBUG, " total bytes out: %10"PRIu64, device_total_out);
|
logger(DEBUG_ALWAYS, LOG_DEBUG, " total bytes out: %10"PRIu64, device_total_out);
|
||||||
}
|
}
|
||||||
|
|
||||||
const devops_t os_devops = {
|
const devops_t os_devops = {
|
||||||
|
|
|
||||||
211
src/bsd/tunemu.c
211
src/bsd/tunemu.c
|
|
@ -45,25 +45,28 @@
|
||||||
#define PPPIOCSFLAGS _IOW('t', 89, int)
|
#define PPPIOCSFLAGS _IOW('t', 89, int)
|
||||||
#define PPPIOCSNPMODE _IOW('t', 75, struct npioctl)
|
#define PPPIOCSNPMODE _IOW('t', 75, struct npioctl)
|
||||||
#define PPPIOCATTCHAN _IOW('t', 56, int)
|
#define PPPIOCATTCHAN _IOW('t', 56, int)
|
||||||
#define PPPIOCGCHAN _IOR('t', 55, int)
|
#define PPPIOCGCHAN _IOR('t', 55, int)
|
||||||
#define PPPIOCCONNECT _IOW('t', 58, int)
|
#define PPPIOCCONNECT _IOW('t', 58, int)
|
||||||
#define PPPIOCGUNIT _IOR('t', 86, int)
|
#define PPPIOCGUNIT _IOR('t', 86, int)
|
||||||
|
|
||||||
struct sockaddr_ppp {
|
struct sockaddr_ppp
|
||||||
|
{
|
||||||
u_int8_t ppp_len;
|
u_int8_t ppp_len;
|
||||||
u_int8_t ppp_family;
|
u_int8_t ppp_family;
|
||||||
u_int16_t ppp_proto;
|
u_int16_t ppp_proto;
|
||||||
u_int32_t ppp_cookie;
|
u_int32_t ppp_cookie;
|
||||||
};
|
};
|
||||||
|
|
||||||
enum NPmode {
|
enum NPmode
|
||||||
|
{
|
||||||
NPMODE_PASS,
|
NPMODE_PASS,
|
||||||
NPMODE_DROP,
|
NPMODE_DROP,
|
||||||
NPMODE_ERROR,
|
NPMODE_ERROR,
|
||||||
NPMODE_QUEUE
|
NPMODE_QUEUE
|
||||||
};
|
};
|
||||||
|
|
||||||
struct npioctl {
|
struct npioctl
|
||||||
|
{
|
||||||
int protocol;
|
int protocol;
|
||||||
enum NPmode mode;
|
enum NPmode mode;
|
||||||
};
|
};
|
||||||
|
|
@ -80,55 +83,58 @@ static pcap_t *pcap = NULL;
|
||||||
static int data_buffer_length = 0;
|
static int data_buffer_length = 0;
|
||||||
static char *data_buffer = NULL;
|
static char *data_buffer = NULL;
|
||||||
|
|
||||||
static void tun_error(char *format, ...) {
|
static void tun_error(char *format, ...)
|
||||||
|
{
|
||||||
va_list vl;
|
va_list vl;
|
||||||
va_start(vl, format);
|
va_start(vl, format);
|
||||||
vsnprintf(tunemu_error, ERROR_BUFFER_SIZE, format, vl);
|
vsnprintf(tunemu_error, ERROR_BUFFER_SIZE, format, vl);
|
||||||
va_end(vl);
|
va_end(vl);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void tun_noerror() {
|
static void tun_noerror()
|
||||||
|
{
|
||||||
*tunemu_error = 0;
|
*tunemu_error = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void closeall() {
|
static void closeall()
|
||||||
int fd = getdtablesize();
|
{
|
||||||
|
int fd = getdtablesize();
|
||||||
while(fd--) {
|
while (fd--)
|
||||||
close(fd);
|
close(fd);
|
||||||
}
|
|
||||||
|
|
||||||
open("/dev/null", O_RDWR, 0);
|
open("/dev/null", O_RDWR, 0);
|
||||||
dup(0);
|
dup(0);
|
||||||
dup(0);
|
dup(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int ppp_load_kext() {
|
static int ppp_load_kext()
|
||||||
|
{
|
||||||
int pid = fork();
|
int pid = fork();
|
||||||
|
if (pid < 0)
|
||||||
if(pid < 0) {
|
{
|
||||||
tun_error("fork for ppp kext: %s", strerror(errno));
|
tun_error("fork for ppp kext: %s", strerror(errno));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(pid == 0) {
|
if (pid == 0)
|
||||||
|
{
|
||||||
closeall();
|
closeall();
|
||||||
execle("/sbin/kextload", "kextload", PPP_KEXT_PATH, NULL, NULL);
|
execle("/sbin/kextload", "kextload", PPP_KEXT_PATH, NULL, NULL);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
int status;
|
int status;
|
||||||
|
while (waitpid(pid, &status, 0) < 0)
|
||||||
while(waitpid(pid, &status, 0) < 0) {
|
{
|
||||||
if(errno == EINTR) {
|
if (errno == EINTR)
|
||||||
continue;
|
continue;
|
||||||
}
|
|
||||||
|
|
||||||
tun_error("waitpid for ppp kext: %s", strerror(errno));
|
tun_error("waitpid for ppp kext: %s", strerror(errno));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(WEXITSTATUS(status) != 0) {
|
if (WEXITSTATUS(status) != 0)
|
||||||
|
{
|
||||||
tun_error("could not load ppp kext \"%s\"", PPP_KEXT_PATH);
|
tun_error("could not load ppp kext \"%s\"", PPP_KEXT_PATH);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
@ -137,73 +143,74 @@ static int ppp_load_kext() {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int ppp_new_instance() {
|
static int ppp_new_instance()
|
||||||
|
{
|
||||||
// create ppp socket
|
// create ppp socket
|
||||||
int ppp_sockfd = socket(PF_PPP, SOCK_RAW, PPPPROTO_CTL);
|
int ppp_sockfd = socket(PF_PPP, SOCK_RAW, PPPPROTO_CTL);
|
||||||
|
if (ppp_sockfd < 0)
|
||||||
if(ppp_sockfd < 0) {
|
{
|
||||||
if(ppp_load_kext() < 0) {
|
if (ppp_load_kext() < 0)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
|
||||||
|
|
||||||
ppp_sockfd = socket(PF_PPP, SOCK_RAW, PPPPROTO_CTL);
|
ppp_sockfd = socket(PF_PPP, SOCK_RAW, PPPPROTO_CTL);
|
||||||
|
if (ppp_sockfd < 0)
|
||||||
if(ppp_sockfd < 0) {
|
{
|
||||||
tun_error("creating ppp socket: %s", strerror(errno));
|
tun_error("creating ppp socket: %s", strerror(errno));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// connect to ppp procotol
|
// connect to ppp procotol
|
||||||
struct sockaddr_ppp pppaddr;
|
struct sockaddr_ppp pppaddr;
|
||||||
pppaddr.ppp_len = sizeof(struct sockaddr_ppp);
|
pppaddr.ppp_len = sizeof(struct sockaddr_ppp);
|
||||||
pppaddr.ppp_family = AF_PPP;
|
pppaddr.ppp_family = AF_PPP;
|
||||||
pppaddr.ppp_proto = PPPPROTO_CTL;
|
pppaddr.ppp_proto = PPPPROTO_CTL;
|
||||||
pppaddr.ppp_cookie = 0;
|
pppaddr.ppp_cookie = 0;
|
||||||
|
if (connect(ppp_sockfd, (struct sockaddr *)&pppaddr, sizeof(struct sockaddr_ppp)) < 0)
|
||||||
if(connect(ppp_sockfd, (struct sockaddr *)&pppaddr, sizeof(struct sockaddr_ppp)) < 0) {
|
{
|
||||||
tun_error("connecting ppp socket: %s", strerror(errno));
|
tun_error("connecting ppp socket: %s", strerror(errno));
|
||||||
close(ppp_sockfd);
|
close(ppp_sockfd);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
tun_noerror();
|
tun_noerror();
|
||||||
return ppp_sockfd;
|
return ppp_sockfd;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int ppp_new_unit(int *unit_number) {
|
static int ppp_new_unit(int *unit_number)
|
||||||
|
{
|
||||||
int fd = ppp_new_instance();
|
int fd = ppp_new_instance();
|
||||||
|
if (fd < 0)
|
||||||
if(fd < 0) {
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
|
||||||
|
|
||||||
// create ppp unit
|
// create ppp unit
|
||||||
if(ioctl(fd, PPPIOCNEWUNIT, unit_number) < 0) {
|
if (ioctl(fd, PPPIOCNEWUNIT, unit_number) < 0)
|
||||||
|
{
|
||||||
tun_error("creating ppp unit: %s", strerror(errno));
|
tun_error("creating ppp unit: %s", strerror(errno));
|
||||||
close(fd);
|
close(fd);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
tun_noerror();
|
tun_noerror();
|
||||||
return fd;
|
return fd;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int ppp_setup_unit(int unit_fd) {
|
static int ppp_setup_unit(int unit_fd)
|
||||||
|
{
|
||||||
// send traffic to program
|
// send traffic to program
|
||||||
int flags = SC_LOOP_TRAFFIC;
|
int flags = SC_LOOP_TRAFFIC;
|
||||||
|
if (ioctl(unit_fd, PPPIOCSFLAGS, &flags) < 0)
|
||||||
if(ioctl(unit_fd, PPPIOCSFLAGS, &flags) < 0) {
|
{
|
||||||
tun_error("setting ppp loopback mode: %s", strerror(errno));
|
tun_error("setting ppp loopback mode: %s", strerror(errno));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// allow packets
|
// allow packets
|
||||||
struct npioctl npi;
|
struct npioctl npi;
|
||||||
npi.protocol = PPP_IP;
|
npi.protocol = PPP_IP;
|
||||||
npi.mode = NPMODE_PASS;
|
npi.mode = NPMODE_PASS;
|
||||||
|
if (ioctl(unit_fd, PPPIOCSNPMODE, &npi) < 0)
|
||||||
if(ioctl(unit_fd, PPPIOCSNPMODE, &npi) < 0) {
|
{
|
||||||
tun_error("starting ppp unit: %s", strerror(errno));
|
tun_error("starting ppp unit: %s", strerror(errno));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
@ -212,8 +219,10 @@ static int ppp_setup_unit(int unit_fd) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int open_pcap() {
|
static int open_pcap()
|
||||||
if(pcap != NULL) {
|
{
|
||||||
|
if (pcap != NULL)
|
||||||
|
{
|
||||||
pcap_use_count++;
|
pcap_use_count++;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
@ -222,7 +231,8 @@ static int open_pcap() {
|
||||||
pcap = pcap_open_live("lo0", BUFSIZ, 0, 1, errbuf);
|
pcap = pcap_open_live("lo0", BUFSIZ, 0, 1, errbuf);
|
||||||
pcap_use_count = 1;
|
pcap_use_count = 1;
|
||||||
|
|
||||||
if(pcap == NULL) {
|
if (pcap == NULL)
|
||||||
|
{
|
||||||
tun_error("opening pcap: %s", errbuf);
|
tun_error("opening pcap: %s", errbuf);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
@ -231,57 +241,59 @@ static int open_pcap() {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void close_pcap() {
|
static void close_pcap()
|
||||||
if(pcap == NULL) {
|
{
|
||||||
|
if (pcap == NULL)
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
pcap_use_count--;
|
pcap_use_count--;
|
||||||
|
if (pcap_use_count == 0)
|
||||||
if(pcap_use_count == 0) {
|
{
|
||||||
pcap_close(pcap);
|
pcap_close(pcap);
|
||||||
pcap = NULL;
|
pcap = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void allocate_data_buffer(int size) {
|
static void allocate_data_buffer(int size)
|
||||||
if(data_buffer_length < size) {
|
{
|
||||||
|
if (data_buffer_length < size)
|
||||||
|
{
|
||||||
free(data_buffer);
|
free(data_buffer);
|
||||||
data_buffer_length = size;
|
data_buffer_length = size;
|
||||||
data_buffer = malloc(data_buffer_length);
|
data_buffer = malloc(data_buffer_length);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void make_device_name(tunemu_device device, int unit_number) {
|
static void make_device_name(tunemu_device device, int unit_number)
|
||||||
|
{
|
||||||
snprintf(device, sizeof(tunemu_device), "ppp%d", unit_number);
|
snprintf(device, sizeof(tunemu_device), "ppp%d", unit_number);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int check_device_name(tunemu_device device) {
|
static int check_device_name(tunemu_device device)
|
||||||
if(strlen(device) < 4) {
|
{
|
||||||
|
if (strlen(device) < 4)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
|
||||||
|
|
||||||
int unit_number = atoi(device + 3);
|
int unit_number = atoi(device + 3);
|
||||||
|
if (unit_number < 0 || unit_number > 999)
|
||||||
if(unit_number < 0 || unit_number > 999) {
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
|
||||||
|
|
||||||
tunemu_device compare;
|
tunemu_device compare;
|
||||||
make_device_name(compare, unit_number);
|
make_device_name(compare, unit_number);
|
||||||
|
|
||||||
if(strcmp(device, compare) != 0) {
|
if (strcmp(device, compare) != 0)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int tunemu_open(tunemu_device device) {
|
int tunemu_open(tunemu_device device)
|
||||||
|
{
|
||||||
int ppp_unit_number = -1;
|
int ppp_unit_number = -1;
|
||||||
|
if (device[0] != 0)
|
||||||
if(device[0] != 0) {
|
{
|
||||||
if(check_device_name(device) < 0) {
|
if (check_device_name(device) < 0)
|
||||||
|
{
|
||||||
tun_error("invalid device name \"%s\"", device);
|
tun_error("invalid device name \"%s\"", device);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
@ -290,17 +302,17 @@ int tunemu_open(tunemu_device device) {
|
||||||
}
|
}
|
||||||
|
|
||||||
int ppp_unit_fd = ppp_new_unit(&ppp_unit_number);
|
int ppp_unit_fd = ppp_new_unit(&ppp_unit_number);
|
||||||
|
if (ppp_unit_fd < 0)
|
||||||
if(ppp_unit_fd < 0) {
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
|
||||||
|
|
||||||
if(ppp_setup_unit(ppp_unit_fd) < 0) {
|
if (ppp_setup_unit(ppp_unit_fd) < 0)
|
||||||
|
{
|
||||||
close(ppp_unit_fd);
|
close(ppp_unit_fd);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(open_pcap() < 0) {
|
if (open_pcap() < 0)
|
||||||
|
{
|
||||||
close(ppp_unit_fd);
|
close(ppp_unit_fd);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
@ -310,40 +322,39 @@ int tunemu_open(tunemu_device device) {
|
||||||
return ppp_unit_fd;
|
return ppp_unit_fd;
|
||||||
}
|
}
|
||||||
|
|
||||||
int tunemu_close(int ppp_sockfd) {
|
int tunemu_close(int ppp_sockfd)
|
||||||
|
{
|
||||||
int ret = close(ppp_sockfd);
|
int ret = close(ppp_sockfd);
|
||||||
|
|
||||||
if(ret == 0) {
|
if (ret == 0)
|
||||||
close_pcap();
|
close_pcap();
|
||||||
}
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int tunemu_read(int ppp_sockfd, char *buffer, int length) {
|
int tunemu_read(int ppp_sockfd, char *buffer, int length)
|
||||||
|
{
|
||||||
allocate_data_buffer(length + 2);
|
allocate_data_buffer(length + 2);
|
||||||
|
|
||||||
length = read(ppp_sockfd, data_buffer, length + 2);
|
length = read(ppp_sockfd, data_buffer, length + 2);
|
||||||
|
if (length < 0)
|
||||||
if(length < 0) {
|
{
|
||||||
tun_error("reading packet: %s", strerror(errno));
|
tun_error("reading packet: %s", strerror(errno));
|
||||||
return length;
|
return length;
|
||||||
}
|
}
|
||||||
|
|
||||||
tun_noerror();
|
tun_noerror();
|
||||||
|
|
||||||
length -= 2;
|
length -= 2;
|
||||||
|
if (length < 0)
|
||||||
if(length < 0) {
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
|
||||||
|
|
||||||
memcpy(buffer, data_buffer + 2, length);
|
memcpy(buffer, data_buffer + 2, length);
|
||||||
|
|
||||||
return length;
|
return length;
|
||||||
}
|
}
|
||||||
|
|
||||||
int tunemu_write(int ppp_sockfd, char *buffer, int length) {
|
int tunemu_write(int ppp_sockfd, char *buffer, int length)
|
||||||
|
{
|
||||||
allocate_data_buffer(length + 4);
|
allocate_data_buffer(length + 4);
|
||||||
|
|
||||||
data_buffer[0] = 0x02;
|
data_buffer[0] = 0x02;
|
||||||
|
|
@ -353,25 +364,23 @@ int tunemu_write(int ppp_sockfd, char *buffer, int length) {
|
||||||
|
|
||||||
memcpy(data_buffer + 4, buffer, length);
|
memcpy(data_buffer + 4, buffer, length);
|
||||||
|
|
||||||
if(pcap == NULL) {
|
if (pcap == NULL)
|
||||||
|
{
|
||||||
tun_error("pcap not open");
|
tun_error("pcap not open");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
length = pcap_inject(pcap, data_buffer, length + 4);
|
length = pcap_inject(pcap, data_buffer, length + 4);
|
||||||
|
if (length < 0)
|
||||||
if(length < 0) {
|
{
|
||||||
tun_error("injecting packet: %s", pcap_geterr(pcap));
|
tun_error("injecting packet: %s", pcap_geterr(pcap));
|
||||||
return length;
|
return length;
|
||||||
}
|
}
|
||||||
|
|
||||||
tun_noerror();
|
tun_noerror();
|
||||||
|
|
||||||
length -= 4;
|
length -= 4;
|
||||||
|
if (length < 0)
|
||||||
if(length < 0) {
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
|
||||||
|
|
||||||
return length;
|
return length;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
108
src/buffer.c
Normal file
108
src/buffer.c
Normal file
|
|
@ -0,0 +1,108 @@
|
||||||
|
/*
|
||||||
|
buffer.c -- buffer management
|
||||||
|
Copyright (C) 2011 Guus Sliepen <guus@tinc-vpn.org>,
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along
|
||||||
|
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "system.h"
|
||||||
|
|
||||||
|
#include "buffer.h"
|
||||||
|
#include "xalloc.h"
|
||||||
|
|
||||||
|
void buffer_compact(buffer_t *buffer, int maxsize) {
|
||||||
|
if(buffer->len >= maxsize || buffer->offset / 7 > buffer->len / 8) {
|
||||||
|
memmove(buffer->data, buffer->data + buffer->offset, buffer->len - buffer->offset);
|
||||||
|
buffer->len -= buffer->offset;
|
||||||
|
buffer->offset = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Make sure we can add size bytes to the buffer, and return a pointer to the start of those bytes.
|
||||||
|
|
||||||
|
char *buffer_prepare(buffer_t *buffer, int size) {
|
||||||
|
if(!buffer->data) {
|
||||||
|
buffer->maxlen = size;
|
||||||
|
buffer->data = xmalloc(size);
|
||||||
|
} else {
|
||||||
|
if(buffer->offset && buffer->len + size > buffer->maxlen) {
|
||||||
|
memmove(buffer->data, buffer->data + buffer->offset, buffer->len - buffer->offset);
|
||||||
|
buffer->len -= buffer->offset;
|
||||||
|
buffer->offset = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(buffer->len + size > buffer->maxlen) {
|
||||||
|
buffer->maxlen = buffer->len + size;
|
||||||
|
buffer->data = xrealloc(buffer->data, buffer->maxlen);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
char *start = buffer->data + buffer->len;
|
||||||
|
|
||||||
|
buffer->len += size;
|
||||||
|
|
||||||
|
return start;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Copy data into the buffer.
|
||||||
|
|
||||||
|
void buffer_add(buffer_t *buffer, const char *data, int size) {
|
||||||
|
memcpy(buffer_prepare(buffer, size), data, size);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Remove given number of bytes from the buffer, return a pointer to the start of them.
|
||||||
|
|
||||||
|
static char *buffer_consume(buffer_t *buffer, int size) {
|
||||||
|
char *start = buffer->data + buffer->offset;
|
||||||
|
|
||||||
|
buffer->offset += size;
|
||||||
|
|
||||||
|
if(buffer->offset >= buffer->len) {
|
||||||
|
buffer->offset = 0;
|
||||||
|
buffer->len = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return start;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check if there is a complete line in the buffer, and if so, return it NULL-terminated.
|
||||||
|
|
||||||
|
char *buffer_readline(buffer_t *buffer) {
|
||||||
|
char *newline = memchr(buffer->data + buffer->offset, '\n', buffer->len - buffer->offset);
|
||||||
|
|
||||||
|
if(!newline)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
int len = newline + 1 - (buffer->data + buffer->offset);
|
||||||
|
*newline = 0;
|
||||||
|
return buffer_consume(buffer, len);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check if we have enough bytes in the buffer, and if so, return a pointer to the start of them.
|
||||||
|
|
||||||
|
char *buffer_read(buffer_t *buffer, int size) {
|
||||||
|
if(buffer->len - buffer->offset < size)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
return buffer_consume(buffer, size);
|
||||||
|
}
|
||||||
|
|
||||||
|
void buffer_clear(buffer_t *buffer) {
|
||||||
|
free(buffer->data);
|
||||||
|
buffer->data = NULL;
|
||||||
|
buffer->maxlen = 0;
|
||||||
|
buffer->len = 0;
|
||||||
|
buffer->offset = 0;
|
||||||
|
}
|
||||||
18
src/buffer.h
Normal file
18
src/buffer.h
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
#ifndef __TINC_BUFFER_H__
|
||||||
|
#define __TINC_BUFFER_H__
|
||||||
|
|
||||||
|
typedef struct buffer_t {
|
||||||
|
char *data;
|
||||||
|
int maxlen;
|
||||||
|
int len;
|
||||||
|
int offset;
|
||||||
|
} buffer_t;
|
||||||
|
|
||||||
|
extern void buffer_compact(buffer_t *buffer, int maxsize);
|
||||||
|
extern char *buffer_prepare(buffer_t *buffer, int size);
|
||||||
|
extern void buffer_add(buffer_t *buffer, const char *data, int size);
|
||||||
|
extern char *buffer_readline(buffer_t *buffer);
|
||||||
|
extern char *buffer_read(buffer_t *buffer, int size);
|
||||||
|
extern void buffer_clear(buffer_t *buffer);
|
||||||
|
|
||||||
|
#endif
|
||||||
45
src/cipher.h
Normal file
45
src/cipher.h
Normal file
|
|
@ -0,0 +1,45 @@
|
||||||
|
/*
|
||||||
|
cipher.h -- header file cipher.c
|
||||||
|
Copyright (C) 2007-2013 Guus Sliepen <guus@tinc-vpn.org>
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along
|
||||||
|
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __TINC_CIPHER_H__
|
||||||
|
#define __TINC_CIPHER_H__
|
||||||
|
|
||||||
|
#define CIPHER_MAX_BLOCK_SIZE 32
|
||||||
|
#define CIPHER_MAX_IV_SIZE 16
|
||||||
|
#define CIPHER_MAX_KEY_SIZE 32
|
||||||
|
|
||||||
|
typedef struct cipher cipher_t;
|
||||||
|
|
||||||
|
extern cipher_t *cipher_open_by_name(const char *) __attribute__ ((__malloc__));
|
||||||
|
extern cipher_t *cipher_open_by_nid(int) __attribute__ ((__malloc__));
|
||||||
|
extern cipher_t *cipher_open_blowfish_ofb(void) __attribute__ ((__malloc__));
|
||||||
|
extern void cipher_close(cipher_t *);
|
||||||
|
extern size_t cipher_keylength(const cipher_t *);
|
||||||
|
extern void cipher_get_key(const cipher_t *, void *);
|
||||||
|
extern bool cipher_set_key(cipher_t *, void *, bool) __attribute__ ((__warn_unused_result__));
|
||||||
|
extern bool cipher_set_key_from_rsa(cipher_t *, void *, size_t, bool) __attribute__ ((__warn_unused_result__));
|
||||||
|
extern bool cipher_set_counter(cipher_t *, const void *, size_t) __attribute__ ((__warn_unused_result__));
|
||||||
|
extern bool cipher_set_counter_key(cipher_t *, void *) __attribute__ ((__warn_unused_result__));
|
||||||
|
extern bool cipher_encrypt(cipher_t *, const void *indata, size_t inlen, void *outdata, size_t *outlen, bool oneshot) __attribute__ ((__warn_unused_result__));
|
||||||
|
extern bool cipher_decrypt(cipher_t *, const void *indata, size_t inlen, void *outdata, size_t *outlen, bool oneshot) __attribute__ ((__warn_unused_result__));
|
||||||
|
extern bool cipher_counter_xor(cipher_t *, const void *indata, size_t inlen, void *outdata) __attribute__ ((__warn_unused_result__));
|
||||||
|
extern int cipher_get_nid(const cipher_t *);
|
||||||
|
extern bool cipher_active(const cipher_t *);
|
||||||
|
|
||||||
|
#endif
|
||||||
396
src/conf.c
396
src/conf.c
|
|
@ -2,7 +2,7 @@
|
||||||
conf.c -- configuration code
|
conf.c -- configuration code
|
||||||
Copyright (C) 1998 Robert van der Meulen
|
Copyright (C) 1998 Robert van der Meulen
|
||||||
1998-2005 Ivo Timmermans
|
1998-2005 Ivo Timmermans
|
||||||
2000-2014 Guus Sliepen <guus@tinc-vpn.org>
|
2000-2013 Guus Sliepen <guus@tinc-vpn.org>
|
||||||
2010-2011 Julien Muchembled <jm@jmuchemb.eu>
|
2010-2011 Julien Muchembled <jm@jmuchemb.eu>
|
||||||
2000 Cris van Pelt
|
2000 Cris van Pelt
|
||||||
|
|
||||||
|
|
@ -23,107 +23,104 @@
|
||||||
|
|
||||||
#include "system.h"
|
#include "system.h"
|
||||||
|
|
||||||
#include "avl_tree.h"
|
#include "splay_tree.h"
|
||||||
#include "connection.h"
|
#include "connection.h"
|
||||||
#include "conf.h"
|
#include "conf.h"
|
||||||
#include "list.h"
|
#include "list.h"
|
||||||
#include "logger.h"
|
#include "logger.h"
|
||||||
#include "netutl.h" /* for str2address */
|
#include "names.h"
|
||||||
|
#include "netutl.h" /* for str2address */
|
||||||
#include "protocol.h"
|
#include "protocol.h"
|
||||||
#include "utils.h" /* for cp */
|
#include "utils.h" /* for cp */
|
||||||
#include "xalloc.h"
|
#include "xalloc.h"
|
||||||
|
|
||||||
avl_tree_t *config_tree;
|
splay_tree_t *config_tree;
|
||||||
|
|
||||||
int pinginterval = 0; /* seconds between pings */
|
int pinginterval = 0; /* seconds between pings */
|
||||||
int pingtimeout = 0; /* seconds to wait for response */
|
int pingtimeout = 0; /* seconds to wait for response */
|
||||||
char *confbase = NULL; /* directory in which all config files are */
|
|
||||||
char *netname = NULL; /* name of the vpn network */
|
|
||||||
list_t *cmdline_conf = NULL; /* global/host configuration values given at the command line */
|
list_t *cmdline_conf = NULL; /* global/host configuration values given at the command line */
|
||||||
|
|
||||||
|
|
||||||
static int config_compare(const config_t *a, const config_t *b) {
|
static int config_compare(const config_t *a, const config_t *b) {
|
||||||
int result;
|
int result;
|
||||||
|
|
||||||
result = strcasecmp(a->variable, b->variable);
|
result = strcasecmp(a->variable, b->variable);
|
||||||
|
|
||||||
if(result) {
|
if(result)
|
||||||
return result;
|
return result;
|
||||||
}
|
|
||||||
|
|
||||||
/* give priority to command line options */
|
/* give priority to command line options */
|
||||||
result = !b->file - !a->file;
|
result = !b->file - !a->file;
|
||||||
|
if (result)
|
||||||
if(result) {
|
|
||||||
return result;
|
return result;
|
||||||
}
|
|
||||||
|
|
||||||
result = a->line - b->line;
|
result = a->line - b->line;
|
||||||
|
|
||||||
if(result) {
|
if(result)
|
||||||
return result;
|
return result;
|
||||||
} else {
|
else
|
||||||
return a->file ? strcmp(a->file, b->file) : 0;
|
return a->file ? strcmp(a->file, b->file) : 0;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void init_configuration(avl_tree_t **config_tree) {
|
void init_configuration(splay_tree_t ** config_tree) {
|
||||||
*config_tree = avl_alloc_tree((avl_compare_t) config_compare, (avl_action_t) free_config);
|
*config_tree = splay_alloc_tree((splay_compare_t) config_compare, (splay_action_t) free_config);
|
||||||
}
|
}
|
||||||
|
|
||||||
void exit_configuration(avl_tree_t **config_tree) {
|
void exit_configuration(splay_tree_t ** config_tree) {
|
||||||
avl_delete_tree(*config_tree);
|
splay_delete_tree(*config_tree);
|
||||||
*config_tree = NULL;
|
*config_tree = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
config_t *new_config(void) {
|
config_t *new_config(void) {
|
||||||
return xmalloc_and_zero(sizeof(config_t));
|
return xzalloc(sizeof(config_t));
|
||||||
}
|
}
|
||||||
|
|
||||||
void free_config(config_t *cfg) {
|
void free_config(config_t *cfg) {
|
||||||
free(cfg->variable);
|
if(cfg->variable)
|
||||||
free(cfg->value);
|
free(cfg->variable);
|
||||||
free(cfg->file);
|
|
||||||
|
if(cfg->value)
|
||||||
|
free(cfg->value);
|
||||||
|
|
||||||
|
if(cfg->file)
|
||||||
|
free(cfg->file);
|
||||||
|
|
||||||
free(cfg);
|
free(cfg);
|
||||||
}
|
}
|
||||||
|
|
||||||
void config_add(avl_tree_t *config_tree, config_t *cfg) {
|
void config_add(splay_tree_t *config_tree, config_t *cfg) {
|
||||||
avl_insert(config_tree, cfg);
|
splay_insert(config_tree, cfg);
|
||||||
}
|
}
|
||||||
|
|
||||||
config_t *lookup_config(const avl_tree_t *config_tree, char *variable) {
|
config_t *lookup_config(splay_tree_t *config_tree, char *variable) {
|
||||||
config_t cfg, *found;
|
config_t cfg, *found;
|
||||||
|
|
||||||
cfg.variable = variable;
|
cfg.variable = variable;
|
||||||
cfg.file = NULL;
|
cfg.file = NULL;
|
||||||
cfg.line = 0;
|
cfg.line = 0;
|
||||||
|
|
||||||
found = avl_search_closest_greater(config_tree, &cfg);
|
found = splay_search_closest_greater(config_tree, &cfg);
|
||||||
|
|
||||||
if(!found) {
|
if(!found)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
|
||||||
|
|
||||||
if(strcasecmp(found->variable, variable)) {
|
if(strcasecmp(found->variable, variable))
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
|
||||||
|
|
||||||
return found;
|
return found;
|
||||||
}
|
}
|
||||||
|
|
||||||
config_t *lookup_config_next(const avl_tree_t *config_tree, const config_t *cfg) {
|
config_t *lookup_config_next(splay_tree_t *config_tree, const config_t *cfg) {
|
||||||
avl_node_t *node;
|
splay_node_t *node;
|
||||||
config_t *found;
|
config_t *found;
|
||||||
|
|
||||||
node = avl_search_node(config_tree, cfg);
|
node = splay_search_node(config_tree, cfg);
|
||||||
|
|
||||||
if(node) {
|
if(node) {
|
||||||
if(node->next) {
|
if(node->next) {
|
||||||
found = node->next->data;
|
found = node->next->data;
|
||||||
|
|
||||||
if(!strcasecmp(found->variable, cfg->variable)) {
|
if(!strcasecmp(found->variable, cfg->variable))
|
||||||
return found;
|
return found;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -131,9 +128,8 @@ config_t *lookup_config_next(const avl_tree_t *config_tree, const config_t *cfg)
|
||||||
}
|
}
|
||||||
|
|
||||||
bool get_config_bool(const config_t *cfg, bool *result) {
|
bool get_config_bool(const config_t *cfg, bool *result) {
|
||||||
if(!cfg) {
|
if(!cfg)
|
||||||
return false;
|
return false;
|
||||||
}
|
|
||||||
|
|
||||||
if(!strcasecmp(cfg->value, "yes")) {
|
if(!strcasecmp(cfg->value, "yes")) {
|
||||||
*result = true;
|
*result = true;
|
||||||
|
|
@ -143,31 +139,28 @@ bool get_config_bool(const config_t *cfg, bool *result) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
logger(LOG_ERR, "\"yes\" or \"no\" expected for configuration variable %s in %s line %d",
|
logger(DEBUG_ALWAYS, LOG_ERR, "\"yes\" or \"no\" expected for configuration variable %s in %s line %d",
|
||||||
cfg->variable, cfg->file, cfg->line);
|
cfg->variable, cfg->file, cfg->line);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool get_config_int(const config_t *cfg, int *result) {
|
bool get_config_int(const config_t *cfg, int *result) {
|
||||||
if(!cfg) {
|
if(!cfg)
|
||||||
return false;
|
return false;
|
||||||
}
|
|
||||||
|
|
||||||
if(sscanf(cfg->value, "%d", result) == 1) {
|
if(sscanf(cfg->value, "%d", result) == 1)
|
||||||
return true;
|
return true;
|
||||||
}
|
|
||||||
|
|
||||||
logger(LOG_ERR, "Integer expected for configuration variable %s in %s line %d",
|
logger(DEBUG_ALWAYS, LOG_ERR, "Integer expected for configuration variable %s in %s line %d",
|
||||||
cfg->variable, cfg->file, cfg->line);
|
cfg->variable, cfg->file, cfg->line);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool get_config_string(const config_t *cfg, char **result) {
|
bool get_config_string(const config_t *cfg, char **result) {
|
||||||
if(!cfg) {
|
if(!cfg)
|
||||||
return false;
|
return false;
|
||||||
}
|
|
||||||
|
|
||||||
*result = xstrdup(cfg->value);
|
*result = xstrdup(cfg->value);
|
||||||
|
|
||||||
|
|
@ -177,9 +170,8 @@ bool get_config_string(const config_t *cfg, char **result) {
|
||||||
bool get_config_address(const config_t *cfg, struct addrinfo **result) {
|
bool get_config_address(const config_t *cfg, struct addrinfo **result) {
|
||||||
struct addrinfo *ai;
|
struct addrinfo *ai;
|
||||||
|
|
||||||
if(!cfg) {
|
if(!cfg)
|
||||||
return false;
|
return false;
|
||||||
}
|
|
||||||
|
|
||||||
ai = str2addrinfo(cfg->value, NULL, 0);
|
ai = str2addrinfo(cfg->value, NULL, 0);
|
||||||
|
|
||||||
|
|
@ -188,33 +180,32 @@ bool get_config_address(const config_t *cfg, struct addrinfo **result) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
logger(LOG_ERR, "Hostname or IP address expected for configuration variable %s in %s line %d",
|
logger(DEBUG_ALWAYS, LOG_ERR, "Hostname or IP address expected for configuration variable %s in %s line %d",
|
||||||
cfg->variable, cfg->file, cfg->line);
|
cfg->variable, cfg->file, cfg->line);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool get_config_subnet(const config_t *cfg, subnet_t **result) {
|
bool get_config_subnet(const config_t *cfg, subnet_t ** result) {
|
||||||
subnet_t subnet = {0};
|
subnet_t subnet = {NULL};
|
||||||
|
|
||||||
if(!cfg) {
|
if(!cfg)
|
||||||
return false;
|
return false;
|
||||||
}
|
|
||||||
|
|
||||||
if(!str2net(&subnet, cfg->value)) {
|
if(!str2net(&subnet, cfg->value)) {
|
||||||
logger(LOG_ERR, "Subnet expected for configuration variable %s in %s line %d",
|
logger(DEBUG_ALWAYS, LOG_ERR, "Subnet expected for configuration variable %s in %s line %d",
|
||||||
cfg->variable, cfg->file, cfg->line);
|
cfg->variable, cfg->file, cfg->line);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Teach newbies what subnets are... */
|
/* Teach newbies what subnets are... */
|
||||||
|
|
||||||
if(((subnet.type == SUBNET_IPV4)
|
if(((subnet.type == SUBNET_IPV4)
|
||||||
&& !maskcheck(&subnet.net.ipv4.address, subnet.net.ipv4.prefixlength, sizeof(ipv4_t)))
|
&& !maskcheck(&subnet.net.ipv4.address, subnet.net.ipv4.prefixlength, sizeof subnet.net.ipv4.address))
|
||||||
|| ((subnet.type == SUBNET_IPV6)
|
|| ((subnet.type == SUBNET_IPV6)
|
||||||
&& !maskcheck(&subnet.net.ipv6.address, subnet.net.ipv6.prefixlength, sizeof(ipv6_t)))) {
|
&& !maskcheck(&subnet.net.ipv6.address, subnet.net.ipv6.prefixlength, sizeof subnet.net.ipv6.address))) {
|
||||||
logger(LOG_ERR, "Network address and prefix length do not match for configuration variable %s in %s line %d",
|
logger(DEBUG_ALWAYS, LOG_ERR, "Network address and prefix length do not match for configuration variable %s in %s line %d",
|
||||||
cfg->variable, cfg->file, cfg->line);
|
cfg->variable, cfg->file, cfg->line);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -226,31 +217,27 @@ bool get_config_subnet(const config_t *cfg, subnet_t **result) {
|
||||||
/*
|
/*
|
||||||
Read exactly one line and strip the trailing newline if any.
|
Read exactly one line and strip the trailing newline if any.
|
||||||
*/
|
*/
|
||||||
static char *readline(FILE *fp, char *buf, size_t buflen) {
|
static char *readline(FILE * fp, char *buf, size_t buflen) {
|
||||||
char *newline = NULL;
|
char *newline = NULL;
|
||||||
char *p;
|
char *p;
|
||||||
|
|
||||||
if(feof(fp)) {
|
if(feof(fp))
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
|
||||||
|
|
||||||
p = fgets(buf, buflen, fp);
|
p = fgets(buf, buflen, fp);
|
||||||
|
|
||||||
if(!p) {
|
if(!p)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
|
||||||
|
|
||||||
newline = strchr(p, '\n');
|
newline = strchr(p, '\n');
|
||||||
|
|
||||||
if(!newline) {
|
if(!newline)
|
||||||
return buf;
|
return buf;
|
||||||
}
|
|
||||||
|
|
||||||
*newline = '\0'; /* kill newline */
|
/* kill newline and carriage return if necessary */
|
||||||
|
*newline = '\0';
|
||||||
if(newline > p && newline[-1] == '\r') { /* and carriage return if necessary */
|
if(newline > p && newline[-1] == '\r')
|
||||||
newline[-1] = '\0';
|
newline[-1] = '\0';
|
||||||
}
|
|
||||||
|
|
||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
|
|
@ -262,32 +249,26 @@ config_t *parse_config_line(char *line, const char *fname, int lineno) {
|
||||||
variable = value = line;
|
variable = value = line;
|
||||||
|
|
||||||
eol = line + strlen(line);
|
eol = line + strlen(line);
|
||||||
|
while(strchr("\t ", *--eol))
|
||||||
while(strchr("\t ", *--eol)) {
|
|
||||||
*eol = '\0';
|
*eol = '\0';
|
||||||
}
|
|
||||||
|
|
||||||
len = strcspn(value, "\t =");
|
len = strcspn(value, "\t =");
|
||||||
value += len;
|
value += len;
|
||||||
value += strspn(value, "\t ");
|
value += strspn(value, "\t ");
|
||||||
|
|
||||||
if(*value == '=') {
|
if(*value == '=') {
|
||||||
value++;
|
value++;
|
||||||
value += strspn(value, "\t ");
|
value += strspn(value, "\t ");
|
||||||
}
|
}
|
||||||
|
|
||||||
variable[len] = '\0';
|
variable[len] = '\0';
|
||||||
|
|
||||||
if(!*value) {
|
if(!*value) {
|
||||||
const char err[] = "No value for variable";
|
const char err[] = "No value for variable";
|
||||||
|
if (fname)
|
||||||
if(fname)
|
logger(DEBUG_ALWAYS, LOG_ERR, "%s `%s' on line %d while reading config file %s",
|
||||||
logger(LOG_ERR, "%s `%s' on line %d while reading config file %s",
|
err, variable, lineno, fname);
|
||||||
err, variable, lineno, fname);
|
|
||||||
else
|
else
|
||||||
logger(LOG_ERR, "%s `%s' in command line option %d",
|
logger(DEBUG_ALWAYS, LOG_ERR, "%s `%s' in command line option %d",
|
||||||
err, variable, lineno);
|
err, variable, lineno);
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -304,7 +285,7 @@ config_t *parse_config_line(char *line, const char *fname, int lineno) {
|
||||||
Parse a configuration file and put the results in the configuration tree
|
Parse a configuration file and put the results in the configuration tree
|
||||||
starting at *base.
|
starting at *base.
|
||||||
*/
|
*/
|
||||||
bool read_config_file(avl_tree_t *config_tree, const char *fname) {
|
bool read_config_file(splay_tree_t *config_tree, const char *fname) {
|
||||||
FILE *fp;
|
FILE *fp;
|
||||||
char buffer[MAX_STRING_SIZE];
|
char buffer[MAX_STRING_SIZE];
|
||||||
char *line;
|
char *line;
|
||||||
|
|
@ -316,32 +297,27 @@ bool read_config_file(avl_tree_t *config_tree, const char *fname) {
|
||||||
fp = fopen(fname, "r");
|
fp = fopen(fname, "r");
|
||||||
|
|
||||||
if(!fp) {
|
if(!fp) {
|
||||||
logger(LOG_ERR, "Cannot open config file %s: %s", fname, strerror(errno));
|
logger(DEBUG_ALWAYS, LOG_ERR, "Cannot open config file %s: %s", fname, strerror(errno));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
for(;;) {
|
for(;;) {
|
||||||
line = readline(fp, buffer, sizeof(buffer));
|
line = readline(fp, buffer, sizeof buffer);
|
||||||
|
|
||||||
if(!line) {
|
if(!line) {
|
||||||
if(feof(fp)) {
|
if(feof(fp))
|
||||||
result = true;
|
result = true;
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
lineno++;
|
lineno++;
|
||||||
|
|
||||||
if(!*line || *line == '#') {
|
if(!*line || *line == '#')
|
||||||
continue;
|
continue;
|
||||||
}
|
|
||||||
|
|
||||||
if(ignore) {
|
if(ignore) {
|
||||||
if(!strncmp(line, "-----END", 8)) {
|
if(!strncmp(line, "-----END", 8))
|
||||||
ignore = false;
|
ignore = false;
|
||||||
}
|
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -351,11 +327,8 @@ bool read_config_file(avl_tree_t *config_tree, const char *fname) {
|
||||||
}
|
}
|
||||||
|
|
||||||
cfg = parse_config_line(line, fname, lineno);
|
cfg = parse_config_line(line, fname, lineno);
|
||||||
|
if (!cfg)
|
||||||
if(!cfg) {
|
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
|
|
||||||
config_add(config_tree, cfg);
|
config_add(config_tree, cfg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -364,31 +337,27 @@ bool read_config_file(avl_tree_t *config_tree, const char *fname) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
void read_config_options(avl_tree_t *config_tree, const char *prefix) {
|
void read_config_options(splay_tree_t *config_tree, const char *prefix) {
|
||||||
size_t prefix_len = prefix ? strlen(prefix) : 0;
|
size_t prefix_len = prefix ? strlen(prefix) : 0;
|
||||||
|
|
||||||
for(const list_node_t *node = cmdline_conf->tail; node; node = node->prev) {
|
for(const list_node_t *node = cmdline_conf->tail; node; node = node->prev) {
|
||||||
const config_t *cfg = node->data;
|
const config_t *cfg = node->data;
|
||||||
|
config_t *new;
|
||||||
|
|
||||||
if(!prefix) {
|
if(!prefix) {
|
||||||
if(strchr(cfg->variable, '.')) {
|
if(strchr(cfg->variable, '.'))
|
||||||
continue;
|
continue;
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
if(strncmp(prefix, cfg->variable, prefix_len) ||
|
if(strncmp(prefix, cfg->variable, prefix_len) ||
|
||||||
cfg->variable[prefix_len] != '.') {
|
cfg->variable[prefix_len] != '.')
|
||||||
continue;
|
continue;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
config_t *new = new_config();
|
new = new_config();
|
||||||
|
if(prefix)
|
||||||
if(prefix) {
|
|
||||||
new->variable = xstrdup(cfg->variable + prefix_len + 1);
|
new->variable = xstrdup(cfg->variable + prefix_len + 1);
|
||||||
} else {
|
else
|
||||||
new->variable = xstrdup(cfg->variable);
|
new->variable = xstrdup(cfg->variable);
|
||||||
}
|
|
||||||
|
|
||||||
new->value = xstrdup(cfg->value);
|
new->value = xstrdup(cfg->value);
|
||||||
new->file = NULL;
|
new->file = NULL;
|
||||||
new->line = cfg->line;
|
new->line = cfg->line;
|
||||||
|
|
@ -398,205 +367,50 @@ void read_config_options(avl_tree_t *config_tree, const char *prefix) {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool read_server_config(void) {
|
bool read_server_config(void) {
|
||||||
char fname[PATH_MAX];
|
char *fname;
|
||||||
bool x;
|
bool x;
|
||||||
|
|
||||||
read_config_options(config_tree, NULL);
|
read_config_options(config_tree, NULL);
|
||||||
|
|
||||||
snprintf(fname, sizeof(fname), "%s/tinc.conf", confbase);
|
xasprintf(&fname, "%s" SLASH "tinc.conf", confbase);
|
||||||
errno = 0;
|
errno = 0;
|
||||||
x = read_config_file(config_tree, fname);
|
x = read_config_file(config_tree, fname);
|
||||||
|
|
||||||
// We will try to read the conf files in the "conf.d" dir
|
if(!x && errno)
|
||||||
if(x) {
|
logger(DEBUG_ALWAYS, LOG_ERR, "Failed to read `%s': %s", fname, strerror(errno));
|
||||||
char dname[PATH_MAX];
|
|
||||||
snprintf(dname, sizeof(dname), "%s/conf.d", confbase);
|
|
||||||
DIR *dir = opendir(dname);
|
|
||||||
|
|
||||||
// If we can find this dir
|
free(fname);
|
||||||
if(dir) {
|
|
||||||
struct dirent *ep;
|
|
||||||
|
|
||||||
// We list all the files in it
|
|
||||||
while(x && (ep = readdir(dir))) {
|
|
||||||
size_t l = strlen(ep->d_name);
|
|
||||||
|
|
||||||
// And we try to read the ones that end with ".conf"
|
|
||||||
if(l > 5 && !strcmp(".conf", & ep->d_name[ l - 5 ])) {
|
|
||||||
if((size_t)snprintf(fname, sizeof(fname), "%s/%s", dname, ep->d_name) >= sizeof(fname)) {
|
|
||||||
logger(LOG_ERR, "Pathname too long: %s/%s", dname, ep->d_name);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
x = read_config_file(config_tree, fname);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
closedir(dir);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!x && errno) {
|
|
||||||
logger(LOG_ERR, "Failed to read `%s': %s", fname, strerror(errno));
|
|
||||||
}
|
|
||||||
|
|
||||||
return x;
|
return x;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool read_connection_config(connection_t *c) {
|
bool read_host_config(splay_tree_t *config_tree, const char *name) {
|
||||||
char fname[PATH_MAX];
|
char *fname;
|
||||||
bool x;
|
bool x;
|
||||||
|
|
||||||
read_config_options(c->config_tree, c->name);
|
read_config_options(config_tree, name);
|
||||||
|
|
||||||
snprintf(fname, sizeof(fname), "%s/hosts/%s", confbase, c->name);
|
xasprintf(&fname, "%s" SLASH "hosts" SLASH "%s", confbase, name);
|
||||||
x = read_config_file(c->config_tree, fname);
|
x = read_config_file(config_tree, fname);
|
||||||
|
free(fname);
|
||||||
|
|
||||||
return x;
|
return x;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void disable_old_keys(const char *filename) {
|
bool append_config_file(const char *name, const char *key, const char *value) {
|
||||||
char tmpfile[PATH_MAX] = "";
|
char *fname;
|
||||||
char buf[1024];
|
xasprintf(&fname, "%s" SLASH "hosts" SLASH "%s", confbase, name);
|
||||||
bool disabled = false;
|
|
||||||
FILE *r, *w;
|
|
||||||
|
|
||||||
r = fopen(filename, "r");
|
FILE *fp = fopen(fname, "a");
|
||||||
|
|
||||||
if(!r) {
|
if(!fp) {
|
||||||
return;
|
logger(DEBUG_ALWAYS, LOG_ERR, "Cannot open config file %s: %s", fname, strerror(errno));
|
||||||
}
|
|
||||||
|
|
||||||
int len = snprintf(tmpfile, sizeof(tmpfile), "%s.tmp", filename);
|
|
||||||
|
|
||||||
if(len < 0 || len >= PATH_MAX) {
|
|
||||||
fprintf(stderr, "Pathname too long: %s.tmp\n", filename);
|
|
||||||
w = NULL;
|
|
||||||
} else {
|
} else {
|
||||||
w = fopen(tmpfile, "w");
|
fprintf(fp, "\n# The following line was automatically added by tinc\n%s = %s\n", key, value);
|
||||||
|
fclose(fp);
|
||||||
}
|
}
|
||||||
|
|
||||||
while(fgets(buf, sizeof(buf), r)) {
|
free(fname);
|
||||||
if(!strncmp(buf, "-----BEGIN RSA", 14)) {
|
|
||||||
buf[11] = 'O';
|
|
||||||
buf[12] = 'L';
|
|
||||||
buf[13] = 'D';
|
|
||||||
disabled = true;
|
|
||||||
} else if(!strncmp(buf, "-----END RSA", 12)) {
|
|
||||||
buf[ 9] = 'O';
|
|
||||||
buf[10] = 'L';
|
|
||||||
buf[11] = 'D';
|
|
||||||
disabled = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(w && fputs(buf, w) < 0) {
|
return fp != NULL;
|
||||||
disabled = false;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if(w) {
|
|
||||||
fclose(w);
|
|
||||||
}
|
|
||||||
|
|
||||||
fclose(r);
|
|
||||||
|
|
||||||
if(!w && disabled) {
|
|
||||||
fprintf(stderr, "Warning: old key(s) found, remove them by hand!\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(disabled) {
|
|
||||||
#ifdef HAVE_MINGW
|
|
||||||
// We cannot atomically replace files on Windows.
|
|
||||||
char bakfile[PATH_MAX] = "";
|
|
||||||
snprintf(bakfile, sizeof(bakfile), "%s.bak", filename);
|
|
||||||
|
|
||||||
if(rename(filename, bakfile) || rename(tmpfile, filename)) {
|
|
||||||
rename(bakfile, filename);
|
|
||||||
#else
|
|
||||||
|
|
||||||
if(rename(tmpfile, filename)) {
|
|
||||||
#endif
|
|
||||||
fprintf(stderr, "Warning: old key(s) found, remove them by hand!\n");
|
|
||||||
} else {
|
|
||||||
#ifdef HAVE_MINGW
|
|
||||||
unlink(bakfile);
|
|
||||||
#endif
|
|
||||||
fprintf(stderr, "Warning: old key(s) found and disabled.\n");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
unlink(tmpfile);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
FILE *ask_and_open(const char *filename, const char *what) {
|
|
||||||
FILE *r;
|
|
||||||
char directory[PATH_MAX];
|
|
||||||
char line[PATH_MAX];
|
|
||||||
char abspath[PATH_MAX];
|
|
||||||
const char *fn;
|
|
||||||
|
|
||||||
/* Check stdin and stdout */
|
|
||||||
if(!isatty(0) || !isatty(1)) {
|
|
||||||
/* Argh, they are running us from a script or something. Write
|
|
||||||
the files to the current directory and let them burn in hell
|
|
||||||
for ever. */
|
|
||||||
fn = filename;
|
|
||||||
} else {
|
|
||||||
/* Ask for a file and/or directory name. */
|
|
||||||
fprintf(stdout, "Please enter a file to save %s to [%s]: ",
|
|
||||||
what, filename);
|
|
||||||
fflush(stdout);
|
|
||||||
|
|
||||||
fn = readline(stdin, line, sizeof(line));
|
|
||||||
|
|
||||||
if(!fn) {
|
|
||||||
fprintf(stderr, "Error while reading stdin: %s\n",
|
|
||||||
strerror(errno));
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!strlen(fn))
|
|
||||||
/* User just pressed enter. */
|
|
||||||
{
|
|
||||||
fn = filename;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef HAVE_MINGW
|
|
||||||
|
|
||||||
if(fn[0] != '\\' && fn[0] != '/' && !strchr(fn, ':')) {
|
|
||||||
#else
|
|
||||||
|
|
||||||
if(fn[0] != '/') {
|
|
||||||
#endif
|
|
||||||
/* The directory is a relative path or a filename. */
|
|
||||||
getcwd(directory, sizeof(directory));
|
|
||||||
|
|
||||||
if((size_t)snprintf(abspath, sizeof(abspath), "%s/%s", directory, fn) >= sizeof(abspath)) {
|
|
||||||
fprintf(stderr, "Pathname too long: %s/%s\n", directory, fn);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
fn = abspath;
|
|
||||||
}
|
|
||||||
|
|
||||||
umask(0077); /* Disallow everything for group and other */
|
|
||||||
|
|
||||||
disable_old_keys(fn);
|
|
||||||
|
|
||||||
/* Open it first to keep the inode busy */
|
|
||||||
|
|
||||||
r = fopen(fn, "a");
|
|
||||||
|
|
||||||
if(!r) {
|
|
||||||
fprintf(stderr, "Error opening file `%s': %s\n",
|
|
||||||
fn, strerror(errno));
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
return r;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
51
src/conf.h
51
src/conf.h
|
|
@ -1,10 +1,7 @@
|
||||||
#ifndef TINC_CONF_H
|
|
||||||
#define TINC_CONF_H
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
conf.h -- header for conf.c
|
conf.h -- header for conf.c
|
||||||
Copyright (C) 1998-2005 Ivo Timmermans
|
Copyright (C) 1998-2005 Ivo Timmermans
|
||||||
2000-2012 Guus Sliepen <guus@tinc-vpn.org>
|
2000-2013 Guus Sliepen <guus@tinc-vpn.org>
|
||||||
|
|
||||||
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
|
it under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -21,7 +18,10 @@
|
||||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "avl_tree.h"
|
#ifndef __TINC_CONF_H__
|
||||||
|
#define __TINC_CONF_H__
|
||||||
|
|
||||||
|
#include "splay_tree.h"
|
||||||
#include "list.h"
|
#include "list.h"
|
||||||
|
|
||||||
typedef struct config_t {
|
typedef struct config_t {
|
||||||
|
|
@ -33,35 +33,32 @@ typedef struct config_t {
|
||||||
|
|
||||||
#include "subnet.h"
|
#include "subnet.h"
|
||||||
|
|
||||||
extern avl_tree_t *config_tree;
|
extern splay_tree_t *config_tree;
|
||||||
|
|
||||||
extern int pinginterval;
|
extern int pinginterval;
|
||||||
extern int pingtimeout;
|
extern int pingtimeout;
|
||||||
extern int maxtimeout;
|
extern int maxtimeout;
|
||||||
extern int mintimeout;
|
|
||||||
extern bool bypass_security;
|
extern bool bypass_security;
|
||||||
extern char *confbase;
|
|
||||||
extern char *netname;
|
|
||||||
extern list_t *cmdline_conf;
|
extern list_t *cmdline_conf;
|
||||||
|
|
||||||
extern void init_configuration(avl_tree_t **config_tree);
|
extern void init_configuration(splay_tree_t **);
|
||||||
extern void exit_configuration(avl_tree_t **config_tree);
|
extern void exit_configuration(splay_tree_t **);
|
||||||
extern config_t *new_config(void) __attribute__((__malloc__));
|
extern config_t *new_config(void) __attribute__ ((__malloc__));
|
||||||
extern void free_config(config_t *cfg);
|
extern void free_config(config_t *);
|
||||||
extern void config_add(avl_tree_t *config_tree, config_t *cfg);
|
extern void config_add(splay_tree_t *, config_t *);
|
||||||
extern config_t *lookup_config(const avl_tree_t *config_tree, char *variable);
|
extern config_t *lookup_config(splay_tree_t *, char *);
|
||||||
extern config_t *lookup_config_next(const avl_tree_t *config_tree, const config_t *cfg);
|
extern config_t *lookup_config_next(splay_tree_t *, const config_t *);
|
||||||
extern bool get_config_bool(const config_t *cfg, bool *result);
|
extern bool get_config_bool(const config_t *, bool *);
|
||||||
extern bool get_config_int(const config_t *cfg, int *result);
|
extern bool get_config_int(const config_t *, int *);
|
||||||
extern bool get_config_string(const config_t *cfg, char **result);
|
extern bool get_config_string(const config_t *, char **);
|
||||||
extern bool get_config_address(const config_t *cfg, struct addrinfo **result);
|
extern bool get_config_address(const config_t *, struct addrinfo **);
|
||||||
extern bool get_config_subnet(const config_t *cfg, struct subnet_t **result);
|
extern bool get_config_subnet(const config_t *, struct subnet_t **);
|
||||||
|
|
||||||
extern config_t *parse_config_line(char *line, const char *fname, int lineno);
|
extern config_t *parse_config_line(char *, const char *, int);
|
||||||
extern bool read_config_file(avl_tree_t *config_tree, const char *fname);
|
extern bool read_config_file(splay_tree_t *, const char *);
|
||||||
extern void read_config_options(avl_tree_t *config_tree, const char *prefix);
|
extern void read_config_options(splay_tree_t *, const char *);
|
||||||
extern bool read_server_config(void);
|
extern bool read_server_config(void);
|
||||||
extern bool read_connection_config(struct connection_t *c);
|
extern bool read_host_config(splay_tree_t *, const char *);
|
||||||
extern FILE *ask_and_open(const char *fname, const char *what);
|
extern bool append_config_file(const char *, const char *, const char *);
|
||||||
|
|
||||||
#endif
|
#endif /* __TINC_CONF_H__ */
|
||||||
|
|
|
||||||
130
src/connection.c
130
src/connection.c
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
connection.c -- connection list management
|
connection.c -- connection list management
|
||||||
Copyright (C) 2000-2016 Guus Sliepen <guus@tinc-vpn.org>,
|
Copyright (C) 2000-2013 Guus Sliepen <guus@tinc-vpn.org>,
|
||||||
2000-2005 Ivo Timmermans
|
2000-2005 Ivo Timmermans
|
||||||
2008 Max Rijevski <maksuf@gmail.com>
|
2008 Max Rijevski <maksuf@gmail.com>
|
||||||
|
|
||||||
|
|
@ -21,131 +21,83 @@
|
||||||
|
|
||||||
#include "system.h"
|
#include "system.h"
|
||||||
|
|
||||||
#include "avl_tree.h"
|
#include "list.h"
|
||||||
|
#include "cipher.h"
|
||||||
#include "conf.h"
|
#include "conf.h"
|
||||||
|
#include "control_common.h"
|
||||||
|
#include "list.h"
|
||||||
#include "logger.h"
|
#include "logger.h"
|
||||||
|
#include "rsa.h"
|
||||||
#include "subnet.h"
|
#include "subnet.h"
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
#include "xalloc.h"
|
#include "xalloc.h"
|
||||||
|
|
||||||
avl_tree_t *connection_tree; /* Meta connections */
|
list_t *connection_list;
|
||||||
connection_t *everyone;
|
connection_t *everyone;
|
||||||
|
|
||||||
static int connection_compare(const connection_t *a, const connection_t *b) {
|
|
||||||
return a < b ? -1 : a == b ? 0 : 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
void init_connections(void) {
|
void init_connections(void) {
|
||||||
connection_tree = avl_alloc_tree((avl_compare_t) connection_compare, (avl_action_t) free_connection);
|
connection_list = list_alloc((list_action_t) free_connection);
|
||||||
everyone = new_connection();
|
everyone = new_connection();
|
||||||
everyone->name = xstrdup("everyone");
|
everyone->name = xstrdup("everyone");
|
||||||
everyone->hostname = xstrdup("BROADCAST");
|
everyone->hostname = xstrdup("BROADCAST");
|
||||||
}
|
}
|
||||||
|
|
||||||
void exit_connections(void) {
|
void exit_connections(void) {
|
||||||
avl_delete_tree(connection_tree);
|
list_delete_list(connection_list);
|
||||||
free_connection(everyone);
|
free_connection(everyone);
|
||||||
}
|
}
|
||||||
|
|
||||||
connection_t *new_connection(void) {
|
connection_t *new_connection(void) {
|
||||||
connection_t *c;
|
return xzalloc(sizeof(connection_t));
|
||||||
|
|
||||||
c = xmalloc_and_zero(sizeof(connection_t));
|
|
||||||
|
|
||||||
if(!c) {
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
gettimeofday(&c->start, NULL);
|
|
||||||
|
|
||||||
return c;
|
|
||||||
}
|
|
||||||
|
|
||||||
void free_connection_partially(connection_t *c) {
|
|
||||||
free(c->inkey);
|
|
||||||
free(c->outkey);
|
|
||||||
free(c->mychallenge);
|
|
||||||
free(c->hischallenge);
|
|
||||||
free(c->outbuf);
|
|
||||||
|
|
||||||
c->inkey = NULL;
|
|
||||||
c->outkey = NULL;
|
|
||||||
c->mychallenge = NULL;
|
|
||||||
c->hischallenge = NULL;
|
|
||||||
c->outbuf = NULL;
|
|
||||||
|
|
||||||
c->status.pinged = false;
|
|
||||||
c->status.active = false;
|
|
||||||
c->status.connecting = false;
|
|
||||||
c->status.timeout = false;
|
|
||||||
c->status.encryptout = false;
|
|
||||||
c->status.decryptin = false;
|
|
||||||
c->status.mst = false;
|
|
||||||
|
|
||||||
c->options = 0;
|
|
||||||
c->buflen = 0;
|
|
||||||
c->reqlen = 0;
|
|
||||||
c->tcplen = 0;
|
|
||||||
c->allow_request = 0;
|
|
||||||
c->outbuflen = 0;
|
|
||||||
c->outbufsize = 0;
|
|
||||||
c->outbufstart = 0;
|
|
||||||
c->last_ping_time = 0;
|
|
||||||
c->last_flushed_time = 0;
|
|
||||||
c->inbudget = 0;
|
|
||||||
c->outbudget = 0;
|
|
||||||
|
|
||||||
if(c->inctx) {
|
|
||||||
EVP_CIPHER_CTX_reset(c->inctx);
|
|
||||||
free(c->inctx);
|
|
||||||
c->inctx = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(c->outctx) {
|
|
||||||
EVP_CIPHER_CTX_reset(c->outctx);
|
|
||||||
free(c->outctx);
|
|
||||||
c->outctx = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(c->rsa_key) {
|
|
||||||
RSA_free(c->rsa_key);
|
|
||||||
c->rsa_key = NULL;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void free_connection(connection_t *c) {
|
void free_connection(connection_t *c) {
|
||||||
free_connection_partially(c);
|
if(!c)
|
||||||
|
return;
|
||||||
|
|
||||||
|
cipher_close(c->incipher);
|
||||||
|
digest_close(c->indigest);
|
||||||
|
cipher_close(c->outcipher);
|
||||||
|
digest_close(c->outdigest);
|
||||||
|
|
||||||
|
sptps_stop(&c->sptps);
|
||||||
|
ecdsa_free(c->ecdsa);
|
||||||
|
rsa_free(c->rsa);
|
||||||
|
|
||||||
|
free(c->hischallenge);
|
||||||
|
|
||||||
|
buffer_clear(&c->inbuf);
|
||||||
|
buffer_clear(&c->outbuf);
|
||||||
|
|
||||||
|
io_del(&c->io);
|
||||||
|
|
||||||
|
if(c->socket > 0)
|
||||||
|
closesocket(c->socket);
|
||||||
|
|
||||||
free(c->name);
|
free(c->name);
|
||||||
free(c->hostname);
|
free(c->hostname);
|
||||||
|
|
||||||
if(c->config_tree) {
|
if(c->config_tree)
|
||||||
exit_configuration(&c->config_tree);
|
exit_configuration(&c->config_tree);
|
||||||
}
|
|
||||||
|
|
||||||
free(c);
|
free(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
void connection_add(connection_t *c) {
|
void connection_add(connection_t *c) {
|
||||||
avl_insert(connection_tree, c);
|
list_insert_tail(connection_list, c);
|
||||||
}
|
}
|
||||||
|
|
||||||
void connection_del(connection_t *c) {
|
void connection_del(connection_t *c) {
|
||||||
avl_delete(connection_tree, c);
|
list_delete(connection_list, c);
|
||||||
}
|
}
|
||||||
|
|
||||||
void dump_connections(void) {
|
bool dump_connections(connection_t *cdump) {
|
||||||
avl_node_t *node;
|
for list_each(connection_t, c, connection_list) {
|
||||||
connection_t *c;
|
send_request(cdump, "%d %d %s %s %x %d %x",
|
||||||
|
CONTROL, REQ_DUMP_CONNECTIONS,
|
||||||
logger(LOG_DEBUG, "Connections:");
|
c->name, c->hostname, c->options, c->socket,
|
||||||
|
bitfield_to_int(&c->status, sizeof c->status));
|
||||||
for(node = connection_tree->head; node; node = node->next) {
|
|
||||||
c = node->data;
|
|
||||||
logger(LOG_DEBUG, " %s at %s options %x socket %d status %04x outbuf %d/%d/%d",
|
|
||||||
c->name, c->hostname, c->options, c->socket, bitfield_to_int(&c->status, sizeof(c->status)),
|
|
||||||
c->outbufsize, c->outbufstart, c->outbuflen);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
logger(LOG_DEBUG, "End of connections.");
|
return send_request(cdump, "%d %d", CONTROL, REQ_DUMP_CONNECTIONS);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
108
src/connection.h
108
src/connection.h
|
|
@ -1,9 +1,6 @@
|
||||||
#ifndef TINC_CONNECTION_H
|
|
||||||
#define TINC_CONNECTION_H
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
connection.h -- header for connection.c
|
connection.h -- header for connection.c
|
||||||
Copyright (C) 2000-2016 Guus Sliepen <guus@tinc-vpn.org>,
|
Copyright (C) 2000-2013 Guus Sliepen <guus@tinc-vpn.org>,
|
||||||
2000-2005 Ivo Timmermans
|
2000-2005 Ivo Timmermans
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
|
@ -21,35 +18,41 @@
|
||||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <openssl/rsa.h>
|
#ifndef __TINC_CONNECTION_H__
|
||||||
#include <openssl/evp.h>
|
#define __TINC_CONNECTION_H__
|
||||||
|
|
||||||
#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
#include "buffer.h"
|
||||||
#define EVP_CIPHER_CTX_reset(c) EVP_CIPHER_CTX_cleanup(c)
|
#include "cipher.h"
|
||||||
#endif
|
#include "digest.h"
|
||||||
|
#include "rsa.h"
|
||||||
#include "avl_tree.h"
|
#include "list.h"
|
||||||
|
#include "sptps.h"
|
||||||
|
|
||||||
#define OPTION_INDIRECT 0x0001
|
#define OPTION_INDIRECT 0x0001
|
||||||
#define OPTION_TCPONLY 0x0002
|
#define OPTION_TCPONLY 0x0002
|
||||||
#define OPTION_PMTU_DISCOVERY 0x0004
|
#define OPTION_PMTU_DISCOVERY 0x0004
|
||||||
#define OPTION_CLAMP_MSS 0x0008
|
#define OPTION_CLAMP_MSS 0x0008
|
||||||
|
#define OPTION_VERSION(x) ((x) >> 24) /* Top 8 bits are for protocol minor version */
|
||||||
|
|
||||||
typedef struct connection_status_t {
|
typedef struct connection_status_t {
|
||||||
unsigned int pinged: 1; /* sent ping */
|
unsigned int pinged:1; /* sent ping */
|
||||||
unsigned int active: 1; /* 1 if active.. */
|
unsigned int active:1; /* 1 if active.. */
|
||||||
unsigned int connecting: 1; /* 1 if we are waiting for a non-blocking connect() to finish */
|
unsigned int connecting:1; /* 1 if we are waiting for a non-blocking connect() to finish */
|
||||||
unsigned int unused_termreq: 1; /* the termination of this connection was requested */
|
unsigned int unused_termreq:1; /* the termination of this connection was requested */
|
||||||
unsigned int remove: 1; /* Set to 1 if you want this connection removed */
|
unsigned int remove_unused:1; /* Set to 1 if you want this connection removed */
|
||||||
unsigned int timeout: 1; /* 1 if gotten timeout */
|
unsigned int timeout_unused:1; /* 1 if gotten timeout */
|
||||||
unsigned int encryptout: 1; /* 1 if we can encrypt outgoing traffic */
|
unsigned int encryptout:1; /* 1 if we can encrypt outgoing traffic */
|
||||||
unsigned int decryptin: 1; /* 1 if we have to decrypt incoming traffic */
|
unsigned int decryptin:1; /* 1 if we have to decrypt incoming traffic */
|
||||||
unsigned int mst: 1; /* 1 if this connection is part of a minimum spanning tree */
|
unsigned int mst:1; /* 1 if this connection is part of a minimum spanning tree */
|
||||||
unsigned int proxy_passed: 1; /* 1 if we are connecting via a proxy and we have finished talking with it */
|
unsigned int control:1; /* 1 if this is a control connection */
|
||||||
unsigned int tarpit: 1; /* 1 if the connection should be added to the tarpit */
|
unsigned int pcap:1; /* 1 if this is a control connection requesting packet capture */
|
||||||
unsigned int unused: 21;
|
unsigned int log:1; /* 1 if this is a control connection requesting log dump */
|
||||||
|
unsigned int invitation:1; /* 1 if this is an invitation */
|
||||||
|
unsigned int invitation_used:1; /* 1 if the invitation has been consumed */
|
||||||
|
unsigned int unused:19;
|
||||||
} connection_status_t;
|
} connection_status_t;
|
||||||
|
|
||||||
|
#include "ecdsa.h"
|
||||||
#include "edge.h"
|
#include "edge.h"
|
||||||
#include "net.h"
|
#include "net.h"
|
||||||
#include "node.h"
|
#include "node.h"
|
||||||
|
|
@ -59,7 +62,8 @@ typedef struct connection_t {
|
||||||
|
|
||||||
union sockaddr_t address; /* his real (internet) ip */
|
union sockaddr_t address; /* his real (internet) ip */
|
||||||
char *hostname; /* the hostname of its real ip */
|
char *hostname; /* the hostname of its real ip */
|
||||||
int protocol_version; /* used protocol */
|
int protocol_major; /* used protocol */
|
||||||
|
int protocol_minor; /* used protocol */
|
||||||
|
|
||||||
int socket; /* socket used for this connection */
|
int socket; /* socket used for this connection */
|
||||||
uint32_t options; /* options for this connection */
|
uint32_t options; /* options for this connection */
|
||||||
|
|
@ -71,53 +75,41 @@ typedef struct connection_t {
|
||||||
struct node_t *node; /* node associated with the other end */
|
struct node_t *node; /* node associated with the other end */
|
||||||
struct edge_t *edge; /* edge associated with this connection */
|
struct edge_t *edge; /* edge associated with this connection */
|
||||||
|
|
||||||
RSA *rsa_key; /* his public/private key */
|
rsa_t *rsa; /* his public RSA key */
|
||||||
const EVP_CIPHER *incipher; /* Cipher he will use to send data to us */
|
ecdsa_t *ecdsa; /* his public ECDSA key */
|
||||||
const EVP_CIPHER *outcipher; /* Cipher we will use to send data to him */
|
cipher_t *incipher; /* Cipher he will use to send data to us */
|
||||||
EVP_CIPHER_CTX *inctx; /* Context of encrypted meta data that will come from him to us */
|
cipher_t *outcipher; /* Cipher we will use to send data to him */
|
||||||
EVP_CIPHER_CTX *outctx; /* Context of encrypted meta data that will be sent from us to him */
|
digest_t *indigest;
|
||||||
uint64_t inbudget; /* Encrypted bytes send budget */
|
digest_t *outdigest;
|
||||||
uint64_t outbudget; /* Encrypted bytes receive budget */
|
sptps_t sptps;
|
||||||
char *inkey; /* His symmetric meta key + iv */
|
|
||||||
char *outkey; /* Our symmetric meta key + iv */
|
|
||||||
int inkeylength; /* Length of his key + iv */
|
|
||||||
int outkeylength; /* Length of our key + iv */
|
|
||||||
const EVP_MD *indigest;
|
|
||||||
const EVP_MD *outdigest;
|
|
||||||
int inmaclength;
|
int inmaclength;
|
||||||
int outmaclength;
|
int outmaclength;
|
||||||
int incompression;
|
int incompression;
|
||||||
int outcompression;
|
int outcompression;
|
||||||
char *mychallenge; /* challenge we received from him */
|
|
||||||
char *hischallenge; /* challenge we sent to him */
|
|
||||||
|
|
||||||
char buffer[MAXBUFSIZE]; /* metadata input buffer */
|
char *hischallenge; /* The challenge we sent to him */
|
||||||
int buflen; /* bytes read into buffer */
|
|
||||||
int reqlen; /* length of incoming request */
|
struct buffer_t inbuf;
|
||||||
length_t tcplen; /* length of incoming TCPpacket */
|
struct buffer_t outbuf;
|
||||||
|
io_t io; /* input/output event on this metadata connection */
|
||||||
|
int tcplen; /* length of incoming TCPpacket */
|
||||||
int allow_request; /* defined if there's only one request possible */
|
int allow_request; /* defined if there's only one request possible */
|
||||||
|
|
||||||
char *outbuf; /* metadata output buffer */
|
|
||||||
int outbufstart; /* index of first meaningful byte in output buffer */
|
|
||||||
int outbuflen; /* number of meaningful bytes in output buffer */
|
|
||||||
int outbufsize; /* number of bytes allocated to output buffer */
|
|
||||||
|
|
||||||
time_t last_ping_time; /* last time we saw some activity from the other end or pinged them */
|
time_t last_ping_time; /* last time we saw some activity from the other end or pinged them */
|
||||||
time_t last_flushed_time; /* last time buffer was empty. Only meaningful if outbuflen > 0 */
|
|
||||||
|
|
||||||
avl_tree_t *config_tree; /* Pointer to configuration tree belonging to him */
|
splay_tree_t *config_tree; /* Pointer to configuration tree belonging to him */
|
||||||
} connection_t;
|
} connection_t;
|
||||||
|
|
||||||
extern avl_tree_t *connection_tree;
|
extern list_t *connection_list;
|
||||||
extern connection_t *everyone;
|
extern connection_t *everyone;
|
||||||
|
|
||||||
extern void init_connections(void);
|
extern void init_connections(void);
|
||||||
extern void exit_connections(void);
|
extern void exit_connections(void);
|
||||||
extern connection_t *new_connection(void) __attribute__((__malloc__));
|
extern connection_t *new_connection(void) __attribute__ ((__malloc__));
|
||||||
extern void free_connection(connection_t *c);
|
extern void free_connection(connection_t *);
|
||||||
extern void free_connection_partially(connection_t *c);
|
extern void connection_add(connection_t *);
|
||||||
extern void connection_add(connection_t *c);
|
extern void connection_del(connection_t *);
|
||||||
extern void connection_del(connection_t *c);
|
extern bool dump_connections(struct connection_t *);
|
||||||
extern void dump_connections(void);
|
|
||||||
|
|
||||||
#endif
|
#endif /* __TINC_CONNECTION_H__ */
|
||||||
|
|
|
||||||
183
src/control.c
Normal file
183
src/control.c
Normal file
|
|
@ -0,0 +1,183 @@
|
||||||
|
/*
|
||||||
|
control.c -- Control socket handling.
|
||||||
|
Copyright (C) 2013 Guus Sliepen <guus@tinc-vpn.org>
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along
|
||||||
|
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "system.h"
|
||||||
|
#include "crypto.h"
|
||||||
|
#include "conf.h"
|
||||||
|
#include "control.h"
|
||||||
|
#include "control_common.h"
|
||||||
|
#include "graph.h"
|
||||||
|
#include "logger.h"
|
||||||
|
#include "meta.h"
|
||||||
|
#include "names.h"
|
||||||
|
#include "net.h"
|
||||||
|
#include "netutl.h"
|
||||||
|
#include "protocol.h"
|
||||||
|
#include "route.h"
|
||||||
|
#include "utils.h"
|
||||||
|
#include "xalloc.h"
|
||||||
|
|
||||||
|
char controlcookie[65];
|
||||||
|
|
||||||
|
static bool control_return(connection_t *c, int type, int error) {
|
||||||
|
return send_request(c, "%d %d %d", CONTROL, type, error);
|
||||||
|
}
|
||||||
|
|
||||||
|
static bool control_ok(connection_t *c, int type) {
|
||||||
|
return control_return(c, type, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool control_h(connection_t *c, const char *request) {
|
||||||
|
int type;
|
||||||
|
|
||||||
|
if(!c->status.control || c->allow_request != CONTROL) {
|
||||||
|
logger(DEBUG_ALWAYS, LOG_ERR, "Unauthorized control request from %s (%s)", c->name, c->hostname);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(sscanf(request, "%*d %d", &type) != 1) {
|
||||||
|
logger(DEBUG_ALWAYS, LOG_ERR, "Got bad %s from %s (%s)", "CONTROL", c->name, c->hostname);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (type) {
|
||||||
|
case REQ_STOP:
|
||||||
|
event_exit();
|
||||||
|
return control_ok(c, REQ_STOP);
|
||||||
|
|
||||||
|
case REQ_DUMP_NODES:
|
||||||
|
return dump_nodes(c);
|
||||||
|
|
||||||
|
case REQ_DUMP_EDGES:
|
||||||
|
return dump_edges(c);
|
||||||
|
|
||||||
|
case REQ_DUMP_SUBNETS:
|
||||||
|
return dump_subnets(c);
|
||||||
|
|
||||||
|
case REQ_DUMP_CONNECTIONS:
|
||||||
|
return dump_connections(c);
|
||||||
|
|
||||||
|
case REQ_PURGE:
|
||||||
|
purge();
|
||||||
|
return control_ok(c, REQ_PURGE);
|
||||||
|
|
||||||
|
case REQ_SET_DEBUG: {
|
||||||
|
int new_level;
|
||||||
|
if(sscanf(request, "%*d %*d %d", &new_level) != 1)
|
||||||
|
return false;
|
||||||
|
send_request(c, "%d %d %d", CONTROL, REQ_SET_DEBUG, debug_level);
|
||||||
|
if(new_level >= 0)
|
||||||
|
debug_level = new_level;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
case REQ_RETRY:
|
||||||
|
retry();
|
||||||
|
return control_ok(c, REQ_RETRY);
|
||||||
|
|
||||||
|
case REQ_RELOAD:
|
||||||
|
logger(DEBUG_ALWAYS, LOG_NOTICE, "Got '%s' command", "reload");
|
||||||
|
int result = reload_configuration();
|
||||||
|
return control_return(c, REQ_RELOAD, result);
|
||||||
|
|
||||||
|
case REQ_DISCONNECT: {
|
||||||
|
char name[MAX_STRING_SIZE];
|
||||||
|
bool found = false;
|
||||||
|
|
||||||
|
if(sscanf(request, "%*d %*d " MAX_STRING, name) != 1)
|
||||||
|
return control_return(c, REQ_DISCONNECT, -1);
|
||||||
|
|
||||||
|
for list_each(connection_t, other, connection_list) {
|
||||||
|
if(strcmp(other->name, name))
|
||||||
|
continue;
|
||||||
|
terminate_connection(other, other->status.active);
|
||||||
|
found = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return control_return(c, REQ_DISCONNECT, found ? 0 : -2);
|
||||||
|
}
|
||||||
|
|
||||||
|
case REQ_DUMP_TRAFFIC:
|
||||||
|
return dump_traffic(c);
|
||||||
|
|
||||||
|
case REQ_PCAP:
|
||||||
|
sscanf(request, "%*d %*d %d", &c->outmaclength);
|
||||||
|
c->status.pcap = true;
|
||||||
|
pcap = true;
|
||||||
|
return true;
|
||||||
|
|
||||||
|
case REQ_LOG:
|
||||||
|
sscanf(request, "%*d %*d %d", &c->outcompression);
|
||||||
|
c->status.log = true;
|
||||||
|
logcontrol = true;
|
||||||
|
return true;
|
||||||
|
|
||||||
|
default:
|
||||||
|
return send_request(c, "%d %d", CONTROL, REQ_INVALID);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool init_control(void) {
|
||||||
|
randomize(controlcookie, sizeof controlcookie / 2);
|
||||||
|
bin2hex(controlcookie, controlcookie, sizeof controlcookie / 2);
|
||||||
|
|
||||||
|
mode_t mask = umask(0);
|
||||||
|
umask(mask | 077);
|
||||||
|
FILE *f = fopen(pidfilename, "w");
|
||||||
|
umask(mask);
|
||||||
|
|
||||||
|
if(!f) {
|
||||||
|
logger(DEBUG_ALWAYS, LOG_ERR, "Cannot write control socket cookie file %s: %s", pidfilename, strerror(errno));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get the address and port of the first listening socket
|
||||||
|
|
||||||
|
char *localhost = NULL;
|
||||||
|
sockaddr_t sa;
|
||||||
|
socklen_t len = sizeof sa;
|
||||||
|
|
||||||
|
// Make sure we have a valid address, and map 0.0.0.0 and :: to 127.0.0.1 and ::1.
|
||||||
|
|
||||||
|
if(getsockname(listen_socket[0].tcp.fd, (struct sockaddr *)&sa, &len)) {
|
||||||
|
xasprintf(&localhost, "127.0.0.1 port %s", myport);
|
||||||
|
} else {
|
||||||
|
if(sa.sa.sa_family == AF_INET) {
|
||||||
|
if(sa.in.sin_addr.s_addr == 0)
|
||||||
|
sa.in.sin_addr.s_addr = htonl(0x7f000001);
|
||||||
|
} else if(sa.sa.sa_family == AF_INET6) {
|
||||||
|
static const uint8_t zero[16] = {0};
|
||||||
|
if(!memcmp(sa.in6.sin6_addr.s6_addr, zero, sizeof zero))
|
||||||
|
sa.in6.sin6_addr.s6_addr[15] = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
localhost = sockaddr2hostname(&sa);
|
||||||
|
}
|
||||||
|
|
||||||
|
fprintf(f, "%d %s %s\n", (int)getpid(), controlcookie, localhost);
|
||||||
|
|
||||||
|
free(localhost);
|
||||||
|
fclose(f);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void exit_control(void) {
|
||||||
|
unlink(pidfilename);
|
||||||
|
}
|
||||||
27
src/control.h
Normal file
27
src/control.h
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
/*
|
||||||
|
control.h -- header for control.c.
|
||||||
|
Copyright (C) 2007 Guus Sliepen <guus@tinc-vpn.org>
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along
|
||||||
|
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __TINC_CONTROL_H__
|
||||||
|
#define __TINC_CONTROL_H__
|
||||||
|
|
||||||
|
extern bool init_control();
|
||||||
|
extern void exit_control();
|
||||||
|
extern char controlcookie[];
|
||||||
|
|
||||||
|
#endif
|
||||||
48
src/control_common.h
Normal file
48
src/control_common.h
Normal file
|
|
@ -0,0 +1,48 @@
|
||||||
|
/*
|
||||||
|
control_protocol.h -- control socket protocol.
|
||||||
|
Copyright (C) 2007 Scott Lamb <slamb@slamb.org>
|
||||||
|
2009-2012 Guus Sliepen <guus@tinc-vpn.org>
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along
|
||||||
|
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __TINC_CONTROL_PROTOCOL_H__
|
||||||
|
#define __TINC_CONTROL_PROTOCOL_H__
|
||||||
|
|
||||||
|
#include "protocol.h"
|
||||||
|
|
||||||
|
enum request_type {
|
||||||
|
REQ_INVALID = -1,
|
||||||
|
REQ_STOP = 0,
|
||||||
|
REQ_RELOAD,
|
||||||
|
REQ_RESTART,
|
||||||
|
REQ_DUMP_NODES,
|
||||||
|
REQ_DUMP_EDGES,
|
||||||
|
REQ_DUMP_SUBNETS,
|
||||||
|
REQ_DUMP_CONNECTIONS,
|
||||||
|
REQ_DUMP_GRAPH,
|
||||||
|
REQ_PURGE,
|
||||||
|
REQ_SET_DEBUG,
|
||||||
|
REQ_RETRY,
|
||||||
|
REQ_CONNECT,
|
||||||
|
REQ_DISCONNECT,
|
||||||
|
REQ_DUMP_TRAFFIC,
|
||||||
|
REQ_PCAP,
|
||||||
|
REQ_LOG,
|
||||||
|
};
|
||||||
|
|
||||||
|
#define TINC_CTL_VERSION_CURRENT 0
|
||||||
|
|
||||||
|
#endif
|
||||||
27
src/crypto.h
Normal file
27
src/crypto.h
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
/*
|
||||||
|
crypto.h -- header for crypto.c
|
||||||
|
Copyright (C) 2007-2013 Guus Sliepen <guus@tinc-vpn.org>
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along
|
||||||
|
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __TINC_CRYPTO_H__
|
||||||
|
#define __TINC_CRYPTO_H__
|
||||||
|
|
||||||
|
extern void crypto_init();
|
||||||
|
extern void crypto_exit();
|
||||||
|
extern void randomize(void *, size_t);
|
||||||
|
|
||||||
|
#endif
|
||||||
1
src/cygwin/.deps/device.Po
Normal file
1
src/cygwin/.deps/device.Po
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
# dummy
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
device.c -- Interaction with Windows tap driver in a Cygwin environment
|
device.c -- Interaction with Windows tap driver in a Cygwin environment
|
||||||
Copyright (C) 2002-2005 Ivo Timmermans,
|
Copyright (C) 2002-2005 Ivo Timmermans,
|
||||||
2002-2016 Guus Sliepen <guus@tinc-vpn.org>
|
2002-2013 Guus Sliepen <guus@tinc-vpn.org>
|
||||||
|
|
||||||
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
|
it under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -19,7 +19,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../system.h"
|
#include "../system.h"
|
||||||
#include "../net.h"
|
|
||||||
|
|
||||||
#include <w32api/windows.h>
|
#include <w32api/windows.h>
|
||||||
#include <w32api/winioctl.h>
|
#include <w32api/winioctl.h>
|
||||||
|
|
@ -27,6 +26,8 @@
|
||||||
#include "../conf.h"
|
#include "../conf.h"
|
||||||
#include "../device.h"
|
#include "../device.h"
|
||||||
#include "../logger.h"
|
#include "../logger.h"
|
||||||
|
#include "../names.h"
|
||||||
|
#include "../net.h"
|
||||||
#include "../route.h"
|
#include "../route.h"
|
||||||
#include "../utils.h"
|
#include "../utils.h"
|
||||||
#include "../xalloc.h"
|
#include "../xalloc.h"
|
||||||
|
|
@ -37,7 +38,7 @@ int device_fd = -1;
|
||||||
static HANDLE device_handle = INVALID_HANDLE_VALUE;
|
static HANDLE device_handle = INVALID_HANDLE_VALUE;
|
||||||
char *device = NULL;
|
char *device = NULL;
|
||||||
char *iface = NULL;
|
char *iface = NULL;
|
||||||
static const char *device_info = "Windows tap device";
|
static char *device_info = NULL;
|
||||||
|
|
||||||
static uint64_t device_total_in = 0;
|
static uint64_t device_total_in = 0;
|
||||||
static uint64_t device_total_out = 0;
|
static uint64_t device_total_out = 0;
|
||||||
|
|
@ -61,62 +62,51 @@ static bool setup_device(void) {
|
||||||
get_config_string(lookup_config(config_tree, "Device"), &device);
|
get_config_string(lookup_config(config_tree, "Device"), &device);
|
||||||
get_config_string(lookup_config(config_tree, "Interface"), &iface);
|
get_config_string(lookup_config(config_tree, "Interface"), &iface);
|
||||||
|
|
||||||
if(device && iface) {
|
|
||||||
logger(LOG_WARNING, "Warning: both Device and Interface specified, results may not be as expected");
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Open registry and look for network adapters */
|
/* Open registry and look for network adapters */
|
||||||
|
|
||||||
if(RegOpenKeyEx(HKEY_LOCAL_MACHINE, NETWORK_CONNECTIONS_KEY, 0, KEY_READ, &key)) {
|
if(RegOpenKeyEx(HKEY_LOCAL_MACHINE, NETWORK_CONNECTIONS_KEY, 0, KEY_READ, &key)) {
|
||||||
logger(LOG_ERR, "Unable to read registry: %s", winerror(GetLastError()));
|
logger(DEBUG_ALWAYS, LOG_ERR, "Unable to read registry: %s", winerror(GetLastError()));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
for(i = 0; ; i++) {
|
for (i = 0; ; i++) {
|
||||||
len = sizeof(adapterid);
|
len = sizeof adapterid;
|
||||||
|
if(RegEnumKeyEx(key, i, adapterid, &len, 0, 0, 0, NULL))
|
||||||
if(RegEnumKeyEx(key, i, adapterid, &len, 0, 0, 0, NULL)) {
|
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
|
|
||||||
/* Find out more about this adapter */
|
/* Find out more about this adapter */
|
||||||
|
|
||||||
snprintf(regpath, sizeof(regpath), "%s\\%s\\Connection", NETWORK_CONNECTIONS_KEY, adapterid);
|
snprintf(regpath, sizeof regpath, "%s\\%s\\Connection", NETWORK_CONNECTIONS_KEY, adapterid);
|
||||||
|
|
||||||
if(RegOpenKeyEx(HKEY_LOCAL_MACHINE, regpath, 0, KEY_READ, &key2)) {
|
if(RegOpenKeyEx(HKEY_LOCAL_MACHINE, regpath, 0, KEY_READ, &key2))
|
||||||
continue;
|
continue;
|
||||||
}
|
|
||||||
|
|
||||||
len = sizeof(adaptername);
|
len = sizeof adaptername;
|
||||||
err = RegQueryValueEx(key2, "Name", 0, 0, adaptername, &len);
|
err = RegQueryValueEx(key2, "Name", 0, 0, adaptername, &len);
|
||||||
|
|
||||||
RegCloseKey(key2);
|
RegCloseKey(key2);
|
||||||
|
|
||||||
if(err) {
|
if(err)
|
||||||
continue;
|
continue;
|
||||||
}
|
|
||||||
|
|
||||||
if(device) {
|
if(device) {
|
||||||
if(!strcmp(device, adapterid)) {
|
if(!strcmp(device, adapterid)) {
|
||||||
found = true;
|
found = true;
|
||||||
break;
|
break;
|
||||||
} else {
|
} else
|
||||||
continue;
|
continue;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(iface) {
|
if(iface) {
|
||||||
if(!strcmp(iface, adaptername)) {
|
if(!strcmp(iface, adaptername)) {
|
||||||
found = true;
|
found = true;
|
||||||
break;
|
break;
|
||||||
} else {
|
} else
|
||||||
continue;
|
continue;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
snprintf(tapname, sizeof(tapname), USERMODEDEVICEDIR "%s" TAPSUFFIX, adapterid);
|
snprintf(tapname, sizeof tapname, USERMODEDEVICEDIR "%s" TAPSUFFIX, adapterid);
|
||||||
device_handle = CreateFile(tapname, GENERIC_WRITE | GENERIC_READ, 0, 0, OPEN_EXISTING, FILE_ATTRIBUTE_SYSTEM, 0);
|
device_handle = CreateFile(tapname, GENERIC_WRITE | GENERIC_READ, 0, 0, OPEN_EXISTING, FILE_ATTRIBUTE_SYSTEM, 0);
|
||||||
|
|
||||||
if(device_handle != INVALID_HANDLE_VALUE) {
|
if(device_handle != INVALID_HANDLE_VALUE) {
|
||||||
CloseHandle(device_handle);
|
CloseHandle(device_handle);
|
||||||
found = true;
|
found = true;
|
||||||
|
|
@ -127,35 +117,33 @@ static bool setup_device(void) {
|
||||||
RegCloseKey(key);
|
RegCloseKey(key);
|
||||||
|
|
||||||
if(!found) {
|
if(!found) {
|
||||||
logger(LOG_ERR, "No Windows tap device found!");
|
logger(DEBUG_ALWAYS, LOG_ERR, "No Windows tap device found!");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!device) {
|
if(!device)
|
||||||
device = xstrdup(adapterid);
|
device = xstrdup(adapterid);
|
||||||
}
|
|
||||||
|
|
||||||
if(!iface) {
|
if(!iface)
|
||||||
iface = xstrdup(adaptername);
|
iface = xstrdup(adaptername);
|
||||||
}
|
|
||||||
|
|
||||||
snprintf(tapname, sizeof(tapname), USERMODEDEVICEDIR "%s" TAPSUFFIX, device);
|
snprintf(tapname, sizeof tapname, USERMODEDEVICEDIR "%s" TAPSUFFIX, device);
|
||||||
|
|
||||||
/* Now we are going to open this device twice: once for reading and once for writing.
|
/* Now we are going to open this device twice: once for reading and once for writing.
|
||||||
We do this because apparently it isn't possible to check for activity in the select() loop.
|
We do this because apparently it isn't possible to check for activity in the select() loop.
|
||||||
Furthermore I don't really know how to do it the "Windows" way. */
|
Furthermore I don't really know how to do it the "Windows" way. */
|
||||||
|
|
||||||
if(socketpair(AF_UNIX, SOCK_DGRAM, PF_UNIX, sp)) {
|
if(socketpair(AF_UNIX, SOCK_DGRAM, PF_UNIX, sp)) {
|
||||||
logger(LOG_DEBUG, "System call `%s' failed: %s", "socketpair", strerror(errno));
|
logger(DEBUG_ALWAYS, LOG_DEBUG, "System call `%s' failed: %s", "socketpair", strerror(errno));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* The parent opens the tap device for writing. */
|
/* The parent opens the tap device for writing. */
|
||||||
|
|
||||||
device_handle = CreateFile(tapname, GENERIC_WRITE, FILE_SHARE_READ, 0, OPEN_EXISTING, FILE_ATTRIBUTE_SYSTEM, 0);
|
device_handle = CreateFile(tapname, GENERIC_WRITE, FILE_SHARE_READ, 0, OPEN_EXISTING, FILE_ATTRIBUTE_SYSTEM , 0);
|
||||||
|
|
||||||
if(device_handle == INVALID_HANDLE_VALUE) {
|
if(device_handle == INVALID_HANDLE_VALUE) {
|
||||||
logger(LOG_ERR, "Could not open Windows tap device %s (%s) for writing: %s", device, iface, winerror(GetLastError()));
|
logger(DEBUG_ALWAYS, LOG_ERR, "Could not open Windows tap device %s (%s) for writing: %s", device, iface, winerror(GetLastError()));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -163,8 +151,8 @@ static bool setup_device(void) {
|
||||||
|
|
||||||
/* Get MAC address from tap device */
|
/* Get MAC address from tap device */
|
||||||
|
|
||||||
if(!DeviceIoControl(device_handle, TAP_IOCTL_GET_MAC, mymac.x, sizeof(mymac.x), mymac.x, sizeof(mymac.x), &len, 0)) {
|
if(!DeviceIoControl(device_handle, TAP_IOCTL_GET_MAC, mymac.x, sizeof mymac.x, mymac.x, sizeof mymac.x, &len, 0)) {
|
||||||
logger(LOG_ERR, "Could not get MAC address from Windows tap device %s (%s): %s", device, iface, winerror(GetLastError()));
|
logger(DEBUG_ALWAYS, LOG_ERR, "Could not get MAC address from Windows tap device %s (%s): %s", device, iface, winerror(GetLastError()));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -177,7 +165,7 @@ static bool setup_device(void) {
|
||||||
reader_pid = fork();
|
reader_pid = fork();
|
||||||
|
|
||||||
if(reader_pid == -1) {
|
if(reader_pid == -1) {
|
||||||
logger(LOG_DEBUG, "System call `%s' failed: %s", "fork", strerror(errno));
|
logger(DEBUG_ALWAYS, LOG_DEBUG, "System call `%s' failed: %s", "fork", strerror(errno));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -186,20 +174,20 @@ static bool setup_device(void) {
|
||||||
It passes everything it reads to the socket. */
|
It passes everything it reads to the socket. */
|
||||||
|
|
||||||
char buf[MTU];
|
char buf[MTU];
|
||||||
long lenin;
|
long inlen;
|
||||||
|
|
||||||
CloseHandle(device_handle);
|
CloseHandle(device_handle);
|
||||||
|
|
||||||
device_handle = CreateFile(tapname, GENERIC_READ, FILE_SHARE_WRITE, 0, OPEN_EXISTING, FILE_ATTRIBUTE_SYSTEM, 0);
|
device_handle = CreateFile(tapname, GENERIC_READ, FILE_SHARE_WRITE, 0, OPEN_EXISTING, FILE_ATTRIBUTE_SYSTEM, 0);
|
||||||
|
|
||||||
if(device_handle == INVALID_HANDLE_VALUE) {
|
if(device_handle == INVALID_HANDLE_VALUE) {
|
||||||
logger(LOG_ERR, "Could not open Windows tap device %s (%s) for reading: %s", device, iface, winerror(GetLastError()));
|
logger(DEBUG_ALWAYS, LOG_ERR, "Could not open Windows tap device %s (%s) for reading: %s", device, iface, winerror(GetLastError()));
|
||||||
buf[0] = 0;
|
buf[0] = 0;
|
||||||
write(sp[1], buf, 1);
|
write(sp[1], buf, 1);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
logger(LOG_DEBUG, "Tap reader forked and running.");
|
logger(DEBUG_ALWAYS, LOG_DEBUG, "Tap reader forked and running.");
|
||||||
|
|
||||||
/* Notify success */
|
/* Notify success */
|
||||||
|
|
||||||
|
|
@ -209,19 +197,20 @@ static bool setup_device(void) {
|
||||||
/* Pass packets */
|
/* Pass packets */
|
||||||
|
|
||||||
for(;;) {
|
for(;;) {
|
||||||
ReadFile(device_handle, buf, MTU, &lenin, NULL);
|
ReadFile(device_handle, buf, MTU, &inlen, NULL);
|
||||||
write(sp[1], buf, lenin);
|
write(sp[1], buf, inlen);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
read(device_fd, &gelukt, 1);
|
read(device_fd, &gelukt, 1);
|
||||||
|
|
||||||
if(gelukt != 1) {
|
if(gelukt != 1) {
|
||||||
logger(LOG_DEBUG, "Tap reader failed!");
|
logger(DEBUG_ALWAYS, LOG_DEBUG, "Tap reader failed!");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
logger(LOG_INFO, "%s (%s) is a %s", device, iface, device_info);
|
device_info = "Windows tap device";
|
||||||
|
|
||||||
|
logger(DEBUG_ALWAYS, LOG_INFO, "%s (%s) is a %s", device, iface, device_info);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
@ -238,32 +227,32 @@ static void close_device(void) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool read_packet(vpn_packet_t *packet) {
|
static bool read_packet(vpn_packet_t *packet) {
|
||||||
int lenin;
|
int inlen;
|
||||||
|
|
||||||
if((lenin = read(sp[0], packet->data, MTU)) <= 0) {
|
if((inlen = read(sp[0], packet->data, MTU)) <= 0) {
|
||||||
logger(LOG_ERR, "Error while reading from %s %s: %s", device_info,
|
logger(DEBUG_ALWAYS, LOG_ERR, "Error while reading from %s %s: %s", device_info,
|
||||||
device, strerror(errno));
|
device, strerror(errno));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
packet->len = lenin;
|
packet->len = inlen;
|
||||||
|
|
||||||
device_total_in += packet->len;
|
device_total_in += packet->len;
|
||||||
|
|
||||||
ifdebug(TRAFFIC) logger(LOG_DEBUG, "Read packet of %d bytes from %s", packet->len,
|
logger(DEBUG_TRAFFIC, LOG_DEBUG, "Read packet of %d bytes from %s", packet->len,
|
||||||
device_info);
|
device_info);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool write_packet(vpn_packet_t *packet) {
|
static bool write_packet(vpn_packet_t *packet) {
|
||||||
long lenout;
|
long outlen;
|
||||||
|
|
||||||
ifdebug(TRAFFIC) logger(LOG_DEBUG, "Writing packet of %d bytes to %s",
|
logger(DEBUG_TRAFFIC, LOG_DEBUG, "Writing packet of %d bytes to %s",
|
||||||
packet->len, device_info);
|
packet->len, device_info);
|
||||||
|
|
||||||
if(!WriteFile(device_handle, packet->data, packet->len, &lenout, NULL)) {
|
if(!WriteFile (device_handle, packet->data, packet->len, &outlen, NULL)) {
|
||||||
logger(LOG_ERR, "Error while writing to %s %s: %s", device_info, device, winerror(GetLastError()));
|
logger(DEBUG_ALWAYS, LOG_ERR, "Error while writing to %s %s: %s", device_info, device, winerror(GetLastError()));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -273,9 +262,9 @@ static bool write_packet(vpn_packet_t *packet) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static void dump_device_stats(void) {
|
static void dump_device_stats(void) {
|
||||||
logger(LOG_DEBUG, "Statistics for %s %s:", device_info, device);
|
logger(DEBUG_ALWAYS, LOG_DEBUG, "Statistics for %s %s:", device_info, device);
|
||||||
logger(LOG_DEBUG, " total bytes in: %10"PRIu64, device_total_in);
|
logger(DEBUG_ALWAYS, LOG_DEBUG, " total bytes in: %10"PRIu64, device_total_in);
|
||||||
logger(LOG_DEBUG, " total bytes out: %10"PRIu64, device_total_out);
|
logger(DEBUG_ALWAYS, LOG_DEBUG, " total bytes out: %10"PRIu64, device_total_out);
|
||||||
}
|
}
|
||||||
|
|
||||||
const devops_t os_devops = {
|
const devops_t os_devops = {
|
||||||
|
|
|
||||||
18
src/device.h
18
src/device.h
|
|
@ -1,6 +1,3 @@
|
||||||
#ifndef TINC_DEVICE_H
|
|
||||||
#define TINC_DEVICE_H
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
device.h -- generic header for device.c
|
device.h -- generic header for device.c
|
||||||
Copyright (C) 2001-2005 Ivo Timmermans
|
Copyright (C) 2001-2005 Ivo Timmermans
|
||||||
|
|
@ -21,18 +18,25 @@
|
||||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifndef __TINC_DEVICE_H__
|
||||||
|
#define __TINC_DEVICE_H__
|
||||||
|
|
||||||
#include "net.h"
|
#include "net.h"
|
||||||
|
|
||||||
extern int device_fd;
|
extern int device_fd;
|
||||||
extern char *device;
|
extern char *device;
|
||||||
|
|
||||||
extern char *iface;
|
extern char *iface;
|
||||||
|
|
||||||
|
extern uint64_t device_in_packets;
|
||||||
|
extern uint64_t device_in_bytes;
|
||||||
|
extern uint64_t device_out_packets;
|
||||||
|
extern uint64_t device_out_bytes;
|
||||||
|
|
||||||
typedef struct devops_t {
|
typedef struct devops_t {
|
||||||
bool (*setup)(void);
|
bool (*setup)(void);
|
||||||
void (*close)(void);
|
void (*close)(void);
|
||||||
bool (*read)(struct vpn_packet_t *packet);
|
bool (*read)(struct vpn_packet_t *);
|
||||||
bool (*write)(struct vpn_packet_t *packet);
|
bool (*write)(struct vpn_packet_t *);
|
||||||
void (*dump_stats)(void);
|
void (*dump_stats)(void);
|
||||||
} devops_t;
|
} devops_t;
|
||||||
|
|
||||||
|
|
@ -44,4 +48,4 @@ extern const devops_t uml_devops;
|
||||||
extern const devops_t vde_devops;
|
extern const devops_t vde_devops;
|
||||||
extern devops_t devops;
|
extern devops_t devops;
|
||||||
|
|
||||||
#endif
|
#endif /* __TINC_DEVICE_H__ */
|
||||||
|
|
|
||||||
39
src/digest.h
Normal file
39
src/digest.h
Normal file
|
|
@ -0,0 +1,39 @@
|
||||||
|
/*
|
||||||
|
digest.h -- header file digest.c
|
||||||
|
Copyright (C) 2007-2013 Guus Sliepen <guus@tinc-vpn.org>
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along
|
||||||
|
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __TINC_DIGEST_H__
|
||||||
|
#define __TINC_DIGEST_H__
|
||||||
|
|
||||||
|
#define DIGEST_MAX_SIZE 64
|
||||||
|
|
||||||
|
typedef struct digest digest_t;
|
||||||
|
|
||||||
|
extern digest_t *digest_open_by_name(const char *name, int maclength) __attribute__ ((__malloc__));
|
||||||
|
extern digest_t *digest_open_by_nid(int nid, int maclength) __attribute__ ((__malloc__));
|
||||||
|
extern digest_t *digest_open_sha1(int maclength) __attribute__ ((__malloc__));
|
||||||
|
extern void digest_close(digest_t *);
|
||||||
|
extern bool digest_create(digest_t *, const void *indata, size_t inlen, void *outdata) __attribute__ ((__warn_unused_result__));
|
||||||
|
extern bool digest_verify(digest_t *, const void *indata, size_t inlen, const void *digestdata) __attribute__ ((__warn_unused_result__));
|
||||||
|
extern bool digest_set_key(digest_t *, const void *key, size_t len) __attribute__ ((__warn_unused_result__));
|
||||||
|
extern int digest_get_nid(const digest_t *);
|
||||||
|
extern size_t digest_keylength(const digest_t *);
|
||||||
|
extern size_t digest_length(const digest_t *);
|
||||||
|
extern bool digest_active(const digest_t *);
|
||||||
|
|
||||||
|
#endif
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue