MIB2C.CONF(5) Net-SNMP MIB2C.CONF(5) (NAME) mib2c.conf - mib2c.conf MIB. (SYNOPSIS) % cat > mib2c.test.conf << EOF @foreach $t table@ Starting table $t @foreach $c column@ echo $t has column $c which has a syntax of $c.syntax @end@ @end@ EOF % mib2c -c mib2c.test.conf internet (DESCRIPTION) mib2c.conf MIB MIB . mib2c ( ) ( C) . "local" Net-SNMP mib2c.*.conf . (COMMANDS) mib2c.conf @ . @ mib2c . : @open FILE@ FILE . '-' (stdout) . @append FILE@ FILE . @close FILE@ FILE . @push@ . @open@ @pop@ . @pop@ ()process . @push@ . @foreach $VAR scalar@ @end@ $VAR . @foreach $VAR table@ @end@ $VAR . @foreach $VAR column@ @end@ $VAR . foreach-table . @foreach $VAR nonindex@ @end@ $VAR - . foreach-table . @foreach $VAR internalindex@ @end@ $VAR . foreach-table . @foreach $VAR externalindex@ @end@ $VAR . foreach-table . @foreach $VAR index@ @end@ $VAR . foreach-table . @foreach $VAR notifications@ @end@ $VAR (notifications) . @foreach $VAR varbinds@ @end@ $VAR varbind . foreach-notifications . @foreach $LABEL, $VALUE enum@ @end@ $LABEL $VALUE enum . @foreach $RANGE_START, $RANGE_END range NODE@ @end@ $RANGE_START $RANGE_END MIB (NODE) . @foreach $var stuff a b c d@ a b c d ( mib ). @while expression@ (expression) (false) . @eval $VAR = expression@ expression $VAR . eval perl "-" (pseudo eval) . perl . @perleval STUFF@ STUFF perl . mib2c .conf {vars{NAME$ STUFF 0 ( 'return 0;' STUFF ). @startperl@ @endperl@ perl . @next@ foreach . foreach . @if expression@ expression (true) @end@ . @elsif expression@ ( ) . @else@ . @ifconf file@ conf @end@ . @if expression@ @elsif expression@ @else@ . @ifdir dir@ @end@ . @if expression@ @elsif expression@ @else@ . @define NAME@ @enddefine@ define enddefine @calldefine NAME@ NAME . @calldefine NAME@ NAME . @printf "expression" stuff1, stuff2, ...@ printf . @run FILE@ FILE mib2c (source) . @include FILE@ FILE mib2c . @prompt $var QUESTION@ QUESTION var$ . @print STUFF@ ( mib2c ). @quit@ (). @exit@ ! (VARIABLES) mib2c perl "$" . MIB @foreach ...@ . MIB . . 'x' 'ifType' . mib2c x$ "ifType" . MIB . x.objectID$ OID ifType : ".1.3.6.1.2.1.2.2.1.3". . : vartext$ {} mib2c . xtext$ "xtext$" {x}text$ "ifTypetext" . $var.uc var$ $var.objectID OID (fully- qualified) $var.commaoid OID $var.oidlength oid $var.subid oid $var.module MIB $var.parent var$ $var.isscalar var 1 $var.iscolumn var 1 $var.children var 1 $var.perltype (SYNTAX) perl ($SNMP::MIB{node}{'syntax'}) $var.type ASN_XXX ( Net-SNMP define#) $var.decl C ( char u_long ...) $var.readable 1 0 $var.settable 1 0 $var.creatable 1 0 $var.noaccess 1 0 $var.accessible 1 0 $var.storagetype 1 StorageType 0 $var.rowstatus 1 RowStatus 0 'settable' 'creatable' 'lastchange' 'storagetype' 'rowstatus' LastChange StorageType RowStatus . $var.hasdefval var DEFVAL 1 $var.defval DEFVAL $var.hashint var HINT 1 $var.hint HINT $var.ranges var 1 $var.enums var enums 1 $var.access $var.status (status) $var.syntax (syntax) $var.reference (reference) $var.description (description) (SEE ALSO) mib2c(1) VVERSIONINFO 28 Apr 2004 MIB2C.CONF(5)