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

BOOL PIPSocket::GetGatewayAddress ( Address addr  )  [static, inherited]

Get the IP address that is being used as the gateway, that is, the computer that packets on the default route will be sent.

The string returned may be used in the Connect() function to open that interface.

Note that the driver does not need to be open for this function to work.

Returns:
TRUE if there was a gateway.
Parameters:
addr  Variable to receive the IP address.

Definition at line 1937 of file ethsock.cxx.

{
  PWaitAndSignal m(GetSNMPMutex());
  PWin32SnmpLibrary & snmp = PWin32SnmpLibrary::Current();

  PWin32AsnOid gatewayOid = "1.3.6.1.2.1.4.21.1.7.0.0.0.0";
  return snmp.GetOid(gatewayOid, addr);
}


Generated by  Doxygen 1.6.0   Back to index