[NETFILTER]: Introduce NF_INET_ hook values
[deliverable/linux.git] / net / ipv4 / netfilter / iptable_raw.c
index d6e5033956844a4a86c23c721dba749f9d5fe64d..66be23295594bcead7b784f8a1e11021afbc80ea 100644 (file)
@@ -7,7 +7,7 @@
 #include <linux/netfilter_ipv4/ip_tables.h>
 #include <net/ip.h>
 
-#define RAW_VALID_HOOKS ((1 << NF_IP_PRE_ROUTING) | (1 << NF_IP_LOCAL_OUT))
+#define RAW_VALID_HOOKS ((1 << NF_INET_PRE_ROUTING) | (1 << NF_INET_LOCAL_OUT))
 
 static struct
 {
@@ -21,12 +21,12 @@ static struct
                .num_entries = 3,
                .size = sizeof(struct ipt_standard) * 2 + sizeof(struct ipt_error),
                .hook_entry = {
-                       [NF_IP_PRE_ROUTING] = 0,
-                       [NF_IP_LOCAL_OUT] = sizeof(struct ipt_standard)
+                       [NF_INET_PRE_ROUTING] = 0,
+                       [NF_INET_LOCAL_OUT] = sizeof(struct ipt_standard)
                },
                .underflow = {
-                       [NF_IP_PRE_ROUTING] = 0,
-                       [NF_IP_LOCAL_OUT]  = sizeof(struct ipt_standard)
+                       [NF_INET_PRE_ROUTING] = 0,
+                       [NF_INET_LOCAL_OUT]  = sizeof(struct ipt_standard)
                },
        },
        .entries = {
@@ -47,30 +47,30 @@ static struct xt_table packet_raw = {
 /* The work comes in here from netfilter.c. */
 static unsigned int
 ipt_hook(unsigned int hook,
-        struct sk_buff **pskb,
+        struct sk_buff *skb,
         const struct net_device *in,
         const struct net_device *out,
         int (*okfn)(struct sk_buff *))
 {
-       return ipt_do_table(pskb, hook, in, out, &packet_raw);
+       return ipt_do_table(skb, hook, in, out, &packet_raw);
 }
 
 static unsigned int
 ipt_local_hook(unsigned int hook,
-              struct sk_buff **pskb,
+              struct sk_buff *skb,
               const struct net_device *in,
               const struct net_device *out,
               int (*okfn)(struct sk_buff *))
 {
        /* root is playing with raw sockets. */
-       if ((*pskb)->len < sizeof(struct iphdr) ||
-           ip_hdrlen(*pskb) < sizeof(struct iphdr)) {
+       if (skb->len < sizeof(struct iphdr) ||
+           ip_hdrlen(skb) < sizeof(struct iphdr)) {
                if (net_ratelimit())
-                       printk("iptable_raw: ignoring short SOCK_RAW"
+                       printk("iptable_raw: ignoring short SOCK_RAW "
                               "packet.\n");
                return NF_ACCEPT;
        }
-       return ipt_do_table(pskb, hook, in, out, &packet_raw);
+       return ipt_do_table(skb, hook, in, out, &packet_raw);
 }
 
 /* 'raw' is the very first table. */
@@ -78,14 +78,14 @@ static struct nf_hook_ops ipt_ops[] = {
        {
                .hook = ipt_hook,
                .pf = PF_INET,
-               .hooknum = NF_IP_PRE_ROUTING,
+               .hooknum = NF_INET_PRE_ROUTING,
                .priority = NF_IP_PRI_RAW,
                .owner = THIS_MODULE,
        },
        {
                .hook = ipt_local_hook,
                .pf = PF_INET,
-               .hooknum = NF_IP_LOCAL_OUT,
+               .hooknum = NF_INET_LOCAL_OUT,
                .priority = NF_IP_PRI_RAW,
                .owner = THIS_MODULE,
        },
This page took 0.027806 seconds and 5 git commands to generate.