4 .\" All rights reserved.
6 .\" Author: Hartmut Brandt <harti@FreeBSD.org>
8 .\" Redistribution and use in source and binary forms, with or without
9 .\" modification, are permitted provided that the following conditions
11 .\" 1. Redistributions of source code must retain the above copyright
12 .\" notice, this list of conditions and the following disclaimer.
13 .\" 2. Redistributions in binary form must reproduce the above copyright
14 .\" notice, this list of conditions and the following disclaimer in the
15 .\" documentation and/or other materials provided with the distribution.
17 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
18 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
21 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 .\" ngatmbase(4) man page
38 .Nd netgraph ATM utility module
41 .In netgraph/atm/ngatmbase.h
43 .Fn uni_msg_pack_mbuf "struct uni_msg *msg" "void *hdr" "size_t len"
44 .Ft "struct uni_msg *"
45 .Fn uni_msg_alloc "size_t len"
46 .Ft "struct uni_msg *"
47 .Fn uni_msg_build "void *buf" ...
49 .Fn uni_msg_destroy "struct uni_msg *msg"
51 .Fn uni_msg_unpack_mbuf "struct mbuf *m" "struct uni_msg *msgp"
53 This module provides utility functions for the handling of signalling
54 messages to the NgATM modules.
59 packs a message into one or several
61 optionally prepending a header.
62 The header is given by its address
72 equals 0, no header is prepended.
83 returns a pointer to the allocated
87 in the case of an error.
92 allocates a new message with space for at least
95 In the case of an error
101 function constructs a message from pieces.
102 Each piece is given by a pair of
103 arguments, the first of type
107 The list of pieces must be terminated by
108 .Po Vt "void *" Pc Ns Dv NULL .
113 destroyes the messages and frees all the messages's memory.
116 .Fn uni_msg_unpack_mbuf
122 A pointer to the newly allocated message is stored in
125 In the case of an error (either when no packet header is found
126 in the first mbuf or memory cannot be allocated) the function
127 returns an appropriate error code.
134 .An Harti Brandt Aq harti@FreeBSD.org