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
71 #include <uapi/linux/socket.h>
92 /* This is the per-socket lock. The spinlock provides a synchronization
132 * @skc_ipv6only: socket is IPV6 only
133 * @skc_net_refcnt: socket is using net ref counting
138 * @skc_net: reference to the network namespace of this socket
141 * @skc_cookie: socket's cookie value
149 * @skc_listener: connection request listener socket (aka rsk_listener)
272 * @sk_reserved_mem: space reserved and non-reclaimable for the socket
291 * @sk_backlog: always used with the per-socket spinlock held
306 * @sk_type: socket type (%SOCK_STREAM, etc)
307 * @sk_protocol: which protocol this socket belongs in this network family
309 * @sk_peer_pid: &struct pid for this socket's peer
316 * @sk_filter: socket filtering instructions
337 * @sk_memcg: this socket's memory cgroup association
338 * @sk_write_pending: a write to stream socket waits to start
409 * the per-socket spinlock held and requires low latency
477 * changes are protected by socket lock.
522 struct socket *sk_socket;
559 * not be suitable for copying when cloning the socket. For instance,
579 * @sk: socket
593 * @sk: socket
618 * @sk: socket
661 * SK_CAN_REUSE and SK_NO_REUSE on a socket mean that the socket is OK
663 * on a socket means that the socket will reuse everybody else's port
769 /* Grab socket reference count. This operation is valid only
780 /* Ungrab socket in the context, which assumes that socket refcnt
945 SOCK_MEMALLOC, /* VM depends on this socket for swapping */
1091 /* The per-socket spinlock must be held here. */
1100 * allow SOCK_MEMALLOC sockets to use it as this socket is
1158 * OR an additional socket flag
1248 * socket layer -> transport layer interface
1284 void (*splice_eof)(struct socket *sock);
1580 struct socket socket;
1584 static inline struct socket *SOCKET_I(struct inode *inode)
1586 return &container_of(inode, struct socket_alloc, vfs_inode)->socket;
1589 static inline struct inode *SOCK_INODE(struct socket *socket)
1591 return &container_of(socket, struct socket_alloc, socket)->vfs_inode;
1738 * @sk: socket
1757 /* fast socket lock variant for caller already holding a [different] socket lock */
1767 * @sk: socket
1770 * fast unlock socket for user context.
1790 /* Used by processes to "lock" a socket state, so that
1794 * packets that change the state of the socket.
1798 * owner of the socket lock right before it is released.
1866 int sock_setsockopt(struct socket *sock, int level, int op,
1871 int sock_getsockopt(struct socket *sock, int level, int op,
1873 int sock_gettstamp(struct socket *sock, void __user *userstamp,
1921 int sock_no_bind(struct socket *, struct sockaddr *, int);
1922 int sock_no_connect(struct socket *, struct sockaddr *, int, int);
1923 int sock_no_socketpair(struct socket *, struct socket *);
1924 int sock_no_accept(struct socket *, struct socket *, int, bool);
1925 int sock_no_getname(struct socket *, struct sockaddr *, int);
1926 int sock_no_ioctl(struct socket *, unsigned int, unsigned long);
1927 int sock_no_listen(struct socket *, int);
1928 int sock_no_shutdown(struct socket *, int);
1929 int sock_no_sendmsg(struct socket *, struct msghdr *, size_t);
1931 int sock_no_recvmsg(struct socket *, struct msghdr *, size_t, int);
1932 int sock_no_mmap(struct file *file, struct socket *sock,
1939 int sock_common_getsockopt(struct socket *sock, int level, int optname,
1941 int sock_common_recvmsg(struct socket *sock, struct msghdr *msg, size_t size,
1943 int sock_common_setsockopt(struct socket *sock, int level, int optname,
1949 * Default socket callbacks and setup code
1952 /* Initialise core socket variables using an explicit uid. */
1953 void sock_init_data_uid(struct socket *sock, struct sock *sk, kuid_t uid);
1955 /* Initialise core socket variables.
1956 * Assumes struct socket *sock is embedded in a struct socket_alloc.
1958 void sock_init_data(struct socket *sock, struct sock *sk);
1963 * * Each user of socket SHOULD hold a reference count.
1964 * * Each access point to socket (an hash table bucket, reference from a list,
1968 * outside exist to this socket and current process on current CPU
1969 * is last user and may/should destroy this socket.
1971 * it is called, socket has no references from outside -> sk_free
1972 * may release descendant resources allocated by the socket, but
1973 * to the time when it is called, socket is NOT referenced by any
1978 * socket is looked up by one cpu and unhasing is made by another CPU.
1980 * (leak to backlog). Packet socket does all the processing inside
1985 /* Ungrab socket and destroy it, if it was the last reference. */
2010 * other WRITE_ONCE() because socket lock might be not held.
2020 * other WRITE_ONCE() because socket lock might be not held.
2085 static inline void sk_set_socket(struct sock *sk, struct socket *sock)
2095 /* Detach socket from process context.
2096 * Announce socket dead, detach it from wait queue and inode.
2100 * to work with this socket (TCP).
2111 static inline void sock_graft(struct sock *sk, struct socket *parent)
2318 * @sk: socket
2329 * @sk: socket
2340 * @sk: socket
2342 * Return: true if socket has write or read allocations
2377 * data on the socket.
2388 * @sock: socket to wait on
2393 static inline void sock_poll_wait(struct file *filp, struct socket *sock,
2399 * socket flags modification.
2582 * @sk: socket
2584 * Use the per task page_frag instead of the per socket one for
2589 * socket operations and end up recursing into sk_page_frag()
2594 * otherwise a per socket one.
2641 /* Alas, with timeout socket operations are not restartable.
2764 * @sk: socket sending this packet
2824 * @sk: socket to eat this skb from
2825 * @skb: socket buffer to eat
2827 * This routine must be called with interrupts disabled or with the socket
2846 /* This helper checks if a socket is a full socket,
2847 * ie _not_ a timewait or request socket.
2862 * skb_steal_sock - steal a socket from an sk_buff
2863 * @skb: sk_buff to steal the socket from
2864 * @refcounted: is set to true if the socket is reference-counted
2865 * @prefetched: is set to true if the socket was assigned from bpf
2886 /* Checks if this SKB belongs to an HW offloaded socket
2888 * Check decrypted mark in case skb_orphan() cleared socket.
2900 pr_warn_ratelimited("unencrypted skb with no associated socket - dropping\n");
2910 /* This helper checks if a socket is a LISTEN or NEW_SYN_RECV
2931 * platforms. This makes socket queueing behavior and performance
2980 /* if a socket is bound to a device, check that the given device
2981 * index is either the same or that the socket is bound to an L3