[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ICMP socket with Gambas


I’m not a specialist of that and the only piece of code in C I found is that.

Here is the minimum of C code to send a PING request named an ICMP request (RAW socket using the Protocol ICMP) 

Not all the code is necessary to understand, even the fact the code is relatively simple.

I hope it could help to understand how to create a simple RAW Socket in C

I have tested the C code and it works correctly.


Attachment: ping_cmd.c
Description: Binary data



Olivier

> Le 26 juin 2025 à 16:50, Benoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx> a écrit :
> 
> Le 26/06/2025 à 15:23, Linus a écrit :
>> Hello,
>> I would like to code in Gambas an ICMP request like the PING command does but entirely in Gambas.
>> It is possible to do it with gb.net <http://gb.net> Socket ?
>> For all I have tested, it seems the fact to open a RAW socket + ICMP Protocol is not implemented into Gambas.
>> Am I wrong ?
>> Thank you
>> Olivier
> 
> No you are right. And IPV6 too is not really supported.
> 
> It's not a domain I know well. So I don't know at the moment if it's just a matter of adding an option to the 'Socket' class to let it open the socket in raw mode, or if a new class must be created because the behaviour of a raw socket is too much different.
> 
> Regards,
> 
> -- 
> Benoît Minisini.
> 
> 


References:
ICMP socket with GambasLinus <olivier.cruilles@xxxxxxxx>
Re: ICMP socket with GambasBenoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx>