[Gambas-user] ICMP

John Dovey dovey.john at gmail.com
Tue May 25 21:01:58 CEST 2021


Thanks. That's pretty cool code.

I think I'm probably going to go with the managed terminal emulator.
Capture the output and work from there.

JD


On Tue, 25 May 2021 at 13:08, <jose.rodriguez at cenpalab.cu> wrote:

> May 25, 2021 1:10 PM, "John Dovey" <dovey.john at gmail.com> wrote:
>
> > What i would like to do is iterate through the list checking
> reachability (ping is ok for that) but
> > also the availability of the advertised services. Simply “are you
> responding on that port, and if
> > so what is the response”. I hat I’m considering doing is just using a
> scripted telnet session
> > (doable within Gambas I think) and capturing the output, then reading
> that to see what the status
> > is.
> >
>
>
> Checking availability of a TCP port service should be easily doable with
> TCP sockets, but you might have to actually send something after connection
> if you want to check the response (though some services, as you can check
> with telnet, will reply with just enough). Ping should also be doable, but
> you'd need to look up the ICMP echo protocol RFCs, or related documentation
> (there is some example code around, mainly in C, which might also help).
>
> For example:
> https://www.geeksforgeeks.org/ping-in-c/
>
> Regards,
>
> Joe1962
>
>
> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20210525/9f57fce2/attachment-0001.htm>


More information about the User mailing list