From 9b4fc3d8f13de6a6c075d5b243b2e8370bd35367 Mon Sep 17 00:00:00 2001 From: harti Date: Mon, 27 Feb 2006 16:16:18 +0000 Subject: Virgin import of bsnmpd 1.12 --- contrib/bsnmp/gensnmptree/gensnmptree.1 | 33 +++++++++++++++++++-------------- contrib/bsnmp/gensnmptree/gensnmptree.c | 2 +- 2 files changed, 20 insertions(+), 15 deletions(-) (limited to 'contrib/bsnmp/gensnmptree') diff --git a/contrib/bsnmp/gensnmptree/gensnmptree.1 b/contrib/bsnmp/gensnmptree/gensnmptree.1 index 3ebefe6..593c67a 100644 --- a/contrib/bsnmp/gensnmptree/gensnmptree.1 +++ b/contrib/bsnmp/gensnmptree/gensnmptree.1 @@ -26,9 +26,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $Begemot: bsnmp/gensnmptree/gensnmptree.1,v 1.5 2005/06/15 11:31:25 brandt_h Exp $ +.\" $Begemot: bsnmp/gensnmptree/gensnmptree.1,v 1.7 2006/02/27 09:52:08 brandt_h Exp $ .\" -.Dd June 14, 2005 +.Dd February 27, 2006 .Dt GENSNMPTREE 1 .Os .Sh NAME @@ -45,7 +45,7 @@ The utility is used to either generate C language tables and header files from a MIB description or to numeric OIDs from MIB descriptions. The first form is used only for maintaining the -.Xr snmpd 1 +.Xr bsnmpd 1 daemon or for module writers. The second form may be used by SNMP client program writers. .Pp @@ -57,7 +57,7 @@ reads a MIB description from its standard input and creates two files: a C-file .Ar prefix Ns tree.c containing a table used by -.Xr snmpd 1 +.Xr bsnmpd 1 during PDU processing and a header file .Ar prefix Ns tree.h @@ -70,14 +70,19 @@ option is specified .Nm expects MIB variable names (only the last component) on its command line. It reads a MIB specification from standard input and for each MIB variable -name emits two C preprocessor defines on its standard output. -One define -.Va OID_ Ns Ar name -can be used as an array initialized to initialize a -.Va struct asn_oid . -The other define -.Va OIDLEN_ Ns Ar name -contains the length of the OID. +name emits three C preprocessor defines on its standard output: +.Bl -tag -width ".Va OIDLEN_ Ns Ar Name" +.It Va OIDX_ Ns Ar name +This define can be used to initialize a +.Va struct asn_oid +in the following way: +.Pp +.Dl const struct asn_oid oid_sysDescr = OIDX_sysDescr; +.It Va OIDLEN_ Ns Ar name +is the length of the OID. +.It Va OID_ Ns Ar name +is the last component of the OID. +.El .Pp The options are as follows: .Bl -tag -width ".Fl d Ar argument" @@ -88,7 +93,7 @@ Enter extract mode. .It Fl l Generate local preprocessor includes. This is used for bootstrapping -.Xr snmpd 1 . +.Xr bsnmpd 1 . .It Fl t Instead of normal output print the resulting tree. .It Fl p Ar prefix @@ -187,6 +192,6 @@ The following MIB description describes the system group: ) .Ed .Sh SEE ALSO -.Xr snmpd 1 +.Xr bsnmpd 1 .Sh AUTHORS .An Hartmut Brandt Aq harti@freebsd.org diff --git a/contrib/bsnmp/gensnmptree/gensnmptree.c b/contrib/bsnmp/gensnmptree/gensnmptree.c index c23c8a1..990844a 100644 --- a/contrib/bsnmp/gensnmptree/gensnmptree.c +++ b/contrib/bsnmp/gensnmptree/gensnmptree.c @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Begemot: bsnmp/gensnmptree/gensnmptree.c,v 1.43 2005/10/04 11:21:29 brandt_h Exp $ + * $Begemot: bsnmp/gensnmptree/gensnmptree.c,v 1.44 2006/02/14 09:04:17 brandt_h Exp $ * * Generate OID table from table description. * -- cgit v1.1