tcp.h (cdd38c5f1ce4398ec58fec95904b75824daab7b5) tcp.h (887596095ec2a9ea39ffcf98f27bf2e77c5eb512)
1/* SPDX-License-Identifier: GPL-2.0-or-later */
2/*
3 * INET An implementation of the TCP/IP protocol suite for the LINUX
4 * operating system. INET is implemented using the BSD Socket
5 * interface as the means of communication with the user level.
6 *
7 * Definitions for the TCP module.
8 *

--- 2208 unchanged lines hidden (view full) ---

2217void tcp_cleanup_ulp(struct sock *sk);
2218void tcp_update_ulp(struct sock *sk, struct proto *p,
2219 void (*write_space)(struct sock *sk));
2220
2221#define MODULE_ALIAS_TCP_ULP(name) \
2222 __MODULE_INFO(alias, alias_userspace, name); \
2223 __MODULE_INFO(alias, alias_tcp_ulp, "tcp-ulp-" name)
2224
1/* SPDX-License-Identifier: GPL-2.0-or-later */
2/*
3 * INET An implementation of the TCP/IP protocol suite for the LINUX
4 * operating system. INET is implemented using the BSD Socket
5 * interface as the means of communication with the user level.
6 *
7 * Definitions for the TCP module.
8 *

--- 2208 unchanged lines hidden (view full) ---

2217void tcp_cleanup_ulp(struct sock *sk);
2218void tcp_update_ulp(struct sock *sk, struct proto *p,
2219 void (*write_space)(struct sock *sk));
2220
2221#define MODULE_ALIAS_TCP_ULP(name) \
2222 __MODULE_INFO(alias, alias_userspace, name); \
2223 __MODULE_INFO(alias, alias_tcp_ulp, "tcp-ulp-" name)
2224
2225#ifdef CONFIG_NET_SOCK_MSG
2225struct sk_msg;
2226struct sk_psock;
2227
2226struct sk_msg;
2227struct sk_psock;
2228
2228#ifdef CONFIG_BPF_STREAM_PARSER
2229#ifdef CONFIG_BPF_SYSCALL
2229struct proto *tcp_bpf_get_proto(struct sock *sk, struct sk_psock *psock);
2230void tcp_bpf_clone(const struct sock *sk, struct sock *newsk);
2230struct proto *tcp_bpf_get_proto(struct sock *sk, struct sk_psock *psock);
2231void tcp_bpf_clone(const struct sock *sk, struct sock *newsk);
2231#else
2232static inline void tcp_bpf_clone(const struct sock *sk, struct sock *newsk)
2233{
2234}
2235#endif /* CONFIG_BPF_STREAM_PARSER */
2232#endif /* CONFIG_BPF_SYSCALL */
2236
2233
2237#ifdef CONFIG_NET_SOCK_MSG
2238int tcp_bpf_sendmsg_redir(struct sock *sk, struct sk_msg *msg, u32 bytes,
2239 int flags);
2240int __tcp_bpf_recvmsg(struct sock *sk, struct sk_psock *psock,
2241 struct msghdr *msg, int len, int flags);
2242#endif /* CONFIG_NET_SOCK_MSG */
2243
2234int tcp_bpf_sendmsg_redir(struct sock *sk, struct sk_msg *msg, u32 bytes,
2235 int flags);
2236int __tcp_bpf_recvmsg(struct sock *sk, struct sk_psock *psock,
2237 struct msghdr *msg, int len, int flags);
2238#endif /* CONFIG_NET_SOCK_MSG */
2239
2240#if !defined(CONFIG_BPF_SYSCALL) || !defined(CONFIG_NET_SOCK_MSG)
2241static inline void tcp_bpf_clone(const struct sock *sk, struct sock *newsk)
2242{
2243}
2244#endif
2245
2244#ifdef CONFIG_CGROUP_BPF
2245static inline void bpf_skops_init_skb(struct bpf_sock_ops_kern *skops,
2246 struct sk_buff *skb,
2247 unsigned int end_offset)
2248{
2249 skops->skb = skb;
2250 skops->skb_data_end = skb->data + end_offset;
2251}

--- 139 unchanged lines hidden ---
2246#ifdef CONFIG_CGROUP_BPF
2247static inline void bpf_skops_init_skb(struct bpf_sock_ops_kern *skops,
2248 struct sk_buff *skb,
2249 unsigned int end_offset)
2250{
2251 skops->skb = skb;
2252 skops->skb_data_end = skb->data + end_offset;
2253}

--- 139 unchanged lines hidden ---