Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement networking through bsdsocket.library #22

Open
niklasekstrom opened this issue Jul 25, 2019 · 6 comments
Open

Implement networking through bsdsocket.library #22

niklasekstrom opened this issue Jul 25, 2019 · 6 comments
Labels
enhancement New feature or request

Comments

@niklasekstrom
Copy link
Owner

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.

@niklasekstrom niklasekstrom added the enhancement New feature or request label Jul 25, 2019
@niklasekstrom
Copy link
Owner Author

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.

@niklasekstrom
Copy link
Owner Author

niklasekstrom commented Aug 10, 2019

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.

@nonarkitten
Copy link

I think this is a killer feature!

@patrikaxelsson
Copy link

patrikaxelsson commented May 8, 2020

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.

@niklasekstrom
Copy link
Owner Author

@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 " and a314fs.

@jcagigal
Copy link

AmIRC would be nice. RPI could run BittleBee (https://www.bitlbee.org) and you could access Telegram, Discord and other interesting messaging applications.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants