Hmmm....
Just have been comparing Dosbox-X's IPX server code (https://github.com/joncampbell123/dosbox-x/bl … e/ipxserver.cpp ) and the IPXGW code (https://github.com/jsalin/ipxgw/blob/master/ipxgw.cpp ).
So a Dosbox server registration packet has protocol 0x2(echo) and the source and destination is a NULL destination (address 00.00.00.00.00.00). Although it only checks the destination to be a NULL destination somehow (is that even correct behaviour for that hack)?
The Dosbox server answer to it is another echo packet from the connected IP address it registers to the NULL destination to the client. The client can actually repond to that, which will once again send it to the NULL destination host, because of the NULL destination source.
So basically, the NULL destination and source fields must be avoided to prevent this part of the handling from activating.
This got me thinking. Perhaps the default gateway can be used for this to be handled in a way that can be used(node FFFFFFFFFD).
Looking at Dosbox's IPX code (https://github.com/joncampbell123/dosbox-x/bl … re/ipx.cpp#L567 ), it looks like any packet broadcasted to FFFFFFFF port FFFF is receiving an ping (in this case source and destination protocol 2) back from any connected client with the source address being the client that is connected from Dosbox (https://github.com/joncampbell123/dosbox-x/bl … re/ipx.cpp#L512 ).
So perhaps UniPCemu should send a echo packet to FFFFFFFF:FFFF socket 2 from FFFFFFFF:FFFE socket 2?
Then check for any echo packets with source and destination socket echo(0x2) and destination FFFFFFF:FFFE? Then the source address would tell the server an address has been allocated.
Of course, the server itself should perform this reply to such echo requests as well to detect it's own registered addresses (as well as other UniPCemu clients that might be running on the network)?
In that way, UniPCemu should be able to check for assigned IPX addresses, trying the next address until no replies arrive within a certain timeout, in which case a free IPX address for use by the client has been found?