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>
128 * each socket state is protected by separate spinlock.
272 * Check unix socket name:
419 * If a datagram socket is connected to a socket not itself connected
420 * to the first socket (eg, /dev/log), clients may only enqueue more
421 * messages if the present receive queue of the server socket is not
424 * up on the peer_wait wait queue of a socket upon reception of a
428 * socket might be less than that of its clients if these break their
429 * association with it or if the server socket is closed while clients
434 * socket is enqueued on the peer_wait queue of the server socket
435 * whose wake function does a wake_up on the ordinary client socket
438 * association to the server socket is dissolved or after a wake up
555 /* When dgram socket disconnects (or changes its peer), we clear its receive
587 pr_info("Attempt to release alive unix socket: %p\n", sk);
653 /* Try to flush out this socket. Throw out buffers at least */
725 static int unix_listen(struct socket *sock, int backlog)
736 goto out; /* No listens on an unbound socket */
754 static int unix_release(struct socket *);
755 static int unix_bind(struct socket *, struct sockaddr *, int);
756 static int unix_stream_connect(struct socket *, struct sockaddr *,
758 static int unix_socketpair(struct socket *, struct socket *);
759 static int unix_accept(struct socket *, struct socket *, int, bool);
760 static int unix_getname(struct socket *, struct sockaddr *, int);
761 static __poll_t unix_poll(struct file *, struct socket *, poll_table *);
762 static __poll_t unix_dgram_poll(struct file *, struct socket *,
764 static int unix_ioctl(struct socket *, unsigned int, unsigned long);
766 static int unix_compat_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg);
768 static int unix_shutdown(struct socket *, int);
769 static int unix_stream_sendmsg(struct socket *, struct msghdr *, size_t);
770 static int unix_stream_recvmsg(struct socket *, struct msghdr *, size_t, int);
771 static ssize_t unix_stream_splice_read(struct socket *, loff_t *ppos,
774 static int unix_dgram_sendmsg(struct socket *, struct msghdr *, size_t);
775 static int unix_dgram_recvmsg(struct socket *, struct msghdr *, size_t, int);
778 static int unix_dgram_connect(struct socket *, struct sockaddr *,
780 static int unix_seqpacket_sendmsg(struct socket *, struct msghdr *, size_t);
781 static int unix_seqpacket_recvmsg(struct socket *, struct msghdr *, size_t,
816 static void unix_show_fdinfo(struct seq_file *m, struct socket *sock)
917 /* Nothing to do here, unix socket does not need a ->close().
924 /* Nothing to do here, unix socket does not need a ->unhash().
966 static struct sock *unix_create1(struct net *net, struct socket *sock, int kern, int type)
1017 static int unix_create(struct net *net, struct socket *sock, int protocol,
1055 static int unix_release(struct socket *sock)
1318 static int unix_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
1363 static int unix_dgram_connect(struct socket *sock, struct sockaddr *addr,
1397 /* Apparently VFS overslept socket death. Retry. */
1473 static int unix_stream_connect(struct socket *sock, struct sockaddr *uaddr,
1530 /* Apparently VFS overslept socket death. Retry. */
1562 attempt to connect are eliminated by checking socket
1566 Well, and we have to recheck the state after socket locked.
1667 static int unix_socketpair(struct socket *socka, struct socket *sockb)
1686 static void unix_sock_inherit_flags(const struct socket *old,
1687 struct socket *new)
1697 static int unix_accept(struct socket *sock, struct socket *newsock, int flags,
1713 /* If socket state is TCP_LISTEN it cannot change (for now...),
1730 /* attach accepted sock to socket */
1743 static int unix_getname(struct socket *sock, struct sockaddr *uaddr, int peer)
1788 * Once a candidate, however, the socket must not be reinstalled into a
1803 * yet does install the socket into an fd. The following lock/unlock
1816 * which is on the queue of listening socket A.
1838 static bool unix_passcred_enabled(const struct socket *sock,
1850 * We include credentials if source or destination socket
1853 static void maybe_add_creds(struct sk_buff *skb, const struct socket *sock,
1895 static int unix_dgram_sendmsg(struct socket *sock, struct msghdr *msg,
2113 static int queue_oob(struct socket *sock, struct msghdr *msg, struct sock *other,
2165 static int unix_stream_sendmsg(struct socket *sock, struct msghdr *msg,
2297 static int unix_seqpacket_sendmsg(struct socket *sock, struct msghdr *msg,
2316 static int unix_seqpacket_recvmsg(struct socket *sock, struct msghdr *msg,
2341 struct socket *sock = sk->sk_socket;
2376 /* Signal EOF on disconnected non-blocking SEQPACKET socket. */
2444 static int unix_dgram_recvmsg(struct socket *sock, struct msghdr *msg, size_t size,
2522 struct socket *socket;
2533 struct socket *sock = state->socket;
2613 struct socket *sock = state->socket;
2645 /* Lock the socket to prevent queue disordering
2765 * sure it was dropped from the socket queue
2840 .socket = sk->sk_socket,
2849 static int unix_stream_recvmsg(struct socket *sock, struct msghdr *msg,
2854 .socket = sock,
2874 return skb_splice_bits(skb, state->socket->sk,
2879 static ssize_t unix_stream_splice_read(struct socket *sock, loff_t *ppos,
2885 .socket = sock,
2901 static int unix_shutdown(struct socket *sock, int mode)
3016 static int unix_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
3058 static int unix_compat_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
3064 static __poll_t unix_poll(struct file *file, struct socket *sock, poll_table *wait)
3107 static __poll_t unix_dgram_poll(struct file *file, struct socket *sock,
3691 to use a UNIX socket. But later than subsys_initcall() because