# Generic Accelar Routing Switch
# (c) 1996-98 Rapid City Communications, Inc

# Containment:
# Chassis
#	Card::<type>*
#		<leds>
#		Port::<type>*
#	Power_supply

class Chassis {
	# System Attributes
	snmpVersion 2
	help "dmdb/accelar1k/v114/help.html#device"
	trapProc dmsTrapProc
	trapRegisterProc dmsTrapRegisterProc
	closeDeviceProc dmsCloseDeviceProc
	endDiscoverProc dmsEndDiscovery
	maxOidInPDU 225

	# Physical chassis attributes
	isSelect 1

	edit {
		{{-title "System" -prefix rcSys 
			-help "dmdb/accelar1k/v114/help.html#sys"} {
			sysDescr sysUpTime sysContact sysName sysLocation 
			snmpEnableAuthenTraps rcWebEnableServer {separator} 
			rcSysLastChange rcSysLastVlanChange
			rcSysLastStatisticsReset rcSysLastSaveToNVRam
			rcSysLastSaveToStandbyNVRam {separator} 
			rcSysAction rcSysResult
		}}
		{{-title "Chassis" -prefix rcChas
			-buildCB dmsChassisBuildCB
			-help "dmdb/accelar1k/v114/help.html#chas"} {
			rcChasType rcChasSerialNumber rcChasHardwareRevision rcChasNumSlots
			rcChasNumPorts rcChasTestResult rcChasFanOperStatus.1
			rcChasFanOperStatus.2 rcChasFanOperStatus.3
			rcChasPowerSupplyOperStatus.1 rcChasPowerSupplyOperStatus.2
			rcIsolateUnconfigPorts rcUseFactorySettings rcHighPriorityMode
			{separator}
			rcDeviceFlashBytesUsed rcDeviceFlashBytesFree
			rcDevicePcmciaBytesUsed rcDevicePcmciaBytesFree
			rcDeviceAction rcDeviceResult
		}}
		{{-title "Boot" -prefix rcDevice
			-buildCB dmsBootBuildCB
			-enumRules {rcDevicePrimarySource {
				flash {normal {rcDevicePrimarySourceFileName}}
				pcmcia {normal {rcDevicePrimarySourceFileName}}
				net {disabled {rcDevicePrimarySourceFileName}}
				none {disabled {rcDevicePrimarySourceFileName}}}
				rcDeviceSecondarySource {
				flash {normal {rcDeviceSecondarySourceFileName}}
				pcmcia {normal {rcDeviceSecondarySourceFileName}}
				net {disabled {rcDeviceSecondarySourceFileName}}
				none {disabled {rcDeviceSecondarySourceFileName}}}
				rcDeviceTertiarySource {
				flash {normal {rcDeviceTertiarySourceFileName}}
				pcmcia {normal {rcDeviceTertiarySourceFileName}}
				net {disabled {rcDeviceTertiarySourceFileName}}
				none {disabled {rcDeviceTertiarySourceFileName}}}
				rcDeviceConfigSource {
				flash {normal {rcDeviceConfigSourceFileName}}
				pcmcia {normal {rcDeviceConfigSourceFileName}}
				nvram {disabled {rcDeviceConfigSourceFileName}}}
			}
			-help "dmdb/accelar1k/v114/help.html#boot"} {
			rcSysVersion rcDeviceLastBootSource 
			rcDevicePrimarySource rcDevicePrimarySourceFileName
			rcDeviceSecondarySource rcDeviceSecondarySourceFileName
			rcDeviceTertiarySource rcDeviceTertiarySourceFileName
			rcDeviceConfigSource rcDeviceConfigSourceFileName
		}}
		{{-title "Flash\nFiles" -table -prefix rcDeviceFlash
			-delete {6 rcDeviceFlashRowStatus}
			-help "dmdb/accelar1k/v114/help.html#flash"} {
			rcDeviceFlashFileNum rcDeviceFlashFileName
			rcDeviceFlashFileVersion rcDeviceFlashFileType
			rcDeviceFlashFileMode rcDeviceFlashFileSize
			rcDeviceFlashFileCrc rcDeviceFlashFileStatus
		}}
		{{-title "Pcmcia\nFiles" -table -prefix rcDevicePcmcia
			-use? {$rcChasType != 2 && $rcChasType != 7 && $rcChasType != 9}
			-delete {6 rcDevicePcmciaRowStatus}
			-help "dmdb/accelar1k/v114/help.html#pcmcia"} {
		 	rcDevicePcmciaFileNum rcDevicePcmciaFileName
			rcDevicePcmciaFileVersion rcDevicePcmciaFileType
			rcDevicePcmciaFileMode rcDevicePcmciaFileSize
			rcDevicePcmciaFileCrc rcDevicePcmciaFileStatus	
		}}
		{{-title "TFTP" -prefix rcTftp -buildCB dmsTftpBuildCB
			-help "dmdb/accelar1k/v114/help.html#tftp"} {
			rcTftpHost rcTftpFile rcTftpAction rcTftpResult
		}}
		{{-title "Trap\nReceivers" -table -prefix rcSysTrapRecv
			-insertCB dmsTrapRecvInsertCB
			-insert {4 rcSysTrapRecvRowStatus}
			-delete {6 rcSysTrapRecvRowStatus}
			-help "dmdb/accelar1k/v114/help.html#traps"} {
			rcSysTrapRecvAddress rcSysTrapRecvCommunity 
			rcSysTrapRecvVersion
		}}
		{{-title "Performance" -prefix rcSys
			-help "dmdb/accelar1k/v114/help.html#perf"} {
			rcSysBufferUtil rcSysBufferUtilPeak
			rcSysCpuUtil rcSysSwitchFabricUtil rcSysNVRamSize rcSysNVRamUsed
		}}
	}

	graph {
		{{-title "System Utilization" -prefix rcSys
			-grOption {$This.g yaxis config -max 100; $This.g y2axis config -max 100}
			-help "dmdb/accelar1k/v114/help.html#perf"} {
			rcSysBufferUtil rcSysSwitchFabricUtil rcSysCpuUtil
		}}
		{{-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
		}}
		{{-title "OSPF" -prefix rcStatOspf
			-help "dmdb/accelar1k/v114/help.html#grOSPF"} {
			rcStatOspfLsdbTblSize
			rcStatOspfTxPackets 
			rcStatOspfRxPackets 
			rcStatOspfTxDropPackets 
			rcStatOspfRxDropPackets 
			rcStatOspfRxBadPackets 
			rcStatOspfSpfRuns 
			rcStatOspfBuffersAllocated 
			rcStatOspfBuffersFreed 
			rcStatOspfBufferAllocFailures 
			rcStatOspfBufferFreeFailures
		}}
	}

	menu {
		{command -label "Edit..." -command {dm_DoMenu edit Chassis}}
		{command -label "Graph..." -command {dm_DoMenu graph Chassis}}
		{separator}
		{command -label "Save to NVRAM" -command {
			dm_DoAction Sess0 {{rcSysAction.0 {} 4}}}}
		{command -label "Reset Counters" -command {
			dm_DoAction Sess0 {{rcSysAction.0 {} 5}} "Really?  This can cause monitoring\napplications to see traffic/error spike."}}
		{command -label "Reset" -command {
			if {[dmsCloseDeviceProc] != -1} {dm_DoAction Sess0 {{rcSysAction.0 {} 2}}}}}
	}

	menuedit {
		{command -label "Security..." -underline 0 -command {dm_SelectAll .chassis Chassis; dm_DoMenu edit security}}
		{command -label "Diagnostics..." -underline 0 -command {dm_SelectAll .chassis Chassis; dm_DoMenu edit diagnostics}}
		{separator}
		{command -label "Create Agent Simulator File..." -underline 0 -command {dmsCreateAgentSimulator Sess0}}
	}

	#menugraph {
		#{cascade -label "Port Summary" -menu .mBar.graph.m.portSummary -underline 0}
	#}

	# Add back in when inOctets working
	#{-text "Health Monitor" -image $Dm_Path/dmdb/accelar1k/v114/bitmaps/health.gif
	#	 -command "dmsPortSummary Up"}
	toolbar {
		{-text "Browse Device's Home Page" -image $Dm_Path/dmdb/accelar1k/v114/bitmaps/browser.gif
			 -command {dm_Browse $Dm_Pref(devName)}}
		{-text "Alarm Manager" -image $Dm_Path/bitmaps/alarm.gif
			 -command "dmsCreateAlarm Sess0"}
		{-text "VLAN Manager" -image $Dm_Path/dmdb/accelar1k/v114/bitmaps/vlan.gif
			 -command dmsExecVlanMgr}
		{-text "Save to NVRAM" -image $Dm_Path/bitmaps/save.gif
			 -command {dm_DoAction Sess0 {{rcSysAction.0 {} 4}}}
		}
	}
	#{-text "RMON Hosts" -image $Dm_Path/dmdb/accelar1k/v114/bitmaps/rmonhost.gif
	#	 -command {dms_RMONHost Sess0 .rmonHost}}

	menubar {
		{vlan {-text VLAN}}
		{routing {-text Routing}}
		{rmon {-text RMON -underline 1}}
                {tasks {-text Tasks}}
	}
}

class Card {
	isSelect 1
	edit {
		{{-title "Card" -prefix rcCard
			-help "dmdb/accelar1k/v114/help.html#card"} {
			rcCardType rcCardAdminStatus 
			rcCardOperStatus rcCardSerialNumber
			rcCardHardwareRevision rcCardPCMCIAType
			rcCardPartNumber	
		}}
	}
	indexNames {Card}
	menu {
		{command -label "Edit..." -command {dm_DoMenu edit Card}}
	}
}

# Other; treat as empty
class Card::1 {
	bitmap ""
}

# Undefined card types display 'unsupported' in their bitmap.
class Card::? {
	bitmap "accelar1k/v114/bitmaps/unsupportedcard.gif"
}

# CPU
class Card::2 {
	bitmap "accelar1k/v114/bitmaps/12xx_card.gif"
	children {cpuLed powerLed fanLed Pcmcia}
	cpuLed.positions {{188 24}}
	cpuLed.subClasses {1}
	powerLed.positions {{205 24} {224 24}}
	powerLed.instances {1 2}
	powerLed.subClasses {1 1}
	fanLed.positions {{242 24}}
	fanLed.instances {1}
	fanLed.subClasses {1}
	Pcmcia.positions {{120 22}}

	menu {
		{command -label "Edit..." -command {dm_DoMenu edit Card}}
		{separator}
		{command -label "Enable" -command {dm_DoActions 1 rcCardAdminStatus}}
		{command -label "Disable" -command {dm_DoActions 2 rcCardAdminStatus}}
	}
}

# rc8x100BaseTX
class Card::3 {
	bitmap "accelar1k/v114/bitmaps/card.gif"
	children {InServiceLed Port}
	InServiceLed.positions {{29 32}}
	Port.positions {
		{192 9} {220 9} {248 9} {276 9} {331 9} {359 9} {387 9} {415 9}
	}
	Port.subClasses {1 1 1 1 1 1 1 1}
}

# rc8x100BaseT2
class Card::4 {
	bitmap "accelar1k/v114/bitmaps/card.gif"
	children {InServiceLed Port}
	InServiceLed.positions {{29 32}}
	Port.positions {
		{192 9} {220 9} {248 9} {276 9} {331 9} {359 9} {387 9} {415 9}
	}
	Port.subClasses {1 1 1 1 1 1 1 1}
}

# rc8x100BaseF
class Card::5 {
	bitmap "accelar1k/v114/bitmaps/card.gif"
	children {InServiceLed Port}
	InServiceLed.positions {{29 32}}
	Port.positions {
		{53 9} {119 9} {185 9} {251 9} {317 9} {383 9} {449 9} {515 9}
	}
	Port.subClasses {2 2 2 2 2 2 2 2}
}

# rc16x100BaseTX
class Card::6 {
	bitmap "accelar1k/v114/bitmaps/card.gif"
	children {InServiceLed Port}
	InServiceLed.positions {{29 32}}
	Port.positions {
		{43 9} {71 9} {99 9} {127 9} {182 9} {210 9} {238 9} {266 9}
		{321 9} {349 9} {377 9} {405 9} {459 9} {487 9} {515 9} {543 9}
	}
	Port.subClasses {1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1}
}

# rc8x100BaseTXWG
class Card::12 {
	bitmap "accelar1k/v114/bitmaps/halfcard.gif"
	children {Port}
	Port.positions {
		{53 25} {81 25} {109 25} {137 25} {182 25} {210 25} {238 25} {266 25}
	}
	Port.subClasses {1 1 1 1 1 1 1 1}
}

# rc16x100BaseTXWG (16 port plus CPU (A1100 model)
class Card::13 {
	bitmap "accelar1k/v114/bitmaps/11xx_card.gif"
	children {cpuLed powerLed fanLed Port}
	cpuLed.positions {{300 24}}
	powerLed.positions {{314 24} {328 24}}
	powerLed.instances {1 2}
	fanLed.positions {{342 24}}
	fanLed.instances {1}
	Port.positions {
		{33 9} {61 9} {89 9} {117 9} {152 9} {180 9} {208 9} {236 9}
		{373 9} {401 9} {429 9} {457 9} {489 9} {517 9} {545 9} {573 9}
	}
	Port.subClasses {1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1}
}

# rc4x100BaseFWG
class Card::14 {
	bitmap "accelar1k/v114/bitmaps/halfcard.gif"
	children {Port}
	Port.positions {
		{25 25} {95 25} {165 25} {235 25}
	}
	Port.subClasses {2 2 2 2}
}

# rc12x100BaseTXWG (12 port plus CPU (A105x model)
class Card::15 {
	bitmap "accelar1k/v114/bitmaps/1050_card.gif"
	children {cpuLed powerLed fanLed Port}
	cpuLed.positions {{511 36}}
	cpuLed.subClasses {1}
	powerLed.positions {{511 18}}
	powerLed.instances {1}
	powerLed.subClasses {1}
	fanLed.positions {{511 49}}
	fanLed.instances {1}
	fanLed.subClasses {1}
	Port.positions {
		{83 20} {111 20} {139 20} {167 20}
		{230 20} {258 20} {286 20} {314 20}
		{377 20} {405 20} {433 20} {461 20}
	}
	Port.subClasses {1 1 1 1 1 1 1 1 1 1 1 1}
}

# rc16x100BaseFBB
class Card::21 {
	bitmap "accelar1k/v114/bitmaps/card.gif"
	children {InServiceLed Port}
	InServiceLed.positions {{29 32}}
	Port.positions {
		{43 15} {71 15} {99 15} {127 15} {182 15} {210 15} {238 15} {266 15}
		{321 15} {349 15} {377 15} {405 15} {459 15} {487 15} {515 15} {543 15}
	}
	Port.subClasses {4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4}
}

# rc14x100BaseTX-2x100BaseFBB
class Card::22 {
	bitmap "accelar1k/v114/bitmaps/card.gif"
	children {InServiceLed Port}
	InServiceLed.positions {{29 32}}
	Port.positions {
		{43 9} {71 9} {99 9} {127 9} {182 9} {210 9} {238 9} {266 9}
		{321 9} {349 9} {377 9} {405 9} {459 9} {487 9} {521 18} {543 18}
	}
	Port.subClasses {1 1 1 1 1 1 1 1 1 1 1 1 1 1 4 4}
}

# rc1x1000BaseSXWG
class Card::1025 {
	bitmap "accelar1k/v114/bitmaps/halfcard.gif"
	children {Port}
	Port.positions {{35 25}}
	Port.subClasses {2}
}

# rc4x1000BaseSXWG (4 port plus CPU (A1150 model)
class Card::1028 {
	bitmap "accelar1k/v114/bitmaps/11xx_card.gif"
	children {cpuLed powerLed fanLed Port}
	cpuLed.positions {{300 24}}
	powerLed.positions {{314 24} {328 24}}
	powerLed.instances {1 2}
	fanLed.positions {{342 24}}
	fanLed.instances {1}
	Port.positions {
		{33 9} {117 9} {401 9} {489 9}
	}
	Port.subClasses {2 2 2 2}
}

# rc1x1000BaseSXBB
class Card::1041 {
	bitmap "accelar1k/v114/bitmaps/card.gif"
	children {InServiceLed Port}
	InServiceLed.positions {{29 32}}
	Port.positions {{185 9}}
	Port.subClasses {2}
}

# rc2x1000BaseSXBB
class Card::1042 {
	bitmap "accelar1k/v114/bitmaps/card.gif"
	children {InServiceLed Port}
	InServiceLed.positions {{29 32}}
	Port.positions {{185 9} {383 9}}
	Port.subClasses {2 2}
}

# rc2x1000BaseSXWG
class Card::1026 {
	bitmap "accelar1k/v114/bitmaps/halfcard.gif"
	children {Port}
	Port.positions {{35 25} {165 25}}
	Port.subClasses {2 2}
}

# rc1x1000BaseLXWG
class Card::1153 {
	bitmap "accelar1k/v114/bitmaps/halfcard.gif"
	children {Port}
	Port.positions {{35 25}}
	Port.subClasses {2}
}

# rc2x1000BaseLXWG
class Card::1154 {
	bitmap "accelar1k/v114/bitmaps/halfcard.gif"
	children {Port}
	Port.positions {{35 25} {165 25}}
	Port.subClasses {2 2}
}

# rc1x1000BaseLXBB
class Card::1169 {
	bitmap "accelar1k/v114/bitmaps/card.gif"
	children {InServiceLed Port}
	InServiceLed.positions {{29 32}}
	Port.positions {{185 9}}
	Port.subClasses {2}
}

# rc2x1000BaseLXBB
class Card::1170 {
	bitmap "accelar1k/v114/bitmaps/card.gif"
	children {InServiceLed Port}
	InServiceLed.positions {{29 32}}
	Port.positions {{185 9} {383 9}}
	Port.subClasses {2 2}
}

# rc2x1000BaseXDWG
class Card::1282 {
	bitmap "accelar1k/v114/bitmaps/halfcard.gif"
	children {Port}
	Port.positions {{40 25} {170 25}}
	Port.subClasses {2 2}
}

# rc2x1000BaseXDBB
class Card::1298 {
	bitmap "accelar1k/v114/bitmaps/card.gif"
	children {InServiceLed Port}
	InServiceLed.positions {{29 32}}
	Port.positions {{185 9} {383 9}}
	Port.subClasses {2 2}
}

# rc1x1000BaseSXRWG
class Card::1537 {
	bitmap "accelar1k/v114/bitmaps/halfcard.gif"
	children {Port}
	Port.positions {{35 25}}
	Port.subClasses {3}
}

# rc2x1000BaseSXRWG
class Card::1538 {
	bitmap "accelar1k/v114/bitmaps/halfcard.gif"
	children {Port}
	Port.positions {{35 25} {165 25}}
	Port.subClasses {3 3}
}

# rc1x1000BaseSXRBB
class Card::1553 {
	bitmap "accelar1k/v114/bitmaps/card.gif"
	children {InServiceLed Port}
	InServiceLed.positions {{29 32}}
	Port.positions {{185 9}}
	Port.subClasses {3}
}

# rc2x1000BaseSXRBB
class Card::1554 {
	bitmap "accelar1k/v114/bitmaps/card.gif"
	children {InServiceLed Port}
	InServiceLed.positions {{29 32}}
	Port.positions {{185 9} {383 9}}
	Port.subClasses {3 3}
}

# rc1x1000BaseLXRWG
class Card::1665 {
	bitmap "accelar1k/v114/bitmaps/halfcard.gif"
	children {Port}
	Port.positions {{35 25}}
	Port.subClasses {3}
}

# rc2x1000BaseLXRWG
class Card::1666 {
	bitmap "accelar1k/v114/bitmaps/halfcard.gif"
	children {Port}
	Port.positions {{35 25} {165 25}}
	Port.subClasses {3 3}
}

# rc1x1000BaseLXRBB
class Card::1681 {
	bitmap "accelar1k/v114/bitmaps/card.gif"
	children {InServiceLed Port}
	InServiceLed.positions {{29 32}}
	Port.positions {{185 9}}
	Port.subClasses {3}
}

# rc2x1000BaseLXRBB
class Card::1682 {
	bitmap "accelar1k/v114/bitmaps/card.gif"
	children {InServiceLed Port}
	InServiceLed.positions {{29 32}}
	Port.positions {{185 9} {383 9}}
	Port.subClasses {3 3}
}

# Card Status Led
class cpuLed {
	bitmap "accelar1k/v114/bitmaps/led.xbm"
	statusVar rcCardOperStatus
	instanceProc dmsGetCardInst
	status==1 {color green}
	status==2 {color brown}
	status==3 {color orange}
	status==5 {color cyan}
}

# New 12xx card led
class cpuLed::1 {
	bitmap "accelar1k/v114/bitmaps/led_12xx.xbm"
	status==1 {color green}
	status==2 {color brown}
	status==3 {color orange}
	status==5 {color cyan}
}

class powerLed {
	bitmap "accelar1k/v114/bitmaps/led.xbm"
	statusVar rcChasPowerSupplyOperStatus
	status==3 {color green}
	status==4 {color red}
}

# New 12xx card led
class powerLed::1 {
	bitmap "accelar1k/v114/bitmaps/led_12xx.xbm"
	status==3 {color green}
	status==4 {color red}
}

class fanLed {
	bitmap "accelar1k/v114/bitmaps/led.xbm"
	statusVar rcChasFanOperStatus
	status==2 {color green}
	status==3 {color red}
}

# New 12xx card led
class fanLed::1 {
	bitmap "accelar1k/v114/bitmaps/led_12xx.xbm"
	status==2 {color green}
	status==3 {color red}
}

class InServiceLed {
	bitmap "accelar1k/v114/bitmaps/inserviceled.xbm"
	instanceProc dmsGetCardInst
	statusVar rcCardOperStatus
	status==1 {color green}
	status==2 {color brown}
	status==3 {color red}
}

class Pcmcia {
	bitmap "accelar1k/v114/bitmaps/empty.gif"
	instanceProc dmsGetCardInst
	statusVar rcCardPCMCIAType
	status==2 {bitmap accelar1k/v114/bitmaps/modem.gif}
	status==3 {bitmap accelar1k/v114/bitmaps/2meg.gif}
	status==4 {bitmap accelar1k/v114/bitmaps/4meg.gif}
}

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

	# rcArpExtEntDoProxy isn't instrumented

			#-buildCB dmsPortVLANBuildCB
	edit {
		{{-title "Interface" -prefix if
			-getCB dmsInterfaceGetCB
			-enumRules {rcPortAutoNegotiate {
					true {disabled {rcPortAdminDuplex rcPortAdminSpeed}}
					false {normal {rcPortAdminDuplex rcPortAdminSpeed}}
					}
			}
			-help "dmdb/accelar1k/v114/help.html#ifPort"} {
			ifIndex ifDescr ifType ifMtu ifPhysAddress ifAdminStatus ifOperStatus
			ifLastChange ifLinkUpDownTrapEnable rcPortHighPriority rcPortPerformRouting
			rcPortAction rcPortResult rcPortAutoNegotiate rcPortAdminDuplex
			rcPortOperDuplex rcPortAdminSpeed rcPortOperSpeed
		}}
		{{-title "Dual\nConnector" -prefix rcPort
			-use? {$rcPortConnectorType == 2}
			-help "dmdb/accelar1k/v114/help.html#dualPort"} {
			rcPortPrimaryConnector rcPortActiveConnector rcPortBackupConnectorStatus
		}}
		{{-title "VLAN" -prefix rcVlanPort
			-use? {$rcPortPerformRouting != 1 && $rcVlanPortVlanIds != "00"}
			-buildCB dmsVlanPortBuildCB
			-help "dmdb/accelar1k/v114/help.html#vlanPort"} {
			rcVlanPortType rcVlanPortVlanIds
			rcVlanPortDiscardTaggedFrames 
			rcVlanPortDiscardUntaggedFrames
			rcVlanPortDefaultVlanId
		}}
		{{-title "Spanning\nTree" -prefix rcStgPort -table
			-use? {$rcPortPerformRouting == 2 && $rcVlanPortVlanIds != "00"}
			-buttons {
				{-text Graph... -command "dmsSelectSTPPort $This.fCat$CatNo.t $sess"}
			}
			-startIndexProc dmsStartIndex
			-stopIndexProc dmsStopIndex
			-help "dmdb/accelar1k/v114/help.html#stgPort"} {
			rcStgPortPriority rcStgPortState rcStgPortEnableStp rcStgPortFastStart
			rcStgPortPathCost rcStgPortDesignatedRoot rcStgPortDesignatedCost
			rcStgPortDesignatedBridge rcStgPortDesignatedPort rcStgPortForwardTransitions
		}}
		{{-title "IP\nAddress" -prefix rcIpAdEnt -table
			-help "dmdb/accelar1k/v114/help.html#ipAddress"
			-startIndexProc dmsStartIndex
			-stopIndexProc dmsStopIndex
			-insertCB dmsPortIPAddrInsertCB
			-insert {4 rcIpAdEntRowStatus}
			-delete {6 rcIpAdEntRowStatus}} {
			rcIpAdEntAddr rcIpAdEntNetMask 
			rcIpAdEntBcastAddrFormat rcIpAdEntReasmMaxSize
		}}
		{{-title "IP\nConfig" -prefix rcIpConf
			-use? {$rcPortPerformRouting == 1}
			-help "dmdb/accelar1k/v114/help.html#routeConfig"} {
			rcIpConfOspfEnable rcIpConfRipEnable rcIpConfDhcpEnable
		}}
        {{-title "DHCP" -prefix rcIpConfDhcp
            -use? {$rcPortPerformRouting == 1 && $rcIpConfDhcpEnable == 1}
            -help "dmdb/accelar1k/v114/help.html#dhcp"} {
            rcIpConfDhcpMaxHop
            rcIpConfDhcpMinSec
            rcIpConfDhcpMode
        }}
		{{-title "OSPF" -prefix rcIpConfOspf
			-use? {$rcPortPerformRouting == 1 && $rcIpConfOspfEnable == 1}
			-help "dmdb/accelar1k/v114/help.html#ospf"} {
                        rcIpConfOspfHelloInterval
                        rcIpConfOspfRtrDeadInterval
                        rcIpConfOspfRtrPriority
                        rcIpConfOspfMetric
                        rcIpConfOspfAuthKey
		}}
		{{-title "RIP" -prefix rcRipExtEnt
			-use? {$rcPortPerformRouting == 1 && $rcIpConfRipEnable == 1 &&
				$rcIpConfAddrAssigned == 1}
			-help "dmdb/accelar1k/v114/help.html#rip"} {
			rcRipExtEntTalk rcRipExtEntListen rcRipExtEntPoison rcIpConfAdvertDefRte
			rcIpConfAcceptDefRte
		}}
		{{-title "ARP" -prefix rcArpExtEnt
			-use? {$rcPortPerformRouting == 1 && $rcIpConfAddrAssigned == 1}
			-help "dmdb/accelar1k/v114/help.html#arp"} {
			rcArpExtEntDoProxy rcArpExtEntDoResp
		}}
		{{-title "Test" -prefix ifTest
			-buildCB dmsTestBuildCB
			-help "dmdb/accelar1k/v114/help.html#test"} {
			ifTestType ifTestId ifTestResult ifTestCode rcTestExtPassCount
			rcTestExtFailCount
		}}
	}
	indexNames {Port}
	indexNamesProc dmsIndexPort

	# The following counters aren't applicable for the ethernet interfaces:
	# 	ifOutErrors,
	# The following counters aren't avaliable:
	# 	ifOutDiscards, etherStatsJabbers, etherStatsDropEvents, etherStatsPkts<size>
	#	etherHistoryJabbers 
	graph {
		{{-title "Interface" -prefix ifHC
			-help "help/mib2.html#graphIf"} {
			ifHCInOctets ifHCOutOctets ifHCInUcastPkts ifHCOutUcastPkts ifHCInMulticastPkts
			ifHCOutMulticastPkts ifHCInBroadcastPkts ifHCOutBroadcastPkts ifInDiscards
			ifInErrors ifInUnknownProtos
		}}
		{{-title "Ethernet\nErrors" -prefix dot3Stats
			-help "help/ether.html#error"} {
			dot3StatsAlignmentErrors dot3StatsFCSErrors dot3StatsInternalMacTransmitErrors
			dot3StatsInternalMacReceiveErrors dot3StatsCarrierSenseErrors
			dot3StatsFrameTooLongs dot3StatsSQETestErrors dot3StatsDeferredTransmissions
			dot3StatsSingleCollisionFrames dot3StatsMultipleCollisionFrames
			dot3StatsLateCollisions dot3StatsExcessiveCollisions rcStatFrameTooShorts
			rcStatGigLinkFailures rcStatGigPacketErrors rcStatGigCarrierErrors
			rcStatGigLinkInactiveErrors rcStatGigInFlowCtrlPkts rcStatGigOutFlowCtrlPkts
		}}
		{{-title "Bridging" -prefix rcStatBridge
			-help "dmdb/accelar1k/v114/help.html#grBridgePort"} {
			rcStatBridgeInUnicastFrames rcStatBridgeInMulticastFrames
			rcStatBridgeInBroadcastFrames rcStatBridgeInDiscards       
			rcStatBridgeOutUnicastFrames  rcStatBridgeOutMulticastFrames 
			rcStatBridgeOutBroadcastFrames  
		}}
		{{-title "Routing" -prefix rcStatRoute 
			-help "help/route.html#grRoutePort" } {
			rcStatRouteInUnicastFrames rcStatRouteInMulticastFrames rcStatRouteInDiscards
			rcStatRouteOutUnicastFrames rcStatRouteOutMulticastFrames
		}}
		{{-title "OSPF" -prefix rcStatOspfIf
			-use? {$rcPortPerformRouting == 1 && $rcIpConfOspfEnable == 1}
			-help "dmdb/accelar1k/v114/help.html#grOSPFPort"} {
			rcStatOspfIfVersionMismatches rcStatOspfIfAreaMismatches
			rcStatOspfIfAuthTypeMismatches rcStatOspfIfAuthFailures
			rcStatOspfIfNetMaskMismatches rcStatOspfIfHelloIntervalMismatches
			rcStatOspfIfDeadIntervalMismatches rcStatOspfIfOptionMismatches
			rcStatOspfIfRxHellos rcStatOspfIfRxDBDescrs rcStatOspfIfRxLSUpdates
			rcStatOspfIfRxLSReqs rcStatOspfIfRxLSAcks rcStatOspfIfTxHellos
			rcStatOspfIfTxDBDescrs rcStatOspfIfTxLSUpdates rcStatOspfIfTxLSReqs
			rcStatOspfIfTxLSAcks
		}}
		{{-title "RMON" -prefix etherStats
			-useProc? dmsCheckRmonStats
			-cvtProc dmsCvtIfIndex2RmonIndex
			-help "help/rmon.html#traffic"} {
			etherStatsOctets etherStatsPkts etherStatsBroadcastPkts etherStatsMulticastPkts
			etherStatsCRCAlignErrors etherStatsUndersizePkts etherStatsOversizePkts
			etherStatsFragments etherStatsCollisions
		}}
		{{-title "RMON\nHistory" 
			-useProc? dmsCheckRmonHistory
			-help "help/rmon.html#history" 
			-table -showTableIndex
			-buildCB dmsRmonHistoryBuildCB
			-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}}
		{separator}
		{command -label "Enable FastStart" -command {dmsToolsFastStart 1}}
		{command -label "Disable FastStart" -command {dmsToolsFastStart 2}}
		{separator}
		{command -label "Enable RMON Stats" -command {dmsRmonEnableStat}}
		{command -label "Enable RMON History" -command {dmsRmonEnableHistory}}
	}
}

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

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

# Dual Fiber
class Port::3 {
	statusVar {$rcPortBackupConnectorStatus<<8|$rcPortActiveConnector<<6|$ifOperStatus<<3|$ifAdminStatus}
	bitmap "accelar1k/v114/bitmaps/dual.gif"

	# Legend: U(p) D(own) F(ail) T(esting) S(tandby up) N(o standby link)
	status==585 {bitmap "accelar1k/v114/bitmaps/dual_UN.gif"}
	status==649 {bitmap "accelar1k/v114/bitmaps/dual_NU.gif"}
	status==329 {bitmap "accelar1k/v114/bitmaps/dual_US.gif"}
	status==393 {bitmap "accelar1k/v114/bitmaps/dual_SU.gif"}
	status==337 {bitmap "accelar1k/v114/bitmaps/dual_FN.gif"}
	status==330 {bitmap "accelar1k/v114/bitmaps/dual_FN.gif"}
	status==401 {bitmap "accelar1k/v114/bitmaps/dual_NF.gif"}
	status==394 {bitmap "accelar1k/v114/bitmaps/dual_NF.gif"}
	status==402 {bitmap "accelar1k/v114/bitmaps/dual_DD.gif"}
	status==338 {bitmap "accelar1k/v114/bitmaps/dual_DD.gif"}
	status==594 {bitmap "accelar1k/v114/bitmaps/dual_DD.gif"}
	status==658 {bitmap "accelar1k/v114/bitmaps/dual_DD.gif"}
	status==347 {bitmap "accelar1k/v114/bitmaps/dual_TS.gif"}
	status==331 {bitmap "accelar1k/v114/bitmaps/dual_TS.gif"}
	status==339 {bitmap "accelar1k/v114/bitmaps/dual_TS.gif"}
	status==411 {bitmap "accelar1k/v114/bitmaps/dual_NT.gif"}
	status==603 {bitmap "accelar1k/v114/bitmaps/dual_TN.gif"}
	status==587 {bitmap "accelar1k/v114/bitmaps/dual_TN.gif"}
	status==595 {bitmap "accelar1k/v114/bitmaps/dual_TN.gif"}
	status==667 {bitmap "accelar1k/v114/bitmaps/dual_NT.gif"}
	status==651 {bitmap "accelar1k/v114/bitmaps/dual_NT.gif"}
	status==659 {bitmap "accelar1k/v114/bitmaps/dual_NT.gif"}
 	status==593 {bitmap "accelar1k/v114/bitmaps/dual_FN.gif"}
 	status==657 {bitmap "accelar1k/v114/bitmaps/dual_NF.gif"}
}

# MT-RJ Fiber
class Port::4 {
	bitmap "accelar1k/v114/bitmaps/mtrj.gif"
	# oper=up, admin=up
	status==9 {bitmap "accelar1k/v114/bitmaps/mtrj-1.gif"}
	# down, up
	status==17 {bitmap "accelar1k/v114/bitmaps/mtrj-3.gif"}
	# up, down
	status==10 {bitmap "accelar1k/v114/bitmaps/mtrj-3.gif"}
	# down, down
	status==18 {bitmap "accelar1k/v114/bitmaps/mtrj-2.gif"}
	# up, testing
	status==11 {bitmap "accelar1k/v114/bitmaps/mtrj-4.gif"}
	# down, testing
	status==19 {bitmap "accelar1k/v114/bitmaps/mtrj-4.gif"}
	# testing, testing
	status==27 {bitmap "accelar1k/v114/bitmaps/mtrj-4.gif"}
	# testing, up
	status==25 {bitmap "accelar1k/v114/bitmaps/mtrj-4.gif"}
} 

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

# End of Physical Classes.  The following are edit/graph components accessible
# from the menubar.

class security {
	edit {
		{{-title "SNMP" -prefix rcSysComm
			-help "dmdb/accelar1k/v114/help.html#comm"} {
			rcSysCommReadWriteAll rcSysCommReadWrite 
			rcSysCommReadOnly
		}}
		{{-title "Web" -prefix rcWeb -use? {$rcWebEnableServer == 1}
			-help "dmdb/accelar1k/v114/help.html#web"} {
			rcWebRWAUserName rcWebRWAPassword rcWebRWUserName rcWebRWPassword
			rcWebROUserName rcWebROPassword {separator} rcWebLastChange rcWebNumHits
			rcWebNumAccessChecks rcWebNumAccessBlocks rcWebNumRxErrors
			rcWebNumTxErrors rcWebNumSetRequest
		}}
	}
}

class diagnostics {
	edit {
		{{-title "Test" -prefix ifTest
			-buildCB dmsTestDiagBuildCB
			-help "dmdb/accelar1k/v114/help.html#test"} {
			ifTestType ifTestId ifTestResult ifTestCode rcTestExtPassCount
			rcTestExtFailCount
		}}
		{{-title "Port Mirror" -prefix rcMirrorByPort
			-help "dmdb/accelar1k/v114/help.html#mirror"} {
			rcMirrorByPortEnable rcMirrorByPortMirrorPort
			rcMirrorByPortEnableMirroredPortOne rcMirrorByPortMirroredPortOne
			rcMirrorByPortEnableMirroredPortTwo rcMirrorByPortMirroredPortTwo
			rcMirrorSaveConfig
		}}
		{{-title "Error" -prefix rcError
			-help "dmdb/accelar1k/v114/help.html#error"} {
			rcErrorSendTrap rcErrorCode rcErrorLevel
		}}
		{{-title "AR Stats" -prefix rcTblAr
			-help "dmdb/accelar1k/v114/help.html#arStats"} {
			rcTblArTblSize rcTblArFree rcTblArNoSpace rcTblArAdded
			rcTblArDeleted rcTblArMacAdded rcTblArMacDeleted rcTblArMacMoved
			rcTblArIpAdded rcTblArIpDeleted rcTblArMcastTblSize
			rcTblArFreeMcastGroups rcTblArIpMcastAdded rcTblArIpMcastDeleted
			rcTblArVlanByPortAdded rcTblArVlanByPortDeleted
			rcTblArVlanByProtocolAdded rcTblArVlanByProtocolDeleted
			rcTblArVlanByIpSubnetAdded rcTblArVlanByIpSubnetDeleted
			rcTblArIpSubnetsAdded rcTblArIpSubnetsDeleted rcTblArRsvpsAdded
			rcTblArRsvpsDeleted
		}}
	}
}

# XXX Needs more work; only Gig ports count accurately!
class portSummary {
	menu {
		{command -label "Up Ports..." -command {dmsPortSummary Up} -underline 0}
		{command -label "Selected Ports..." -command {dmsPortSummary Selected} -underline 0}
	}
	graph {
		{{-title "Summary" -rotate
			-help "dmdb/accelar1k/v114/help.html#portSummary"} {
			{round(($ifInOctets+$ifOutOctets)/$ifSpeed*800)}
		}}
	}
	indexNamesProc dmsIndexPort
}

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

class vlan {
	menu {
		{command -label "VLANs..." -underline 0 -command "dm_Dialog edit Vlans"}
		{command -label "Stg (Spanning Tree Groups)..." -underline 0 -command "dm_Dialog edit Stg"}
		{separator}
		{command -label "VLAN Manager..." -underline 1 -command dmsExecVlanMgr}
	}
}

# XXX rcVlanSubnetAddr rcVlanSubnetMask not used until 1.1
class Vlans {
	edit {
		{{-title "Basic" -table -prefix rcVlan -showTableIndex
			-help "dmdb/accelar1k/v114/help.html#vlan"
			-buttons {
				{-text Bridging... -command "dmsVlanSelectBridge $This.fCat$CatNo.t $sess"}
				{-text IP... -command "dmsVlanSelectRouting $This.fCat$CatNo.t $sess"}
			}
			-buildCB dmsVlanBuildCB
			-startIndexProc dmsIgnoreVlanNull
			-insertCB dmsVlanInsertCB
			-insert {4 rcVlanRowStatus}
			-delete {6 rcVlanRowStatus}} {
			rcVlanName rcVlanColor 
			rcVlanType rcVlanStgId 
			rcVlanPortMembers rcVlanActiveMembers
			rcVlanStaticMembers rcVlanNotAllowToJoin 
			rcVlanProtocolId rcVlanRoutingEnable rcVlanIfIndex
		}}
		{{-title "Advanced" -table -prefix rcVlan -showTableIndex
			-startIndexProc dmsIgnoreVlanNull
			-help "dmdb/accelar1k/v114/help.html#vlan"} {
			rcVlanName rcVlanHighPriority rcVlanIfIndex
			rcVlanAgingTime rcVlanMacAddress rcVlanAction rcVlanResult 
		}}
	}
}

class Stg {
	edit {
		{{-title "Configuration" -table -prefix rcStg -showTableIndex
			-help "dmdb/accelar1k/v114/help.html#stgConfig"
			-insert {4 rcStgRowStatus}
			-insertCB dmsStgInsertCB
			-delete {6 rcStgRowStatus}} {
			rcStgPriority rcStgBridgeMaxAge rcStgBridgeHelloTime
			rcStgBridgeForwardDelay rcStgEnableStp rcStgStpTrapEnable
			rcStgTaggedBpduAddress rcStgTaggedBpduVlanId rcStgPortMembers
		}}
		{{-title "Status" -table -prefix rcStg -showTableIndex
			-help "dmdb/accelar1k/v114/help.html#stgStatus"} {
			rcStgBridgeAddress rcStgNumPorts rcStgProtocolSpecification
			rcStgTimeSinceTopologyChange rcStgTopChanges rcStgDesignatedRoot
			rcStgRootCost rcStgRootPort rcStgMaxAge rcStgHelloTime rcStgHoldTime
			rcStgForwardDelay
		}}
	}
}

class Vlan_IP {
	edit {
		{{-title "IP\nAddress" -prefix rcIpAdEnt -table
			-help "dmdb/accelar1k/v114/help.html#ipAddress"
			-startIndexProc dmsStartIndex
			-stopIndexProc dmsStopIndex
			-insertCB dmsIPAddrInsertCB
			-insert {4 rcIpAdEntRowStatus}
			-delete {6 rcIpAdEntRowStatus}} {
			rcIpAdEntAddr rcIpAdEntNetMask 
			rcIpAdEntBcastAddrFormat rcIpAdEntReasmMaxSize
		}}
		{{-title "IP\nConfig" -prefix rcIpConf
			-useProc? dmsCheckUseIPConfig
			-help "dmdb/accelar1k/v114/help.html#routeConfig"} {
			rcIpConfOspfEnable rcIpConfRipEnable rcIpConfDhcpEnable
		}}       
        {{-title "DHCP" -prefix rcIpConfDhcp
            -use? {$rcIpConfDhcpEnable == 1}
            -help "dmdb/accelar1k/v114/help.html#dhcp"} {
            rcIpConfDhcpIfIndex rcIpConfDhcpMaxHop rcIpConfDhcpMinSec rcIpConfDhcpMode
        }}
		{{-title "OSPF" -prefix rcIpConfOspf
			-use? {$rcIpConfOspfEnable == 1}
			-help "dmdb/accelar1k/v114/help.html#ospf"} {
			rcIpConfOspfHelloInterval rcIpConfOspfRtrDeadInterval rcIpConfOspfRtrPriority
			rcIpConfOspfMetric rcIpConfOspfAuthKey
		}}
		{{-title "RIP" -prefix rcRipExtEnt
			-use? {$rcIpConfRipEnable == 1}
			-help "dmdb/accelar1k/v114/help.html#rip"} {
			rcRipExtEntTalk rcRipExtEntListen rcRipExtEntPoison
			rcIpConfAdvertDefRte rcIpConfAcceptDefRte
		}}
		{{-title "ARP" -prefix rcArpExtEnt
			-help "dmdb/accelar1k/v114/help.html#arp"} {
			rcArpExtEntDoProxy rcArpExtEntDoResp
		}}
	}
}

class Bridge {
	edit {
		{{-title "Transparent" -prefix dot1dTp
			-help "dmdb/accelar1k/v114/help.html#bridgeBase"} {
			dot1dTpLearnedEntryDiscards dot1dTpAgingTime
		}}
		{{-title "Forwarding" -table
			-prefix rcBridgeFdb
			-buildCB dmsBridgeForwardingBuildCB
			-help "dmdb/accelar1k/v114/help.html#bridgeForwarding"} {
			rcBridgeFdbStatus rcBridgeFdbAddress rcBridgeFdbPort
			rcBridgeFdbMonitor rcBridgeFdbPriority
		}}
		{{-title "Static" -table -prefix rcBridgeStatic
			-insert {3 rcBridgeStaticStatus}
			-insertCB dmsBridgeStaticInsertCB
			-delete {2 rcBridgeStaticStatus}
			-help "dmdb/accelar1k/v114/help.html#bridgeStatic"} {
			rcBridgeStaticAddress rcBridgeStaticPort rcBridgeStaticMonitor
			rcBridgeStaticPriority rcBridgeStaticStatus
		}}
		{{-title "Filter" -table -prefix rcBridgeFilter
			-insertCB dmsBridgeFilterInsertCB
			-insert {3 rcBridgeFilterStatus}
			-delete {2 rcBridgeFilterStatus}
			-help "dmdb/accelar1k/v114/help.html#bridgeFilter"} {
			rcBridgeFilterAddress rcBridgeFilterPort 
			rcBridgeFilterNotAllowedFrom rcBridgeFilterStatus
		}}
	}
}

class SpanningTree {
	graph {
		{{-title "Port" -prefix rcStgPort
			-help "dmdb/accelar1k/v114/help.html#grSpanTree"} {
			rcStgPortForwardTransitions rcStgPortInConfigBpdus rcStgPortInTcnBpdus
			rcStgPortInBadBpdus rcStgPortOutConfigBpdus rcStgPortOutTcnBpdus
		}}
	}
}

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

class rmon {
	menu {
		{command -label "Options..." -underline 0 -command "dm_Dialog edit RmonOptions"}
		{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 RmonOptions {
	edit {
		{{-title "Options" -prefix rcSysRmon
			-help "dmdb/accelar1k/v114/help.html#rmon"} {
			rcSysRmonEnable rcSysRmonSaveConfig rcSysRmonTrapOption
			rcSysRmonMemSize
		}}
	}
}

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
			-buildCB dmsRmonEtherBuildCB
			-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"
			-buildCB dmsRmonControlBuildCB
			-delete {4 historyControlStatus}
			-insert {2 historyControlStatus 1}} {
			historyControlDataSource historyControlBucketsRequested
			historyControlBucketsGranted historyControlInterval
			historyControlOwner historyControlStatus
		}}
		{{-title "Ether Stats Control" -table -showTableIndex
			-buildCB dmsRmonEtherBuildCB
			-delete {4 etherStatsStatus}
			-insert {2 etherStatsStatus 1}
			-help "help/rmon.html#traffic"
			-prefix etherStats} {
			etherStatsDataSource etherStatsStatus etherStatsOwner
		}}
	}
}

# XXX Agent doesn't support host table yet.
class Host {
	edit {
		{{-title "Host Control" -table -showTableIndex -prefix hostControl
			-delete {4 hostControlStatus}
			-insert {2 hostControlStatus}} {
			hostControlDataSource hostControlTableSize
			hostControlLastDeleteTime hostControlOwner
		}}
		{{-title "Host" -table -showTableIndex -prefix hostTime} {
			hostTimeAddress hostTimeInPkts hostTimeOutPkts
			hostTimeInOctets hostTimeOutOctets hostTimeOutErrors
			hostTimeOutBroadcastPkts hostTimeOutMulticastPkts
		}}
	}
	graph {
		{{-title "Hosts" -prefix host} {
			hostInPkts hostOutPkts hostInOctets hostOutOctets
			hostOutErrors hostOutBroadcastPkts hostOutMulticastPkts
		}}
	}
}

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

class routing {
	menu {
		{command -label "IP..." -underline 0 -command {dm_Dialog edit IP}}
		{command -label "RIP..." -underline 0 -command {dm_Dialog edit RIP}}
		{command -label "OSPF..." -underline 0 -command {dm_Dialog edit OSPF}}
		{command -label "DHCP..." -underline 0 -command {dm_Dialog edit DHCP}}
	}
}

class IP {
	edit {
		{{-title "IP" -prefix ip
			-help "help/mib2.html#ip"} {
			ipDefaultTTL ipReasmTimeout rcArpExtLifeTime
		}}
		{{-title "IP Address" -prefix ipAdEnt -table
			-buildCB dmsARPBuildCB
			-bulk rcTblIpAddrSize.0
			-help "help/mib2.html#ipAd"} {
			ipAdEntAddr ipAdEntIfIndex ipAdEntNetMask 
			ipAdEntBcastAddr ipAdEntReasmMaxSize
		}}
		{{-title "IP Route" -prefix rcIpRoute -table
			-bulk rcTblIpForwardingSize.0
			-help "help/mib2.html#ipRoute"
			-buildCB dmsARPBuildCB
			-insertCB dmsRouteInsertCB
			-delete {6 rcIpRouteRowStatus}
			-insert {4 rcIpRouteRowStatus}} {
			rcIpRouteDest rcIpRouteMask 
			rcIpRouteIfIndex rcIpRouteNextHop 
			rcIpRouteType rcIpRouteProto 
			rcIpRouteAge rcIpRouteMetric
		}}
		{{-title "IP Flow" -prefix rcIpFlow -table
			-help "dmdb/accelar1k/v114/help.html#ipFlow"
			-delete {6 rcIpFlowRowStatus}
			-insert {4 rcIpFlowRowStatus}} {
			rcIpFlowSrcIpAddress rcIpFlowSrcIpPort rcIpFlowDstIpAddress
			rcIpFlowDstIpPort rcIpFlowProtocol 
		}}
		{{-title "ARP" -prefix ipNetToMedia -table 
			-bulk rcTblIpNetToMediaSize.0
			-help "help/mib2.html#arp"
			-delete {2 ipNetToMediaType}
			-buildCB dmsARPBuildCB
			-insertCB dmsARPInsertCB
			-insert {4 ipNetToMediaType}} {
			ipNetToMediaIfIndex ipNetToMediaPhysAddress ipNetToMediaNetAddress
			ipNetToMediaType
		}}
	}
}

class RIP {
	edit {
		{{-title "Globals" -prefix rip2Global
			-help "help/rip.html#globals"} {
			rcRipExtOperation rcRipExtUpdateTime rip2GlobalRouteChanges
			rip2GlobalQueries
		}}
		{{-title "Interface\nStatus" -prefix rip2IfStat -table
			-help "help/rip.html#ifStatus"} {
			rip2IfStatAddress rip2IfStatRcvBadPackets rip2IfStatRcvBadRoutes
			rip2IfStatSentUpdates
		}}
		{{-title "Interface\nConfiguration" -prefix rip2IfConf -table
			-help "help/rip.html#ifConfig"} {
			rip2IfConfAddress rip2IfConfDomain rip2IfConfAuthType
			rip2IfConfAuthKey rip2IfConfSend rip2IfConfReceive
		}}
		{{-title "Redistribute" -prefix rcIpRoutingRedistribute
			-help "dmdb/accelar1k/v114/help.html#ripredist"
			-enumRules {rcIpRoutingRedistributeOspfToRipEnable {
					true {normal {rcIpRoutingRedistributeOspfToRipUseExplicitMetric
								rcIpRoutingRedistributeOspfToRipExplicitMetric}}
					false {disabled {rcIpRoutingRedistributeOspfToRipUseExplicitMetric
								rcIpRoutingRedistributeOspfToRipExplicitMetric}}
					}
			}
		} {
			rcIpRoutingRedistributeOspfToRipEnable
			rcIpRoutingRedistributeOspfToRipUseExplicitMetric
			rcIpRoutingRedistributeOspfToRipExplicitMetric
			{separator}
			rcIpRoutingRedistributeDirectToRipEnable
			{separator}
			rcIpRoutingRedistributeStaticToRipEnable
		}}
	}
}

class OSPF {
	edit {
		{{-title "General" -prefix ospf -help "help/ospf.html#general"} {
			ospfRouterId ospfAdminStat ospfVersionNumber 
			ospfAreaBdrRtrStatus ospfASBdrRtrStatus ospfExternLSACount 
			ospfExternLSACksumSum ospfOriginateNewLSAs ospfRxNewLSAs
			rcIpConfOspfDefaultMetric10MegPort
			rcIpConfOspfDefaultMetric100MegPort
			rcIpConfOspfDefaultMetric1000MegPort
                        rcIpConfOspfTrapEnable
                        rcIpConfOspfAutoVirtLinkEnable
                        rcStatOspfLastSpfRun
		}}
		{{-title "Area" -prefix ospfArea -table
			-help "help/ospf.html#area"
			-delete {2 ospfAreaStatus}
			-insert {1 ospfAreaStatus}} {
			ospfAreaId ospfAuthType ospfImportASExtern ospfSpfRuns
			ospfAreaBdrRtrCount ospfASBdrRtrCount ospfAreaLSACount
			ospfAreaLSACksumSum 
		}}
		{{-title "Area\nRange" -prefix ospfArea -table
			-help "help/ospf.html#areaRange"
			-delete {2 ospfAreaRangeStatus}
			-insert {1 ospfAreaRangeStatus}} {
			ospfAreaRangeAreaID ospfAreaRangeNet ospfAreaRangeMask
		}}
		{{-title "Stub Area\nMetric" -prefix ospfStub -table
			-help "help/ospf.html#stubAreaMetric"} {
			ospfStubAreaID ospfStubTOS ospfStubMetric ospfStubStatus
		}}
		{{-title "Interface" -prefix ospfIf -table
			-help "help/ospf.html#interface"} {
			ospfIfIpAddress ospfAddressLessIf ospfIfAreaId ospfIfType
			ospfIfAdminStat ospfIfRtrPriority ospfIfTransitDelay
			ospfIfRetransInterval ospfIfHelloInterval ospfIfRtrDeadInterval
			ospfIfPollInterval ospfIfState ospfIfDesignatedRouter
			ospfIfBackupDesignatedRouter ospfIfEvents ospfIfAuthKey
		}}
		{{-title "Interface\nMetric" -prefix ospfIfMetric -table
			-help "help/ospf.html#interfaceMetric"
			-delete {2 ospfIfMetricStatus}
			-insert {1 ospfIfMetricStatus}} {
			ospfIfMetricIpAddress ospfIfMetricAddressLessIf ospfIfMetricTOS
			ospfIfMetricMetric 
		}}
		{{-title "Neighbor" -prefix ospfNbr -table
			-help "help/ospf.html#neighbor"} {
			ospfNbrIpAddr ospfNbrAddressLessIndex ospfNbrRtrId ospfNbrOptions 
			ospfNbrPriority ospfNbrState ospfNbrEvents ospfNbrLSRetransQLen 
			ospfNBMANbrStatus
		}}
		{{-title "Virtual\nInterface" -prefix ospfVirtIf -table
			-help "help/ospf.html#virtualInterface"
			-delete {2 ospfVirtIfStatus}
			-insert {1 ospfVirtIfStatus}} {
			ospfVirtIfAreaID ospfVirtIfNeighbor ospfVirtIfTransitDelay
			ospfVirtIfRetransInterval ospfVirtIfHelloInterval
			ospfVirtIfRtrDeadInterval ospfVirtIfState ospfVirtIfEvents 
			ospfVirtIfAuthKey
		}}
		{{-title "Virtual\nNeighbor" -prefix ospfVirtNbr -table
			-help "help/ospf.html#virtualNeighbor"} {
			ospfVirtNbrArea ospfVirtNbrRtrId ospfVirtNbrIpAddr
			ospfVirtNbrOptions ospfVirtNbrState ospfVirtNbrEvents
			ospfVirtNbrLSRetransQLen
		}}
		{{-title "Host" -prefix ospfHost -table
			-help "help/ospf.html#host"
			-delete {2 ospfHostStatus}
			-insert {1 ospfHostStatus}} {
			ospfHostIpAddress ospfHostTOS ospfHostMetric
		}}
		{{-title "Link State\nDatabase" -prefix ospfLsdb -table
			-bulk rcStatOspfLsdbTblSize.0
			-help "help/ospf.html#linkStateDB"} {
			ospfLsdbAreaId ospfLsdbType ospfLsdbLSID ospfLsdbRouterId
			ospfLsdbSequence ospfLsdbAge ospfLsdbChecksum 
		}}
		{{-title "Redistribute"
			-prefix rcIpRoutingRedistribute
			-help "dmdb/accelar1k/v114/help.html#ospfredist"
			-use? {$ospfASBdrRtrStatus == 1}
		} {
			rcIpRoutingRedistributeRipToOspfEnable
			rcIpRoutingRedistributeRipToOspfUseExplicitMetric
			rcIpRoutingRedistributeRipToOspfExplicitMetric
			rcIpRoutingRedistributeRipToOspfExternalMetricType
			{separator}
			rcIpRoutingRedistributeDirectToOspfEnable
			rcIpRoutingRedistributeDirectToOspfMethod
			rcIpRoutingRedistributeDirectToOspfExplicitMetric
			rcIpRoutingRedistributeDirectToOspfExternalMetricType
			{separator}
			rcIpRoutingRedistributeStaticToOspfEnable
			rcIpRoutingRedistributeStaticToOspfUseExplicitMetric
			rcIpRoutingRedistributeStaticToOspfExplicitMetric
			rcIpRoutingRedistributeStaticToOspfExternalMetricType
			rcIpRoutingRedistributeStaticToOspfAdvertDefRte
		}}
	}
}

class DHCP {
    edit {
        {{-title "Globals" -prefix rcIpDhcpForward -table
            -help "dmdb/accelar1k/v114/help.html#dhcpglobals"
            -delete {6 rcIpDhcpForwardRowStatus}
            -insert {4 rcIpDhcpForwardRowStatus}} {
            rcIpDhcpForwardAgentAddr rcIpDhcpForwardServerAddr
            rcIpDhcpForwardEnable rcIpDhcpForwardMode
        }}
    }
}

class tasks {
        menu {
                {cascade -label "FastStart on Selected Ports" -menu .mBar.tasks.m.fastStart -underline 0}
        }
}

class fastStart {
        menu {
                {command -label Enable -underline 0 -command {dmsToolsFastStart 1}}
                {command -label Disable -underline 0 -command {dmsToolsFastStart 2}}
        }
}


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

source "$Dm_Path/dmdb/accelar1k/v114/first.tcl"
source "$Dm_Path/dmdb/accelar1k/v114/mibs/agentcap.tcl"
source "$Dm_Path/dmdb/accelar1k/v114/mibs/specific.tcl"
