Deleted Added
full compact
lcp.c (25500) lcp.c (25630)
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.13 1997/03/13 21:22:06 brian Exp $
20 * $Id: lcp.c,v 1.14 1997/05/05 23:45:15 brian 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"

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

345
346static void
347LcpLayerFinish(fp)
348struct fsm *fp;
349{
350#ifdef VERBOSE
351 fprintf(stderr, "%s: LayerFinish\r\n", fp->name);
352#endif
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"

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

345
346static void
347LcpLayerFinish(fp)
348struct fsm *fp;
349{
350#ifdef VERBOSE
351 fprintf(stderr, "%s: LayerFinish\r\n", fp->name);
352#endif
353 Prompt(1);
353 Prompt();
354 LogPrintf(LOG_LCP_BIT, "%s: LayerFinish\n", fp->name);
355#ifdef notdef
356 OsCloseLink(0);
357#else
358 OsCloseLink(1);
359#endif
360 NewPhase(PHASE_DEAD);
361 StopAllTimers();
354 LogPrintf(LOG_LCP_BIT, "%s: LayerFinish\n", fp->name);
355#ifdef notdef
356 OsCloseLink(0);
357#else
358 OsCloseLink(1);
359#endif
360 NewPhase(PHASE_DEAD);
361 StopAllTimers();
362 OsInterfaceDown(0);
362 (void)OsInterfaceDown(0);
363}
364
365static void
366LcpLayerUp(fp)
367struct fsm *fp;
368{
369 LogPrintf(LOG_LCP_BIT, "%s: LayerUp\n", fp->name);
370 OsSetInterfaceParams(23, LcpInfo.his_mru, ModemSpeed());

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

383static void
384LcpLayerDown(fp)
385struct fsm *fp;
386{
387 LogPrintf(LOG_LCP_BIT, "%s: LayerDown\n", fp->name);
388 StopAllTimers();
389 OsLinkdown();
390 NewPhase(PHASE_TERMINATE);
363}
364
365static void
366LcpLayerUp(fp)
367struct fsm *fp;
368{
369 LogPrintf(LOG_LCP_BIT, "%s: LayerUp\n", fp->name);
370 OsSetInterfaceParams(23, LcpInfo.his_mru, ModemSpeed());

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

383static void
384LcpLayerDown(fp)
385struct fsm *fp;
386{
387 LogPrintf(LOG_LCP_BIT, "%s: LayerDown\n", fp->name);
388 StopAllTimers();
389 OsLinkdown();
390 NewPhase(PHASE_TERMINATE);
391 Prompt(1);
391 Prompt();
392}
393
394void
395LcpUp()
396{
397 FsmUp(&LcpFsm);
398}
399

--- 292 unchanged lines hidden ---
392}
393
394void
395LcpUp()
396{
397 FsmUp(&LcpFsm);
398}
399

--- 292 unchanged lines hidden ---