ipx icon indicating copy to clipboard operation
ipx copied to clipboard

Support for SPX?

Open Midar opened this issue 3 years ago • 4 comments

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.

Midar avatar Oct 21 '22 22:10 Midar

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.

pasis avatar Oct 22 '22 07:10 pasis

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 avatar Oct 22 '22 11:10 Midar

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?

Midar avatar Oct 24 '22 21:10 Midar

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

pasis avatar Oct 25 '22 12:10 pasis