Added some docs
Former-commit-id: 22d2aeda5c16a4fcf4414760affb77a6d5c0c375
This commit is contained in:
parent
eba858d6c1
commit
1dceb93a76
|
@ -1775,6 +1775,13 @@ function netflow_address_resolution(&$values, &$get_hostnames, $aggregate)
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Check if is aggregate by IP or by port
|
||||
*
|
||||
* @param string $aggregate Aggregate tag.
|
||||
*
|
||||
* @return boolean True if is IP. False for port.
|
||||
*/
|
||||
function netflow_aggregate_is_ip($aggregate)
|
||||
{
|
||||
return in_array($aggregate, ['dstip', 'srcip']);
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
* @param integer $end Utimestamp of end time.
|
||||
* @param string $ip_filter Ip to filter.
|
||||
* @param boolean $order_by_bytes True by top by bytes. False by packets.
|
||||
* @param array $host_filter Host filter array.
|
||||
*
|
||||
* @return array With requested data.
|
||||
*/
|
||||
|
@ -168,6 +169,15 @@ function network_format_bytes($value)
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Build netflow data structure to network map.
|
||||
*
|
||||
* @param integer $start Time in timestamp format.
|
||||
* @param integer $end Time in timestamp format.
|
||||
* @param integer $top Max data to show.
|
||||
*
|
||||
* @return array With map structure.
|
||||
*/
|
||||
function network_build_map_data($start, $end, $top)
|
||||
{
|
||||
$data = network_matrix_get_top($top, true, $start, $end);
|
||||
|
@ -211,7 +221,7 @@ function network_build_map_data($start, $end, $top)
|
|||
continue;
|
||||
}
|
||||
|
||||
$relations[$host.'-'.$sd['host']] = [
|
||||
$relations[$src_index.'-'.$dst_index] = [
|
||||
'id_parent' => $inverse_hosts[$sd['host']],
|
||||
'parent_type' => NODE_GENERIC,
|
||||
'child_type' => NODE_GENERIC,
|
||||
|
|
Loading…
Reference in New Issue