# (c) Rapid-City Communications, Inc

# This file is used to annotate the mibs with extra attributes that allows DM to
# handle device-specific cases.  It was (very) loosely based on the Agent Capabilities
# table in the now discontined SNMPV2 admin model.
# (We also keep our MIB descriptor aliases here.)

global Dm_AgentCap Dm_Alias DmDMS

array set Dm_Alias {
ifInDiscards		InDiscards
ifOutDiscards		OutDiscards
ifInErrors		InErrors
ifOutErrors		OutErrors
ifInUnknownProtos	InUnknownProtos
ifLinkUpDownTrapEnable	LinkTrap
ifSpeed			Speed
ipAdEntIfIndex		Interface
ipNetToMediaIfIndex	Interface
ipRouteIfIndex		Interface
ipNetToMediaPhysAddress MacAddress
ipNetToMediaNetAddress	IpAddress
ipRouteMetric1		HopOrMetric
rcIpRouteIfIndex	Interface
rcIpRouteMetric		HopOrMetric
snmpEnableAuthenTraps	AuthenticationTraps
etherStatsPkts64Octets	"<= 64"
etherStatsPkts65to127Octets	"> 64"
etherStatsPkts128to255Octets	"> 127"
etherStatsPkts256to511Octets	"> 255"
etherStatsPkts512to1023Octets	"> 511"
etherStatsPkts1024to1518Octets	"> 1023"
etherStatsDataSource	Port
historyControlDataSource	Port
ospfAuthType		AuthType
ospfImportASExtern	ImportASExtern
ospfSpfRuns		SpfRuns
ospfASBdrRtrCount	ASBdrRtrCount
ospfAddressLessIf	AddressLessIf
ospfNBMANbrStatus	NBMANbrStatus
rcStatOspfLastSpfRun	LastSpfRun
rcSysTrapRecvAddress	IpAddress
rcIpConfAdvertDefRte	AdvertiseDefaultRoute
rcIpConfAcceptDefRte	AcceptDefaultRoute
rcBridgeFdbAddress	MacAddress
rcBridgeStaticAddress	MacAddress
rcBridgeFilterAddress	MacAddress
rcPortHighPriority	HighPriority
rcPortPerformRouting	Routing
rcPortAction		Action
rcPortResult		LastResult
rcIsolateUnconfigPorts  IsolateUnconfigPorts
rcUseFactorySettings	UseFactorySettings
rcWebEnableServer	EnableWebServer
rcErrorCode		LastErrorCode
rcErrorLevel		LastErrorSeverity
rcRipExtOperation	Operation
rcRipExtUpdateTime	UpdateTime
rcArpExtLifeTime	ARPLifeTime
rcTestExtPassCount	PassCount
rcTestExtFailCount	FailCount
rcMirrorByPort		Enable
rcIpAdEntAddr		IpAddress
rcVlanRoutingEnable	Routing
rcSysVersion		SwVersion
rcPingTTL		TimeToLive
rcPingRTD		RoundTripDelay
rcMirrorSaveConfig	SaveConfig
rcSysOspfTrapEnable     TrapEnable
rcPortAutoNegotiate	AutoNegotiate
rcPortAdminDuplex	AdminDuplex
rcPortOperDuplex	OperDuplex
rcPortAdminSpeed	AdminSpeed
rcPortOperSpeed		OperSpeed
rcStatFrameTooShorts				 FrameTooShorts
rcStatGigLinkFailures				 LinkFailures
rcStatGigPacketErrors				 PacketErrors
rcStatGigCarrierErrors				 CarrierErrors
rcStatGigLinkInactiveErrors			 LinkInactiveErrors
rcStatGigInFlowCtrlPkts 			 InFlowCtrlPkts
rcStatGigOutFlowCtrlPkts			 OutFlowCtrlPkts
rcIpConfOspfTrapEnable				 TrapEnable
rcIpConfOspfAutoVirtLinkEnable			 AutoVirtLinkEnable
rcIpConfOspfExternalMetricType			 ExternalMetricType
rcIpConfOspfRtrPriority				 DesigRtrPriority
rcIpConfOspfDefaultMetric10MegPort		 10MbpsPortDefaultMetric 
rcIpConfOspfDefaultMetric100MegPort 		 100MbpsPortDefaultMetric
rcIpConfOspfDefaultMetric1000MegPort      	 1000MbpsPortDefaultMetric
rcIpRoutingRedistributeRipToOspfEnable   	 RedistributeRipToOspfEnable
rcIpRoutingRedistributeRipToOspfUseDefaultMetric UseDefaultMetric
rcIpRoutingRedistributeRipToOspfDefaultMetric 	 DefaultMetric 
rcIpRoutingRedistributeOspfToRipEnable 		 RedistributeOspfToRipEnable
rcIpRoutingRedistributeOspfToRipUseDefaultMetric UseDefaultMetric
rcIpRoutingRedistributeOspfToRipDefaultMetric	 DefaultMetric 
round(($ifInOctets+$ifOutOctets)/$ifSpeed*800)	 BandwidthUtil%
rcIpRoutingRedistributeRipToOspfEnable		 Enable
rcIpRoutingRedistributeOspfToRipEnable		 Enable
rcIpRoutingRedistributeStaticToOspfAdvertDefRte  AdvertiseDefaultRoute
}

# Default enum grid size in dialogs is 3; *.grid overrides this.

array set Dm_AgentCap {
ifAdminStatus.enums {{1 up} {2 down}}
ipRouteType.enums {{1 other} {3 direct} {4 indirect}}
ipNetToMediaType.enums {{3 dynamic} {4 static}}
ifTestType.enums {{0.0 stopTest} {1.3.6.1.2.1.10.7.6.2 loopback}}
ifTestCode.enums {
	{0.0 ""}
	{1.3.6.1.2.1.10.7.7.1 initError}
	{1.3.6.1.2.1.10.7.7.2 loopbackError}
	{1.3.6.1.4.1.2272.1.11.3.1 noReceive}
	{1.3.6.1.4.1.2272.1.11.3.2 badSeq}
	{1.3.6.1.4.1.2272.1.11.3.3 badLen}
	{1.3.6.1.4.1.2272.1.11.3.4 badData}
}
dot1dStaticStatus.enums {{3 permanent} {4 deleteOnReset} {5 deleteOnTimeout}}
rcVlanType.enums {{1 byPort} {2 byIpSubnet} {3 byProtocolId}}
ospfAuthType.enums {{0 N/A} {1 simplePassword}}
rcPortPrimaryConnector.enums {{1 left} {2 right}}

rcBootPrimary.grid 4
rcBootSecondary.grid 4
rcBootTertiary.grid 4
rcPortAction.grid 4
rcPingPktSize.grid 4

rcSysIpAddr.ACCESS read-only
rcSysNetMask.ACCESS read-only
rcSysBroadcast.ACCESS read-only
historyControlBucketsRequested.ACCESS read-create
historyControlDataSource.ACCESS read-create
historyControlInterval.ACCESS read-create
historyControlOwner.ACCESS read-create
historyControlStatus.ACCESS read-create
etherStatsDataSource.ACCESS read-create
etherStatsStatus.ACCESS read-create
alarmInterval.ACCESS read-create
alarmVariable.ACCESS read-create
alarmSampleType.ACCESS read-create
alarmStartupAlarm.ACCESS read-create
alarmRisingThreshold.ACCESS read-create
alarmRisingEventIndex.ACCESS read-create
alarmFallingThreshold.ACCESS read-create
alarmFallingEventIndex.ACCESS read-create
alarmOwner.ACCESS read-create
alarmStatus.ACCESS read-create
eventDescription.ACCESS read-create
eventType.ACCESS read-create
eventCommunity.ACCESS read-create
eventLastTimeSend.ACCESS read-create
eventOwner.ACCESS read-create
eventStatus.ACCESS read-create
ipRouteDest.ACCESS read-create
ipRouteIfIndex.ACCESS read-create
ipRouteNextHop.ACCESS read-create
ipRouteMask.ACCESS read-create
ipRouteAge.ACCESS read-create
ipRouteMetric1.ACCESS read-create
ipRouteType.ACCESS read-create
ipNetToMediaIfIndex.ACCESS read-create
ipNetToMediaPhysAddress.ACCESS read-create
ipNetToMediaNetAddress.ACCESS read-create
dot1dTpFdbPort.ACCESS read-create
rip2IfConfDefaultMetric.ACCESS read-only
rip2IfConfAuthType.ACCESS read-only
rip2IfConfAuthKey.ACCESS read-only
rip2IfConfStatus.ACCESS read-only
rcVlanPortVlanIds.ACCESS read-only
rcVlanStgId.ACCESS read-create
rcVlanType.ACCESS read-create
rcVlanProtocolId.ACCESS read-create
rcVlanSubnetAddr.ACCESS read-create
rcVlanSubnetMask.ACCESS read-create
rcWebAccessUserName.ACCESS read-create
rcBridgeStaticStatus.ACCESS read-create
rcBridgeFilterStatus.ACCESS read-create
ospfNbrPriority.ACCESS read-only
ospfNBMANbrStatus.ACCESS read-only
rcIpAdEntNetMask.ACCESS read-create

dot1dStaticReceivePort.DEFVAL 0
eventDescription.DEFVAL myEvent
eventCommunity.DEFVAL public
eventType.DEFVAL 4
historyControlBucketsRequested.DEFVAL 50
historyControlInterval.DEFVAL 1800
ipRouteMetric1.DEFVAL 1
rcSysTrapRecvVersion.DEFVAL 1
rcSysTrapRecvCommunity.DEFVAL public
rcIpAdEntBcastAddrFormat.DEFVAL 1
rcVlanHighPriority.DEFVAL 2
rcVlanRoutingEnable.DEFVAL 2
rcVlanType.DEFVAL 1
rcVlanStgId.DEFVAL 1
rcVlanAgingTime.DEFVAL 600
rcStgTaggedBpduAddress.DEFVAL 01:80:c2:00:00:00
rcStgTagAccessPortBpdus.DEFVAL 2
rcStgPriority.DEFVAL 32768
rcStgBridgeMaxAge.DEFVAL 2000
rcStgBridgeHelloTime.DEFVAL 200
rcStgBridgeForwardDelay.DEFVAL 1500
rcStgEnableStp.DEFVAL 1
rcStgStpTrapEnable.DEFVAL 1
rcBridgeStaticMonitor.DEFVAL 2
rcBridgeStaticPriority.DEFVAL 0
ospfAuthType.DEFVAL 0
ospfImportASExtern.DEFVAL 1
ospfVirtIfTransitDelay.DEFVAL 1
ospfVirtIfRetransInterval.DEFVAL 5
ospfVirtIfHelloInterval.DEFVAL 10
ospfVirtIfRtrDeadInterval.DEFVAL 40
ospfVirtIfAuthKey.DEFVAL 00:00:00:00:00:00:00:00
rcIpConfOspfRtrPriority.DEFVAL 1 
rcIpConfOspfMetric.DEFVAL 0
rcErrorSendTrap.DEFVAL 2

rcStgPriority.UNITS {0=max}
rcSysRmonMemSize.UNITS bytes
rcStgBridgeMaxAge.UNITS {1/100 sec}
rcStgBridgeHelloTime.UNITS {1/100 sec}
rcStgBridgeForwardDelay.UNITS {1/100 sec}
dot1dTpAgingTime.UNITS sec
rcVlanAgingTime.UNITS sec
historyControlInterval.UNITS sec
rcIpConfOspfRtrPriority.UNITS {minimum=0}
rcIpConfOspfMetric.UNITS {use port speed=0} 
rcIpConfOspfHelloInterval.UNITS sec
rcIpConfOspfRtrDeadInterval.UNITS sec
ipDefaultTTL.UNITS sec
rcArpExtLifeTime.UNITS min
rcRipExtUpdateTime.UNITS sec

ipNetToMediaIfIndex.TYPE InterfaceIndex
ipNetToMediaPhysAddress.TYPE MacAddress
historyControlDataSource.TYPE InterfaceIndex
etherStatsDataSource.TYPE InterfaceIndex
}

# The 11x0 doesn't support pcmcia cards
if {$DmDMS(sysObjectId) == "1.3.6.1.4.1.2272.2" ||
	$DmDMS(sysObjectId) == "1.3.6.1.4.1.2272.7"} {
	array set Dm_AgentCap {
		rcBootPrimary.enums {{1 flash} {3 net} {4 skip}}
		rcBootSecondary.enums {{1 flash} {3 net} {4 skip}}
		rcBootTertiary.enums {{1 flash} {3 net} {4 skip}}
		rcTftpAction.enums {{2 downloadConfig} {3 uploadConfig}
			 {4 downloadSwToFlash}}

		rcSysAction.enums {{2 hardReset} {3 softReset} {4 saveToNVRAM} {5 resetCounters}
			{8 checkSwInFlash}}
	}
} else {
	array set Dm_AgentCap {
		rcBootPrimary.enums {{1 flash} {2 pcmcia} {3 net} {4 skip}}
		rcBootSecondary.enums {{1 flash} {2 pcmcia} {3 net} {4 skip}}
		rcBootTertiary.enums {{1 flash} {2 pcmcia} {3 net} {4 skip}}
		rcTftpAction.enums {{2 downloadConfig} {3 uploadConfig}
			 {4 downloadSwToFlash} {5 downloadSwToPcmcia}}
		rcSysAction.enums {{2 hardReset} {3 softReset} {4 saveToNVRAM} {5 resetCounters}
			{8 checkSwInFlash} {9 checkSwInPcmcia}}
	}
	# Only the f1200 has dual CPUs...
	if {$DmDMS(sysObjectId) == "1.3.6.1.4.1.2272.8"} {
		lappend Dm_AgentCap(rcSysAction.enums) {6 saveToStandbyNVRAM} {7 cpuSwitchOver}
	}
}
