From 7d7e7098ab952709e5ec4c98edad7db5b8198dff Mon Sep 17 00:00:00 2001 From: Nils Steinger Date: Thu, 24 Sep 2015 02:07:15 +0200 Subject: [PATCH] Added PHPDoc for function isPingable() --- includes/functions.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/includes/functions.php b/includes/functions.php index 8c3acfe930..b9306d895c 100644 --- a/includes/functions.php +++ b/includes/functions.php @@ -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;