# (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.

global SnmpPropErrors Dm_Path Dm_AgentCap Dm_Alias Dm_MibVarDisplay DmDMS

# MIB descriptor aliase
array set Dm_Alias {
s5AgInfoMgmtProtocolNxtBoot	NextBootMgmtProtocol
s5AgInfoMgmtProtocolCur		CurrentMgmtProtocol
s5AgInfoImgLoadMode		ImageLoadMode
s5AgInfoVer			CurrentImageVersion
s5AgInfoLocStorVer		LocalStorageImageVersion
s5AgInfoNxtBootDfltGwAddr	NextBootDefaultGateway
s5AgInfoCurDfltGwAddr		CurrentDefaultGateway
s5AgInfoLoadProtocolNxtBoot	NextBootLoadProtocol
s5AgInfoLoadProtocolLast	LastLoadProtocol
s5AgInfoWriteCfg		WriteConfiguration
s5AgUnAuthIpAddr		LastUnauthenticatedIpAddress
s5AgUnAuthComm			LastUnauthenticatedCommunityString
s5AgTrpRcvrMaxEnt		TrapReceiverTableMaxEntry
s5AgTrpRcvrCurEnt		TrapReceiverCurrentEntry
s5AgTrpRcvrNext			TrapReceiverNextEntry
s5AgMyIfNxtBootIpAddr		NextBootIpAddr
s5AgMyIfNxtBootNetMask		NextBootNetMask
s5AgMyIfLdSvrAddr 		LoadServerAddr
s5AgMyIfImgFname 		ImageFileName
s5AgTrpRcvrComm			Community
ifInDiscards		InDiscards
ifOutDiscards		OutDiscards
ifInErrors		InErrors
ifOutErrors		OutErrors
ifInUnknownProtos	InUnknownProtos
ifLinkUpDownTrapEnable	LinkTrap
ifSpeed			Speed
ipAdEntIfIndex		Interface
ipRouteIfIndex		Interface
ipRouteMetric1		HopOrMetric
ipNetToMediaIfIndex	Interface
ipNetToMediaPhysAddress MacAddress
ipNetToMediaNetAddress	IpAddress
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
rcPortLocked		Locked
rcPortAutoNegotiate	AutoNegotiate
rcPortAdminDuplex	AdminDuplex
rcPortOperDuplex	OperDuplex
rcPortAdminSpeed	AdminSpeed
rcPortOperSpeed		OperSpeed
rcPortMltId             MltId
rcIsolateUnconfigPorts  IsolateUnconfigPorts
rcUseFactorySettings	UseFactorySettings
rcHighPriorityMode	HighPriorityMode
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
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
rcDeviceFlashFileVersion 	FileDetail	
rcDevicePcmciaFileVersion 	FileDetail	
rcDeviceFlashBytesUsed		FlashBytesUsed
rcDeviceFlashBytesFree		FlashBytesFree
rcDevicePcmciaBytesUsed		PcmciaBytesUsed
rcDevicePcmciaBytesFree		PcmciaBytesFree
rcDeviceAction			Action
rcDeviceResult			Result
rcVlanName			Name
s5AgTrpRcvrMaxEnt		TrpRcvrMaxEnt
s5AgTrpRcvrCurEnt		TrpRcvrCurEnt
s5AgTrpRcvrNext			TrpRcvrNext
}

# Variable display characteristics:
#	*.grid overrides the number of columns in a form enumeration (default=3)
array set Dm_MibVarDisplay {
rcSysAction.grid 2
rcPortAction.grid 4
rcPingPktSize.grid 4
rcDevicePrimarySource.grid 4
rcDeviceSecondarySource.grid 4
rcDeviceTertiarySource.grid 4
rcIpFilterSrcOption.grid 4
rcIpFilterDstOption.grid 4
rcIpFilterProtocolType.grid 4
s5ChasComAdminState.grid 4
}

# We use this to override MIB variable properties:
#	*.enum overrides enumerations
#	*.ACCESS overrides the ACCESS clause
#	*.TYPE overrides the TYPE clause
#	*.DEFVAL overrides (or supplies) the DEFVAL clause
#	*.UNITS overrides (or supplies) the UNITS clause
array set Dm_AgentCap {
s5ChasComAdminState.enums {{3 disable} {4 enable} {5 reset} {6 test}}
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} {1.3.6.1.4.1.2272.1.11.2.3 externalLoopback}}
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}}
rcIpDhcpForwardMode.enums {{2 bootp} {3 dhcp} {4 both}}
ifAdminStatus.enums {{1 up} {2 down}}
rcMltPortType.enums {{1 access} {2 interSwitch}}
rcVlanPortType.enums {{1 access} {2 interSwitch}}

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
etherStatsOwner.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
ipDefaultTTL.ACCESS read-only
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-only
ipNetToMediaPhysAddress.ACCESS read-only
ipNetToMediaNetAddress.ACCESS read-only
ipNetToMediaType.ACCESS read-only
dot1dTpFdbPort.ACCESS read-create
rip2IfConfDefaultMetric.ACCESS read-only
rip2IfConfAuthType.ACCESS read-only
rip2IfConfAuthKey.ACCESS read-only
rip2IfConfStatus.ACCESS read-only
rcVlanPortVlanIds.ACCESS read-only
rcVlanPortDefaultVlanId.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
rcIpRouteNextHop.ACCESS read-create
rcIpRouteMetric.ACCESS read-create

s5AgInfoMgmtProtocolNxtBoot.ACCESS read-only
s5AgInfoMgmtProtocolCur.ACCESS read-only
s5AgInfoLoadProtocolNxtBoot.ACCESS read-only
s5AgInfoNextBootBank.ACCESS read-only
s5AgInfoDstLoadBank.ACCESS read-only
s5AgInfoImgSaveMode.ACCESS read-only
s5AgInfoImgSaveStatus.ACCESS read-only
s5AgInfoImgLoadMode.ACCESS read-only
s5AgInfoCfgLoadMode.ACCESS read-only
s5AgTrpRcvrAddrType.ACCESS read-only
s5AgTrpRcvrAgeTime.ACCESS read-only
s5AgMyIfNxtBootIpAddr.ACCESS read-only
s5AgMyIfNxtBootNetMask.ACCESS read-only
s5AgMyIfLdSvrAddr.ACCESS read-only
s5AgMyIfImgFname.ACCESS read-only
s5AgMyIfBootRouterAddr.ACCESS read-only
s5AgInfoNxtBootDfltGwAddr.ACCESS read-only
s5AgInfoCurDfltGwAddr.ACCESS read-only
rcVlanIgmpSnoopEnable.ACCESS read-only
rcVlanIgmpSnoopReportProxyEnable.ACCESS read-only
rcVlanIgmpSnoopRobustness.ACCESS read-only
rcVlanIgmpSnoopQueryInterval.ACCESS read-only
rcVlanIgmpSnoopMRouterPorts.ACCESS read-only
rcVlanUserDefinedPid.ACCESS read-only
rcVlanIgmpSnoopActiveMRouterPorts.ACCESS read-only
rcVlanProtocolIds.ACCESS read-only
rcVlanIgmpSnoopActiveQuerier.ACCESS read-only
rcVlanIgmpSnoopMRouterExpiration.ACCESS read-only
rcVlanIgmpSnoopQuerierPort.ACCESS read-only

eventType.DEFVAL 4
eventDescription.DEFVAL myEvent
eventCommunity.DEFVAL public
ipRouteMetric1.DEFVAL 1
rcSysTrapRecvCommunity.DEFVAL public
rcVlanType.DEFVAL 1
rcStgTaggedBpduAddress.DEFVAL 01:80:c2:00:00:00
rcBridgeStaticMonitor.DEFVAL 2
rcIpFilterType.DEFVAL 3
rcIpFilterDstAddr.DEFVAL 0.0.0.0
rcIpFilterDstMask.DEFVAL 0.0.0.0
rcIpFilterSrcAddr.DEFVAL 0.0.0.0
rcIpFilterSrcMask.DEFVAL 0.0.0.0


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
ipReasmTimeout.UNITS sec
rcArpExtLifeTime.UNITS min
rcRipExtUpdateTime.UNITS sec
rcVlanIgmpSnoopStaticIpAddress.UNITS {224.0.1.0..239.255.255.255}
rcCliTimeout.UNITS sec
rcVlanIgmpSnoopRobustness.UNITS {2=max}
rcVlanIgmpSnoopQueryInterval.UNITS sec
ifMtu.UNITS bytes
dot1dStpMaxAge.UNITS msec
dot1dStpHelloTime.UNITS msec
dot1dStpForwardDelay.UNITS msec

historyControlDataSource.TYPE InterfaceIndex
etherStatsDataSource.TYPE InterfaceIndex
rcIpFilterPortIfIndex InterfaceIndex
ipNetToMediaIfIndex.TYPE InterfaceIndex
ipNetToMediaPhysAddress.TYPE MacAddress
rcVlanActiveMembers.TYPE VlanPortSet
rcVlanStaticMembers.TYPE VlanPortSet
rcVlanNotAllowToJoin.TYPE VlanPortSet
rcStgPortMembers.TYPE PortSet
rcBridgeFilterNotAllowedFrom.TYPE PortSet

s5AgTrpRcvrComm.TYPE DisplayString
s5AgUnAuthComm.TYPE DisplayString
s5AgMyIfMacAddr.TYPE DisplayString
s5AgTrpRcvrNetAddr.TYPE IpAddress
}

# Override PortSet type to prevent DM from automatically interpreting
#rcVlanPortMembers.TYPE OctetString
#rcVlanStaticMembers.TYPE OctetString
#rcVlanNotAllowToJoin.TYPE OctetString

# Record proprietary error codes for use by SNMPTcl.
foreach e [snmpinfo mibprop rcErrorReturnCode enums] {
	set SnmpPropErrors([rlindex e 0]) [rlindex e 1]
}
# Now see if these have better translations in the errors file.
catch {source $Dm_Path/dmdb/cham-lite/SnmpPropErrors}
