1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * ppp_defs.h - PPP definitions.
5 * Copyright 1994-2000 Paul Mackerras.
10 #include <linux/crc-ccitt.h>
11 #include <uapi/linux/ppp_defs.h>
13 #define PPP_FCS(fcs, c) crc_ccitt_byte(fcs, c)
16 * ppp_proto_is_valid - checks if PPP protocol is valid
17 * @proto: PPP protocol
19 * Assumes proto is not compressed.
20 * Protocol is valid if the value is odd and the least significant bit of the
21 * most significant octet is 0 (see RFC 1661, section 2).
23 static inline bool ppp_proto_is_valid(u16 proto
)
25 return !!((proto
& 0x0101) == 0x0001);
28 #endif /* _PPP_DEFS_H_ */