Is there a way to dictate the order of the network interfaces returned by the Win32 WinSock WSAIoctl
function's SIO_GET_INTERFACE_LIST
functionality?
Background:
We've got a heterogeneous CORBA system where a nameservice running the ACE/TAO CORBA implementation on Windows has ACE/TAO-based services registered with it that clients implemented using the IIOP.NET CORBA implementation need to use. The IIOP.NET-based clients are on a separate Windows machine. The ACE/TAO machine has multiple network interfaces (only one of which is accessible by the client machine) and therefore multiple IP addresses.
The IIOP.NET client can connect to the nameservice and retrieve a proxy to the registered server CORBA object that it needs to use, but when it tries to use the proxy it throws exceptions.
Based on way too much time spent debugging, we've come to the conclusion that the problem is that IIOP.NET only attempts to connect to the first IP address in the CORBA IOR string that the name service returns when asked for the service. The IOR string is a description of the object, including its IP address(es). Most CORBA clients will attempt to connect with the server object using all the addresses in the IOR string, but it looks like IIOP.NET doesn't do that.
The ACE/TAO code that generates the IOR string uses the WinSock WSAIoctl
command with the control code SIO_GET_INTERFACE_LIST
to return the list of network interfaces on the box and then adds them all to the IOR string. The problem is that the first IP address is the one that is not on the network that the IIOP client uses, so when the IIOP.NET client tries to connect to the server object using that IP address it obviously fails and never tries to use the correct IP address. Other CORBA clients such as ACE/TAO do try all the IP addresses and they work in this configuration.
Since I'm not a networking/CORBA god, it's not realistic for me to attempt to change ACE/TAO or IIOP.NET, and we have good reasons to have two, separated networks in this system, but if the first, default IP address returned by WSAIOCtl
were the one that the client needs, that would solve the problem since that IP address would then become the first IP address in the IOR string and IIOP.NET would use that IP address successfully. So, is there a reliable way to cause WSAIoctl
to return the network interfaces in a different order? I don't see anything documented on MSDN on this, unfortunately.
Thanks,
Dave