![]() |
|
|||
0001 /* SPDX-License-Identifier: GPL-2.0-only */ 0002 /* 0003 * ppp_defs.h - PPP definitions. 0004 * 0005 * Copyright 1994-2000 Paul Mackerras. 0006 */ 0007 #ifndef _PPP_DEFS_H_ 0008 #define _PPP_DEFS_H_ 0009 0010 #include <linux/crc-ccitt.h> 0011 #include <uapi/linux/ppp_defs.h> 0012 0013 #define PPP_FCS(fcs, c) crc_ccitt_byte(fcs, c) 0014 0015 /** 0016 * ppp_proto_is_valid - checks if PPP protocol is valid 0017 * @proto: PPP protocol 0018 * 0019 * Assumes proto is not compressed. 0020 * Protocol is valid if the value is odd and the least significant bit of the 0021 * most significant octet is 0 (see RFC 1661, section 2). 0022 */ 0023 static inline bool ppp_proto_is_valid(u16 proto) 0024 { 0025 return !!((proto & 0x0101) == 0x0001); 0026 } 0027 0028 #endif /* _PPP_DEFS_H_ */
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.1.0 LXR engine. The LXR team |
![]() ![]() |