Deleted Added
full compact
lqr.c (25908) lqr.c (26098)
1/*
2 * PPP Line Quality Monitoring (LQM) 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 Line Quality Monitoring (LQM) 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: lqr.c,v 1.11 1997/05/09 16:16:31 jdp Exp $
20 * $Id: lqr.c,v 1.12 1997/05/19 02:00:05 brian Exp $
21 *
22 * o LQR based on RFC1333
23 *
24 * TODO:
25 * o LQM policy
26 * o Allow user to configure LQM method and interval.
27 */
28#include "fsm.h"

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

105
106 if (lqmmethod & LQM_LQR) {
107 if (lqrsendcnt > 5) {
108 /*
109 * XXX: Should implement LQM strategy
110 */
111 LogPrintf(LOG_PHASE_BIT, "** 1 Too many ECHO packets are lost. **\n");
112 lqmmethod = 0; /* Prevent rcursion via LcpClose() */
21 *
22 * o LQR based on RFC1333
23 *
24 * TODO:
25 * o LQM policy
26 * o Allow user to configure LQM method and interval.
27 */
28#include "fsm.h"

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

105
106 if (lqmmethod & LQM_LQR) {
107 if (lqrsendcnt > 5) {
108 /*
109 * XXX: Should implement LQM strategy
110 */
111 LogPrintf(LOG_PHASE_BIT, "** 1 Too many ECHO packets are lost. **\n");
112 lqmmethod = 0; /* Prevent rcursion via LcpClose() */
113 reconnect(RECON_TRUE);
113 LcpClose();
114 LcpClose();
114 reconnectRequired = 1;
115 } else {
116 bp = mballoc(sizeof(struct lqrdata), MB_LQR);
117 HdlcOutput(PRI_LINK, PROTO_LQR, bp);
118 lqrsendcnt++;
119 }
120 } else if (lqmmethod & LQM_ECHO) {
121 if (echoseq - gotseq > 5) {
122 LogPrintf(LOG_PHASE_BIT, "** 2 Too many ECHO packets are lost. **\n");
123 lqmmethod = 0; /* Prevent rcursion via LcpClose() */
115 } else {
116 bp = mballoc(sizeof(struct lqrdata), MB_LQR);
117 HdlcOutput(PRI_LINK, PROTO_LQR, bp);
118 lqrsendcnt++;
119 }
120 } else if (lqmmethod & LQM_ECHO) {
121 if (echoseq - gotseq > 5) {
122 LogPrintf(LOG_PHASE_BIT, "** 2 Too many ECHO packets are lost. **\n");
123 lqmmethod = 0; /* Prevent rcursion via LcpClose() */
124 reconnect(RECON_TRUE);
124 LcpClose();
125 LcpClose();
125 reconnectRequired = 1;
126 } else
127 SendEchoReq();
128 }
129
130 if (lqmmethod && Enabled(ConfLqr))
131 StartTimer(&LqrTimer);
132}
133

--- 136 unchanged lines hidden ---
126 } else
127 SendEchoReq();
128 }
129
130 if (lqmmethod && Enabled(ConfLqr))
131 StartTimer(&LqrTimer);
132}
133

--- 136 unchanged lines hidden ---