FreeBSD kernel netgraph code
ngatmbase.h
Go to the documentation of this file.
1/*-
2 * Copyright (c) 2001-2003
3 * Fraunhofer Institute for Open Communication Systems (FhG Fokus).
4 * All rights reserved.
5 *
6 * Author: Harti Brandt <harti@freebsd.org>
7 *
8 * Redistribution of this software and documentation and use in source and
9 * binary forms, with or without modification, are permitted provided that
10 * the following conditions are met:
11 *
12 * 1. Redistributions of source code or documentation must retain the above
13 * copyright notice, this list of conditions and the following disclaimer.
14 * 2. Redistributions in binary form must reproduce the above copyright
15 * notice, this list of conditions and the following disclaimer in the
16 * documentation and/or other materials provided with the distribution.
17 *
18 * THIS SOFTWARE AND DOCUMENTATION IS PROVIDED BY FRAUNHOFER FOKUS
19 * AND ITS CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
20 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
21 * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
22 * FRAUNHOFER FOKUS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
23 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
25 * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
26 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
27 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
28 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 *
30 * $FreeBSD$
31 *
32 * In-kernel UNI stack message functions.
33 */
34#ifndef _NETGRAPH_ATM_NGATMBASE_H_
35#define _NETGRAPH_ATM_NGATMBASE_H_
36
37/* forward declarations */
38struct mbuf;
39struct uni_msg;
40
41struct mbuf *uni_msg_pack_mbuf(struct uni_msg *, void *, size_t);
42
43#ifdef NGATM_DEBUG
44
45struct uni_msg *_uni_msg_alloc(size_t, const char *, int);
46struct uni_msg *_uni_msg_build(const char *, int, void *, ...);
47void _uni_msg_destroy(struct uni_msg *, const char *, int);
48int _uni_msg_unpack_mbuf(struct mbuf *, struct uni_msg **, const char *, int);
49
50#define uni_msg_alloc(S) _uni_msg_alloc((S), __FILE__, __LINE__)
51#define uni_msg_build(P...) _uni_msg_build(__FILE__, __LINE__, P)
52#define uni_msg_destroy(M) _uni_msg_destroy((M), __FILE__, __LINE__)
53#define uni_msg_unpack_mbuf(M, PP) \
54 _uni_msg_unpack_mbuf((M), (PP), __FILE__, __LINE__)
55
56#else /* !NGATM_DEBUG */
57
58struct uni_msg *uni_msg_alloc(size_t);
59struct uni_msg *uni_msg_build(void *, ...);
60void uni_msg_destroy(struct uni_msg *);
61int uni_msg_unpack_mbuf(struct mbuf *, struct uni_msg **);
62
63#endif
64#endif
struct mbuf * uni_msg_pack_mbuf(struct uni_msg *, void *, size_t)
Definition: ngatmbase.c:138
int uni_msg_unpack_mbuf(struct mbuf *, struct uni_msg **)
Definition: ngatmbase.c:458
struct uni_msg * uni_msg_build(void *,...)
Definition: ngatmbase.c:411
void uni_msg_destroy(struct uni_msg *)
Definition: ngatmbase.c:387
struct uni_msg * uni_msg_alloc(size_t)
Definition: ngatmbase.c:352