summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrusty <rusty>2000-07-30 22:25:59 +0000
committerrusty <rusty>2000-07-30 22:25:59 +0000
commite7f8529a4c04b7c0c0df0eea3fd7f510cd1d1b2d (patch)
tree551eb07cc4e5367f16b3f8114f0a2da4552ec30b
parent872609af2f2f6468a286c572d3cf122496c4d2de (diff)
Harald Welte's ULOG target with tests (untested).
-rw-r--r--extensions/Makefile2
-rw-r--r--include/libipulog/libipulog.h30
2 files changed, 31 insertions, 1 deletions
diff --git a/extensions/Makefile b/extensions/Makefile
index 04fd896..358940b 100644
--- a/extensions/Makefile
+++ b/extensions/Makefile
@@ -1,6 +1,6 @@
#! /usr/bin/make
-PF_EXT_SLIB:=tcp udp icmp mac limit standard REJECT LOG unclean state multiport tos TOS mark MARK owner SNAT DNAT MASQUERADE REDIRECT
+PF_EXT_SLIB:=tcp udp icmp mac limit standard REJECT LOG unclean state multiport tos TOS mark MARK owner SNAT DNAT MASQUERADE REDIRECT ULOG
PF6_EXT_SLIB:=tcp udp icmp standard
SHARED_LIBS+=$(foreach T,$(PF_EXT_SLIB),extensions/libipt_$(T).so)
SHARED_LIBS+=$(foreach T,$(PF6_EXT_SLIB),extensions/libip6t_$(T).so)
diff --git a/include/libipulog/libipulog.h b/include/libipulog/libipulog.h
new file mode 100644
index 0000000..9f920dd
--- /dev/null
+++ b/include/libipulog/libipulog.h
@@ -0,0 +1,30 @@
+#ifndef _LIBIPULOG_H
+#define _LIBIPULOG_H
+
+#include <errno.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/uio.h>
+#include <asm/types.h>
+#include <linux/netlink.h>
+#include <net/if.h>
+#include <linux/netfilter_ipv4/ipt_ULOG.h>
+
+struct ipulog_handle;
+
+u_int32_t ipulog_group2gmask(u_int32_t group);
+
+struct ipulog_handle *ipulog_create_handle(u_int32_t gmask);
+
+void ipulog_destroy_handle(struct ipulog_handle *h);
+
+ssize_t ipulog_read(struct ipulog_handle *h,
+ unsigned char *buf, size_t len, int timeout);
+
+ulog_packet_msg_t *ipulog_get_packet(const unsigned char *buf);
+
+void ipulog_perror(const char *s);
+
+#endif /* _LIBULOG_H */