File: init.tcl

package info (click to toggle)
scotty 2.1.9-1
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 9,984 kB
  • ctags: 4,313
  • sloc: ansic: 35,946; sh: 12,591; tcl: 8,122; yacc: 2,442; makefile: 898; lex: 370
file content (117 lines) | stat: -rw-r--r-- 3,636 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
# init.tcl --
#
# Scotty initialization file. At the end of this file, we source
# the file init.tcl in the site subdirectory of the scotty library 
# directory. This is the preferred way to do site specific 
# initializations because this will work even after updating scotty 
# sources.
#
# Copyright (c) 1994-1996 Technical University of Braunschweig.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.

##
## Extend the auto_path to include $tnm(library)/library.
##

lappend auto_path $tnm(library)/library

##
## Alias definitions for SNMP sessions. You can add more local 
## definitions in the site/init.tcl file.
##

if {[info commands snmp] == "snmp"} {
    snmp alias localhost "-address 127.0.0.1"
    snmp alias mcasttrap "-address 234.0.0.1 -port 162"
}

##
## The global variable tnm(mibs:core) is used to hold the minimum set
## of core SNMP definitions that should be always available in most
## cases. You normally do not need to modify this list. Expect some
## unexpected results if you remove this definition.
##

lappend tnm(mibs:core) rfc1155.smi rfc1902.smi rfc1903.tc compat.tc 
lappend tnm(mibs:core) rfc1906.mib rfc1907.mib rfc1213.mib rfc1910.mib

##
## The global variable tnm(mibs) is used to hold a list of mibs that
## are auto-loaded by the tnm Tcl extension. You can extend or
## redefine this list in your site/init.tcl file, which gets
## sourced at the end of this script.
##

lappend tnm(mibs) rfc1269.mib rfc1238.mib rfc1757.mib

lappend tnm(mibs) rfc1315.mib rfc1354.mib rfc1381.mib rfc1382.mib

lappend tnm(mibs) rfc1406.mib rfc1407.mib rfc1414.mib
lappend tnm(mibs) rfc1461.mib rfc1471.mib rfc1472.mib rfc1473.mib 
lappend tnm(mibs) rfc1474.mib rfc1493.mib

lappend tnm(mibs) rfc1512.mib rfc1513.mib rfc1514.mib rfc1515.mib
lappend tnm(mibs) rfc1516.mib rfc1525.mib rfc1559.mib rfc1565.mib
lappend tnm(mibs) rfc1566.mib rfc1567.mib rfc1573.smi rfc1573.mib
lappend tnm(mibs) rfc1595.mib

lappend tnm(mibs) rfc1604.mib rfc1611.mib rfc1612.mib rfc1628.mib
lappend tnm(mibs) rfc1643.mib rfc1650.mib rfc1657.mib rfc1658.mib
lappend tnm(mibs) rfc1659.mib rfc1660.mib rfc1666.mib rfc1694.mib
lappend tnm(mibs) rfc1695.mib rfc1696.mib rfc1697.mib

lappend tnm(mibs) rfc1724.mib rfc1742.mib rfc1747.mib rfc1748.mib
lappend tnm(mibs) rfc1749.mib rfc1759.mib rfc1792.mib 

lappend tnm(mibs) rfc1850.mib

lappend tnm(mibs) rfc2020.mib

# Vendor MIB definitions - you might want to copy these lines to
# your $tnm(library)/site/init.tcl file.
#
# lappend tnm(mibs) cisco.mib hp-unix.mib ncd.mib
# lappend tnm(mibs) synoptics.mib wellfleet.mib
# lappend tnm(mibs) unix.mib
#
# Some local MIB fun for experimentation

lappend tnm(mibs) tubs-tnm.mib tubs-nfs.mib tubs-proc.mib tubs-mlm.mib 
lappend tnm(mibs) xxx.mib dvmrp.mib

##
## Define a proc to handle background errors.
##

if {[info commands bgerror] == ""} {
    proc bgerror {msg} {
	global errorInfo
	puts stderr $errorInfo
    }
}

##
## This nice procedure allows us to use static variables. It was
## posted on the net by Karl Lehenbauer. There was another one
## which does not pollute the name space, but it fails on proc
## names or variable names with spaces in it...
##

proc static {args} {
    set procName [lindex [info level [expr [info level]-1]] 0]
    foreach varName $args {
        uplevel 1 "upvar #0 {$procName:$varName} $varName"
    }
}

##
## Allow for site specific initializations.
##

if {[info commands file] == "file"} {
    if [file exists [file join $tnm(library) site init.tcl]] {
	source [file join $tnm(library) site init.tcl]
    }
}