]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - share/man/man7/bsd.snmpmod.mk.7
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / share / man / man7 / bsd.snmpmod.mk.7
1 .\"
2 .\" Copyright (c) 2005,2008
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 January 8, 2008
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 This file list is given to both calls to
70 .Xr gensnmptree 1 No \(em
71 the one that extracts the symbols in
72 .Va XSYM
73 from the MIB definitions and the one that
74 generates the table with OIDs served by this module.
75 .It Va EXTRAMIBSYMS
76 A list of extra MIB definition files for
77 .Xr gensnmptree 1 .
78 This is optional.
79 This file list is given only to the call to
80 .Xr gensnmptree 1
81 that extracts symbols from MIB definition files.
82 It is useful if there are dependencies on other MIBs or for extracting global
83 definitions for enumeration constants.
84 .It Va XSYM
85 A list of symbols to be extracted from the MIB definition files by
86 .Xr gensnmptree 1 .
87 This is optional.
88 .It Va DEFS
89 A list of MIB definition files to be installed.
90 This is optional.
91 .It Va BMIBS
92 A list of textual MIBs to be installed.
93 This is optional.
94 .El
95 .Pp
96 Three files are automatically created from the MIB definition files and
97 the
98 .Va XSYM
99 variable:
100 .Bl -tag -width ".Va EXTRAMIBDEFS"
101 .It Pa ${MOD}_tree.c
102 This contains a table with the tree implemented by the module.
103 It is automatically included into the
104 .Va SRCS
105 variable.
106 .It Pa ${MOD}_tree.h
107 This contains preprocessor defines for all the OIDs defined by the module
108 and can be included in the module's source code.
109 .It Pa ${MOD}_oid.h
110 OID preprocessor definitions for all the symbols listed in
111 .Va XSYMS .
112 This is to be included into the module's source code.
113 .El
114 .Sh SEE ALSO
115 .Xr bsnmpd 1 ,
116 .Xr gensnmptree 1 ,
117 .Xr snmpmod 3