content.gif menu.gif basics.gif

getHostByAddr()

Returns the host name for a given IP address.

Synopsis

string getHostByAddr(string name);

Parameters

    Parameter

    Description

    name

    IP-Adresse (z.B. 192.168.170.15)

    IP address (for example, 192.168.170.15)

Return value

Returns the host name for a given IP address. In case of errors, an empty string will be returned and an error message will be displayed in the log viewer.

Errors

Wrong or missing arguments.

Description

This function returns the host name wanted for any IP address.

note.gifNote

It is to consider that, the function can cause a delay in the range of seconds until a host name can be determined.

example.gifExample

Returns the host name for the IP address 192.168.170.15

main()

{

string name, host;

 

name = "192.168.170.15";

host = getHostByAddr(name);

DebugN("Host name:" + host);

}

Assignment

Miscellaneous functions

Availability

UI, CONTROL

See also

    getHostByName()

page_top.gif

 

V 3.11 SP1

Copyright ETM professional control GmbH 2013 All Rights Reserved