summaryrefslogtreecommitdiffstats
path: root/sys/netinet/libalias/alias.h
diff options
context:
space:
mode:
authorpiso <piso@FreeBSD.org>2006-09-26 23:26:53 +0000
committerpiso <piso@FreeBSD.org>2006-09-26 23:26:53 +0000
commit5582e56d9d09f5f753111b270859af3d97ffd499 (patch)
tree5e258090de6b0498a8722ea100fedca736af05b6 /sys/netinet/libalias/alias.h
parente502090edb1afbf157ab5a195f23b62ac65279e1 (diff)
downloadFreeBSD-src-5582e56d9d09f5f753111b270859af3d97ffd499.zip
FreeBSD-src-5582e56d9d09f5f753111b270859af3d97ffd499.tar.gz
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
Diffstat (limited to 'sys/netinet/libalias/alias.h')
-rw-r--r--sys/netinet/libalias/alias.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/sys/netinet/libalias/alias.h b/sys/netinet/libalias/alias.h
index 2c50943..4a809f4 100644
--- a/sys/netinet/libalias/alias.h
+++ b/sys/netinet/libalias/alias.h
@@ -28,7 +28,7 @@
* $FreeBSD$
*/
-/*-
+/*
* Alias.h defines the outside world interfaces for the packet aliasing
* software.
*
@@ -39,12 +39,16 @@
#ifndef _ALIAS_H_
#define _ALIAS_H_
+#include <netinet/in_systm.h>
+#include <netinet/in.h>
+#include <netinet/ip.h>
+
+#define LIBALIAS_BUF_SIZE 128
#ifdef _KERNEL
/*
* The kernel version of libalias does not support these features.
*/
#define NO_FW_PUNCH
-#define NO_LOGGING
#define NO_USE_SOCKETS
#endif
@@ -180,6 +184,10 @@ void LibAliasSetTarget(struct libalias *, struct in_addr _target_addr);
/* Transparent proxying routines. */
int LibAliasProxyRule(struct libalias *, const char *_cmd);
+/* Module handling API */
+int LibAliasLoadModule(char *);
+int LibAliasUnLoadAllModule(void);
+int LibAliasRefreshModules(void);
/*
* Mode flags and other constants.
@@ -192,9 +200,7 @@ int LibAliasProxyRule(struct libalias *, const char *_cmd);
* If PKT_ALIAS_LOG is set, a message will be printed to /var/log/alias.log
* every time a link is created or deleted. This is useful for debugging.
*/
-#ifndef NO_LOGGING
#define PKT_ALIAS_LOG 0x01
-#endif
/*
* If PKT_ALIAS_DENY_INCOMING is set, then incoming connections (e.g. to ftp,
OpenPOWER on IntegriCloud