aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/net.h
diff options
context:
space:
mode:
authorShaun Pereira <spereira@tusc.com.au>2006-03-22 02:58:08 -0500
committerDavid S. Miller <davem@davemloft.net>2006-03-22 02:58:08 -0500
commit89bbfc95d65839d6ae23ddab8a3cc5af4ae88383 (patch)
treef2d5e55533f07109680d7ed7e56cc85222703c69 /include/linux/net.h
parent67b52e554ba973947704fcb4fc284d7bab9ab931 (diff)
[NET]: allow 32 bit socket ioctl in 64 bit kernel
Since the register_ioctl32_conversion() patch in the kernel is now obsolete, provide another method to allow 32 bit user space ioctls to reach the kernel. Signed-off-by: Shaun Pereira <spereira@tusc.com.au> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/net.h')
-rw-r--r--include/linux/net.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/net.h b/include/linux/net.h
index 152fa6551fd8..84a490e5f0a1 100644
--- a/include/linux/net.h
+++ b/include/linux/net.h
@@ -143,6 +143,8 @@ struct proto_ops {
143 struct poll_table_struct *wait); 143 struct poll_table_struct *wait);
144 int (*ioctl) (struct socket *sock, unsigned int cmd, 144 int (*ioctl) (struct socket *sock, unsigned int cmd,
145 unsigned long arg); 145 unsigned long arg);
146 int (*compat_ioctl) (struct socket *sock, unsigned int cmd,
147 unsigned long arg);
146 int (*listen) (struct socket *sock, int len); 148 int (*listen) (struct socket *sock, int len);
147 int (*shutdown) (struct socket *sock, int flags); 149 int (*shutdown) (struct socket *sock, int flags);
148 int (*setsockopt)(struct socket *sock, int level, 150 int (*setsockopt)(struct socket *sock, int level,
@@ -251,6 +253,8 @@ SOCKCALL_UWRAP(name, poll, (struct file *file, struct socket *sock, struct poll_
251 (file, sock, wait)) \ 253 (file, sock, wait)) \
252SOCKCALL_WRAP(name, ioctl, (struct socket *sock, unsigned int cmd, \ 254SOCKCALL_WRAP(name, ioctl, (struct socket *sock, unsigned int cmd, \
253 unsigned long arg), (sock, cmd, arg)) \ 255 unsigned long arg), (sock, cmd, arg)) \
256SOCKCALL_WRAP(name, compat_ioctl, (struct socket *sock, unsigned int cmd, \
257 unsigned long arg), (sock, cmd, arg)) \
254SOCKCALL_WRAP(name, listen, (struct socket *sock, int len), (sock, len)) \ 258SOCKCALL_WRAP(name, listen, (struct socket *sock, int len), (sock, len)) \
255SOCKCALL_WRAP(name, shutdown, (struct socket *sock, int flags), (sock, flags)) \ 259SOCKCALL_WRAP(name, shutdown, (struct socket *sock, int flags), (sock, flags)) \
256SOCKCALL_WRAP(name, setsockopt, (struct socket *sock, int level, int optname, \ 260SOCKCALL_WRAP(name, setsockopt, (struct socket *sock, int level, int optname, \
@@ -275,6 +279,7 @@ static const struct proto_ops name##_ops = { \
275 .getname = __lock_##name##_getname, \ 279 .getname = __lock_##name##_getname, \
276 .poll = __lock_##name##_poll, \ 280 .poll = __lock_##name##_poll, \
277 .ioctl = __lock_##name##_ioctl, \ 281 .ioctl = __lock_##name##_ioctl, \
282 .compat_ioctl = __lock_##name##_compat_ioctl, \
278 .listen = __lock_##name##_listen, \ 283 .listen = __lock_##name##_listen, \
279 .shutdown = __lock_##name##_shutdown, \ 284 .shutdown = __lock_##name##_shutdown, \
280 .setsockopt = __lock_##name##_setsockopt, \ 285 .setsockopt = __lock_##name##_setsockopt, \
@@ -283,6 +288,7 @@ static const struct proto_ops name##_ops = { \
283 .recvmsg = __lock_##name##_recvmsg, \ 288 .recvmsg = __lock_##name##_recvmsg, \
284 .mmap = __lock_##name##_mmap, \ 289 .mmap = __lock_##name##_mmap, \
285}; 290};
291
286#endif 292#endif
287 293
288#define MODULE_ALIAS_NETPROTO(proto) \ 294#define MODULE_ALIAS_NETPROTO(proto) \