Deleted Added
full compact
async.c (36285) async.c (37019)
1/*
2 * PPP Async HDLC 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 Async HDLC 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: async.c,v 1.15.2.14 1998/05/01 19:23:51 brian Exp $
20 * $Id: async.c,v 1.16 1998/05/21 21:43:55 brian Exp $
21 *
22 */
23#include <sys/types.h>
24
25#include <string.h>
26#include <termios.h>
27
28#include "mbuf.h"

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

139 if (!(async->mode & MODE_ESC)) {
140 async->mode |= MODE_ESC;
141 break;
142 }
143 /* Fall into ... */
144 default:
145 if (async->length >= HDLCSIZE) {
146 /* packet is too large, discard it */
21 *
22 */
23#include <sys/types.h>
24
25#include <string.h>
26#include <termios.h>
27
28#include "mbuf.h"

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

139 if (!(async->mode & MODE_ESC)) {
140 async->mode |= MODE_ESC;
141 break;
142 }
143 /* Fall into ... */
144 default:
145 if (async->length >= HDLCSIZE) {
146 /* packet is too large, discard it */
147 log_Printf(LogERROR, "Packet too large (%d), discarding.\n", async->length);
147 log_Printf(LogWARN, "Packet too large (%d), discarding.\n",
148 async->length);
148 async->length = 0;
149 async->mode = MODE_HUNT;
150 break;
151 }
152 if (async->mode & MODE_ESC) {
153 c ^= HDLC_XOR;
154 async->mode &= ~MODE_ESC;
155 }

--- 28 unchanged lines hidden ---
149 async->length = 0;
150 async->mode = MODE_HUNT;
151 break;
152 }
153 if (async->mode & MODE_ESC) {
154 c ^= HDLC_XOR;
155 async->mode &= ~MODE_ESC;
156 }

--- 28 unchanged lines hidden ---