Index: CHANGES.genDevConfig_2_0_0beta2
===================================================================
RCS file: /cvsroot/soft/cougar/genDevConfig/CHANGES.genDevConfig_2_0_0beta2,v
retrieving revision 1.1
retrieving revision 1.1.2.1
diff -u -r1.1 -r1.1.2.1
--- CHANGES.genDevConfig_2_0_0beta2	19 Apr 2004 12:14:23 -0000	1.1
+++ CHANGES.genDevConfig_2_0_0beta2	19 Apr 2004 13:02:52 -0000	1.1.2.1
@@ -1,3 +1,18 @@
+15/04/2004 - Cougar < cougar @ random . ee >
+
+# Modified genDevConfig
+#  - removed Juniper (JUNOS) generic config
+#  - @EXCEPTIONS handling changed (can use intrface names also)
+#  - collect ATM interface stats
+#  - skip switch CPU interface
+#
+# Modified CiscoIOS.pm, Defaults
+#  - Added Catalyst 1900 series switches
+#
+# Added JUNOS.pm, Defaults.junos
+#  - Juniper stats: CPU, memory, temperature, interfaces and firewall counters
+#
+
 01/04/2004 - Francois Mikus
 
 # Version 2_0_0beta2
Index: Defaults
===================================================================
RCS file: /cvsroot/soft/cougar/genDevConfig/Defaults,v
retrieving revision 1.1
retrieving revision 1.1.2.1
diff -u -r1.1 -r1.1.2.1
--- Defaults	19 Apr 2004 12:14:23 -0000	1.1
+++ Defaults	19 Apr 2004 13:02:52 -0000	1.1.2.1
@@ -71,8 +71,12 @@
 OID     ifOutQLen              1.3.6.1.2.1.2.2.1.21
 OID     ifHCInOctets           1.3.6.1.2.1.31.1.1.1.6
 OID     ifHCInUcastPkts        1.3.6.1.2.1.31.1.1.1.7
+OID     ifHCInMulticastPkts    1.3.6.1.2.1.31.1.1.1.8
+OID     ifHCInBroadcastPkts    1.3.6.1.2.1.31.1.1.1.9
 OID     ifHCOutOctets          1.3.6.1.2.1.31.1.1.1.10
 OID     ifHCOutUcastPkts       1.3.6.1.2.1.31.1.1.1.11
+OID     ifHCOutMulticastPkts   1.3.6.1.2.1.31.1.1.1.12
+OID     ifHCOutBroadcastPkts   1.3.6.1.2.1.31.1.1.1.13
 OID     ifAlias                1.3.6.1.2.1.31.1.1.1.18
  
 # OID's we'll be using in this tree
@@ -193,6 +197,10 @@
 OID     chassisFanStatus            1.3.6.1.4.1.9.5.1.2.9.0
 OID     chassisTempAlarm            1.3.6.1.4.1.9.5.1.2.13.0
 
+OID     bandwidthUsageCurrent       1.3.6.1.4.1.437.1.1.3.7.1.0
+OID     bandwidthUsagePeak          1.3.6.1.4.1.437.1.1.3.7.6.1.3.1
+OID     sysInfoUtilDisplay          1.3.6.1.4.1.437.1.1.3.1.9.0
+
 # Cisco Chassis & PIX CPU information
 
 OID     ciscoMemoryPoolName         1.3.6.1.4.1.9.9.48.1.1.1.2
@@ -265,6 +273,24 @@
 datasource ipOutRequests
 	ds-source	=	snmp://%snmp%/ipOutRequests
 
+datasource ifHCInUcastPkts
+        ds-source       =       snmp://%snmp%/ifHCInUcastPkts.%inst%
+
+datasource ifHCInMulticastPkts
+        ds-source       =       snmp://%snmp%/ifHCInMulticastPkts.%inst%
+
+datasource ifHCInBroadcastPkts
+        ds-source       =       snmp://%snmp%/ifHCInBroadcastPkts.%inst%
+
+datasource ifHCOutUcastPkts
+        ds-source       =       snmp://%snmp%/ifHCOutUcastPkts.%inst%
+
+datasource ifHCOutMulticastPkts
+        ds-source       =       snmp://%snmp%/ifHCOutMulticastPkts.%inst%
+
+datasource ifHCOutBroadcastPkts
+        ds-source       =       snmp://%snmp%/ifHCOutBroadcastPkts.%inst%
+
 datasource	cpu1min		
 	rrd-ds-type	=	GAUGE
 	ds-source	=	snmp://%snmp%/cpu1min
@@ -341,8 +367,12 @@
 # ifInOctets and ifOutOctets come from above, since they
 # are used by switch-ports as well
 
+datasource	ifInDiscards
+	ds-source	=	snmp://%snmp%/ifInDiscards.%inst%
 datasource	ifInErrors
 	ds-source	=	snmp://%snmp%/ifInErrors.%inst%
+datasource	ifOutDiscards
+	ds-source	=	snmp://%snmp%/ifOutDiscards.%inst%
 datasource	ifOutErrors
 	ds-source	=	snmp://%snmp%/ifOutErrors.%inst%
 datasource	ifInUcastPackets
@@ -554,6 +584,18 @@
     ds-source   = snmp://%snmp%/cpmCPUTotal5minRev.%cpu%
     rrd-ds-type = GAUGE
 
+datasource bandwidthUsageCurrent
+    ds-source   = snmp://%snmp%/bandwidthUsageCurrent
+    rrd-ds-type = GAUGE
+
+datasource bandwidthUsagePeak
+    ds-source   = snmp://%snmp%/bandwidthUsagePeak
+    rrd-ds-type = GAUGE
+
+datasource sysInfoUtilDisplay
+    ds-source   = snmp://%snmp%/sysInfoUtilDisplay
+    rrd-ds-type = GAUGE
+
 ### Netscreen Datasource
 
 datasource nsResMemLeft
@@ -631,6 +673,39 @@
         ds-source               =       snmp://%snmp%/classPkts.%inst%
 
 
+### Data sources for Etherlike MIB devices
+
+dataSource dot3StatsAlignmentErrors
+        ds-source               =       snmp://%snmp%/dot3StatsAlignmentErrors.%inst%
+
+dataSource dot3StatsFCSErrors
+        ds-source               =       snmp://%snmp%/dot3StatsFCSErrors.%inst%
+
+dataSource dot3StatsSingleCollisionFrames
+        ds-source               =       snmp://%snmp%/dot3StatsSingleCollisionFrames.%inst%
+
+dataSource dot3StatsMultipleCollisionFrames
+        ds-source               =       snmp://%snmp%/dot3StatsMultipleCollisionFrames.%inst%
+
+dataSource dot3StatsDeferredTransmissions
+        ds-source               =       snmp://%snmp%/dot3StatsDeferredTransmissions.%inst%
+
+dataSource dot3StatsLateCollisions
+        ds-source               =       snmp://%snmp%/dot3StatsLateCollisions.%inst%
+
+dataSource dot3StatsExcessiveCollisions
+        ds-source               =       snmp://%snmp%/dot3StatsExcessiveCollisions.%inst%
+
+dataSource dot3StatsCarrierSenseErrors
+        ds-source               =       snmp://%snmp%/dot3StatsCarrierSenseErrors.%inst%
+
+dataSource dot3StatsFrameTooLongs
+        ds-source               =       snmp://%snmp%/dot3StatsFrameTooLongs.%inst%
+
+dataSource dot3StatsDuplexStatus
+        ds-source               =       snmp://%snmp%/dot3StatsDuplexStatus.%inst%
+
+
 ###############################################################################
 #
 # targetType's are the device definitions that will tell cricket what to retrieve
@@ -769,6 +844,13 @@
 	view	=	"cpu: cpu1min cpu5min,
 				memory: mem5minUsed mem5minFree processorRam"
 
+# Catalyst 1900 switches return CPU and memory.
+targetType	Catalyst-1900-Switch
+	ds		=	"bandwidthUsageCurrent, bandwidthUsagePeak, sysInfoUtilDisplay"
+	view	=	"bandwidth: bandwidthUsageCurrent bandwidthUsagePeak,
+				utilization: sysInfoUtilDisplay"
+
+
 # Generic Device
 
 targetType	Generic-Device
@@ -916,6 +998,22 @@
 				locIfOutputQueueDrops,
 				Errors: locIfInCRC locIfInFrame locIfInOverrun
 				locIfInAbort locIfResets locIfCarTrans"
+targetType  cisco-interface-c1900
+	ds		=	"ifInOctets, ifOutOctets, ifInErrors,
+				ifOutErrors, ifInUcastPackets, ifOutUcastPackets,
+				ifInDiscards, ifOutDiscards,
+				dot3StatsAlignmentErrors,  dot3StatsFCSErrors,
+				dot3StatsSingleCollisionFrames, dot3StatsMultipleCollisionFrames,
+				dot3StatsDeferredTransmissions,
+				dot3StatsLateCollisions, dot3StatsExcessiveCollisions,
+				dot3StatsCarrierSenseErrors"
+	view	=	"Octets: ifInOctets ifOutOctets,
+				UcastPackets: ifInUcastPackets ifOutUcastPackets,
+				Errors: ifInErrors ifOutErrors
+				Collosions: dot3StatsSingleCollisionFrames dot3StatsMultipleCollis dot3StatsLateCollisions dot3StatsExcessiveCollisions,
+				dot3Stats: dot3StatsAlignmentErrors dot3StatsFCSErrors
+				dot3StatsDeferredTransmissions
+				dot3StatsCarrierSenseErrors"
 targetType  cisco-interface-access
 	ds		=	"ifInOctets, ifOutOctets, ifInErrors,
 				ifOutErrors, ifInUcastPackets, ifOutUcastPackets,
@@ -954,9 +1052,13 @@
 				locIfInRunts, locIfInGiants, locIfInCRC, locIfInFrame,
 				locIfInOverrun, locIfInIgnored, locIfInAbort,
 				locIfResets, locIfCarTrans, locIfCollisions,
-				locIfInputQueueDrops, locIfOutputQueueDrops"
+				locIfInputQueueDrops, locIfOutputQueueDrops,
+				ifHCInMulticastPkts, ifHCOutMulticastPkts,
+				ifHCInBroadcastPkts, ifHCOutBroadcastPkts"
 	view	=	"Octets: ifHCInOctets ifHCOutOctets,
 				UcastPackets: ifInUcastPackets ifOutUcastPackets,
+				Multicast: ifHCInMulticastPkts ifHCOutMulticastPkts,
+				Broadcast: ifHCInBroadcastPkts ifHCOutBroadcastPkts,
 				Collisions: locIfCollisions,
 				QueueDrops: locIfInputQueueDrops 
 				locIfOutputQueueDrops,
@@ -1892,3 +1994,25 @@
     scale       =   "2,-"
     precision   =   0
     show-avg-max = 0
+
+graph bandwidthUsageCurrent
+    color       =   dark-green
+    draw-as     =   AREA
+    y-axis      =   "Mbit/sec"
+    units       =   "Mbit/sec"
+    legend      =   "Bandwidth currently consumed"
+
+graph bandwidthUsagePeak
+    color       =   dark-green
+    draw-as     =   AREA
+    y-axis      =   "Mbit/sec"
+    units       =   "Mbit/sec"
+    legend      =   "Highest bandwidth utilized"
+
+graph sysInfoUtilDisplay
+    color       =   dark-green
+    draw-as     =   AREA
+    y-axis      =   "Utilization meter LED"
+    units       =   ""
+    legend      =   "Number of utilization meter LEDs currently lit on the front panel"
+
Index: Defaults.junos
===================================================================
RCS file: Defaults.junos
diff -N Defaults.junos
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ Defaults.junos	19 Apr 2004 13:02:52 -0000	1.1.2.1
@@ -0,0 +1,365 @@
+#
+# Juniper network device sub-tree defaults - for use with genDevConfig
+#
+#
+# This file is formated with a tab (no spaces!)
+#
+#    Copyright (C) 2003 Cougar < cougar @ random . ee >
+#
+
+### Juniper
+
+OID	ifJnxInErrors			1.3.6.1.4.1.2636.3.3.1.1.9
+OID	ifJnxInFrameErrors		1.3.6.1.4.1.2636.3.3.1.1.10
+OID	ifJnxInQDrops			1.3.6.1.4.1.2636.3.3.1.1.11
+OID	ifJnxInRunts			1.3.6.1.4.1.2636.3.3.1.1.12
+OID	ifJnxInGiants			1.3.6.1.4.1.2636.3.3.1.1.13
+OID	ifJnxInDiscards			1.3.6.1.4.1.2636.3.3.1.1.14
+OID	ifJnxInHslCrcErrors		1.3.6.1.4.1.2636.3.3.1.1.15
+OID	ifJnxInHslFifoOverFlows		1.3.6.1.4.1.2636.3.3.1.1.16
+OID	ifJnxInL3Incompletes		1.3.6.1.4.1.2636.3.3.1.1.17
+OID	ifJnxInL2ChanErrors		1.3.6.1.4.1.2636.3.3.1.1.18
+OID	ifJnxInL2MismatchTimeouts	1.3.6.1.4.1.2636.3.3.1.1.19
+OID	ifJnxInInvalidVCs		1.3.6.1.4.1.2636.3.3.1.1.20
+OID	ifJnxInFifoErrors		1.3.6.1.4.1.2636.3.3.1.1.21
+OID	ifJnxBucketDrops		1.3.6.1.4.1.2636.3.3.1.1.22
+OID	ifJnxSramErrors			1.3.6.1.4.1.2636.3.3.1.1.23
+OID	ifJnxOutErrors			1.3.6.1.4.1.2636.3.3.1.1.24
+OID	ifJnxCollisions			1.3.6.1.4.1.2636.3.3.1.1.25
+OID	ifJnxCarrierTrans		1.3.6.1.4.1.2636.3.3.1.1.26
+OID	ifJnxOutQDrops			1.3.6.1.4.1.2636.3.3.1.1.27
+OID	ifJnxOutAgedErrors		1.3.6.1.4.1.2636.3.3.1.1.28
+OID	ifJnxOutFifoErrors		1.3.6.1.4.1.2636.3.3.1.1.29
+OID	ifJnxOutHslFifoUnderFlows	1.3.6.1.4.1.2636.3.3.1.1.30
+OID	ifJnxOutHslCrcErrors		1.3.6.1.4.1.2636.3.3.1.1.31
+
+OID	jnxFWCounterPacketCount		1.3.6.1.4.1.2636.3.5.2.1.4
+OID	jnxFWCounterByteCount		1.3.6.1.4.1.2636.3.5.2.1.5
+
+OID	jnxAtmIfTxCellCount		1.3.6.1.4.1.2636.3.10.1.1.5
+OID	jnxAtmIfRxCellCount		1.3.6.1.4.1.2636.3.10.1.1.6
+OID	jnxAtmIfTxIdleCellCount		1.3.6.1.4.1.2636.3.10.1.1.7
+OID	jnxAtmIfUncorrHCSErrs		1.3.6.1.4.1.2636.3.10.1.1.8
+OID	jnxAtmIfCorrHCSErrs		1.3.6.1.4.1.2636.3.10.1.1.9
+OID	jnxAtmIfTxCellFIFOOverRuns	1.3.6.1.4.1.2636.3.10.1.1.10
+OID	jnxAtmIfRxCellFIFOOverRuns	1.3.6.1.4.1.2636.3.10.1.1.11
+OID	jnxAtmIfRxCellFIFOUnderRuns	1.3.6.1.4.1.2636.3.10.1.1.12
+OID	jnxAtmIfInInvalidVCCells	1.3.6.1.4.1.2636.3.10.1.1.13
+OID	jnxAtmIfInNoBufferOAMCells	1.3.6.1.4.1.2636.3.10.1.1.14
+OID	jnxAtmIfInNoBufDropPkts		1.3.6.1.4.1.2636.3.10.1.1.15
+OID	jnxAtmIfOutVCQueueDrops		1.3.6.1.4.1.2636.3.10.1.1.16
+OID	jnxAtmIfInBadCrcs		1.3.6.1.4.1.2636.3.10.1.1.17
+OID	jnxAtmIfInLenErrPkts		1.3.6.1.4.1.2636.3.10.1.1.18
+OID	jnxAtmIfInTimeoutPkts		1.3.6.1.4.1.2636.3.10.1.1.19
+
+OID	jnxOperatingTemp		1.3.6.1.4.1.2636.3.1.13.1.7
+OID	jnxOperatingCPU			1.3.6.1.4.1.2636.3.1.13.1.8
+OID	jnxOperatingISR			1.3.6.1.4.1.2636.3.1.13.1.9
+OID	jnxOperatingBuffer		1.3.6.1.4.1.2636.3.1.13.1.11
+OID	jnxOperatingHeap		1.3.6.1.4.1.2636.3.1.13.1.12
+
+
+
+datasource	jnxFWCounterPacketCount
+	ds-source		=	snmp://%snmp%/jnxFWCounterPacketCount.%filtername%.%countername%.%fwtype%
+
+datasource	jnxFWCounterByteCount
+	ds-source		=	snmp://%snmp%/jnxFWCounterByteCount.%filtername%.%countername%.%fwtype%
+
+
+dataSource	jnxAtmIfTxCellCount
+	ds-source		=	snmp://%snmp%/jnxAtmIfTxCellCount.%inst%
+
+dataSource	jnxAtmIfRxCellCount
+	ds-source		=	snmp://%snmp%/jnxAtmIfRxCellCount.%inst%
+
+dataSource	jnxAtmIfTxIdleCellCount
+	ds-source		=	snmp://%snmp%/jnxAtmIfTxIdleCellCount.%inst%
+
+dataSource	jnxAtmIfUncorrHCSErrs
+	ds-source		=	snmp://%snmp%/jnxAtmIfUncorrHCSErrs.%inst%
+
+dataSource	jnxAtmIfCorrHCSErrs
+	ds-source		=	snmp://%snmp%/jnxAtmIfCorrHCSErrs.%inst%
+
+dataSource	jnxAtmIfTxCellFIFOOverRuns
+	ds-source		=	snmp://%snmp%/jnxAtmIfTxCellFIFOOverRuns.%inst%
+
+dataSource	jnxAtmIfRxCellFIFOOverRuns
+	ds-source		=	snmp://%snmp%/jnxAtmIfRxCellFIFOOverRuns.%inst%
+
+dataSource	jnxAtmIfRxCellFIFOUnderRuns
+	ds-source		=	snmp://%snmp%/jnxAtmIfRxCellFIFOUnderRuns.%inst%
+
+dataSource	jnxAtmIfInInvalidVCCells
+	ds-source		=	snmp://%snmp%/jnxAtmIfInInvalidVCCells.%inst%
+
+dataSource	jnxAtmIfInNoBufferOAMCells
+	ds-source		=	snmp://%snmp%/jnxAtmIfInNoBufferOAMCells.%inst%
+
+dataSource	jnxAtmIfInNoBufDropPkts
+	ds-source		=	snmp://%snmp%/jnxAtmIfInNoBufDropPkts.%inst%
+
+dataSource	jnxAtmIfOutVCQueueDrops
+	ds-source		=	snmp://%snmp%/jnxAtmIfOutVCQueueDrops.%inst%
+
+dataSource	jnxAtmIfInBadCrcs
+	ds-source		=	snmp://%snmp%/jnxAtmIfInBadCrcs.%inst%
+
+dataSource	jnxAtmIfInLenErrPkts
+	ds-source		=	snmp://%snmp%/jnxAtmIfInLenErrPkts.%inst%
+
+dataSource	jnxAtmIfInTimeoutPkts
+	ds-source		=	snmp://%snmp%/jnxAtmIfInTimeoutPkts.%inst%
+
+
+dataSource	jnxOperatingTemp
+	ds-source		=	 snmp://%snmp%/jnxOperatingTemp.%rest%
+	rrd-ds-type		=	GAUGE
+
+dataSource	jnxOperatingCPU
+	ds-source		=	 snmp://%snmp%/jnxOperatingCPU.%rest%
+	rrd-ds-type		=	GAUGE
+
+dataSource	jnxOperatingISR
+	ds-source		=	 snmp://%snmp%/jnxOperatingISR.%rest%
+	rrd-ds-type		=	GAUGE
+
+dataSource	jnxOperatingBuffer
+	ds-source		=	 snmp://%snmp%/jnxOperatingBuffer.%rest%
+	rrd-ds-type		=	GAUGE
+
+dataSource	jnxOperatingHeap
+	ds-source		=	 snmp://%snmp%/jnxOperatingHeap.%rest%
+	rrd-ds-type		=	GAUGE
+
+
+targetType	juniper-firewall-counter
+	ds	=	"jnxFWCounterPacketCount, jnxFWCounterByteCount"
+	view	=	"Octets: jnxFWCounterByteCount,
+			Packets: jnxFWCounterPacketCount"
+
+targetType	juniper-firewall-policer
+	ds	=	"jnxFWCounterPacketCount"
+	view	=	"Packets: jnxFWCounterPacketCount"
+
+
+targetType	juniper-standard-interface-hc
+	ds		=	"ifHCInOctets, ifHCOutOctets, ifInErrors,
+				ifOutErrors, ifHCInUcastPkts, ifHCOutUcastPkts"
+	view	=	"Octets: ifHCInOctets ifHCOutOctets,
+				UcastPackets: ifHCInUcastPkts ifHCOutUcastPkts,
+				Errors: ifInErrors ifOutErrors"
+
+targetType	juniper-interface-hc
+	ds		=	"ifHCInOctets, ifHCOutOctets, ifInErrors,
+				ifOutErrors, ifInUcastPackets, ifOutUcastPackets,
+				ifHCInMulticastPkts, ifHCOutMulticastPkts,
+				ifHCInBroadcastPkts, ifHCOutBroadcastPkts"
+	view	=	"Octets: ifHCInOctets ifHCOutOctets,
+				UcastPackets: ifInUcastPackets ifOutUcastPackets,
+				Multicast: ifHCInMulticastPkts ifHCOutMulticastPkts,
+				Broadcast: ifHCInBroadcastPkts ifHCOutBroadcastPkts,
+				Errors: ifInErrors ifOutErrors"
+
+targetType	juniper-sub-interface-hc
+	ds		=	"ifHCInOctets, ifHCOutOctets,
+				ifInErrors, ifOutErrors,
+				ifHCInUcastPkts, ifHCOutUcastPkts"
+	view	=	"Octets: ifHCInOctets ifHCOutOctets,
+			Packets: ifHCInUcastPkts ifHCOutUcastPkts,
+			Errors: ifInErrors ifOutErrors"
+
+targetType	juniper-atm-interface-hc
+	ds		=	"ifHCInOctets, ifHCOutOctets, ifInErrors,
+				ifOutErrors, ifInUcastPackets, ifOutUcastPackets,
+				ifHCInMulticastPkts, ifHCOutMulticastPkts,
+				ifHCInBroadcastPkts, ifHCOutBroadcastPkts,
+				jnxAtmIfTxCellCount, jnxAtmIfRxCellCount, jnxAtmIfTxIdleCellCount,
+				jnxAtmIfUncorrHCSErrs, jnxAtmIfCorrHCSErrs,
+				jnxAtmIfTxCellFIFOOverRuns, jnxAtmIfRxCellFIFOOverRuns, jnxAtmIfRxCellFIFOUnderRuns,
+				jnxAtmIfInInvalidVCCells, jnxAtmIfInNoBufferOAMCells,
+				jnxAtmIfInNoBufDropPkts, jnxAtmIfOutVCQueueDrops,
+				jnxAtmIfInBadCrcs, jnxAtmIfInLenErrPkts, jnxAtmIfInTimeoutPkts"
+	view	=	"Octets: ifHCInOctets ifHCOutOctets,
+				UcastPackets: ifInUcastPackets ifOutUcastPackets,
+				Multicast: ifHCInMulticastPkts ifHCOutMulticastPkts,
+				Broadcast: ifHCInBroadcastPkts ifHCOutBroadcastPkts,
+				Errors: ifInErrors ifOutErrors,
+				ATMCells: jnxAtmIfTxCellCount jnxAtmIfRxCellCount jnxAtmIfTxIdleCellCount,
+				ATMHCSErrs: jnxAtmIfUncorrHCSErrs jnxAtmIfCorrHCSErrs,
+				ATMFIFO: jnxAtmIfTxCellFIFOOverRuns jnxAtmIfRxCellFIFOOverRuns jnxAtmIfRxCellFIFOUnderRuns,
+				ATMOutDrops: jnxAtmIfOutVCQueueDrops
+				ATMInErr: jnxAtmIfInNoBufferOAMCells jnxAtmIfInNoBufDropPkts jnxAtmIfInInvalidVCCells jnxAtmIfInBadCrcs jnxAtmIfInLenErrPkts jnxAtmIfInTimeoutPkts"
+
+targetType	juniper-chassis-backplane
+	ds		=	"jnxOperatingTemp"
+	view		=	"Temp: jnxOperatingTemp"
+
+targetType	juniper-chassis-powersupply
+	ds		=	"jnxOperatingTemp"
+	view		=	"Temp: jnxOperatingTemp"
+
+targetType	juniper-chassis-ssb
+	ds		=	"jnxOperatingTemp"
+	view		=	"Temp: jnxOperatingTemp"
+
+targetType	juniper-chassis-fpc
+	ds		=	"jnxOperatingTemp, jnxOperatingCPU, jnxOperatingISR, jnxOperatingBuffer, jnxOperatingHeap"
+	view		=	"Temp: jnxOperatingTemp,
+				 CPU: jnxOperatingCPU jnxOperatingISR,
+				 Mem: jnxOperatingBuffer jnxOperatingHeap"
+
+targetType	juniper-chassis-pic
+	ds		=	"jnxOperatingTemp"
+	view		=	"Temp: jnxOperatingTemp"
+
+targetType	juniper-chassis-re
+	ds		=	"jnxOperatingTemp, jnxOperatingCPU, jnxOperatingISR, jnxOperatingBuffer"
+	view		=	"Temp: jnxOperatingTemp,
+				 CPU: jnxOperatingCPU jnxOperatingISR,
+				 Mem: jnxOperatingBuffer"
+
+
+graph	jnxFWCounterPacketCount
+	draw-as	=	AREA
+	y-axis	=	"pps"
+	units	=	"pps"
+	legend	=	"Number of packets being counted"
+
+graph	jnxFWCounterByteCount
+	draw-as	=	AREA
+	y-axis	=	"bps"
+	units	=	"bps"
+	legend	=	"Number of bits (bytes * 8) being counted"
+	scale	=	8,*
+	bytes	=	0
+
+
+graph	jnxAtmIfTxCellCount
+	draw-as	=	LINE2
+	y-axis	=	"cell/sec"
+	units	=	"cell/sec"
+	legend	=	"Number of ATM cells transmitted by the interface"
+
+graph	jnxAtmIfRxCellCount
+	draw-as	=	LINE2
+	y-axis	=	"cell/sec"
+	units	=	"cell/sec"
+	legend	=	"Number of ATM cells received by the interface"
+
+graph	jnxAtmIfTxIdleCellCount
+	draw-as	=	LINE2
+	y-axis	=	"cell/sec"
+	units	=	"cell/sec"
+	legend	=	"Number of idle cells sent by the port"
+
+graph	jnxAtmIfUncorrHCSErrs
+	draw-as	=	LINE2
+	y-axis	=	"err/sec"
+	units	=	"err/sec"
+	legend	=	"Number of uncorrectable cell Header Check Sequence (HCS) Errors that occurred"
+
+graph	jnxAtmIfCorrHCSErrs
+	draw-as	=	LINE2
+	y-axis	=	"err/sec"
+	units	=	"err/sec"
+	legend	=	"Number of correctable cell Header Check Sequence (HCS) Errors that occurred"
+
+graph	jnxAtmIfTxCellFIFOOverRuns
+	draw-as	=	LINE2
+	y-axis	=	"overrun/sec"
+	units	=	"overrun/sec"
+	legend	=	"Number of overruns in the Transmit FIFO"
+
+graph	jnxAtmIfRxCellFIFOOverRuns
+	draw-as	=	LINE2
+	y-axis	=	"overrun/sec"
+	units	=	"overrun/sec"
+	legend	=	"Number of overruns in the Receive FIFO"
+
+graph	jnxAtmIfRxCellFIFOUnderRuns
+	draw-as	=	LINE2
+	y-axis	=	"underruns/sec"
+	units	=	"underruns/sec"
+	legend	=	"Number of underruns in the receive FIFO"
+
+graph	jnxAtmIfInInvalidVCCells
+	draw-as	=	LINE2
+	y-axis	=	"cell/sec"
+	units	=	"cell/sec"
+	legend	=	"Number of Cells that arrived for non existent VC"
+
+graph	jnxAtmIfInNoBufferOAMCells
+	draw-as	=	LINE2
+	y-axis	=	"cell/sec"
+	units	=	"cell/sec"
+	legend	=	"Number of received OAM cells or raw cells dropped because no buffers were available to handle them"
+
+graph	jnxAtmIfInNoBufDropPkts
+	draw-as	=	LINE2
+	y-axis	=	"pps"
+	units	=	"pps"
+	legend	=	"Number of AAL5 packets dropped because there was no enough buffer to handle them"
+
+graph	jnxAtmIfOutVCQueueDrops
+	draw-as	=	LINE2
+	y-axis	=	"pps"
+	units	=	"pps"
+	legend	=	"Number of packets dropped because of queue limits on each VC"
+
+graph	jnxAtmIfInBadCrcs
+	draw-as	=	LINE2
+	y-axis	=	"err/sec"
+	units	=	"err/sec"
+	legend	=	"Total number of incoming CRC errors"
+
+graph	jnxAtmIfInLenErrPkts
+	draw-as	=	LINE2
+	y-axis	=	"pps"
+	units	=	"pps"
+	legend	=	"Number of AAL5 packets dropped because their length was incorrect"
+
+graph	jnxAtmIfInTimeoutPkts
+	draw-as	=	LINE2
+	y-axis	=	"pps"
+	units	=	"pps"
+	legend	=	"Number of AAL5 packets dropped because of reassembly timeout"
+
+graph	jnxOperatingTemp
+	draw-as	=	AREA
+	y-axis	=	"°C"
+	units	=	"°C"
+	legend	=	"Temperature"
+
+graph	jnxOperatingCPU
+	draw-as	=	LINE2
+	y-min	=	0
+	y-max	=	100
+	y-axis	=	"%"
+	units	=	"%"
+	legend	=	"CPU utilization"
+
+graph	jnxOperatingISR
+	draw-as	=	LINE2
+	y-min	=	0
+	y-max	=	100
+	y-axis	=	"%"
+	units	=	"%"
+	legend	=	"CPU utilization spending in ISR"
+
+graph	jnxOperatingBuffer
+	draw-as	=	AREA
+	y-min	=	0
+	y-max	=	100
+	y-axis	=	"%"
+	units	=	"%"
+	legend	=	"Buffer pool utilization"
+
+graph	jnxOperatingHeap
+	draw-as	=	LINE2
+	y-min	=	0
+	y-max	=	100
+	y-axis	=	"%"
+	units	=	"%"
+	legend	=	"Heap utilization"
Index: plugins/genConfig/CiscoIOS.pm
===================================================================
RCS file: /cvsroot/soft/cougar/genDevConfig/plugins/genConfig/CiscoIOS.pm,v
retrieving revision 1.1
retrieving revision 1.1.2.1
diff -u -r1.1 -r1.1.2.1
--- plugins/genConfig/CiscoIOS.pm	19 Apr 2004 12:14:23 -0000	1.1
+++ plugins/genConfig/CiscoIOS.pm	19 Apr 2004 13:02:52 -0000	1.1.2.1
@@ -43,7 +43,8 @@
 # returned by the devices. The name is a regular expression.
 ###############################################################################
 my @types = ( 'IOS ',
-              '^C\d\d\d\d Software \('
+              '^C\d\d\d\d Software \(',
+              'Cisco Systems Catalyst'
             );
 
 ###############################################################################
@@ -144,6 +145,9 @@
 
        'CiscolocIfDescr'  => '1.3.6.1.4.1.9.2.2.1.1.28',
 
+       ### from Cisco ESSWITCH-MIB
+       'swPortName' => '1.3.6.1.4.1.437.1.1.3.3.1.1.3',
+
       );
 
 ###############################################################################
@@ -217,6 +221,8 @@
         $opts->{req_vlans} = 0 if ($opts->{req_vlans} && $opts->{sysDescr} !~ / C\d\d\d0 / && $opts->{vendor_soft_ver} lt "12.2");
 
 
+    } elsif ($opts->{sysDescr} =~ m/Cisco Systems Catalyst/) {
+        $opts->{vendor_descr_oid} = "swPortName";
     } else { ### Maybe it's a Micro Switch...
         $opts->{vendor_descr_oid} = "ifName";
     }
@@ -228,6 +234,9 @@
     if ($opts->{sysDescr} =~ /IOS/) {
         ($opts->{model}) = $opts->{sysDescr} =~ /IOS\s+\(tm\)\s+(\S+)/;
         Info("Found an IOS device: model: $opts->{model}");
+    } elsif ($opts->{sysDescr} =~ /Cisco Systems Catalyst/) {
+        ($opts->{model}) = $opts->{sysDescr} =~ /Cisco Systems Catalyst (\d+)/;
+        Info("Found an IOS device (alternate sysDescr) : $opts->{model}");
     } elsif ($opts->{sysDescr} =~ /C\d\d\d\d Software \(/ ) {
         ($opts->{model}) = $opts->{sysDescr} =~ /(\S+) Software \(/;
         Info("Found an IOS device (alternate sysDescr) : $opts->{model}");
@@ -254,6 +263,7 @@
     if  ($opts->{model} eq 'C3500XL' || $opts->{model} eq 'C2900XL') {
         $opts->{chassisttype} = 'Catalyst-XL-Switch';
         $opts->{chassisname} = 'Chassis';
+        $opts->{usev2c} = 1 if ($opts->{req_usev2c});
     } elsif ($opts->{model} eq "C3550") {
         $opts->{chassisttype} = 'Catalyst-3550-Switch';
         $opts->{chassisname} = 'Chassis';
@@ -262,6 +272,9 @@
         $opts->{chassisttype} = 'Catalyst-2950-Switch';
         $opts->{chassisname} = 'Chassis';
         $opts->{usev2c} = 1 if ($opts->{req_usev2c});
+    } elsif ($opts->{model} eq "1900") {
+        $opts->{chassisttype} = 'Catalyst-1900-Switch';
+        $opts->{chassisname} = 'Chassis';
     } elsif ($opts->{model} eq "7500") {
         $opts->{chassisttype} = 'Cisco-7500-Router';
         $opts->{chassisname} = 'Chassis';
@@ -758,6 +771,9 @@
 
         # Override global classification to only apply minimal thresholds
         $class = '-access' if (($iftype{$index} == 81 ) || ($iftype{$index} == 77) || ($iftype{$index} == 23)); # ISDN
+
+        ### Cisco Catalyst 1900 Switch
+        $class = '-c1900' if ($opts->{model} eq "1900");
 
         # Apply logic for filtering --gigonly interfaces
         next if ($opts->{gigonly} && int($ifspeed{$index}) != 1000000000 );
Index: plugins/genConfig/JUNOS.pm
===================================================================
RCS file: plugins/genConfig/JUNOS.pm
diff -N plugins/genConfig/JUNOS.pm
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ plugins/genConfig/JUNOS.pm	18 May 2004 07:15:37 -0000	1.1.2.2
@@ -0,0 +1,474 @@
+;# -*-perl-*-
+#    genRtrConfig JUNOS plugin module
+#
+#    Copyright (C) 2003 Cougar < cougar @ random . ee >
+#
+#    This program is free software; you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation; either version 2 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program; if not, write to the Free Software
+#    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+package JUNOS;
+
+use strict;
+
+use Common::Log;
+use genConfig::Utils;
+use genConfig::File;
+use genConfig::SNMP;
+
+### Start package init
+
+use genConfig::Plugin;
+
+our @ISA = qw(genConfig::Plugin);
+
+my $VERSION = 1.0;
+
+### End package init
+
+
+###############################################################################
+# These are device types we can handle in this plugin
+# the names should be contained in the sysdescr string
+# returned by the devices. The name is a regular expression.
+###############################################################################
+my @types = (
+	'Juniper M\d+ router',
+	'Juniper m\d+ Internet Backbone Router'
+);
+
+# These are the OIDS used by this plugin
+# the OIDS should only be those necessary for index mapping or
+# recognizing if a feature is supported or not by the device.
+my %OIDS = (
+
+	### mib-jnx-mpls.txt (original by Kevin Stewart 8 Jan 2002)
+
+	'mplsLspName'			=>	'1.3.6.1.4.1.2636.3.2.3.1.1',
+	'mplsLspOctets'			=>	'1.3.6.1.4.1.2636.3.2.3.1.3',
+	'mplsLspPackets'		=>	'1.3.6.1.4.1.2636.3.2.3.1.4',
+
+	### mib-jnx-firewall.txt
+
+	'jnxFWCounterDisplayFilterName'	=>	'1.3.6.1.4.1.2636.3.5.2.1.6',
+	'jnxFWCounterDisplayName'	=>	'1.3.6.1.4.1.2636.3.5.2.1.7',
+	'jnxFWCounterDisplayType'	=>	'1.3.6.1.4.1.2636.3.5.2.1.8',
+
+	### mib-jnx-chassis.txt
+
+#	'jnxBoxSerialNo'		=>	'1.3.6.1.4.1.2636.3.1.3.0',
+
+	'jnxContainersIndex'		=>	'1.3.6.1.4.1.2636.3.1.6.1.1',
+	'jnxContentsSerialNo'		=>	'1.3.6.1.4.1.2636.3.1.8.1.7',
+	'jnxContentsRevision'		=>	'1.3.6.1.4.1.2636.3.1.8.1.8',
+	'jnxContentsPartNo'		=>	'1.3.6.1.4.1.2636.3.1.8.1.10',
+
+	'jnxOperatingDescr'		=>	'1.3.6.1.4.1.2636.3.1.13.1.5',
+	'jnxOperatingState'		=>	'1.3.6.1.4.1.2636.3.1.13.1.6',
+	'jnxOperatingMemory'		=>	'1.3.6.1.4.1.2636.3.1.13.1.15',
+
+	'jnxFruType'			=>	'1.3.6.1.4.1.2636.3.1.15.1.6'
+);
+
+my %jnxFruType_d = (
+	'1'	=>	'other',
+	'2'	=>	'clockGenerator',
+	'3'	=>	'flexiblePicConcentrator',
+	'4'	=>	'switchingAndForwardingModule',
+	'5'	=>	'controlBoard',
+	'6'	=>	'routingEngine',
+	'7'	=>	'powerEntryModule',
+	'8'	=>	'frontPanelModule',
+	'9'	=>	'switchInterfaceBoard',
+	'10'	=>	'processorMezzanineBoardForSIB',
+	'11'	=>	'portInterfaceCard',
+	'12'	=>	'craftInterfacePanel',
+	'13'	=>	'fan'
+);
+
+###############################################################################
+### Private variables
+###############################################################################
+
+#my $snmp;
+
+#my $script = "JUNOS genDevConfig Module";
+
+###############################################################################
+###############################################################################
+
+#-------------------------------------------------------------------------------
+# device_types
+# IN : N/A
+# OUT: returns an array ref of devices this plugin can handle
+#-------------------------------------------------------------------------------
+
+sub device_types {
+	my $self = shift;
+	return \@types;
+}
+
+#-------------------------------------------------------------------------------
+# can_handle
+# IN : opts reference
+# OUT: returns a true if the device can be handled by this plugin
+#-------------------------------------------------------------------------------
+
+sub can_handle {
+	my($self, $opts) = @_;
+
+	return (grep { $opts->{sysDescr} =~ m/$_/gi } @types)
+
+}
+
+#-------------------------------------------------------------------------------
+# discover
+# IN : options reference
+# OUT: N/A
+#-------------------------------------------------------------------------------
+
+sub discover {
+	my($self, $opts) = @_;
+
+	### Add our OIDs to the the global OID list
+
+	register_oids(%OIDS);
+
+	###
+	### START DEVICE DISCOVERY SECTION
+	###
+
+	$opts->{vendor_descr_oid} = "ifAlias";
+
+	($opts->{vendor_soft_ver}) = ($opts->{sysDescr} =~ m/Version\s+([\d\.]+)\(\d/o);
+
+	if (($opts->{sysDescr} =~ /Juniper M\d+ router/) ||
+	    ($opts->{sysDescr} =~ /Juniper m\d+ Internet Backbone Router/)) {
+		($opts->{model}) = $opts->{sysDescr} =~ / (m\d+) /i;
+		Info("Found an JUNOS device: model: $opts->{model}");
+	}
+
+	$opts->{chassisttype} = 'Juniper-Generic';
+	$opts->{chassisname} = 'Chassis-Juniper';
+	$opts->{usev2c} = 1 if ($opts->{req_usev2c});
+
+	# Default feature promotions for JUNOS Devices
+	$opts->{juniperbox} = 1 if ($opts->{req_vendorbox});
+	$opts->{juniperint} = 1 if ($opts->{req_vendorint});
+	$opts->{class} = 'juniper';
+
+	# Don't create default chassis target
+	$opts->{chassisstats} = 0;
+
+	return;
+}
+
+#-------------------------------------------------------------------------------
+# custom_targets
+# IN : data reference for transient data, options reference
+# OUT: N/A
+#-------------------------------------------------------------------------------
+
+sub custom_targets {
+	my ($self,$data,$opts) = @_;
+
+	# Saving local copies of runtime data
+	my %ifspeed    = %{$data->{ifspeed}};
+	my %ifdescr    = %{$data->{ifdescr}};
+	my %intdescr   = %{$data->{intdescr}};
+	my %iftype     = %{$data->{iftype}};
+	my %ifmtu      = %{$data->{ifmtu}};
+	my %slotPortMapping   = %{$data->{slotPortMapping}};
+	my $file = $opts->{file};
+
+	###
+	### START DEVICE CUSTOM CONFIG SECTION
+	###
+
+	my %jnx_box = gettable('jnxOperatingDescr');
+
+	if (keys(%jnx_box)) {
+		my $key;
+		my ($containerindex, $l1index, $l2index, $l3index);
+		my $filename;
+		my ($sdesc, $ldesc);
+		my $target;
+		my $ttype;
+
+		my %operstate = gettable('jnxOperatingState');
+		my %serialno = gettable('jnxContentsSerialNo');
+		my %revno = gettable('jnxContentsRevision');
+		my %partno = gettable('jnxContentsPartNo');
+		my %frutype = gettable('jnxFruType');
+		my %opermem = gettable('jnxOperatingMemory');
+
+		foreach $key (sort keys(%jnx_box)) {
+			next if ($operstate{$key} != 2);
+
+			($containerindex, $l1index, $l2index, $l3index) = split /\./, $key;
+
+			my $frutyped = $jnxFruType_d{$frutype{$key}} if (defined $frutype{$key});
+
+			if ($jnx_box{$key} eq 'midplane') {
+				next;
+			} elsif ($jnx_box{$key} eq 'backplane') {
+				$ttype = 'backplane';
+			} elsif ($frutyped eq 'powerEntryModule') {
+				$ttype = 'powersupply';
+			} elsif ($frutyped eq 'controlBoard') {
+				$ttype = 'ssb';
+			} elsif ($frutyped eq 'flexiblePicConcentrator') {
+				$ttype = 'fpc';
+			} elsif ($frutyped eq 'portInterfaceCard') {
+				$ttype = 'pic';
+			} elsif ($frutyped eq 'routingEngine') {
+				$ttype = 're';
+			} else {
+				next;
+			}
+
+			$target = "chassis_" . $key;
+
+			$sdesc = "$jnx_box{$key}";
+			$sdesc .= " ($opermem{$key} MB)" if ($opermem{$key});
+
+			$ldesc = "$jnx_box{$key}";
+			$ldesc .= "<BR>Serial number: $serialno{$key}" if ($serialno{$key} ne "");
+			$ldesc .= "<BR>Revision: $revno{$key}" if ($revno{$key} ne "");
+			$ldesc .= "<BR>Part number: $partno{$key}" if ($partno{$key} ne "");
+			$ldesc .= "<BR>Installed memory: $opermem{$key} MB" if ($opermem{$key});
+
+			my @config = ();
+
+			push(@config,
+				'order'		=>	$opts->{order},
+				'display-name'	=>	"%router% chassis",
+				'short-desc'	=>	$sdesc,
+				'long-desc'	=>	$ldesc,
+				'inst'		=>	0,
+				'rest'		=>	$key,
+				'target-type'	=>	'juniper-chassis-' . $ttype,
+			);
+			$file->writetarget($target , '', @config);
+
+			$opts->{order} -= 1;
+		}
+	}
+
+
+	my %jnx_fwfilters = gettable('jnxFWCounterDisplayFilterName');
+
+	if (keys(%jnx_fwfilters)) {
+		my $key;
+		my $filter;
+		my $lastfilter = "";
+		my $filterdec;
+
+		my %jnx_fwcounters = gettable('jnxFWCounterDisplayName');
+		my %jnx_fwtypes = gettable('jnxFWCounterDisplayType');
+
+		foreach $key (sort keys(%jnx_fwfilters)) {
+			my $filter = $jnx_fwfilters{$key};
+
+			if ($filter ne $lastfilter) {
+				($filterdec = $filter) =~ s/(.)/("." . ord($1))/eg;
+				$filterdec = length($filter) . $filterdec;
+			}
+			$lastfilter = $filter;
+
+			my $counter = $jnx_fwcounters{$key};
+			(my $counterdec = $counter) =~ s/(.)/("." . ord($1))/eg;
+			$counterdec = length($counter) . $counterdec;
+
+			my $ttype;
+			if ($jnx_fwtypes{$key} == 2) {
+				$ttype = "counter";
+			} elsif ($jnx_fwtypes{$key} == 3) {
+				$ttype = "policer";
+			} else {
+				Error ("Unknown jnxFWCounter type $jnx_fwtypes{$key}, please FIX!");
+				next;
+			}
+
+			my $target = "firewall_${filter}_${counter}";
+			my $sdesc = "$ttype: $filter - $counter";
+			my $ldesc = "$ttype:<BR>Filter: $filter<BR>Counter: $counter";
+
+			my @config = ();
+
+			push(@config,
+				'order'		=>	$opts->{order},
+				'display-name'	=>	"%router% $filter  $counter",
+				'short-desc'	=>	$sdesc,
+				'long-desc'	=>	$ldesc,
+				'inst'		=>	0,
+				'filtername'	=>	$filterdec,
+				'countername'	=>	$counterdec,
+				'fwtype'	=>	$jnx_fwtypes{$key},
+				'target-type'	=>	'juniper-firewall-' . $ttype,
+			);
+			$file->writetarget($target , '', @config);
+
+			$opts->{order} -= 1;
+		}
+	}
+
+	### Build Juniper MPLS Tunnel statistics
+
+	my %junipermplslspname = gettable('mplsLspName');
+
+	if (keys(%junipermplslspname)) {
+		my $key;
+
+		foreach $key (keys(%junipermplslspname)) {
+			my @config = ();
+			push(@config,
+				'tunnel-name'	=>	$junipermplslspname{$key},
+				'inst'		=>	"\"(\'$key\')\"",
+				'order'		=>	$opts{order},
+				'display-name'	=>	'%tunnel-name%',
+				'interface-name'=>	'%tunnel-name%',
+				'long-desc'	=>	'%tunnel-name%',
+				'target-type'	=>	'juniper-mpls-tunnel'
+			);
+			$file->writetarget($junipermplslspname{$key}, '', @config);
+		}
+		$opts{order} -= 1;
+	}
+
+	# Saving local copies of runtime data
+	%{$data->{ifspeed}} = %ifspeed;
+	%{$data->{ifdescr}} = %ifdescr;
+	%{$data->{intdescr}} = %intdescr;
+	%{$data->{iftype}} = %iftype;
+	%{$data->{ifmtu}} = %ifmtu;
+	%{$data->{slotPortMapping}} = %slotPortMapping;
+
+	return;
+}
+
+#-------------------------------------------------------------------------------
+# custom_interfaces
+# IN : current ifIndex, 
+#      data reference for transient data
+#      options reference
+# OUT: N/A
+#-------------------------------------------------------------------------------
+
+sub custom_interfaces {
+	my ($self,$index,$data,$opts) = @_;
+
+	# Saving local copies of runtime data
+	my %ifspeed    = %{$data->{ifspeed}};
+	my %ifdescr    = %{$data->{ifdescr}};
+	my %intdescr   = %{$data->{intdescr}};
+	my %iftype     = %{$data->{iftype}};
+	my %ifmtu      = %{$data->{ifmtu}};
+	my %slotPortMapping   = %{$data->{slotPortMapping}};
+	my @config     = @{$data->{config}};
+	my $hc         = $data->{hc};
+	my $class      = $data->{class};
+	my $match      = $data->{match};
+	my $customsdesc = $data->{customsdesc};
+	my $customldesc = $data->{customldesc};
+	my $customfile = $data->{customfile};
+
+	###
+	### START DEVICE CUSTOM INTERFACE CONFIG SECTION
+	###
+
+	if ($iftype{$index} == 32 &&  $ifdescr{$index} =~ /\.\d+$/) {
+
+		push(@config, 'target-type' => 'juniper-sub-interface' . $hc);
+		$match = 1;
+
+		$ifmtu{$index} = 1 if (!defined($ifmtu{$index}) || $ifmtu{$index} == 0);
+
+	} elsif ($iftype{$index} == 6 &&  $ifdescr{$index} =~ /^fxp\d/) {
+
+		push(@config, 'target-type' => 'juniper-standard-interface-hc');
+		$match = 1;
+
+	} elsif ($iftype{$index} == 37) {
+
+		push(@config, 'target-type' => 'juniper-atm-interface-hc');
+		$match = 1;
+
+	}  elsif ($iftype{$index} == 135) {
+
+		### VLANs
+
+		push(@config, 'target-type' => 'juniper-sub-interface-hc');
+		$match = 1;
+
+	}  elsif ($opts->{juniperint}) {
+
+		# Apply logic for filtering --gigonly interfaces
+		next if ($opts->{gigonly} && int($ifspeed{$index}) != 1000000000 );
+
+		push(@config, 'target-type' => 'juniper-interface-hc');
+		$match = 1;
+	}
+
+	###
+	### END INTERFACE CUSTOM CONFIG SECTION
+	###
+
+	# Saving local copies of runtime data
+	%{$data->{ifspeed}}  = %ifspeed;
+	%{$data->{ifdescr}}  = %ifdescr;
+	%{$data->{intdescr}} = %intdescr;
+	%{$data->{iftype}}   = %iftype;
+	%{$data->{ifmtu}}    = %ifmtu;
+	%{$data->{slotPortMapping}} = %slotPortMapping;
+	@{$data->{config}} = @config;
+	$data->{hc}     = $hc;
+	$data->{class}  = $class;
+	$data->{match}  = $match;
+	$data->{customsdesc} = $customsdesc;
+	$data->{customldesc} = $customldesc;
+	$data->{customfile} = $customfile;
+
+	return;
+}
+
+#-------------------------------------------------------------------------------
+# custom_files
+# IN : options hash
+# OUT: returns the options hash
+#-------------------------------------------------------------------------------
+
+sub custom_files {
+	my ($self,$data,$opts) = @_;
+
+	# Saving local copies of runtime data
+	my $customfile     = $data->{customfile};
+	my $file           = $data->{file};
+	my $c              = $data->{c};
+	my $target         = $data->{target};
+	my @config         = @{$data->{config}};
+	my $wmatch         = $data->{wmatch};
+
+	###
+	### START FILE CUSTOM CONFIG SECTION
+	###
+
+	###
+	### END FILE CUSTOM CONFIG SECTION
+	###
+
+	# Save return value in the reference hash
+	$data->{wmatch}  = $wmatch;
+}
+
+1;
Index: util/genDevConfig
===================================================================
RCS file: /cvsroot/soft/cougar/genDevConfig/util/genDevConfig,v
retrieving revision 1.1
retrieving revision 1.1.2.2
diff -u -r1.1 -r1.1.2.2
--- util/genDevConfig	19 Apr 2004 12:14:24 -0000	1.1
+++ util/genDevConfig	18 May 2004 07:15:38 -0000	1.1.2.2
@@ -379,7 +379,7 @@
 # under IOS 12.0.7T rather than the expected type 131.  Adding 'Tunnel.*' to
 # this list works around this bug by overriding based on the interface name.
 
-my @EXCEPTIONS = ('Channel','Tunnel','ge-','fe-','fxp');
+my @EXCEPTIONS = ('Channel','Tunnel','ge-','fe-','fxp','at-');
 
 ###############################################################################
 ### MIB OID definitions.
@@ -451,12 +451,6 @@
        'portIfIndex'               => '1.3.6.1.4.1.9.5.1.4.1.1.11',
        'portName'                  => '1.3.6.1.4.1.9.5.1.4.1.1.4',
 
-       ### from JuniperMIB.jnxMibs.mpls.mplsLspList.mplsLspEntry by Kevin Stewart 8 Jan 2002
-
-       'mplsLspName'        =>      '1.3.6.1.4.1.2636.3.2.3.1.1',
-#       'mplsLspOctets'      =>      '1.3.6.1.4.1.2636.3.2.3.1.3',
-#       'mplsLspPackets'     =>      '1.3.6.1.4.1.2636.3.2.3.1.4',
-
         ### Packeteer OIDs
         'partitionMinimumBps'     => '1.3.6.1.4.1.2334.2.1.3.2.1.24',
         'classFullName'           => '1.3.6.1.4.1.2334.2.1.4.2.1.36',
@@ -816,19 +810,6 @@
     $opts{class} = 'cisco';
 }
 
-### JUNIPER GENERIC SECTION
-### Figure out which oid to use to get interface descriptions and which
-### MIBs are supported.
-###
-
-if ($opts{sysDescr} =~ /m\d0 internet router/) {
-
-    $opts{model} = 'Juniper-Generic';
-    # if $opts{vendor_soft_ver} ge "???";
-    $opts{juniperbox} = 1    if ($opts{req_vendorbox});
-    $opts{class} = 'juniper';
-}
-
 ### CONTIVITY GENERIC SECTION
 ### Uses standard MIB 2 but does not ignore tunnel interfaces
 ###
@@ -917,10 +898,6 @@
         $opts{chassisttype} = 'Cisco-Aironet';
         $opts{chassisname} = 'Chassis-Generic';
         $opts{collect} = 0;
-    } elsif ($opts{model} =~ /Juniper-Generic/) {
-        $opts{chassisttype} = 'Cisco-Generic-Router';
-        $opts{chassisname} = 'Chassis-Generic';
-        $opts{usev2c} = 1 if ($opts{req_usev2c});
     } elsif ($opts{model} =~ /CatOS-Generic/) {
         $opts{chassisttype} = 'Catalyst-Generic-Switch';
         $opts{chassisname} = 'Chassis-Catalyst';
@@ -1002,14 +979,6 @@
 # Global Mapping Hash
 my %slotPortMapping;
 
-### Walk mplsLspName if this is a Juniper router
-### Traffic shaping counters based on CAR
-
-my %junipermplslspname;
-if ($opts{juniperbox}) {
-    %junipermplslspname = gettable('mplsLspName');
-}
-
 ### Statistics from Packeteer
 ### Traffic shaping counters based on CAR
 
@@ -1252,27 +1221,6 @@
     $opts{order} -= 1;
 }
 
-### Build Juniper MPLS Tunnel statistics
-
-if ($opts{juniperbox} && keys(%junipermplslspname)) {
-    my $key;
-
-    foreach $key (keys(%junipermplslspname)) {
-        my @config = ();
-        push(@config,
-        'tunnel-name'   =>      $junipermplslspname{$key},
-        'inst'          =>      "\"(\'$key\')\"",
-        'order'         =>      $opts{order},
-        'display-name'  =>      '%tunnel-name%',
-        'interface-name'=>      '%tunnel-name%',
-        'long-desc'     =>      '%tunnel-name%',
-        'target-type'   =>      'juniper-mpls-tunnel'
-        );
-        $file->writetarget($junipermplslspname{$key}, '', @config);
-    }
-    $opts{order} -= 1;
-}
-
 ### Build Packeteer class statistics
 
 if ($opts{Packeteer} && keys(%classFullName)) {
@@ -1569,7 +1517,8 @@
         }
         $match = 1;
 
-    }  elsif ($iftype{$index} == 135 ) {      # Ethernet 802.1Q sub-interface
+    }  elsif (($iftype{$index} == 135) &&
+              !$opts{juniperbox}) {      # Ethernet 802.1Q sub-interface
 
         ### If it is a sub-interface, only collect in & out stats
 
@@ -1724,6 +1673,10 @@
         $header .= "\n### - No VLAN collection, use --vlans should you want them.\n";
         $c="# ";
         Debug (" VLANs not collected");
+    } elsif ($ifdescr{$index} =~ /^CPU/i) {
+        $header .= "\n### - No CPU collection\n";
+        $c="# ";
+        Debug (" CPUs not collected");
     } elsif (grep(/^$iftype{$index}$/,@DONTCOLLECT) && !override($index)) {
         $header .= "\n### - InterfaceType that is not collected.\n";
         $c="# ";
@@ -1812,9 +1765,11 @@
     my($index) = @_;
 
     foreach my $regx (@EXCEPTIONS) {
-         Debug (" Collecting due to exceptions: @EXCEPTIONS")
-           if ($ifType_d{$iftype{$index}} =~ /$regx/i);
-         return 1 if ($ifType_d{$iftype{$index}} =~ /$regx/i);
+        if (($ifType_d{$iftype{$index}} =~ /$regx/i) ||
+            ($ifdescr{$index} =~ /$regx/i)) {
+            Debug (" Collecting due to exceptions: @EXCEPTIONS");
+            return 1;
+        }
     }
 
     return 0;
