1/*
2 * ng_l2cap_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_l2cap_misc.c,v 1.16 2002/09/04 21:38:38 max Exp $
29 * $FreeBSD: head/sys/netgraph/bluetooth/l2cap/ng_l2cap_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>
--- 389 unchanged lines hidden (view full) ---
427
428/*
429 * Prepend "m"buf with "size" bytes
430 */
431
432struct mbuf *
433ng_l2cap_prepend(struct mbuf *m, int size)
434{
435 M_PREPEND(m, size, M_NOWAIT);
436 if (m == NULL || (m->m_len < size && (m = m_pullup(m, size)) == NULL))
437 return (NULL);
438
439 return (m);
440} /* ng_l2cap_prepend */
441
442/*
443 * Default flow settings
--- 74 unchanged lines hidden ---
2 * ng_l2cap_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_l2cap_misc.c,v 1.16 2002/09/04 21:38:38 max Exp $
29 * $FreeBSD: head/sys/netgraph/bluetooth/l2cap/ng_l2cap_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>
--- 389 unchanged lines hidden (view full) ---
427
428/*
429 * Prepend "m"buf with "size" bytes
430 */
431
432struct mbuf *
433ng_l2cap_prepend(struct mbuf *m, int size)
434{
435 M_PREPEND(m, size, M_NOWAIT);
436 if (m == NULL || (m->m_len < size && (m = m_pullup(m, size)) == NULL))
437 return (NULL);
438
439 return (m);
440} /* ng_l2cap_prepend */
441
442/*
443 * Default flow settings
--- 74 unchanged lines hidden ---