]> CyberLeo.Net >> Repos - FreeBSD/releng/7.2.git/blob - share/man/man7/bsd.snmpmod.mk.7
Create releng/7.2 from stable/7 in preparation for 7.2-RELEASE.
[FreeBSD/releng/7.2.git] / share / man / man7 / bsd.snmpmod.mk.7
1 .\"
2 .\" Copyright (c) 2005
3 .\"     Hartmut Brandt.
4 .\"     All rights reserved.
5 .\"
6 .\" Author: Hartmut Brandt <harti@FreeBSD.org>
7 .\"
8 .\" Redistribution and use in source and binary forms, with or without
9 .\" modification, are permitted provided that the following conditions
10 .\" are met:
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.
16 .\"
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
27 .\" SUCH DAMAGE.
28 .\"
29 .\" $FreeBSD$
30 .\"
31 .Dd November 10, 2005
32 .Dt BSD.SNMPMOD.MK 7
33 .Os
34 .Sh NAME
35 .Nm bsd.snmpmod.mk
36 .Nd building modules for
37 .Xr bsnmpd 1
38 .Sh SYNOPSIS
39 .Fd ".include <bsd.snmpmod.mk>"
40 .Sh DESCRIPTION
41 The file
42 .In bsd.snmpmod.mk
43 simplifies the building of modules for the Begemot SNMP daemon,
44 .Xr bsnmpd 1 .
45 It provides some common functions for building a module and
46 relies on
47 .In bsd.lib.mk ,
48 which is included by
49 .In bsd.snmpmod.mk
50 to actually build the shared library.
51 .Pp
52 The following
53 .Xr make 1
54 variables control the special functions:
55 .Bl -tag -width ".Va EXTRAMIBDEFS"
56 .It Va MOD
57 The short name of the module.
58 The name of the shared library will be
59 .Pa snmp_${MOD}.so .
60 There must exist a file
61 .Pa ${MOD}_tree.def
62 for compilation with
63 .Xr gensnmptree 1
64 which contains the definition of the MIB tree implemented by the module.
65 .It Va EXTRAMIBDEFS
66 A list of extra MIB definition files for
67 .Xr gensnmptree 1 .
68 This is optional.
69 .It Va XSYM
70 A list of symbols to be extracted from the MIB definition files by
71 .Xr gensnmptree 1 .
72 This is optional.
73 .It Va DEFS
74 A list of MIB definition files to be installed.
75 This is optional.
76 .It Va BMIBS
77 A list of textual MIBs to be installed.
78 This is optional.
79 .El
80 .Pp
81 Three files are automatically created from the MIB definition files and
82 the
83 .Va XSYM
84 variable:
85 .Bl -tag -width ".Va EXTRAMIBDEFS"
86 .It Pa ${MOD}_tree.c
87 This contains a table with the tree implemented by the module.
88 It is automatically included into the
89 .Va SRCS
90 variable.
91 .It Pa ${MOD}_tree.h
92 This contains preprocessor defines for all the OIDs defined by the module
93 and can be included in the module's source code.
94 .It Pa ${MOD}_oid.h
95 OID preprocessor definitions for all the symbols listed in
96 .Va XSYMS .
97 This is to be included into the module's source code.
98 .El
99 .Sh SEE ALSO
100 .Xr bsnmpd 1 ,
101 .Xr gensnmptree 1 ,
102 .Xr snmpmod 3