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

Support for SPX? #4

Open
Midar opened this issue Oct 21, 2022 · 4 comments
Open

Support for SPX? #4

Midar opened this issue Oct 21, 2022 · 4 comments

Comments

@Midar
Copy link
Contributor

Midar commented Oct 21, 2022

I was wondering if support for SPX will be added? When trying to create a socket using socket(AF_IPX, SOCK_SEQPACKET, NSPROTO_SPX) or socket(AF_IPX, SOCK_STREAM, NSPROTO_SPX), I get ESOCKTNOSUPPORT. This works fine on Windows, does it need to be done differently on Linux?

IPX sockets seem to work fine.

@pasis
Copy link
Owner

pasis commented Oct 22, 2022

Support of SPX was removed in Linux 2.5.31 (in 2002). I doubt that old code can be simply adopted as is and may require implementation from scratch.

Unfortunately, I cannot work on this in near future, although I'd love to play with it... According to wiki, FreeBSD still has support of IPX/SPX, so maybe it can be your temporary solution.

@Midar
Copy link
Contributor Author

Midar commented Oct 22, 2022

FreeBSD also removed IPX quite a while ago, so that isn't an option either, unfortunately.

That might indeed be a bit old given that it even predates 2.6.

Thank you for keeping IPX alive on Linux, I gave it a quick test on 5.19.16 and it seems to work :).

@Midar
Copy link
Contributor Author

Midar commented Oct 24, 2022

Correct me if I'm wrong, but wouldn't it be possible to implement SPX sockets entirely in userland by just creating an IPX socket with the correct packet type and then having a userland implementation using said IPX socket to implement SPX?

@pasis
Copy link
Owner

pasis commented Oct 25, 2022

Correct me if I'm wrong, but wouldn't it be possible to implement SPX sockets entirely in userland by just creating an IPX socket with the correct packet type and then having a userland implementation using said IPX socket to implement SPX?

Looks like yes, SPX header will be just a payload for IPX datagrams. However, you will need to implement a stream on top of datagrams. Also, this can be done in an LD_PRELOAD library with intercepting of limited number of socket API to implement SPX recv/send transparently for the application

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

No branches or pull requests

2 participants