159ee90cbSHartmut Brandt.\" 202c3c752SHartmut Brandt.\" Copyright (c) 2005,2008 359ee90cbSHartmut Brandt.\" Hartmut Brandt. 459ee90cbSHartmut Brandt.\" All rights reserved. 559ee90cbSHartmut Brandt.\" 659ee90cbSHartmut Brandt.\" Author: Hartmut Brandt <harti@FreeBSD.org> 759ee90cbSHartmut Brandt.\" 859ee90cbSHartmut Brandt.\" Redistribution and use in source and binary forms, with or without 959ee90cbSHartmut Brandt.\" modification, are permitted provided that the following conditions 1059ee90cbSHartmut Brandt.\" are met: 1159ee90cbSHartmut Brandt.\" 1. Redistributions of source code must retain the above copyright 1259ee90cbSHartmut Brandt.\" notice, this list of conditions and the following disclaimer. 1359ee90cbSHartmut Brandt.\" 2. Redistributions in binary form must reproduce the above copyright 1459ee90cbSHartmut Brandt.\" notice, this list of conditions and the following disclaimer in the 1559ee90cbSHartmut Brandt.\" documentation and/or other materials provided with the distribution. 1659ee90cbSHartmut Brandt.\" 1759ee90cbSHartmut Brandt.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 1859ee90cbSHartmut Brandt.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1959ee90cbSHartmut Brandt.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2059ee90cbSHartmut Brandt.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 2159ee90cbSHartmut Brandt.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2259ee90cbSHartmut Brandt.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2359ee90cbSHartmut Brandt.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2459ee90cbSHartmut Brandt.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2559ee90cbSHartmut Brandt.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2659ee90cbSHartmut Brandt.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2759ee90cbSHartmut Brandt.\" SUCH DAMAGE. 2859ee90cbSHartmut Brandt.\" 2902c3c752SHartmut Brandt.Dd January 8, 2008 30da41a1d4SHartmut Brandt.Dt BSD.SNMPMOD.MK 7 3159ee90cbSHartmut Brandt.Os 3259ee90cbSHartmut Brandt.Sh NAME 3359ee90cbSHartmut Brandt.Nm bsd.snmpmod.mk 34f32ac395SRuslan Ermilov.Nd building modules for 35f32ac395SRuslan Ermilov.Xr bsnmpd 1 3659ee90cbSHartmut Brandt.Sh SYNOPSIS 37f32ac395SRuslan Ermilov.Fd ".include <bsd.snmpmod.mk>" 3859ee90cbSHartmut Brandt.Sh DESCRIPTION 3959ee90cbSHartmut BrandtThe file 4059ee90cbSHartmut Brandt.In bsd.snmpmod.mk 41f32ac395SRuslan Ermilovsimplifies the building of modules for the Begemot SNMP daemon, 4259ee90cbSHartmut Brandt.Xr bsnmpd 1 . 4359ee90cbSHartmut BrandtIt provides some common functions for building a module and 4459ee90cbSHartmut Brandtrelies on 4559ee90cbSHartmut Brandt.In bsd.lib.mk , 4659ee90cbSHartmut Brandtwhich is included by 4759ee90cbSHartmut Brandt.In bsd.snmpmod.mk 4859ee90cbSHartmut Brandtto actually build the shared library. 4959ee90cbSHartmut Brandt.Pp 5059ee90cbSHartmut BrandtThe following 5159ee90cbSHartmut Brandt.Xr make 1 5259ee90cbSHartmut Brandtvariables control the special functions: 53da41a1d4SHartmut Brandt.Bl -tag -width ".Va EXTRAMIBDEFS" 5459ee90cbSHartmut Brandt.It Va MOD 5559ee90cbSHartmut BrandtThe short name of the module. 5659ee90cbSHartmut BrandtThe name of the shared library will be 5759ee90cbSHartmut Brandt.Pa snmp_${MOD}.so . 5859ee90cbSHartmut BrandtThere must exist a file 5959ee90cbSHartmut Brandt.Pa ${MOD}_tree.def 6059ee90cbSHartmut Brandtfor compilation with 6159ee90cbSHartmut Brandt.Xr gensnmptree 1 6259ee90cbSHartmut Brandtwhich contains the definition of the MIB tree implemented by the module. 6359ee90cbSHartmut Brandt.It Va EXTRAMIBDEFS 6459ee90cbSHartmut BrandtA list of extra MIB definition files for 6559ee90cbSHartmut Brandt.Xr gensnmptree 1 . 6659ee90cbSHartmut BrandtThis is optional. 6702c3c752SHartmut BrandtThis file list is given to both calls to 68*c2025a76SJoel Dahl.Xr gensnmptree 1 No \(em 6902c3c752SHartmut Brandtthe one that extracts the symbols in 7002c3c752SHartmut Brandt.Va XSYM 7102c3c752SHartmut Brandtfrom the MIB definitions and the one that 7202c3c752SHartmut Brandtgenerates the table with OIDs served by this module. 7302c3c752SHartmut Brandt.It Va EXTRAMIBSYMS 7402c3c752SHartmut BrandtA list of extra MIB definition files for 7502c3c752SHartmut Brandt.Xr gensnmptree 1 . 7602c3c752SHartmut BrandtThis is optional. 7702c3c752SHartmut BrandtThis file list is given only to the call to 7802c3c752SHartmut Brandt.Xr gensnmptree 1 7902c3c752SHartmut Brandtthat extracts symbols from MIB definition files. 8002c3c752SHartmut BrandtIt is useful if there are dependencies on other MIBs or for extracting global 8102c3c752SHartmut Brandtdefinitions for enumeration constants. 8259ee90cbSHartmut Brandt.It Va XSYM 8359ee90cbSHartmut BrandtA list of symbols to be extracted from the MIB definition files by 8459ee90cbSHartmut Brandt.Xr gensnmptree 1 . 8559ee90cbSHartmut BrandtThis is optional. 8659ee90cbSHartmut Brandt.It Va DEFS 87da41a1d4SHartmut BrandtA list of MIB definition files to be installed. 88da41a1d4SHartmut BrandtThis is optional. 8959ee90cbSHartmut Brandt.It Va BMIBS 90da41a1d4SHartmut BrandtA list of textual MIBs to be installed. 91da41a1d4SHartmut BrandtThis is optional. 9259ee90cbSHartmut Brandt.El 9359ee90cbSHartmut Brandt.Pp 94c6adb7baSHartmut BrandtThree files are automatically created from the MIB definition files and 9559ee90cbSHartmut Brandtthe 9659ee90cbSHartmut Brandt.Va XSYM 9759ee90cbSHartmut Brandtvariable: 98da41a1d4SHartmut Brandt.Bl -tag -width ".Va EXTRAMIBDEFS" 9959ee90cbSHartmut Brandt.It Pa ${MOD}_tree.c 10059ee90cbSHartmut BrandtThis contains a table with the tree implemented by the module. 10159ee90cbSHartmut BrandtIt is automatically included into the 10259ee90cbSHartmut Brandt.Va SRCS 10359ee90cbSHartmut Brandtvariable. 10459ee90cbSHartmut Brandt.It Pa ${MOD}_tree.h 10559ee90cbSHartmut BrandtThis contains preprocessor defines for all the OIDs defined by the module 10659ee90cbSHartmut Brandtand can be included in the module's source code. 10759ee90cbSHartmut Brandt.It Pa ${MOD}_oid.h 10859ee90cbSHartmut BrandtOID preprocessor definitions for all the symbols listed in 10959ee90cbSHartmut Brandt.Va XSYMS . 11059ee90cbSHartmut BrandtThis is to be included into the module's source code. 11159ee90cbSHartmut Brandt.El 11259ee90cbSHartmut Brandt.Sh SEE ALSO 11359ee90cbSHartmut Brandt.Xr bsnmpd 1 , 11459ee90cbSHartmut Brandt.Xr gensnmptree 1 , 11559ee90cbSHartmut Brandt.Xr snmpmod 3 116