*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->FreeBSD man pages -> gensnmptree (1)              



NAME    [Toc]    [Back]

     gensnmptree -- generate C and header files from a MIB description file

SYNOPSIS    [Toc]    [Back]

     gensnmptree [-hel] [-p prefix] [name ...]

DESCRIPTION    [Toc]    [Back]

     The gensnmptree 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 snmpd(1) daemon or
     for module writers.  The second form may be used by SNMP client program

     If the -e option is not used gensnmptree reads a MIB description from its
     standard input and creates two files: a C-file prefixtree.c containing a
     table used by snmpd(1) during PDU processing and a header file
     prefixtree.h containing appropriate declarations of the callback functions
 used in this table and the table itself.

     If the -e option is specified gensnmptree 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 OID_name can be used
     as an array initialized to initialize a struct asn_oid.  The other define
     OIDLEN_name contains the length of the OID.

     The options are as follows:

     -h 	  Print a short help page.

     -e 	  Enter extract mode.

     -l 	  Generate local preprocessor includes. This is used for bootstrapping

     -p prefix	  Prefix the file names and the table name with prefix.

MIBS    [Toc]    [Back]

     The syntax of the MIB description file can formally be specified as follows:

	   tree := head elements ')'

	   entry := head ':' index STRING elements ')'

	   leaf := head TYPE STRING ACCESS ')'

	   column := head TYPE ACCESS ')'

	   head := '(' INT STRING

	   elements := EMPTY | elements element

	   element := tree | leaf

	   index := TYPE | index TYPE

     TYPE specifies a SNMP data type and may be one of
	   +o   NULL
	   +o   INTEGER
	   +o   INTEGER32 (same as INTEGER)
	   +o   UNSIGNED32 (same as GAUGE)
	   +o   IPADDRESS
	   +o   OID
	   +o   TIMETICKS
	   +o   COUNTER
	   +o   GAUGE
	   +o   COUNTER64

     ACCESS specifies the accessibility of the MIB variable (which operation
     can be performed) and is one of
	   +o   GET
	   +o   SET

     INT is a decimal integer and STRING is any string starting with a letter
     or underscore and consisting of letters, digits and underscores, that is
     not one of the keywords.

EXAMPLES    [Toc]    [Back]

     The following MIB description describes the system group:

	   (1 internet
	     (2 mgmt
	       (1 mibII
		 (1 system
		   (1 sysDescr OCTETSTRING op_system_group GET)
		   (2 sysObjectId OID op_system_group GET)
		   (3 sysUpTime TIMETICKS op_system_group GET)
		   (4 sysContact OCTETSTRING op_system_group GET SET)
		   (5 sysName OCTETSTRING op_system_group GET SET)
		   (6 sysLocation OCTETSTRING op_system_group GET SET)
		   (7 sysServices INTEGER op_system_group GET)
		   (8 sysORLastChange TIMETICKS op_system_group GET)
		   (9 sysORTable
		     (1 sysOREntry : INTEGER op_or_table
		       (1 sysORIndex INTEGER)
		       (2 sysORID OID GET)
		       (3 sysORDescr OCTETSTRING GET)
		       (4 sysORUpTime TIMETICKS GET)

SEE ALSO    [Toc]    [Back]


AUTHORS    [Toc]    [Back]

     Hartmut Brandt <harti@freebsd.org>

FreeBSD 5.2.1			October 7, 2003 		 FreeBSD 5.2.1
[ Back ]
 Similar pages
Name OS Title
h2ph IRIX convert .h C header files to .ph Perl header files
h2ph Linux convert .h C header files to .ph Perl header files
h2ph OpenBSD convert .h C header files to .ph Perl header files
protect_headers_setup Tru64 Sets up header files for the
h2xs OpenBSD convert .h C header files to Perl extensions
limits Tru64 Header files for implementation-specific constants
h2xs Linux convert .h C header files to Perl extensions
h2xs IRIX convert .h C header files to Perl extensions
sat_write_filehdr IRIX write audit file header, write close time to audit file header
istat IRIX print the header information of a list of image files.
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service