1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
| 127 struct proto_ops { 128 int family; 129 struct module *owner; 130 int (*release) (struct socket *sock); 131 int (*bind) (struct socket *sock, 132 struct sockaddr *myaddr, 133 int sockaddr_len); 134 int (*connect) (struct socket *sock, 135 struct sockaddr *vaddr, 136 int sockaddr_len, int flags); 137 int (*socketpair)(struct socket *sock1, 138 struct socket *sock2); 139 int (*accept) (struct socket *sock, 140 struct socket *newsock, int flags); 141 int (*getname) (struct socket *sock, 142 struct sockaddr *addr, 143 int *sockaddr_len, int peer); 144 unsigned int (*poll) (struct file *file, struct socket *sock, 145 struct poll_table_struct *wait); 146 int (*ioctl) (struct socket *sock, unsigned int cmd, 147 unsigned long arg); 148 #ifdef CONFIG_COMPAT 149 int (*compat_ioctl) (struct socket *sock, unsigned int cmd, 150 unsigned long arg); 151 #endif 152 int (*listen) (struct socket *sock, int len); 153 int (*shutdown) (struct socket *sock, int flags); 154 int (*setsockopt)(struct socket *sock, int level, 155 int optname, char __user *optval, unsigned int optlen); 156 int (*getsockopt)(struct socket *sock, int level, 157 int optname, char __user *optval, int __user *optlen); 158 #ifdef CONFIG_COMPAT 159 int (*compat_setsockopt)(struct socket *sock, int level, 160 int optname, char __user *optval, unsigned int optlen); 161 int (*compat_getsockopt)(struct socket *sock, int level, 162 int optname, char __user *optval, int __user *optlen); 163 #endif 164 int (*sendmsg) (struct kiocb *iocb, struct socket *sock, 165 struct msghdr *m, size_t total_len); 166 int (*recvmsg) (struct kiocb *iocb, struct socket *sock, 167 struct msghdr *m, size_t total_len, 168 int flags); 169 int (*mmap) (struct file *file, struct socket *sock, 170 struct vm_area_struct * vma); 171 ssize_t (*sendpage) (struct socket *sock, struct page *page, 172 int offset, size_t size, int flags); 173 ssize_t (*splice_read)(struct socket *sock, loff_t *ppos, 174 struct pipe_inode_info *pipe, size_t len, unsigned int flags); 175 void (*set_peek_off)(struct sock *sk, int val); 176 };
|