From 18bbf19becaab7dc4137406928f96ad089192f69 Mon Sep 17 00:00:00 2001 From: "/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org" Date: Wed, 18 Jul 2007 20:04:00 +0000 Subject: conntrackd: - use buffer of MTU size conntrack: - better protocol argument checkings - fix per-protocol filtering, eg. conntrack -[L|E] -p tcp now works - show per-protocol help, ie. conntrack -h -p tcp - add alias --src for --orig-src and alias --dst for --orig-dst --- include/conntrack.h | 28 ++++++++++++++++++++-------- include/mcast.h | 3 +++ include/network.h | 7 +++++++ 3 files changed, 30 insertions(+), 8 deletions(-) (limited to 'include') diff --git a/include/conntrack.h b/include/conntrack.h index f344d72..5edc0e9 100644 --- a/include/conntrack.h +++ b/include/conntrack.h @@ -151,15 +151,15 @@ struct ctproto_handler { enum ctattr_protoinfo protoinfo_attr; - int (*parse_opts)(char c, char *argv[], - struct nf_conntrack *ct, - struct nf_conntrack *exptuple, - struct nf_conntrack *mask, - unsigned int *flags); + int (*parse_opts)(char c, + struct nf_conntrack *ct, + struct nf_conntrack *exptuple, + struct nf_conntrack *mask, + unsigned int *flags); - int (*final_check)(unsigned int flags, - unsigned int command, - struct nf_conntrack *ct); + void (*final_check)(unsigned int flags, + unsigned int command, + struct nf_conntrack *ct); void (*help)(); @@ -168,6 +168,18 @@ struct ctproto_handler { unsigned int option_offset; }; +enum exittype { + OTHER_PROBLEM = 1, + PARAMETER_PROBLEM, + VERSION_PROBLEM +}; + +void generic_opt_check(int options, + int nops, + char *optset, + const char *optflg[]); +void exit_error(enum exittype status, char *msg, ...); + extern void register_proto(struct ctproto_handler *h); extern void register_tcp(void); diff --git a/include/mcast.h b/include/mcast.h index 66676dc..d4fd335 100644 --- a/include/mcast.h +++ b/include/mcast.h @@ -2,6 +2,7 @@ #define _MCAST_H_ #include +#include struct mcast_conf { int ipproto; @@ -16,6 +17,8 @@ struct mcast_conf { struct in_addr interface_addr; struct in6_addr interface_addr6; } ifa; + int mtu; + char iface[IFNAMSIZ]; }; struct mcast_stats { diff --git a/include/network.h b/include/network.h index bc9431d..f8fdd0d 100644 --- a/include/network.h +++ b/include/network.h @@ -55,6 +55,13 @@ int prepare_send_netmsg(struct mcast_sock *m, void *data); int mcast_send_netmsg(struct mcast_sock *m, void *data); int mcast_recv_netmsg(struct mcast_sock *m, void *data, int len); +struct mcast_conf; + +int mcast_buffered_init(struct mcast_conf *conf); +void mcast_buffered_destroy(); +int mcast_buffered_send_netmsg(struct mcast_sock *m, void *data, int len); +int mcast_buffered_pending_netmsg(struct mcast_sock *m); + #define IS_DATA(x) ((x->flags & ~NET_F_HELLO) == 0) #define IS_ACK(x) (x->flags & NET_F_ACK) #define IS_NACK(x) (x->flags & NET_F_NACK) -- cgit v1.2.3