diff options
author | laforge <laforge> | 2000-11-16 21:15:29 +0000 |
---|---|---|
committer | laforge <laforge> | 2000-11-16 21:15:29 +0000 |
commit | 58ee76c3d9db7c2b12f8b504415917afdd6abec0 (patch) | |
tree | d2d72a93418039e4893e6274689e8e1ae3600b53 /ulogd/ulogd.c | |
parent | 100b59f4bd207ac36aca39b6f011efbb132fe1cf (diff) |
- new syslog emulation output target
- lot of bugfixes
Diffstat (limited to 'ulogd/ulogd.c')
-rw-r--r-- | ulogd/ulogd.c | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/ulogd/ulogd.c b/ulogd/ulogd.c index 883c91e..a60cf5f 100644 --- a/ulogd/ulogd.c +++ b/ulogd/ulogd.c @@ -1,4 +1,4 @@ -/* ulogd, Version $Revision: 1.10 $ +/* ulogd, Version $Revision: 1.11 $ * * first try of a logging daemon for my netfilter ULOG target * for the linux 2.4 netfilter subsystem. @@ -7,7 +7,7 @@ * * this code is released under the terms of GNU GPL * - * $Id: ulogd.c,v 1.10 2000/09/12 14:29:37 laforge Exp $ + * $Id: ulogd.c,v 1.11 2000/11/16 17:20:52 laforge Exp $ */ #include <stdio.h> @@ -94,13 +94,7 @@ static void interh_dump(void) } -struct ulogd_keyh_entry { - ulog_interpreter_t *interp; /* interpreter for this key */ - unsigned int offset; /* offset within interpreter */ - const char *name; /* name of this particular key */ -}; - -static struct ulogd_keyh_entry ulogd_keyh[100]; +struct ulogd_keyh_entry ulogd_keyh[100]; static unsigned int ulogd_keyh_ids; /* allocate a new key_id */ @@ -146,6 +140,17 @@ inline char *keyh_getname(unsigned int id) return ulogd_keyh[id].interp->name; } +ulog_iret_t *keyh_getres(unsigned int id) +{ + ulog_iret_t *ret; + + ret = &ulogd_keyh[id].interp->result[ulogd_keyh[id].offset]; + + if (ret->flags & ULOGD_RETF_VALID) + return ret; + + return NULL; +} /* try to lookup a registered interpreter for a given name */ static ulog_interpreter_t *find_interpreter(const char *name) @@ -369,7 +374,7 @@ static int parse_conffile(int final) break; case -ERRUNKN: ulogd_error("ERROR: unknown config key\n"); - config_errce->key); +/* config_errce->key); */ break; } return 1; |