diff options
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 |
commit | f5123f2db878808a7431b8cc25c8eaa7813ed77f (patch) | |
tree | 8b3770254bde4569b40e4fcd0bd5c87ab1cc4ea0 /extensions/libct_proto_icmp.c | |
parent | 64823c027ee22b51f8d82e238679cb299222931b (diff) | |
download | conntrack-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/libct_proto_icmp.c')
-rw-r--r-- | extensions/libct_proto_icmp.c | 21 |
1 files changed, 3 insertions, 18 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': |