Deleted Added
full compact
ng_hci_misc.c (107120) ng_hci_misc.c (109623)
1/*
2 * ng_hci_misc.c
3 *
4 * Copyright (c) Maksim Yevmenkin <m_evmenkin@yahoo.com>
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

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

21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 * SUCH DAMAGE.
27 *
28 * $Id: ng_hci_misc.c,v 1.18 2002/10/30 00:18:19 max Exp $
1/*
2 * ng_hci_misc.c
3 *
4 * Copyright (c) Maksim Yevmenkin <m_evmenkin@yahoo.com>
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

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

21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 * SUCH DAMAGE.
27 *
28 * $Id: ng_hci_misc.c,v 1.18 2002/10/30 00:18:19 max Exp $
29 * $FreeBSD: head/sys/netgraph/bluetooth/hci/ng_hci_misc.c 107120 2002-11-20 23:01:59Z julian $
29 * $FreeBSD: head/sys/netgraph/bluetooth/hci/ng_hci_misc.c 109623 2003-01-21 08:56:16Z alfred $
30 */
31
32#include <sys/param.h>
33#include <sys/systm.h>
34#include <sys/kernel.h>
35#include <sys/malloc.h>
36#include <sys/mbuf.h>
37#include <sys/queue.h>

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

62
63void
64ng_hci_mtap(ng_hci_unit_p unit, struct mbuf *m0)
65{
66 struct mbuf *m = NULL;
67 int error = 0;
68
69 if (unit->raw != NULL && NG_HOOK_IS_VALID(unit->raw)) {
30 */
31
32#include <sys/param.h>
33#include <sys/systm.h>
34#include <sys/kernel.h>
35#include <sys/malloc.h>
36#include <sys/mbuf.h>
37#include <sys/queue.h>

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

62
63void
64ng_hci_mtap(ng_hci_unit_p unit, struct mbuf *m0)
65{
66 struct mbuf *m = NULL;
67 int error = 0;
68
69 if (unit->raw != NULL && NG_HOOK_IS_VALID(unit->raw)) {
70 m = m_dup(m0, M_DONTWAIT);
70 m = m_dup(m0, M_NOWAIT);
71 if (m != NULL)
72 NG_SEND_DATA_ONLY(error, unit->raw, m);
73
74 if (error != 0)
75 NG_HCI_INFO(
76"%s: %s - Could not forward packet, error=%d\n",
77 __func__, NG_NODE_NAME(unit->node), error);
78 }

--- 478 unchanged lines hidden ---
71 if (m != NULL)
72 NG_SEND_DATA_ONLY(error, unit->raw, m);
73
74 if (error != 0)
75 NG_HCI_INFO(
76"%s: %s - Could not forward packet, error=%d\n",
77 __func__, NG_NODE_NAME(unit->node), error);
78 }

--- 478 unchanged lines hidden ---