xref: /freebsd/contrib/bsnmp/gensnmpdef/gensnmpdef.1 (revision a5921bc3653e2e286715e6fe8d473ec0d02da38c)
1.\"
2.\" Copyright (C) 2004-2006
3.\"	Hartmut Brandt.
4.\"	All rights reserved.
5.\"
6.\" Author: Harti 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 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 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.\" $Begemot: gensnmpdef.1 383 2006-05-30 07:40:49Z brandt_h $
30.\"
31.Dd May 28, 2006
32.Dt GENSNMPDEF 1
33.Os
34.Sh NAME
35.Nm gensnmpdef
36.Nd "generate a MIB description file from MIBs"
37.Sh SYNOPSIS
38.Nm
39.Op Fl hEe
40.Op Fl c Ar cut
41.Ar name Op Ar ...
42.Sh DESCRIPTION
43The
44.Nm
45utility is used to create an initial MIB description file from
46one or more MIBs.
47The description file must be edited to be actually useful
48for feeding it into
49.Xr gensnmptree 1 .
50.Pp
51The following options are available:
52.Bl -tag -width indent
53.It Fl c Ar cut
54Specify the number of initial sub-oids that should be omitted
55from the tree in the output.
56.Xr gensnmptree 1
57automatically adds 1.3.6 in front of all OIDs so the default value
58of 3 is just correct in most cases.
59.It Fl E
60Generate typedefs for named enumerations.
61These are enumerations defined via the TEXTUAL-CONVENTION macro.
62The normal tree output is suppressed.
63.It Fl e
64Generate typedefs for unnamed enumerations.
65These are enumerations defined in the SYNTAX clause of an OBJECT-TYPE macro.
66The name of the enumeration is formed by appending the string
67.Ql Type
68to the name of the object.
69The normal tree output is suppressed.
70.It Fl h
71Print a short help text and exit.
72.El
73.Pp
74.Nm
75does no attempt on sorting the OID tree so in case of complex and
76non-standard MIBs it is necessary to sort the tree in the resulting definition
77file by hand.
78.Sh SEE ALSO
79.Xr snmpd 1
80.Sh AUTHORS
81.An Hartmut Brandt Aq harti@FreeBSD.org
82.Sh BUGS
83The utility is by no means bullet-proof and may fail for complex
84or non-standard MIBs.
85Its output is expected to be edited by hand.
86