summaryrefslogtreecommitdiff
path: root/include/conntrack.h
diff options
context:
space:
mode:
author/C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=pablo/emailAddress=pablo@netfilter.org </C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=pablo/emailAddress=pablo@netfilter.org>2005-10-16 21:46:30 +0000
committer/C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=pablo/emailAddress=pablo@netfilter.org </C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=pablo/emailAddress=pablo@netfilter.org>2005-10-16 21:46:30 +0000
commitbc7c1f1a4a6a5e003f66df2bab082fa521e9bb5e (patch)
treea063aa8451d6dd1db54b52c67d9bf4c2f632c99d /include/conntrack.h
parentda9b980f8d34c436b31d5a0a09b4ea27849c9c82 (diff)
downloadconntrack-tools-bc7c1f1a4a6a5e003f66df2bab082fa521e9bb5e.tar.gz
conntrack-tools-bc7c1f1a4a6a5e003f66df2bab082fa521e9bb5e.zip
See ChangeLog
Diffstat (limited to 'include/conntrack.h')
-rw-r--r--include/conntrack.h53
1 files changed, 53 insertions, 0 deletions
diff --git a/include/conntrack.h b/include/conntrack.h
new file mode 100644
index 0000000..db434d6
--- /dev/null
+++ b/include/conntrack.h
@@ -0,0 +1,53 @@
+#ifndef _LIBCT_PROTO_H
+#define _LIBCT_PROTO_H
+
+#include "linux_list.h"
+#include <getopt.h>
+#include <libnetfilter_conntrack/libnetfilter_conntrack.h>
+
+#define LIBCT_VERSION "0.1.0"
+
+/* FIXME: These should be independent from kernel space */
+#define IPS_ASSURED (1 << 2)
+#define IPS_SEEN_REPLY (1 << 1)
+#define IPS_SRC_NAT_DONE (1 << 7)
+#define IPS_DST_NAT_DONE (1 << 8)
+#define IPS_CONFIRMED (1 << 3)
+
+struct ctproto_handler {
+ struct list_head head;
+
+ char *name;
+ u_int16_t protonum;
+ char *version;
+
+ enum ctattr_protoinfo protoinfo_attr;
+
+ int (*parse_opts)(char c, char *argv[],
+ struct nfct_tuple *orig,
+ struct nfct_tuple *reply,
+ struct nfct_tuple *mask,
+ union nfct_protoinfo *proto,
+ unsigned int *flags);
+
+ int (*final_check)(unsigned int flags,
+ struct nfct_tuple *orig,
+ struct nfct_tuple *reply);
+
+ void (*help)();
+
+ struct option *opts;
+
+ unsigned int option_offset;
+};
+
+extern void register_proto(struct ctproto_handler *h);
+extern void unregister_proto(struct ctproto_handler *h);
+
+#define NIPQUAD(addr) \
+ ((unsigned char *)&addr)[0], \
+ ((unsigned char *)&addr)[1], \
+ ((unsigned char *)&addr)[2], \
+ ((unsigned char *)&addr)[3]
+
+#endif