summaryrefslogtreecommitdiffstats
path: root/libipulog
diff options
context:
space:
mode:
Diffstat (limited to 'libipulog')
-rw-r--r--libipulog/include/libipulog/libipulog.h4
-rw-r--r--libipulog/libipulog.c13
2 files changed, 9 insertions, 8 deletions
diff --git a/libipulog/include/libipulog/libipulog.h b/libipulog/include/libipulog/libipulog.h
index 698c33f..78f4220 100644
--- a/libipulog/include/libipulog/libipulog.h
+++ b/libipulog/include/libipulog/libipulog.h
@@ -1,7 +1,7 @@
#ifndef _LIBIPULOG_H
#define _LIBIPULOG_H
-/* $Id: libipulog.h,v 1.3 2001/05/21 19:15:16 laforge Exp $ */
+/* $Id: libipulog.h,v 1.4 2001/07/03 14:45:16 laforge Exp $ */
#include <errno.h>
#include <unistd.h>
@@ -35,6 +35,8 @@ ulog_packet_msg_t *ipulog_get_packet(struct ipulog_handle *h,
const unsigned char *buf,
size_t len);
+char *ipulog_strerror(int errcode);
+
void ipulog_perror(const char *s);
#endif /* _LIBULOG_H */
diff --git a/libipulog/libipulog.c b/libipulog/libipulog.c
index 10fb833..bee0038 100644
--- a/libipulog/libipulog.c
+++ b/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)
{