GetInternetAddress
Returns a connection’s Internet address
#include <nwconn.h> int GetInternetAddress ( WORD connectionNumber, char *networkNumber, char *nodeAddress);
The following table lists return values and descriptions.
The internetwork address is comprised of the networkNumber and the nodeAddress and uniquely identifies an object. The networkNumber is the address of the network to which the object is attached. This is the same type of address as is displayed when the NetWare console command DISPLAY NETWORKS is issued.
The nodeAddress is the address of the object on the network that is returned in the networkNumber parameter. Use this address to send packets directly to the object with IPX/ SPX™.
Print the networkNumber and the nodeAddress using the following format:
printf ("%08lx", LongSwap (* (long *) networkNumber) ); printf ("%08lx%04x", LongSwap (* (long *) nodeAddress), IntSwap (* (int *) nodeAddress + 4) );
GetConnectionInformation, GetConnectionNumber, GetMaximumNumberOfStations, GetObjectConnectionNumbers, GetStationAddress, IntSwap, LongSwap
#include <nwconn.h> int completionCode; char networkNumber[4]; char nodeAddress[6]; /* return the internet address of the current connection.*/ completionCode = GetInternetAddress (GetConnectionNumber(), networkNumber, nodeAddress);