Lines Matching full:socket
3 * NET An implementation of the SOCKET network access protocol.
48 * enum sock_type - Socket types
49 * @SOCK_STREAM: stream (connection) socket
50 * @SOCK_DGRAM: datagram (conn.less) socket
51 * @SOCK_RAW: raw socket
53 * @SOCK_SEQPACKET: sequential packet socket
54 * @SOCK_DCCP: Datagram Congestion Control Protocol socket
58 * When adding some new socket type please
59 * grep ARCH_HAS_SOCKET_TYPE include/asm-* /socket.h, at least MIPS
77 /* Flags for socket, socketpair, accept4 */
106 * struct socket - general BSD socket
107 * @state: socket state (%SS_CONNECTED, etc)
108 * @type: socket type (%SOCK_STREAM, etc)
109 * @flags: socket flags (%SOCK_NOSPACE, etc)
110 * @ops: protocol specific socket operations
112 * @sk: internal networking protocol agnostic socket representation
115 struct socket { struct
143 int (*release) (struct socket *sock); argument
144 int (*bind) (struct socket *sock,
147 int (*connect) (struct socket *sock,
150 int (*socketpair)(struct socket *sock1,
151 struct socket *sock2);
152 int (*accept) (struct socket *sock,
153 struct socket *newsock, int flags, bool kern);
154 int (*getname) (struct socket *sock,
157 __poll_t (*poll) (struct file *file, struct socket *sock,
159 int (*ioctl) (struct socket *sock, unsigned int cmd,
162 int (*compat_ioctl) (struct socket *sock, unsigned int cmd,
165 int (*gettstamp) (struct socket *sock, void __user *userstamp,
167 int (*listen) (struct socket *sock, int len);
168 int (*shutdown) (struct socket *sock, int flags);
169 int (*setsockopt)(struct socket *sock, int level,
172 int (*getsockopt)(struct socket *sock, int level,
174 void (*show_fdinfo)(struct seq_file *m, struct socket *sock);
175 int (*sendmsg) (struct socket *sock, struct msghdr *m,
185 int (*recvmsg) (struct socket *sock, struct msghdr *m,
187 int (*mmap) (struct file *file, struct socket *sock,
189 ssize_t (*sendpage) (struct socket *sock, struct page *page,
191 ssize_t (*splice_read)(struct socket *sock, loff_t *ppos,
194 int (*peek_len)(struct socket *sock);
218 int (*create)(struct net *net, struct socket *sock,
238 struct socket **res, int kern);
239 int sock_create(int family, int type, int proto, struct socket **res);
240 int sock_create_kern(struct net *net, int family, int type, int proto, struct socket **res);
241 int sock_create_lite(int family, int type, int proto, struct socket **res);
242 struct socket *sock_alloc(void);
243 void sock_release(struct socket *sock);
244 int sock_sendmsg(struct socket *sock, struct msghdr *msg);
245 int sock_recvmsg(struct socket *sock, struct msghdr *msg, int flags);
246 struct file *sock_alloc_file(struct socket *sock, int flags, const char *dname);
247 struct socket *sockfd_lookup(int fd, int *err);
248 struct socket *sock_from_file(struct file *file, int *err);
313 int kernel_sendmsg(struct socket *sock, struct msghdr *msg, struct kvec *vec,
317 int kernel_recvmsg(struct socket *sock, struct msghdr *msg, struct kvec *vec,
320 int kernel_bind(struct socket *sock, struct sockaddr *addr, int addrlen);
321 int kernel_listen(struct socket *sock, int backlog);
322 int kernel_accept(struct socket *sock, struct socket **newsock, int flags);
323 int kernel_connect(struct socket *sock, struct sockaddr *addr, int addrlen,
325 int kernel_getsockname(struct socket *sock, struct sockaddr *addr);
326 int kernel_getpeername(struct socket *sock, struct sockaddr *addr);
327 int kernel_sendpage(struct socket *sock, struct page *page, int offset,
331 int kernel_sock_shutdown(struct socket *sock, enum sock_shutdown_cmd how);
333 /* Routine returns the IP overhead imposed by a (caller-protected) socket. */