OS/2, eCS & ArcaOS - Technical > Programming

[Classic REXX] Network Map

<< < (8/10) > >>

Dave Yeo:

--- Quote from: Remy on March 28, 2025, 09:16:52 am ---Updated

--- End quote ---

This one runs much faster with,

--- Code: ---Scan started using env parameters: WOL(1) and NET(1)
Computer (from sockets):  HOST: unknown host ARCAOS-44454C4

--- End code ---

Remy:

--- Quote from: Dave Yeo on March 28, 2025, 03:49:35 pm ---
--- Quote from: Remy on March 28, 2025, 09:16:52 am ---Updated

--- End quote ---

This one runs much faster with,

--- Code: ---Scan started using env parameters: WOL(1) and NET(1)
Computer (from sockets):  HOST: unknown host ARCAOS-44454C4

--- End code ---

--- End quote ---

Oops, developper error (had deleted a line into the code)

Now, updated
I change UNDEFINEDxxx host name to use UHOST-xxx  with xxx the last @ip qualifier  (my router adds HOST-nnn with nnn an incremental number set to a connected @mac)

Hope it been better.

Jan-Erik Lärka:
Great update of the script Remy!  8)

It now tell me that the vacuum cleaner has gone offline for the night, but it managed to pull out the cable of the laptop today and ensured it went offline as well.


--- Quote from: Remy on March 28, 2025, 05:34:48 am ---I comment the 2 initial SET line into de macaddr.cmd and use those from config.sys
uncomment bof lines if you would like set these two vars without config.sys update
e.g.  remove /* and */ of both lines and set value to 1 or 0
/* 'SET WOL=1' */   
/* 'SET NET=1' */

--- End quote ---

Just type
SET WOL=1
SET NET=1
on the command line before you run the script and those will be added to each object it create, thus not require any of them in config.sys

or create a program object "Refresh" pointing to the script, without any parameter, but with
WOL=1
NET=1
in the Environment tab (See each created network object for examples).

How about merging/reuse code for the various calls that resemble each other, and control them with parameters?
Perhaps explore the use of parsing templates:
PARSE VALUE ... WITH pre (fixed_variable1) mid (fixed_variable2) post
The idea was initially to build a network map of the devices found on the home LAN with info about them.
What uses can we explore here?
Shares would be one thing, but ... are there something else that one want and can be created?!

Dave Yeo:

--- Quote from: Remy on March 28, 2025, 08:26:49 pm ---
--- Quote from: Dave Yeo on March 28, 2025, 03:49:35 pm ---
--- Quote from: Remy on March 28, 2025, 09:16:52 am ---Updated

--- End quote ---

This one runs much faster with,

--- Code: ---Scan started using env parameters: WOL(1) and NET(1)
Computer (from sockets):  HOST: unknown host ARCAOS-44454C4

--- End code ---

--- End quote ---

Oops, developper error (had deleted a line into the code)

Now, updated
I change UNDEFINEDxxx host name to use UHOST-xxx  with xxx the last @ip qualifier  (my router adds HOST-nnn with nnn an incremental number set to a connected @mac)

Hope it been better.

--- End quote ---

This one took about 50 seconds to finish,

--- Code: ---Scan started using env parameters: WOL(1) and NET(1)
Computer (from sockets):  HOST: unknown host ARCAOS-44454C4.lan    192.168.0.106

Uhost-106.lan: 192.168.0.106: 70:20:84:0e:35:53
wake on lan sent:        7020840e35537020840e35537020840e35537020840e ...
> WPS Refreshed for: Uhost-106.lan 192.168.0.106


--- End code ---

Remy:
Hi !

Several changes
- When PC is booted and no activity was done on the network, ARP table has too less information in it (use of an initial ping resolves this)     
- reduced as possible the full scan time ( should be dropped to something nearly 12s )
- had to introduce several changes due I found that some registered @mac format could make some scan buggy (e.g. x :xx:x :xx:xx:x while xx:xx:xx:xx:xx:xx is expected)
- Add env var FLC for ARP flush (when this env is set to 1, a WPS object is created to allow full scan refresh following an arp flush

Regards

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version