Debian Codegraph @

drivers/net/ovpn/tcp.h

raw
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /* OpenVPN data channel offload
3 *
4 * Copyright (C) 2019-2025 OpenVPN, Inc.
5 *
6 * Author: Antonio Quartulli <[email protected]>
7 */
8
9 #ifndef _NET_OVPN_TCP_H_
10 #define _NET_OVPN_TCP_H_
11
12 #include <linux/net.h>
13 #include <linux/skbuff.h>
14 #include <linux/types.h>
15
16 #include "peer.h"
17 #include "skb.h"
18 #include "socket.h"
19
20 void __init ovpn_tcp_init(void);
21
22 int ovpn_tcp_socket_attach(struct ovpn_socket *ovpn_sock,
23 struct ovpn_peer *peer);
24 void ovpn_tcp_socket_detach(struct ovpn_socket *ovpn_sock);
25 void ovpn_tcp_socket_wait_finish(struct ovpn_socket *sock);
26
27 /* Prepare skb and enqueue it for sending to peer.
28 *
29 * Preparation consist in prepending the skb payload with its size.
30 * Required by the OpenVPN protocol in order to extract packets from
31 * the TCP stream on the receiver side.
32 */
33 void ovpn_tcp_send_skb(struct ovpn_peer *peer, struct sock *sk,
34 struct sk_buff *skb);
35 void ovpn_tcp_tx_work(struct work_struct *work);
36
37 #endif /* _NET_OVPN_TCP_H_ */