a314
a314 copied to clipboard
Implement networking through bsdsocket.library
Write a bsdsocket.library that forwards network calls to the RPi.
The API seems straight-forward enough: https://wiki.amigaos.net/amiga/autodocs/bsdsocket.doc.txt.
Each time bsdsocket.library is opened a new Library structure should be allocated, initialized and returned, in accordance with the description of bsdsocket.library/OpenLibrary in the linked document.
Just an update: I have made a fair amount of progress on this, and with a few more hours of hacking I should have a useful subset of the API functions implemented.
I was able to get amitcp_telnet (http://aminet.net/package/comm/tcp/amitcp_telnet) to run under WB 1.3 (there was a single 2.0 function called), so that's what I'm using to test with.
I have implemented the following functions: socket, connect, send, recv, shutdown, setsockopt, IoctlSocket, CloseSocket, WaitSelect, SetErrnoPtr, Inet_NtoA, inet_addr, gethostbyname, getservbyname. These are all the functions that amitcp_telnet call, and so that program now works.
The trickiest part has been to realize which arguments need to be byte-swapped due to that the Amiga is big-endian and the RPi is little-endian. Another issue, that I (mostly) haven't dealt with, is that it should be possible to interrupt blocking functions using signals such as by ctrl-c.
Implementing the rest of the functions should be conceptually straight forward but a bit time consuming. If anyone wants to use this functionality then let me know and I will put in some effort to finish it up.
I think this is a killer feature!
Just an update: I have made a fair amount of progress on this, and with a few more hours of hacking I should have a useful subset of the API functions implemented.
I was able to get amitcp_telnet (http://aminet.net/package/comm/tcp/amitcp_telnet) to run under WB 1.3 (there was a single 2.0 function called), so that's what I'm using to test with.
All TCP/IP-stacks on the Amiga implementing the bsdsocket.library API requires kickstart 2.0+, so software written for it generally had no reason to support less - it will make it much easier for you to get software for testing if you use kickstart 2.0+ yourself.
Also want to add that it is a highly useful feature to be able to use bsdsocket.library software on the Amiga.
@patrikaxelsson I think you're right about the need for Workbench 2.0+.
Do you have some application in mind that uses bsdsocket.library? For me, downloading files and copying files on my network is sorted through "pi wget
AmIRC would be nice. RPI could run BittleBee (https://www.bitlbee.org) and you could access Telegram, Discord and other interesting messaging applications.