[NETFILTER]: x_tables: consistent and unique symbol names
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / net / ipv4 / netfilter / ipt_TOS.c
index d4573baa7f277b2939d204a959b4479133ac8f3c..1a9244104b1770a79e26a883ba9f95a4ee105dbe 100644 (file)
@@ -21,12 +21,9 @@ MODULE_AUTHOR("Netfilter Core Team <coreteam@netfilter.org>");
 MODULE_DESCRIPTION("iptables TOS mangling module");
 
 static unsigned int
-target(struct sk_buff *skb,
-       const struct net_device *in,
-       const struct net_device *out,
-       unsigned int hooknum,
-       const struct xt_target *target,
-       const void *targinfo)
+tos_tg(struct sk_buff *skb, const struct net_device *in,
+       const struct net_device *out, unsigned int hooknum,
+       const struct xt_target *target, const void *targinfo)
 {
        const struct ipt_tos_target_info *tosinfo = targinfo;
        struct iphdr *iph = ip_hdr(skb);
@@ -38,17 +35,15 @@ target(struct sk_buff *skb,
                iph = ip_hdr(skb);
                oldtos = iph->tos;
                iph->tos = (iph->tos & IPTOS_PREC_MASK) | tosinfo->tos;
-               nf_csum_replace2(&iph->check, htons(oldtos), htons(iph->tos));
+               csum_replace2(&iph->check, htons(oldtos), htons(iph->tos));
        }
        return XT_CONTINUE;
 }
 
 static bool
-checkentry(const char *tablename,
-          const void *e_void,
-          const struct xt_target *target,
-          void *targinfo,
-          unsigned int hook_mask)
+tos_tg_check(const char *tablename, const void *e_void,
+             const struct xt_target *target, void *targinfo,
+             unsigned int hook_mask)
 {
        const u_int8_t tos = ((struct ipt_tos_target_info *)targinfo)->tos;
 
@@ -63,25 +58,25 @@ checkentry(const char *tablename,
        return true;
 }
 
-static struct xt_target ipt_tos_reg __read_mostly = {
+static struct xt_target tos_tg_reg __read_mostly = {
        .name           = "TOS",
        .family         = AF_INET,
-       .target         = target,
+       .target         = tos_tg,
        .targetsize     = sizeof(struct ipt_tos_target_info),
        .table          = "mangle",
-       .checkentry     = checkentry,
+       .checkentry     = tos_tg_check,
        .me             = THIS_MODULE,
 };
 
-static int __init ipt_tos_init(void)
+static int __init tos_tg_init(void)
 {
-       return xt_register_target(&ipt_tos_reg);
+       return xt_register_target(&tos_tg_reg);
 }
 
-static void __exit ipt_tos_fini(void)
+static void __exit tos_tg_exit(void)
 {
-       xt_unregister_target(&ipt_tos_reg);
+       xt_unregister_target(&tos_tg_reg);
 }
 
-module_init(ipt_tos_init);
-module_exit(ipt_tos_fini);
+module_init(tos_tg_init);
+module_exit(tos_tg_exit);