⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 make_object.csh

📁 unix/linux下的路由守护程序
💻 CSH
字号:
###	$Id: make_object.csh,v 1.3 1998/09/15 16:48:28 wfs Exp $##	Build a single object description##	This is used by make_table on an object by object basis.#	However, it can also be used to add a single object to the#	end of a table or group.  This is A Good Thing, because#	one doesn't have to stretch the brain to keep track of nroff#	text manipulation stuff.  In this case, you will have to edit#	the mib table file to add the object to the end of the#	SEQUENCE {}.  Sorry about that.#	input variables:##	$object		the full name of the object#	$type		the type (INTEGER, OCTET STRING, whatever)#	$entry		the name of the mibEntry or Group#	$identifier	the object name withn the mibEntry or Group#	$mib		the name of the MIB nroff file being added to#	$document	the specification being instrumentedif ("$#argv" == "6") then	set object = "$1"	set type = "$2"	set entry = "$3"	set identifier = "$4"	set mib = "$5"	set document = "$6"else	echo -n name the object\?	set object = "$<"	echo -n what is its ASN.1 type\?	set type = "$<"	echo -n what group or entry is this being added to\?	set entry = "$<"	echo -n what is its enumeration\?	set identifier = "$<"	echo -n what nroff input file\?	set mib = "$<"	echo -n what is the document being instruented\?	set document = "$<"endifecho '.(b' >> $mibecho $object OBJECT-TYPE >> $mibif ("$type" == "INTEGER") then    echo -n is $object 'enumerated?'    if ("$<" == "yes") then        echo '   ' SYNTAX ' ' $type '{' >> $mib        echo -n how many values are there\?	set enum = "$<"	echo enumeration names MUST have a lower case alphbetic first	echo character, and by convention capitalize the first letter of	echo each "'word'" in the name        foreach j (`count $enum`)	    echo enter 'name (value):'	    if ("$j" == "$enum") then                echo '               ' "$<" >> $mib	    else                echo '               ' "$<", >> $mib	    endif        end        echo '             }' >> $mib    else        echo -n does $object have a valid 'range?'        if ("$<" == "yes") then	echo -n enter it, in the form 'lowest..highest:'            echo '   ' SYNTAX ' ' $type '(' "$<" ')' >> $mib        else            echo '   ' SYNTAX ' ' $type >> $mib        endif    endifelse    echo '   ' SYNTAX ' ' $type >> $mibendifecho -n is $object read-only or read-write\?echo '   ' ACCESS ' ' "$<" >> $mibecho '   ' STATUS ' ' mandatory >> $mibecho '   ' DESCRIPTION >> $mibecho .fi >> $mibecho .in +.75i >> $mibecho please describe $object, in quotesecho CONTROL D terminates inputcat >> $mibecho .in -.75i >> $mibecho what section and paragragh of $document\?  '[just return if none]'set reference = "$<"if ("$reference" != "") then    echo .nf >> $mib    echo '   ' REFERENCE >> $mib    echo .fi >> $mib    echo .in +.75i >> $mib    echo \"$document $reference\" >> $mib    echo .in -.75i >> $mibendifecho -n what is the default value for $object\? '[just return if no default]'set defval = "$<"echo .nf >> $mibif ("$defval" != "") then    echo '   ' DEFVAL \{ $defval \} >> $mibendifecho '    ::= {' $entry $identifier '}' >> $mibecho '.)b' >> $mibecho '' >> $mib

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -