18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0+ */
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci * Copyright (c) 2024 Huawei Device Co., Ltd.
48c2ecf20Sopenharmony_ci *
58c2ecf20Sopenharmony_ci * Operations on the lowpower protocol
68c2ecf20Sopenharmony_ci * Authors: yangyanjun
78c2ecf20Sopenharmony_ci */
88c2ecf20Sopenharmony_ci#ifndef __LOWPOWER_PROTOCOL_H
98c2ecf20Sopenharmony_ci#define __LOWPOWER_PROTOCOL_H
108c2ecf20Sopenharmony_ci
118c2ecf20Sopenharmony_ci#ifdef CONFIG_LOWPOWER_PROTOCOL
128c2ecf20Sopenharmony_ci#include <linux/types.h>
138c2ecf20Sopenharmony_ci#include <linux/uidgid.h>
148c2ecf20Sopenharmony_ci#include <linux/printk.h>
158c2ecf20Sopenharmony_ci#include <net/sock.h>
168c2ecf20Sopenharmony_ci#include <net/ip.h>
178c2ecf20Sopenharmony_ci#include <net/tcp.h>
188c2ecf20Sopenharmony_ci
198c2ecf20Sopenharmony_ci#define FOREGROUND_UID_INIT 0xEFFFFFFF
208c2ecf20Sopenharmony_ci#define TCP_RCV_WND_INIT 133120
218c2ecf20Sopenharmony_ci#define BIG_DATA_BYTES 200000
228c2ecf20Sopenharmony_ci#define TCP_ACK_NUM 30
238c2ecf20Sopenharmony_ci
248c2ecf20Sopenharmony_civoid __net_init lowpower_protocol_net_init(struct net *net);
258c2ecf20Sopenharmony_ciint tcp_ack_num(struct sock *sk);
268c2ecf20Sopenharmony_cibool netfilter_bypass_enable(struct net *net, struct sk_buff *skb,
278c2ecf20Sopenharmony_ci			     int (*fun)(struct net *, struct sock *, struct sk_buff *),
288c2ecf20Sopenharmony_ci			     int *ret);
298c2ecf20Sopenharmony_cibool dpa_uid_match(uid_t kuid);
308c2ecf20Sopenharmony_ci#endif /* CONFIG_LOWPOWER_PROTOCOL */
318c2ecf20Sopenharmony_ci#endif /* __LOWPOWER_PROTOCOL_H */