]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[NETFILTER]: nf_log: move logging stuff to seperate header
authorPatrick McHardy <kaber@trash.net>
Tue, 18 Dec 2007 06:38:49 +0000 (22:38 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Jan 2008 22:58:58 +0000 (14:58 -0800)
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 files changed:
include/linux/netfilter.h
include/net/netfilter/nf_log.h [new file with mode: 0644]
net/bridge/netfilter/ebt_log.c
net/bridge/netfilter/ebt_ulog.c
net/ipv4/netfilter/ip_tables.c
net/ipv4/netfilter/ipt_LOG.c
net/ipv4/netfilter/ipt_ULOG.c
net/ipv4/netfilter/nf_conntrack_proto_icmp.c
net/ipv6/netfilter/ip6_tables.c
net/ipv6/netfilter/ip6t_LOG.c
net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c
net/netfilter/nf_conntrack_proto_tcp.c
net/netfilter/nf_conntrack_proto_udp.c
net/netfilter/nf_conntrack_proto_udplite.c
net/netfilter/nf_log.c
net/netfilter/nfnetlink_log.c
net/netfilter/xt_NFLOG.c

index f25eec595807989da2dc11a42a22e0b63dfe6559..368b7ed1f1bf2503ae6d43219bbaf5b9b34f314f 100644 (file)
@@ -124,61 +124,6 @@ extern struct ctl_table nf_net_ipv4_netfilter_sysctl_path[];
 
 extern struct list_head nf_hooks[NPROTO][NF_MAX_HOOKS];
 
-/* those NF_LOG_* defines and struct nf_loginfo are legacy definitios that will
- * disappear once iptables is replaced with pkttables.  Please DO NOT use them
- * for any new code! */
-#define NF_LOG_TCPSEQ          0x01    /* Log TCP sequence numbers */
-#define NF_LOG_TCPOPT          0x02    /* Log TCP options */
-#define NF_LOG_IPOPT           0x04    /* Log IP options */
-#define NF_LOG_UID             0x08    /* Log UID owning local socket */
-#define NF_LOG_MASK            0x0f
-
-#define NF_LOG_TYPE_LOG                0x01
-#define NF_LOG_TYPE_ULOG       0x02
-
-struct nf_loginfo {
-       u_int8_t type;
-       union {
-               struct {
-                       u_int32_t copy_len;
-                       u_int16_t group;
-                       u_int16_t qthreshold;
-               } ulog;
-               struct {
-                       u_int8_t level;
-                       u_int8_t logflags;
-               } log;
-       } u;
-};
-
-typedef void nf_logfn(unsigned int pf,
-                     unsigned int hooknum,
-                     const struct sk_buff *skb,
-                     const struct net_device *in,
-                     const struct net_device *out,
-                     const struct nf_loginfo *li,
-                     const char *prefix);
-
-struct nf_logger {
-       struct module   *me;
-       nf_logfn        *logfn;
-       char            *name;
-};
-
-/* Function to register/unregister log function. */
-int nf_log_register(int pf, struct nf_logger *logger);
-void nf_log_unregister(struct nf_logger *logger);
-void nf_log_unregister_pf(int pf);
-
-/* Calls the registered backend logging function */
-void nf_log_packet(int pf,
-                  unsigned int hooknum,
-                  const struct sk_buff *skb,
-                  const struct net_device *in,
-                  const struct net_device *out,
-                  struct nf_loginfo *li,
-                  const char *fmt, ...);
-
 int nf_hook_slow(int pf, unsigned int hook, struct sk_buff *skb,
                 struct net_device *indev, struct net_device *outdev,
                 int (*okfn)(struct sk_buff *), int thresh);
diff --git a/include/net/netfilter/nf_log.h b/include/net/netfilter/nf_log.h
new file mode 100644 (file)
index 0000000..f0426e5
--- /dev/null
@@ -0,0 +1,59 @@
+#ifndef _NF_LOG_H
+#define _NF_LOG_H
+
+/* those NF_LOG_* defines and struct nf_loginfo are legacy definitios that will
+ * disappear once iptables is replaced with pkttables.  Please DO NOT use them
+ * for any new code! */
+#define NF_LOG_TCPSEQ          0x01    /* Log TCP sequence numbers */
+#define NF_LOG_TCPOPT          0x02    /* Log TCP options */
+#define NF_LOG_IPOPT           0x04    /* Log IP options */
+#define NF_LOG_UID             0x08    /* Log UID owning local socket */
+#define NF_LOG_MASK            0x0f
+
+#define NF_LOG_TYPE_LOG                0x01
+#define NF_LOG_TYPE_ULOG       0x02
+
+struct nf_loginfo {
+       u_int8_t type;
+       union {
+               struct {
+                       u_int32_t copy_len;
+                       u_int16_t group;
+                       u_int16_t qthreshold;
+               } ulog;
+               struct {
+                       u_int8_t level;
+                       u_int8_t logflags;
+               } log;
+       } u;
+};
+
+typedef void nf_logfn(unsigned int pf,
+                     unsigned int hooknum,
+                     const struct sk_buff *skb,
+                     const struct net_device *in,
+                     const struct net_device *out,
+                     const struct nf_loginfo *li,
+                     const char *prefix);
+
+struct nf_logger {
+       struct module   *me;
+       nf_logfn        *logfn;
+       char            *name;
+};
+
+/* Function to register/unregister log function. */
+int nf_log_register(int pf, struct nf_logger *logger);
+void nf_log_unregister(struct nf_logger *logger);
+void nf_log_unregister_pf(int pf);
+
+/* Calls the registered backend logging function */
+void nf_log_packet(int pf,
+                  unsigned int hooknum,
+                  const struct sk_buff *skb,
+                  const struct net_device *in,
+                  const struct net_device *out,
+                  struct nf_loginfo *li,
+                  const char *fmt, ...);
+
+#endif /* _NF_LOG_H */
index 457815fb558440fefeedb04a01d22dccdffcf27d..fcb3b54dc191fd5af004f27a3fa14009d2a60299 100644 (file)
@@ -17,6 +17,7 @@
 #include <linux/in.h>
 #include <linux/if_arp.h>
 #include <linux/spinlock.h>
+#include <net/netfilter/nf_log.h>
 
 static DEFINE_SPINLOCK(ebt_log_lock);
 
index e7cfd30bac756f0c97b32aaa1eb6200bcc5c47f8..1b9ca07f44ffbabbb7a7dc3238b007397e4fcd9d 100644 (file)
@@ -38,6 +38,7 @@
 #include <linux/netdevice.h>
 #include <linux/netfilter_bridge/ebtables.h>
 #include <linux/netfilter_bridge/ebt_ulog.h>
+#include <net/netfilter/nf_log.h>
 #include <net/sock.h>
 #include "../br_private.h"
 
index 439b2925765dc6262d652a7150cfb16a2ab8ff0a..271f6a5d3d4c393e8a8f0031afb2b748bb1d585a 100644 (file)
@@ -26,6 +26,7 @@
 
 #include <linux/netfilter/x_tables.h>
 #include <linux/netfilter_ipv4/ip_tables.h>
+#include <net/netfilter/nf_log.h>
 
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Netfilter Core Team <coreteam@netfilter.org>");
index f8c613a6eb04e47fc06a343d9b162b2ce380ec91..4b346e59bf2db64c024f9ccda2cb6f9ec61221e8 100644 (file)
@@ -22,6 +22,7 @@
 #include <linux/netfilter.h>
 #include <linux/netfilter/x_tables.h>
 #include <linux/netfilter_ipv4/ipt_LOG.h>
+#include <net/netfilter/nf_log.h>
 
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Netfilter Core Team <coreteam@netfilter.org>");
index 4139042a63a11ab225f20eb1f6736eb86fb5a4e1..1d8e146345e473cd873150c7f6a56c0a797a6f86 100644 (file)
@@ -43,6 +43,7 @@
 #include <linux/netfilter.h>
 #include <linux/netfilter/x_tables.h>
 #include <linux/netfilter_ipv4/ipt_ULOG.h>
+#include <net/netfilter/nf_log.h>
 #include <net/sock.h>
 #include <linux/bitops.h>
 #include <asm/unaligned.h>
index 3e2e5cdda9de313bccff38f1d236754900d5b7d2..cd0d6690627e3dd6fdc38cd96447ba8de50ce887 100644 (file)
@@ -18,6 +18,7 @@
 #include <net/netfilter/nf_conntrack_tuple.h>
 #include <net/netfilter/nf_conntrack_l4proto.h>
 #include <net/netfilter/nf_conntrack_core.h>
+#include <net/netfilter/nf_log.h>
 
 static unsigned long nf_ct_icmp_timeout __read_mostly = 30*HZ;
 
index d910d56d22da16151c6162e1c4ff5a29ca2095ef..bb50d0e66734709326dc72186a696324738d083e 100644 (file)
@@ -28,6 +28,7 @@
 
 #include <linux/netfilter_ipv6/ip6_tables.h>
 #include <linux/netfilter/x_tables.h>
+#include <net/netfilter/nf_log.h>
 
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Netfilter Core Team <coreteam@netfilter.org>");
index 19523242991ddeb3560e7445ee9830bc7438c836..e6a2b1e9469cccfb34f65332e41d291754551bb3 100644 (file)
@@ -23,6 +23,7 @@
 #include <linux/netfilter.h>
 #include <linux/netfilter/x_tables.h>
 #include <linux/netfilter_ipv6/ip6_tables.h>
+#include <net/netfilter/nf_log.h>
 
 MODULE_AUTHOR("Jan Rekorajski <baggins@pld.org.pl>");
 MODULE_DESCRIPTION("IP6 tables LOG target module");
index 44689d4444104849774cb0ea2c4cb76b34b4d8dc..02d60dfbab803110cbbc7a3ae3c69ec5ef527660 100644 (file)
@@ -24,6 +24,7 @@
 #include <net/netfilter/nf_conntrack_l4proto.h>
 #include <net/netfilter/nf_conntrack_core.h>
 #include <net/netfilter/ipv6/nf_conntrack_icmpv6.h>
+#include <net/netfilter/nf_log.h>
 
 static unsigned long nf_ct_icmpv6_timeout __read_mostly = 30*HZ;
 
index 600b476d225c5e238075e7287eb23b91246f9e85..1d496b912bd001501c1f4b679c9e304ff6dcad08 100644 (file)
@@ -24,6 +24,7 @@
 #include <net/netfilter/nf_conntrack.h>
 #include <net/netfilter/nf_conntrack_l4proto.h>
 #include <net/netfilter/nf_conntrack_ecache.h>
+#include <net/netfilter/nf_log.h>
 
 /* Protects conntrack->proto.tcp */
 static DEFINE_RWLOCK(tcp_lock);
index 570a2e109478809c04b1741cab1fb84b5484d218..7ac607319562d90283d88c89ec73c6bbc8f37796 100644 (file)
@@ -21,6 +21,7 @@
 #include <linux/netfilter_ipv6.h>
 #include <net/netfilter/nf_conntrack_l4proto.h>
 #include <net/netfilter/nf_conntrack_ecache.h>
+#include <net/netfilter/nf_log.h>
 
 static unsigned int nf_ct_udp_timeout __read_mostly = 30*HZ;
 static unsigned int nf_ct_udp_timeout_stream __read_mostly = 180*HZ;
index 7e116d5766d13f7d170782d4c9c57329ef502574..6518bcd17d6535d993acf8a62032699a54004fab 100644 (file)
@@ -22,6 +22,7 @@
 #include <linux/netfilter_ipv6.h>
 #include <net/netfilter/nf_conntrack_l4proto.h>
 #include <net/netfilter/nf_conntrack_ecache.h>
+#include <net/netfilter/nf_log.h>
 
 static unsigned int nf_ct_udplite_timeout __read_mostly = 30*HZ;
 static unsigned int nf_ct_udplite_timeout_stream __read_mostly = 180*HZ;
index d67c4fbf6031ec487e9205098e01d787de5fe033..fad97d69481c227fab6286021c05c5ffa1322103 100644 (file)
@@ -6,6 +6,7 @@
 #include <linux/netfilter.h>
 #include <linux/seq_file.h>
 #include <net/protocol.h>
+#include <net/netfilter/nf_log.h>
 
 #include "nf_internals.h"
 
index 2c7bd2eb0294400ed1175749f41281ed4f7b735b..959a0cb131f1f61c4390c74cc57d0bab62ff3ef3 100644 (file)
@@ -29,6 +29,7 @@
 #include <linux/jhash.h>
 #include <linux/random.h>
 #include <net/sock.h>
+#include <net/netfilter/nf_log.h>
 
 #include <asm/atomic.h>
 
index 83af124e88cd818556a6504c3227d4f202e11060..866facfa4f43ada46b394bd2789d6d0976342cb6 100644 (file)
@@ -12,6 +12,7 @@
 
 #include <linux/netfilter/x_tables.h>
 #include <linux/netfilter/xt_NFLOG.h>
+#include <net/netfilter/nf_log.h>
 
 MODULE_AUTHOR("Patrick McHardy <kaber@trash.net>");
 MODULE_DESCRIPTION("x_tables NFLOG target");