sadams54 wrote: ↑Tuesday 7th March 2023 1:08am
ipv4 and v6 are very different if you have not noticed just looking at the addresses.
True dat. They have different addr structures and addressing protocols.
I would bet that v6 is not supported
I would bet the same.
and the reason is that v4 is not going away and will likely outlive all of us.
I wouldn't care to speculate on the reason, nor the expectancy.
I would bet that if you write for v4 you will not have any issues.
Well, I'm wanting to provide full functionality. Maybe communicate with IoT things, etc.
v6 is usually something handled by the ISP and should not enter into consideration for your projects.
I appreciate your concerns for my delicate sensibilities. Truth is, I've done TCP programming in assembly language on a '286, Winsock on Win95 and up to 7 (went to Linux), in C, Python, and Gambas in Linux. Early in my career I was a network administrator then I shifted into application development, mostly web based database driven towards the end.
I do understand that you want to learn and experiment but you may not be able to for this.
Not through Gambas Socket it seems. Actually, I'm more in "git 'er done" mode but I want to do it properly form the foundation. I've written a shared library for the job, it is almost complete. The Gambas program allocates a bunch of space, called a "Tube", as an integer array. This is the memory space for the library, and managed by the library. The library itself does not allocate memory so should be multi-thread safe. The Tube is the first argument in every call.
Here is the Gambas interface definition:
Library "/tmp/R/libGambasIPv6"
'---- Life cycle
Extern IPv6_PrepareTube(ArgTube As Integer[], ArgTubeSize As Integer, ArgLaneCount As Integer, RetMessageZ As String)
Extern IPv6_WrapupTube(ArgTube As Integer[])
'---- Information about
Extern IPv6_GetIp(ArgTube As Integer[], ArgLaneIndex As Integer, RetIpAddress As String) As Integer
'---- Listen
Extern IPv6_ListenOn(ArgTube As Integer[], ArgPort As Integer, RetMessageZ As String) As Integer
Extern IPv6_ListenOff(ArgTube As Integer[], ArgLaneIndex As Integer)
'---- Call
Extern IPv6_CallTo(ArgHost As String, ArgPort As Integer) As Integer
'---- Event loop or timer event handler strobing call
Extern IPv6_Strobe(ArgTube As Integer[], ArgWaitMillisec As Integer, RetMessageZ As String) As Integer
'---- Receive data
Extern IPv6_GetReadySize(ArgTube As Integer[], ArgLaneIndex As Integer) As Integer
Extern IPv6_FetchData(ArgTube As Integer[], ArgLaneIndex As Integer, ArgSize As Integer, RetData As String) As Integer
'---- Send data
Extern IPv6_Transmit(ArgTube As Integer[], ArgLaneIndex As Integer, ArgLength As Integer, ArgData As String, RetMessageZ As String) As Integer
'---- Hang up
Extern IPv6_HangUp(ArgTube As Integer[], ArgLaneIndex As Integer)
You should also be able to call it from Pyton, R, FORTRAN, and clearly C.
Here is a wrapper function to make it friendly to other Gambas code:
'=============================================================================
Public Sub TransmitString(ArgLaneIndex As Integer, ArgString As String) As String
Dim theMessageZ As String = Space(1000) & Chr(0)
Dim theLength As Integer = Len(ArgString)
Iv6_Transmit(MyTube, ArgLaneIndex, theLength, ArgString, theMessageZ)
Dim z As Integer = InStr(theMessageZ, Chr(0))
Return Left(theMessageZ, z - 1)
End
'=============================================================================
I am curious about the project and what it does and the reason for its existence. I might have some ideas for you.
I'm developing an operating environment which aims to be easy to use through a verbal interface. Hence, I am currently testing by logging in with telnet, which I can now do from any machine on my local network using ipv4 or ipv6. Each connection gets its own handler object. I'd rather not say more until I have a near complete working rendition of what I have in mind, then I would welcome ideas.
What I would like help with, and would partially satisfy your curiosity, is testing and code scrutiny of my shared library. It isn't fool proof, nor intended to be, it's meant to be fast and lean.
Anybody who wants to be an alpha tester on my library please email me at
cedron a.t.
protonmail d.o.t.
com. I will be posting it in the Showcase forum at some point, with a simple Gambas driver program.