summaryrefslogtreecommitdiff
path: root/extensions
diff options
context:
space:
mode:
author/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org </C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org>2007-05-07 23:36:45 +0000
committer/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org </C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org>2007-05-07 23:36:45 +0000
commitf5123f2db878808a7431b8cc25c8eaa7813ed77f (patch)
tree8b3770254bde4569b40e4fcd0bd5c87ab1cc4ea0 /extensions
parent64823c027ee22b51f8d82e238679cb299222931b (diff)
downloadconntrack-tools-f5123f2db878808a7431b8cc25c8eaa7813ed77f.tar.gz
conntrack-tools-f5123f2db878808a7431b8cc25c8eaa7813ed77f.zip
o introduce '--output xml,extended,timestamp' option for '-L', '-G' and '-E'
o several fixes for the output of usage messages
Diffstat (limited to 'extensions')
-rw-r--r--extensions/libct_proto_icmp.c21
-rw-r--r--extensions/libct_proto_tcp.c18
-rw-r--r--extensions/libct_proto_udp.c16
3 files changed, 20 insertions, 35 deletions
diff --git a/extensions/libct_proto_icmp.c b/extensions/libct_proto_icmp.c
index 7b02dec..5c7717a 100644
--- a/extensions/libct_proto_icmp.c
+++ b/extensions/libct_proto_icmp.c
@@ -26,22 +26,11 @@ static struct option opts[] = {
static void help()
{
- fprintf(stdout, "--icmp-type icmp type\n");
- fprintf(stdout, "--icmp-code icmp code\n");
- fprintf(stdout, "--icmp-id icmp id\n");
+ fprintf(stdout, " --icmp-type\t\t\ticmp type\n");
+ fprintf(stdout, " --icmp-code\t\t\ticmp code\n");
+ fprintf(stdout, " --icmp-id\t\t\ticmp id\n");
}
-/* Add 1; spaces filled with 0. */
-static u_int8_t invmap[]
- = { [ICMP_ECHO] = ICMP_ECHOREPLY + 1,
- [ICMP_ECHOREPLY] = ICMP_ECHO + 1,
- [ICMP_TIMESTAMP] = ICMP_TIMESTAMPREPLY + 1,
- [ICMP_TIMESTAMPREPLY] = ICMP_TIMESTAMP + 1,
- [ICMP_INFO_REQUEST] = ICMP_INFO_REPLY + 1,
- [ICMP_INFO_REPLY] = ICMP_INFO_REQUEST + 1,
- [ICMP_ADDRESS] = ICMP_ADDRESSREPLY + 1,
- [ICMP_ADDRESSREPLY] = ICMP_ADDRESS + 1};
-
static int parse(char c, char *argv[],
struct nf_conntrack *ct,
struct nf_conntrack *exptuple,
@@ -56,10 +45,6 @@ static int parse(char c, char *argv[],
nfct_set_attr_u8(ct,
ATTR_ICMP_TYPE,
atoi(optarg));
- /* FIXME:
- reply->l4dst.icmp.type =
- invmap[orig->l4dst.icmp.type] - 1;
- */
*flags |= ICMP_TYPE;
break;
case '2':
diff --git a/extensions/libct_proto_tcp.c b/extensions/libct_proto_tcp.c
index 736bcff..5a5c5c4 100644
--- a/extensions/libct_proto_tcp.c
+++ b/extensions/libct_proto_tcp.c
@@ -45,15 +45,15 @@ static const char *states[] = {
static void help()
{
- fprintf(stdout, "--orig-port-src original source port\n");
- fprintf(stdout, "--orig-port-dst original destination port\n");
- fprintf(stdout, "--reply-port-src reply source port\n");
- fprintf(stdout, "--reply-port-dst reply destination port\n");
- fprintf(stdout, "--mask-port-src mask source port\n");
- fprintf(stdout, "--mask-port-dst mask destination port\n");
- fprintf(stdout, "--tuple-port-src expectation tuple src port\n");
- fprintf(stdout, "--tuple-port-src expectation tuple dst port\n");
- fprintf(stdout, "--state TCP state, fe. ESTABLISHED\n");
+ fprintf(stdout, " --orig-port-src\t\toriginal source port\n");
+ fprintf(stdout, " --orig-port-dst\t\toriginal destination port\n");
+ fprintf(stdout, " --reply-port-src\t\treply source port\n");
+ fprintf(stdout, " --reply-port-dst\t\treply destination port\n");
+ fprintf(stdout, " --mask-port-src\t\tmask source port\n");
+ fprintf(stdout, " --mask-port-dst\t\tmask destination port\n");
+ fprintf(stdout, " --tuple-port-src\t\texpectation tuple src port\n");
+ fprintf(stdout, " --tuple-port-src\t\texpectation tuple dst port\n");
+ fprintf(stdout, " --state\t\t\tTCP state, fe. ESTABLISHED\n");
}
static int parse_options(char c, char *argv[],
diff --git a/extensions/libct_proto_udp.c b/extensions/libct_proto_udp.c
index 1bc70d4..6e8d13c 100644
--- a/extensions/libct_proto_udp.c
+++ b/extensions/libct_proto_udp.c
@@ -31,14 +31,14 @@ static struct option opts[] = {
static void help()
{
- fprintf(stdout, "--orig-port-src original source port\n");
- fprintf(stdout, "--orig-port-dst original destination port\n");
- fprintf(stdout, "--reply-port-src reply source port\n");
- fprintf(stdout, "--reply-port-dst reply destination port\n");
- fprintf(stdout, "--mask-port-src mask source port\n");
- fprintf(stdout, "--mask-port-dst mask destination port\n");
- fprintf(stdout, "--tuple-port-src expectation tuple src port\n");
- fprintf(stdout, "--tuple-port-src expectation tuple dst port\n");
+ fprintf(stdout, " --orig-port-src\t\toriginal source port\n");
+ fprintf(stdout, " --orig-port-dst\t\toriginal destination port\n");
+ fprintf(stdout, " --reply-port-src\t\treply source port\n");
+ fprintf(stdout, " --reply-port-dst\t\treply destination port\n");
+ fprintf(stdout, " --mask-port-src\t\tmask source port\n");
+ fprintf(stdout, " --mask-port-dst\t\tmask destination port\n");
+ fprintf(stdout, " --tuple-port-src\t\texpectation tuple src port\n");
+ fprintf(stdout, " --tuple-port-src\t\texpectation tuple dst port\n");
}
static int parse_options(char c, char *argv[],