Deleted Added
full compact
if_cp.c (164033) if_cp.c (165632)
1/*-
2 * Cronyx-Tau-PCI adapter driver for FreeBSD.
3 * Supports PPP/HDLC, Cisco/HDLC and FrameRelay protocol in synchronous mode,
4 * and asyncronous channels with full modem control.
5 * Keepalive protocol implemented in both Cisco and PPP modes.
6 *
7 * Copyright (C) 1999-2004 Cronyx Engineering.
8 * Author: Kurakin Roman, <rik@cronyx.ru>

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

17 * modify and redistribute this software in source and binary forms,
18 * as long as this message is kept with the software, all derivative
19 * works or modified versions.
20 *
21 * Cronyx Id: if_cp.c,v 1.1.2.41 2004/06/23 17:09:13 rik Exp $
22 */
23
24#include <sys/cdefs.h>
1/*-
2 * Cronyx-Tau-PCI adapter driver for FreeBSD.
3 * Supports PPP/HDLC, Cisco/HDLC and FrameRelay protocol in synchronous mode,
4 * and asyncronous channels with full modem control.
5 * Keepalive protocol implemented in both Cisco and PPP modes.
6 *
7 * Copyright (C) 1999-2004 Cronyx Engineering.
8 * Author: Kurakin Roman, <rik@cronyx.ru>

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

17 * modify and redistribute this software in source and binary forms,
18 * as long as this message is kept with the software, all derivative
19 * works or modified versions.
20 *
21 * Cronyx Id: if_cp.c,v 1.1.2.41 2004/06/23 17:09:13 rik Exp $
22 */
23
24#include <sys/cdefs.h>
25__FBSDID("$FreeBSD: head/sys/dev/cp/if_cp.c 164033 2006-11-06 13:42:10Z rwatson $");
25__FBSDID("$FreeBSD: head/sys/dev/cp/if_cp.c 165632 2006-12-29 13:59:50Z jhb $");
26
27#include <sys/param.h>
28#include <sys/ucred.h>
29#include <sys/proc.h>
30#include <sys/systm.h>
31#include <sys/mbuf.h>
32#include <sys/kernel.h>
33#include <sys/module.h>

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

828 if (! m)
829 IF_DEQUEUE (&d->queue, m);
830#else
831 m = sppp_dequeue (d->ifp);
832#endif
833 if (! m)
834 return;
835#ifndef NETGRAPH
26
27#include <sys/param.h>
28#include <sys/ucred.h>
29#include <sys/proc.h>
30#include <sys/systm.h>
31#include <sys/mbuf.h>
32#include <sys/kernel.h>
33#include <sys/module.h>

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

828 if (! m)
829 IF_DEQUEUE (&d->queue, m);
830#else
831 m = sppp_dequeue (d->ifp);
832#endif
833 if (! m)
834 return;
835#ifndef NETGRAPH
836 if (d->ifp->if_bpf)
837 BPF_MTAP (d->ifp, m);
836 BPF_MTAP (d->ifp, m);
838#endif
839 len = m_length (m, NULL);
840 if (len >= BUFSZ)
841 printf ("%s: too long packet: %d bytes: ",
842 d->name, len);
843 else if (! m->m_next)
844 cp_send_packet (d->chan, (u_char*) mtod (m, caddr_t), len, 0);
845 else {

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

938#ifdef NETGRAPH
939 m->m_pkthdr.rcvif = 0;
940 NG_SEND_DATA_ONLY (error, d->hook, m);
941#else
942 ++d->ifp->if_ipackets;
943 m->m_pkthdr.rcvif = d->ifp;
944 /* Check if there's a BPF listener on this interface.
945 * If so, hand off the raw packet to bpf. */
837#endif
838 len = m_length (m, NULL);
839 if (len >= BUFSZ)
840 printf ("%s: too long packet: %d bytes: ",
841 d->name, len);
842 else if (! m->m_next)
843 cp_send_packet (d->chan, (u_char*) mtod (m, caddr_t), len, 0);
844 else {

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

937#ifdef NETGRAPH
938 m->m_pkthdr.rcvif = 0;
939 NG_SEND_DATA_ONLY (error, d->hook, m);
940#else
941 ++d->ifp->if_ipackets;
942 m->m_pkthdr.rcvif = d->ifp;
943 /* Check if there's a BPF listener on this interface.
944 * If so, hand off the raw packet to bpf. */
946 if (d->ifp->if_bpf)
947 BPF_TAP (d->ifp, data, len);
945 BPF_TAP (d->ifp, data, len);
948 IF_ENQUEUE (&d->queue, m);
949#endif
950}
951
952static void cp_error (cp_chan_t *c, int data)
953{
954 drv_t *d = c->sys;
955

--- 1375 unchanged lines hidden ---
946 IF_ENQUEUE (&d->queue, m);
947#endif
948}
949
950static void cp_error (cp_chan_t *c, int data)
951{
952 drv_t *d = c->sys;
953

--- 1375 unchanged lines hidden ---