[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ICMP socket with Gambas - working
[Thread Prev] | [Thread Next]
[Date Prev] | [Date Next]
- Subject: Re: ICMP socket with Gambas - working
- From: Lee <t.lee.davidson@xxxxxxxxx>
- Date: Mon, 30 Jun 2025 14:22:28 -0400
- To: user@xxxxxxxxxxxxxxxxxxxxxx
On 6/30/25 9:18 AM, Lee wrote:
So, it is indeed possible to short-circuit the embedded in_addr structure as I originally supposed?
To answer my own question just in case it might help, Olivier, yes it is possible to replace the embedded in_addr structure member in socketaddr_in with an integer.
Structure: Public Struct SockAddr_in SinFamily As Short SinPort As Short SinAddr As Integer _pad[8] As Byte ' Be sure to include the padding End Struct Code to stuff the address with `inet_pton`: DestAddr.SinFamily = AF_INET DestAddr.SinPort = 0 rc = inet_pton(AF_INET, "8.8.8.8", VarPtr(iSinAddr)) ' Use a substitute var as VarPtr(DestAddr.SinAddr) will not work. If rc < 1 Then Print "Error converting address." Quit Endif DestAddr.SinAddr = iSinAddr I hope you are able to effectively sort out this thread and implement a solution that works for you. :-) And, thank you for the "Socket_Linux_documentation" PDF. I have saved it for future reference. -- Lee --- Gambas User List Netiquette [https://gambaswiki.org/wiki/doc/netiquette] ---- --- Gambas User List Archive [https://lists.gambas-basic.org/archive/user] ----
Re: ICMP socket with Gambas | Lee <t.lee.davidson@xxxxxxxxx> |
Re: ICMP socket with Gambas | Linus <olivier.cruilles@xxxxxxxx> |
Re: ICMP socket with Gambas | Lee <t.lee.davidson@xxxxxxxxx> |
Re: ICMP socket with Gambas | vuott@xxxxxxxxxxxx |
Re: ICMP socket with Gambas | Lee <t.lee.davidson@xxxxxxxxx> |
Re: ICMP socket with Gambas | vuott@xxxxxxxxxxxx |
Re: ICMP socket with Gambas - working | Lee <t.lee.davidson@xxxxxxxxx> |
Re: ICMP socket with Gambas - working | Benoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx> |
Re: ICMP socket with Gambas - working | Lee <t.lee.davidson@xxxxxxxxx> |