aboutsummaryrefslogtreecommitdiffstats
path: root/net/netfilter/xt_MARK.c
diff options
context:
space:
mode:
authorJan Engelhardt <jengelh@computergmbh.de>2007-12-05 02:24:03 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 17:55:53 -0500
commitd3c5ee6d545b5372fd525ebe16988a5b6efeceb0 (patch)
tree97efd14cfb818ac5fb56a023efe9217f78ad240f /net/netfilter/xt_MARK.c
parent4c610979576d8778c401a9b1d247ed14f6cee998 (diff)
[NETFILTER]: x_tables: consistent and unique symbol names
Give all Netfilter modules consistent and unique symbol names. Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de> Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/netfilter/xt_MARK.c')
-rw-r--r--net/netfilter/xt_MARK.c69
1 files changed, 29 insertions, 40 deletions
diff --git a/net/netfilter/xt_MARK.c b/net/netfilter/xt_MARK.c
index bc6503d77d7..de32aa5b57f 100644
--- a/net/netfilter/xt_MARK.c
+++ b/net/netfilter/xt_MARK.c
@@ -22,12 +22,9 @@ MODULE_ALIAS("ipt_MARK");
22MODULE_ALIAS("ip6t_MARK"); 22MODULE_ALIAS("ip6t_MARK");
23 23
24static unsigned int 24static unsigned int
25target_v0(struct sk_buff *skb, 25mark_tg_v0(struct sk_buff *skb, const struct net_device *in,
26 const struct net_device *in, 26 const struct net_device *out, unsigned int hooknum,
27 const struct net_device *out, 27 const struct xt_target *target, const void *targinfo)
28 unsigned int hooknum,
29 const struct xt_target *target,
30 const void *targinfo)
31{ 28{
32 const struct xt_mark_target_info *markinfo = targinfo; 29 const struct xt_mark_target_info *markinfo = targinfo;
33 30
@@ -36,12 +33,9 @@ target_v0(struct sk_buff *skb,
36} 33}
37 34
38static unsigned int 35static unsigned int
39target_v1(struct sk_buff *skb, 36mark_tg(struct sk_buff *skb, const struct net_device *in,
40 const struct net_device *in, 37 const struct net_device *out, unsigned int hooknum,
41 const struct net_device *out, 38 const struct xt_target *target, const void *targinfo)
42 unsigned int hooknum,
43 const struct xt_target *target,
44 const void *targinfo)
45{ 39{
46 const struct xt_mark_target_info_v1 *markinfo = targinfo; 40 const struct xt_mark_target_info_v1 *markinfo = targinfo;
47 int mark = 0; 41 int mark = 0;
@@ -64,13 +58,10 @@ target_v1(struct sk_buff *skb,
64 return XT_CONTINUE; 58 return XT_CONTINUE;
65} 59}
66 60
67
68static bool 61static bool
69checkentry_v0(const char *tablename, 62mark_tg_check_v0(const char *tablename, const void *entry,
70 const void *entry, 63 const struct xt_target *target, void *targinfo,
71 const struct xt_target *target, 64 unsigned int hook_mask)
72 void *targinfo,
73 unsigned int hook_mask)
74{ 65{
75 const struct xt_mark_target_info *markinfo = targinfo; 66 const struct xt_mark_target_info *markinfo = targinfo;
76 67
@@ -82,11 +73,9 @@ checkentry_v0(const char *tablename,
82} 73}
83 74
84static bool 75static bool
85checkentry_v1(const char *tablename, 76mark_tg_check(const char *tablename, const void *entry,
86 const void *entry, 77 const struct xt_target *target, void *targinfo,
87 const struct xt_target *target, 78 unsigned int hook_mask)
88 void *targinfo,
89 unsigned int hook_mask)
90{ 79{
91 const struct xt_mark_target_info_v1 *markinfo = targinfo; 80 const struct xt_mark_target_info_v1 *markinfo = targinfo;
92 81
@@ -112,7 +101,7 @@ struct compat_xt_mark_target_info_v1 {
112 u_int16_t __pad2; 101 u_int16_t __pad2;
113}; 102};
114 103
115static void compat_from_user_v1(void *dst, void *src) 104static void mark_tg_compat_from_user(void *dst, void *src)
116{ 105{
117 const struct compat_xt_mark_target_info_v1 *cm = src; 106 const struct compat_xt_mark_target_info_v1 *cm = src;
118 struct xt_mark_target_info_v1 m = { 107 struct xt_mark_target_info_v1 m = {
@@ -122,7 +111,7 @@ static void compat_from_user_v1(void *dst, void *src)
122 memcpy(dst, &m, sizeof(m)); 111 memcpy(dst, &m, sizeof(m));
123} 112}
124 113
125static int compat_to_user_v1(void __user *dst, void *src) 114static int mark_tg_compat_to_user(void __user *dst, void *src)
126{ 115{
127 const struct xt_mark_target_info_v1 *m = src; 116 const struct xt_mark_target_info_v1 *m = src;
128 struct compat_xt_mark_target_info_v1 cm = { 117 struct compat_xt_mark_target_info_v1 cm = {
@@ -133,13 +122,13 @@ static int compat_to_user_v1(void __user *dst, void *src)
133} 122}
134#endif /* CONFIG_COMPAT */ 123#endif /* CONFIG_COMPAT */
135 124
136static struct xt_target xt_mark_target[] __read_mostly = { 125static struct xt_target mark_tg_reg[] __read_mostly = {
137 { 126 {
138 .name = "MARK", 127 .name = "MARK",
139 .family = AF_INET, 128 .family = AF_INET,
140 .revision = 0, 129 .revision = 0,
141 .checkentry = checkentry_v0, 130 .checkentry = mark_tg_check_v0,
142 .target = target_v0, 131 .target = mark_tg_v0,
143 .targetsize = sizeof(struct xt_mark_target_info), 132 .targetsize = sizeof(struct xt_mark_target_info),
144 .table = "mangle", 133 .table = "mangle",
145 .me = THIS_MODULE, 134 .me = THIS_MODULE,
@@ -148,13 +137,13 @@ static struct xt_target xt_mark_target[] __read_mostly = {
148 .name = "MARK", 137 .name = "MARK",
149 .family = AF_INET, 138 .family = AF_INET,
150 .revision = 1, 139 .revision = 1,
151 .checkentry = checkentry_v1, 140 .checkentry = mark_tg_check,
152 .target = target_v1, 141 .target = mark_tg,
153 .targetsize = sizeof(struct xt_mark_target_info_v1), 142 .targetsize = sizeof(struct xt_mark_target_info_v1),
154#ifdef CONFIG_COMPAT 143#ifdef CONFIG_COMPAT
155 .compatsize = sizeof(struct compat_xt_mark_target_info_v1), 144 .compatsize = sizeof(struct compat_xt_mark_target_info_v1),
156 .compat_from_user = compat_from_user_v1, 145 .compat_from_user = mark_tg_compat_from_user,
157 .compat_to_user = compat_to_user_v1, 146 .compat_to_user = mark_tg_compat_to_user,
158#endif 147#endif
159 .table = "mangle", 148 .table = "mangle",
160 .me = THIS_MODULE, 149 .me = THIS_MODULE,
@@ -163,23 +152,23 @@ static struct xt_target xt_mark_target[] __read_mostly = {
163 .name = "MARK", 152 .name = "MARK",
164 .family = AF_INET6, 153 .family = AF_INET6,
165 .revision = 0, 154 .revision = 0,
166 .checkentry = checkentry_v0, 155 .checkentry = mark_tg_check_v0,
167 .target = target_v0, 156 .target = mark_tg_v0,
168 .targetsize = sizeof(struct xt_mark_target_info), 157 .targetsize = sizeof(struct xt_mark_target_info),
169 .table = "mangle", 158 .table = "mangle",
170 .me = THIS_MODULE, 159 .me = THIS_MODULE,
171 }, 160 },
172}; 161};
173 162
174static int __init xt_mark_init(void) 163static int __init mark_tg_init(void)
175{ 164{
176 return xt_register_targets(xt_mark_target, ARRAY_SIZE(xt_mark_target)); 165 return xt_register_targets(mark_tg_reg, ARRAY_SIZE(mark_tg_reg));
177} 166}
178 167
179static void __exit xt_mark_fini(void) 168static void __exit mark_tg_exit(void)
180{ 169{
181 xt_unregister_targets(xt_mark_target, ARRAY_SIZE(xt_mark_target)); 170 xt_unregister_targets(mark_tg_reg, ARRAY_SIZE(mark_tg_reg));
182} 171}
183 172
184module_init(xt_mark_init); 173module_init(mark_tg_init);
185module_exit(xt_mark_fini); 174module_exit(mark_tg_exit);