diff options
author | Paolo Pisati <piso@FreeBSD.org> | 2006-09-26 23:26:53 +0000 |
---|---|---|
committer | Paolo Pisati <piso@FreeBSD.org> | 2006-09-26 23:26:53 +0000 |
commit | be4f3cd0d9c4f0d7755b1bf24c59ca26c336dccf (patch) | |
tree | 5e258090de6b0498a8722ea100fedca736af05b6 /lib | |
parent | 31e2a87d4d16b038515e512cc2489f3551963ff4 (diff) | |
download | src-be4f3cd0d9c4f0d7755b1bf24c59ca26c336dccf.tar.gz src-be4f3cd0d9c4f0d7755b1bf24c59ca26c336dccf.zip |
Summer of Code 2005: improve libalias - part 1 of 2
With the first part of my previous Summer of Code work, we get:
-made libalias modular:
-support for 'particular' protocols (like ftp/irc/etcetc) is no more
hardcoded inside libalias, but it's available through external
modules loadable at runtime
-modules are available both in kernel (/boot/kernel/alias_*.ko) and
user land (/lib/libalias_*)
-protocols/applications modularized are: cuseeme, ftp, irc, nbt, pptp,
skinny and smedia
-added logging support for kernel side
-cleanup
After a buildworld, do a 'mergemaster -i' to install the file libalias.conf
in /etc or manually copy it.
During startup (and after every HUP signal) user land applications running
the new libalias will try to read a file in /etc called libalias.conf:
that file contains the list of modules to load.
User land applications affected by this commit are ppp and natd:
if libalias.conf is present in /etc you won't notice any difference.
The only kernel land bit affected by this commit is ng_nat:
if you are using ng_nat, and it doesn't correctly handle
ftp/irc/etcetc sessions anymore, remember to kldload
the correspondent module (i.e. kldload alias_ftp).
General information and details about the inner working are available
in the libalias man page under the section 'MODULAR ARCHITECTURE
(AND ipfw(4) SUPPORT)'.
NOTA BENE: this commit affects _ONLY_ libalias, ipfw in-kernel nat
support will be part of the next libalias-related commit.
Approved by: glebius
Reviewed by: glebius, ru
Notes
Notes:
svn path=/head/; revision=162674
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libalias/Makefile | 39 | ||||
-rw-r--r-- | lib/libalias/libalias/Makefile | 13 | ||||
-rw-r--r-- | lib/libalias/modules/Makefile | 7 | ||||
-rw-r--r-- | lib/libalias/modules/Makefile.inc | 7 | ||||
-rw-r--r-- | lib/libalias/modules/cuseeme/Makefile | 6 | ||||
-rw-r--r-- | lib/libalias/modules/dummy/Makefile | 6 | ||||
-rw-r--r-- | lib/libalias/modules/ftp/Makefile | 6 | ||||
-rw-r--r-- | lib/libalias/modules/irc/Makefile | 6 | ||||
-rw-r--r-- | lib/libalias/modules/nbt/Makefile | 6 | ||||
-rw-r--r-- | lib/libalias/modules/pptp/Makefile | 6 | ||||
-rw-r--r-- | lib/libalias/modules/skinny/Makefile | 6 | ||||
-rw-r--r-- | lib/libalias/modules/smedia/Makefile | 6 |
12 files changed, 101 insertions, 13 deletions
diff --git a/lib/libalias/Makefile b/lib/libalias/Makefile index 465216a9c1c3..1b5ec952e2d5 100644 --- a/lib/libalias/Makefile +++ b/lib/libalias/Makefile @@ -1,16 +1,29 @@ +# Copyright 2006 Paolo Pisati <piso@FreeBSD.org> +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# # $FreeBSD$ -.PATH: ${.CURDIR}/../../sys/netinet/libalias +SUBDIR= libalias modules -LIB= alias -SHLIBDIR?= /lib -SHLIB_MAJOR= 5 -MAN= libalias.3 -SRCS= alias.c alias_cuseeme.c alias_db.c alias_ftp.c alias_irc.c \ - alias_nbt.c alias_pptp.c alias_proxy.c alias_skinny.c alias_smedia.c \ - alias_util.c alias_old.c -INCS= alias.h -WARNS?= 6 -NO_WERROR= - -.include <bsd.lib.mk> +.include <bsd.subdir.mk> diff --git a/lib/libalias/libalias/Makefile b/lib/libalias/libalias/Makefile new file mode 100644 index 000000000000..29a234dee369 --- /dev/null +++ b/lib/libalias/libalias/Makefile @@ -0,0 +1,13 @@ +# $FreeBSD$ + +.PATH: ${.CURDIR}/../../../sys/netinet/libalias + +LIB= alias +SHLIBDIR?= /lib +SHLIB_MAJOR= 5 +MAN= libalias.3 +SRCS= alias.c alias_db.c alias_proxy.c alias_util.c alias_old.c alias_mod.c +INCS= alias.h +WARNS?= 6 + +.include <bsd.lib.mk> diff --git a/lib/libalias/modules/Makefile b/lib/libalias/modules/Makefile new file mode 100644 index 000000000000..e4aa76724816 --- /dev/null +++ b/lib/libalias/modules/Makefile @@ -0,0 +1,7 @@ +# $FreeBSD$ + +.include "../../../sys/modules/libalias/modules/modules.inc" + +SUBDIR= ${MODULES} + +.include <bsd.subdir.mk> diff --git a/lib/libalias/modules/Makefile.inc b/lib/libalias/modules/Makefile.inc new file mode 100644 index 000000000000..df92be4e5a39 --- /dev/null +++ b/lib/libalias/modules/Makefile.inc @@ -0,0 +1,7 @@ +# $FreeBSD$ + +.PATH: ${.CURDIR}/../../../../sys/netinet/libalias + +SHLIBDIR?= /lib +SHLIB_MAJOR= 4 +WARNS?= 1 diff --git a/lib/libalias/modules/cuseeme/Makefile b/lib/libalias/modules/cuseeme/Makefile new file mode 100644 index 000000000000..482ce93a76ca --- /dev/null +++ b/lib/libalias/modules/cuseeme/Makefile @@ -0,0 +1,6 @@ +# $FreeBSD$ + +LIB= alias_cuseeme +SRCS= alias_cuseeme.c + +.include <bsd.lib.mk> diff --git a/lib/libalias/modules/dummy/Makefile b/lib/libalias/modules/dummy/Makefile new file mode 100644 index 000000000000..a79ca855ea61 --- /dev/null +++ b/lib/libalias/modules/dummy/Makefile @@ -0,0 +1,6 @@ +# $FreeBSD$ + +LIB= alias_dummy +SRCS= alias_dummy.c + +.include <bsd.lib.mk> diff --git a/lib/libalias/modules/ftp/Makefile b/lib/libalias/modules/ftp/Makefile new file mode 100644 index 000000000000..4865fa2ef536 --- /dev/null +++ b/lib/libalias/modules/ftp/Makefile @@ -0,0 +1,6 @@ +# $FreeBSD$ + +LIB= alias_ftp +SRCS= alias_ftp.c + +.include <bsd.lib.mk> diff --git a/lib/libalias/modules/irc/Makefile b/lib/libalias/modules/irc/Makefile new file mode 100644 index 000000000000..98f4e853605f --- /dev/null +++ b/lib/libalias/modules/irc/Makefile @@ -0,0 +1,6 @@ +# $FreeBSD$ + +LIB= alias_irc +SRCS= alias_irc.c + +.include <bsd.lib.mk> diff --git a/lib/libalias/modules/nbt/Makefile b/lib/libalias/modules/nbt/Makefile new file mode 100644 index 000000000000..c26b5d90a669 --- /dev/null +++ b/lib/libalias/modules/nbt/Makefile @@ -0,0 +1,6 @@ +# $FreeBSD$ + +LIB= alias_nbt +SRCS= alias_nbt.c + +.include <bsd.lib.mk> diff --git a/lib/libalias/modules/pptp/Makefile b/lib/libalias/modules/pptp/Makefile new file mode 100644 index 000000000000..69d8e617a1f1 --- /dev/null +++ b/lib/libalias/modules/pptp/Makefile @@ -0,0 +1,6 @@ +# $FreeBSD$ + +LIB= alias_pptp +SRCS= alias_pptp.c + +.include <bsd.lib.mk> diff --git a/lib/libalias/modules/skinny/Makefile b/lib/libalias/modules/skinny/Makefile new file mode 100644 index 000000000000..f554e9cec4fd --- /dev/null +++ b/lib/libalias/modules/skinny/Makefile @@ -0,0 +1,6 @@ +# $FreeBSD$ + +LIB= alias_skinny +SRCS= alias_skinny.c + +.include <bsd.lib.mk> diff --git a/lib/libalias/modules/smedia/Makefile b/lib/libalias/modules/smedia/Makefile new file mode 100644 index 000000000000..56c4ddd2a29b --- /dev/null +++ b/lib/libalias/modules/smedia/Makefile @@ -0,0 +1,6 @@ +# $FreeBSD$ + +LIB= alias_smedia +SRCS= alias_smedia.c + +.include <bsd.lib.mk> |