]> git.ozlabs.org Git - ppp.git/blobdiff - pppd/demand.c
The use of <net/ppp_defs.h> isn't guranteed to exist on Linux (e.g. uclibc, buildroot...
[ppp.git] / pppd / demand.c
index 3e320798355de806223d0dd11896e19892da0930..d610d69ac282ea83d9ca841bdea21b7c6663906a 100644 (file)
@@ -210,6 +210,7 @@ static u_short fcstab[256] = {
        0xf78f, 0xe606, 0xd49d, 0xc514, 0xb1ab, 0xa022, 0x92b9, 0x8330,
        0x7bc7, 0x6a4e, 0x58d5, 0x495c, 0x3de3, 0x2c6a, 0x1ef1, 0x0f78
 };
+#define PPP_FCS(fcs, c)        (((fcs) >> 8) ^ fcstab[((fcs) ^ (c)) & 0xff])
 
 /*
  * loop_chars - process characters received from the loopback.