162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
262306a36Sopenharmony_ci#ifndef _NET_PPTP_H
362306a36Sopenharmony_ci#define _NET_PPTP_H
462306a36Sopenharmony_ci
562306a36Sopenharmony_ci#include <linux/types.h>
662306a36Sopenharmony_ci#include <net/gre.h>
762306a36Sopenharmony_ci
862306a36Sopenharmony_ci#define PPP_LCP_ECHOREQ 0x09
962306a36Sopenharmony_ci#define PPP_LCP_ECHOREP 0x0A
1062306a36Sopenharmony_ci#define SC_RCV_BITS     (SC_RCV_B7_1|SC_RCV_B7_0|SC_RCV_ODDP|SC_RCV_EVNP)
1162306a36Sopenharmony_ci
1262306a36Sopenharmony_ci#define MISSING_WINDOW 20
1362306a36Sopenharmony_ci#define WRAPPED(curseq, lastseq)\
1462306a36Sopenharmony_ci	((((curseq) & 0xffffff00) == 0) &&\
1562306a36Sopenharmony_ci	(((lastseq) & 0xffffff00) == 0xffffff00))
1662306a36Sopenharmony_ci
1762306a36Sopenharmony_ci#define PPTP_HEADER_OVERHEAD (2+sizeof(struct pptp_gre_header))
1862306a36Sopenharmony_cistruct pptp_gre_header {
1962306a36Sopenharmony_ci	struct gre_base_hdr gre_hd;
2062306a36Sopenharmony_ci	__be16 payload_len;
2162306a36Sopenharmony_ci	__be16 call_id;
2262306a36Sopenharmony_ci	__be32 seq;
2362306a36Sopenharmony_ci	__be32 ack;
2462306a36Sopenharmony_ci} __packed;
2562306a36Sopenharmony_ci
2662306a36Sopenharmony_ci
2762306a36Sopenharmony_ci#endif
28