#!/bin/sh # This is `snmp2.20' (part 20 of snmp2). # Do not concatenate these parts, unpack them in order with `/bin/sh'. # File `snmp2/mib.txt' is being continued... # touch -am 1231235999 $$.touch >/dev/null 2>&1 if test ! -f 1231235999 && test -f $$.touch; then shar_touch=touch else shar_touch=: echo echo 'WARNING: not restoring timestamps. Consider getting and' echo "installing GNU \`touch', distributed in GNU File Utilities..." echo fi rm -f 1231235999 $$.touch # if test ! -r _sharseq.tmp; then echo 'Please unpack part 1 first!' exit 1 fi shar_sequence=`cat _sharseq.tmp` if test "$shar_sequence" != 20; then echo "Please unpack part $shar_sequence next!" exit 1 fi if test ! -f _sharnew.tmp; then echo 'x - still skipping snmp2/mib.txt' else echo 'x - continuing file snmp2/mib.txt' sed 's/^X//' << 'SHAR_EOF' >> 'snmp2/mib.txt' && X this this value, it specifies the number of seconds until the reboot X will occur, or zero (0) if the reboot sequence has not been X activated. The reboot sequence can be aborted by setting the X abortReboot value to non-zero." X ::= { system 2 } X X abortReboot OBJECT-TYPE X SYNTAX Integer X ACCESS read-write X STATUS mandatory X DESCRIPTION X "Setting this value to be non-zero cause the reboot or rebootVME X sequence to be aborted." X ::= { system 3 } X X silent OBJECT-TYPE X SYNTAX INTEGER X ACCESS read-write X STATUS mandatory X DESCRIPTION X "When set to non-zero, no messages pertaining to the reboot X are displayed on the console port. Otherwise warning messages X are displayed when the reboot sequence is initiated, when it X is aborted, and once a second for each of the last 5 seconds X before the reboot." X ::= { system 4 } X X X spuriousInts OBJECT-TYPE X SYNTAX INTEGER X ACCESS read-write X STATUS mandatory X DESCRIPTION X "Contains a count the number of spurious interrupts that have X occurred either since the snmpd task was started, or since the X value was last cleared." X ::= {system 5} X -- -- define the RTOS groups here -- X -- -- pSOS+ -- -- This section defines OIDs for the pSOS+ real time executive, and its -- components -- -- X nodeAnchor OBJECT-TYPE X SYNTAX INTEGER X ACCESS read-only X STATUS mandatory X DESCRIPTION X "Contains the value of the system NODE ANCHOR." X ::= { psos 1 } X -- -- Node Configuration Table -- X nodeConfig OBJECT IDENTIFIER ::= { psos 2 } X X cpuType OBJECT-TYPE X SYNTAX INTEGER X ACCESS read-only X STATUS mandatory X DESCRIPTION X "A bit mask which defines the CPU type." X ::= { nodeConfig 1 } X -- -- Multiprocessor Config Table -- X mpCT OBJECT IDENTIFIER ::= { nodeConfig 2 } X -- -- pSOS Config Table -- X psosCT OBJECT IDENTIFIER ::= { nodeConfig 3 } X X psosCode OBJECT-TYPE X SYNTAX INTEGER X ACCESS read-only X STATUS mandatory X DESCRIPTION X "start address of pSOS+." X ::= { psosCT 1 } X X rgnZeroAddr OBJECT-TYPE X SYNTAX INTEGER X ACCESS read-only X STATUS mandatory X DESCRIPTION X "region 0 start address." X ::= { psosCT 2 } X X rgnZeroLen OBJECT-TYPE X SYNTAX INTEGER X ACCESS read-only X STATUS mandatory X DESCRIPTION X "region 0 length." X ::= { psosCT 3 } X X rgnZeroUnit OBJECT-TYPE X SYNTAX INTEGER X ACCESS read-only X STATUS mandatory X DESCRIPTION X "region 0 unit size." X ::= { psosCT 4 } X -- -- pROBE Config Table -- X probeCT OBJECT IDENTIFIER ::= { nodeConfig 4 } X -- -- pHILE Config Table -- X phileCT OBJECT IDENTIFIER ::= { nodeConfig 6 } X -- -- pREPC Config Table -- X prepcCT OBJECT IDENTIFIER ::= { nodeConfig 7 } X -- -- pNA Config Table -- X pnaCT OBJECT IDENTIFIER ::= { nodeConfig 5 } X X -- -- vxWorks -- -- This section defines OIDs specific to the vxWorks real time -- operating system and its environment -- X -- -- Memory Stuff -- vxMemory OBJECT IDENTIFIER ::= { vxworks 1 } X -- -- Current Memory -- currentMemory OBJECT IDENTIFIER ::= { vxMemory 2 } X X bytes OBJECT-TYPE X SYNTAX INTEGER X ACCESS read-only X STATUS mandatory X DESCRIPTION X "The current number of bytes allocated" X ::= { currentMemory 1 } X X blocks OBJECT-TYPE X SYNTAX INTEGER X ACCESS read-only X STATUS mandatory X DESCRIPTION X "The current number of blocks allocated" X ::= { currentMemory 2 } X X avgerage OBJECT-TYPE X SYNTAX INTEGER X ACCESS read-only X STATUS mandatory X DESCRIPTION X "The average size of the blocks allocated" X ::= { currentMemory 3 } X X maximum OBJECT-TYPE X SYNTAX INTEGER X ACCESS read-only X STATUS mandatory X DESCRIPTION X "The maximum size block allocated." X ::= { currentMemory 4 } X -- -- Free Memory Stats -- freeMemory OBJECT IDENTIFIER ::= { vxMemory 3 } X bytes OBJECT-TYPE X SYNTAX INTEGER X ACCESS read-only X STATUS mandatory X DESCRIPTION X "The current number of bytes free" X ::= { freeMemory 1 } X X blocks OBJECT-TYPE X SYNTAX INTEGER X ACCESS read-only X STATUS mandatory X DESCRIPTION X "The current number of blocks free" X ::= { freeMemory 2 } X X average OBJECT-TYPE X SYNTAX INTEGER X ACCESS read-only X STATUS mandatory X DESCRIPTION X "The average size of the blocks free." X ::= { freeMemory 3 } X -- -- Cumulative Memory Stats -- cumulativeMemory OBJECT IDENTIFIER ::= { vxMemory 4 } X X bytes OBJECT-TYPE X SYNTAX INTEGER X ACCESS read-only X STATUS mandatory X DESCRIPTION X "The cumulative number of bytes allocated" X ::= { cumulativeMemory 1 } X X blocks OBJECT-TYPE X SYNTAX INTEGER X ACCESS read-only X STATUS mandatory X DESCRIPTION X "The cumulative number of blocks allocated" X ::= { cumulativeMemory 2 } X X average OBJECT-TYPE X SYNTAX INTEGER X ACCESS read-only X STATUS mandatory X DESCRIPTION X "The cumulative average size of the blocks allocated" X ::= { cumulativeMemory 3 } X -- -- Network Stuff -- vxNetwork OBJECT IDENTIFIER ::= { vxworks 2 } X vxTcp OBJECT IDENTIFIER ::= { vxNetwork 1 } X -- -- Task Stuff -- vxTask OBJECT IDENTIFIER ::= { vxworks 3 } X vxNumTasks OBJECT-TYPE X SYNTAX INTEGER X ACCESS read-write X STATUS mandatory X DESCRIPTION X "" X ::= { vxTask 1 } X -- -- an entry for each task -- vxTaskTable OBJECT-TYPE X SYNTAX SEQUENCE OF VXTaskEntry X ACCESS not-accessible X STATUS deprecated X DESCRIPTION X "The vxTaskTable contains an entry for each task in the X system." X ::= { vxTask 2 } X X vxTaskEntry OBJECT-TYPE X SYNTAX VXTaskEntry X ACCESS not-accessible X STATUS deprecated X DESCRIPTION X "Each entry contians one task" X INDEX { taskID } X ::= { vxTaskTable 1 } X X VXTaskEntry ::= X SEQUENCE { X name X OCTET STRING, X entryPoint X OCTET STRING, X taskID X INTEGER, X priority X INTEGER, X status X INTEGER, X programCounter X INTEGER, X stackPointer X INTEGER, X errno X INTEGER, X delay X INTEGER X } X X name OBJECT-TYPE X SYNTAX OCTET STRING X ACCESS read-only X STATUS deprecated X DESCRIPTION X "" X ::= { vxTaskEntry 1 } X X entryPoint OBJECT-TYPE X SYNTAX OCTET STRING X ACCESS read-only X STATUS deprecated X DESCRIPTION X "" X ::= { vxTaskEntry 2 } X X taskID OBJECT-TYPE X SYNTAX INTEGER X ACCESS read-only X STATUS deprecated X DESCRIPTION X "" X ::= { vxTaskEntry 3 } X X priority OBJECT-TYPE X SYNTAX INTEGER X ACCESS read-write X STATUS deprecated X DESCRIPTION X "" X ::= { vxTaskEntry 4 } X X status OBJECT-TYPE X SYNTAX INTEGER X ACCESS read-write X STATUS deprecated X DESCRIPTION X "" X ::= { vxTaskEntry 5 } X X programCounter OBJECT-TYPE X SYNTAX INTEGER X ACCESS read-only X STATUS deprecated X DESCRIPTION X "" X ::= { vxTaskEntry 6 } X X stackPointer OBJECT-TYPE X SYNTAX INTEGER X ACCESS read-only X STATUS deprecated X DESCRIPTION X "" X ::= { vxTaskEntry 7 } X X errno OBJECT-TYPE X SYNTAX INTEGER X ACCESS read-only X STATUS deprecated X DESCRIPTION X "" X ::= { vxTaskEntry 8 } X X delay OBJECT-TYPE X SYNTAX INTEGER X ACCESS read-only X STATUS deprecated X DESCRIPTION X "" X ::= { vxTaskEntry 9 } X X X -- -- Boot Param Stuff -- vxBootParams OBJECT IDENTIFIER ::= { vxworks 4 } X X bootDev OBJECT-TYPE X SYNTAX OCTET STRING X ACCESS read-write X STATUS mandatory X DESCRIPTION X "boot device code" X ::= { vxBootParams 1 } X X hostName OBJECT-TYPE X SYNTAX OCTET STRING X ACCESS read-write X STATUS mandatory X DESCRIPTION X "name of host" X ::= { vxBootParams 2 } X X X targetName OBJECT-TYPE X SYNTAX OCTET STRING X ACCESS read-write X STATUS mandatory X DESCRIPTION X "name of target" X ::= { vxBootParams 3 } X X ethernetAddr OBJECT-TYPE X SYNTAX OCTET STRING X ACCESS read-write X STATUS mandatory X DESCRIPTION X "ethernet internet addr" X ::= { vxBootParams 4 } X X backplaneAddr OBJECT-TYPE X SYNTAX OCTET STRING X ACCESS read-write X STATUS mandatory X DESCRIPTION X "backplane internet addr" X ::= { vxBootParams 5 } X X hostAddr OBJECT-TYPE X SYNTAX OCTET STRING X ACCESS read-write X STATUS mandatory X DESCRIPTION X "host internet addr" X ::= { vxBootParams 6 } X X gatewayAddr OBJECT-TYPE X SYNTAX OCTET STRING X ACCESS read-write X STATUS mandatory X DESCRIPTION X "gateway internet addr" X ::= { vxBootParams 7 } X X bootFile OBJECT-TYPE X SYNTAX OCTET STRING X ACCESS read-write X STATUS mandatory X DESCRIPTION X "name of boot file" X ::= { vxBootParams 8 } X X startupScript OBJECT-TYPE X SYNTAX OCTET STRING X ACCESS read-write X STATUS mandatory X DESCRIPTION X "name of startup script file" X ::= { vxBootParams 9 } X X userName OBJECT-TYPE X SYNTAX OCTET STRING X ACCESS read-write X STATUS mandatory X DESCRIPTION X "user name" X ::= { vxBootParams 10 } X X password OBJECT-TYPE X SYNTAX OCTET STRING X ACCESS read-write X STATUS mandatory X DESCRIPTION X "password" X ::= { vxBootParams 11 } X X other OBJECT-TYPE X SYNTAX OCTET STRING X ACCESS read-write X STATUS mandatory X DESCRIPTION X "available for applications" X ::= { vxBootParams 12 } X X processorNumber OBJECT-TYPE X SYNTAX Integer X ACCESS read-write X STATUS mandatory X DESCRIPTION X "processor number" X ::= { vxBootParams 13 } X X flags OBJECT-TYPE X SYNTAX Integer X ACCESS read-write X STATUS mandatory X DESCRIPTION X "configuration flags" X ::= { vxBootParams 14 } X X -- -- vxKernel -- -- Information about the kernel configuration -- -- vxKernel OBJECT IDENTIFIER ::= { vxworks 5 } X -- -- vxClock -- -- Information about the clock configuration -- vxClock OBJECT IDENTIFIER ::= { vxKernel 1 } X X sysClkRate OBJECT-TYPE X SYNTAX INTEGER X ACCESS read-write X STATUS mandatory X DESCRIPTION X "The rate in ticks per second of the vxWorks clock." X ::= { vxClock 1 } X X ticks OBJECT-TYPE X SYNTAX INTEGER X ACCESS read-write X STATUS mandatory X DESCRIPTION X "The number of elapsed clock ticks." X ::= { vxClock 2 } X -- -- lynx OS -- -- This section defines OIDs specific to the Lynx OS real time -- operating system, and its environment -- X END SHAR_EOF echo 'File snmp2/mib.txt is complete' && $shar_touch -am 1015123693 'snmp2/mib.txt' && chmod 0755 'snmp2/mib.txt' || echo 'restore of snmp2/mib.txt failed' shar_count="`wc -c < 'snmp2/mib.txt'`" test 440011 -eq "$shar_count" || echo "snmp2/mib.txt: original size 440011, current size $shar_count" rm -f _sharnew.tmp fi # ============= snmp2/tcl/init.tcl ============== if test ! -d 'snmp2/tcl'; then echo 'x - creating directory snmp2/tcl' mkdir 'snmp2/tcl' fi if test -f 'snmp2/tcl/init.tcl' && test X"$1" != X"-c"; then echo 'x - skipping snmp2/tcl/init.tcl (file already exists)' rm -f _sharnew.tmp else > _sharnew.tmp echo 'x - extracting snmp2/tcl/init.tcl (text)' sed 's/^X//' << 'SHAR_EOF' > 'snmp2/tcl/init.tcl' && # init.tcl -- # # Default system startup file for Tcl-based applications. Defines # "unknown" procedure and auto-load facilities. # # $Header: /user6/ouster/tcl/scripts/RCS/init.tcl,v 1.7 92/07/25 16:29:36 ouster Exp $ SPRITE (Berkeley) # # Copyright 1991-1992 Regents of the University of California # Permission to use, copy, modify, and distribute this # software and its documentation for any purpose and without # fee is hereby granted, provided that this copyright # notice appears in all copies. The University of California # makes no representations about the suitability of this # software for any purpose. It is provided "as is" without # express or implied warranty. # X # unknown: # Invoked when a Tcl command is invoked that doesn't exist in the # interpreter: # # 1. See if the autoload facility can locate the command in a # Tcl script file. If so, load it and execute it. # 2. See if the command exists as an executable UNIX program. # If so, "exec" the command. # 3. See if the command is a valid abbreviation for another command. # if so, invoke the command. However, only permit abbreviations # at top-level. X proc unknown args { X global auto_noexec auto_noload env unknown_active X X if [info exists unknown_active] { X unset unknown_active X error "unexpected recursion in \"unknown\" command" X } X set unknown_active 1 X set name [lindex $args 0] X if ![info exists auto_noload] { X if [auto_load $name] { X unset unknown_active X return [uplevel $args] X } X } X if ![info exists auto_noexec] { X if [auto_execok $name] { X unset unknown_active X return [uplevel exec $args] X } X } X if {([info level] == 1) && ([info script] == "")} { X set cmds [info commands $name*] X if {[llength $cmds] == 1} { X unset unknown_active X return [uplevel [lreplace $args 0 0 $cmds]] X } X if {[llength $cmds] != 0} { X unset unknown_active X if {$name == ""} { X error "empty command name \"\"" X } else { X error "ambiguous command name \"$name\": [lsort $cmds]" X } X } X } X unset unknown_active X error "invalid command name \"$name\"" } X # auto_load: # Checks a collection of library directories to see if a procedure # is defined in one of them. If so, it sources the appropriate # library file to create the procedure. Returns 1 if it successfully # loaded the procedure, 0 otherwise. X proc auto_load cmd { X global auto_index auto_oldpath auto_path env X X if [info exists auto_index($cmd)] { X uplevel #0 source $auto_index($cmd) X return 1 X } X if [catch {set path $auto_path}] { X if [catch {set path $env(TCLLIBPATH)}] { X if [catch {set path [info library]}] { X return 0 X } X } X } X if [info exists auto_oldpath] { X if {$auto_oldpath == $path} { X return 0 X } X } X set auto_oldpath $path X catch {unset auto_index} X foreach dir $path { X set f "" X catch { X set f [open $dir/tclIndex] X if {[gets $f] != "# Tcl autoload index file: each line identifies a Tcl"} { X puts stdout "Bad id line in file $dir/tclIndex" X error done X } X while {[gets $f line] >= 0} { X if {([string index $line 0] == "#") || ([llength $line] != 2)} { X continue X } X set name [lindex $line 0] X if {![info exists auto_index($name)]} { X set auto_index($name) $dir/[lindex $line 1] X } X } X } X if {$f != ""} { X close $f X } X } X if [info exists auto_index($cmd)] { X uplevel #0 source $auto_index($cmd) X return 1 X } X return 0 } X # auto_execok: # Returns 1 if there's an executable in the current path for the # given name, 0 otherwise. Builds an associative array auto_execs # that caches information about previous checks, for speed. X proc auto_execok name { X global auto_execs env X X if [info exists auto_execs($name)] { X return $auto_execs($name) X } X set auto_execs($name) 0 X foreach dir [split $env(PATH) :] { X if {[file executable $dir/$name] && ![file isdirectory $dir/$name]} { X set auto_execs($name) 1 X return 1 X } X } X return 0 } X # auto_reset: # Destroy all cached information for auto-loading and auto-execution, # so that the information gets recomputed the next time it's needed. X proc auto_reset {} { X global auto_execs auto_index X unset auto_execs auto_index } SHAR_EOF $shar_touch -am 1015123693 'snmp2/tcl/init.tcl' && chmod 0444 'snmp2/tcl/init.tcl' || echo 'restore of snmp2/tcl/init.tcl failed' shar_count="`wc -c < 'snmp2/tcl/init.tcl'`" test 4241 -eq "$shar_count" || echo "snmp2/tcl/init.tcl: original size 4241, current size $shar_count" rm -f _sharnew.tmp fi # ============= snmp2/tcl/mkindex.tcl ============== if test -f 'snmp2/tcl/mkindex.tcl' && test X"$1" != X"-c"; then echo 'x - skipping snmp2/tcl/mkindex.tcl (file already exists)' rm -f _sharnew.tmp else > _sharnew.tmp echo 'x - extracting snmp2/tcl/mkindex.tcl (text)' sed 's/^X//' << 'SHAR_EOF' > 'snmp2/tcl/mkindex.tcl' && # auto_mkindex: # Given a directory and a glob-style specification for files in that # directory, generate a "tclIndex" file in the directory that is suitable # for use in auto-loading. Returns a null string. # # $Header: /user6/ouster/tcl/scripts/RCS/mkindex.tcl,v 1.2 91/12/16 08:29:25 ouster Exp $ SPRITE (Berkeley) # # Copyright 1991 Regents of the University of California # Permission to use, copy, modify, and distribute this # software and its documentation for any purpose and without # fee is hereby granted, provided that this copyright # notice appears in all copies. The University of California # makes no representations about the suitability of this # software for any purpose. It is provided "as is" without # express or implied warranty. # X proc auto_mkindex {dir files} { X global errorCode errorInfo X set oldDir [pwd] X cd $dir X set dir [pwd] X append index "# Tcl autoload index file: each line identifies a Tcl\n" X append index "# procedure and the file where that procedure is\n" X append index "# defined. Generated by the \"auto_mkindex\" command.\n" X append index "\n" X foreach file [glob $files] { X set f "" X set error [catch { X set f [open $file] X while {[gets $f line] >= 0} { X if [regexp {^proc[ ]+([^ ]*)} $line match procName] { X append index "[list $procName $file]\n" X } X } X close $f X } msg] X if $error { X set code $errorCode X set info $errorInfo X catch [close $f] X cd $oldDir X error $msg $info $code X } X } X set f [open tclIndex w] X puts $f $index nonewline X close $f X cd $oldDir } SHAR_EOF $shar_touch -am 1015123693 'snmp2/tcl/mkindex.tcl' && chmod 0444 'snmp2/tcl/mkindex.tcl' || echo 'restore of snmp2/tcl/mkindex.tcl failed' shar_count="`wc -c < 'snmp2/tcl/mkindex.tcl'`" test 1603 -eq "$shar_count" || echo "snmp2/tcl/mkindex.tcl: original size 1603, current size $shar_count" rm -f _sharnew.tmp fi # ============= snmp2/tcl/parray.tcl ============== if test -f 'snmp2/tcl/parray.tcl' && test X"$1" != X"-c"; then echo 'x - skipping snmp2/tcl/parray.tcl (file already exists)' rm -f _sharnew.tmp else > _sharnew.tmp echo 'x - extracting snmp2/tcl/parray.tcl (text)' sed 's/^X//' << 'SHAR_EOF' > 'snmp2/tcl/parray.tcl' && # parray: # Print the contents of a global array on stdout. # # $Header: /sprite/src/lib/tcl/scripts/RCS/parray.tcl,v 1.1 91/09/26 09:55:03 ouster Exp $ SPRITE (Berkeley) # # Copyright 1991 Regents of the University of California # Permission to use, copy, modify, and distribute this # software and its documentation for any purpose and without # fee is hereby granted, provided that this copyright # notice appears in all copies. The University of California # makes no representations about the suitability of this # software for any purpose. It is provided "as is" without # express or implied warranty. # X proc parray a { X global $a X set maxl 0 X foreach name [lsort [array names $a]] { X if {[string length $name] > $maxl} { X set maxl [string length $name] X } X } X set maxl [expr {$maxl + [string length $a] + 2}] X foreach name [lsort [array names $a]] { X set nameString [format %s(%s) $a $name] X puts stdout [format "%-*s = %s" $maxl $nameString [set ${a}($name)]] X } } SHAR_EOF $shar_touch -am 1015123693 'snmp2/tcl/parray.tcl' && chmod 0444 'snmp2/tcl/parray.tcl' || echo 'restore of snmp2/tcl/parray.tcl failed' shar_count="`wc -c < 'snmp2/tcl/parray.tcl'`" test 1001 -eq "$shar_count" || echo "snmp2/tcl/parray.tcl: original size 1001, current size $shar_count" rm -f _sharnew.tmp fi # ============= snmp2/tcl/tclIndex ============== if test -f 'snmp2/tcl/tclIndex' && test X"$1" != X"-c"; then echo 'x - skipping snmp2/tcl/tclIndex (file already exists)' rm -f _sharnew.tmp else > _sharnew.tmp echo 'x - extracting snmp2/tcl/tclIndex (text)' sed 's/^X//' << 'SHAR_EOF' > 'snmp2/tcl/tclIndex' && # Tcl autoload index file: each line identifies a Tcl # procedure and the file where that procedure is # defined. Generated by the "auto_mkindex" command. X unknown init.tcl auto_load init.tcl auto_execok init.tcl auto_reset init.tcl auto_mkindex mkindex.tcl parray parray.tcl SHAR_EOF $shar_touch -am 1015123693 'snmp2/tcl/tclIndex' && chmod 0644 'snmp2/tcl/tclIndex' || echo 'restore of snmp2/tcl/tclIndex failed' shar_count="`wc -c < 'snmp2/tcl/tclIndex'`" test 277 -eq "$shar_count" || echo "snmp2/tcl/tclIndex: original size 277, current size $shar_count" rm -f _sharnew.tmp fi # ============= snmp2/man/snmp_api.3 ============== if test ! -d 'snmp2/man'; then echo 'x - creating directory snmp2/man' mkdir 'snmp2/man' fi if test -f 'snmp2/man/snmp_api.3' && test X"$1" != X"-c"; then echo 'x - skipping snmp2/man/snmp_api.3 (file already exists)' rm -f _sharnew.tmp else > _sharnew.tmp echo 'x - extracting snmp2/man/snmp_api.3 (text)' sed 's/^X//' << 'SHAR_EOF' > 'snmp2/man/snmp_api.3' && X.\* /*********************************************************** X.\" Copyright 1989 by Carnegie Mellon University X.\" X.\" All Rights Reserved X.\" X.\" Permission to use, copy, modify, and distribute this software and its X.\" documentation for any purpose and without fee is hereby granted, X.\" provided that the above copyright notice appear in all copies and that X.\" both that copyright notice and this permission notice appear in X.\" supporting documentation, and that the name of CMU not be X.\" used in advertising or publicity pertaining to distribution of the X.\" software without specific, written prior permission. X.\" X.\" CMU DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING X.\" ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL X.\" CMU BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR X.\" ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, X.\" WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, X.\" ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS X.\" SOFTWARE. X.\" ******************************************************************/ X.TH SNMP_API 3 "1 June, 1992" X.UC 5 X.SH NAME snmp_open, snmp_close, snmp_send, snmp_read, snmp_free_pdu, snmp_select_info, snmp_timeout \- send and receive SNMP messages X.SH SYNOPSIS X.B "#include X.br X.B "#include X.br X.B "#include X.br X.B #include """snmp.h"" X.br X.B #include """snmp_impl.h"" X.br X.B #include """asn1.h"" X.br X.B #include """snmp_api.c"" X.PP X.B "extern int snmp_errno; X.PP X.B "struct snmp_session *snmp_open(session) X.br X.B "struct snmp_session *session; X.PP X.B "int snmp_close(session) X.br X.B "struct snmp_session *session; X.PP X.B "int snmp_send(session, pdu) X.br X.B "struct snmp_session *session; X.br X.B "struct snmp_pdu *pdu; X.PP X.B "void snmp_read(fdset) X.br X.B "fd_set *fdset; X.PP X.B "int snmp_select_info(numfds, fdset, timeout, block) X.br X.B "int *numfds; X.br X.B "fd_set *fdset; X.br X.B "struct timeval *timeout; X.br X.B "int *block; X.PP X.B "void snmp_timeout() X.PP X.B "void snmp_free_pdu(pdu) X.br X.B "struct snmp_pdu *pdu; X.PP X.SH DESCRIPTION X.I Snmp_open, snmp_close, and X.I snmp_send each take as input a pointer to an object with the following structure. In addition, X.I snmp_open also returns a pointer to an object with this structure. This structure contains information for a set of transactions that will share similar transport characteristics. X.RS X.PP X.nf typedef struct sockaddr_in ipaddr; X struct snmp_session { X u_char *community; /* community for outgoing requests. */ X int community_len; /* Length of community name. */ X int retries; /* Number of retries before timeout. */ X long timeout; /* Number of uS until first timeout, then exponential backoff */ X char *peername; /* Domain name or dotted IP address of default peer */ X u_short remote_port;/* UDP port number of peer. */ X u_short local_port; /* My UDP port number, 0 for default, picked randomly */ X X /* Authentication function or NULL if null authentication is used */ X u_char *(*authenticator)(); X X int (*callback)(); /* Function to interpret incoming data */ X X /* Pointer to data that the callback function may consider important */ X void *callback_magic; X int version; /* 0 for SNMP, 1 for secure SNMP */ X oid *srcParty; /* partyID of source party */ X int srcPartyLen; /* length in subIDs of srcParty */ X oid *dstParty; /* partyID of destination party */ X int dstPartyLen; /* length in subIDs of dstParty */ }; X /* X * Set fields in session and pdu to the following to get a default or unconfigured value. X */ #define SNMP_DEFAULT_COMMUNITY_LEN 0/* for default community name */ #define SNMP_DEFAULT_RETRIES -1 #define SNMP_DEFAULT_TIMEOUT -1 #define SNMP_DEFAULT_REMPORT 0 #define SNMP_DEFAULT_REQID 0 #define SNMP_DEFAULT_ERRSTAT -1 #define SNMP_DEFAULT_ERRINDEX -1 #define SNMP_DEFAULT_ADDRESS 0 #define SNMP_DEFAULT_PEERNAME NULL #define SNMP_DEFAULT_ENTERPRISE_LENGTH 0 #define SNMP_DEFAULT_TIME 0 X /* X * This routine must be supplied by the application: X * X * u_char *authenticator(pdu, length, community, community_len) X * u_char *pdu; The rest of the PDU to be authenticated X * int *length; The length of the PDU (updated by the authenticator) X * u_char *community; The community name to authenticate under. X * int community_len The length of the community name. X * X * Returns the authenticated pdu, or NULL if authentication failed. X * If null authentication is used, the authenticator in snmp_session can be X * set to NULL(0). X */ X /* X * This routine must be supplied by the application: X * X * int callback(operation, session, reqid, pdu, magic) X * int operation; X * struct snmp_session *session; The session authenticated under. X * int reqid; The request id of this pdu (0 for TRAP) X * struct snmp_pdu *pdu; The pdu information. X * void *magic A link to the data for this routine. X * X * Returns 1 if request was successful, 0 if it should be kept pending. X * Any data in the pdu must be copied because it will be freed elsewhere. X * Operations are defined below: X */ #define RECEIVED_MESSAGE 1 #define TIMED_OUT 2 X.ft R X.ad X.fi X.RE X.PP X.I Snmp_send and X.I snmp_free_pdu each take as input a pointer to an object with the following structure. This structure contains information that describes a transaction that will be performed over an open session. X.RS X.PP X.nf struct snmp_pdu { X ipaddr address; /* Address of peer */ X X int command; /* Type of this PDU */ X X u_long reqid; /* Request id */ X u_long errstat; /* Error status */ X u_long errindex; /* Error index */ X X /* Trap information */ X oid *enterprise;/* System OID */ X int enterprise_length; X ipaddr agent_addr; /* address of object generating trap */ X int trap_type; /* trap type */ X int specific_type; /* specific type */ X u_long time; /* Uptime */ X X struct variable_list *variables; }; X X struct variable_list { X struct variable_list *next_variable; /* NULL for last variable */ X oid *name; /* Object identifier of variable */ X int name_length; /* number of subid's in name */ X u_char type; /* ASN type of variable */ X union { /* value of variable */ X long *integer; X u_char *string; X oid *objid; X } val; X int val_len; }; X.ft R X.ad X.fi X.RE X.PP X.I Snmp_read, snmp_select_info, and X.I snmp_timeout provide an interface for the use of the X.IR select (2) system call so that SNMP transactions can occur asynchronously. X.PP X.I Snmp_select_info is given the information that would have been passed to X.I select in the absence of SNMP. For example, this might include window update information. This information is modified so that SNMP will get the service it requires from the call to X.I select. In this case, X.I numfds, fdset, and X.I timeout correspond to the X.I nfds, readfds, and X.I timeout arguments to X.I select, respectively. The only exception is that timeout must always point to an allocated (but perhaps uninitialized) X.I struct timeval. If X.I timeout would have been passed as NULL, X.I block is set to true, and X.I timeout is treated as undefined. This same rule applies upon return from X.I snmp_select_info. X.PP After calling X.I snmp_select_info, select is called with the returned data. When select returns, X.I snmp_read is called with the X.I fd_set returned from X.I select. This will read all SNMP sockets with input. If X.I select times out, X.I snmp_timeout should be called to see if the timeout was intended for SNMP. X.SH DIAGNOSTICS X.PP Error return status from X.I snmp_open is indicated by return of a null pointer. Error return status from X.I snmp_close and X.I snmp_send is indicated by return of 0. A successful status will return a 1. The external integer X.IR snmp_errno may then be checked to see what type of error has occurred X.PP X.IR snmp_errno can have the following values: X.RS X.IP SNMPERR_GENERR \w'SNMPERR_BAD_LOCPORT'u+2n A generic error occurred. X.IP SNMPERR_BAD_LOCPORT \w'SNMPERR_BAD_LOCPORT'u+2n The local port was bad because it had already been allocated or permission was denied. X.IP SNMPERR_BAD_ADDRESS \w'SNMPERR_BAD_LOCPORT'u+2n The host name or address given was not useable. X.IP SNMPERR_BAD_SESSION \w'SNMPERR_BAD_SESSION'u+2n The specified session was not open. X.RE X.SH "SEE ALSO" select(2), snmp_api.h SHAR_EOF $shar_touch -am 1015123693 'snmp2/man/snmp_api.3' && chmod 0644 'snmp2/man/snmp_api.3' || echo 'restore of snmp2/man/snmp_api.3 failed' shar_count="`wc -c < 'snmp2/man/snmp_api.3'`" test 8507 -eq "$shar_count" || echo "snmp2/man/snmp_api.3: original size 8507, current size $shar_count" rm -f _sharnew.tmp fi # ============= snmp2/man/snmptest.1 ============== if test -f 'snmp2/man/snmptest.1' && test X"$1" != X"-c"; then echo 'x - skipping snmp2/man/snmptest.1 (file already exists)' rm -f _sharnew.tmp else > _sharnew.tmp echo 'x - extracting snmp2/man/snmptest.1 (binary)' sed 's/^X//' << 'SHAR_EOF' > _sharuue.tmp && begin 600 snmp2/man/snmptest.1 M+EPJ("\J*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ M*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*@HN7"(@"4-O<'ER:6=H="`Q.3@X+"`Q.3@Y M(&)Y($-A2!P=7)P;W-E(&%N9"!W:71H;W5T(&9E92!I7)I9VAT(&YO=&EC92!A;F0@=&AI2!U2X*+E!0"E1H90HN22!H M;W-T"G-P96-I9FEC871I;VX@;6%Y(&)E(&5I=&AE2!A6]U(&-A;B!E;G1EF5UF5U7-D97-C7-T96TN2!T>7!I;F<@=&AE(&-O;6UA;F1S("(D3B(@;W(@(B13(B!R97!E8W1I=F5L M>2X@(%1Y<&EN9PHB)$'QD?&Y\;WQT?&%=.@HN4%`*7!E(")I(B!F M;W(@86X@:6YT96=E"!B>71E71E71E(&]F('1H92!S M=')I;F7!E(&$@8FQA;FL@;&EN92!A=`IT:&4@<')O;7!T M(&9O7!I;F<@(B11(B!W:6QL M('%U:70@=&AE('!R;V=R86TN"BY04`I!9&1I;F<@82`B+60B('1O('1H92!A M4TY-4"!396-U2!);G1E _sharnew.tmp echo 'x - extracting snmp2/man/snmpwalk.1 (text)' sed 's/^X//' << 'SHAR_EOF' > 'snmp2/man/snmpwalk.1' && X.\* /*********************************************************** X.\" Copyright 1988, 1989 by Carnegie Mellon University X.\" X.\" All Rights Reserved X.\" X.\" Permission to use, copy, modify, and distribute this software and its X.\" documentation for any purpose and without fee is hereby granted, X.\" provided that the above copyright notice appear in all copies and that X.\" both that copyright notice and this permission notice appear in X.\" supporting documentation, and that the name of CMU not be X.\" used in advertising or publicity pertaining to distribution of the X.\" software without specific, written prior permission. X.\" X.\" CMU DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING X.\" ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL X.\" CMU BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR X.\" ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, X.\" WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, X.\" ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS X.\" SOFTWARE. X.\" ******************************************************************/ X.TH SNMPWALK 1 "1 June 1992" X.UC 4 X.SH NAME snmpwalk - communicates with a network entity using SNMP GET Next Requests. X.SH SYNOPSIS snmpwalk host sourceParty destinationParty [variable-name] X.SH DESCRIPTION Snmpwalk is an SNMP application that uses GET NEXT Requests to query for a tree of information about a network entity. X.PP The X.I host specification may be either a host name or an internet address specified in "dot notation" X.PP The X.I sourceParty and X.I destinationParty specify the party names for the transaction with the remote system, in the same format as /etc/party.conf. X.PP A variable may also be given on the command line. This variable specifies which portion of the object identifier space will be searched using GET NEXT Requests. All variables in the subtree below the given variable are queried and their values presented to the user. Each variable name is given in the format specified in X.IR variables (5). X.PP If the "variable-name" argument is not present, snmpwalk will search MIB-2. X.PP For example X.PP X.I snmpwalk zeus.andrew.cmu.edu zeusMS zeusAgent system X.PP will retrieve the variables sysDescr.0 and sysObjectID.0 and sysUpTime.0: X.PP X.I Name: system.sysDescr.0 X.br X.I OCTET STRING- (ascii): Unix 4.3BSD X.PP X.I Name: system.sysObjectID.0 X.br X.I OBJECT IDENTIFIER: .iso.org.dod.internet.private.enterprises.CMU.sysID.CMU-Unix X.PP X.I Name: system.sysUpTime.0 X.br X.I Timeticks: (2291082) 6:21:50 X.PP If the network entity has an error processing the request packet, an error packet will be returned and a message will be shown, helping to pinpoint why the request was malformed. X.PP If the tree search causes attempts to search beyond the end of the MIB, a message will be displayed: X.PP X.I End of MIB. X.PP Adding a "-d" to the argument list will cause the application to dump input and output packets. X.PP X.SH "SEE ALSO" variables(5), RFC 1155, RFC 1156, RFC 1157, SNMP Security Internet Drafts SHAR_EOF $shar_touch -am 1015123693 'snmp2/man/snmpwalk.1' && chmod 0644 'snmp2/man/snmpwalk.1' || echo 'restore of snmp2/man/snmpwalk.1 failed' shar_count="`wc -c < 'snmp2/man/snmpwalk.1'`" test 3122 -eq "$shar_count" || echo "snmp2/man/snmpwalk.1: original size 3122, current size $shar_count" rm -f _sharnew.tmp fi # ============= snmp2/man/variables.5 ============== if test -f 'snmp2/man/variables.5' && test X"$1" != X"-c"; then echo 'x - skipping snmp2/man/variables.5 (file already exists)' rm -f _sharnew.tmp else > _sharnew.tmp echo 'x - extracting snmp2/man/variables.5 (text)' sed 's/^X//' << 'SHAR_EOF' > 'snmp2/man/variables.5' && X.\* /*********************************************************** X.\" Copyright 1988, 1989 by Carnegie Mellon University X.\" X.\" All Rights Reserved X.\" X.\" Permission to use, copy, modify, and distribute this software and its X.\" documentation for any purpose and without fee is hereby granted, X.\" provided that the above copyright notice appear in all copies and that X.\" both that copyright notice and this permission notice appear in X.\" supporting documentation, and that the name of CMU not be X.\" used in advertising or publicity pertaining to distribution of the X.\" software without specific, written prior permission. X.\" X.\" CMU DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING X.\" ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL X.\" CMU BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR X.\" ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, X.\" WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, X.\" ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS X.\" SOFTWARE. X.\" ******************************************************************/ X.TH VARIABLES 5 "17 September 1989" X.UC 4 X.SH NAME X variables - Format of specifying variable names to SNMP tools. X.SH SYNOPSIS X system.sysdescr.0 X.SH DESCRIPTION Variable names are in the format of Object Identifiers (ASN.1). There are several methods of representation. Each variable name is given in the format of A.B.C.D..., where A, B, C, and D are subidentifiers in one of two forms of notation. Each subidentifier may be encoded as a decimal integer, or a symbol as found in the RFC1066 MIB. The case of the symbols is not significant. X.br If there is no leading "." in the variable name, the name will be formed as if having been preceded with "iso.org.dod.internet.mgmt.mib.". A "." must be placed before the first variable if the user is to fully specify the name. For example: X.PP X.I 1.1.0 system.sysDescr.0 and 1.sysDescr.0 X.PP all refer to the same variable name. Likewise: X.PP X.I .1.3.6.1.2.1.1.1.0 .iso.org.dod.internet.mgmt.mib.system.sysdescr.0 .1.3.6.1.2.1.1.sysdescr.0 X.PP All refer to the same variable name. X.PP The description of the variables in the MIB is given in a file named X.I "mib.txt" in the current directory or in a file named in the environment variable X.I "MIBFILE" or in X.I "/etc/mib.txt". These files are searched in the above order. The files are in the ASN.1 notation and use the OBJECT TYPE macro defined in RFC 1065. Most of the file describing the RFC 1066 MIB is pulled out of RFC 1066 without change. X.SH "SEE ALSO" RFC 1065, RFC 1066, RFC 1067, ISO IS 8824(ASN.1) X.SH BUGS The parser of the X.I "mib.txt" file is not expected to handle bizarre (although correct) interpretations of the ASN.1 notation. X X SHAR_EOF $shar_touch -am 1015123693 'snmp2/man/variables.5' && chmod 0644 'snmp2/man/variables.5' || echo 'restore of snmp2/man/variables.5 failed' shar_count="`wc -c < 'snmp2/man/variables.5'`" test 2850 -eq "$shar_count" || echo "snmp2/man/variables.5: original size 2850, current size $shar_count" rm -f _sharnew.tmp fi # ============= snmp2/man/des.1 ============== if test -f 'snmp2/man/des.1' && test X"$1" != X"-c"; then echo 'x - skipping snmp2/man/des.1 (file already exists)' rm -f _sharnew.tmp else > _sharnew.tmp echo 'x - extracting snmp2/man/des.1 (text)' sed 's/^X//' << 'SHAR_EOF' > 'snmp2/man/des.1' && X.TH DES 1 "24 March 1987" X.SH NAME des - DES file encryption X.SH SYNOPSIS X.PP X.B des -e|-d [-h] [-k key] [-b] X.SH DESCRIPTION X.B des is a filter that encrypts or decrypts standard input to standard output with the Data Encryption Standard (DES). Either -e (encrypt) or -d (decrypt) must be specified. If the key is not given on the command line with the -k option the command will prompt for it twice, suppressing echo and comparing the two responses to guard against mistyping. X.P The -h flag controls how the key string is to be interpreted. Without the -h flag, the key is an ASCII string. Since DES ignores the low order bit of each key byte, the high order bit is set for odd parity, thus retaining the information contained in the low order bit. If the -h flag is set, the key string is interpreted as 16 hex/ASCII characters; the low order bit of each byte is again ignored as per the DES algorithm. This allows the use of any arbitrary 56-bit key, including bytes representing control characters that could not be typed if the -h option were not used. X.PP By default, DES Cipher Block Chaining (CBC) mode is used, with an initial vector (IV) of all zeros; if the -b option is specified, Electronic Code Book (ECB) mode is used instead. X.PP Except for the -h option, this command is compatible with the X.B des command on the Sun Microsystems workstation. X.SH "SEE ALSO" Sun Microsystems DES(1) manual page, which describes in detail how the length of the file is encoded in the last block of ciphertext. X.SH AUTHOR Phil Karn, KA9Q SHAR_EOF $shar_touch -am 1015123693 'snmp2/man/des.1' && chmod 0644 'snmp2/man/des.1' || echo 'restore of snmp2/man/des.1 failed' shar_count="`wc -c < 'snmp2/man/des.1'`" test 1539 -eq "$shar_count" || echo "snmp2/man/des.1: original size 1539, current size $shar_count" rm -f _sharnew.tmp fi # ============= snmp2/man/des.3 ============== if test -f 'snmp2/man/des.3' && test X"$1" != X"-c"; then echo 'x - skipping snmp2/man/des.3 (file already exists)' rm -f _sharnew.tmp else > _sharnew.tmp echo 'x - extracting snmp2/man/des.3 (text)' sed 's/^X//' << 'SHAR_EOF' > 'snmp2/man/des.3' && X.TH DES 3 "24 March 1987" SHAR_EOF : || echo 'restore of snmp2/man/des.3 failed' fi echo 'End of snmp2 part 20' echo 'File snmp2/man/des.3 is continued in part 21' echo 21 > _sharseq.tmp exit 0