[fpc-pascal] How to check if a network is available?

Luca Olivetti luca at ventoso.org
Mon Jun 21 11:46:45 CEST 2021


El 20/6/21 a les 19:38, Jean SUZINEAU via fpc-pascal ha escrit:
> Ping uses ICMP protocol.
> I don't have currently Indy installed on my machines, but I think you 
> can find pascal components for ICMP client and even ICMP server.
> I think that this way you can do a single "ping", a single ICMP request.
> It seems that Synapse has pingĀ  support too:
> https://wiki.freepascal.org/Networking_libraries

Beware though: under raw socket access (needed for ICMP) is a privileged 
operation.
In older systems the ping executable was setuid root, nowadays it has 
the cap_net_raw capability.


Bye
-- 
Luca



More information about the fpc-pascal mailing list