Added PHPDoc for function isPingable()

This commit is contained in:
Nils Steinger
2015-09-24 02:07:15 +02:00
parent 4c2d66791d
commit 7d7e7098ab

View File

@@ -502,6 +502,15 @@ function isSNMPable($device) {
}
}
/**
* Check if the given host responds to ICMP echo requests ("pings").
*
* @param string $hostname The hostname or IP address to send ping requests to.
* @param int $address_family The address family (AF_INET for IPv4 or AF_INET6 for IPv6) to use. Defaults to IPv4. Will *not* be autodetected for IP addresses, so it has to be set to AF_INET6 when pinging an IPv6 address or an IPv6-only host.
* @param int $device_id This parameter is currently ignored.
*
* @return bool TRUE if the host responded to at least one ping request, FALSE otherwise.
*/
function isPingable($hostname,$address_family = AF_INET,$device_id = FALSE) {
global $config;