Getting ipx/spx address of remote machine

Getting ipx/spx address of remote machine

Post by Rob Gree » Mon, 11 Jan 1999 04:00:00



Hello,
   I have a client/server app that communicates with tcp/ip using winsock
1.1.  I am adding SPX support to it, and have the server to where it can
listen.  However i can not get the net:node address of the server from a
client.  gethostbyname returns back the ip hostent structure instead (in
fact it says it only returns for internet protocol despite returning a
"independant" structure).  looking at the header files i can get the address
of the client, but i need the remote machine.  (ie connect to server HOMER
from workstation ROBG)  If i need to call other windows api functions that
is okay.  I dont think i can go to winsock 2.x yet.

Thanks,
Rob

 
 
 

Getting ipx/spx address of remote machine

Post by Charles Pa » Wed, 13 Jan 1999 04:00:00



> Hello,
>    I have a client/server app that communicates with tcp/ip using winsock
> 1.1.  I am adding SPX support to it, and have the server to where it can
> listen.  However i can not get the net:node address of the server from a
> client.  gethostbyname returns back the ip hostent structure instead (in
> fact it says it only returns for internet protocol despite returning a
> "independant" structure).  looking at the header files i can get the address
> of the client, but i need the remote machine.  (ie connect to server HOMER
> from workstation ROBG)  If i need to call other windows api functions that
> is okay.  I dont think i can go to winsock 2.x yet.

> Thanks,
> Rob

There's a simple way to get the net:nod address from the server itself,
you need to create a ipx/spx datagram socket, bind it, and call
getsockopt() to request the ipx address.

However, if you want to get the address from the client side, you can
try SAP; I have never did it myself, and have no idea whether it works
with WinSocket 1.1 or not.