Commits

stingh711  committed 97a4dbd

change to another properties file

  • Participants
  • Parent commits e09f7a6

Comments (0)

Files changed (18)

         </copy>
         <copy file="${src}/start.bat" todir="${dist}/agent"/>
 		<copy file="config.properties" todir="${dist}/agent"/>
+        <copy file="c.properties" todir="${dist}/agent"/>
         <jar jarfile="${dist}/agent/agent.jar" basedir="${build}"/>
 	</target>
 	<target name="clean">
 		<zip destfile="${dist}/agent.zip">
             <zipfileset dir="${src}" prefix="src"/>
             <zipfileset dir="${lib}" prefix="lib"/>
-            <zipfileset dir="." includes="build.xml config.properties"/>
+            <zipfileset dir="." includes="build.xml config.properties c.properties"/>
 		</zip>
 	</target>
 </project>

File c.properties

-device.number = 3
-device.1.ip = 192.168.1.33
-device.1.type = Switch
-device.1.model = GS2200-24
-device.1.mac = 00:a0:c5:00:00:33
-device.1.portnumber = 24
-device.2.ip = 192.168.1.34
-device.2.type = Switch
-device.2.model = GS2200-48
-device.2.mac = 00:a0:c5:00:00:34
-device.2.portnumber = 48
-device.3.ip = 192.168.1.100
-device.3.type = Host
-device.3.mac = 00:a0:c5:00:00:35
+agent.ip=172.25.21.47/161
+
+mac=00:a0:c5:00:00:11
+cpu.usage=60
+mem.usage=60
+session.active=1000
+session.max=10000
+cpu.temperature=80
+host.active=100
+
+device.number=2
+device.1.ip=192.168.1.33
+device.1.type=Switch
+device.1.model=GS2200-24
+device.1.mac=00:a0:c5:00:00:33
+device.1.portnumber=24
+device.2.ip=192.168.1.100
+device.2.type=Host
+device.2.mac=00:a0:c5:00:00:35
 #switch QS info data
-switch.number = 2
+switch.number = 1
 switch.1.ip=192.168.1.33
 switch.1.cpu.usage=10
 switch.1.mem.usage=30
 switch.1.broadcast.rate=10
 switch.1.voltage=15
 switch.1.cpu.temperature=70
-switch.2.ip=192.168.1.34
-switch.2.cpu.usage=30
-switch.2.mem.usage=30
-switch.2.broadcast.rate=50
-switch.2.voltage=25
-switch.2.cpu.temperature=80
 
-switch.192.168.1.33.interface.1.table.mac=00:13:49:11:11:01
-switch.192.168.1.33.interface.1.table.in=9859485
-switch.192.168.1.33.interface.1.table.out=934
-switch.192.168.1.33.interface.2.table.mac=00:13:49:11:11:02
-switch.192.168.1.33.interface.2.table.in=0
-switch.192.168.1.33.interface.2.table.out=0
-switch.192.168.1.33.interface.3.table.mac=00:13:49:11:11:03
-switch.192.168.1.33.interface.3.table.in=0
-switch.192.168.1.33.interface.3.table.out=0
-switch.192.168.1.33.interface.4.table.mac=00:13:49:11:11:04
-switch.192.168.1.33.interface.4.table.in=0
-switch.192.168.1.33.interface.4.table.out=0
-switch.192.168.1.33.interface.5.table.mac=00:13:49:11:11:05
-switch.192.168.1.33.interface.5.table.in=0
-switch.192.168.1.33.interface.5.table.out=0
-switch.192.168.1.33.interface.6.table.mac=00:13:49:11:11:06
-switch.192.168.1.33.interface.6.table.in=0
-switch.192.168.1.33.interface.6.table.out=0
-switch.192.168.1.33.interface.7.table.mac=00:13:49:11:11:07
-switch.192.168.1.33.interface.7.table.in=0
-switch.192.168.1.33.interface.7.table.out=0
-switch.192.168.1.33.interface.8.table.mac=00:13:49:11:11:08
-switch.192.168.1.33.interface.8.table.in=0
-switch.192.168.1.33.interface.8.table.out=0
-switch.192.168.1.33.interface.9.table.mac=00:13:49:11:11:09
-switch.192.168.1.33.interface.9.table.in=0
-switch.192.168.1.33.interface.9.table.out=0
-switch.192.168.1.33.interface.10.table.mac=00:13:49:11:11:0a
-switch.192.168.1.33.interface.10.table.in=0
-switch.192.168.1.33.interface.10.table.out=0
-switch.192.168.1.33.interface.11.table.mac=00:13:49:11:11:0b
-switch.192.168.1.33.interface.11.table.in=0
-switch.192.168.1.33.interface.11.table.out=0
-switch.192.168.1.33.interface.12.table.mac=00:13:49:11:11:0c
-switch.192.168.1.33.interface.12.table.in=0
-switch.192.168.1.33.interface.12.table.out=0
-switch.192.168.1.33.interface.13.table.mac=00:13:49:11:11:0d
-switch.192.168.1.33.interface.13.table.in=0
-switch.192.168.1.33.interface.13.table.out=0
-switch.192.168.1.33.interface.14.table.mac=00:13:49:11:11:0e
-switch.192.168.1.33.interface.14.table.in=0
-switch.192.168.1.33.interface.14.table.out=0
-switch.192.168.1.33.interface.15.table.mac=00:13:49:11:11:0f
-switch.192.168.1.33.interface.15.table.in=0
-switch.192.168.1.33.interface.15.table.out=0
-switch.192.168.1.33.interface.16.table.mac=00:13:49:11:11:10
-switch.192.168.1.33.interface.16.table.in=0
-switch.192.168.1.33.interface.16.table.out=0
-switch.192.168.1.33.interface.17.table.mac=00:13:49:11:11:11
-switch.192.168.1.33.interface.17.table.in=0
-switch.192.168.1.33.interface.17.table.out=0
-switch.192.168.1.33.interface.18.table.mac=00:13:49:11:11:12
-switch.192.168.1.33.interface.18.table.in=0
-switch.192.168.1.33.interface.18.table.out=0
-switch.192.168.1.33.interface.19.table.mac=00:13:49:11:11:13
-switch.192.168.1.33.interface.19.table.in=0
-switch.192.168.1.33.interface.19.table.out=0
-switch.192.168.1.33.interface.20.table.mac=00:13:49:11:11:14
-switch.192.168.1.33.interface.20.table.in=0
-switch.192.168.1.33.interface.20.table.out=0
-switch.192.168.1.33.interface.21.table.mac=00:13:49:11:11:15
-switch.192.168.1.33.interface.21.table.in=0
-switch.192.168.1.33.interface.21.table.out=0
-switch.192.168.1.33.interface.22.table.mac=00:13:49:11:11:16
-switch.192.168.1.33.interface.22.table.in=0
-switch.192.168.1.33.interface.22.table.out=0
-switch.192.168.1.33.interface.23.table.mac=00:13:49:11:11:17
-switch.192.168.1.33.interface.23.table.in=0
-switch.192.168.1.33.interface.23.table.out=0
-switch.192.168.1.33.interface.24.table.mac=00:13:49:11:11:18
-switch.192.168.1.33.interface.24.table.in=0
-switch.192.168.1.33.interface.24.table.out=0
-switch.192.168.1.33.interface.25.table.mac=00:13:49:11:11:19
-switch.192.168.1.33.interface.25.table.in=0
-switch.192.168.1.33.interface.25.table.out=0
-switch.192.168.1.33.interface.26.table.mac=00:13:49:11:11:1a
-switch.192.168.1.33.interface.26.table.in=0
-switch.192.168.1.33.interface.26.table.out=0
-switch.192.168.1.33.interface.27.table.mac=00:13:49:11:11:1b
-switch.192.168.1.33.interface.27.table.in=0
-switch.192.168.1.33.interface.27.table.out=0
-switch.192.168.1.33.interface.28.table.mac=00:13:49:11:11:1c
-switch.192.168.1.33.interface.28.table.in=0
-switch.192.168.1.33.interface.28.table.out=0
-switch.192.168.1.33.interface.29.table.mac=00:13:49:11:11:1d
-switch.192.168.1.33.interface.29.table.in=0
-switch.192.168.1.33.interface.29.table.out=0
-switch.192.168.1.33.interface.30.table.mac=00:13:49:11:11:1e
-switch.192.168.1.33.interface.30.table.in=0
-switch.192.168.1.33.interface.30.table.out=0
-switch.192.168.1.33.interface.31.table.mac=00:13:49:11:11:1f
-switch.192.168.1.33.interface.31.table.in=0
-switch.192.168.1.33.interface.31.table.out=0
-switch.192.168.1.33.interface.32.table.mac=00:13:49:11:11:20
-switch.192.168.1.33.interface.32.table.in=0
-switch.192.168.1.33.interface.32.table.out=0
-switch.192.168.1.33.interface.33.table.mac=00:13:49:11:11:21
-switch.192.168.1.33.interface.33.table.in=0
-switch.192.168.1.33.interface.33.table.out=0
-switch.192.168.1.33.interface.34.table.mac=00:13:49:11:11:22
-switch.192.168.1.33.interface.34.table.in=0
-switch.192.168.1.33.interface.34.table.out=0
-switch.192.168.1.33.interface.35.table.mac=00:13:49:11:11:23
-switch.192.168.1.33.interface.35.table.in=0
-switch.192.168.1.33.interface.35.table.out=0
-switch.192.168.1.33.interface.36.table.mac=00:13:49:11:11:24
-switch.192.168.1.33.interface.36.table.in=0
-switch.192.168.1.33.interface.36.table.out=0
-switch.192.168.1.33.interface.37.table.mac=00:13:49:11:11:25
-switch.192.168.1.33.interface.37.table.in=0
-switch.192.168.1.33.interface.37.table.out=0
-switch.192.168.1.33.interface.38.table.mac=00:13:49:11:11:26
-switch.192.168.1.33.interface.38.table.in=0
-switch.192.168.1.33.interface.38.table.out=0
-switch.192.168.1.33.interface.39.table.mac=00:13:49:11:11:27
-switch.192.168.1.33.interface.39.table.in=0
-switch.192.168.1.33.interface.39.table.out=0
-switch.192.168.1.33.interface.40.table.mac=00:13:49:11:11:28
-switch.192.168.1.33.interface.40.table.in=0
-switch.192.168.1.33.interface.40.table.out=0
-switch.192.168.1.33.interface.41.table.mac=00:13:49:11:11:29
-switch.192.168.1.33.interface.41.table.in=0
-switch.192.168.1.33.interface.41.table.out=0
-switch.192.168.1.33.interface.42.table.mac=00:13:49:11:11:30
-switch.192.168.1.33.interface.42.table.in=0
-switch.192.168.1.33.interface.42.table.out=0
-switch.192.168.1.33.interface.43.table.mac=00:13:49:11:11:31
-switch.192.168.1.33.interface.43.table.in=0
-switch.192.168.1.33.interface.43.table.out=0
-switch.192.168.1.33.interface.44.table.mac=00:13:49:11:11:32
-switch.192.168.1.33.interface.44.table.in=0
-switch.192.168.1.33.interface.44.table.out=0
-switch.192.168.1.33.interface.45.table.mac=00:13:49:11:11:33
-switch.192.168.1.33.interface.45.table.in=0
-switch.192.168.1.33.interface.45.table.out=0
-switch.192.168.1.33.interface.46.table.mac=00:13:49:11:11:34
-switch.192.168.1.33.interface.46.table.in=0
-switch.192.168.1.33.interface.46.table.out=0
-switch.192.168.1.33.interface.47.table.mac=00:13:49:11:11:35
-switch.192.168.1.33.interface.47.table.in=0
-switch.192.168.1.33.interface.47.table.out=0
-switch.192.168.1.33.interface.48.table.mac=00:13:49:11:11:36
-switch.192.168.1.33.interface.48.table.in=0
-switch.192.168.1.33.interface.48.table.out=0
+switch.192.168.1.33.interface.1.mac=00:13:49:11:11:01
+switch.192.168.1.33.interface.1.in=9859485
+switch.192.168.1.33.interface.1.out=934
+switch.192.168.1.33.interface.2.mac=00:13:49:11:11:02
+switch.192.168.1.33.interface.2.in=0
+switch.192.168.1.33.interface.2.out=0
+switch.192.168.1.33.interface.3.mac=00:13:49:11:11:03
+switch.192.168.1.33.interface.3.in=0
+switch.192.168.1.33.interface.3.out=0
+switch.192.168.1.33.interface.4.mac=00:13:49:11:11:04
+switch.192.168.1.33.interface.4.in=0
+switch.192.168.1.33.interface.4.out=0
+switch.192.168.1.33.interface.5.mac=00:13:49:11:11:05
+switch.192.168.1.33.interface.5.in=0
+switch.192.168.1.33.interface.5.out=0
+switch.192.168.1.33.interface.6.mac=00:13:49:11:11:06
+switch.192.168.1.33.interface.6.in=0
+switch.192.168.1.33.interface.6.out=0
+switch.192.168.1.33.interface.7.mac=00:13:49:11:11:07
+switch.192.168.1.33.interface.7.in=0
+switch.192.168.1.33.interface.7.out=0
+switch.192.168.1.33.interface.8.mac=00:13:49:11:11:08
+switch.192.168.1.33.interface.8.in=0
+switch.192.168.1.33.interface.8.out=0
+switch.192.168.1.33.interface.9.mac=00:13:49:11:11:09
+switch.192.168.1.33.interface.9.in=0
+switch.192.168.1.33.interface.9.out=0
+switch.192.168.1.33.interface.10.mac=00:13:49:11:11:0a
+switch.192.168.1.33.interface.10.in=0
+switch.192.168.1.33.interface.10.out=0
+switch.192.168.1.33.interface.11.mac=00:13:49:11:11:0b
+switch.192.168.1.33.interface.11.in=0
+switch.192.168.1.33.interface.11.out=0
+switch.192.168.1.33.interface.12.mac=00:13:49:11:11:0c
+switch.192.168.1.33.interface.12.in=0
+switch.192.168.1.33.interface.12.out=0
+switch.192.168.1.33.interface.13.mac=00:13:49:11:11:0d
+switch.192.168.1.33.interface.13.in=0
+switch.192.168.1.33.interface.13.out=0
+switch.192.168.1.33.interface.14.mac=00:13:49:11:11:0e
+switch.192.168.1.33.interface.14.in=0
+switch.192.168.1.33.interface.14.out=0
+switch.192.168.1.33.interface.15.mac=00:13:49:11:11:0f
+switch.192.168.1.33.interface.15.in=0
+switch.192.168.1.33.interface.15.out=0
+switch.192.168.1.33.interface.16.mac=00:13:49:11:11:10
+switch.192.168.1.33.interface.16.in=0
+switch.192.168.1.33.interface.16.out=0
+switch.192.168.1.33.interface.17.mac=00:13:49:11:11:11
+switch.192.168.1.33.interface.17.in=0
+switch.192.168.1.33.interface.17.out=0
+switch.192.168.1.33.interface.18.mac=00:13:49:11:11:12
+switch.192.168.1.33.interface.18.in=0
+switch.192.168.1.33.interface.18.out=0
+switch.192.168.1.33.interface.19.mac=00:13:49:11:11:13
+switch.192.168.1.33.interface.19.in=0
+switch.192.168.1.33.interface.19.out=0
+switch.192.168.1.33.interface.20.mac=00:13:49:11:11:14
+switch.192.168.1.33.interface.20.in=0
+switch.192.168.1.33.interface.20.out=0
+switch.192.168.1.33.interface.21.mac=00:13:49:11:11:15
+switch.192.168.1.33.interface.21.in=0
+switch.192.168.1.33.interface.21.out=0
+switch.192.168.1.33.interface.22.mac=00:13:49:11:11:16
+switch.192.168.1.33.interface.22.in=0
+switch.192.168.1.33.interface.22.out=0
+switch.192.168.1.33.interface.23.mac=00:13:49:11:11:17
+switch.192.168.1.33.interface.23.in=0
+switch.192.168.1.33.interface.23.out=0
+switch.192.168.1.33.interface.24.mac=00:13:49:11:11:18
+switch.192.168.1.33.interface.24.in=0
+switch.192.168.1.33.interface.24.out=0
+switch.192.168.1.33.interface.25.mac=00:13:49:11:11:19
+switch.192.168.1.33.interface.25.in=0
+switch.192.168.1.33.interface.25.out=0
+switch.192.168.1.33.interface.26.mac=00:13:49:11:11:1a
+switch.192.168.1.33.interface.26.in=0
+switch.192.168.1.33.interface.26.out=0
+switch.192.168.1.33.interface.27.mac=00:13:49:11:11:1b
+switch.192.168.1.33.interface.27.in=0
+switch.192.168.1.33.interface.27.out=0
+switch.192.168.1.33.interface.28.mac=00:13:49:11:11:1c
+switch.192.168.1.33.interface.28.in=0
+switch.192.168.1.33.interface.28.out=0
+switch.192.168.1.33.interface.29.mac=00:13:49:11:11:1d
+switch.192.168.1.33.interface.29.in=0
+switch.192.168.1.33.interface.29.out=0
+switch.192.168.1.33.interface.30.mac=00:13:49:11:11:1e
+switch.192.168.1.33.interface.30.in=0
+switch.192.168.1.33.interface.30.out=0
+switch.192.168.1.33.interface.31.mac=00:13:49:11:11:1f
+switch.192.168.1.33.interface.31.in=0
+switch.192.168.1.33.interface.31.out=0
+switch.192.168.1.33.interface.32.mac=00:13:49:11:11:20
+switch.192.168.1.33.interface.32.in=0
+switch.192.168.1.33.interface.32.out=0
+switch.192.168.1.33.interface.33.mac=00:13:49:11:11:21
+switch.192.168.1.33.interface.33.in=0
+switch.192.168.1.33.interface.33.out=0
+switch.192.168.1.33.interface.34.mac=00:13:49:11:11:22
+switch.192.168.1.33.interface.34.in=0
+switch.192.168.1.33.interface.34.out=0
+switch.192.168.1.33.interface.35.mac=00:13:49:11:11:23
+switch.192.168.1.33.interface.35.in=0
+switch.192.168.1.33.interface.35.out=0
+switch.192.168.1.33.interface.36.mac=00:13:49:11:11:24
+switch.192.168.1.33.interface.36.in=0
+switch.192.168.1.33.interface.36.out=0
+switch.192.168.1.33.interface.37.mac=00:13:49:11:11:25
+switch.192.168.1.33.interface.37.in=0
+switch.192.168.1.33.interface.37.out=0
+switch.192.168.1.33.interface.38.mac=00:13:49:11:11:26
+switch.192.168.1.33.interface.38.in=0
+switch.192.168.1.33.interface.38.out=0
+switch.192.168.1.33.interface.39.mac=00:13:49:11:11:27
+switch.192.168.1.33.interface.39.in=0
+switch.192.168.1.33.interface.39.out=0
+switch.192.168.1.33.interface.40.mac=00:13:49:11:11:28
+switch.192.168.1.33.interface.40.in=0
+switch.192.168.1.33.interface.40.out=0
+switch.192.168.1.33.interface.41.mac=00:13:49:11:11:29
+switch.192.168.1.33.interface.41.in=0
+switch.192.168.1.33.interface.41.out=0
+switch.192.168.1.33.interface.42.mac=00:13:49:11:11:30
+switch.192.168.1.33.interface.42.in=0
+switch.192.168.1.33.interface.42.out=0
+switch.192.168.1.33.interface.43.mac=00:13:49:11:11:31
+switch.192.168.1.33.interface.43.in=0
+switch.192.168.1.33.interface.43.out=0
+switch.192.168.1.33.interface.44.mac=00:13:49:11:11:32
+switch.192.168.1.33.interface.44.in=0
+switch.192.168.1.33.interface.44.out=0
+switch.192.168.1.33.interface.45.mac=00:13:49:11:11:33
+switch.192.168.1.33.interface.45.in=0
+switch.192.168.1.33.interface.45.out=0
+switch.192.168.1.33.interface.46.mac=00:13:49:11:11:34
+switch.192.168.1.33.interface.46.in=0
+switch.192.168.1.33.interface.46.out=0
+switch.192.168.1.33.interface.47.mac=00:13:49:11:11:35
+switch.192.168.1.33.interface.47.in=0
+switch.192.168.1.33.interface.47.out=0
+switch.192.168.1.33.interface.48.mac=00:13:49:11:11:36
+switch.192.168.1.33.interface.48.in=0
+switch.192.168.1.33.interface.48.out=0
 
+link.number=2
+link.1.srcip=192.168.1.5
+link.1.srcport=5
+link.1.dstip=192.168.1.33
+link.1.dstport=1
+link.2.srcip=192.168.1.5
+link.2.srcport=1
+link.2.dstip=192.168.1.100
+link.2.dstport=0
 
-switch.192.168.1.34.interface.1.table.mac=00:13:49:11:12:01
-switch.192.168.1.34.interface.1.table.in=9859485
-switch.192.168.1.34.interface.1.table.out=934
-switch.192.168.1.34.interface.2.table.mac=00:13:49:11:12:02
-switch.192.168.1.34.interface.2.table.in=0
-switch.192.168.1.34.interface.2.table.out=0
-switch.192.168.1.34.interface.3.table.mac=00:13:49:11:12:03
-switch.192.168.1.34.interface.3.table.in=0
-switch.192.168.1.34.interface.3.table.out=0
-switch.192.168.1.34.interface.4.table.mac=00:13:49:11:12:04
-switch.192.168.1.34.interface.4.table.in=0
-switch.192.168.1.34.interface.4.table.out=0
-switch.192.168.1.34.interface.5.table.mac=00:13:49:11:12:05
-switch.192.168.1.34.interface.5.table.in=0
-switch.192.168.1.34.interface.5.table.out=0
-switch.192.168.1.34.interface.6.table.mac=00:13:49:11:12:06
-switch.192.168.1.34.interface.6.table.in=0
-switch.192.168.1.34.interface.6.table.out=0
-switch.192.168.1.34.interface.7.table.mac=00:13:49:11:12:07
-switch.192.168.1.34.interface.7.table.in=0
-switch.192.168.1.34.interface.7.table.out=0
-switch.192.168.1.34.interface.8.table.mac=00:13:49:11:12:08
-switch.192.168.1.34.interface.8.table.in=0
-switch.192.168.1.34.interface.8.table.out=0
-switch.192.168.1.34.interface.9.table.mac=00:13:49:11:12:09
-switch.192.168.1.34.interface.9.table.in=0
-switch.192.168.1.34.interface.9.table.out=0
-switch.192.168.1.34.interface.10.table.mac=00:13:49:11:12:0a
-switch.192.168.1.34.interface.10.table.in=0
-switch.192.168.1.34.interface.10.table.out=0
-switch.192.168.1.34.interface.11.table.mac=00:13:49:11:12:0b
-switch.192.168.1.34.interface.11.table.in=0
-switch.192.168.1.34.interface.11.table.out=0
-switch.192.168.1.34.interface.12.table.mac=00:13:49:11:12:0c
-switch.192.168.1.34.interface.12.table.in=0
-switch.192.168.1.34.interface.12.table.out=0
-switch.192.168.1.34.interface.13.table.mac=00:13:49:11:12:0d
-switch.192.168.1.34.interface.13.table.in=0
-switch.192.168.1.34.interface.13.table.out=0
-switch.192.168.1.34.interface.14.table.mac=00:13:49:11:12:0e
-switch.192.168.1.34.interface.14.table.in=0
-switch.192.168.1.34.interface.14.table.out=0
-switch.192.168.1.34.interface.15.table.mac=00:13:49:11:12:0f
-switch.192.168.1.34.interface.15.table.in=0
-switch.192.168.1.34.interface.15.table.out=0
-switch.192.168.1.34.interface.16.table.mac=00:13:49:11:12:10
-switch.192.168.1.34.interface.16.table.in=0
-switch.192.168.1.34.interface.16.table.out=0
-switch.192.168.1.34.interface.17.table.mac=00:13:49:11:12:11
-switch.192.168.1.34.interface.17.table.in=0
-switch.192.168.1.34.interface.17.table.out=0
-switch.192.168.1.34.interface.18.table.mac=00:13:49:11:12:12
-switch.192.168.1.34.interface.18.table.in=0
-switch.192.168.1.34.interface.18.table.out=0
-switch.192.168.1.34.interface.19.table.mac=00:13:49:11:12:13
-switch.192.168.1.34.interface.19.table.in=0
-switch.192.168.1.34.interface.19.table.out=0
-switch.192.168.1.34.interface.20.table.mac=00:13:49:11:12:14
-switch.192.168.1.34.interface.20.table.in=0
-switch.192.168.1.34.interface.20.table.out=0
-switch.192.168.1.34.interface.21.table.mac=00:13:49:11:12:15
-switch.192.168.1.34.interface.21.table.in=0
-switch.192.168.1.34.interface.21.table.out=0
-switch.192.168.1.34.interface.22.table.mac=00:13:49:11:12:16
-switch.192.168.1.34.interface.22.table.in=0
-switch.192.168.1.34.interface.22.table.out=0
-switch.192.168.1.34.interface.23.table.mac=00:13:49:11:12:17
-switch.192.168.1.34.interface.23.table.in=0
-switch.192.168.1.34.interface.23.table.out=0
-switch.192.168.1.34.interface.24.table.mac=00:13:49:11:12:18
-switch.192.168.1.34.interface.24.table.in=0
-switch.192.168.1.34.interface.24.table.out=0
+app.statistics.10mins.number=7
+app.statistics.10mins.name.1=qq
+app.statistics.10mins.traffic.1=1000
+app.statistics.10mins.name.2=msn
+app.statistics.10mins.traffic.2=200
+app.statistics.10mins.name.3=http
+app.statistics.10mins.traffic.3=10000
+app.statistics.10mins.name.4=skype
+app.statistics.10mins.traffic.4=10
+app.statistics.10mins.name.5=pplive
+app.statistics.10mins.traffic.5=245670
+app.statistics.10mins.name.6=gtalk
+app.statistics.10mins.traffic.6=123456
+app.statistics.10mins.name.7=bt
+app.statistics.10mins.traffic.7=123452
 
-link.number = 3
-link.1.srcip = 192.168.1.5
-link.1.srcport = 5
-link.1.dstip = 192.168.1.33
-link.1.dstport = 1
-link.2.srcip = 192.168.1.5
-link.2.srcport = 6
-link.2.dstip = 192.168.1.34
-link.2.dstport = 1
-link.3.srcip = 192.168.1.5
-link.3.srcport = 1
-link.3.dstip = 192.168.1.100
-link.3.dstport = 0
+app.statistics.3hours.number=7
+app.statistics.3hours.name.1=qq
+app.statistics.3hours.traffic.1=1000
+app.statistics.3hours.name.2=msn
+app.statistics.3hours.traffic.2=200
+app.statistics.3hours.name.3=http
+app.statistics.3hours.traffic.3=10000
+app.statistics.3hours.name.4=skype
+app.statistics.3hours.traffic.4=10
+app.statistics.3hours.name.5=pplive
+app.statistics.3hours.traffic.5=245670
+app.statistics.3hours.name.6=gtalk
+app.statistics.3hours.traffic.6=123456
+app.statistics.3hours.name.7=bt
+app.statistics.3hours.traffic.7=123452
+
+app.statistics.24hours.number=7
+app.statistics.24hours.name.1=qq
+app.statistics.24hours.traffic.1=1000
+app.statistics.24hours.name.2=msn
+app.statistics.24hours.traffic.2=200
+app.statistics.24hours.name.3=http
+app.statistics.24hours.traffic.3=10000
+app.statistics.24hours.name.4=skype
+app.statistics.24hours.traffic.4=10
+app.statistics.24hours.name.5=pplive
+app.statistics.24hours.traffic.5=245670
+app.statistics.24hours.name.6=gtalk
+app.statistics.24hours.traffic.6=123456
+app.statistics.24hours.name.7=bt
+app.statistics.24hours.traffic.7=123452
+
+app.statistics.all.number=7
+app.statistics.all.name.1=qq
+app.statistics.all.traffic.1=1000
+app.statistics.all.name.2=msn
+app.statistics.all.traffic.2=200
+app.statistics.all.name.3=http
+app.statistics.all.traffic.3=10000
+app.statistics.all.name.4=skype
+app.statistics.all.traffic.4=10
+app.statistics.all.name.5=pplive
+app.statistics.all.traffic.5=245670
+app.statistics.all.name.6=gtalk
+app.statistics.all.traffic.6=123456
+app.statistics.all.name.7=bt
+app.statistics.all.traffic.7=123452
+
+#data for current session
+session.number=5
+session.application.1=qq
+session.direction.1=1
+session.interface.1=wan1
+session.protocol.1=qq
+session.src.ip.1=1.1.1.1
+session.src.port.1=34
+session.dst.ip.1=2.2.2.2
+session.dst.port.1=80
+session.sent.1=3434
+session.recv.1=32434
+session.status.1=1
+session.application.2=qq
+session.direction.2=1
+session.interface.2=wan1
+session.protocol.2=qq
+session.src.ip.2=1.1.1.1
+session.src.port.2=34
+session.dst.ip.2=2.2.2.2
+session.dst.port.2=80
+session.sent.2=3434
+session.recv.2=32434
+session.status.2=1
+session.application.3=qq
+session.direction.3=1
+session.interface.3=wan1
+session.protocol.3=qq
+session.src.ip.3=1.1.1.1
+session.src.port.3=34
+session.dst.ip.3=2.2.2.2
+session.dst.port.3=80
+session.sent.3=3434
+session.recv.3=32434
+session.status.3=1
+session.application.4=qq
+session.direction.4=1
+session.interface.4=wan1
+session.protocol.4=qq
+session.src.ip.4=1.1.1.1
+session.src.port.4=34
+session.dst.ip.4=2.2.2.2
+session.dst.port.4=80
+session.sent.4=3434
+session.recv.4=32434
+session.status.4=1
+session.application.5=qq
+session.direction.5=1
+session.interface.5=wan1
+session.protocol.5=qq
+session.src.ip.5=1.1.1.1
+session.src.port.5=34
+session.dst.ip.5=2.2.2.2
+session.dst.port.5=80
+session.sent.5=3434
+session.recv.5=32434
+session.status.5=1
+
+#Top arp sender table
+arp.sender.number=3
+arp.sender.index.1=1
+arp.sender.ip.1=192.168.1.1
+arp.sender.index.2=2
+arp.sender.ip.2=192.168.1.2
+arp.sender.index.3=3
+arp.sender.ip.3=192.168.1.3
+
+#data for tools
+ping.ip=192.168.1.1
+ping.result=PING 172.25.21.254 (172.25.21.254): 56 octets data\n64 octets from 172.25.21.254: icmp_seq=0 ttl=64 time=4.5 ms\n64 octets from 172.25.21.254: icmp_seq=1 ttl=64 time=0.3 ms\n64 octets from 172.25.21.254: icmp_seq=2 ttl=64 time=0.3 ms\n--- 172.25.21.254 ping statistics ---\n3 packets transmitted, 3 packets received, 0% packet loss\nround-trip min/avg/max = 0.3/1.7/4.5 ms
+tracert.ip=192.168.1.1
+tracert.result=1  172.25.21.254 (172.25.21.254)  0.496 ms  0.403 ms  0.370 ms\n2  172.25.6.251 (172.25.6.251)  1.422 ms  0.461 ms  0.944 ms\n3  172.25.6.253 (172.25.6.253)  1.983 ms  2.199 ms  1.941 ms
+
+#traps parameters
+server.ip=172.25.21.47
+nsTrapVarAdmin=sting
+nsTrapVarPort=10
+nsTrapVarBandwidth=134234
+nsTrapVarHostname=172.25.21.1
+nsTrapVarMac=00:a0:c5:11:11:11
+nsTrapVarPacketRate=123343
+nsTrapVarAttackCount=1000
+nsTrapVarAttackRate=212/s
+nsTrapVarAttackTime=3333
+

File src/com/zyxel/enc/netbar/agent/Config.java

-package com.zyxel.enc.netbar.agent;
-
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.util.Properties;
-
-public class Config {
-	private static final Properties properties;
-	static {
-		properties = new Properties();
-		try {
-			properties.load(new FileInputStream("config.properties"));
-		} catch (FileNotFoundException e) {
-			e.printStackTrace();
-		} catch (IOException e) {
-			e.printStackTrace();
-		}
-	}
-	
-	public static String get(String name) {
-		return properties.getProperty(name);
-	}
-        
-        public static Integer getInt(String name) {
-            return Integer.valueOf(get(name));
-        }
-}

File src/com/zyxel/enc/netbar/agent/Main.java

 package com.zyxel.enc.netbar.agent;
 
+import com.zyxel.enc.netbar.agent.data.Config;
 import org.apache.log4j.BasicConfigurator;
 
 public class Main {

File src/com/zyxel/enc/netbar/agent/NRrouterMib.java

 package com.zyxel.enc.netbar.agent;
 
+import com.zyxel.enc.netbar.agent.data.Config;
 import com.zyxel.enc.netbar.agent.generator.AppStatisticsTableGenerator;
 import com.zyxel.enc.netbar.agent.generator.CurrentSessionTableGenerator;
 import com.zyxel.enc.netbar.agent.generator.FlowTableGenerator;
     private static final OID oidLanInterfaceTable = new OID("1.3.6.1.4.1.890.1.5.17.1.8.1.1");
     private static final OID oidSwitchInterfaceTable = new OID("1.3.6.1.4.1.890.1.5.17.1.11.2.1.1");
     private static final OID oidTopArpTable = new OID("1.3.6.1.4.1.890.1.5.17.1.10.1.1.1");
-    
+
     private static final String oidToolPingPrefix = "1.3.6.1.4.1.890.1.5.17.1.13.1.";
     private static final String oidToolTracertPrefix = "1.3.6.1.4.1.890.1.5.17.1.13.2.";
 
     @Override
     public void registerMOs(MOServer server, OctetString context)
             throws DuplicateRegistrationException {
-        server.register(MOCreator.createReadOnly(nsSysHostName, Config.get("hostname")), context);
-        server.register(MOCreator.createReadOnly(nsSysMAC, Config.get("mac")), context);
-        server.register(MOCreator.createReadOnly(nsSysType, Config.get("type")), context);
-        server.register(MOCreator.createReadOnly(nsSysModel, Config.get("model")), context);
-        server.register(MOCreator.createReadOnly(nsSysVendor, Config.get("vender")), context);
-        server.register(MOCreator.createReadOnly(nsSysFirmwareVersion, Config.get("firmware.version")), context);
-        server.register(MOCreator.createReadOnly(nsSysHardwareVersion, Config.get("hardware.version")), context);
-        server.register(MOCreator.createReadOnly(nsSysSerialNumber, Config.get("serial")), context);
-
-        server.register(MOCreator.createReadOnly(nsSysMgmtCpuUsage, Integer.valueOf(Config.get("cpu.usage"))), context);
-        server.register(MOCreator.createReadOnly(nsSysMgmtMemUsage, Integer.valueOf(Config.get("mem.usage"))), context);
-        server.register(MOCreator.createReadOnly(nsSysMgmtActiveSession, Integer.valueOf(Config.get("session.active"))), context);
-        server.register(MOCreator.createReadOnly(nsSysMgmtMaxSession, Integer.valueOf(Config.get("session.max"))), context);
-        server.register(MOCreator.createReadOnly(nsSysMgmtCPUTemperature, Integer.valueOf(Config.get("cpu.temperature"))), context);
-        server.register(MOCreator.createReadOnly(nsSysMgmtActiveHost, Integer.valueOf(Config.get("host.active"))), context);
-        server.register(MOCreator.createTimeTicks(nsSysUptime, getStartTime()), context);
-        server.register(new DateAndTimeScalar(nsSysDateTime, MOAccessImpl.ACCESS_READ_ONLY, new OctetString(getCurrentTimeAsString())), context);
+        registerRouter(server, context);
 
         server.register(createTopologyTables(), context);
         server.register(createLinkTables(), context);
 
         new SwitchDataHelper(server, context).registerQsInfoData();
         server.register(new SwitchInterfaceTableGenerator().generateTable(oidSwitchInterfaceTable), context);
-        
+
         registerPingResult(server, context);
         registerTracerouteResult(server, context);
     }
 
+    private void registerRouter(MOServer server, OctetString context) throws NumberFormatException, DuplicateRegistrationException {
+        server.register(MOCreator.createReadOnly(nsSysHostName, "NR Router"), context);
+        server.register(MOCreator.createReadOnly(nsSysMAC, Config.get("mac")), context);
+        server.register(MOCreator.createReadOnly(nsSysType, "NR Router"), context);
+        server.register(MOCreator.createReadOnly(nsSysModel, "NR-3000"), context);
+        server.register(MOCreator.createReadOnly(nsSysVendor, "zyxel"), context);
+        server.register(MOCreator.createReadOnly(nsSysFirmwareVersion, "1.1"), context);
+        server.register(MOCreator.createReadOnly(nsSysHardwareVersion, "2.1"), context);
+        server.register(MOCreator.createReadOnly(nsSysSerialNumber, "12345678"), context);
+
+        server.register(MOCreator.createReadOnly(nsSysMgmtCpuUsage, Integer.valueOf(Config.get("cpu.usage"))), context);
+        server.register(MOCreator.createReadOnly(nsSysMgmtMemUsage, Integer.valueOf(Config.get("mem.usage"))), context);
+        server.register(MOCreator.createReadOnly(nsSysMgmtActiveSession, Integer.valueOf(Config.get("session.active"))), context);
+        server.register(MOCreator.createReadOnly(nsSysMgmtMaxSession, Integer.valueOf(Config.get("session.max"))), context);
+        server.register(MOCreator.createReadOnly(nsSysMgmtCPUTemperature, Integer.valueOf(Config.get("cpu.temperature"))), context);
+        server.register(MOCreator.createReadOnly(nsSysMgmtActiveHost, Integer.valueOf(Config.get("host.active"))), context);
+        server.register(MOCreator.createTimeTicks(nsSysUptime, getStartTime()), context);
+        server.register(new DateAndTimeScalar(nsSysDateTime, MOAccessImpl.ACCESS_READ_ONLY, new OctetString(getCurrentTimeAsString())), context);
+    }
+
     @Override
     public void unregisterMOs(MOServer server, OctetString context) {
     }
         DefaultMOTable appTable = new AppStatisticsTableGenerator("app.statistics.all.number", "app.statistics.all.name.", "app.statistics.all.traffic.").generateTable(nsAppStatisticsAll);
         server.register(appTable, context);
     }
-    
+
     private void registerPingResult(MOServer server, OctetString context) throws DuplicateRegistrationException {
     	String ip = Config.get("ping.ip");
     	String result = Config.get("ping.result");
     	OID oid = new OID(oidToolPingPrefix + ip);
     	server.register(MOCreator.createReadOnly(oid, result), context);
     }
-    
+
     private void registerTracerouteResult(MOServer server, OctetString context) throws DuplicateRegistrationException {
     	String ip = Config.get("tracert.ip");
     	String result = Config.get("tracert.result");

File src/com/zyxel/enc/netbar/agent/SwitchDataHelper.java

  */
 package com.zyxel.enc.netbar.agent;
 
+import com.zyxel.enc.netbar.agent.data.Config;
 import org.snmp4j.agent.DuplicateRegistrationException;
 import org.snmp4j.agent.MOServer;
 import org.snmp4j.agent.mo.MOAccessImpl;
 import org.snmp4j.smi.OctetString;
 
 /**
- * This class is used to help to register data for switch. Because switch's data 
+ * This class is used to help to register data for switch. Because switch's data
  * is also queried from router, it need some special handle.
  * @author sting
  */
     public void registerQsInfoData() throws DuplicateRegistrationException {
         int number = Integer.parseInt(Config.get("switch.number"));
         for (int i = 1; i <= number; i++) {
-            String ip = Config.get("switch.ip." + i);
+            String prefix = "switch." + i + ".";
+            String ip = Config.get(prefix + "ip");
             OID cpuUsageOid = new OID(cpuUsageOidPrefix + ip);
-            server.register(MOCreator.createReadOnly(cpuUsageOid, Config.getInt("switch.cpu.usage." + i)), context);
+            server.register(MOCreator.createReadOnly(cpuUsageOid, Config.getInt(prefix + "cpu.usage")), context);
             OID memUsageOid = new OID(memUsageOidPrefix + ip);
-            server.register(MOCreator.createReadOnly(memUsageOid, Config.getInt("switch.mem.usage." + i)), context);
+            server.register(MOCreator.createReadOnly(memUsageOid, Config.getInt(prefix + "mem.usage")), context);
             OID broadcastRateOid = new OID(broadcastRateOidPrefix + ip);
-            server.register(MOCreator.createReadOnly(broadcastRateOid, Config.getInt("switch.broadcast.rate." + i)), context);
+            server.register(MOCreator.createReadOnly(broadcastRateOid, Config.getInt(prefix + "broadcast.rate")), context);
             OID voltageOid = new OID(voltageOidPrefix + ip);
-            server.register(MOCreator.createReadOnly(voltageOid, Config.getInt("switch.voltage." + i)), context);
+            server.register(MOCreator.createReadOnly(voltageOid, Config.getInt(prefix + "voltage")), context);
             OID cpuTemperature = new OID(cpuTemperatureOidPrefix + ip);
-            server.register(MOCreator.createReadOnly(cpuTemperature, Config.getInt("switch.cpu.temperature." + i)), context);
-            
+            server.register(MOCreator.createReadOnly(cpuTemperature, Config.getInt(prefix + "cpu.temperature")), context);
+
             OID sysUpTimeOid = new OID(sysUptimeOidPrefix + ip);
             server.register(MOCreator.createTimeTicks(sysUpTimeOid, NRrouterMib.getStartTime()), context);
-            
+
             OID sysDateTimeOid = new OID(sysDateTimeOidPrefix + ip);
             server.register(new DateAndTimeScalar(sysDateTimeOid, MOAccessImpl.ACCESS_READ_ONLY, new OctetString(NRrouterMib.getCurrentTimeAsString())), context);
         }

File src/com/zyxel/enc/netbar/agent/TrapSender.java

 package com.zyxel.enc.netbar.agent;
 
+import com.zyxel.enc.netbar.agent.data.Config;
 import java.io.IOException;
 import java.util.HashMap;
 import java.util.Map;

File src/com/zyxel/enc/netbar/agent/data/Config.java

+package com.zyxel.enc.netbar.agent.data;
+
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.util.Properties;
+
+public class Config {
+	private static final Properties properties;
+	static {
+		properties = new Properties();
+		try {
+			properties.load(new FileInputStream("c.properties"));
+		} catch (FileNotFoundException e) {
+			e.printStackTrace();
+		} catch (IOException e) {
+			e.printStackTrace();
+		}
+	}
+
+	public static String get(String name) {
+		return properties.getProperty(name);
+	}
+
+        public static Integer getInt(String name) {
+            return Integer.valueOf(get(name));
+        }
+}

File src/com/zyxel/enc/netbar/agent/generator/AppStatisticsTableGenerator.java

 package com.zyxel.enc.netbar.agent.generator;
 
 import com.zyxel.enc.netbar.agent.AbstractTableGenerator;
-import com.zyxel.enc.netbar.agent.Config;
+import com.zyxel.enc.netbar.agent.data.Config;
 import org.snmp4j.agent.mo.DefaultMOMutableRow2PC;
 import org.snmp4j.agent.mo.MOAccessImpl;
 import org.snmp4j.agent.mo.MOColumn;
     private String numberKey;
     private String nameKey;
     private String trafficKey;
-    
+
     public AppStatisticsTableGenerator(String numberKey, String nameKey, String trafficKey) {
         this.numberKey = numberKey;
         this.nameKey = nameKey;
         this.trafficKey = trafficKey;
     }
-    
+
     @Override
     public MOColumn[] defineColumns() {
         MOColumn[] columns = new MOColumn[2];

File src/com/zyxel/enc/netbar/agent/generator/CurrentSessionTableGenerator.java

 package com.zyxel.enc.netbar.agent.generator;
 
 import com.zyxel.enc.netbar.agent.AbstractTableGenerator;
-import com.zyxel.enc.netbar.agent.Config;
+import com.zyxel.enc.netbar.agent.data.Config;
 import org.snmp4j.agent.mo.DefaultMOMutableRow2PC;
 import org.snmp4j.agent.mo.MOAccessImpl;
 import org.snmp4j.agent.mo.MOColumn;
         columns[6] = new MOColumn(7, SMIConstants.SYNTAX_IPADDRESS, MOAccessImpl.ACCESS_READ_ONLY);
         columns[7] = new MOColumn(8, SMIConstants.SYNTAX_INTEGER, MOAccessImpl.ACCESS_READ_ONLY);
         columns[8] = new MOColumn(9, SMIConstants.SYNTAX_COUNTER32, MOAccessImpl.ACCESS_READ_ONLY);
-        columns[9] = new MOColumn(10, SMIConstants.SYNTAX_COUNTER32, MOAccessImpl.ACCESS_READ_ONLY); 
+        columns[9] = new MOColumn(10, SMIConstants.SYNTAX_COUNTER32, MOAccessImpl.ACCESS_READ_ONLY);
         columns[10] = new MOColumn(11, SMIConstants.SYNTAX_INTEGER, MOAccessImpl.ACCESS_READ_ONLY);
         return columns;
     }

File src/com/zyxel/enc/netbar/agent/generator/FlowTableGenerator.java

 package com.zyxel.enc.netbar.agent.generator;
 
 import com.zyxel.enc.netbar.agent.AbstractTableGenerator;
-import com.zyxel.enc.netbar.agent.Config;
+import com.zyxel.enc.netbar.agent.data.Config;
+import com.zyxel.enc.netbar.agent.data.Interface;
+import java.util.List;
 import org.snmp4j.agent.mo.DefaultMOMutableRow2PC;
 import org.snmp4j.agent.mo.MOAccessImpl;
 import org.snmp4j.agent.mo.MOColumn;
 
     @Override
     public void setVariables(MOMutableTableModel model) {
-        int number = Integer.parseInt(Config.get("flow.number"));
-
-        for (int i = 1; i <= number; i++) {
+        List<Interface> interfaces = Interface.buildRouterInterfaces();
+        for (int i = 1; i <= interfaces.size(); i++) {
+            Interface in = interfaces.get(i-1);
             Variable[] v = new Variable[]{
-                new Integer32(Integer.valueOf(Config.get("flow.interface.index." + i))),
-                new Integer32(Integer.valueOf(Config.get("flow.sent." + i))),
-                new Counter32(Integer.valueOf(Config.get("flow.recv." + i))),
+                new Integer32(in.index),
+                new Integer32(in.sent),
+                new Counter32(in.recv),
             };
             model.addRow(new DefaultMOMutableRow2PC(new OID(String.valueOf(i)), v));
         }

File src/com/zyxel/enc/netbar/agent/generator/InterfaceTableGenerator.java

 package com.zyxel.enc.netbar.agent.generator;
 
 import com.zyxel.enc.netbar.agent.AbstractTableGenerator;
-import com.zyxel.enc.netbar.agent.Config;
+import com.zyxel.enc.netbar.agent.data.Config;
+import com.zyxel.enc.netbar.agent.data.Interface;
+import java.util.List;
 import org.snmp4j.agent.mo.DefaultMOMutableRow2PC;
 import org.snmp4j.agent.mo.MOAccessImpl;
 import org.snmp4j.agent.mo.MOColumn;
 
     @Override
     public void setVariables(MOMutableTableModel model) {
-        int number = Integer.parseInt(Config.get("interface.table.number"));
-
-        for (int i = 1; i <= number; i++) {
+        List<Interface> interfaces = Interface.buildRouterInterfaces();
+        for (int i = 1; i <= interfaces.size(); i++) {
+            Interface in = interfaces.get(i-1);
             Variable[] v = new Variable[]{
-                new Integer32(Integer.valueOf(Config.get("interface.table.index." + i))),
-                new OctetString(Config.get("interface.table.name." + i)),
-                new OctetString(Config.get("interface.table.description." + i)),
-                new Integer32(Integer.valueOf(Config.get("interface.table.type." + i))),
-                new Integer32(Integer.valueOf(Config.get("interface.table.iswan." + i)))
+                new Integer32(in.index),
+                new OctetString(in.name),
+                new OctetString(in.description),
+                new Integer32(in.type),
+                new Integer32(in.iswan)
             };
             model.addRow(new DefaultMOMutableRow2PC(new OID(String.valueOf(i)), v));
         }

File src/com/zyxel/enc/netbar/agent/generator/LanInterfaceTableGenerator.java

 package com.zyxel.enc.netbar.agent.generator;
 
 import com.zyxel.enc.netbar.agent.AbstractTableGenerator;
-import com.zyxel.enc.netbar.agent.Config;
+import com.zyxel.enc.netbar.agent.data.Config;
+import com.zyxel.enc.netbar.agent.data.Interface;
+import java.util.List;
 import org.snmp4j.agent.mo.DefaultMOMutableRow2PC;
 import org.snmp4j.agent.mo.MOAccessImpl;
 import org.snmp4j.agent.mo.MOColumn;
 
     @Override
     public void setVariables(MOMutableTableModel model) {
-        int number = Integer.parseInt(Config.get("lan.interface.number"));
-
-        for (int i = 1; i <= number; i++) {
+        List<Interface> interfaces = Interface.buildRouterInterfaces();
+        for (int i = 5; i <= 8; i++) {
+            Interface in = interfaces.get(i-1);
             Variable[] v = new Variable[] {
-                new Integer32(Integer.valueOf(Config.get("lan.interface.index." + i))),
-                new IpAddress(Config.get("lan.interface.ip." + i)),
-                new IpAddress(Config.get("lan.interface.mask." + i)),
-                new Integer32(Integer.valueOf(Config.get("lan.interface.enable.nat." + i))),
-                new Counter32(Integer.valueOf(Config.get("lan.interface.recv." + i))),
-                new Counter32(Integer.valueOf(Config.get("lan.interface.sent." + i))),
-                new OctetString(Config.get("lan.interface.mac." + i)),
-                new Integer32(Integer.valueOf(Config.get("lan.interface.mtu." + i)))
+                new Integer32(in.index),
+                new IpAddress(in.ip),
+                new IpAddress(in.mask),
+                new Integer32(in.enableNat),
+                new Counter32(in.recv),
+                new Counter32(in.sent),
+                new OctetString(in.mac),
+                new Integer32(in.mtu)
             };
             model.addRow(new DefaultMOMutableRow2PC(new OID(String.valueOf(i)), v));
         }

File src/com/zyxel/enc/netbar/agent/generator/SwitchInterfaceTableGenerator.java

 import org.snmp4j.smi.Variable;
 
 import com.zyxel.enc.netbar.agent.AbstractTableGenerator;
-import com.zyxel.enc.netbar.agent.Config;
+import com.zyxel.enc.netbar.agent.data.Config;
+import com.zyxel.enc.netbar.agent.data.Switch;
+import com.zyxel.enc.netbar.agent.data.SwitchInterface;
+import java.util.List;
 
 /**
  *
         return columns;
     }
 
-    public void setVariables(MOMutableTableModel model, int number, String ip) {
-        int interfaceNumbers = Integer.parseInt(Config.get("switch." + number + ".interface.table.number"));
-        for (int i = 1; i <= interfaceNumbers; i++) {
-            Variable[] v = new Variable[]{
-                new Integer32(Config.getInt("switch." + number + ".interface.table.index." + i)),
-                new OctetString(Config.get("switch." + number + ".interface.table.desc." + i)),
-                new Integer32(Config.getInt("switch." + number + ".interface.table.status." + i)),
-                new Integer32(Config.getInt("switch." + number + ".interface.table.speed." + i)),
-                new OctetString(Config.get("switch." + number + ".interface.table.mac." + i)),
-                new Counter32(Config.getInt("switch." + number + ".interface.table.in." + i)),
-                new Counter32(Config.getInt("switch." + number + ".interface.table.out." + i))
-            };
-            model.addRow(new DefaultMOMutableRow2PC(new OID(String.valueOf(ip + "." + i)), v));
-        }
-    }
-
     @Override
     public void setVariables(MOMutableTableModel model) {
-        int deviceNumber = Config.getInt("switch.number");
-        for (int i = 1; i <= deviceNumber; i++) {
-            String ip = Config.get("switch." + i + ".ip");
-            int interfaceNumber = Config.getInt("switch." + i + ".interface.table.number");
-            for (int j = 1; j <= interfaceNumber; j++) {
+        int number = Config.getInt("switch.number");
+        for (int i = 1; i <= number; i++) {
+            int portNumber = Config.getInt("device." + i + ".portnumber");
+            String ip = Config.get("device." + i + ".ip");
+            List<SwitchInterface> list = Switch.buildInterfaces(portNumber, ip);
+            for (int j = 1; j <= list.size(); j++) {
+                SwitchInterface in = list.get(j-1);
                 Variable[] v = new Variable[]{
-                    new Integer32(Config.getInt("switch." + i + ".interface.table.index." + j)),
-                    new OctetString(Config.get("switch." + i + ".interface.table.desc." + j)),
-                    new Integer32(Config.getInt("switch." + i + ".interface.table.status." + j)),
-                    new Integer32(Config.getInt("switch." + i + ".interface.table.speed." + j)),
-                    new OctetString(Config.get("switch." + i + ".interface.table.mac." + j)),
-                    new Counter32(Config.getInt("switch." + i + ".interface.table.in." + j)),
-                    new Counter32(Config.getInt("switch." + i + ".interface.table.out." + j))
+                    new Integer32(in.index),
+                    new OctetString(in.description),
+                    new Integer32(in.status),
+                    new Integer32(in.speed),
+                    new OctetString(in.mac),
+                    new Counter32(in.in),
+                    new Counter32(in.out)
                 };
                 model.addRow(new DefaultMOMutableRow2PC(new OID(ip + "." + j), v));
-
             }
         }
     }

File src/com/zyxel/enc/netbar/agent/generator/TopArpSenderTableGenerator.java

 package com.zyxel.enc.netbar.agent.generator;
 
 import com.zyxel.enc.netbar.agent.AbstractTableGenerator;
-import com.zyxel.enc.netbar.agent.Config;
+import com.zyxel.enc.netbar.agent.data.Config;
 import org.snmp4j.agent.mo.DefaultMOMutableRow2PC;
 import org.snmp4j.agent.mo.MOAccessImpl;
 import org.snmp4j.agent.mo.MOColumn;

File src/com/zyxel/enc/netbar/agent/generator/TopologyDeviceTableGenerator.java

 package com.zyxel.enc.netbar.agent.generator;
 
 import com.zyxel.enc.netbar.agent.AbstractTableGenerator;
-import com.zyxel.enc.netbar.agent.Config;
+import com.zyxel.enc.netbar.agent.data.Config;
+import com.zyxel.enc.netbar.agent.data.Device;
+import com.zyxel.enc.netbar.agent.data.TopologyBuilder;
+import java.util.List;
 import org.snmp4j.agent.mo.DefaultMOMutableRow2PC;
 import org.snmp4j.agent.mo.MOAccessImpl;
 import org.snmp4j.agent.mo.MOColumn;
 
     @Override
     public void setVariables(MOMutableTableModel model) {
-        int number = Integer.parseInt(Config.get("topology.device.number"));
+        List<Device> devices = TopologyBuilder.buildDevices();
+        int number = devices.size();
 
         for (int i = 1; i <= number; i++) {
+            Device d = devices.get(i-1);
             Variable[] v = new Variable[]{
-                new OctetString(Config.get("topology.device.hostname." + i)),
-                new IpAddress(Config.get("topology.device.ip." + i)),
-                new OctetString(Config.get("topology.device.mac." + i)),
-                new OctetString(Config.get("topology.device.type." + i)),
-                new OctetString(Config.get("topology.device.model." + i)),
-                new OctetString(Config.get("topology.device.vender." + i)),
-                new OctetString(Config.get("topology.device.firmware." + i)),
-                new OctetString(Config.get("topology.device.hardware." + i)),
-                new Integer32(Integer.valueOf(Config.get("topology.device.portnumber." + i)))
+                new OctetString(d.hostname),
+                new IpAddress(d.ip),
+                new OctetString(d.mac),
+                new OctetString(d.type),
+                new OctetString(d.model),
+                new OctetString(d.vender),
+                new OctetString(d.firmware),
+                new OctetString(d.hardware),
+                new Integer32(d.portNumber)
             };
             model.addRow(new DefaultMOMutableRow2PC(new OID(String.valueOf(i)), v));
         }

File src/com/zyxel/enc/netbar/agent/generator/TopologyLinkTableGenerator.java

 package com.zyxel.enc.netbar.agent.generator;
 
 import com.zyxel.enc.netbar.agent.AbstractTableGenerator;
-import com.zyxel.enc.netbar.agent.Config;
+import com.zyxel.enc.netbar.agent.data.Config;
+import com.zyxel.enc.netbar.agent.data.Link;
+import com.zyxel.enc.netbar.agent.data.TopologyBuilder;
+import java.util.List;
 import org.snmp4j.agent.mo.DefaultMOMutableRow2PC;
 import org.snmp4j.agent.mo.MOAccessImpl;
 import org.snmp4j.agent.mo.MOColumn;
 
     @Override
     public void setVariables(MOMutableTableModel model) {
-        int number = Integer.parseInt(Config.get("topology.link.number"));
+        List<Link> links = TopologyBuilder.buildLinks();
+        int number = links.size();
 
         for (int i = 1; i <= number; i++) {
+            Link l = links.get(i-1);
             Variable[] v = new Variable[]{
-                new IpAddress(Config.get("topology.link.src.ip." + i)),
-                new Integer32(Integer.valueOf(Config.get("topology.link.src.port." + i))),
-                new IpAddress(Config.get("topology.link.dst.ip." + i)),
-                new Integer32(Integer.valueOf(Config.get("topology.link.dst.port." + i))),
-                new Integer32(Integer.valueOf(Config.get("topology.link.type." + i))),
+                new IpAddress(l.srcIp),
+                new Integer32(l.srcPort),
+                new IpAddress(l.dstIp),
+                new Integer32(l.dstPort),
             };
             model.addRow(new DefaultMOMutableRow2PC(new OID(String.valueOf(i)), v));
         }
     }
 
-    
+
 }

File src/com/zyxel/enc/netbar/agent/generator/WanInterfaceTableGenerator.java

 package com.zyxel.enc.netbar.agent.generator;
 
 import com.zyxel.enc.netbar.agent.AbstractTableGenerator;
-import com.zyxel.enc.netbar.agent.Config;
+import com.zyxel.enc.netbar.agent.data.Config;
+import com.zyxel.enc.netbar.agent.data.Interface;
+import java.util.List;
 import org.snmp4j.agent.mo.DefaultMOMutableRow2PC;
 import org.snmp4j.agent.mo.MOAccessImpl;
 import org.snmp4j.agent.mo.MOColumn;
 
     @Override
     public void setVariables(MOMutableTableModel model) {
-        int number = Integer.parseInt(Config.get("wan.interface.table.number"));
+        List<Interface> interfaces = Interface.buildRouterInterfaces();
 
-        for (int i = 1; i <= number; i++) {
+        for (int i = 1; i <= 4; i++) {
+            Interface in = interfaces.get(i - 1);
             Variable[] v = new Variable[]{
-                new OctetString(Config.get("wan.interface.table.name." + i)),
-                new Integer32(Integer.valueOf(Config.get("wan.interface.table.status." + i))),
-                new Integer32(Integer.valueOf(Config.get("wan.interface.table.type." + i))),
-                new OctetString(Config.get("wan.interface.table.ipmask." + i)),
-                new IpAddress(Config.get("wan.interface.table.gateway." + i)),
-                new OctetString(Config.get("wan.interface.table.dns." + i)),
-                new Counter32(Integer.valueOf(Config.get("wan.interface.table.recv." + i))),
-                new Counter32(Integer.valueOf(Config.get("wan.interface.table.sent." + i)))
+                new OctetString(in.name),
+                new Integer32(in.status),
+                new Integer32(in.wanType),
+                new OctetString(in.mask),
+                new IpAddress(in.gateway),
+                new OctetString(in.dns),
+                new Counter32(in.recv),
+                new Counter32(in.sent)
             };
             model.addRow(new DefaultMOMutableRow2PC(new OID(String.valueOf(i)), v));
         }