Lines Matching defs:socket
31 * if the max backlog of the listen socket
51 * ECONNREFUSED is not returned from one end of a connected() socket to the
54 * and a fake inode identifier (nor the BSD first socket fstat twice bug).
56 * accept() returns a path name even if the connecting socket has closed
66 * - client shutdown killed server socket.
72 * - "Abstract" (not FS based) socket bindings.
89 #include <linux/socket.h>
169 * each socket state is protected by separate spin lock.
223 * Check unix socket name:
335 * If a datagram socket is connected to a socket not itself connected
336 * to the first socket (eg, /dev/log), clients may only enqueue more
337 * messages if the present receive queue of the server socket is not
340 * up on the peer_wait wait queue of a socket upon reception of a
344 * socket might be less than that of its clients if these break their
345 * association with it or if the server socket is closed while clients
350 * socket is enqueued on the peer_wait queue of the server socket
351 * whose wake function does a wake_up on the ordinary client socket
354 * association to the server socket is dissolved or after a wake up
471 /* When dgram socket disconnects (or changes its peer), we clear its receive
502 pr_info("Attempt to release alive unix socket: %p\n", sk);
562 /* Try to flush out this socket. Throw out buffers at least */
634 static int unix_listen(struct socket *sock, int backlog)
645 goto out; /* No listens on an unbound socket */
663 static int unix_release(struct socket *);
664 static int unix_bind(struct socket *, struct sockaddr *, int);
665 static int unix_stream_connect(struct socket *, struct sockaddr *,
667 static int unix_socketpair(struct socket *, struct socket *);
668 static int unix_accept(struct socket *, struct socket *, int, bool);
669 static int unix_getname(struct socket *, struct sockaddr *, int);
670 static __poll_t unix_poll(struct file *, struct socket *, poll_table *);
671 static __poll_t unix_dgram_poll(struct file *, struct socket *,
673 static int unix_ioctl(struct socket *, unsigned int, unsigned long);
675 static int unix_compat_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg);
677 static int unix_shutdown(struct socket *, int);
678 static int unix_stream_sendmsg(struct socket *, struct msghdr *, size_t);
679 static int unix_stream_recvmsg(struct socket *, struct msghdr *, size_t, int);
680 static ssize_t unix_stream_sendpage(struct socket *, struct page *, int offset,
682 static ssize_t unix_stream_splice_read(struct socket *, loff_t *ppos,
685 static int unix_dgram_sendmsg(struct socket *, struct msghdr *, size_t);
686 static int unix_dgram_recvmsg(struct socket *, struct msghdr *, size_t, int);
687 static int unix_dgram_connect(struct socket *, struct sockaddr *,
689 static int unix_seqpacket_sendmsg(struct socket *, struct msghdr *, size_t);
690 static int unix_seqpacket_recvmsg(struct socket *, struct msghdr *, size_t,
707 static void unix_show_fdinfo(struct seq_file *m, struct socket *sock)
801 static struct sock *unix_create1(struct net *net, struct socket *sock, int kern)
843 static int unix_create(struct net *net, struct socket *sock, int protocol,
875 static int unix_release(struct socket *sock)
888 static int unix_autobind(struct socket *sock)
1032 static int unix_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
1146 static int unix_dgram_connect(struct socket *sock, struct sockaddr *addr,
1177 /* Apparently VFS overslept socket death. Retry. */
1248 static int unix_stream_connect(struct socket *sock, struct sockaddr *uaddr,
1300 /* Apparently VFS overslept socket death. Retry. */
1332 attempt to connect are eliminated by checking socket
1336 Well, and we have to recheck the state after socket locked.
1437 static int unix_socketpair(struct socket *socka, struct socket *sockb)
1458 static void unix_sock_inherit_flags(const struct socket *old,
1459 struct socket *new)
1467 static int unix_accept(struct socket *sock, struct socket *newsock, int flags,
1483 /* If socket state is TCP_LISTEN it cannot change (for now...),
1499 /* attach accepted sock to socket */
1512 static int unix_getname(struct socket *sock, struct sockaddr *uaddr, int peer)
1557 * Once a candidate, however, the socket must not be reinstalled into a
1572 * yet does install the socket into an fd. The following lock/unlock
1585 * which is on the queue of listening socket A.
1607 static bool unix_passcred_enabled(const struct socket *sock,
1617 * We include credentials if source or destination socket
1620 static void maybe_add_creds(struct sk_buff *skb, const struct socket *sock,
1632 struct socket *socket,
1638 err = scm_send(socket, &msg, scm, false);
1642 if (unix_passcred_enabled(socket, other)) {
1682 static int unix_dgram_sendmsg(struct socket *sock, struct msghdr *msg,
1890 static int unix_stream_sendmsg(struct socket *sock, struct msghdr *msg,
1990 static ssize_t unix_stream_sendpage(struct socket *socket, struct page *page,
1997 struct sock *other, *sk = socket->sk;
2043 err = maybe_init_creds(&scm, socket, other);
2105 static int unix_seqpacket_sendmsg(struct socket *sock, struct msghdr *msg,
2124 static int unix_seqpacket_recvmsg(struct socket *sock, struct msghdr *msg,
2145 static int unix_dgram_recvmsg(struct socket *sock, struct msghdr *msg,
2184 /* Signal EOF on disconnected non-blocking SEQPACKET socket. */
2303 struct socket *socket;
2315 struct socket *sock = state->socket;
2344 /* Lock the socket to prevent queue disordering
2451 * sure it was dropped from the socket queue
2521 static int unix_stream_recvmsg(struct socket *sock, struct msghdr *msg,
2526 .socket = sock,
2539 return skb_splice_bits(skb, state->socket->sk,
2544 static ssize_t unix_stream_splice_read(struct socket *sock, loff_t *ppos,
2550 .socket = sock,
2566 static int unix_shutdown(struct socket *sock, int mode)
2678 static int unix_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
2707 static int unix_compat_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
2713 static __poll_t unix_poll(struct file *file, struct socket *sock, poll_table *wait)
2750 static __poll_t unix_dgram_poll(struct file *file, struct socket *sock,
3006 to use a UNIX socket. But later than subsys_initcall() because