socket.c (7022b15e2a9f878fd5184586064c63352c3dd225) | socket.c (87de87d5e47f94b4ea647a5bd1bc8dc1f7930db4) |
---|---|
1/* 2 * NET An implementation of the SOCKET network access protocol. 3 * 4 * Version: @(#)socket.c 1.1.93 18/02/95 5 * 6 * Authors: Orest Zborowski, <obz@Kodak.COM> 7 * Ross Biro 8 * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> --- 76 unchanged lines hidden (view full) --- 85#include <linux/audit.h> 86#include <linux/wireless.h> 87#include <linux/nsproxy.h> 88 89#include <asm/uaccess.h> 90#include <asm/unistd.h> 91 92#include <net/compat.h> | 1/* 2 * NET An implementation of the SOCKET network access protocol. 3 * 4 * Version: @(#)socket.c 1.1.93 18/02/95 5 * 6 * Authors: Orest Zborowski, <obz@Kodak.COM> 7 * Ross Biro 8 * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> --- 76 unchanged lines hidden (view full) --- 85#include <linux/audit.h> 86#include <linux/wireless.h> 87#include <linux/nsproxy.h> 88 89#include <asm/uaccess.h> 90#include <asm/unistd.h> 91 92#include <net/compat.h> |
93#include <net/wext.h> |
|
93 94#include <net/sock.h> 95#include <linux/netfilter.h> 96 97static int sock_no_open(struct inode *irrelevant, struct file *dontcare); 98static ssize_t sock_aio_read(struct kiocb *iocb, const struct iovec *iov, 99 unsigned long nr_segs, loff_t pos); 100static ssize_t sock_aio_write(struct kiocb *iocb, const struct iovec *iov, --- 2104 unchanged lines hidden (view full) --- 2205#endif /* CONFIG_PROC_FS */ 2206 2207#ifdef CONFIG_COMPAT 2208static long compat_sock_ioctl(struct file *file, unsigned cmd, 2209 unsigned long arg) 2210{ 2211 struct socket *sock = file->private_data; 2212 int ret = -ENOIOCTLCMD; | 94 95#include <net/sock.h> 96#include <linux/netfilter.h> 97 98static int sock_no_open(struct inode *irrelevant, struct file *dontcare); 99static ssize_t sock_aio_read(struct kiocb *iocb, const struct iovec *iov, 100 unsigned long nr_segs, loff_t pos); 101static ssize_t sock_aio_write(struct kiocb *iocb, const struct iovec *iov, --- 2104 unchanged lines hidden (view full) --- 2206#endif /* CONFIG_PROC_FS */ 2207 2208#ifdef CONFIG_COMPAT 2209static long compat_sock_ioctl(struct file *file, unsigned cmd, 2210 unsigned long arg) 2211{ 2212 struct socket *sock = file->private_data; 2213 int ret = -ENOIOCTLCMD; |
2214 struct sock *sk; 2215 struct net *net; |
|
2213 | 2216 |
2217 sk = sock->sk; 2218 net = sock_net(sk); 2219 |
|
2214 if (sock->ops->compat_ioctl) 2215 ret = sock->ops->compat_ioctl(sock, cmd, arg); 2216 | 2220 if (sock->ops->compat_ioctl) 2221 ret = sock->ops->compat_ioctl(sock, cmd, arg); 2222 |
2223 if (ret == -ENOIOCTLCMD && 2224 (cmd >= SIOCIWFIRST && cmd <= SIOCIWLAST)) 2225 ret = compat_wext_handle_ioctl(net, cmd, arg); 2226 |
|
2217 return ret; 2218} 2219#endif 2220 2221int kernel_bind(struct socket *sock, struct sockaddr *addr, int addrlen) 2222{ 2223 return sock->ops->bind(sock, addr, addrlen); 2224} --- 129 unchanged lines hidden --- | 2227 return ret; 2228} 2229#endif 2230 2231int kernel_bind(struct socket *sock, struct sockaddr *addr, int addrlen) 2232{ 2233 return sock->ops->bind(sock, addr, addrlen); 2234} --- 129 unchanged lines hidden --- |