Logo Search packages:      
Sourcecode: pwlib version File versions  Download package

BOOL PEthSocket::EnumIpAddress ( PINDEX  idx,
PIPSocket::Address addr,
PIPSocket::Address netMask 

Enumerate all of the IP addresses and net masks bound to the open interface. This allows all the addresses to be found on multi-homed hosts. Begin with index 0 and increment until the function returns FALSE to enumerate all the addresses.

TRUE if the address is returned, FALSE on error or if there are no more addresses bound to the interface.
idx  Index
addr  Variable to receive the IP address.
netMask  Variable to receive the net mask.

Definition at line 1620 of file ethsock.cxx.

References PChannel::IsOpen(), PChannel::NotFound, PChannel::NotOpen, and PChannel::SetErrorValues().

Referenced by GetIpAddress().

  if (IsOpen()) {
    if (driver->EnumIpAddress(idx, addr, net_mask))
      return TRUE;

    return SetErrorValues(NotFound, ENOENT);

  return SetErrorValues(NotOpen, EBADF);

Generated by  Doxygen 1.6.0   Back to index