summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--extensions/libct_proto_icmp.c2
-rw-r--r--extensions/libct_proto_sctp.c2
-rw-r--r--extensions/libct_proto_tcp.c2
-rw-r--r--extensions/libct_proto_udp.c2
-rw-r--r--include/conntrack.h7
-rw-r--r--src/conntrack.c19
7 files changed, 19 insertions, 22 deletions
diff --git a/ChangeLog b/ChangeLog
index b0756c8..8d99d04 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2005-10-27
+<pablo@eurodev.net>
+ o Use conntrack VERSION instead of the old LIBCT_VERSION
+ o proto_list and lib_dir are now static
+ o kill dead code: function dump_tuple
+ o Bumped version to 0.92
+
2005-10-25
<eleblond@inl.fr>
o Add missing autogen.sh file
diff --git a/extensions/libct_proto_icmp.c b/extensions/libct_proto_icmp.c
index d7d9d5a..ce42021 100644
--- a/extensions/libct_proto_icmp.c
+++ b/extensions/libct_proto_icmp.c
@@ -105,7 +105,7 @@ static struct ctproto_handler icmp = {
.final_check = final_check,
.help = help,
.opts = opts,
- .version = LIBCT_VERSION,
+ .version = VERSION,
};
void __attribute__ ((constructor)) init(void);
diff --git a/extensions/libct_proto_sctp.c b/extensions/libct_proto_sctp.c
index 5e96dc1..5667d18 100644
--- a/extensions/libct_proto_sctp.c
+++ b/extensions/libct_proto_sctp.c
@@ -143,7 +143,7 @@ static struct ctproto_handler sctp = {
.final_check = final_check,
.help = help,
.opts = opts,
- .version = LIBCT_VERSION,
+ .version = VERSION,
};
void __attribute__ ((constructor)) init(void);
diff --git a/extensions/libct_proto_tcp.c b/extensions/libct_proto_tcp.c
index 97646ab..4f6e113 100644
--- a/extensions/libct_proto_tcp.c
+++ b/extensions/libct_proto_tcp.c
@@ -166,7 +166,7 @@ static struct ctproto_handler tcp = {
.final_check = final_check,
.help = help,
.opts = opts,
- .version = LIBCT_VERSION,
+ .version = VERSION,
};
void __attribute__ ((constructor)) init(void);
diff --git a/extensions/libct_proto_udp.c b/extensions/libct_proto_udp.c
index 0da7bb5..02826cd 100644
--- a/extensions/libct_proto_udp.c
+++ b/extensions/libct_proto_udp.c
@@ -131,7 +131,7 @@ static struct ctproto_handler udp = {
.final_check = final_check,
.help = help,
.opts = opts,
- .version = LIBCT_VERSION,
+ .version = VERSION,
};
void __attribute__ ((constructor)) init(void);
diff --git a/include/conntrack.h b/include/conntrack.h
index db434d6..db96102 100644
--- a/include/conntrack.h
+++ b/include/conntrack.h
@@ -1,11 +1,12 @@
-#ifndef _LIBCT_PROTO_H
-#define _LIBCT_PROTO_H
+#ifndef _CONNTRACK_H
+#define _CONNTRACK_H
#include "linux_list.h"
#include <getopt.h>
#include <libnetfilter_conntrack/libnetfilter_conntrack.h>
-#define LIBCT_VERSION "0.1.0"
+#define PROGNAME "conntrack"
+#define VERSION "0.92"
/* FIXME: These should be independent from kernel space */
#define IPS_ASSURED (1 << 2)
diff --git a/src/conntrack.c b/src/conntrack.c
index c6d90f9..3b3b26a 100644
--- a/src/conntrack.c
+++ b/src/conntrack.c
@@ -48,9 +48,6 @@
#include "conntrack.h"
#include <libnetfilter_conntrack/libnetfilter_conntrack.h>
-#define PROGNAME "conntrack"
-#define VERSION "0.90"
-
#ifndef PROC_SYS_MODPROBE
#define PROC_SYS_MODPROBE "/proc/sys/kernel/modprobe"
#endif
@@ -238,15 +235,15 @@ static char commands_v_options[NUMBER_OF_CMD][NUMBER_OF_OPT] =
/*EXP_EVENT*/ {'x','x','x','x','x','x','x','x','x','x','x','x','x','x','x','x'},
};
-char *lib_dir = CONNTRACK_LIB_DIR;
+static char *lib_dir = CONNTRACK_LIB_DIR;
-LIST_HEAD(proto_list);
+static LIST_HEAD(proto_list);
void register_proto(struct ctproto_handler *h)
{
- if (strcmp(h->version, LIBCT_VERSION) != 0) {
+ if (strcmp(h->version, VERSION) != 0) {
fprintf(stderr, "plugin `%s': version %s (I'm %s)\n",
- h->name, h->version, LIBCT_VERSION);
+ h->name, h->version, VERSION);
exit(1);
}
list_add(&h->head, &proto_list);
@@ -443,14 +440,6 @@ err2str(int err, enum action command)
return strerror(err);
}
-static void dump_tuple(struct nfct_tuple *tp)
-{
- fprintf(stdout, "tuple %p: %u %u.%u.%u.%u:%hu -> %u.%u.%u.%u:%hu\n",
- tp, tp->protonum,
- NIPQUAD(tp->src.v4), ntohs(tp->l4src.all),
- NIPQUAD(tp->dst.v4), ntohs(tp->l4dst.all));
-}
-
#define PARSE_STATUS 0
#define PARSE_EVENT 1
#define PARSE_MAX 2