diff options
author | laforge <laforge> | 2002-07-30 07:04:11 +0000 |
---|---|---|
committer | laforge <laforge> | 2002-07-30 07:04:11 +0000 |
commit | 270ccfe33eae61dbd55019486b4a5546baae7491 (patch) | |
tree | 798639008f16c387b3e7264192de1b5132cf13b0 /ulogd/libipulog/libipulog.c | |
parent | 73583514fdffa7470441a2123a771a68a2073083 (diff) |
- if ipulog_read fails, print errno and ulog_errno
- close stdin and call setsid() when we daemonize
- make logfile rotate work
- add comment about log levels to ulogd.conf
Diffstat (limited to 'ulogd/libipulog/libipulog.c')
-rw-r--r-- | ulogd/libipulog/libipulog.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/ulogd/libipulog/libipulog.c b/ulogd/libipulog/libipulog.c index 10fb833..bee0038 100644 --- a/ulogd/libipulog/libipulog.c +++ b/ulogd/libipulog/libipulog.c @@ -1,5 +1,5 @@ /* - * libipulog.c, $Revision: 1.8 $ + * libipulog.c, $Revision: 1.9 $ * * netfilter ULOG userspace library. * @@ -21,7 +21,7 @@ * This library is still under development, so be aware of sudden interface * changes * - * $Id: libipulog.c,v 1.8 2001/07/04 00:22:54 laforge Exp $ + * $Id: libipulog.c,v 1.9 2001/09/01 11:53:41 laforge Exp $ */ #include <stdlib.h> @@ -59,7 +59,7 @@ enum #define IPULOG_MAXERR IPULOG_ERR_INVNL -static int ipulog_errno = IPULOG_ERR_NONE; +int ipulog_errno = IPULOG_ERR_NONE; struct ipulog_errmap_t { @@ -118,16 +118,15 @@ ipulog_netlink_recvfrom(const struct ipulog_handle *h, return status; } -static char *ipulog_strerror(int errcode) +/* public */ + +char *ipulog_strerror(int errcode) { if (errcode < 0 || errcode > IPULOG_MAXERR) errcode = IPULOG_ERR_IMPL; return ipulog_errmap[errcode].message; } - -/* public */ - /* convert a netlink group (1-32) to a group_mask suitable for create_handle */ u_int32_t ipulog_group2gmask(u_int32_t group) { |