Obtain IP address and Computer Name of computers on LAN

I have been trying to figure out a way to get the names of the computers on my lan given only the ip address. I know the range of ip numbers possible so I can set up a loop to go through all 255 of them and determine which ones are assigned. For each assigned IP address I need to get the name of the computer that is using that IP address. Again this is only for IP’s on my local net. Any insight as to how to do this would be greatly appreciated. thanks

Model: G4 500 mhz
AppleScript: Latest
Browser: Safari 412
Operating System: Mac OS X (10.4)

This is the only thread I can recall that mentioned getting active IP Addresses on a LAN