Lines Matching defs:socket

7  *		Definitions for the AF_INET socket handler.
22 * a socket is reset and must stay shut up
26 * David S. Miller : New socket lookup architecture.
33 * Pedro Hortas : New flags field for socket options
94 /* This is the per-socket lock. The spinlock provides a synchronization
134 * @skc_ipv6only: socket is IPV6 only
135 * @skc_net_refcnt: socket is using net ref counting
140 * @skc_net: reference to the network namespace of this socket
143 * @skc_cookie: socket's cookie value
151 * @skc_listener: connection request listener socket (aka rsk_listener)
297 * @sk_backlog: always used with the per-socket spinlock held
310 * @sk_type: socket type (%SOCK_STREAM, etc)
311 * @sk_protocol: which protocol this socket belongs in this network family
312 * @sk_peer_pid: &struct pid for this socket's peer
318 * @sk_filter: socket filtering instructions
322 * @sk_tsflags: SO_TIMESTAMPING socket options
335 * @sk_memcg: this socket's memory cgroup association
336 * @sk_write_pending: a write to stream socket waits to start
337 * @sk_wait_pending: number of threads blocked on this socket
401 * the per-socket spinlock held and requires low latency
470 * changes are protected by socket lock.
508 struct socket *sk_socket;
543 * not be suitable for copying when cloning the socket. For instance,
563 * @sk: socket
577 * @sk: socket
608 * SK_CAN_REUSE and SK_NO_REUSE on a socket mean that the socket is OK
610 * on a socket means that the socket will reuse everybody else's port
721 /* Grab socket reference count. This operation is valid only
732 /* Ungrab socket in the context, which assumes that socket refcnt
885 SOCK_MEMALLOC, /* VM depends on this socket for swapping */
1020 /* The per-socket spinlock must be held here. */
1029 * allow SOCK_MEMALLOC sockets to use it as this socket is
1081 * OR an additional socket flag
1172 * socket layer -> transport layer interface
1301 printk(KERN_DEBUG "%s socket %p released, %d are still alive\n",
1308 printk(KERN_DEBUG "Destruction of the %s socket %p delayed, refcnt=%d\n",
1469 struct socket socket;
1473 static inline struct socket *SOCKET_I(struct inode *inode)
1475 return &container_of(inode, struct socket_alloc, vfs_inode)->socket;
1478 static inline struct inode *SOCK_INODE(struct socket *socket)
1480 return &container_of(socket, struct socket_alloc, socket)->vfs_inode;
1657 * @sk: socket
1660 * fast unlock socket for user context.
1671 /* Used by processes to "lock" a socket state, so that
1675 * packets that change the state of the socket.
1679 * owner of the socket lock right before it is released.
1741 int sock_setsockopt(struct socket *sock, int level, int op,
1744 int sock_getsockopt(struct socket *sock, int level, int op,
1746 int sock_gettstamp(struct socket *sock, void __user *userstamp,
1779 int sock_no_bind(struct socket *, struct sockaddr *, int);
1780 int sock_no_connect(struct socket *, struct sockaddr *, int, int);
1781 int sock_no_socketpair(struct socket *, struct socket *);
1782 int sock_no_accept(struct socket *, struct socket *, int, bool);
1783 int sock_no_getname(struct socket *, struct sockaddr *, int);
1784 int sock_no_ioctl(struct socket *, unsigned int, unsigned long);
1785 int sock_no_listen(struct socket *, int);
1786 int sock_no_shutdown(struct socket *, int);
1787 int sock_no_sendmsg(struct socket *, struct msghdr *, size_t);
1789 int sock_no_recvmsg(struct socket *, struct msghdr *, size_t, int);
1790 int sock_no_mmap(struct file *file, struct socket *sock,
1792 ssize_t sock_no_sendpage(struct socket *sock, struct page *page, int offset,
1801 int sock_common_getsockopt(struct socket *sock, int level, int optname,
1803 int sock_common_recvmsg(struct socket *sock, struct msghdr *msg, size_t size,
1805 int sock_common_setsockopt(struct socket *sock, int level, int optname,
1811 * Default socket callbacks and setup code
1814 /* Initialise core socket variables using an explicit uid. */
1815 void sock_init_data_uid(struct socket *sock, struct sock *sk, kuid_t uid);
1817 /* Initialise core socket variables.
1818 * Assumes struct socket *sock is embedded in a struct socket_alloc.
1820 void sock_init_data(struct socket *sock, struct sock *sk);
1825 * * Each user of socket SHOULD hold a reference count.
1826 * * Each access point to socket (an hash table bucket, reference from a list,
1830 * outside exist to this socket and current process on current CPU
1831 * is last user and may/should destroy this socket.
1833 * it is called, socket has no references from outside -> sk_free
1834 * may release descendant resources allocated by the socket, but
1835 * to the time when it is called, socket is NOT referenced by any
1840 * socket is looked up by one cpu and unhasing is made by another CPU.
1842 * (leak to backlog). Packet socket does all the processing inside
1847 /* Ungrab socket and destroy it, if it was the last reference. */
1872 * other WRITE_ONCE() because socket lock might be not held.
1882 * other WRITE_ONCE() because socket lock might be not held.
1932 static inline void sk_set_socket(struct sock *sk, struct socket *sock)
1942 /* Detach socket from process context.
1943 * Announce socket dead, detach it from wait queue and inode.
1947 * to work with this socket (TCP).
1958 static inline void sock_graft(struct sock *sk, struct socket *parent)
2163 * @sk: socket
2174 * @sk: socket
2185 * @sk: socket
2187 * Return: true if socket has write or read allocations
2222 * data on the socket.
2233 * @sock: socket to wait on
2238 static inline void sock_poll_wait(struct file *filp, struct socket *sock,
2244 * socket flags modification.
2411 * @sk: socket
2413 * Use the per task page_frag instead of the per socket one for
2418 * socket operations and end up recursing into sk_page_frag()
2424 * otherwise a per socket one.
2467 /* Alas, with timeout socket operations are not restartable.
2588 * @sk: socket sending this packet
2623 * @sk: socket to eat this skb from
2624 * @skb: socket buffer to eat
2626 * This routine must be called with interrupts disabled or with the socket
2663 /* This helper checks if a socket is a full socket,
2664 * ie _not_ a timewait or request socket.
2679 * skb_steal_sock - steal a socket from an sk_buff
2680 * @skb: sk_buff to steal the socket from
2681 * @refcounted: is set to true if the socket is reference-counted
2700 /* Checks if this SKB belongs to an HW offloaded socket
2702 * Check decrypted mark in case skb_orphan() cleared socket.
2714 pr_warn_ratelimited("unencrypted skb with no associated socket - dropping\n");
2724 /* This helper checks if a socket is a LISTEN or NEW_SYN_RECV
2745 * platforms. This makes socket queueing behavior and performance
2794 /* if a socket is bound to a device, check that the given device
2795 * index is either the same or that the socket is bound to an L3