Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  1) /* SPDX-License-Identifier: GPL-2.0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  2) #ifndef _NET_ESPINTCP_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  3) #define _NET_ESPINTCP_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  4) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  5) #include <net/strparser.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  6) #include <linux/skmsg.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  7) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  8) void __init espintcp_init(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  9) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) int espintcp_push_skb(struct sock *sk, struct sk_buff *skb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) int espintcp_queue_out(struct sock *sk, struct sk_buff *skb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) bool tcp_is_ulp_esp(struct sock *sk);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) struct espintcp_msg {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) 	struct sk_buff *skb;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) 	struct sk_msg skmsg;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) 	int offset;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) 	int len;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) struct espintcp_ctx {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) 	struct strparser strp;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) 	struct sk_buff_head ike_queue;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) 	struct sk_buff_head out_queue;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) 	struct espintcp_msg partial;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) 	void (*saved_data_ready)(struct sock *sk);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) 	void (*saved_write_space)(struct sock *sk);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) 	void (*saved_destruct)(struct sock *sk);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) 	struct work_struct work;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) 	bool tx_running;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) static inline struct espintcp_ctx *espintcp_getctx(const struct sock *sk)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) 	struct inet_connection_sock *icsk = inet_csk(sk);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) 	/* RCU is only needed for diag */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) 	return (__force void *)icsk->icsk_ulp_data;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) #endif