Deleted Added
full compact
ng_sppp.c (155016) ng_sppp.c (165632)
1/*
2 * ng_sppp.c Netgraph to Sppp module.
3 */
4
5/*-
6 * Copyright (C) 2002-2004 Cronyx Engineering.
7 * Copyright (C) 2002-2004 Roman Kurakin <rik@cronyx.ru>
8 *
9 * This software is distributed with NO WARRANTIES, not even the implied
10 * warranties for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11 *
12 * Authors grant any other persons or organisations a permission to use,
13 * modify and redistribute this software in source and binary forms,
14 * as long as this message is kept with the software, all derivative
15 * works or modified versions.
16 *
17 * Cronyx Id: ng_sppp.c,v 1.1.2.10 2004/03/01 15:17:21 rik Exp $
18 */
19#include <sys/cdefs.h>
1/*
2 * ng_sppp.c Netgraph to Sppp module.
3 */
4
5/*-
6 * Copyright (C) 2002-2004 Cronyx Engineering.
7 * Copyright (C) 2002-2004 Roman Kurakin <rik@cronyx.ru>
8 *
9 * This software is distributed with NO WARRANTIES, not even the implied
10 * warranties for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11 *
12 * Authors grant any other persons or organisations a permission to use,
13 * modify and redistribute this software in source and binary forms,
14 * as long as this message is kept with the software, all derivative
15 * works or modified versions.
16 *
17 * Cronyx Id: ng_sppp.c,v 1.1.2.10 2004/03/01 15:17:21 rik Exp $
18 */
19#include <sys/cdefs.h>
20__FBSDID("$FreeBSD: head/sys/netgraph/ng_sppp.c 155016 2006-01-29 22:06:51Z rik $");
20__FBSDID("$FreeBSD: head/sys/netgraph/ng_sppp.c 165632 2006-12-29 13:59:50Z jhb $");
21
22#include <sys/param.h>
23#include <sys/systm.h>
24#include <sys/errno.h>
25#include <sys/kernel.h>
26#include <sys/malloc.h>
27#include <sys/mbuf.h>
28#include <sys/errno.h>

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

214 return;
215
216 if (!priv->hook)
217 return;
218
219 ifp->if_drv_flags |= IFF_DRV_OACTIVE;
220
221 while ((m = sppp_dequeue (ifp)) != NULL) {
21
22#include <sys/param.h>
23#include <sys/systm.h>
24#include <sys/errno.h>
25#include <sys/kernel.h>
26#include <sys/malloc.h>
27#include <sys/mbuf.h>
28#include <sys/errno.h>

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

214 return;
215
216 if (!priv->hook)
217 return;
218
219 ifp->if_drv_flags |= IFF_DRV_OACTIVE;
220
221 while ((m = sppp_dequeue (ifp)) != NULL) {
222 if (ifp->if_bpf)
223 BPF_MTAP (ifp, m);
222 BPF_MTAP (ifp, m);
224 len = m->m_pkthdr.len;
225
226 NG_SEND_DATA_ONLY (error, priv->hook, m);
227
228 if (error) {
229 ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
230 return;
231 }

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

377
378 /* Update interface stats */
379 SP2IFP(pp)->if_ipackets++;
380
381 /* Note receiving interface */
382 m->m_pkthdr.rcvif = SP2IFP(pp);
383
384 /* Berkeley packet filter */
223 len = m->m_pkthdr.len;
224
225 NG_SEND_DATA_ONLY (error, priv->hook, m);
226
227 if (error) {
228 ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
229 return;
230 }

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

376
377 /* Update interface stats */
378 SP2IFP(pp)->if_ipackets++;
379
380 /* Note receiving interface */
381 m->m_pkthdr.rcvif = SP2IFP(pp);
382
383 /* Berkeley packet filter */
385 if (SP2IFP(pp)->if_bpf)
386 BPF_MTAP (SP2IFP(pp), m);
384 BPF_MTAP (SP2IFP(pp), m);
387
388 /* Send packet */
389 sppp_input (SP2IFP(pp), m);
390 return 0;
391}
392
393/*
394 * Shutdown and remove the node and its associated interface.

--- 30 unchanged lines hidden ---
385
386 /* Send packet */
387 sppp_input (SP2IFP(pp), m);
388 return 0;
389}
390
391/*
392 * Shutdown and remove the node and its associated interface.

--- 30 unchanged lines hidden ---