summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/Makefile.am2
-rw-r--r--include/libct_proto.h9
-rw-r--r--include/libctnetlink.h72
-rw-r--r--include/libnfnetlink.h50
4 files changed, 10 insertions, 123 deletions
diff --git a/include/Makefile.am b/include/Makefile.am
new file mode 100644
index 0000000..f91ed48
--- /dev/null
+++ b/include/Makefile.am
@@ -0,0 +1,2 @@
+
+include_HEADERS = libct_proto.h linux_list.h
diff --git a/include/libct_proto.h b/include/libct_proto.h
index 416d916..1049cef 100644
--- a/include/libct_proto.h
+++ b/include/libct_proto.h
@@ -1,9 +1,15 @@
#ifndef _LIBCT_PROTO_H
#define _LIBCT_PROTO_H
+/* FIXME: Rename this file pablo... */
+
#include "linux_list.h"
#include <getopt.h>
+#define CONNTRACK_LIB_DIR "/usr/local/lib"
+
+struct cta_proto;
+
struct ctproto_handler {
struct list_head head;
@@ -15,7 +21,8 @@ struct ctproto_handler {
struct ip_conntrack_tuple *reply,
union ip_conntrack_proto *proto,
unsigned int *flags);
- void (*print)(struct ip_conntrack_tuple *t);
+ void (*print_tuple)(struct ip_conntrack_tuple *t);
+ void (*print_proto)(union ip_conntrack_proto *proto);
int (*final_check)(unsigned int flags);
diff --git a/include/libctnetlink.h b/include/libctnetlink.h
deleted file mode 100644
index 2cba075..0000000
--- a/include/libctnetlink.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/* libctnetlink.h: Header file for the Connection Tracking library.
- *
- * Jay Schulist <jschlst@samba.org>, Copyright (c) 2001.
- * (C) 2002 by Harald Welte <laforge@gnumonks.org>
- *
- * This software may be used and distributed according to the terms
- * of the GNU General Public License, incorporated herein by reference.
- */
-
-#ifndef __LIBCTNETLINK_H
-#define __LIBCTNETLINK_H
-
-#include <netinet/in.h>
-#include <asm/types.h>
-#include <linux/if.h>
-#include <linux/netfilter/nfnetlink.h>
-#include <linux/netfilter_ipv4/ip_conntrack.h>
-#include <linux/netfilter_ipv4/ip_conntrack_netlink.h>
-#include "libnfnetlink.h"
-
-#define CTNL_BUFFSIZE 8192
-
-struct ctnl_msg_handler {
- int type;
- int (*handler)(struct sockaddr_nl *, struct nlmsghdr *, void *arg);
-};
-
-struct ctnl_handle {
- struct nfnl_handle nfnlh;
- struct ctnl_msg_handler *handler[IPCTNL_MSG_COUNT];
-};
-
-extern int ctnl_open(struct ctnl_handle *cth, unsigned subscriptions);
-extern int ctnl_close(struct ctnl_handle *cth);
-extern int ctnl_unregister_handler(struct ctnl_handle *cth, int type);
-extern int ctnl_register_handler(struct ctnl_handle *cth,
- struct ctnl_msg_handler *hndlr);
-extern int ctnl_get_conntrack(struct ctnl_handle *cth,
- struct ip_conntrack_tuple *tuple,
- enum ctattr_type_t t,
- unsigned long id);
-extern int ctnl_del_conntrack(struct ctnl_handle *cth,
- struct ip_conntrack_tuple *tuple,
- enum ctattr_type_t t,
- unsigned long id);
-extern int ctnl_list_conntrack(struct ctnl_handle *cth, int family);
-
-extern int ctnl_list_expect(struct ctnl_handle *cth, int family);
-extern int ctnl_del_expect(struct ctnl_handle *cth,
- struct ip_conntrack_tuple *t);
-
-#if 0
-extern int ctnl_listen(struct ctnl_handle *ctnl,
- int (*handler)(struct sockaddr_nl *, struct nlmsghdr *n, void *),
- void *jarg);
-extern int ctnl_talk(struct ctnl_handle *ctnl, struct nlmsghdr *n, pid_t peer,
- unsigned groups, struct nlmsghdr *answer,
- int (*junk)(struct sockaddr_nl *, struct nlmsghdr *n, void *),
- void *jarg);
-extern int ctnl_dump_request(struct ctnl_handle *cth, int type, void *req,
- int len);
-extern int ctnl_dump_filter(struct ctnl_handle *cth,
- int (*filter)(struct sockaddr_nl *, struct nlmsghdr *n, void *),
- void *arg1,
- int (*junk)(struct sockaddr_nl *,struct nlmsghdr *n, void *),
- void *arg2);
-#endif
-
-extern int ctnl_send(struct ctnl_handle *cth, struct nlmsghdr *n);
-extern int ctnl_wilddump_request(struct ctnl_handle *cth, int family, int type);
-
-#endif /* __LIBCTNETLINK_H */
diff --git a/include/libnfnetlink.h b/include/libnfnetlink.h
deleted file mode 100644
index 944e607..0000000
--- a/include/libnfnetlink.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/* libnfnetlink.h: Header file for generic netfilter netlink interface
- *
- * (C) 2002 Harald Welte <laforge@gnumonks.org>
- */
-
-#ifndef __LIBNFNETLINK_H
-#define __LIBNFNETLINK_H
-
-#include <linux/types.h>
-#include <linux/netlink.h>
-#include <linux/netfilter/nfnetlink.h>
-
-#define NFNL_BUFFSIZE 8192
-
-struct nfnl_handle {
- int fd;
- struct sockaddr_nl local;
- struct sockaddr_nl peer;
- u_int8_t subsys_id;
- u_int32_t seq;
- u_int32_t dump;
-};
-
-/* get a new library handle */
-extern int nfnl_open(struct nfnl_handle *, u_int8_t, unsigned int);
-extern int nfnl_close(struct nfnl_handle *);
-extern int nfnl_send(struct nfnl_handle *, struct nlmsghdr *);
-
-
-extern void nfnl_fill_hdr(struct nfnl_handle *, struct nlmsghdr *, int,
- u_int8_t, u_int16_t, u_int16_t);
-
-extern int nfnl_listen(struct nfnl_handle *,
- int (*)(struct sockaddr_nl *, struct nlmsghdr *, void *),
- void *);
-
-extern int nfnl_talk(struct nfnl_handle *, struct nlmsghdr *, pid_t,
- unsigned, struct nlmsghdr *,
- int (*)(struct sockaddr_nl *, struct nlmsghdr *, void *),
- void *);
-
-/* nfnl attribute handling functions */
-extern int nfnl_addattr_l(struct nlmsghdr *, int, int, void *, int);
-extern int nfnl_addattr32(struct nlmsghdr *, int, int, u_int32_t);
-extern int nfnl_nfa_addattr_l(struct nfattr *, int, int, void *, int);
-extern int nfnl_nfa_addattr32(struct nfattr *, int, int, u_int32_t);
-extern int nfnl_parse_attr(struct nfattr **, int, struct nfattr *, int);
-
-extern void nfnl_dump_packet(struct nlmsghdr *, int, char *);
-#endif /* __LIBNFNETLINK_H */