PingSubnet

The PingSubnet method pings the specified subnet.

Method Synopsis

PingSubnet($subnet, $netMask [, $protocol])

Parameters

$subnet
Specifies the IP address of the subnet to be pinged. Typically, subnets are defined as all devices whose IP addresses have the same prefix. Thus, all devices with IP addresses that start with 1.1.1 would be part of the same subnet.
$netmask
Specifies the mask used to determine the subnet to which an IP address belongs.
$protocol
Specifies an optional parameter that identifies the IP protocol. You can specify one of the following values:
  • 1 — Specifies Internet Protocol version 4 (IPv4).
  • 3 — Specifies Internet Protocol version 6 (IPv6).

Description

The PingSubnet method pings the subnet specified in the subnet parameter. The method returns without waiting for responses from the network devices that reside on the specified subnet.

Notes

The PingSubnet method issues the appropriate ping request to the Helper Server, which performs the actual work. Thus, the Helper Server (and ncp_ctrl) must be running so that this method can make the appropriate ping request.

Returns

Upon completion, the PingSubnet method returns the value 1 to indicate that it successfully pinged the devices at the specified subnet. Otherwise, it returns the value 0 (zero).