Deleted Added
full compact
lcp.c (8857) lcp.c (9438)
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.3 1995/03/11 15:18:45 amurai Exp $
20 * $Id: lcp.c,v 1.4 1995/05/30 03:50:40 rgrimes Exp $
21 *
22 * TODO:
23 * o Validate magic number received from peer.
24 * o Limit data field length by MRU
25 */
26#include <sys/time.h>
27#include "fsm.h"
28#include "lcp.h"

--- 483 unchanged lines hidden (view full) ---

512 } else if (Acceptable(ConfPap)) {
513 *nakp++ = *cp; *nakp++ = 4;
514 *nakp++ = (unsigned char)(PROTO_PAP >> 8);
515 *nakp++ = (unsigned char)PROTO_PAP;
516 } else
517 goto reqreject;
518 break;
519 default:
21 *
22 * TODO:
23 * o Validate magic number received from peer.
24 * o Limit data field length by MRU
25 */
26#include <sys/time.h>
27#include "fsm.h"
28#include "lcp.h"

--- 483 unchanged lines hidden (view full) ---

512 } else if (Acceptable(ConfPap)) {
513 *nakp++ = *cp; *nakp++ = 4;
514 *nakp++ = (unsigned char)(PROTO_PAP >> 8);
515 *nakp++ = (unsigned char)PROTO_PAP;
516 } else
517 goto reqreject;
518 break;
519 default:
520 LogPrintf(LOG_LCP, " %s not implemented.\n", request);
521 goto reqreject;
520 LogPrintf(LOG_LCP, " %s not implemented, NAK.\n", request);
521 bcopy(cp, nakp, length);
522 nakp += length;
523 break;
522 }
523 break;
524 case MODE_NAK:
525 break;
526 case MODE_REJ:
527 LcpInfo.his_reject |= (1 << type);
528 break;
529 }

--- 139 unchanged lines hidden ---
524 }
525 break;
526 case MODE_NAK:
527 break;
528 case MODE_REJ:
529 LcpInfo.his_reject |= (1 << type);
530 break;
531 }

--- 139 unchanged lines hidden ---