diff options
author | /C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=laforge/emailAddress=laforge@netfilter.org </C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=laforge/emailAddress=laforge@netfilter.org> | 2005-04-16 13:30:56 +0000 |
---|---|---|
committer | /C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=laforge/emailAddress=laforge@netfilter.org </C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=laforge/emailAddress=laforge@netfilter.org> | 2005-04-16 13:30:56 +0000 |
commit | c86e48dc7d688d97a6ee4697ce01e594fa70d7db (patch) | |
tree | b2e30ee2f32ca7f6e8f0cf602c499d97774ca8a3 /include/libct_proto.h | |
download | conntrack-tools-c86e48dc7d688d97a6ee4697ce01e594fa70d7db.tar.gz conntrack-tools-c86e48dc7d688d97a6ee4697ce01e594fa70d7db.zip |
add pablo's conntrack tool
Diffstat (limited to 'include/libct_proto.h')
-rw-r--r-- | include/libct_proto.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/include/libct_proto.h b/include/libct_proto.h new file mode 100644 index 0000000..410a812 --- /dev/null +++ b/include/libct_proto.h @@ -0,0 +1,33 @@ +#ifndef _LIBCT_PROTO_H +#define _LIBCT_PROTO_H + +#include "linux_list.h" +#include <getopt.h> + +struct ctproto_handler { + struct list_head head; + + char *name; + u_int16_t protonum; + + int (*parse)(char c, char *argv[], struct ip_conntrack_tuple *orig, + struct ip_conntrack_tuple *reply); + void (*print)(struct ip_conntrack_tuple *t); + + struct option *opts; + + unsigned int option_offset; +}; + +extern void register_proto(struct ctproto_handler *h); +extern void unregister_proto(struct ctproto_handler *h); + +extern struct ctproto_handler *findproto(char *name); + +#define NIPQUAD(addr) \ + ((unsigned char *)&addr)[0], \ + ((unsigned char *)&addr)[1], \ + ((unsigned char *)&addr)[2], \ + ((unsigned char *)&addr)[3] + +#endif |