lcp.c (46686) | lcp.c (46828) |
---|---|
1/* 2 * PPP Link Control Protocol (LCP) Module 3 * 4 * Written by Toshiharu OHNO (tony-o@iij.ad.jp) 5 * 6 * Copyright (C) 1993, Internet Initiative Japan, Inc. All rights reserverd. 7 * 8 * Redistribution and use in source and binary forms are permitted 9 * provided that the above copyright notice and this paragraph are 10 * duplicated in all such forms and that any documentation, 11 * advertising materials, and other materials related to such 12 * distribution and use acknowledge that the software was developed 13 * by the Internet Initiative Japan, Inc. The name of the 14 * IIJ may not be used to endorse or promote products derived 15 * from this software without specific prior written permission. 16 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 17 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 18 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. 19 * | 1/* 2 * PPP Link Control Protocol (LCP) Module 3 * 4 * Written by Toshiharu OHNO (tony-o@iij.ad.jp) 5 * 6 * Copyright (C) 1993, Internet Initiative Japan, Inc. All rights reserverd. 7 * 8 * Redistribution and use in source and binary forms are permitted 9 * provided that the above copyright notice and this paragraph are 10 * duplicated in all such forms and that any documentation, 11 * advertising materials, and other materials related to such 12 * distribution and use acknowledge that the software was developed 13 * by the Internet Initiative Japan, Inc. The name of the 14 * IIJ may not be used to endorse or promote products derived 15 * from this software without specific prior written permission. 16 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 17 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 18 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. 19 * |
20 * $Id: lcp.c,v 1.72 1999/04/11 08:51:04 brian Exp $ | 20 * $Id: lcp.c,v 1.73 1999/05/08 11:06:51 brian Exp $ |
21 * 22 */ 23 24#include <sys/param.h> 25#include <netinet/in.h> 26#include <netinet/in_systm.h> 27#include <netinet/ip.h> 28#include <sys/un.h> --- 840 unchanged lines hidden (view full) --- 869 switch (mode_type) { 870 case MODE_REQ: 871 if (IsAccepted(lcp->cfg.protocomp)) { 872 lcp->his_protocomp = 1; 873 memcpy(dec->ackend, cp, 2); 874 dec->ackend += 2; 875 } else { 876#ifdef OLDMST | 21 * 22 */ 23 24#include <sys/param.h> 25#include <netinet/in.h> 26#include <netinet/in_systm.h> 27#include <netinet/ip.h> 28#include <sys/un.h> --- 840 unchanged lines hidden (view full) --- 869 switch (mode_type) { 870 case MODE_REQ: 871 if (IsAccepted(lcp->cfg.protocomp)) { 872 lcp->his_protocomp = 1; 873 memcpy(dec->ackend, cp, 2); 874 dec->ackend += 2; 875 } else { 876#ifdef OLDMST |
877 /* 878 * MorningStar before v1.3 needs NAK 879 */ | 877 /* MorningStar before v1.3 needs NAK */ |
880 memcpy(dec->nakend, cp, 2); 881 dec->nakend += 2; 882#else 883 goto reqreject; 884#endif 885 } 886 break; 887 case MODE_NAK: --- 9 unchanged lines hidden (view full) --- 897 switch (mode_type) { 898 case MODE_REQ: 899 if (IsAccepted(lcp->cfg.acfcomp)) { 900 lcp->his_acfcomp = 1; 901 memcpy(dec->ackend, cp, 2); 902 dec->ackend += 2; 903 } else { 904#ifdef OLDMST | 878 memcpy(dec->nakend, cp, 2); 879 dec->nakend += 2; 880#else 881 goto reqreject; 882#endif 883 } 884 break; 885 case MODE_NAK: --- 9 unchanged lines hidden (view full) --- 895 switch (mode_type) { 896 case MODE_REQ: 897 if (IsAccepted(lcp->cfg.acfcomp)) { 898 lcp->his_acfcomp = 1; 899 memcpy(dec->ackend, cp, 2); 900 dec->ackend += 2; 901 } else { 902#ifdef OLDMST |
905 /* 906 * MorningStar before v1.3 needs NAK 907 */ | 903 /* MorningStar before v1.3 needs NAK */ |
908 memcpy(dec->nakend, cp, 2); 909 dec->nakend += 2; 910#else 911 goto reqreject; 912#endif 913 } 914 break; 915 case MODE_NAK: --- 242 unchanged lines hidden --- | 904 memcpy(dec->nakend, cp, 2); 905 dec->nakend += 2; 906#else 907 goto reqreject; 908#endif 909 } 910 break; 911 case MODE_NAK: --- 242 unchanged lines hidden --- |