class Chassis {
	# System Attributes
	snmpVersion 1
	help "dmdb/chameleon/v1105/help.html#device"
	trapProc dmsTrapProc
#	trapRegisterProc dmsTrapRegisterProc
	endDiscoverProc dmsEndDiscovery
	maxOidInPDU 40

	# Physical chassis attributes
	isSelect 1
	statusVar s5ChasBrdLeds
	statusInstanceProc dmsLedsStatusInstanceProc
	statusProc dmsLedsStatusProc
#	endStatusProc dmsActLedsStatusProc


# edit Chassis			-cvtProc dmsChasCardInstance 
	edit {
		{{-title "System" -prefix s5AgInfo
			-help "dmdb/chameleon/v1105/help.html#sys"} {
			sysDescr sysUpTime sysContact sysName sysLocation 
			snmpEnableAuthenTraps
			{separator}
			s5AgInfoMgmtProtocolNxtBoot s5AgInfoMgmtProtocolCur
			s5AgInfoBootMode  s5AgInfoImgLoadMode 
			s5AgInfoVer s5AgInfoLocStorVer
			s5AgInfoNxtBootDfltGwAddr s5AgInfoCurDfltGwAddr
			s5AgInfoLoadProtocolNxtBoot s5AgInfoLoadProtocolLast 
			{separator}
			s5AgInfoReBoot 
		}}
		{{-title "Chassis" -prefix s5ChasCom
			-cvtProc dmsSChasCardInstance 
			-help "dmdb/chameleon/v1105/help.html#chassis" } {
			s5ChasComType s5ChasComDescr
			s5ChasComVer s5ChasComSerNum
			s5ChasComLstChng
			s5ChasComAdminState s5ChasComOperState
			s5ChasComMaxSubs s5ChasComNumSubs
			s5ChasComRelPos s5ChasComLocation s5ChasComGroupMap
		}}
		{{-title "Agent Info" -prefix s5AgMyIf -table
			-help "dmdb/chameleon/v1105/help.html#agent_info" }  {
			s5AgMyIfNxtBootIpAddr s5AgMyIfNxtBootNetMask 
			s5AgMyIfLdSvrAddr s5AgMyIfImgFname 
			s5AgMyIfValidFlag s5AgMyIfBootRouterAddr 
			s5AgMyIfMacAddr
		}}
		{{-title "SNMP Info" -prefix s5AgUnAuth
			-help "dmdb/chameleon/v1105/help.html#snmp_info" }  {
                        s5AgUnAuthIpAddr  s5AgUnAuthComm
                        {separator}
                        s5AgTrpRcvrMaxEnt s5AgTrpRcvrCurEnt 
			s5AgTrpRcvrNext
		}}
		{{-title "Trap Receivers" -prefix s5AgTrpRcvr -table -showTableIndex
			-help "dmdb/chameleon/v1105/help.html#traps"   }  {
			s5AgTrpRcvrNetAddr s5AgTrpRcvrComm 
		}} 

	}

	graph {
		{{-title "SNMP" -prefix snmp -help "help/mib2.html#snmp"} {
			snmpInPkts snmpOutPkts snmpInTotalReqVars snmpInTotalSetVars
			snmpInGetRequests snmpInGetNexts snmpInSetRequests
			snmpInGetResponses snmpOutTraps snmpOutTooBigs snmpOutNoSuchNames
			snmpOutBadValues snmpOutGenErrs snmpInBadVersions
			snmpInBadCommunityNames snmpInBadCommunityUses snmpInASNParseErrs
			snmpInTooBigs snmpInNoSuchNames snmpInBadValues snmpInReadOnlys
			snmpInGenErrs
		}}
		{{-title "IP" -prefix ip -help "help/mib2.html#grIP"} {
			ipInReceives ipInHdrErrors ipInAddrErrors ipForwDatagrams
			ipInUnknownProtos ipInDiscards ipInDelivers ipOutRequests
			ipOutDiscards ipOutNoRoutes ipFragOKs ipFragFails ipFragCreates
			ipReasmReqds ipReasmOKs ipReasmFails
		}}
		{{-title "ICMP In" -prefix icmpIn
			-help "help/mib2.html#grIcmpIn"} {
			icmpInSrcQuenchs icmpInRedirects icmpInEchos icmpInEchoReps
			icmpInTimestamps icmpInTimestampReps icmpInAddrMasks
			icmpInAddrMaskReps  icmpInParmProbs icmpInDestUnreachs
			icmpInTimeExcds
		}}
		{{-title "ICMP Out" -prefix icmpOut
			-help "help/mib2.html#grIcmpOut"} {
			icmpOutSrcQuenchs icmpOutRedirects icmpOutEchos icmpOutEchoReps
			icmpOutTimestamps icmpOutTimestampReps icmpOutAddrMasks
			icmpOutAddrMaskReps icmpOutParmProbs icmpOutDestUnreachs
			icmpOutTimeExcds
		}}
	}

	menuedit {
		{command -label "Chassis..." -command {dm_Select .chassis 1; dm_DoMenu edit Chassis}}
		{command -label "IP..." -command {dm_Dialog edit IP}}
		{command -label "Bridge..." -command {dm_Dialog edit Bridge}}
	}
	menu {
		{command -label "Edit..." -command {dm_DoMenu edit Chassis}}
		{command -label "Graph..." -command {dm_DoMenu graph Chassis}}
	}

	toolbar {
		{-text "Alarm Manager" -image $Dm_Path/bitmaps/alarm.gif
			 -command "dmsCreateAlarm Sess0"}
	}

	menubar {
		{rmon {-text RMON -underline 1}}
		{vlan {-text VLAN}}
	}
}


class Card {
	isSelect 1
	edit {
		{{-title "Unit/MDA" -prefix s5ChasCom
			-help "dmdb/chameleon/v1105/help.html#card"} {
			s5ChasComType s5ChasComDescr
			s5ChasComVer s5ChasComSerNum
		}}
	}	
	menu {
		{command -label "Edit..." -command {dm_DoMenu edit Card}}
	}
}

class Card::0 {
	bitmap ""
}
class Card::1 {
	bitmap ""
}
# 24 10/100BaseTx
class Card::653 {
	bitmap "chameleon/v1105/bitmaps/bs450_24_front.gif"
	children {Port Led}
	statusProc dms450SLedsStatusProc
	Port.positions {
		{225 33} {253 33} {281 33} {309 33} {337 33} {365 33}
		{405 33} {433 33} {461 33} {489 33} {517 33} {545 33}
		{225 82} {253 82} {281 82} {309 82} {337 82} {365 82}
		{405 82} {433 82} {461 82} {489 82} {517 82} {545 82}
	}
	Port.subClasses {1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1}
	Port.instances { 1 2 3 4 5 6 7 8 9 10 11 12
		13 14 15 16 17 18 19 20 21 22 23 24}
 
	Led.positions {
		{640 14} {650 14} {660 14} {670 14} {680 14} {690 14}
		{700 14} {710 14} {720 14} {730 14} {740 14} {750 14}
		{640 24} {650 24} {660 24} {670 24} {680 24} {690 24}
		{700 24} {710 24} {720 24} {730 24} {740 24} {750 24}
		{640 34} {650 34} {660 34} {670 34} {680 34} {690 34}
		{700 34} {710 34} {720 34} {730 34} {740 34} {750 34}
		{640 44} {650 44} {660 44} {670 44} {680 44} {690 44}
		{700 44} {710 44} {720 44} {730 44} {740 44} {750 44}
		{640 92} {650 92} {660 92} {670 92} {680 92} {690 92}
		{700 92} {710 92} {720 92} {730 92} {740 92} {750 92}
		{640 102} {650 102} {660 102} {670 102} {680 102} {690 102}
		{700 102} {710 102} {720 102} {730 102} {740 102} {750 102}
		{640 112} {650 112} {660 112} {670 112} {680 112} {690 112}
		{700 112} {710 112} {720 112} {730 112} {740 112} {750 112}
		{640 122} {650 122} {660 122} {670 122} {680 122} {690 122}
		{700 122} {710 122} {720 122} {730 122} {740 122} {750 122}
	}
 
	Led.subClasses {1 1 1 1 1 1 1 1 1 1 1 1
		2 2 2 2 2 2 2 2 2 2 2 2
		3 3 3 3 3 3 3 3 3 3 3 3
		4 4 4 4 4 4 4 4 4 4 4 4
		1 1 1 1 1 1 1 1 1 1 1 1
		2 2 2 2 2 2 2 2 2 2 2 2
		3 3 3 3 3 3 3 3 3 3 3 3
		4 4 4 4 4 4 4 4 4 4 4 4
	}
	Led.instances {1 2 3 4 5 6 7 8 9 10 11 12
		1 2 3 4 5 6 7 8 9 10 11 12
		1 2 3 4 5 6 7 8 9 10 11 12
		1 2 3 4 5 6 7 8 9 10 11 12
		13 14 15 16 17 18 19 20 21 22 23 24
		13 14 15 16 17 18 19 20 21 22 23 24
		13 14 15 16 17 18 19 20 21 22 23 24
		13 14 15 16 17 18 19 20 21 22 23 24
	}
}

# 12 10/100BaseTx
class Card::654 {
	bitmap "chameleon/v1105/bitmaps/bs450_12_front.gif"
	children {Port Led}
	statusProc dms450SLedsStatusProc
	Port.positions {
		{225 82} {253 82} {281 82} {309 82} {337 82} {365 82}
		{405 82} {433 82} {461 82} {489 82} {517 82} {545 82}
	}
		Port.subClasses {1 1 1 1 1 1 1 1 1 1 1 1}
		Port.instances { 1 2 3 4 5 6 7 8 9 10 11 12 }
 
	Led.positions {
		{640 92} {650 92} {660 92} {670 92} {680 92} {690 92}
		{700 92} {710 92} {720 92} {730 92} {740 92} {750 92}
		{640 102} {650 102} {660 102} {670 102} {680 102} {690 102}
		{700 102} {710 102} {720 102} {730 102} {740 102} {750 102}
		{640 112} {650 112} {660 112} {670 112} {680 112} {690 112}
		{700 112} {710 112} {720 112} {730 112} {740 112} {750 112}
		{640 122} {650 122} {660 122} {670 122} {680 122} {690 122}
		{700 122} {710 122} {720 122} {730 122} {740 122} {750 122}
	}
 
	Led.subClasses {1 1 1 1 1 1 1 1 1 1 1 1
		2 2 2 2 2 2 2 2 2 2 2 2
		3 3 3 3 3 3 3 3 3 3 3 3
		4 4 4 4 4 4 4 4 4 4 4 4
	}
	Led.instances {1 2 3 4 5 6 7 8 9 10 11 12
		1 2 3 4 5 6 7 8 9 10 11 12
		1 2 3 4 5 6 7 8 9 10 11 12
		1 2 3 4 5 6 7 8 9 10 11 12
	}
}
class Card::12000 {
	bitmap ""
}
class Card::24000 {
	bitmap ""
}
class Card::? {
	bitmap "chameleon/v1105/bitmaps/unsupportedmda.gif"
}

# DMA 450 1SX (1000 mbps)
class Card::24656 {
	bitmap "chameleon/v1105/bitmaps/450_24_1sx.gif"
	children {Port Led}
	Port.positions {{68 25}}
	Port.subClasses {2}
	Port.instances {25}
	Led.positions {{150 25} {150 35} {150 45} }
	Led.subClasses {5 5 5}
	Led.instances {25 25 25}
}

# DMA 450 1SR (1000 mbps)
class Card::24657 {
	bitmap "chameleon/v1105/bitmaps/450_24_1sr.gif"
	children {Port Led}
	Port.positions {{10 25}}
	Port.subClasses {3}
	Port.instances {25}
	Led.positions { {150 25} {160 25} 
			{150 35} {160 35} {150 45} {160 45} }
	Led.subClasses {5 5 5 5 5 5}
	Led.instances {25 25 25 25 25 25}
}

# DMA 450 4TX (10/100 mbps)
class Card::24658 {
	bitmap "chameleon/v1105/bitmaps/450_24_4tx.gif"
	children {Port Led}
	statusProc dms450SLedsStatusProc
	Port.positions {{12 25} {40 25} {68 25} {96 25}}
	Port.subClasses {1 1 1 1}
	Port.instances {25 26 27 28}
	Led.positions { {145 18} {155 18} {165 18} {175 18}
			{145 28} {155 28} {165 28} {175 28}
			{145 38} {155 38} {165 38} {175 38}
			{145 48} {155 48} {165 48} {175 48}}
	Led.subClasses {1 1 1 1 2 2 2 2 3 3 3 3 4 4 4 4}
	Led.instances {25 26 27 28 25 26 27 28 25 26 27 28 25 26 27 28}
}

# DMA 450 2FX (100 mbps)
class Card::24659 {
	bitmap "chameleon/v1105/bitmaps/450_24_2fx.gif"
	children {Port Led}
	Port.positions {{10 25} {72 25}}
	Port.subClasses {2 2}
	Port.instances {25 26}
	Led.positions { {160 25} {170 25} 
			{160 35} {170 35} {160 45} {170 45} }
	Led.subClasses {1 1 3 3 4 4}
	Led.instances {25 26 25 26 25 26}
}

# DMA 450 1LX (1000 mbps)
class Card::24662 {
	bitmap "chameleon/v1105/bitmaps/450_24_1lx.gif"
	children {Port Led}
	Port.positions {{68 25}}
	Port.subClasses {2}
	Port.instances {25}
	Led.positions {{150 25} {150 35} {150 45} }
	Led.subClasses {5 5 5}
	Led.instances {25 25 25}
}

# DMA 450 1LR (1000 mbps)
class Card::24663 {
	bitmap "chameleon/v1105/bitmaps/450_24_1lr.gif"
	children {Port Led}
	Port.positions {{10 25}}
	Port.subClasses {3}
	Port.instances {25}
	Led.positions { {150 25} {160 25} 
			{150 35} {160 35} {150 45} {160 45} }
	Led.subClasses {5 5 5 5 5 5}
	Led.instances {25 25 25 25 25 25}
}

# DMA 450 1SX
class Card::12656 {
	bitmap "chameleon/v1105/bitmaps/450_12_1sx.gif"
	children {Port Led}
	Port.positions {{68 25}}
	Port.subClasses {2}
	Port.instances {13}
	Led.positions {{150 25} {150 35} {150 45} }
	Led.subClasses {5 5 5} 
	Led.instances {13 13 13}
}

# DMA 450 1SR
class Card::12657 {
	bitmap "chameleon/v1105/bitmaps/450_12_1sr.gif"
	children {Port Led}
	statusProc dms450SLedsStatusProc
	Port.positions {{10 25}}
	Port.subClasses {3}
	Port.instances {13}
	Led.positions { {150 25} {160 25} 
			{150 35} {160 35} {150 45} {160 45} }
	Led.subClasses {5 5 5 5 5 5}
	Led.instances {13 13 13 13 13 13}
}

# DMA 450 4TX
class Card::12658 {
	bitmap "chameleon/v1105/bitmaps/450_12_4tx.gif"
	children {Port Led}
	Port.positions {{12 25} {40 25} {68 25} {96 25}}
	Port.subClasses {1 1 1 1}
	Port.instances {13 14 15 16}
	Led.positions { {145 18} {155 18} {165 18} {175 18}
			{145 28} {155 28} {165 28} {175 28}
			{145 38} {155 38} {165 38} {175 38}
			{145 48} {155 48} {165 48} {175 48}}
	Led.subClasses {1 1 1 1 2 2 2 2 3 3 3 3 4 4 4 4}
	Led.instances {13 14 15 16 13 14 15 16 13 14 15 16 13 14 15 16}
}

# DMA 450 2FX
class Card::12659 {
	bitmap "chameleon/v1105/bitmaps/450_12_2fx.gif"
	children {Port Led}
	Port.positions {{10 25} {72 25}}
	Port.subClasses {2 2}
	Port.instances {13 14}
	Led.positions { {160 25} {170 25} 
			{160 35} {170 35} {160 45} {170 45} }
	Led.subClasses {1 1 3 3 4 4}
	Led.instances {13 14 13 14 13 14}
}

#	Led.positions { {160 18} {170 18} {160 28} {170 28} 
#			{160 38} {170 38} {160 48} {170 48} }
# DMA 450 1LX
class Card::12662 {
	bitmap "chameleon/v1105/bitmaps/450_12_1lx.gif"
	children {Port Led}
	Port.positions {{68 25}}
	Port.subClasses {2}
	Port.instances {13}
	Led.positions {{150 25} {150 35} {150 45} }
	Led.subClasses {5 5 5}
	Led.instances {13 13 13}
}

# DMA 450 1LR
class Card::12663 {
	bitmap "chameleon/v1105/bitmaps/450_12_1lr.gif"
	children {Port Led}
	Port.positions {{10 25}}
	Port.subClasses {3}
	Port.instances {13}
	Led.positions { {150 25} {160 25} 
			{150 35} {160 35} {150 45} {160 45} }
	Led.subClasses {5 5 5 5 5 5}
	Led.instances {13 13 13 13 13 13}
}

class Port {
	isSelect 1
	statusVar {$ifOperStatus<<3 | $ifAdminStatus}

	edit {
		{{-title "Interface" -prefix if
			-help "dmdb/chameleon/v1105/help.html#ifPort"} {
			ifIndex ifDescr ifType ifMtu ifPhysAddress ifAdminStatus ifOperStatus
			ifLastChange ifSpeed
		}}
		{{-title "VLAN" -prefix rcVlanPort
			-help "dmdb/chameleon/v1003/help.html#vlanPort"} {
			rcVlanPortType rcVlanPortVlanIds
			{separator} rcVlanPortDiscardTaggedFrames
			{separator} rcVlanPortDiscardUntaggedFrames rcVlanPortDefaultVlanId
		}}

		{{-title "Stp Port" -prefix dot1dStpPort
	                -help "dmdb/chameleon/v1105/help.html#stpConfig"} {
			dot1dStpPortPriority dot1dStpPortState 
			dot1dStpPortEnable dot1dStpPortPathCost 
			dot1dStpPortDesignatedRoot dot1dStpPortDesignatedCost 
			dot1dStpPortDesignatedBridge dot1dStpPortDesignatedPort
			dot1dStpPortForwardTransitions
		}}
	}
	indexNames {Port}
	indexNamesProc dmsIndexPort

	graph {
		{{-title "Interface" 
			-help "help/mib2.html#graphIf"} {
			ifInOctets ifOutOctets ifInUcastPkts ifOutUcastPkts ifInNUcastPkts
			ifOutNUcastPkts ifInDiscards ifOutDiscards ifInErrors ifOutErrors
			ifInUnknownProtos 
		}}

		{{-title "Ethernet\nErrors" -prefix dot3Stats
			-help "help/ether.html#error"} {
			dot3StatsAlignmentErrors dot3StatsFCSErrors dot3StatsInternalMacTransmitErrors
			dot3StatsInternalMacReceiveErrors dot3StatsCarrierSenseErrors
			dot3StatsFrameTooLongs dot3StatsSQETestErrors dot3StatsDeferredTransmissions
			dot3StatsSingleCollisionFrames dot3StatsMultipleCollisionFrames
			dot3StatsLateCollisions dot3StatsExcessiveCollisions
		}}
		{{-title "Transparent\nBridging" -prefix dot1dTp
			-help "dmdb/chameleon/v1105/help.html#grBridgePort"} {
			dot1dTpPortInFrames dot1dTpPortOutFrames dot1dTpPortInDiscards
		}}
		{{-title "RMON\nEtherStat" -prefix etherStats
			-help "help/rmon.html#traffic"} {
			etherStatsOctets etherStatsPkts etherStatsBroadcastPkts etherStatsMulticastPkts
			etherStatsCRCAlignErrors etherStatsUndersizePkts etherStatsOversizePkts
			etherStatsFragments etherStatsCollisions
			etherStatsJabbers  etherStatsPkts64Octets
			etherStatsPkts65to127Octets etherStatsPkts128to255Octets
			etherStatsPkts256to511Octets etherStatsPkts512to1023Octets
			etherStatsPkts1024to1518Octets 
		}}
                {{-title "RMON\nHistory"
			-useProc? dmsCheckRmonHistory
                        -help "help/rmon.html#history"
                        -table -showTableIndex
			-buildCB dmsRmonHistory
                        -prefix etherHistory} {
                        etherHistorySampleIndex etherHistoryUtilization etherHistoryOctets
                        etherHistoryPkts etherHistoryBroadcastPkts etherHistoryMulticastPkts
                        etherHistoryDropEvents etherHistoryCRCAlignErrors etherHistoryUndersizePkts
                        etherHistoryOversizePkts etherHistoryFragments etherHistoryCollisions
                }}
	}
	menu {
		{command -label "Edit..." -command {dm_DoMenu edit Port}}
		{command -label "Graph..." -command {dm_DoMenu graph Port}}
		{separator}
		{command -label "Enable" -command {dm_DoActions 1 ifAdminStatus}}
		{command -label "Disable" -command {dm_DoActions 2 ifAdminStatus}}
	}
}


class Port::1 {
	bitmap "chameleon/v1105/bitmaps/rj45.gif"
	# oper=up, admin=up
	status==9 {bitmap "chameleon/v1105/bitmaps/rj45-1.gif"}
	# down, up
	status==17 {bitmap "chameleon/v1105/bitmaps/rj45-3.gif"}
	# up, down
	status==10 {bitmap "chameleon/v1105/bitmaps/rj45-3.gif"}
	# down, down
	status==18 {bitmap "chameleon/v1105/bitmaps/rj45-2.gif"}
	# up, testing
	status==11 {bitmap "chameleon/v1105/bitmaps/rj45-4.gif"}
	# down, testing
	status==19 {bitmap "chameleon/v1105/bitmaps/rj45-4.gif"}
	# testing, testing
	status==27 {bitmap "chameleon/v1105/bitmaps/rj45-4.gif"}
	# testing, up
	status==25 {bitmap "chameleon/v1105/bitmaps/rj45-4.gif"}
}

class Port::2 {
	bitmap "chameleon/v1105/bitmaps/fiber.gif"
	# oper=up, admin=up
	status==9 {bitmap "chameleon/v1105/bitmaps/fiber-1.gif"}
	# down, up
	status==17 {bitmap "chameleon/v1105/bitmaps/fiber-3.gif"}
	# up, down
	status==10 {bitmap "chameleon/v1105/bitmaps/fiber-3.gif"}
	# down, down
	status==18 {bitmap "chameleon/v1105/bitmaps/fiber-2.gif"}
	# up, testing
	status==11 {bitmap "chameleon/v1105/bitmaps/fiber-4.gif"}
	# down, testing
	status==19 {bitmap "chameleon/v1105/bitmaps/fiber-4.gif"}
	# testing, testing
	status==27 {bitmap "chameleon/v1105/bitmaps/fiber-4.gif"}
	# testing, up
	status==25 {bitmap "chameleon/v1105/bitmaps/fiber-4.gif"}
} 

# Dual Fiber
class Port::3 {
	bitmap "accelar1k/v120/bitmaps/dual.gif"
	# Legend: U(p) D(own) F(ail) T(esting) S(tandby up) N(o standby link)
	# oper=up, admin=up
	status==9 {bitmap "chameleon/v1105/bitmaps/dual_US.gif"}
	# down, up
	status==17 {bitmap "chameleon/v1105/bitmaps/dual_FN.gif"}
	# up, down
	status==10 {bitmap "chameleon/v1105/bitmaps/dual_FN.gif"}
	# down, down
	status==18 {bitmap "chameleon/v1105/bitmaps/dual_DD.gif"}
	# up, testing
	status==11 {bitmap "chameleon/v1105/bitmaps/dual_TS.gif"}
	# down, testing
	status==19 {bitmap "chameleon/v1105/bitmaps/dual_TN.gif"}
	# testing, testing
	status==27 {bitmap "chameleon/v1105/bitmaps/dual_TN.gif"}
	# testing, up
	status==25 {bitmap "chameleon/v1105/bitmaps/dual_TN.gif"}
}

#type 1 LED: 100Mbps
class Led::1 {
	bitmap "chameleon/v1105/bitmaps/led.xbm"
	#statusVar {$ifOperStatus<<8 | [expr $ifSpeed/1000000]}
	status==356 {color green}
	status==456 {color green}
}

#type 2 LED: 10Mbps
class Led::2 {
	bitmap "chameleon/v1105/bitmaps/led.xbm"
	#statusVar {$ifOperStatus<<8 | [expr $ifSpeed/1000000]}
	status==266 {color green}
	status==276 {color green}
}

#type 3 LED: Full Duplex
class Led::3 {
	bitmap "chameleon/v1105/bitmaps/led.xbm"
	#statusVar {[expr $ifSpeed/1000000]}
	status==20 {color green}
	status==200 {color green}
}

#type 4 LED: Activity: how to control this?
class Led::4 {
	bitmap "chameleon/v1105/bitmaps/led.xbm"
	#statusVar {$ifOperStatus<<8 | [expr $ifSpeed/1000000]}
	status==266 {color green}
	status==276 {color green}
	status==356 {color green}
	status==456 {color green}
	status==1256 {color green}
}

#type 5 LED: 1000Mbps - Link,Phy Select
#	statusVar {$ifOperStatus<<8 | [expr $ifSpeed/1000000]}
class Led::5 {
	bitmap "chameleon/v1105/bitmaps/led.xbm"
	#statusVar {$ifOperStatus<<8 | [expr $ifSpeed/1000000]}
	# Up + 1000
	status==1256 {color green}
	status==2256 {color green}
	# Down + 1000
	status==1512 {color green}
	status==2512 {color green}
}

class Bridge {
	edit {
		{{-title "Bridge Info" -prefix dot1dBase
			-help "dmdb/chameleon/v1105/help.html#bridge_info"} {
			dot1dBaseBridgeAddress	dot1dBaseNumPorts
			dot1dBaseType
		}}
		{{-title "Bridge Port" -table -prefix dot1dBasePort
			-help "dmdb/chameleon/v1105/help.html#bridge_port"} {
			dot1dBasePortIfIndex dot1dBasePortCircuit
			dot1dBasePortDelayExceededDiscards dot1dBasePortMtuExceededDiscards
		}}
		{{-title "Spanning Tree" -prefix dot1dStp
                        -help "dmdb/chameleon/v1105/help.html#bridge_stp"} {
			dot1dStpProtocolSpecification dot1dStpPriority 
			dot1dStpTimeSinceTopologyChange dot1dStpTopChanges
			dot1dStpDesignatedRoot	dot1dStpRootCost dot1dStpRootPort
			dot1dStpMaxAge dot1dStpHelloTime dot1dStpForwardDelay
			dot1dStpBridgeMaxAge dot1dStpBridgeHelloTime 
			dot1dStpBridgeForwardDelay
		}}	
		{{-title "Transparent" -prefix dot1dTp
			-help "dmdb/chameleon/v1105/help.html#bridgeBase"} {
			dot1dTpLearnedEntryDiscards dot1dTpAgingTime
		}}
		{{-title "Forwarding" -table -prefix dot1dTpFdb
			-help "dmdb/chameleon/v1105/help.html#bridgeForwarding"} {
			dot1dTpFdbStatus dot1dTpFdbAddress dot1dTpFdbPort
		}}
	}
}

# -----------------------------------------------------------------------------

class rmon {
	menu {
        {command -label "Alarm Manager..." -underline 6 -command "dmsCreateAlarm Sess0"}
		{command -label "Alarms..." -underline 0 -command {dm_Dialog edit Alarm}}
		{command -label "History..." -underline 0 -command {dm_Dialog edit History}}
	}
	#{command -label "Hosts..." -command {dm_Dialog edit Host}}
	#{command -label "RMON Hosts..." -command {dms_RMONHost Sess0 .rmonHost}}
}


class Alarm {
	edit {
		{{-title "Alarm" -table -showTableIndex -prefix alarm
			-help "help/rmon.html#alarm"
			-delete {4 alarmStatus}} {
			alarmInterval alarmVariable alarmSampleType alarmValue
			alarmStartupAlarm alarmRisingThreshold alarmRisingEventIndex
			alarmFallingThreshold alarmFallingEventIndex alarmOwner alarmStatus
		}}
		{{-title "Event" -table -showTableIndex -prefix event
			-help "help/rmon.html#event"
			-insert {2 eventStatus 1}
			-delete {4 eventStatus}
			-help "help/rmon.html#event"} {
			eventDescription eventType eventCommunity eventLastTimeSent
			eventOwner eventStatus
		}}
		{{-title "Log" -table -showTableIndex -prefix log
			-help "help/rmon.html#log"} {
			logTime logDescription
		}}
	}
}

class History {
	edit {
		{{-title "Control" -table -showTableIndex
			-prefix historyControl
			-help "help/rmon.html#control"
			-delete {4 historyControlStatus}
			-insert {2 historyControlStatus 1}} {
			historyControlDataSource historyControlBucketsRequested
			historyControlBucketsGranted historyControlInterval
			historyControlOwner historyControlStatus
		}}
		{{-title "Ether Stats Control" -table -showTableIndex
			-help "help/rmon.html#control"
			-insert {2 etherStatsStatus 1}
			-delete {4 etherStatsStatus}
			-prefix etherStats} {
			etherStatsDataSource etherStatsStatus etherStatsOwner
		}}
	}
}

class IP {
	edit {
		{{-title "IP" -prefix ip
			 -help "help/mib2.html#ip"} {
			ipDefaultTTL ipReasmTimeout
		}}
		{{-title "IP Address" -prefix ipAdEnt -table -showTableIndex
			-help "help/mib2.html#ipAd"} {
			ipAdEntAddr ipAdEntIfIndex ipAdEntNetMask 
			ipAdEntBcastAddr ipAdEntReasmMaxSize
		}}
		{{-title "ARP" -prefix ipNetToMedia -table
			-help "help/mib2.html#arp"} {
			ipNetToMediaIfIndex ipNetToMediaPhysAddress 
			ipNetToMediaNetAddress ipNetToMediaType
		}}
	}
}



class vlan {
	menu {
		{command -label "VLANs..." -underline 0 -command "dm_Dialog edit Vlans"}
	}
}

#
# HACK - remove vlan configuration capability for now - [ET] 10/30/98
#
#               {{-title "Basic" -table -prefix rcVlan -showTableIndex
#                       -help "dmdb/chameleon/v1003/help.html#vlan"
#                       -buildCB dmsVlanBuildCB
#                       -startIndexProc dmsIgnoreVlanNull
#                       -insertCB dmsVlanInsertCB
#                       -insert {4 rcVlanRowStatus}
#                       -delete {6 rcVlanRowStatus}} {
#                       rcVlanName rcVlanColor
#                       rcVlanType rcVlanStgId
#                       rcVlanPortMembers rcVlanActiveMembers
#               }}

# XXX rcVlanSubnetAddr rcVlanSubnetMask not used until 1.1
class Vlans {
        edit {
                {{-title "Basic" -table -prefix rcVlan -showTableIndex
                        -startIndexProc dmsIgnoreVlanNull
                        -help "dmdb/chameleon/v1003/help.html#vlan"} {
                        rcVlanName rcVlanColor
                        rcVlanType rcVlanStgId
                        rcVlanPortMembers rcVlanActiveMembers
                }}
        }
}

# -----------------------------------------------------------------------------

source "$Dm_Path/dmdb/chameleon/v1105/450.tcl"
source "$Dm_Path/dmdb/chameleon/v1105/mibs/agentcap.tcl"
source "$Dm_Path/dmdb/chameleon/v1105/mibs/specific.tcl"

