1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3  * Copyright (c) 2024 Huawei Device Co., Ltd.
4  *
5  * Operations on the lowpower protocol
6  * Authors: yangyanjun
7  */
8 #ifndef __LOWPOWER_PROTOCOL_H
9 #define __LOWPOWER_PROTOCOL_H
10 
11 #ifdef CONFIG_LOWPOWER_PROTOCOL
12 #include <linux/types.h>
13 #include <linux/uidgid.h>
14 #include <linux/printk.h>
15 #include <net/sock.h>
16 #include <net/ip.h>
17 #include <net/tcp.h>
18 
19 #define FOREGROUND_UID_INIT 0xEFFFFFFF
20 #define TCP_RCV_WND_INIT 133120
21 #define BIG_DATA_BYTES 200000
22 #define TCP_ACK_NUM 30
23 
24 void __net_init lowpower_protocol_net_init(struct net *net);
25 int tcp_ack_num(struct sock *sk);
26 bool netfilter_bypass_enable(struct net *net, struct sk_buff *skb,
27 			     int (*fun)(struct net *, struct sock *, struct sk_buff *),
28 			     int *ret);
29 bool dpa_uid_match(uid_t kuid);
30 #endif /* CONFIG_LOWPOWER_PROTOCOL */
31 #endif /* __LOWPOWER_PROTOCOL_H */