printf: Remove unused 'bprintf'
[drm/drm-misc.git] / include / linux / ppp_defs.h
blobb7e57fdbd4139a5fb98ad2b473ff4df64f5a7375
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3 * ppp_defs.h - PPP definitions.
5 * Copyright 1994-2000 Paul Mackerras.
6 */
7 #ifndef _PPP_DEFS_H_
8 #define _PPP_DEFS_H_
10 #include <linux/crc-ccitt.h>
11 #include <uapi/linux/ppp_defs.h>
13 #define PPP_FCS(fcs, c) crc_ccitt_byte(fcs, c)
15 /**
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_ */