OS/2, eCS & ArcaOS - Technical > Programming

[Classic REXX] Network Map

(1/10) > >>

Jan-Erik Lärka:
I'm trying to write a REXX script to list the devices available on my home LAN.

It use commands available in the OS to get the host name, ip-number and mac address.

Here I can see on the names that it has found computers, mobile phones, vacuum cleaner, routers etc. on the same subnet and indicate if they're offline or not.
I'd also like to, if possible, find out what kind of device the script has listed and set icons accordingly, and not just online/offline. How?!

That also mean that I need help to create the artwork for it.  ;)

The script in default mode without parameters determine the ip-address of the computer, ping and check for others 1 to 255.
With environment variable SET WOL=1 it also send a "wake on lan call" to each machine.
With environment variable SET NET=1 it also create a folder Network Map* in the folder Network, with a sub folder for workgroup* or domain* and individual objects (online*/offline*) for each device. If one click on a device it will refresh (run the script and update the object itself).

Jan-Erik Lärka:
I've added a line to the script to open the folder as it refresh the devices.

Neil Waldhauer:
Here is does not find all computers in the local subnet, and seems to mostly be a reminder to clean out my hosts file.
It does find my router, which is not in the hosts file.

Dave Yeo:
Here, it finds nothing. Manually testing, I can ping the wife's Roku stick, so would expect that to be found at 192.168.0.102, same with my phone at 192.168.0.103

Jan-Erik Lärka:
Neil: Interesting, and you get anything else if you run the OS/2 commands (HOST, NETSTAT, PING and ARP) by hand?
Or should the script be adjusted to use some other parameter with the above commands?

The script determine the IP-number from the machine that run the script.
Dave: Can it be something like 192.168.0.101 for your machine?

The script PARSE away the last part and then PING 192.168.0.1 to 192.168.0.255 and follow that by listing each with ARP
Could you please add

--- Code: ---call trace '?i'
--- End code ---
before the first line that begin with '@HOST and step through the code and tell us?

Some of the PARSE lines may very well need tweaking depending on wrong assumptions made

Navigation

[0] Message Index

[#] Next page

Go to full version