/* if mdev field exists, shift input one unit left */
if (strpos($this->_raw_data[$raw_data_len - 1], 'mdev')) {
/* do not forget the rtt field */
$this->_round_trip['min'] = ltrim($round_trip[5]);
$this->_round_trip['avg'] = $round_trip[6];
$this->_round_trip['max'] = $round_trip[7];
} else {
$this->_round_trip['min'] = ltrim($round_trip[4]);
$this->_round_trip['avg'] = $round_trip[5];
$this->_round_trip['max'] = $round_trip[6];
}
} /* function _parseResultlinux() */
/**
* Parses the output of NetBSD's ping command
*
* @access private
* @see _parseResultfreebsd
*/
function _parseResultnetbsd()
{
$this->_parseResultfreebsd();
} /* function _parseResultnetbsd() */
/**
* Parses the output of Darwin's ping command
*
* @access private
*/
function _parseResultdarwin()
{
$raw_data_len = count($this->_raw_data);
$icmp_seq_count = $raw_data_len - 5;
/* loop from second elment to the fifths last */
for($idx = 1; $idx < $icmp_seq_count; $idx++) {
$parts = explode(' ', $this->_raw_data[$idx]);
$this->_icmp_sequence[substr($parts[4], 9, strlen($parts[4]))] = substr($parts[6], 5, strlen($parts[6]));
}