Deleted Added
full compact
ip.c (25067) ip.c (25630)
1/*
2 * PPP IP Protocol Interface
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. 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 IP Protocol Interface
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. 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: ip.c,v 1.14 1997/02/22 16:10:18 peter Exp $
20 * $Id: ip.c,v 1.15 1997/04/21 01:01:45 brian Exp $
21 *
22 * TODO:
23 * o Return ICMP message for filterd packet
24 * and optionaly record it into log.
25 */
26#include "fsm.h"
27#include "lcpproto.h"
28#include "hdlc.h"

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

384 return( exist );
385}
386
387void
388IpStartOutput()
389{
390 struct mqueue *queue;
391 struct mbuf *bp;
21 *
22 * TODO:
23 * o Return ICMP message for filterd packet
24 * and optionaly record it into log.
25 */
26#include "fsm.h"
27#include "lcpproto.h"
28#include "hdlc.h"

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

384 return( exist );
385}
386
387void
388IpStartOutput()
389{
390 struct mqueue *queue;
391 struct mbuf *bp;
392 int pri, cnt;
392 int cnt;
393
394 if (IpcpFsm.state != ST_OPENED)
395 return;
393
394 if (IpcpFsm.state != ST_OPENED)
395 return;
396 pri = PRI_FAST;
397 for (queue = &IpOutputQueues[PRI_FAST]; queue >= IpOutputQueues; queue--) {
398 if (queue->top) {
399 bp = Dequeue(queue);
400 if (bp) {
401 cnt = plength(bp);
402 SendPppFrame(bp);
403 RestartIdleTimer();
404 ipOutOctets += cnt;
405 break;
406 }
407 }
396 for (queue = &IpOutputQueues[PRI_FAST]; queue >= IpOutputQueues; queue--) {
397 if (queue->top) {
398 bp = Dequeue(queue);
399 if (bp) {
400 cnt = plength(bp);
401 SendPppFrame(bp);
402 RestartIdleTimer();
403 ipOutOctets += cnt;
404 break;
405 }
406 }
408 pri--;
409 }
410}
407 }
408}