diff --git a/.gitignore b/.gitignore
index a6b4e49..5a322e8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -22,3 +22,4 @@
.git*
config.php
locales/po/*.mo
+.omc/
diff --git a/Net/DNS2.php b/Net/DNS2.php
index be15759..7494f8d 100644
--- a/Net/DNS2.php
+++ b/Net/DNS2.php
@@ -1,5 +1,6 @@
'ENCAP'
);
-$required_fields_v4 = array(
+$required_fields_v4 = [
'octetDeltaCount' => 1,
'packetDeltaCount' => 2,
'protocolIdentifier' => 4,
@@ -175,9 +176,9 @@
'sourceIPv4Address' => 8,
'destinationTransportPort' => 11,
'destinationIPv4Address' => 12,
-);
+];
-$required_fields_v6 = array(
+$required_fields_v6 = [
'octetDeltaCount' => 1,
'packetDeltaCount' => 2,
'protocolIdentifier' => 4,
@@ -196,9 +197,9 @@
'samplingInterval' => 34,
'ipVersion' => 60,
'ipNextHopIPv6Address' => 62,
-);
+];
-$flow_fields = array(
+$flow_fields = [
'engine_type' => 38,
'engine_id' => 39,
'sampling_interval' => 34,
@@ -232,121 +233,121 @@
'flags' => 6,
'start_time' => 22,
'end_time' => 21
-);
+];
$flow_fieldids = array(
- 1 => array(
+ 1 => [
'column' => 'dOctets',
'name' => 'octetDeltaCount'
- ),
- 2 => array(
+ ],
+ 2 => [
'column' => 'dPkts',
'name' => 'packetDeltaCount'
- ),
- 4 => array(
+ ],
+ 4 => [
'column' => 'protocol',
'name' => 'protocolIdentifier'
- ),
- 5 => array(
+ ],
+ 5 => [
'column' => 'tos',
'name' => 'ipClassOfService'
- ),
- 6 => array(
+ ],
+ 6 => [
'column' => 'flags',
'name' => 'tcpControlBits'
- ),
- 7 => array(
+ ],
+ 7 => [
'column' => 'src_port',
'name' => 'sourceTransportPort'
- ),
- 8 => array(
+ ],
+ 8 => [
'column' => 'src_addr',
'name' => 'sourceIPv4Address'
- ),
- 9 => array(
+ ],
+ 9 => [
'column' => 'src_prefix',
'name' => 'sourceIPv4PrefixLength'
- ),
- 10 => array(
+ ],
+ 10 => [
'column' => 'src_if',
'name' => 'ingressInterface'
- ),
- 11 => array(
+ ],
+ 11 => [
'column' => 'dst_port',
'name' => 'destinationTransportPort'
- ),
- 12 => array(
+ ],
+ 12 => [
'column' => 'dst_addr',
'name' => 'destinationIPv4Address'
- ),
- 13 => array(
+ ],
+ 13 => [
'column' => 'dst_prefix',
'name' => 'destinationIPv4PrefixLength'
- ),
- 14 => array(
+ ],
+ 14 => [
'column' => 'dst_if',
'name' => 'egressInterface'
- ),
- 15 => array(
+ ],
+ 15 => [
'column' => 'nexthop',
'name' => 'ipNextHopIPv4Address'
- ),
- 16 => array(
+ ],
+ 16 => [
'column' => 'src_as',
'name' => 'bgpSourceAsNumber'
- ),
- 17 => array(
+ ],
+ 17 => [
'column' => 'dst_as',
'name' => 'bgpDestinationAsNumber'
- ),
- 21 => array(
+ ],
+ 21 => [
'column' => 'end_time',
'name' => 'flowEndSysUpTime'
- ),
- 22 => array(
+ ],
+ 22 => [
'column' => 'start_time',
'name' => 'flowStartSysUpTime'
- ),
- 27 => array(
+ ],
+ 27 => [
'column' => 'src_addr',
'name' => 'sourceIPv6Address'
- ),
- 28 => array(
+ ],
+ 28 => [
'column' => 'dst_addr',
'name' => 'destinationIPv6Address'
- ),
- 29 => array(
+ ],
+ 29 => [
'column' => 'src_prefix',
'name' => 'sourceIPv6PrefixLength'
- ),
- 30 => array(
+ ],
+ 30 => [
'column' => 'dst_prefix',
'name' => 'destinationIPv6PrefixLength'
- ),
- 34 => array(
+ ],
+ 34 => [
'column' => 'sampling_interval',
'name' => 'samplingInterval'
- ),
- 38 => array(
+ ],
+ 38 => [
'column' => 'engine_type',
'name' => 'engineType'
- ),
- 39 => array(
+ ],
+ 39 => [
'column' => 'engine_id',
'name' => 'engineId'
- ),
- 60 => array(
+ ],
+ 60 => [
'column' => 'ipVersion',
'name' => 'ipVersion'
- ),
- 62 => array(
+ ],
+ 62 => [
'column' => 'nexthop',
'name' => 'ipNextHopIPv6Address'
- ),
- 160 => array(
+ ],
+ 160 => [
'column' => 'sysuptime',
'name' => 'systemInitTimeMilliseconds'
- )
+ ]
);
$stat_columns_array = array(
@@ -682,7 +683,7 @@
'value' => '|arg1:sortfield|',
'method' => 'drop_array',
'default' => '10',
- 'array' => array()
+ 'array' => []
),
'cutofflines' => array(
'friendly_name' => __('Maximum Rows', 'flowview'),
@@ -850,10 +851,10 @@
'method' => 'hidden',
'value' => get_request_var('return')
),
- 'id' => array(
+ 'id' => [
'method' => 'hidden',
'value' => '|arg1:id|'
- )
+ ]
);
$db_tabs = array(
diff --git a/database.php b/database.php
index 76fd1a1..38c5707 100644
--- a/database.php
+++ b/database.php
@@ -1,4 +1,5 @@
[\w_]+)[`]{0,1}\.){0,1}[`]{0,1}(?
[\w_]+)[`]{0,1}/", $table, $matches);
if ($matches !== false && array_key_exists('table', $matches)) {
@@ -250,10 +251,10 @@ function flowview_db_table_exists($table, $log = true, $cnn_id = false) {
}
function flowview_db_table_create($table, $data, $cnn_id = false) {
- $flowview_cnn = flowview_get_connection($cnn_id);;
+ $flowview_cnn = flowview_get_connection($cnn_id);
$result = flowview_db_fetch_assoc('SHOW TABLES');
- $tables = array();
+ $tables = [];
foreach($result as $index => $arr) {
foreach ($arr as $t) {
$tables[] = $t;
@@ -342,7 +343,7 @@ function flowview_db_table_create($table, $data, $cnn_id = false) {
db_execute_prepared("REPLACE INTO plugin_db_changes
(plugin, `table`, `column`, `method`)
VALUES (?, ?, '', 'create')",
- array('flowview', $table));
+ ['flowview', $table]);
if (isset($data['collate'])) {
flowview_db_execute("ALTER TABLE `$table` COLLATE = " . $data['collate']);
@@ -352,13 +353,13 @@ function flowview_db_table_create($table, $data, $cnn_id = false) {
}
function flowview_db_column_exists($table, $column, $log = true, $cnn_id = false) {
- $flowview_cnn = flowview_get_connection($cnn_id);;
+ $flowview_cnn = flowview_get_connection($cnn_id);
return db_column_exists($table, $column, $log, $flowview_cnn);
}
function flowview_db_add_column($table, $column, $log = true, $cnn_id = false) {
- $flowview_cnn = flowview_get_connection($cnn_id);;
+ $flowview_cnn = flowview_get_connection($cnn_id);
return db_add_column($table, $column, $log, $flowview_cnn);
}
@@ -372,9 +373,9 @@ function flowview_db_add_column($table, $column, $log = true, $cnn_id = false) {
* or false on error
*/
function flowview_db_affected_rows($cnn_id = false) {
- $flowview_cnn = flowview_get_connection($cnn_id);;
+ $flowview_cnn = flowview_get_connection($cnn_id);
- return db_affected_rows($flowview_cnn);;
+ return db_affected_rows($flowview_cnn);
}
/**
@@ -388,7 +389,7 @@ function flowview_db_affected_rows($cnn_id = false) {
* @return bool The output of the sql query as a single variable
*/
function flowview_db_index_exists($table, $index, $log = true, $cnn_id = false) {
- $flowview_cnn = flowview_get_connection($cnn_id);;
+ $flowview_cnn = flowview_get_connection($cnn_id);
return db_index_exists($table, $index, $log, $flowview_cnn);
}
@@ -412,13 +413,13 @@ function flowview_get_connection($cnn_id) {
* @return (array) An array of column types indexed by the column names
*/
function flowview_db_get_table_column_types($table, $cnn_id = false) {
- $flowview_cnn = flowview_get_connection($cnn_id);;
+ $flowview_cnn = flowview_get_connection($cnn_id);
$columns = db_fetch_assoc("SHOW COLUMNS FROM $table", false, $flowview_cnn);
- $cols = array();
+ $cols = [];
if (cacti_sizeof($columns)) {
foreach($columns as $col) {
- $cols[$col['Field']] = array('type' => $col['Type'], 'null' => $col['Null'], 'default' => $col['Default'], 'extra' => $col['Extra']);;
+ $cols[$col['Field']] = ['type' => $col['Type'], 'null' => $col['Null'], 'default' => $col['Default'], 'extra' => $col['Extra']];
}
}
diff --git a/fixprivate.php b/fixprivate.php
index d7b97db..14abd8f 100644
--- a/fixprivate.php
+++ b/fixprivate.php
@@ -1,4 +1,5 @@
'C',
'unsigned16' => 'n',
'unsigned32' => 'N',
@@ -132,7 +132,7 @@
'basicList' => '',
'subTemplateList' => '',
'subTemplateMultiList' => '',
-);
+];
/**
* The specification for allfields can be found here:
@@ -149,498 +149,498 @@
* when using V9. See the function get_unpack_syntax() for more details.
*/
$allfields = array(
- 1 => array('name' => 'octetDeltaCount', 'pack' => 'unsigned64'),
- 2 => array('name' => 'packetDeltaCount', 'pack' => 'unsigned64'),
- 3 => array('name' => 'deltaFlowCount', 'pack' => 'unsigned64'),
- 4 => array('name' => 'protocolIdentifier', 'pack' => 'unsigned8'),
- 5 => array('name' => 'ipClassOfService', 'pack' => 'unsigned8'),
- 6 => array('name' => 'tcpControlBits', 'pack' => 'unsigned16'),
- 7 => array('name' => 'sourceTransportPort', 'pack' => 'unsigned16'),
- 8 => array('name' => 'sourceIPv4Address', 'pack' => 'ipv4Address'),
- 9 => array('name' => 'sourceIPv4PrefixLength', 'pack' => 'unsigned8'),
- 10 => array('name' => 'ingressInterface', 'pack' => 'unsigned32'),
- 11 => array('name' => 'destinationTransportPort', 'pack' => 'unsigned16'),
- 12 => array('name' => 'destinationIPv4Address', 'pack' => 'ipv4Address'),
- 13 => array('name' => 'destinationIPv4PrefixLength', 'pack' => 'unsigned8'),
- 14 => array('name' => 'egressInterface', 'pack' => 'unsigned32'),
- 15 => array('name' => 'ipNextHopIPv4Address', 'pack' => 'ipv4Address'),
- 16 => array('name' => 'bgpSourceAsNumber', 'pack' => 'unsigned32'),
- 17 => array('name' => 'bgpDestinationAsNumber', 'pack' => 'unsigned32'),
- 18 => array('name' => 'bgpNexthopIPv4Address', 'pack' => 'ipv4Address'),
- 19 => array('name' => 'postMCastPacketDeltaCount', 'pack' => 'unsigned64'),
- 20 => array('name' => 'postMCastOctetDeltaCount', 'pack' => 'unsigned64'),
- 21 => array('name' => 'flowEndSysUpTime', 'pack' => 'unsigned32'),
- 22 => array('name' => 'flowStartSysUpTime', 'pack' => 'unsigned32'),
- 23 => array('name' => 'postOctetDeltaCount', 'pack' => 'unsigned64'),
- 24 => array('name' => 'postPacketDeltaCount', 'pack' => 'unsigned64'),
- 25 => array('name' => 'minimumIpTotalLength', 'pack' => 'unsigned64'),
- 26 => array('name' => 'maximumIpTotalLength', 'pack' => 'unsigned64'),
- 27 => array('name' => 'sourceIPv6Address', 'pack' => 'ipv6Address'),
- 28 => array('name' => 'destinationIPv6Address', 'pack' => 'ipv6Address'),
- 29 => array('name' => 'sourceIPv6PrefixLength', 'pack' => 'unsigned8'),
- 30 => array('name' => 'destinationIPv6PrefixLength', 'pack' => 'unsigned8'),
- 31 => array('name' => 'flowLabelIPv6', 'pack' => 'unsigned32'),
- 32 => array('name' => 'icmpTypeCodeIPv4', 'pack' => 'unsigned16'),
- 33 => array('name' => 'igmpType', 'pack' => 'unsigned8'),
- 34 => array('name' => 'samplingInterval', 'pack' => 'unsigned32'),
- 35 => array('name' => 'samplingAlgorithm', 'pack' => 'unsigned8'),
- 36 => array('name' => 'flowActiveTimeout', 'pack' => 'unsigned16'),
- 37 => array('name' => 'flowIdleTimeout', 'pack' => 'unsigned16'),
- 38 => array('name' => 'engineType', 'pack' => 'unsigned8'),
- 39 => array('name' => 'engineId', 'pack' => 'unsigned8'),
- 40 => array('name' => 'exportedOctetTotalCount', 'pack' => 'unsigned64'),
- 41 => array('name' => 'exportedMessageTotalCount', 'pack' => 'unsigned64'),
- 42 => array('name' => 'exportedFlowRecordTotalCount', 'pack' => 'unsigned64'),
- 43 => array('name' => 'ipv4RouterSc', 'pack' => 'ipv4Address'),
- 44 => array('name' => 'sourceIPv4Prefix', 'pack' => 'ipv4Address'),
- 45 => array('name' => 'destinationIPv4Prefix', 'pack' => 'ipv4Address'),
- 46 => array('name' => 'mplsTopLabelType', 'pack' => 'unsigned8'),
- 47 => array('name' => 'mplsTopLabelIPv4Address', 'pack' => 'ipv4Address'),
- 48 => array('name' => 'samplerId', 'pack' => 'unsigned8'),
- 49 => array('name' => 'samplerMode', 'pack' => 'unsigned8'),
- 50 => array('name' => 'samplerRandomInterval', 'pack' => 'unsigned32'),
- 51 => array('name' => 'classId', 'pack' => 'unsigned8'),
- 52 => array('name' => 'minimumTTL', 'pack' => 'unsigned8'),
- 53 => array('name' => 'maximumTTL', 'pack' => 'unsigned8'),
- 54 => array('name' => 'fragmentIdentification', 'pack' => 'unsigned32'),
- 55 => array('name' => 'postIpClassOfService', 'pack' => 'unsigned8'),
- 56 => array('name' => 'sourceMacAddress', 'pack' => 'macAddress'),
- 57 => array('name' => 'postDestinationMacAddress', 'pack' => 'macAddress'),
- 58 => array('name' => 'vlanId', 'pack' => 'unsigned16'),
- 59 => array('name' => 'postVlanId', 'pack' => 'unsigned16'),
- 60 => array('name' => 'ipVersion', 'pack' => 'unsigned8'),
- 61 => array('name' => 'flowDirection', 'pack' => 'unsigned8'),
- 62 => array('name' => 'ipNextHopIPv6Address', 'pack' => 'ipv6Address'),
- 63 => array('name' => 'bgpNexthopIPv6Address', 'pack' => 'ipv6Address'),
- 64 => array('name' => 'ipv6ExtensionHeaders', 'pack' => 'unsigned32'),
-
- 65 => array('name' => 'vendorReserved', 'pack' => 'string'),
- 66 => array('name' => 'vendorReserved', 'pack' => 'string'),
- 67 => array('name' => 'vendorReserved', 'pack' => 'string'),
- 68 => array('name' => 'vendorReserved', 'pack' => 'string'),
- 69 => array('name' => 'vendorReserved', 'pack' => 'string'),
-
- 70 => array('name' => 'mplsTopLabelStackSection', 'pack' => 'octetArray'),
- 71 => array('name' => 'mplsLabelStackSection2', 'pack' => 'octetArray'),
- 72 => array('name' => 'mplsLabelStackSection3', 'pack' => 'octetArray'),
- 73 => array('name' => 'mplsLabelStackSection4', 'pack' => 'octetArray'),
- 74 => array('name' => 'mplsLabelStackSection5', 'pack' => 'octetArray'),
- 75 => array('name' => 'mplsLabelStackSection6', 'pack' => 'octetArray'),
- 76 => array('name' => 'mplsLabelStackSection7', 'pack' => 'octetArray'),
- 77 => array('name' => 'mplsLabelStackSection8', 'pack' => 'octetArray'),
- 78 => array('name' => 'mplsLabelStackSection9', 'pack' => 'octetArray'),
- 79 => array('name' => 'mplsLabelStackSection10', 'pack' => 'octetArray'),
- 80 => array('name' => 'destinationMacAddress', 'pack' => 'macAddress'),
- 81 => array('name' => 'postSourceMacAddress', 'pack' => 'macAddress'),
- 82 => array('name' => 'interfaceName', 'pack' => 'string'),
- 83 => array('name' => 'interfaceDescription', 'pack' => 'string'),
- 84 => array('name' => 'samplerName', 'pack' => 'string'),
- 85 => array('name' => 'octetTotalCount', 'pack' => 'unsigned64'),
- 86 => array('name' => 'packetTotalCount', 'pack' => 'unsigned64'),
- 87 => array('name' => 'flagsAndSamplerId', 'pack' => 'unsigned32'),
- 88 => array('name' => 'fragmentOffset', 'pack' => 'unsigned16'),
- 89 => array('name' => 'forwardingStatus', 'pack' => 'unsigned8'),
- 90 => array('name' => 'mplsVpnRouteDistinguisher', 'pack' => 'octetArray'),
- 91 => array('name' => 'mplsTopLabelPrefixLength', 'pack' => 'unsigned8'),
- 92 => array('name' => 'srcTrafficIndex', 'pack' => 'unsigned32'),
- 93 => array('name' => 'dstTrafficIndex', 'pack' => 'unsigned32'),
- 94 => array('name' => 'applicationDescription', 'pack' => 'string'),
- 95 => array('name' => 'applicationId', 'pack' => 'octetArray'),
- 96 => array('name' => 'applicationName', 'pack' => 'unsigned8'),
- 97 => array('name' => 'Assigned For V9 Compatibility', 'pack' => ''),
- 98 => array('name' => 'postIpDiffServCodePoint', 'pack' => 'unsigned8'),
- 99 => array('name' => 'multicastReplicationFactor', 'pack' => 'unsigned32'),
- 100 => array('name' => 'className', 'pack' => 'string'),
- 101 => array('name' => 'classificationEngineId', 'pack' => 'unsigned8'),
- 102 => array('name' => 'layer2packetSectionOffset', 'pack' => 'unsigned16'),
- 103 => array('name' => 'layer2packetSectionSize', 'pack' => 'unsigned16'),
- 104 => array('name' => 'layer2packetSectionData', 'pack' => 'octetArray'),
-
- 128 => array('name' => 'bgpNextAdjacentAsNumber', 'pack' => 'unsigned32'),
- 129 => array('name' => 'bgpPrevAdjacentAsNumber', 'pack' => 'unsigned32'),
- 130 => array('name' => 'exporterIPv4Address', 'pack' => 'ipv4Address'),
- 131 => array('name' => 'exporterIPv6Address', 'pack' => 'ipv6Address'),
- 132 => array('name' => 'droppedOctetDeltaCount', 'pack' => 'unsigne64'),
- 133 => array('name' => 'droppedPacketDeltaCount', 'pack' => 'unsigne64'),
- 134 => array('name' => 'droppedOctetTotalCount', 'pack' => 'unsigne64'),
- 135 => array('name' => 'droppedPacketTotalCount', 'pack' => 'unsigne64'),
- 136 => array('name' => 'flowEndReason', 'pack' => 'unsigned8'),
- 137 => array('name' => 'commonPropertiesId', 'pack' => 'unsigned64'),
- 138 => array('name' => 'observationPointId', 'pack' => 'unsigned64'),
- 139 => array('name' => 'icmpTypeCodeIPv6', 'pack' => 'unsigned16'),
- 140 => array('name' => 'mplsTopLabelIPv6Address', 'pack' => 'ipv6Address'),
- 141 => array('name' => 'lineCardId', 'pack' => 'unsigned32'),
- 142 => array('name' => 'portId', 'pack' => 'unsigned32'),
- 143 => array('name' => 'meteringProcessId', 'pack' => 'unsigned32'),
- 144 => array('name' => 'exportingProcessId', 'pack' => 'unsigned32'),
- 145 => array('name' => 'templateId', 'pack' => 'unsigned16'),
- 146 => array('name' => 'wlanChannelId', 'pack' => 'unsigned8'),
- 147 => array('name' => 'wlanSSID', 'pack' => 'string'),
- 148 => array('name' => 'flowId', 'pack' => 'unsigned64'),
- 149 => array('name' => 'observationDomainId', 'pack' => 'unsigned32'),
- 150 => array('name' => 'flowStartSeconds', 'pack' => 'dateTimeSeconds'),
- 151 => array('name' => 'flowEndSeconds', 'pack' => 'dateTimeSeconds'),
- 152 => array('name' => 'flowStartMilliseconds', 'pack' => 'dateTimeMilliseconds'),
- 153 => array('name' => 'flowEndMilliseconds', 'pack' => 'dateTimeMilliseconds'),
- 154 => array('name' => 'flowStartMicroseconds', 'pack' => 'dateTimeMicroseconds'),
- 155 => array('name' => 'flowEndMicroseconds', 'pack' => 'dateTimeMicroseconds'),
- 156 => array('name' => 'flowStartNanoseconds', 'pack' => 'dateTimeNanoSeconds'),
- 157 => array('name' => 'flowEndNanoseconds', 'pack' => 'dateTimeNanoSeconds'),
- 158 => array('name' => 'flowStartDeltaMicroseconds', 'pack' => 'unsigned32'),
- 159 => array('name' => 'flowEndDeltaMicroseconds', 'pack' => 'unsigned32'),
- 160 => array('name' => 'systemInitTimeMilliseconds', 'pack' => 'dateTimeMilliseconds'),
- 161 => array('name' => 'flowDurationMilliseconds', 'pack' => 'unsigned32'),
- 162 => array('name' => 'flowDurationMicroseconds', 'pack' => 'unsigned32'),
- 163 => array('name' => 'observedFlowTotalCount', 'pack' => 'unsigned64'),
- 164 => array('name' => 'ignoredPacketTotalCount', 'pack' => 'unsigned64'),
- 165 => array('name' => 'ignoredOctetTotalCount', 'pack' => 'unsigned64'),
- 166 => array('name' => 'notSentFlowTotalCount', 'pack' => 'unsigned64'),
- 167 => array('name' => 'notSentPacketTotalCount', 'pack' => 'unsigned64'),
- 168 => array('name' => 'notSentOctetTotalCount', 'pack' => 'unsigned64'),
- 169 => array('name' => 'destinationIPv6Prefix', 'pack' => 'ipv6Address'),
- 170 => array('name' => 'sourceIPv6Prefix', 'pack' => 'ipv6Address'),
- 171 => array('name' => 'postOctetTotalCount', 'pack' => 'unsigned64'),
- 172 => array('name' => 'postPacketTotalCount', 'pack' => 'unsigned64'),
- 173 => array('name' => 'flowKeyIndicator', 'pack' => 'unsigned64'),
- 174 => array('name' => 'postMCastPacketTotalCount', 'pack' => 'unsigned64'),
- 175 => array('name' => 'postMCastOctetTotalCount', 'pack' => 'unsigned64'),
- 176 => array('name' => 'icmpTypeIPv4', 'pack' => 'unsigned8'),
- 177 => array('name' => 'icmpCodeIPv4', 'pack' => 'unsigned8'),
- 178 => array('name' => 'icmpTypeIPv6', 'pack' => 'unsigned8'),
- 179 => array('name' => 'icmpCodeIPv6', 'pack' => 'unsigned8'),
- 180 => array('name' => 'udpSourcePort', 'pack' => 'unsigned16'),
- 181 => array('name' => 'udpDestinationPort', 'pack' => 'unsigned16'),
- 182 => array('name' => 'tcpSourcePort', 'pack' => 'unsigned16'),
- 183 => array('name' => 'tcpDestinationPort', 'pack' => 'unsigned16'),
- 184 => array('name' => 'tcpSequenceNumber', 'pack' => 'unsigned32'),
- 185 => array('name' => 'tcpAcknowledgementNumber', 'pack' => 'unsigned32'),
- 186 => array('name' => 'tcpWindowSize', 'pack' => 'unsigned16'),
- 187 => array('name' => 'tcpUrgentPointer', 'pack' => 'unsigned16'),
- 188 => array('name' => 'tcpHeaderLength', 'pack' => 'unsigned8'),
- 189 => array('name' => 'ipHeaderLength', 'pack' => 'unsigned8'),
- 190 => array('name' => 'totalLengthIPv4', 'pack' => 'unsigned16'),
- 191 => array('name' => 'payloadLengthIPv6', 'pack' => 'unsigned16'),
- 192 => array('name' => 'ipTTL', 'pack' => 'unsigned8'),
- 193 => array('name' => 'nextHeaderIPv6', 'pack' => 'unsigned8'),
- 194 => array('name' => 'mplsPayloadLength', 'pack' => 'unsigned32'),
- 195 => array('name' => 'ipDiffServCodePoint', 'pack' => 'unsigned8'),
- 196 => array('name' => 'ipPrecedence', 'pack' => 'unsigned8'),
- 197 => array('name' => 'fragmentFlags', 'pack' => 'unsigned8'),
- 198 => array('name' => 'octetDeltaSumOfSquares', 'pack' => 'unsigned64'),
- 199 => array('name' => 'octetTotalSumOfSquares', 'pack' => 'unsigned64'),
- 200 => array('name' => 'mplsTopLabelTTL', 'pack' => 'unsigned8'),
- 201 => array('name' => 'mplsLabelStackLength', 'pack' => 'unsigned32'),
- 202 => array('name' => 'mplsLabelStackDepth', 'pack' => 'unsigned32'),
- 203 => array('name' => 'mplsTopLabelExp', 'pack' => 'unsigned8'),
- 204 => array('name' => 'ipPayloadLength', 'pack' => 'unsigned32'),
- 205 => array('name' => 'udpMessageLength', 'pack' => 'unsigned16'),
- 206 => array('name' => 'isMulticast', 'pack' => 'unsigned8'),
- 207 => array('name' => 'ipv4IHL', 'pack' => 'unsigned8'),
- 208 => array('name' => 'ipv4Options', 'pack' => 'unsigned32'),
- 209 => array('name' => 'tcpOptions', 'pack' => 'unsigned64'),
- 210 => array('name' => 'paddingOctets', 'pack' => 'octetArray'),
- 211 => array('name' => 'collectorIPv4Address', 'pack' => 'ipv4Address'),
- 212 => array('name' => 'collectorIPv6Address', 'pack' => 'ipv6Address'),
- 213 => array('name' => 'exportInterface', 'pack' => 'unsigned32'),
- 214 => array('name' => 'exportProtocolVersion', 'pack' => 'unsigned8'),
- 215 => array('name' => 'exportTransportProtocol', 'pack' => 'unsigned8'),
- 216 => array('name' => 'collectorTransportPort', 'pack' => 'unsigned16'),
- 217 => array('name' => 'exporterTransportPort', 'pack' => 'unsigned16'),
- 218 => array('name' => 'tcpSynTotalCount', 'pack' => 'unsigned64'),
- 219 => array('name' => 'tcpFinTotalCount', 'pack' => 'unsigned64'),
- 220 => array('name' => 'tcpRstTotalCount', 'pack' => 'unsigned64'),
- 221 => array('name' => 'tcpPshTotalCount', 'pack' => 'unsigned64'),
- 222 => array('name' => 'tcpAckTotalCount', 'pack' => 'unsigned64'),
- 223 => array('name' => 'tcpUrgTotalCount', 'pack' => 'unsigned64'),
- 224 => array('name' => 'ipTotalLength', 'pack' => 'unsigned64'),
- 225 => array('name' => 'postNATSourceIPv4Address', 'pack' => 'ipv4Address'),
- 226 => array('name' => 'postNATDestinationIPv4Address', 'pack' => 'ipv4Address'),
- 227 => array('name' => 'postNAPTSourceTransportPort', 'pack' => 'unsigned16'),
- 228 => array('name' => 'postNAPTDestinationTransportPort', 'pack' => 'unsigned16'),
- 229 => array('name' => 'natOriginatingAddressRealm', 'pack' => 'unsigned8'),
- 230 => array('name' => 'natEvent', 'pack' => 'unsigned8'),
- 231 => array('name' => 'initiatorOctets', 'pack' => 'unsigned64'),
- 232 => array('name' => 'responderOctets', 'pack' => 'unsigned64'),
- 233 => array('name' => 'firewallEvent', 'pack' => 'unsigned8'),
- 234 => array('name' => 'ingressVRFID', 'pack' => 'unsigned32'),
- 235 => array('name' => 'egressVRFID', 'pack' => 'unsigned32'),
- 236 => array('name' => 'VRFname', 'pack' => 'string'),
- 237 => array('name' => 'postMplsTopLabelExp', 'pack' => 'unsigned8'),
- 238 => array('name' => 'tcpWindowScale', 'pack' => 'unsigned16'),
- 239 => array('name' => 'biflowDirection', 'pack' => 'unsigned8'),
- 240 => array('name' => 'ethernetHeaderLength', 'pack' => 'unsigned8'),
- 241 => array('name' => 'ethernetPayloadLength', 'pack' => 'unsigned16'),
- 242 => array('name' => 'ethernetTotalLength', 'pack' => 'unsigned16'),
- 243 => array('name' => 'dot1qVlanId', 'pack' => 'unsigned16'),
- 244 => array('name' => 'dot1qPriority', 'pack' => 'unsigned8'),
- 245 => array('name' => 'dot1qCustomerVlanId', 'pack' => 'unsigned16'),
- 246 => array('name' => 'dot1qCustomerPriority', 'pack' => 'unsigned8'),
- 247 => array('name' => 'metroEvcId', 'pack' => 'string'),
- 248 => array('name' => 'metroEvcType', 'pack' => 'unsigned8'),
- 249 => array('name' => 'pseudoWireId', 'pack' => 'unsigned32'),
- 250 => array('name' => 'pseudoWireType', 'pack' => 'unsigned16'),
- 251 => array('name' => 'pseudoWireControlWord', 'pack' => 'unsigned32'),
- 252 => array('name' => 'ingressPhysicalInterface', 'pack' => 'unsigned32'),
- 253 => array('name' => 'egressPhysicalInterface', 'pack' => 'unsigned32'),
- 254 => array('name' => 'postDot1qVlanId', 'pack' => 'unsigned16'),
- 255 => array('name' => 'postDot1qCustomerVlanId', 'pack' => 'unsigned16'),
- 256 => array('name' => 'ethernetType', 'pack' => 'unsigned16'),
- 257 => array('name' => 'postIpPrecedence', 'pack' => 'unsigned8'),
- 258 => array('name' => 'collectionTimeMilliseconds', 'pack' => 'dateTimeMilliseconds'),
- 259 => array('name' => 'exportSctpStreamId', 'pack' => 'unsigned16'),
- 260 => array('name' => 'maxExportSeconds', 'pack' => 'dateTimeSeconds'),
- 261 => array('name' => 'maxFlowEndSeconds', 'pack' => 'dateTimeSeconds'),
- 262 => array('name' => 'messageMD5Checksum', 'pack' => 'octetArray'),
- 263 => array('name' => 'messageScope', 'pack' => 'unsigned8'),
- 264 => array('name' => 'minExportSeconds', 'pack' => 'dateTimeSeconds'),
- 265 => array('name' => 'minFlowStartSeconds', 'pack' => 'dateTimeSeconds'),
- 266 => array('name' => 'opaqueOctets', 'pack' => 'octetArray'),
- 267 => array('name' => 'sessionScope', 'pack' => 'unsigned8'),
- 268 => array('name' => 'maxFlowEndMicroseconds', 'pack' => 'dateTimeMicroseconds'),
- 269 => array('name' => 'maxFlowEndMilliseconds', 'pack' => 'dateTimeMilliseconds'),
- 270 => array('name' => 'maxFlowEndNanoseconds', 'pack' => 'dateTimeNanoseconds'),
- 271 => array('name' => 'minFlowStartMicroseconds', 'pack' => 'dateTimeMicroseconds'),
- 272 => array('name' => 'minFlowStartMilliseconds', 'pack' => 'dateTimeMilliseconds'),
- 273 => array('name' => 'minFlowStartNanoseconds', 'pack' => 'dateTimeNanoseconds'),
- 274 => array('name' => 'collectorCertificate', 'pack' => 'octetArray'),
- 275 => array('name' => 'exporterCertificate', 'pack' => 'octetArray'),
- 276 => array('name' => 'dataRecordsReliability', 'pack' => 'boolean'),
- 277 => array('name' => 'observationPointType', 'pack' => 'unsigned8'),
- 278 => array('name' => 'newConnectionDeltaCount', 'pack' => 'unsigned32'),
- 279 => array('name' => 'connectionSumDurationSeconds', 'pack' => 'unsigned64'),
- 280 => array('name' => 'connectionTransactionId', 'pack' => 'unsigned64'),
- 281 => array('name' => 'postNATSourceIPv6Address', 'pack' => 'ipv6Address'),
- 282 => array('name' => 'postNATDestinationIPv6Address', 'pack' => 'ipv6Address'),
- 283 => array('name' => 'natPoolId', 'pack' => 'unsigned32'),
- 284 => array('name' => 'natPoolName', 'pack' => 'string'),
- 285 => array('name' => 'anonymizationFlags', 'pack' => 'unsigned16'),
- 286 => array('name' => 'anonymizationTechnique', 'pack' => 'unsigned16'),
- 287 => array('name' => 'informationElementIndex', 'pack' => 'unsigned16'),
- 288 => array('name' => 'p2pTechnology', 'pack' => 'string'),
- 289 => array('name' => 'tunnelTechnology', 'pack' => 'string'),
- 290 => array('name' => 'encryptedTechnology', 'pack' => 'string'),
- 291 => array('name' => 'basicList', 'pack' => 'basicList'),
- 292 => array('name' => 'subTemplateList', 'pack' => 'subTemplateList'),
- 293 => array('name' => 'subTemplateMultiList', 'pack' => 'subTemplateMultiList'),
- 294 => array('name' => 'bgpValidityState', 'pack' => 'unsigned8'),
- 295 => array('name' => 'IPSecSPI', 'pack' => 'unsigned32'),
- 296 => array('name' => 'greKey', 'pack' => 'unsigned32'),
- 297 => array('name' => 'natType', 'pack' => 'unsigned8'),
- 298 => array('name' => 'initiatorPackets', 'pack' => 'unsigned64'),
- 299 => array('name' => 'responderPackets', 'pack' => 'unsigned64'),
- 300 => array('name' => 'observationDomainName', 'pack' => 'string'),
- 301 => array('name' => 'selectionSequenceId', 'pack' => 'unsigned64'),
- 302 => array('name' => 'selectorId', 'pack' => 'unsigned64'),
- 303 => array('name' => 'informationElementId', 'pack' => 'unsigned16'),
- 304 => array('name' => 'selectorAlgorithm', 'pack' => 'unsigned16'),
- 305 => array('name' => 'samplingPacketInterval', 'pack' => 'unsigned32'),
- 306 => array('name' => 'samplingPacketSpace', 'pack' => 'unsigned32'),
- 307 => array('name' => 'samplingTimeInterval', 'pack' => 'unsigned32'),
- 308 => array('name' => 'samplingTimeSpace', 'pack' => 'unsigned32'),
- 309 => array('name' => 'samplingSize', 'pack' => 'unsigned32'),
- 310 => array('name' => 'samplingPopulation', 'pack' => 'unsigned32'),
- 311 => array('name' => 'samplingProbability', 'pack' => 'float64'),
- 312 => array('name' => 'dataLinkFrameSize', 'pack' => 'unsigned16'),
- 313 => array('name' => 'ipHeaderPacketSection', 'pack' => 'octetArray'),
- 314 => array('name' => 'ipPayloadPacketSection', 'pack' => 'octetArray'),
- 315 => array('name' => 'dataLinkFrameSection', 'pack' => 'octetArray'),
- 316 => array('name' => 'mplsLabelStackSection', 'pack' => 'octetArray'),
- 317 => array('name' => 'mplsPayloadPacketSection', 'pack' => 'octetArray'),
- 318 => array('name' => 'selectorIdTotalPktsObserved', 'pack' => 'unsigned64'),
- 319 => array('name' => 'selectorIdTotalPktsSelected', 'pack' => 'unsigned64'),
- 320 => array('name' => 'absoluteError', 'pack' => 'float64'),
- 321 => array('name' => 'relativeError', 'pack' => 'float64'),
- 322 => array('name' => 'observationTimeSeconds', 'pack' => 'dateTimeSeconds'),
- 323 => array('name' => 'observationTimeMilliseconds', 'pack' => 'dateTimeMilliseconds'),
- 324 => array('name' => 'observationTimeMicroseconds', 'pack' => 'dateTimeMicroseconds'),
- 325 => array('name' => 'observationTimeNanoseconds', 'pack' => 'dateTimeNanoseconds'),
- 326 => array('name' => 'digestHashValue', 'pack' => 'unsigned64'),
- 327 => array('name' => 'hashIPPayloadOffset', 'pack' => 'unsigned64'),
- 328 => array('name' => 'hashIPPayloadSize', 'pack' => 'unsigned64'),
- 329 => array('name' => 'hashOutputRangeMin', 'pack' => 'unsigned64'),
- 330 => array('name' => 'hashOutputRangeMax', 'pack' => 'unsigned64'),
- 331 => array('name' => 'hashSelectedRangeMin', 'pack' => 'unsigned64'),
- 332 => array('name' => 'hashSelectedRangeMax', 'pack' => 'unsigned64'),
- 333 => array('name' => 'hashDigestOutput', 'pack' => 'boolean'),
- 334 => array('name' => 'hashInitialiserValue', 'pack' => 'unsigned64'),
- 335 => array('name' => 'selectorName', 'pack' => 'string'),
- 336 => array('name' => 'upperCILimit', 'pack' => 'float64'),
- 337 => array('name' => 'lowerCILimit', 'pack' => 'float64'),
- 338 => array('name' => 'confidenceLevel', 'pack' => 'float64'),
- 339 => array('name' => 'informationElementDataType', 'pack' => 'unsigned8'),
- 340 => array('name' => 'informationElementDescription', 'pack' => 'string'),
- 341 => array('name' => 'informationElementName', 'pack' => 'string'),
- 342 => array('name' => 'informationElementRangeBegin', 'pack' => 'unsigned64'),
- 343 => array('name' => 'informationElementRangeEnd', 'pack' => 'unsigned64'),
- 344 => array('name' => 'informationElementSemantics', 'pack' => 'unsigned8'),
- 345 => array('name' => 'informationElementUnits', 'pack' => 'unsigned16'),
- 346 => array('name' => 'privateEnterpriseNumber', 'pack' => 'unsigned32'),
- 347 => array('name' => 'virtualStationInterfaceId', 'pack' => 'octetArray'),
- 348 => array('name' => 'virtualStationInterfaceName', 'pack' => 'string'),
- 349 => array('name' => 'virtualStationUUID', 'pack' => 'octetArray'),
- 350 => array('name' => 'virtualStationName', 'pack' => 'string'),
- 351 => array('name' => 'layer2SegmentId', 'pack' => 'unsigned64'),
- 352 => array('name' => 'layer2OctetDeltaCount', 'pack' => 'unsigned64'),
- 353 => array('name' => 'layer2OctetTotalCount', 'pack' => 'unsigned64'),
- 354 => array('name' => 'ingressUnicastPacketTotalCount', 'pack' => 'unsigned64'),
- 355 => array('name' => 'ingressMulticastPacketTotalCount', 'pack' => 'unsigned64'),
- 356 => array('name' => 'ingressBroadcastPacketTotalCount', 'pack' => 'unsigned64'),
- 357 => array('name' => 'egressUnicastPacketTotalCount', 'pack' => 'unsigned64'),
- 358 => array('name' => 'egressBroadcastPacketTotalCount', 'pack' => 'unsigned64'),
- 359 => array('name' => 'monitoringIntervalStartMilliSeconds', 'pack' => 'dateTimeMilliseconds'),
- 360 => array('name' => 'monitoringIntervalEndMilliSeconds', 'pack' => 'dateTimeMilliseconds'),
- 361 => array('name' => 'portRangeStart', 'pack' => 'unsigned16'),
- 362 => array('name' => 'portRangeEnd', 'pack' => 'unsigned16'),
- 363 => array('name' => 'portRangeStepSize', 'pack' => 'unsigned16'),
- 364 => array('name' => 'portRangeNumPorts', 'pack' => 'unsigned16'),
- 365 => array('name' => 'staMacAddress', 'pack' => 'macAddress'),
- 366 => array('name' => 'staIPv4Address', 'pack' => 'ipv4Address'),
- 367 => array('name' => 'wtpMacAddress', 'pack' => 'macAddress'),
- 368 => array('name' => 'ingressInterfaceType', 'pack' => 'unsigned32'),
- 369 => array('name' => 'egressInterfaceType', 'pack' => 'unsigned32'),
- 370 => array('name' => 'rtpSequenceNumber', 'pack' => 'unsigned16'),
- 371 => array('name' => 'userName', 'pack' => 'string'),
- 372 => array('name' => 'applicationCategoryName', 'pack' => 'string'),
- 373 => array('name' => 'applicationSubCategoryName', 'pack' => 'string'),
- 374 => array('name' => 'applicationGroupName', 'pack' => 'string'),
- 375 => array('name' => 'originalFlowsPresent', 'pack' => 'unsigned64'),
- 376 => array('name' => 'originalFlowsInitiated', 'pack' => 'unsigned64'),
- 377 => array('name' => 'originalFlowsCompleted', 'pack' => 'unsigned64'),
- 378 => array('name' => 'distinctCountOfSourceIPAddress', 'pack' => 'unsigned64'),
- 379 => array('name' => 'distinctCountOfDestinationIPAddress', 'pack' => 'unsigned64'),
- 380 => array('name' => 'distinctCountOfSourceIPv4Address', 'pack' => 'unsigned32'),
- 381 => array('name' => 'distinctCountOfDestinationIPv4Address', 'pack' => 'unsigned32'),
- 382 => array('name' => 'distinctCountOfSourceIPv6Address', 'pack' => 'unsigned64'),
- 383 => array('name' => 'distinctCountOfDestinationIPv6Address', 'pack' => 'unsigned64'),
- 384 => array('name' => 'valueDistributionMethod', 'pack' => 'unsigned8'),
- 385 => array('name' => 'rfc3550JitterMilliseconds', 'pack' => 'unsigned32'),
- 386 => array('name' => 'rfc3550JitterMicroseconds', 'pack' => 'unsigned32'),
- 387 => array('name' => 'rfc3550JitterNanoseconds', 'pack' => 'unsigned32'),
- 388 => array('name' => 'dot1qDEI', 'pack' => 'boolean'),
- 389 => array('name' => 'dot1qCustomerDEI', 'pack' => 'boolean'),
- 390 => array('name' => 'flowSelectorAlgorithm', 'pack' => 'unsigned16'),
- 391 => array('name' => 'flowSelectedOctetDeltaCount', 'pack' => 'unsigned64'),
- 392 => array('name' => 'flowSelectedPacketDeltaCount', 'pack' => 'unsigned64'),
- 393 => array('name' => 'flowSelectedFlowDeltaCount', 'pack' => 'unsigned64'),
- 394 => array('name' => 'selectorIDTotalFlowsObserved', 'pack' => 'unsigned64'),
- 395 => array('name' => 'selectorIDTotalFlowsSelected', 'pack' => 'unsigned64'),
- 396 => array('name' => 'samplingFlowInterval', 'pack' => 'unsigned64'),
- 397 => array('name' => 'samplingFlowSpacing', 'pack' => 'unsigned64'),
- 398 => array('name' => 'flowSamplingTimeInterval', 'pack' => 'unsigned64'),
- 399 => array('name' => 'flowSamplingTimeSpacing', 'pack' => 'unsigned64'),
- 400 => array('name' => 'hashFlowDomain', 'pack' => 'unsigned16'),
- 401 => array('name' => 'transportOctetDeltaCount', 'pack' => 'unsigned64'),
- 402 => array('name' => 'transportPacketDeltaCount', 'pack' => 'unsigned64'),
- 403 => array('name' => 'originalExporterIPv4Address', 'pack' => 'ipv4Address'),
- 404 => array('name' => 'originalExporterIPv6Address', 'pack' => 'ipv6Address'),
- 405 => array('name' => 'originalObservationDomainId', 'pack' => 'unsigned32'),
- 406 => array('name' => 'intermediateProcessId', 'pack' => 'unsigned32'),
- 407 => array('name' => 'ignoredDataRecordTotalCount', 'pack' => 'unsigned64'),
- 408 => array('name' => 'dataLinkFrameType', 'pack' => 'unsigned16'),
- 409 => array('name' => 'sectionOffset', 'pack' => 'unsigned16'),
- 410 => array('name' => 'sectionExportedOctets', 'pack' => 'unsigned16'),
- 411 => array('name' => 'dot1qServiceInstanceTag', 'pack' => 'octetArray'),
- 412 => array('name' => 'dot1qServiceInstanceId', 'pack' => 'unsigned32'),
- 413 => array('name' => 'dot1qServiceInstancePriority', 'pack' => 'unsigned8'),
- 414 => array('name' => 'dot1qCustomerSourceMacAddress', 'pack' => 'macAddress'),
- 415 => array('name' => 'dot1qCustomerDestinationMacAddress', 'pack' => 'macAddress'),
- 416 => array('name' => 'deprecated', 'pack' => 'unsigned64'),
- 417 => array('name' => 'postLayer2OctetDeltaCount', 'pack' => 'unsigned64'),
- 418 => array('name' => 'postMCastLayer2OctetDeltaCount', 'pack' => 'unsigned64'),
- 419 => array('name' => 'deprecated', 'pack' => 'unsigned64'),
- 420 => array('name' => 'postLayer2OctetTotalCount', 'pack' => 'unsigned64'),
- 421 => array('name' => 'postMCastLayer2OctetTotalCount', 'pack' => 'unsigned64'),
- 422 => array('name' => 'minimumLayer2TotalLength', 'pack' => 'unsigned64'),
- 423 => array('name' => 'maximumLayer2TotalLength', 'pack' => 'unsigned64'),
- 424 => array('name' => 'droppedLayer2OctetDeltaCount', 'pack' => 'unsigned64'),
- 425 => array('name' => 'droppedLayer2OctetTotalCount', 'pack' => 'unsigned64'),
- 426 => array('name' => 'ignoredLayer2OctetTotalCount', 'pack' => 'unsigned64'),
- 427 => array('name' => 'notSentLayer2OctetTotalCount', 'pack' => 'unsigned64'),
- 428 => array('name' => 'layer2OctetDeltaSumOfSquares', 'pack' => 'unsigned64'),
- 429 => array('name' => 'layer2OctetTotalSumOfSquares', 'pack' => 'unsigned64'),
- 430 => array('name' => 'layer2FrameDeltaCount', 'pack' => 'unsigned64'),
- 431 => array('name' => 'layer2FrameTotalCount', 'pack' => 'unsigned64'),
- 432 => array('name' => 'pseudoWireDestinationIPv4Address', 'pack' => 'ipv4Address'),
- 433 => array('name' => 'ignoredLayer2FrameTotalCount', 'pack' => 'unsigned64'),
- 434 => array('name' => 'mibObjectValueInteger', 'pack' => 'signed32'),
- 435 => array('name' => 'mibObjectValueOctetString', 'pack' => 'octetArray'),
- 436 => array('name' => 'mibObjectValueOID', 'pack' => 'octetArray'),
- 437 => array('name' => 'mibObjectValueBits', 'pack' => 'octetArray'),
- 438 => array('name' => 'mibObjectValueIPAddress', 'pack' => 'ipv4Address'),
- 439 => array('name' => 'mibObjectValueCounter', 'pack' => 'unsigned64'),
- 440 => array('name' => 'mibObjectValueGauge', 'pack' => 'unsigned32'),
- 441 => array('name' => 'mibObjectValueTimeTicks', 'pack' => 'unsigned32'),
- 442 => array('name' => 'mibObjectValueUnsigned', 'pack' => 'unsigned32'),
- 443 => array('name' => 'mibObjectValueTable', 'pack' => 'subTemplateList'),
- 444 => array('name' => 'mibObjectValueRow', 'pack' => 'subTemplateList'),
- 445 => array('name' => 'mibObjectIdentifier', 'pack' => 'octetArray'),
- 446 => array('name' => 'mibSubIdentifier', 'pack' => 'unsigned32'),
- 447 => array('name' => 'mibIndexIndicator', 'pack' => 'unsigned64'),
- 448 => array('name' => 'mibCaptureTimeSemantics', 'pack' => 'unsigned8'),
- 449 => array('name' => 'mibContextEngineID', 'pack' => 'octetArray'),
- 450 => array('name' => 'mibContextName', 'pack' => 'string'),
- 451 => array('name' => 'mibObjectName', 'pack' => 'string'),
- 452 => array('name' => 'mibObjectDescription', 'pack' => 'string'),
- 453 => array('name' => 'mibObjectSyntax', 'pack' => 'string'),
- 454 => array('name' => 'mibModuleName', 'pack' => 'string'),
- 455 => array('name' => 'mobileIMSI', 'pack' => 'string'),
- 456 => array('name' => 'mobileMSISDN', 'pack' => 'string'),
- 457 => array('name' => 'httpStatusCode', 'pack' => 'unsigned16'),
- 458 => array('name' => 'sourceTransportPortsLimit', 'pack' => 'unsigned16'),
- 459 => array('name' => 'httpRequestMethod', 'pack' => 'string'),
- 460 => array('name' => 'httpRequestHost', 'pack' => 'string'),
- 461 => array('name' => 'httpRequestTarget', 'pack' => 'string'),
- 462 => array('name' => 'httpMessageVersion', 'pack' => 'string'),
- 463 => array('name' => 'natInstanceID', 'pack' => 'unsigned32'),
- 464 => array('name' => 'internalAddressRealm', 'pack' => 'octetArray'),
- 465 => array('name' => 'externalAddressRealm', 'pack' => 'octetArray'),
- 466 => array('name' => 'natQuotaExceededEvent', 'pack' => 'unsigned32'),
- 467 => array('name' => 'natThresholdEvent', 'pack' => 'unsigned32'),
- 468 => array('name' => 'httpUserAgent', 'pack' => 'string'),
- 469 => array('name' => 'httpContentType', 'pack' => 'string'),
- 470 => array('name' => 'httpReasonPhrase', 'pack' => 'string'),
- 471 => array('name' => 'maxSessionEntries', 'pack' => 'unsigned32'),
- 472 => array('name' => 'maxBIBEntries', 'pack' => 'unsigned32'),
- 473 => array('name' => 'maxEntriesPerUser', 'pack' => 'unsigned32'),
- 474 => array('name' => 'maxSubscribers', 'pack' => 'unsigned32'),
- 475 => array('name' => 'maxFragmentsPendingReassembly', 'pack' => 'unsigned32'),
- 476 => array('name' => 'addressPoolHighThreshold', 'pack' => 'unsigned32'),
- 477 => array('name' => 'addressPoolLowThreshold', 'pack' => 'unsigned32'),
- 478 => array('name' => 'addressPortMappingHighThreshold', 'pack' => 'unsigned32'),
- 479 => array('name' => 'addressPortMappingLowThreshold', 'pack' => 'unsigned32'),
- 480 => array('name' => 'addressPortMappingPerUserHighThreshold','pack' => 'unsigned32'),
- 481 => array('name' => 'globalAddressMappingHighThreshold', 'pack' => 'unsigned32'),
- 482 => array('name' => 'vpnIdentifier', 'pack' => 'octetArray'),
- 483 => array('name' => 'bgpCommunity', 'pack' => 'unsigned32'),
- 484 => array('name' => 'bgpSourceCommunityList', 'pack' => 'basicList'),
- 485 => array('name' => 'bgpDestinationCommunityList', 'pack' => 'basicList'),
- 486 => array('name' => 'bgpExtendedCommunity', 'pack' => 'octetArray'),
- 487 => array('name' => 'bgpSourceExtendedCommunityList', 'pack' => 'basicList'),
- 488 => array('name' => 'bgpDestinationExtendedCommunityList', 'pack' => 'basicList'),
- 489 => array('name' => 'bgpLargeCommunity', 'pack' => 'octetArray'),
- 490 => array('name' => 'bgpSourceLargeCommunityList', 'pack' => 'basicList'),
- 491 => array('name' => 'bgpDestinationLargeCommunityList', 'pack' => 'basicList'),
- 492 => array('name' => 'srhFlagsIPv6', 'pack' => 'unsigned8'),
- 493 => array('name' => 'srhTagIPv6', 'pack' => 'unsigned16'),
- 494 => array('name' => 'srhSegmentIPv6', 'pack' => 'ipv6Address'),
- 495 => array('name' => 'srhActiveSegmentIPv6', 'pack' => 'ipv6Address'),
- 496 => array('name' => 'srhSegmentIPv6BasicList', 'pack' => 'basicList'),
- 497 => array('name' => 'srhSegmentIPv6ListSection', 'pack' => 'octetArray'),
- 498 => array('name' => 'srhSegmentsIPv6Left', 'pack' => 'unsigned8'),
- 499 => array('name' => 'srhIPv6Section', 'pack' => 'octetArray'),
- 500 => array('name' => 'srhIPv6ActiveSegmentType', 'pack' => 'unsigned8'),
- 501 => array('name' => 'srhSegmentIPv6LocatorLength', 'pack' => 'unsigned8'),
- 502 => array('name' => 'srhSegmentIPv6EndpointBehavior', 'pack' => 'unsigned16'),
- 503 => array('name' => 'transportChecksum', 'pack' => 'unsigned16'),
- 504 => array('name' => 'icmpHeaderPacketSection', 'pack' => 'octetArray'),
- 505 => array('name' => 'gtpuFlags', 'pack' => 'unsigned8'),
- 506 => array('name' => 'gtpuMsgType', 'pack' => 'unsigned8'),
- 507 => array('name' => 'gtpuTEid', 'pack' => 'unsigned32'),
- 508 => array('name' => 'gtpuSequenceNum', 'pack' => 'unsigned16'),
- 509 => array('name' => 'gtpuQFI', 'pack' => 'unsigned8'),
- 510 => array('name' => 'gtpuPduType', 'pack' => 'unsigned8'),
- 511 => array('name' => 'bgpSourceAsPathList', 'pack' => 'basicList'),
- 512 => array('name' => 'bgpDestinationAsPathList', 'pack' => 'basicList'),
+ 1 => ['name' => 'octetDeltaCount', 'pack' => 'unsigned64'],
+ 2 => ['name' => 'packetDeltaCount', 'pack' => 'unsigned64'],
+ 3 => ['name' => 'deltaFlowCount', 'pack' => 'unsigned64'],
+ 4 => ['name' => 'protocolIdentifier', 'pack' => 'unsigned8'],
+ 5 => ['name' => 'ipClassOfService', 'pack' => 'unsigned8'],
+ 6 => ['name' => 'tcpControlBits', 'pack' => 'unsigned16'],
+ 7 => ['name' => 'sourceTransportPort', 'pack' => 'unsigned16'],
+ 8 => ['name' => 'sourceIPv4Address', 'pack' => 'ipv4Address'],
+ 9 => ['name' => 'sourceIPv4PrefixLength', 'pack' => 'unsigned8'],
+ 10 => ['name' => 'ingressInterface', 'pack' => 'unsigned32'],
+ 11 => ['name' => 'destinationTransportPort', 'pack' => 'unsigned16'],
+ 12 => ['name' => 'destinationIPv4Address', 'pack' => 'ipv4Address'],
+ 13 => ['name' => 'destinationIPv4PrefixLength', 'pack' => 'unsigned8'],
+ 14 => ['name' => 'egressInterface', 'pack' => 'unsigned32'],
+ 15 => ['name' => 'ipNextHopIPv4Address', 'pack' => 'ipv4Address'],
+ 16 => ['name' => 'bgpSourceAsNumber', 'pack' => 'unsigned32'],
+ 17 => ['name' => 'bgpDestinationAsNumber', 'pack' => 'unsigned32'],
+ 18 => ['name' => 'bgpNexthopIPv4Address', 'pack' => 'ipv4Address'],
+ 19 => ['name' => 'postMCastPacketDeltaCount', 'pack' => 'unsigned64'],
+ 20 => ['name' => 'postMCastOctetDeltaCount', 'pack' => 'unsigned64'],
+ 21 => ['name' => 'flowEndSysUpTime', 'pack' => 'unsigned32'],
+ 22 => ['name' => 'flowStartSysUpTime', 'pack' => 'unsigned32'],
+ 23 => ['name' => 'postOctetDeltaCount', 'pack' => 'unsigned64'],
+ 24 => ['name' => 'postPacketDeltaCount', 'pack' => 'unsigned64'],
+ 25 => ['name' => 'minimumIpTotalLength', 'pack' => 'unsigned64'],
+ 26 => ['name' => 'maximumIpTotalLength', 'pack' => 'unsigned64'],
+ 27 => ['name' => 'sourceIPv6Address', 'pack' => 'ipv6Address'],
+ 28 => ['name' => 'destinationIPv6Address', 'pack' => 'ipv6Address'],
+ 29 => ['name' => 'sourceIPv6PrefixLength', 'pack' => 'unsigned8'],
+ 30 => ['name' => 'destinationIPv6PrefixLength', 'pack' => 'unsigned8'],
+ 31 => ['name' => 'flowLabelIPv6', 'pack' => 'unsigned32'],
+ 32 => ['name' => 'icmpTypeCodeIPv4', 'pack' => 'unsigned16'],
+ 33 => ['name' => 'igmpType', 'pack' => 'unsigned8'],
+ 34 => ['name' => 'samplingInterval', 'pack' => 'unsigned32'],
+ 35 => ['name' => 'samplingAlgorithm', 'pack' => 'unsigned8'],
+ 36 => ['name' => 'flowActiveTimeout', 'pack' => 'unsigned16'],
+ 37 => ['name' => 'flowIdleTimeout', 'pack' => 'unsigned16'],
+ 38 => ['name' => 'engineType', 'pack' => 'unsigned8'],
+ 39 => ['name' => 'engineId', 'pack' => 'unsigned8'],
+ 40 => ['name' => 'exportedOctetTotalCount', 'pack' => 'unsigned64'],
+ 41 => ['name' => 'exportedMessageTotalCount', 'pack' => 'unsigned64'],
+ 42 => ['name' => 'exportedFlowRecordTotalCount', 'pack' => 'unsigned64'],
+ 43 => ['name' => 'ipv4RouterSc', 'pack' => 'ipv4Address'],
+ 44 => ['name' => 'sourceIPv4Prefix', 'pack' => 'ipv4Address'],
+ 45 => ['name' => 'destinationIPv4Prefix', 'pack' => 'ipv4Address'],
+ 46 => ['name' => 'mplsTopLabelType', 'pack' => 'unsigned8'],
+ 47 => ['name' => 'mplsTopLabelIPv4Address', 'pack' => 'ipv4Address'],
+ 48 => ['name' => 'samplerId', 'pack' => 'unsigned8'],
+ 49 => ['name' => 'samplerMode', 'pack' => 'unsigned8'],
+ 50 => ['name' => 'samplerRandomInterval', 'pack' => 'unsigned32'],
+ 51 => ['name' => 'classId', 'pack' => 'unsigned8'],
+ 52 => ['name' => 'minimumTTL', 'pack' => 'unsigned8'],
+ 53 => ['name' => 'maximumTTL', 'pack' => 'unsigned8'],
+ 54 => ['name' => 'fragmentIdentification', 'pack' => 'unsigned32'],
+ 55 => ['name' => 'postIpClassOfService', 'pack' => 'unsigned8'],
+ 56 => ['name' => 'sourceMacAddress', 'pack' => 'macAddress'],
+ 57 => ['name' => 'postDestinationMacAddress', 'pack' => 'macAddress'],
+ 58 => ['name' => 'vlanId', 'pack' => 'unsigned16'],
+ 59 => ['name' => 'postVlanId', 'pack' => 'unsigned16'],
+ 60 => ['name' => 'ipVersion', 'pack' => 'unsigned8'],
+ 61 => ['name' => 'flowDirection', 'pack' => 'unsigned8'],
+ 62 => ['name' => 'ipNextHopIPv6Address', 'pack' => 'ipv6Address'],
+ 63 => ['name' => 'bgpNexthopIPv6Address', 'pack' => 'ipv6Address'],
+ 64 => ['name' => 'ipv6ExtensionHeaders', 'pack' => 'unsigned32'],
+
+ 65 => ['name' => 'vendorReserved', 'pack' => 'string'],
+ 66 => ['name' => 'vendorReserved', 'pack' => 'string'],
+ 67 => ['name' => 'vendorReserved', 'pack' => 'string'],
+ 68 => ['name' => 'vendorReserved', 'pack' => 'string'],
+ 69 => ['name' => 'vendorReserved', 'pack' => 'string'],
+
+ 70 => ['name' => 'mplsTopLabelStackSection', 'pack' => 'octetArray'],
+ 71 => ['name' => 'mplsLabelStackSection2', 'pack' => 'octetArray'],
+ 72 => ['name' => 'mplsLabelStackSection3', 'pack' => 'octetArray'],
+ 73 => ['name' => 'mplsLabelStackSection4', 'pack' => 'octetArray'],
+ 74 => ['name' => 'mplsLabelStackSection5', 'pack' => 'octetArray'],
+ 75 => ['name' => 'mplsLabelStackSection6', 'pack' => 'octetArray'],
+ 76 => ['name' => 'mplsLabelStackSection7', 'pack' => 'octetArray'],
+ 77 => ['name' => 'mplsLabelStackSection8', 'pack' => 'octetArray'],
+ 78 => ['name' => 'mplsLabelStackSection9', 'pack' => 'octetArray'],
+ 79 => ['name' => 'mplsLabelStackSection10', 'pack' => 'octetArray'],
+ 80 => ['name' => 'destinationMacAddress', 'pack' => 'macAddress'],
+ 81 => ['name' => 'postSourceMacAddress', 'pack' => 'macAddress'],
+ 82 => ['name' => 'interfaceName', 'pack' => 'string'],
+ 83 => ['name' => 'interfaceDescription', 'pack' => 'string'],
+ 84 => ['name' => 'samplerName', 'pack' => 'string'],
+ 85 => ['name' => 'octetTotalCount', 'pack' => 'unsigned64'],
+ 86 => ['name' => 'packetTotalCount', 'pack' => 'unsigned64'],
+ 87 => ['name' => 'flagsAndSamplerId', 'pack' => 'unsigned32'],
+ 88 => ['name' => 'fragmentOffset', 'pack' => 'unsigned16'],
+ 89 => ['name' => 'forwardingStatus', 'pack' => 'unsigned8'],
+ 90 => ['name' => 'mplsVpnRouteDistinguisher', 'pack' => 'octetArray'],
+ 91 => ['name' => 'mplsTopLabelPrefixLength', 'pack' => 'unsigned8'],
+ 92 => ['name' => 'srcTrafficIndex', 'pack' => 'unsigned32'],
+ 93 => ['name' => 'dstTrafficIndex', 'pack' => 'unsigned32'],
+ 94 => ['name' => 'applicationDescription', 'pack' => 'string'],
+ 95 => ['name' => 'applicationId', 'pack' => 'octetArray'],
+ 96 => ['name' => 'applicationName', 'pack' => 'unsigned8'],
+ 97 => ['name' => 'Assigned For V9 Compatibility', 'pack' => ''],
+ 98 => ['name' => 'postIpDiffServCodePoint', 'pack' => 'unsigned8'],
+ 99 => ['name' => 'multicastReplicationFactor', 'pack' => 'unsigned32'],
+ 100 => ['name' => 'className', 'pack' => 'string'],
+ 101 => ['name' => 'classificationEngineId', 'pack' => 'unsigned8'],
+ 102 => ['name' => 'layer2packetSectionOffset', 'pack' => 'unsigned16'],
+ 103 => ['name' => 'layer2packetSectionSize', 'pack' => 'unsigned16'],
+ 104 => ['name' => 'layer2packetSectionData', 'pack' => 'octetArray'],
+
+ 128 => ['name' => 'bgpNextAdjacentAsNumber', 'pack' => 'unsigned32'],
+ 129 => ['name' => 'bgpPrevAdjacentAsNumber', 'pack' => 'unsigned32'],
+ 130 => ['name' => 'exporterIPv4Address', 'pack' => 'ipv4Address'],
+ 131 => ['name' => 'exporterIPv6Address', 'pack' => 'ipv6Address'],
+ 132 => ['name' => 'droppedOctetDeltaCount', 'pack' => 'unsigned64'],
+ 133 => ['name' => 'droppedPacketDeltaCount', 'pack' => 'unsigned64'],
+ 134 => ['name' => 'droppedOctetTotalCount', 'pack' => 'unsigned64'],
+ 135 => ['name' => 'droppedPacketTotalCount', 'pack' => 'unsigned64'],
+ 136 => ['name' => 'flowEndReason', 'pack' => 'unsigned8'],
+ 137 => ['name' => 'commonPropertiesId', 'pack' => 'unsigned64'],
+ 138 => ['name' => 'observationPointId', 'pack' => 'unsigned64'],
+ 139 => ['name' => 'icmpTypeCodeIPv6', 'pack' => 'unsigned16'],
+ 140 => ['name' => 'mplsTopLabelIPv6Address', 'pack' => 'ipv6Address'],
+ 141 => ['name' => 'lineCardId', 'pack' => 'unsigned32'],
+ 142 => ['name' => 'portId', 'pack' => 'unsigned32'],
+ 143 => ['name' => 'meteringProcessId', 'pack' => 'unsigned32'],
+ 144 => ['name' => 'exportingProcessId', 'pack' => 'unsigned32'],
+ 145 => ['name' => 'templateId', 'pack' => 'unsigned16'],
+ 146 => ['name' => 'wlanChannelId', 'pack' => 'unsigned8'],
+ 147 => ['name' => 'wlanSSID', 'pack' => 'string'],
+ 148 => ['name' => 'flowId', 'pack' => 'unsigned64'],
+ 149 => ['name' => 'observationDomainId', 'pack' => 'unsigned32'],
+ 150 => ['name' => 'flowStartSeconds', 'pack' => 'dateTimeSeconds'],
+ 151 => ['name' => 'flowEndSeconds', 'pack' => 'dateTimeSeconds'],
+ 152 => ['name' => 'flowStartMilliseconds', 'pack' => 'dateTimeMilliseconds'],
+ 153 => ['name' => 'flowEndMilliseconds', 'pack' => 'dateTimeMilliseconds'],
+ 154 => ['name' => 'flowStartMicroseconds', 'pack' => 'dateTimeMicroseconds'],
+ 155 => ['name' => 'flowEndMicroseconds', 'pack' => 'dateTimeMicroseconds'],
+ 156 => ['name' => 'flowStartNanoseconds', 'pack' => 'dateTimeNanoSeconds'],
+ 157 => ['name' => 'flowEndNanoseconds', 'pack' => 'dateTimeNanoSeconds'],
+ 158 => ['name' => 'flowStartDeltaMicroseconds', 'pack' => 'unsigned32'],
+ 159 => ['name' => 'flowEndDeltaMicroseconds', 'pack' => 'unsigned32'],
+ 160 => ['name' => 'systemInitTimeMilliseconds', 'pack' => 'dateTimeMilliseconds'],
+ 161 => ['name' => 'flowDurationMilliseconds', 'pack' => 'unsigned32'],
+ 162 => ['name' => 'flowDurationMicroseconds', 'pack' => 'unsigned32'],
+ 163 => ['name' => 'observedFlowTotalCount', 'pack' => 'unsigned64'],
+ 164 => ['name' => 'ignoredPacketTotalCount', 'pack' => 'unsigned64'],
+ 165 => ['name' => 'ignoredOctetTotalCount', 'pack' => 'unsigned64'],
+ 166 => ['name' => 'notSentFlowTotalCount', 'pack' => 'unsigned64'],
+ 167 => ['name' => 'notSentPacketTotalCount', 'pack' => 'unsigned64'],
+ 168 => ['name' => 'notSentOctetTotalCount', 'pack' => 'unsigned64'],
+ 169 => ['name' => 'destinationIPv6Prefix', 'pack' => 'ipv6Address'],
+ 170 => ['name' => 'sourceIPv6Prefix', 'pack' => 'ipv6Address'],
+ 171 => ['name' => 'postOctetTotalCount', 'pack' => 'unsigned64'],
+ 172 => ['name' => 'postPacketTotalCount', 'pack' => 'unsigned64'],
+ 173 => ['name' => 'flowKeyIndicator', 'pack' => 'unsigned64'],
+ 174 => ['name' => 'postMCastPacketTotalCount', 'pack' => 'unsigned64'],
+ 175 => ['name' => 'postMCastOctetTotalCount', 'pack' => 'unsigned64'],
+ 176 => ['name' => 'icmpTypeIPv4', 'pack' => 'unsigned8'],
+ 177 => ['name' => 'icmpCodeIPv4', 'pack' => 'unsigned8'],
+ 178 => ['name' => 'icmpTypeIPv6', 'pack' => 'unsigned8'],
+ 179 => ['name' => 'icmpCodeIPv6', 'pack' => 'unsigned8'],
+ 180 => ['name' => 'udpSourcePort', 'pack' => 'unsigned16'],
+ 181 => ['name' => 'udpDestinationPort', 'pack' => 'unsigned16'],
+ 182 => ['name' => 'tcpSourcePort', 'pack' => 'unsigned16'],
+ 183 => ['name' => 'tcpDestinationPort', 'pack' => 'unsigned16'],
+ 184 => ['name' => 'tcpSequenceNumber', 'pack' => 'unsigned32'],
+ 185 => ['name' => 'tcpAcknowledgementNumber', 'pack' => 'unsigned32'],
+ 186 => ['name' => 'tcpWindowSize', 'pack' => 'unsigned16'],
+ 187 => ['name' => 'tcpUrgentPointer', 'pack' => 'unsigned16'],
+ 188 => ['name' => 'tcpHeaderLength', 'pack' => 'unsigned8'],
+ 189 => ['name' => 'ipHeaderLength', 'pack' => 'unsigned8'],
+ 190 => ['name' => 'totalLengthIPv4', 'pack' => 'unsigned16'],
+ 191 => ['name' => 'payloadLengthIPv6', 'pack' => 'unsigned16'],
+ 192 => ['name' => 'ipTTL', 'pack' => 'unsigned8'],
+ 193 => ['name' => 'nextHeaderIPv6', 'pack' => 'unsigned8'],
+ 194 => ['name' => 'mplsPayloadLength', 'pack' => 'unsigned32'],
+ 195 => ['name' => 'ipDiffServCodePoint', 'pack' => 'unsigned8'],
+ 196 => ['name' => 'ipPrecedence', 'pack' => 'unsigned8'],
+ 197 => ['name' => 'fragmentFlags', 'pack' => 'unsigned8'],
+ 198 => ['name' => 'octetDeltaSumOfSquares', 'pack' => 'unsigned64'],
+ 199 => ['name' => 'octetTotalSumOfSquares', 'pack' => 'unsigned64'],
+ 200 => ['name' => 'mplsTopLabelTTL', 'pack' => 'unsigned8'],
+ 201 => ['name' => 'mplsLabelStackLength', 'pack' => 'unsigned32'],
+ 202 => ['name' => 'mplsLabelStackDepth', 'pack' => 'unsigned32'],
+ 203 => ['name' => 'mplsTopLabelExp', 'pack' => 'unsigned8'],
+ 204 => ['name' => 'ipPayloadLength', 'pack' => 'unsigned32'],
+ 205 => ['name' => 'udpMessageLength', 'pack' => 'unsigned16'],
+ 206 => ['name' => 'isMulticast', 'pack' => 'unsigned8'],
+ 207 => ['name' => 'ipv4IHL', 'pack' => 'unsigned8'],
+ 208 => ['name' => 'ipv4Options', 'pack' => 'unsigned32'],
+ 209 => ['name' => 'tcpOptions', 'pack' => 'unsigned64'],
+ 210 => ['name' => 'paddingOctets', 'pack' => 'octetArray'],
+ 211 => ['name' => 'collectorIPv4Address', 'pack' => 'ipv4Address'],
+ 212 => ['name' => 'collectorIPv6Address', 'pack' => 'ipv6Address'],
+ 213 => ['name' => 'exportInterface', 'pack' => 'unsigned32'],
+ 214 => ['name' => 'exportProtocolVersion', 'pack' => 'unsigned8'],
+ 215 => ['name' => 'exportTransportProtocol', 'pack' => 'unsigned8'],
+ 216 => ['name' => 'collectorTransportPort', 'pack' => 'unsigned16'],
+ 217 => ['name' => 'exporterTransportPort', 'pack' => 'unsigned16'],
+ 218 => ['name' => 'tcpSynTotalCount', 'pack' => 'unsigned64'],
+ 219 => ['name' => 'tcpFinTotalCount', 'pack' => 'unsigned64'],
+ 220 => ['name' => 'tcpRstTotalCount', 'pack' => 'unsigned64'],
+ 221 => ['name' => 'tcpPshTotalCount', 'pack' => 'unsigned64'],
+ 222 => ['name' => 'tcpAckTotalCount', 'pack' => 'unsigned64'],
+ 223 => ['name' => 'tcpUrgTotalCount', 'pack' => 'unsigned64'],
+ 224 => ['name' => 'ipTotalLength', 'pack' => 'unsigned64'],
+ 225 => ['name' => 'postNATSourceIPv4Address', 'pack' => 'ipv4Address'],
+ 226 => ['name' => 'postNATDestinationIPv4Address', 'pack' => 'ipv4Address'],
+ 227 => ['name' => 'postNAPTSourceTransportPort', 'pack' => 'unsigned16'],
+ 228 => ['name' => 'postNAPTDestinationTransportPort', 'pack' => 'unsigned16'],
+ 229 => ['name' => 'natOriginatingAddressRealm', 'pack' => 'unsigned8'],
+ 230 => ['name' => 'natEvent', 'pack' => 'unsigned8'],
+ 231 => ['name' => 'initiatorOctets', 'pack' => 'unsigned64'],
+ 232 => ['name' => 'responderOctets', 'pack' => 'unsigned64'],
+ 233 => ['name' => 'firewallEvent', 'pack' => 'unsigned8'],
+ 234 => ['name' => 'ingressVRFID', 'pack' => 'unsigned32'],
+ 235 => ['name' => 'egressVRFID', 'pack' => 'unsigned32'],
+ 236 => ['name' => 'VRFname', 'pack' => 'string'],
+ 237 => ['name' => 'postMplsTopLabelExp', 'pack' => 'unsigned8'],
+ 238 => ['name' => 'tcpWindowScale', 'pack' => 'unsigned16'],
+ 239 => ['name' => 'biflowDirection', 'pack' => 'unsigned8'],
+ 240 => ['name' => 'ethernetHeaderLength', 'pack' => 'unsigned8'],
+ 241 => ['name' => 'ethernetPayloadLength', 'pack' => 'unsigned16'],
+ 242 => ['name' => 'ethernetTotalLength', 'pack' => 'unsigned16'],
+ 243 => ['name' => 'dot1qVlanId', 'pack' => 'unsigned16'],
+ 244 => ['name' => 'dot1qPriority', 'pack' => 'unsigned8'],
+ 245 => ['name' => 'dot1qCustomerVlanId', 'pack' => 'unsigned16'],
+ 246 => ['name' => 'dot1qCustomerPriority', 'pack' => 'unsigned8'],
+ 247 => ['name' => 'metroEvcId', 'pack' => 'string'],
+ 248 => ['name' => 'metroEvcType', 'pack' => 'unsigned8'],
+ 249 => ['name' => 'pseudoWireId', 'pack' => 'unsigned32'],
+ 250 => ['name' => 'pseudoWireType', 'pack' => 'unsigned16'],
+ 251 => ['name' => 'pseudoWireControlWord', 'pack' => 'unsigned32'],
+ 252 => ['name' => 'ingressPhysicalInterface', 'pack' => 'unsigned32'],
+ 253 => ['name' => 'egressPhysicalInterface', 'pack' => 'unsigned32'],
+ 254 => ['name' => 'postDot1qVlanId', 'pack' => 'unsigned16'],
+ 255 => ['name' => 'postDot1qCustomerVlanId', 'pack' => 'unsigned16'],
+ 256 => ['name' => 'ethernetType', 'pack' => 'unsigned16'],
+ 257 => ['name' => 'postIpPrecedence', 'pack' => 'unsigned8'],
+ 258 => ['name' => 'collectionTimeMilliseconds', 'pack' => 'dateTimeMilliseconds'],
+ 259 => ['name' => 'exportSctpStreamId', 'pack' => 'unsigned16'],
+ 260 => ['name' => 'maxExportSeconds', 'pack' => 'dateTimeSeconds'],
+ 261 => ['name' => 'maxFlowEndSeconds', 'pack' => 'dateTimeSeconds'],
+ 262 => ['name' => 'messageMD5Checksum', 'pack' => 'octetArray'],
+ 263 => ['name' => 'messageScope', 'pack' => 'unsigned8'],
+ 264 => ['name' => 'minExportSeconds', 'pack' => 'dateTimeSeconds'],
+ 265 => ['name' => 'minFlowStartSeconds', 'pack' => 'dateTimeSeconds'],
+ 266 => ['name' => 'opaqueOctets', 'pack' => 'octetArray'],
+ 267 => ['name' => 'sessionScope', 'pack' => 'unsigned8'],
+ 268 => ['name' => 'maxFlowEndMicroseconds', 'pack' => 'dateTimeMicroseconds'],
+ 269 => ['name' => 'maxFlowEndMilliseconds', 'pack' => 'dateTimeMilliseconds'],
+ 270 => ['name' => 'maxFlowEndNanoseconds', 'pack' => 'dateTimeNanoseconds'],
+ 271 => ['name' => 'minFlowStartMicroseconds', 'pack' => 'dateTimeMicroseconds'],
+ 272 => ['name' => 'minFlowStartMilliseconds', 'pack' => 'dateTimeMilliseconds'],
+ 273 => ['name' => 'minFlowStartNanoseconds', 'pack' => 'dateTimeNanoseconds'],
+ 274 => ['name' => 'collectorCertificate', 'pack' => 'octetArray'],
+ 275 => ['name' => 'exporterCertificate', 'pack' => 'octetArray'],
+ 276 => ['name' => 'dataRecordsReliability', 'pack' => 'boolean'],
+ 277 => ['name' => 'observationPointType', 'pack' => 'unsigned8'],
+ 278 => ['name' => 'newConnectionDeltaCount', 'pack' => 'unsigned32'],
+ 279 => ['name' => 'connectionSumDurationSeconds', 'pack' => 'unsigned64'],
+ 280 => ['name' => 'connectionTransactionId', 'pack' => 'unsigned64'],
+ 281 => ['name' => 'postNATSourceIPv6Address', 'pack' => 'ipv6Address'],
+ 282 => ['name' => 'postNATDestinationIPv6Address', 'pack' => 'ipv6Address'],
+ 283 => ['name' => 'natPoolId', 'pack' => 'unsigned32'],
+ 284 => ['name' => 'natPoolName', 'pack' => 'string'],
+ 285 => ['name' => 'anonymizationFlags', 'pack' => 'unsigned16'],
+ 286 => ['name' => 'anonymizationTechnique', 'pack' => 'unsigned16'],
+ 287 => ['name' => 'informationElementIndex', 'pack' => 'unsigned16'],
+ 288 => ['name' => 'p2pTechnology', 'pack' => 'string'],
+ 289 => ['name' => 'tunnelTechnology', 'pack' => 'string'],
+ 290 => ['name' => 'encryptedTechnology', 'pack' => 'string'],
+ 291 => ['name' => 'basicList', 'pack' => 'basicList'],
+ 292 => ['name' => 'subTemplateList', 'pack' => 'subTemplateList'],
+ 293 => ['name' => 'subTemplateMultiList', 'pack' => 'subTemplateMultiList'],
+ 294 => ['name' => 'bgpValidityState', 'pack' => 'unsigned8'],
+ 295 => ['name' => 'IPSecSPI', 'pack' => 'unsigned32'],
+ 296 => ['name' => 'greKey', 'pack' => 'unsigned32'],
+ 297 => ['name' => 'natType', 'pack' => 'unsigned8'],
+ 298 => ['name' => 'initiatorPackets', 'pack' => 'unsigned64'],
+ 299 => ['name' => 'responderPackets', 'pack' => 'unsigned64'],
+ 300 => ['name' => 'observationDomainName', 'pack' => 'string'],
+ 301 => ['name' => 'selectionSequenceId', 'pack' => 'unsigned64'],
+ 302 => ['name' => 'selectorId', 'pack' => 'unsigned64'],
+ 303 => ['name' => 'informationElementId', 'pack' => 'unsigned16'],
+ 304 => ['name' => 'selectorAlgorithm', 'pack' => 'unsigned16'],
+ 305 => ['name' => 'samplingPacketInterval', 'pack' => 'unsigned32'],
+ 306 => ['name' => 'samplingPacketSpace', 'pack' => 'unsigned32'],
+ 307 => ['name' => 'samplingTimeInterval', 'pack' => 'unsigned32'],
+ 308 => ['name' => 'samplingTimeSpace', 'pack' => 'unsigned32'],
+ 309 => ['name' => 'samplingSize', 'pack' => 'unsigned32'],
+ 310 => ['name' => 'samplingPopulation', 'pack' => 'unsigned32'],
+ 311 => ['name' => 'samplingProbability', 'pack' => 'float64'],
+ 312 => ['name' => 'dataLinkFrameSize', 'pack' => 'unsigned16'],
+ 313 => ['name' => 'ipHeaderPacketSection', 'pack' => 'octetArray'],
+ 314 => ['name' => 'ipPayloadPacketSection', 'pack' => 'octetArray'],
+ 315 => ['name' => 'dataLinkFrameSection', 'pack' => 'octetArray'],
+ 316 => ['name' => 'mplsLabelStackSection', 'pack' => 'octetArray'],
+ 317 => ['name' => 'mplsPayloadPacketSection', 'pack' => 'octetArray'],
+ 318 => ['name' => 'selectorIdTotalPktsObserved', 'pack' => 'unsigned64'],
+ 319 => ['name' => 'selectorIdTotalPktsSelected', 'pack' => 'unsigned64'],
+ 320 => ['name' => 'absoluteError', 'pack' => 'float64'],
+ 321 => ['name' => 'relativeError', 'pack' => 'float64'],
+ 322 => ['name' => 'observationTimeSeconds', 'pack' => 'dateTimeSeconds'],
+ 323 => ['name' => 'observationTimeMilliseconds', 'pack' => 'dateTimeMilliseconds'],
+ 324 => ['name' => 'observationTimeMicroseconds', 'pack' => 'dateTimeMicroseconds'],
+ 325 => ['name' => 'observationTimeNanoseconds', 'pack' => 'dateTimeNanoseconds'],
+ 326 => ['name' => 'digestHashValue', 'pack' => 'unsigned64'],
+ 327 => ['name' => 'hashIPPayloadOffset', 'pack' => 'unsigned64'],
+ 328 => ['name' => 'hashIPPayloadSize', 'pack' => 'unsigned64'],
+ 329 => ['name' => 'hashOutputRangeMin', 'pack' => 'unsigned64'],
+ 330 => ['name' => 'hashOutputRangeMax', 'pack' => 'unsigned64'],
+ 331 => ['name' => 'hashSelectedRangeMin', 'pack' => 'unsigned64'],
+ 332 => ['name' => 'hashSelectedRangeMax', 'pack' => 'unsigned64'],
+ 333 => ['name' => 'hashDigestOutput', 'pack' => 'boolean'],
+ 334 => ['name' => 'hashInitialiserValue', 'pack' => 'unsigned64'],
+ 335 => ['name' => 'selectorName', 'pack' => 'string'],
+ 336 => ['name' => 'upperCILimit', 'pack' => 'float64'],
+ 337 => ['name' => 'lowerCILimit', 'pack' => 'float64'],
+ 338 => ['name' => 'confidenceLevel', 'pack' => 'float64'],
+ 339 => ['name' => 'informationElementDataType', 'pack' => 'unsigned8'],
+ 340 => ['name' => 'informationElementDescription', 'pack' => 'string'],
+ 341 => ['name' => 'informationElementName', 'pack' => 'string'],
+ 342 => ['name' => 'informationElementRangeBegin', 'pack' => 'unsigned64'],
+ 343 => ['name' => 'informationElementRangeEnd', 'pack' => 'unsigned64'],
+ 344 => ['name' => 'informationElementSemantics', 'pack' => 'unsigned8'],
+ 345 => ['name' => 'informationElementUnits', 'pack' => 'unsigned16'],
+ 346 => ['name' => 'privateEnterpriseNumber', 'pack' => 'unsigned32'],
+ 347 => ['name' => 'virtualStationInterfaceId', 'pack' => 'octetArray'],
+ 348 => ['name' => 'virtualStationInterfaceName', 'pack' => 'string'],
+ 349 => ['name' => 'virtualStationUUID', 'pack' => 'octetArray'],
+ 350 => ['name' => 'virtualStationName', 'pack' => 'string'],
+ 351 => ['name' => 'layer2SegmentId', 'pack' => 'unsigned64'],
+ 352 => ['name' => 'layer2OctetDeltaCount', 'pack' => 'unsigned64'],
+ 353 => ['name' => 'layer2OctetTotalCount', 'pack' => 'unsigned64'],
+ 354 => ['name' => 'ingressUnicastPacketTotalCount', 'pack' => 'unsigned64'],
+ 355 => ['name' => 'ingressMulticastPacketTotalCount', 'pack' => 'unsigned64'],
+ 356 => ['name' => 'ingressBroadcastPacketTotalCount', 'pack' => 'unsigned64'],
+ 357 => ['name' => 'egressUnicastPacketTotalCount', 'pack' => 'unsigned64'],
+ 358 => ['name' => 'egressBroadcastPacketTotalCount', 'pack' => 'unsigned64'],
+ 359 => ['name' => 'monitoringIntervalStartMilliSeconds', 'pack' => 'dateTimeMilliseconds'],
+ 360 => ['name' => 'monitoringIntervalEndMilliSeconds', 'pack' => 'dateTimeMilliseconds'],
+ 361 => ['name' => 'portRangeStart', 'pack' => 'unsigned16'],
+ 362 => ['name' => 'portRangeEnd', 'pack' => 'unsigned16'],
+ 363 => ['name' => 'portRangeStepSize', 'pack' => 'unsigned16'],
+ 364 => ['name' => 'portRangeNumPorts', 'pack' => 'unsigned16'],
+ 365 => ['name' => 'staMacAddress', 'pack' => 'macAddress'],
+ 366 => ['name' => 'staIPv4Address', 'pack' => 'ipv4Address'],
+ 367 => ['name' => 'wtpMacAddress', 'pack' => 'macAddress'],
+ 368 => ['name' => 'ingressInterfaceType', 'pack' => 'unsigned32'],
+ 369 => ['name' => 'egressInterfaceType', 'pack' => 'unsigned32'],
+ 370 => ['name' => 'rtpSequenceNumber', 'pack' => 'unsigned16'],
+ 371 => ['name' => 'userName', 'pack' => 'string'],
+ 372 => ['name' => 'applicationCategoryName', 'pack' => 'string'],
+ 373 => ['name' => 'applicationSubCategoryName', 'pack' => 'string'],
+ 374 => ['name' => 'applicationGroupName', 'pack' => 'string'],
+ 375 => ['name' => 'originalFlowsPresent', 'pack' => 'unsigned64'],
+ 376 => ['name' => 'originalFlowsInitiated', 'pack' => 'unsigned64'],
+ 377 => ['name' => 'originalFlowsCompleted', 'pack' => 'unsigned64'],
+ 378 => ['name' => 'distinctCountOfSourceIPAddress', 'pack' => 'unsigned64'],
+ 379 => ['name' => 'distinctCountOfDestinationIPAddress', 'pack' => 'unsigned64'],
+ 380 => ['name' => 'distinctCountOfSourceIPv4Address', 'pack' => 'unsigned32'],
+ 381 => ['name' => 'distinctCountOfDestinationIPv4Address', 'pack' => 'unsigned32'],
+ 382 => ['name' => 'distinctCountOfSourceIPv6Address', 'pack' => 'unsigned64'],
+ 383 => ['name' => 'distinctCountOfDestinationIPv6Address', 'pack' => 'unsigned64'],
+ 384 => ['name' => 'valueDistributionMethod', 'pack' => 'unsigned8'],
+ 385 => ['name' => 'rfc3550JitterMilliseconds', 'pack' => 'unsigned32'],
+ 386 => ['name' => 'rfc3550JitterMicroseconds', 'pack' => 'unsigned32'],
+ 387 => ['name' => 'rfc3550JitterNanoseconds', 'pack' => 'unsigned32'],
+ 388 => ['name' => 'dot1qDEI', 'pack' => 'boolean'],
+ 389 => ['name' => 'dot1qCustomerDEI', 'pack' => 'boolean'],
+ 390 => ['name' => 'flowSelectorAlgorithm', 'pack' => 'unsigned16'],
+ 391 => ['name' => 'flowSelectedOctetDeltaCount', 'pack' => 'unsigned64'],
+ 392 => ['name' => 'flowSelectedPacketDeltaCount', 'pack' => 'unsigned64'],
+ 393 => ['name' => 'flowSelectedFlowDeltaCount', 'pack' => 'unsigned64'],
+ 394 => ['name' => 'selectorIDTotalFlowsObserved', 'pack' => 'unsigned64'],
+ 395 => ['name' => 'selectorIDTotalFlowsSelected', 'pack' => 'unsigned64'],
+ 396 => ['name' => 'samplingFlowInterval', 'pack' => 'unsigned64'],
+ 397 => ['name' => 'samplingFlowSpacing', 'pack' => 'unsigned64'],
+ 398 => ['name' => 'flowSamplingTimeInterval', 'pack' => 'unsigned64'],
+ 399 => ['name' => 'flowSamplingTimeSpacing', 'pack' => 'unsigned64'],
+ 400 => ['name' => 'hashFlowDomain', 'pack' => 'unsigned16'],
+ 401 => ['name' => 'transportOctetDeltaCount', 'pack' => 'unsigned64'],
+ 402 => ['name' => 'transportPacketDeltaCount', 'pack' => 'unsigned64'],
+ 403 => ['name' => 'originalExporterIPv4Address', 'pack' => 'ipv4Address'],
+ 404 => ['name' => 'originalExporterIPv6Address', 'pack' => 'ipv6Address'],
+ 405 => ['name' => 'originalObservationDomainId', 'pack' => 'unsigned32'],
+ 406 => ['name' => 'intermediateProcessId', 'pack' => 'unsigned32'],
+ 407 => ['name' => 'ignoredDataRecordTotalCount', 'pack' => 'unsigned64'],
+ 408 => ['name' => 'dataLinkFrameType', 'pack' => 'unsigned16'],
+ 409 => ['name' => 'sectionOffset', 'pack' => 'unsigned16'],
+ 410 => ['name' => 'sectionExportedOctets', 'pack' => 'unsigned16'],
+ 411 => ['name' => 'dot1qServiceInstanceTag', 'pack' => 'octetArray'],
+ 412 => ['name' => 'dot1qServiceInstanceId', 'pack' => 'unsigned32'],
+ 413 => ['name' => 'dot1qServiceInstancePriority', 'pack' => 'unsigned8'],
+ 414 => ['name' => 'dot1qCustomerSourceMacAddress', 'pack' => 'macAddress'],
+ 415 => ['name' => 'dot1qCustomerDestinationMacAddress', 'pack' => 'macAddress'],
+ 416 => ['name' => 'deprecated', 'pack' => 'unsigned64'],
+ 417 => ['name' => 'postLayer2OctetDeltaCount', 'pack' => 'unsigned64'],
+ 418 => ['name' => 'postMCastLayer2OctetDeltaCount', 'pack' => 'unsigned64'],
+ 419 => ['name' => 'deprecated', 'pack' => 'unsigned64'],
+ 420 => ['name' => 'postLayer2OctetTotalCount', 'pack' => 'unsigned64'],
+ 421 => ['name' => 'postMCastLayer2OctetTotalCount', 'pack' => 'unsigned64'],
+ 422 => ['name' => 'minimumLayer2TotalLength', 'pack' => 'unsigned64'],
+ 423 => ['name' => 'maximumLayer2TotalLength', 'pack' => 'unsigned64'],
+ 424 => ['name' => 'droppedLayer2OctetDeltaCount', 'pack' => 'unsigned64'],
+ 425 => ['name' => 'droppedLayer2OctetTotalCount', 'pack' => 'unsigned64'],
+ 426 => ['name' => 'ignoredLayer2OctetTotalCount', 'pack' => 'unsigned64'],
+ 427 => ['name' => 'notSentLayer2OctetTotalCount', 'pack' => 'unsigned64'],
+ 428 => ['name' => 'layer2OctetDeltaSumOfSquares', 'pack' => 'unsigned64'],
+ 429 => ['name' => 'layer2OctetTotalSumOfSquares', 'pack' => 'unsigned64'],
+ 430 => ['name' => 'layer2FrameDeltaCount', 'pack' => 'unsigned64'],
+ 431 => ['name' => 'layer2FrameTotalCount', 'pack' => 'unsigned64'],
+ 432 => ['name' => 'pseudoWireDestinationIPv4Address', 'pack' => 'ipv4Address'],
+ 433 => ['name' => 'ignoredLayer2FrameTotalCount', 'pack' => 'unsigned64'],
+ 434 => ['name' => 'mibObjectValueInteger', 'pack' => 'signed32'],
+ 435 => ['name' => 'mibObjectValueOctetString', 'pack' => 'octetArray'],
+ 436 => ['name' => 'mibObjectValueOID', 'pack' => 'octetArray'],
+ 437 => ['name' => 'mibObjectValueBits', 'pack' => 'octetArray'],
+ 438 => ['name' => 'mibObjectValueIPAddress', 'pack' => 'ipv4Address'],
+ 439 => ['name' => 'mibObjectValueCounter', 'pack' => 'unsigned64'],
+ 440 => ['name' => 'mibObjectValueGauge', 'pack' => 'unsigned32'],
+ 441 => ['name' => 'mibObjectValueTimeTicks', 'pack' => 'unsigned32'],
+ 442 => ['name' => 'mibObjectValueUnsigned', 'pack' => 'unsigned32'],
+ 443 => ['name' => 'mibObjectValueTable', 'pack' => 'subTemplateList'],
+ 444 => ['name' => 'mibObjectValueRow', 'pack' => 'subTemplateList'],
+ 445 => ['name' => 'mibObjectIdentifier', 'pack' => 'octetArray'],
+ 446 => ['name' => 'mibSubIdentifier', 'pack' => 'unsigned32'],
+ 447 => ['name' => 'mibIndexIndicator', 'pack' => 'unsigned64'],
+ 448 => ['name' => 'mibCaptureTimeSemantics', 'pack' => 'unsigned8'],
+ 449 => ['name' => 'mibContextEngineID', 'pack' => 'octetArray'],
+ 450 => ['name' => 'mibContextName', 'pack' => 'string'],
+ 451 => ['name' => 'mibObjectName', 'pack' => 'string'],
+ 452 => ['name' => 'mibObjectDescription', 'pack' => 'string'],
+ 453 => ['name' => 'mibObjectSyntax', 'pack' => 'string'],
+ 454 => ['name' => 'mibModuleName', 'pack' => 'string'],
+ 455 => ['name' => 'mobileIMSI', 'pack' => 'string'],
+ 456 => ['name' => 'mobileMSISDN', 'pack' => 'string'],
+ 457 => ['name' => 'httpStatusCode', 'pack' => 'unsigned16'],
+ 458 => ['name' => 'sourceTransportPortsLimit', 'pack' => 'unsigned16'],
+ 459 => ['name' => 'httpRequestMethod', 'pack' => 'string'],
+ 460 => ['name' => 'httpRequestHost', 'pack' => 'string'],
+ 461 => ['name' => 'httpRequestTarget', 'pack' => 'string'],
+ 462 => ['name' => 'httpMessageVersion', 'pack' => 'string'],
+ 463 => ['name' => 'natInstanceID', 'pack' => 'unsigned32'],
+ 464 => ['name' => 'internalAddressRealm', 'pack' => 'octetArray'],
+ 465 => ['name' => 'externalAddressRealm', 'pack' => 'octetArray'],
+ 466 => ['name' => 'natQuotaExceededEvent', 'pack' => 'unsigned32'],
+ 467 => ['name' => 'natThresholdEvent', 'pack' => 'unsigned32'],
+ 468 => ['name' => 'httpUserAgent', 'pack' => 'string'],
+ 469 => ['name' => 'httpContentType', 'pack' => 'string'],
+ 470 => ['name' => 'httpReasonPhrase', 'pack' => 'string'],
+ 471 => ['name' => 'maxSessionEntries', 'pack' => 'unsigned32'],
+ 472 => ['name' => 'maxBIBEntries', 'pack' => 'unsigned32'],
+ 473 => ['name' => 'maxEntriesPerUser', 'pack' => 'unsigned32'],
+ 474 => ['name' => 'maxSubscribers', 'pack' => 'unsigned32'],
+ 475 => ['name' => 'maxFragmentsPendingReassembly', 'pack' => 'unsigned32'],
+ 476 => ['name' => 'addressPoolHighThreshold', 'pack' => 'unsigned32'],
+ 477 => ['name' => 'addressPoolLowThreshold', 'pack' => 'unsigned32'],
+ 478 => ['name' => 'addressPortMappingHighThreshold', 'pack' => 'unsigned32'],
+ 479 => ['name' => 'addressPortMappingLowThreshold', 'pack' => 'unsigned32'],
+ 480 => ['name' => 'addressPortMappingPerUserHighThreshold','pack' => 'unsigned32'],
+ 481 => ['name' => 'globalAddressMappingHighThreshold', 'pack' => 'unsigned32'],
+ 482 => ['name' => 'vpnIdentifier', 'pack' => 'octetArray'],
+ 483 => ['name' => 'bgpCommunity', 'pack' => 'unsigned32'],
+ 484 => ['name' => 'bgpSourceCommunityList', 'pack' => 'basicList'],
+ 485 => ['name' => 'bgpDestinationCommunityList', 'pack' => 'basicList'],
+ 486 => ['name' => 'bgpExtendedCommunity', 'pack' => 'octetArray'],
+ 487 => ['name' => 'bgpSourceExtendedCommunityList', 'pack' => 'basicList'],
+ 488 => ['name' => 'bgpDestinationExtendedCommunityList', 'pack' => 'basicList'],
+ 489 => ['name' => 'bgpLargeCommunity', 'pack' => 'octetArray'],
+ 490 => ['name' => 'bgpSourceLargeCommunityList', 'pack' => 'basicList'],
+ 491 => ['name' => 'bgpDestinationLargeCommunityList', 'pack' => 'basicList'],
+ 492 => ['name' => 'srhFlagsIPv6', 'pack' => 'unsigned8'],
+ 493 => ['name' => 'srhTagIPv6', 'pack' => 'unsigned16'],
+ 494 => ['name' => 'srhSegmentIPv6', 'pack' => 'ipv6Address'],
+ 495 => ['name' => 'srhActiveSegmentIPv6', 'pack' => 'ipv6Address'],
+ 496 => ['name' => 'srhSegmentIPv6BasicList', 'pack' => 'basicList'],
+ 497 => ['name' => 'srhSegmentIPv6ListSection', 'pack' => 'octetArray'],
+ 498 => ['name' => 'srhSegmentsIPv6Left', 'pack' => 'unsigned8'],
+ 499 => ['name' => 'srhIPv6Section', 'pack' => 'octetArray'],
+ 500 => ['name' => 'srhIPv6ActiveSegmentType', 'pack' => 'unsigned8'],
+ 501 => ['name' => 'srhSegmentIPv6LocatorLength', 'pack' => 'unsigned8'],
+ 502 => ['name' => 'srhSegmentIPv6EndpointBehavior', 'pack' => 'unsigned16'],
+ 503 => ['name' => 'transportChecksum', 'pack' => 'unsigned16'],
+ 504 => ['name' => 'icmpHeaderPacketSection', 'pack' => 'octetArray'],
+ 505 => ['name' => 'gtpuFlags', 'pack' => 'unsigned8'],
+ 506 => ['name' => 'gtpuMsgType', 'pack' => 'unsigned8'],
+ 507 => ['name' => 'gtpuTEid', 'pack' => 'unsigned32'],
+ 508 => ['name' => 'gtpuSequenceNum', 'pack' => 'unsigned16'],
+ 509 => ['name' => 'gtpuQFI', 'pack' => 'unsigned8'],
+ 510 => ['name' => 'gtpuPduType', 'pack' => 'unsigned8'],
+ 511 => ['name' => 'bgpSourceAsPathList', 'pack' => 'basicList'],
+ 512 => ['name' => 'bgpDestinationAsPathList', 'pack' => 'basicList'],
);
$partition = read_config_option('flowview_partition');
@@ -648,7 +648,7 @@
$listener = flowview_db_fetch_row_prepared('SELECT *
FROM plugin_flowview_devices
WHERE id = ?',
- array($listener_id));
+ [$listener_id]);
flowview_db_execute("CREATE TABLE IF NOT EXISTS `plugin_flowview_device_streams` (
device_id int(11) unsigned NOT NULL default '0',
@@ -691,19 +691,19 @@
$previous_version = -1;
$refresh_seconds = 300;
- $tmpl_refreshed = array(); // We update the templates every $refresh_seconds per peer
+ $tmpl_refreshed = []; // We update the templates every $refresh_seconds per peer
flowview_db_execute_prepared("UPDATE `plugin_flowview_devices`
SET last_updated = NOW()
WHERE id = ?",
- array($listener['id']));
+ [$listener['id']]);
while (true) {
if ($reload) {
$listener = flowview_db_fetch_row_prepared('SELECT *
FROM plugin_flowview_devices
WHERE id = ?',
- array($listener_id));
+ [$listener_id]);
$reload = false;
}
@@ -857,7 +857,7 @@ function update_stream_stats($listener_id, $ex_addr, $version, &$tmpl_refreshed,
if (!isset($lversion[$ex_addr]) || (isset($lversion[$ex_addr]) && $version != $lversion[$ex_addr])) {
debug('Flow: Detecting version initialization/change to v' . $version);
- $templates = array();
+ $templates = [];
$stream_refreshed[$ex_addr] = false;
$tmpl_refreshed[$ex_addr] = false;
}
@@ -897,18 +897,18 @@ function update_stream_stats($listener_id, $ex_addr, $version, &$tmpl_refreshed,
version = VALUES(version),
name = VALUES(name),
last_updated = VALUES(last_updated)",
- array($listener_id, $ex_addr, $name, $db_version, $update_time));
+ [$listener_id, $ex_addr, $name, $db_version, $update_time]);
flowview_db_execute_prepared("DELETE FROM `plugin_flowview_device_streams`
WHERE device_id = ? AND last_updated < FROM_UNIXTIME(UNIX_TIMESTAMP()-86400)",
- array($listener_id));
+ [$listener_id]);
heartbeat_process('flowview', 'child_' . $listener_id, $config['poller_id']);
flowview_db_execute_prepared("UPDATE `plugin_flowview_devices`
SET last_updated = NOW()
WHERE id = ?",
- array($listener_id));
+ [$listener_id]);
}
$lversion[$ex_addr] = $version;
@@ -1016,7 +1016,7 @@ function process_fv5($p, $ex_addr) {
$flows = 1;
$flowrec_len = 48;
$flowtime = $header['unix_secs'];
- $sql = array();
+ $sql = [];
debug('Flow: Processing v5 Data, Records: ' . $records);
@@ -1207,7 +1207,7 @@ function process_fv9($p, $ex_addr) {
flowview_connect();
if (!isset($templates[$ex_addr])) {
- $templates[$ex_addr] = array();
+ $templates[$ex_addr] = [];
}
/* process header */
@@ -1221,7 +1221,7 @@ function process_fv9($p, $ex_addr) {
$flowtime = $header['unix_seconds'];
$sysuptime = $header['sysuptime'];
$flow_data = false;
- $sql = array();
+ $sql = [];
$sql_prefix = get_sql_prefix($flowtime);
debug('Flow: Processing v9 Data, Records: ' . $records);
@@ -1255,12 +1255,12 @@ function process_fv9($p, $ex_addr) {
debug('===============================================');
debug("Flow: Template Id: $tid with $fcount fields");
- $templates[$ex_addr][$tid] = array();
+ $templates[$ex_addr][$tid] = [];
for ($a = 0; $a < $fcount; $a++) {
$field = substr($p, $h, 4);
$field = unpack('nfield_id/nfield_len', $field);
- $tf = array();
+ $tf = [];
$tf['field_id'] = $field['field_id'];
$tf['length'] = $field['field_len'];
@@ -1303,14 +1303,14 @@ function process_fv9($p, $ex_addr) {
flowview_db_execute_prepared('UPDATE plugin_flowview_device_templates
SET supported = 0
WHERE device_id = ? AND ex_addr = ? AND template_id = ?',
- array($listener_id, $ex_addr, $tid));
+ [$listener_id, $ex_addr, $tid]);
} else {
$tsupported[$ex_addr][$tid] = true;
flowview_db_execute_prepared('UPDATE plugin_flowview_device_templates
SET supported = 1
WHERE device_id = ? AND ex_addr = ? AND template_id = ?',
- array($listener_id, $ex_addr, $tid));
+ [$listener_id, $ex_addr, $tid]);
}
debug("Flow: Template Captured, Template:$tid Size:$tlength");
@@ -1345,7 +1345,7 @@ function process_fv9($p, $ex_addr) {
debug('Flow: Template Found: ' . $tid);
while ($k < $fslen) {
- $data = array();
+ $data = [];
foreach ($templates[$ex_addr][$tid] as $t) {
$id = $t['field_id'];
@@ -1474,7 +1474,7 @@ function process_fv10($p, $ex_addr) {
flowview_connect();
if (!isset($templates[$ex_addr])) {
- $templates[$ex_addr] = array();
+ $templates[$ex_addr] = [];
}
/* process header */
@@ -1485,7 +1485,7 @@ function process_fv10($p, $ex_addr) {
$count = $header['count'];
$i = $header_len;
$flowtime = $header['exporttime'];
- $sql = array();
+ $sql = [];
$sql_prefix = get_sql_prefix($flowtime);
debug('Flow: Processing v10/IPFIX Data, Bytes: ' . $count);
@@ -1520,12 +1520,12 @@ function process_fv10($p, $ex_addr) {
debug('===============================================');
debug("Flow: Template Id: $tid with $fcount fields");
- $templates[$ex_addr][$tid] = array();
+ $templates[$ex_addr][$tid] = [];
for ($a = 0; $a < $fcount; $a++) {
$field = substr($p, $h, 4);
$field = unpack('nfield_id/nfield_len', $field);
- $tf = array();
+ $tf = [];
$tf['field_id'] = $field['field_id'];
$tf['length'] = $field['field_len'];
@@ -1567,14 +1567,14 @@ function process_fv10($p, $ex_addr) {
flowview_db_execute_prepared('UPDATE plugin_flowview_device_templates
SET supported = 0
WHERE device_id = ? AND ex_addr = ? AND template_id = ?',
- array($listener_id, $ex_addr, $tid));
+ [$listener_id, $ex_addr, $tid]);
} else {
$tsupported[$ex_addr][$tid] = true;
flowview_db_execute_prepared('UPDATE plugin_flowview_device_templates
SET supported = 1
WHERE device_id = ? AND ex_addr = ? AND template_id = ?',
- array($listener_id, $ex_addr, $tid));
+ [$listener_id, $ex_addr, $tid]);
}
debug("Flow: Template Captured, Template:$tid Size: $tlength");
@@ -1609,7 +1609,7 @@ function process_fv10($p, $ex_addr) {
debug('Flow: Template Found: ' . $tid);
while ($k < $fslen) {
- $data = array();
+ $data = [];
foreach ($templates[$ex_addr][$tid] as $t) {
$id = $t['field_id'];
@@ -1705,8 +1705,8 @@ function flowview_template_supported($template, $tid) {
static $logged_ipv4_errors = false;
static $logged_ipv6_errors = false;
- $fieldspec = array('field_id', 'name', 'pack', 'unpack');
- $columns = array();
+ $fieldspec = ['field_id', 'name', 'pack', 'unpack'];
+ $columns = [];
foreach($template as $index => $field) {
$columns[$field['field_id']] = true;
diff --git a/flowview.php b/flowview.php
index 2d04535..cdfb920 100644
--- a/flowview.php
+++ b/flowview.php
@@ -1,4 +1,5 @@
array(
+ 'device_id' => [
'filter' => FILTER_VALIDATE_INT,
'default' => '0'
- ),
+ ],
'sortfield' => array(
'filter' => FILTER_CALLBACK,
- 'options' => array('options' => 'sanitize_search_string'),
+ 'options' => ['options' => 'sanitize_search_string'],
'default' => 'bytes'
),
'report' => array(
'filter' => FILTER_CALLBACK,
- 'options' => array('options' => 'sanitize_search_string'),
+ 'options' => ['options' => 'sanitize_search_string'],
'default' => 0
),
- 'cutofflines' => array(
+ 'cutofflines' => [
'filter' => FILTER_VALIDATE_INT,
'default' => '20'
- ),
- 'cutoffoctets' => array(
+ ],
+ 'cutoffoctets' => [
'filter' => FILTER_VALIDATE_INT,
'default' => '1000000'
- ),
+ ],
'predefined_timespan' => array(
'filter' => FILTER_VALIDATE_INT,
'default' => read_user_setting('default_timespan')
),
- 'exclude' => array(
+ 'exclude' => [
'filter' => FILTER_VALIDATE_INT,
'default' => '0'
- ),
+ ],
'date1' => array(
'filter' => FILTER_CALLBACK,
- 'options' => array('options' => 'sanitize_search_string'),
+ 'options' => ['options' => 'sanitize_search_string'],
'default' => ''
),
'date2' => array(
'filter' => FILTER_CALLBACK,
- 'options' => array('options' => 'sanitize_search_string'),
+ 'options' => ['options' => 'sanitize_search_string'],
'default' => ''
),
'ex_addr' => array(
'filter' => FILTER_CALLBACK,
- 'options' => array('options' => 'sanitize_search_string'),
+ 'options' => ['options' => 'sanitize_search_string'],
'default' => '0'
),
'domains' => array(
@@ -508,10 +509,10 @@ function flowview_request_vars() {
'options' => array('options' => array('regexp' => '(bar|pie|treemap)')),
'default' => 'bar'
),
- 'graph_height' => array(
+ 'graph_height' => [
'filter' => FILTER_VALIDATE_INT,
'default' => '400'
- )
+ ]
);
validate_store_request_vars($filters, 'sess_fv_' . get_filter_request_var('query'));
diff --git a/flowview_bulkarin.php b/flowview_bulkarin.php
index dee71d5..0e690a2 100644
--- a/flowview_bulkarin.php
+++ b/flowview_bulkarin.php
@@ -98,8 +98,8 @@
}
$time = time();
-$addresses = array();
-$cidrs = array();
+$addresses = [];
+$cidrs = [];
$whois_provider = read_config_option('flowview_whois_provider');
$whois_path = read_config_option('flowview_path_whois');
@@ -116,11 +116,11 @@
$arin_id = $row['id'];
$return_var = 0;
- $output = array();
+ $output = [];
$origin = flowview_db_fetch_cell_prepared('SELECT origin
FROM plugin_flowview_irr_route
WHERE route = ?',
- array($cidr));
+ [$cidr]);
if ($origin == '') {
if (file_exists($whois_path) && is_executable($whois_path) && $whois_provider != '') {
@@ -137,7 +137,7 @@
flowview_db_execute_prepared('UPDATE plugin_flowview_arin_information
SET origin = ?
WHERE id = ?',
- array($origin, $arin_id));
+ [$origin, $arin_id]);
} else {
print "WARNING: Origin AS Not Verified for CIDR Address:$cidr." . PHP_EOL;
}
@@ -151,7 +151,7 @@
flowview_db_execute_prepared('UPDATE plugin_flowview_arin_information
SET origin = ?
WHERE id = ?',
- array($origin, $arin_id));
+ [$origin, $arin_id]);
}
}
}
@@ -180,7 +180,7 @@
flowview_db_execute_prepared('UPDATE plugin_flowview_dnscache
SET `arin_verified` = ?, `arin_id` = ?, `time` = ?
WHERE `ip` = ?',
- array($arin_ver, $arin_id, $time, $p['ip']));
+ [$arin_ver, $arin_id, $time, $p['ip']]);
} else {
print "WARNING: Arin Not Verified for IP Address:{$p['ip']} and DNS Name:{$p['host']}" . PHP_EOL;
}
diff --git a/flowview_cleanup.php b/flowview_cleanup.php
index b8bea2a..1a9e90a 100644
--- a/flowview_cleanup.php
+++ b/flowview_cleanup.php
@@ -82,7 +82,7 @@
WHERE tasktype = ?
AND taskname LIKE "db_%"
ORDER BY taskname',
- array('flowview'));
+ ['flowview']);
if (cacti_sizeof($processes)) {
foreach($processes as $p) {
@@ -90,7 +90,7 @@
posix_kill($p['pid'], SIGINT);
- db_execute_prepared('DELETE FROM processes WHERE id = ?', array($p['id']));
+ db_execute_prepared('DELETE FROM processes WHERE id = ?', [$p['id']]);
}
}
diff --git a/flowview_databases.php b/flowview_databases.php
index 6400ce2..d058be4 100644
--- a/flowview_databases.php
+++ b/flowview_databases.php
@@ -1,4 +1,5 @@
$value) {
@@ -102,7 +103,7 @@ function flowview_get_item_details() {
$maintainers = preg_split('/[\s]+/', trim($response['mnt_by']));
foreach($maintainers as $m) {
- $sql_params = array();
+ $sql_params = [];
$sql_params[] = $m;
$sql_params[] = $response['mnt_by_source'];
@@ -176,7 +177,7 @@ function flowview_print_details(&$cols, &$details) {
print '' . __('No Details Found', 'flowview') . ' ';
}
- return array('mnt_by_present' => $mnt_by_present, 'mnt_by' => $mnt_by, 'mnt_by_source' => $mnt_by_source);
+ return ['mnt_by_present' => $mnt_by_present, 'mnt_by' => $mnt_by, 'mnt_by_source' => $mnt_by_source];
}
function view_databases() {
@@ -211,7 +212,7 @@ function view_databases() {
}
function get_all_columns() {
- $display_text = array();
+ $display_text = [];
$columns = array(
'route' => array(
@@ -761,7 +762,7 @@ function view_db_table($tab, &$tabs) {
$filter = array_map('trim', explode(',', $table_det['filter']));
$rowid = array_map('trim', explode(',', $table_det['rowid']));
$table_name = trim("plugin_flowview_irr_$tab");
- $odisplay_text = array();
+ $odisplay_text = [];
/* create display text for column */
if (isset($tabs[$tab])) {
@@ -800,34 +801,34 @@ function view_db_table($tab, &$tabs) {
/* ================= input validation and session storage ================= */
$filters = array(
- 'rows' => array(
+ 'rows' => [
'filter' => FILTER_VALIDATE_INT,
'pageset' => true,
'default' => '-1'
- ),
- 'page' => array(
+ ],
+ 'page' => [
'filter' => FILTER_VALIDATE_INT,
'default' => '1'
- ),
- 'filter' => array(
+ ],
+ 'filter' => [
'filter' => FILTER_DEFAULT,
'pageset' => true,
'default' => ''
- ),
- 'source' => array(
+ ],
+ 'source' => [
'filter' => FILTER_DEFAULT,
'pageset' => true,
'default' => '-1'
- ),
+ ],
'sort_column' => array(
'filter' => FILTER_CALLBACK,
'default' => $default_column,
- 'options' => array('options' => 'sanitize_search_string')
+ 'options' => ['options' => 'sanitize_search_string']
),
'sort_direction' => array(
'filter' => FILTER_CALLBACK,
'default' => $default_direction,
- 'options' => array('options' => 'sanitize_search_string')
+ 'options' => ['options' => 'sanitize_search_string']
)
);
@@ -841,18 +842,18 @@ function view_db_table($tab, &$tabs) {
}
$sql_where = '';
- $sql_params = array();
+ $sql_params = [];
$sql_order = get_order_string();
$sql_limit = ' LIMIT ' . ($rows*(get_request_var('page')-1)) . ',' . $rows;
/* sort naturally if the origin is in the sort */
- $natural_columns = array(
+ $natural_columns = [
'origin',
'route',
'aut_num',
'as_block',
'as_net'
- );
+ ];
$sort_type = get_database_sort_type();
@@ -1073,7 +1074,7 @@ function() {
$i = 0;
if (cacti_sizeof($results)) {
foreach($results as $result) {
- $id = array();
+ $id = [];
foreach($rowid as $col) {
$id[$col] = $result[$col];
}
@@ -1155,7 +1156,7 @@ function form_actions() {
/* setup some variables */
$dns_list = '';
- $dns_array = array();
+ $dns_array = [];
/* loop through each of the graphs selected on the previous page and get more info about them */
foreach ($_POST as $var => $val) {
@@ -1164,7 +1165,7 @@ function form_actions() {
input_validate_input_number($matches[1]);
/* ==================================================== */
- $dns_list .= '' . html_escape(flowview_db_fetch_cell_prepared('SELECT CONCAT(host, "(", ip, ")") AS name FROM plugin_flowview_dnscache WHERE id = ?', array($matches[1]))) . ' ';
+ $dns_list .= '' . html_escape(flowview_db_fetch_cell_prepared('SELECT CONCAT(host, "(", ip, ")") AS name FROM plugin_flowview_dnscache WHERE id = ?', [$matches[1]])) . ' ';
$dns_array[] = $matches[1];
}
}
@@ -1214,39 +1215,39 @@ function view_dns_cache() {
/* ================= input validation and session storage ================= */
$filters = array(
- 'rows' => array(
+ 'rows' => [
'filter' => FILTER_VALIDATE_INT,
'pageset' => true,
'default' => '-1'
- ),
- 'page' => array(
+ ],
+ 'page' => [
'filter' => FILTER_VALIDATE_INT,
'default' => '1'
- ),
- 'filter' => array(
+ ],
+ 'filter' => [
'filter' => FILTER_DEFAULT,
'pageset' => true,
'default' => ''
- ),
- 'source' => array(
+ ],
+ 'source' => [
'filter' => FILTER_DEFAULT,
'pageset' => true,
'default' => '-1'
- ),
- 'verified' => array(
+ ],
+ 'verified' => [
'filter' => FILTER_DEFAULT,
'pageset' => true,
'default' => '-1'
- ),
+ ],
'sort_column' => array(
'filter' => FILTER_CALLBACK,
'default' => 'host',
- 'options' => array('options' => 'sanitize_search_string')
+ 'options' => ['options' => 'sanitize_search_string']
),
'sort_direction' => array(
'filter' => FILTER_CALLBACK,
'default' => 'ASC',
- 'options' => array('options' => 'sanitize_search_string')
+ 'options' => ['options' => 'sanitize_search_string']
)
);
@@ -1511,38 +1512,38 @@ function view_routes($tab) {
/* ================= input validation and session storage ================= */
$filters = array(
- 'rows' => array(
+ 'rows' => [
'filter' => FILTER_VALIDATE_INT,
'pageset' => true,
'default' => '-1'
- ),
- 'page' => array(
+ ],
+ 'page' => [
'filter' => FILTER_VALIDATE_INT,
'default' => '1'
- ),
- 'filter' => array(
+ ],
+ 'filter' => [
'filter' => FILTER_DEFAULT,
'pageset' => true,
'default' => ''
- ),
- 'version' => array(
+ ],
+ 'version' => [
'filter' => FILTER_VALIDATE_INT,
'default' => '-1'
- ),
- 'source' => array(
+ ],
+ 'source' => [
'filter' => FILTER_DEFAULT,
'pageset' => true,
'default' => '-1'
- ),
+ ],
'sort_column' => array(
'filter' => FILTER_CALLBACK,
'default' => 'route',
- 'options' => array('options' => 'sanitize_search_string')
+ 'options' => ['options' => 'sanitize_search_string']
),
'sort_direction' => array(
'filter' => FILTER_CALLBACK,
'default' => 'ASC',
- 'options' => array('options' => 'sanitize_search_string')
+ 'options' => ['options' => 'sanitize_search_string']
)
);
@@ -1833,7 +1834,7 @@ function() {
if (cacti_sizeof($dns_cache)) {
foreach ($dns_cache as $l) {
- $id = array();
+ $id = [];
$rowid = array_keys($l);
foreach($rowid as $col) {
$id[$col] = $l[$col];
diff --git a/flowview_devices.php b/flowview_devices.php
index 31659e1..5c8e103 100644
--- a/flowview_devices.php
+++ b/flowview_devices.php
@@ -1,4 +1,5 @@
'|arg1:enabled|',
'default' => ''
),
- 'id' => array(
+ 'id' => [
'method' => 'hidden_zero',
'value' => '|arg1:id|'
- )
+ ]
);
switch (get_request_var('action')) {
@@ -141,7 +142,7 @@ function export_template() {
WHERE device_id = ?
AND template_id = ?
AND ex_addr = ?',
- array($device_id, $template_id, $ex_addr));
+ [$device_id, $template_id, $ex_addr]);
if ($data != '') {
$data = json_decode($data, true);
@@ -183,19 +184,19 @@ function actions_devices () {
if (get_nfilter_request_var('drp_action') == '1') {
foreach ($selected_items as $item) {
flowview_db_execute_prepared('DELETE FROM plugin_flowview_devices
- WHERE id = ?', array($item));
+ WHERE id = ?', [$item]);
}
} elseif (get_nfilter_request_var('drp_action') == '2') {
foreach ($selected_items as $item) {
flowview_db_execute_prepared('UPDATE plugin_flowview_devices
SET enabled = "on"
- WHERE id = ?', array($item));
+ WHERE id = ?', [$item]);
}
} elseif (get_nfilter_request_var('drp_action') == '3') {
foreach ($selected_items as $item) {
flowview_db_execute_prepared('UPDATE plugin_flowview_devices
SET enabled = ""
- WHERE id = ?', array($item));
+ WHERE id = ?', [$item]);
}
}
@@ -343,7 +344,7 @@ function edit_device() {
get_filter_request_var('id');
/* ==================================================== */
- $device = array();
+ $device = [];
if (!isempty_request_var('id')) {
$device = flowview_db_fetch_row('SELECT *
@@ -364,7 +365,7 @@ function edit_device() {
draw_edit_form(
array(
- 'config' => array('no_form_tag' => true),
+ 'config' => ['no_form_tag' => true],
'fields' => inject_form_variables($device_edit, $device)
)
);
@@ -385,7 +386,7 @@ function edit_device() {
USING (device_id, ex_addr)
WHERE ds.device_id = ?
GROUP BY ds.ex_addr',
- array($device['id'], $device['id']));
+ [$device['id'], $device['id']]);
html_start_box('Inbound Streams and Status', '100%', '', '4', 'center', '');
@@ -436,7 +437,7 @@ function edit_device() {
$enabled = flowview_db_fetch_cell_prepared('SELECT enabled
FROM plugin_flowview_devices
WHERE id = ?',
- array($device['id']));
+ [$device['id']]);
if ($enabled == 'on') {
$disabled = false;
@@ -466,7 +467,7 @@ function edit_device() {
$ex_addr = flowview_db_fetch_cell_prepared('SELECT ex_addr
FROM plugin_flowview_device_templates
WHERE device_id = ?
- LIMIT 1', array($device['id']));
+ LIMIT 1', [$device['id']]);
set_request_var('ex_addr', $ex_addr);
}
@@ -483,14 +484,14 @@ function edit_device() {
/* ================= input validation and session storage ================= */
$filters = array(
- 'template' => array(
+ 'template' => [
'filter' => FILTER_VALIDATE_INT,
'default' => '-1'
- ),
+ ],
'ex_addr' => array(
'filter' => FILTER_CALLBACK,
'default' => '-1',
- 'options' => array('options' => 'sanitize_search_string')
+ 'options' => ['options' => 'sanitize_search_string']
)
);
@@ -519,7 +520,7 @@ function edit_device() {
$addrs = flowview_db_fetch_assoc_prepared('SELECT DISTINCT ex_addr
FROM plugin_flowview_device_templates
WHERE device_id = ?',
- array($device['id']));
+ [$device['id']]);
html_start_box(__('Listener Detected Templates', 'flowview'), '100%', '', '4', 'center', '');
@@ -712,24 +713,24 @@ function show_devices () {
/* ================= input validation and session storage ================= */
$filters = array(
- 'page' => array(
+ 'page' => [
'filter' => FILTER_VALIDATE_INT,
'default' => '1'
- ),
- 'filter' => array(
+ ],
+ 'filter' => [
'filter' => FILTER_DEFAULT,
'pageset' => true,
'default' => ''
- ),
+ ],
'sort_column' => array(
'filter' => FILTER_CALLBACK,
'default' => 'name',
- 'options' => array('options' => 'sanitize_search_string')
+ 'options' => ['options' => 'sanitize_search_string']
),
'sort_direction' => array(
'filter' => FILTER_CALLBACK,
'default' => 'ASC',
- 'options' => array('options' => 'sanitize_search_string')
+ 'options' => ['options' => 'sanitize_search_string']
)
);
diff --git a/flowview_filters.php b/flowview_filters.php
index ce9e6ec..c397e0d 100644
--- a/flowview_filters.php
+++ b/flowview_filters.php
@@ -1,4 +1,5 @@
' . flowview_db_fetch_cell_prepared('SELECT name FROM plugin_flowview_queries
- WHERE id = ?', array($matches[1])) . '';
+ WHERE id = ?', [$matches[1]]) . '';
$filter_array[] = $matches[1];
}
}
@@ -180,29 +181,29 @@ function show_filters() {
/* ================= input validation and session storage ================= */
$filters = array(
- 'rows' => array(
+ 'rows' => [
'filter' => FILTER_VALIDATE_INT,
'pageset' => true,
'default' => '-1'
- ),
- 'page' => array(
+ ],
+ 'page' => [
'filter' => FILTER_VALIDATE_INT,
'default' => '1'
- ),
- 'filter' => array(
+ ],
+ 'filter' => [
'filter' => FILTER_DEFAULT,
'pageset' => true,
'default' => ''
- ),
+ ],
'sort_column' => array(
'filter' => FILTER_CALLBACK,
'default' => 'fq.name',
- 'options' => array('options' => 'sanitize_search_string')
+ 'options' => ['options' => 'sanitize_search_string']
),
'sort_direction' => array(
'filter' => FILTER_CALLBACK,
'default' => 'ASC',
- 'options' => array('options' => 'sanitize_search_string')
+ 'options' => ['options' => 'sanitize_search_string']
)
);
diff --git a/flowview_process.php b/flowview_process.php
index 7cd38a4..6b50a3f 100644
--- a/flowview_process.php
+++ b/flowview_process.php
@@ -38,12 +38,12 @@
$maint = false;
$shortopts = 'VvHh';
-$longopts = array(
+$longopts = [
'maint',
'debug',
'version',
'help',
-);
+];
$options = getopt($shortopts, $longopts);
@@ -75,7 +75,7 @@
}
}
-$templates = array();
+$templates = [];
$t = time();
$r = intval($t / 60) * 60;
@@ -122,7 +122,7 @@
$source = 'flowview';
$source_id = $s['id'];
- $notification = array();
+ $notification = [];
if ($s['email'] != '') {
$notification['email']['to_email'] = $s['email'];
@@ -162,7 +162,7 @@
$data = flowview_db_fetch_row_prepared("SELECT COUNT(*) AS totals, MAX(sequence) AS sequence
FROM $table
WHERE sequence > ?",
- array($last_sequence));
+ [$last_sequence]);
$nlast_table = $table;
} else {
@@ -271,7 +271,7 @@
WHERE md5sum = ?
AND map_table = ?
AND map_partition = ?',
- array($entry['md5sum'], $entry['map_table'], $entry['map_partition']));
+ [$entry['md5sum'], $entry['map_table'], $entry['map_partition']]);
$dropped++;
}
@@ -284,7 +284,7 @@
db_execute_prepared('DELETE FROM reports_log
WHERE send_time < FROM_UNIXTIME(UNIX_TIMESTAMP() - (? * 86400))
AND source = "flowview"',
- array($retention_days));
+ [$retention_days]);
/* download a fresh copy of the radb.db.gz and load it */
if (read_config_option('flowview_download_irr') == 'on') {
diff --git a/flowview_runner.php b/flowview_runner.php
index 49b48b3..297b9df 100644
--- a/flowview_runner.php
+++ b/flowview_runner.php
@@ -183,7 +183,7 @@ function flowview_launch_workers($query_id, $threads, $running) {
FROM parallel_database_query_shard
WHERE query_id = ?
AND status = ?',
- array($query_id, 'pending'));
+ [$query_id, 'pending']);
$redirect = '';
@@ -196,14 +196,14 @@ function flowview_launch_workers($query_id, $threads, $running) {
WHERE query_id = ?
AND status = ?
LIMIT 1',
- array($query_id, 'pending'));
+ [$query_id, 'pending']);
if ($shard_id >= 0 && $shard_id != '') {
flowview_db_execute_prepared('UPDATE parallel_database_query_shard
SET status = ?
WHERE query_id = ?
AND shard_id = ?',
- array('running', $query_id, $shard_id));
+ ['running', $query_id, $shard_id]);
db_debug('Launching FlowView Database Shard Process ' . $shard_id);
diff --git a/flowview_schedules.php b/flowview_schedules.php
index 5609c19..9e0ac09 100644
--- a/flowview_schedules.php
+++ b/flowview_schedules.php
@@ -1,4 +1,5 @@
$notification_lists,
'value' => '|arg1:notification_list|'
),
- 'id' => array(
+ 'id' => [
'method' => 'hidden_zero',
'value' => '|arg1:id|'
- ),
+ ],
);
switch (get_request_var('action')) {
@@ -223,21 +224,21 @@ function actions_schedules() {
if (get_nfilter_request_var('drp_action') == '1') {
foreach($selected_items as $item) {
flowview_db_execute_prepared('DELETE FROM plugin_flowview_schedules
- WHERE id = ?', array($item));
+ WHERE id = ?', [$item]);
}
} elseif (get_nfilter_request_var('drp_action') == '3') {
foreach($selected_items as $item) {
flowview_db_execute_prepared('UPDATE plugin_flowview_schedules
SET enabled = ""
WHERE id = ?',
- array($item));
+ [$item]);
}
} elseif (get_nfilter_request_var('drp_action') == '4') {
foreach($selected_items as $item) {
flowview_db_execute_prepared('UPDATE plugin_flowview_schedules
SET enabled = "on"
WHERE id = ?',
- array($item));
+ [$item]);
}
} elseif (get_nfilter_request_var('drp_action') == '2') {
$php = read_config_option('path_php_binary');
@@ -246,11 +247,11 @@ function actions_schedules() {
$report = flowview_db_fetch_row_prepared('SELECT *
FROM plugin_flowview_schedules
WHERE id = ?',
- array($item));
+ [$item]);
$command = "$php {$config['base_path']}/plugins/flowview/run_schedule.php";
- $notification = array();
+ $notification = [];
if ($report['email'] != '') {
$notification['email']['to_email'] = $report['email'];
@@ -284,7 +285,7 @@ function actions_schedules() {
$schedule_list .= '' . flowview_db_fetch_cell_prepared('SELECT name FROM plugin_flowview_queries AS pfq
INNER JOIN plugin_flowview_schedules AS pfs
ON pfq.id=pfs.query_id
- WHERE pfs.id = ?', array($matches[1])) . ' ';
+ WHERE pfs.id = ?', [$matches[1]]) . '';
$schedule_array[] = $matches[1];
}
}
@@ -353,7 +354,7 @@ function view_log_data() {
$id = get_filter_request_var('id');
$type = get_nfilter_request_var('type');
- $log_data = db_fetch_row_prepared('SELECT * FROM reports_log WHERE id = ?', array($id));
+ $log_data = db_fetch_row_prepared('SELECT * FROM reports_log WHERE id = ?', [$id]);
if (cacti_sizeof($log_data)) {
$data = json_decode($log_data['report_raw_data'], true);
@@ -376,7 +377,7 @@ function view_log_data() {
function download_log_data() {
$id = get_filter_request_var('id');
- $log_data = db_fetch_row_prepared('SELECT * FROM reports_log WHERE id = ?', array($id));
+ $log_data = db_fetch_row_prepared('SELECT * FROM reports_log WHERE id = ?', [$id]);
if (cacti_sizeof($log_data)) {
$data = json_decode($log_data['report_raw_data'], true);
@@ -476,7 +477,7 @@ function edit_schedule() {
display_sched_tabs();
- $report = array();
+ $report = [];
if (!isempty_request_var('id')) {
$report = flowview_db_fetch_row_prepared('SELECT pfs.*, pfq.name
FROM plugin_flowview_schedules AS pfs
@@ -492,7 +493,7 @@ function edit_schedule() {
}
} else {
$header_label = __('Scheduled Report: [new]', 'flowview');
- $report = array();
+ $report = [];
}
if (!isset_request_var('tab') || get_nfilter_request_var('tab') == 'general') {
@@ -507,29 +508,29 @@ function edit_log($header_label, $report) {
/* ================= input validation and session storage ================= */
$filters = array(
- 'rows' => array(
+ 'rows' => [
'filter' => FILTER_VALIDATE_INT,
'pageset' => true,
'default' => '-1'
- ),
- 'page' => array(
+ ],
+ 'page' => [
'filter' => FILTER_VALIDATE_INT,
'default' => '1'
- ),
- 'filter' => array(
+ ],
+ 'filter' => [
'filter' => FILTER_DEFAULT,
'pageset' => true,
'default' => ''
- ),
+ ],
'sort_column' => array(
'filter' => FILTER_CALLBACK,
'default' => 'send_time',
- 'options' => array('options' => 'sanitize_search_string')
+ 'options' => ['options' => 'sanitize_search_string']
),
'sort_direction' => array(
'filter' => FILTER_CALLBACK,
'default' => 'DESC',
- 'options' => array('options' => 'sanitize_search_string')
+ 'options' => ['options' => 'sanitize_search_string']
)
);
@@ -614,7 +615,7 @@ function clearFilter() {
array('no_form_tag' => true),
+ 'config' => ['no_form_tag' => true],
'fields' => inject_form_variables($schedule_edit, $report)
)
);
@@ -797,29 +798,29 @@ function show_schedules() {
/* ================= input validation and session storage ================= */
$filters = array(
- 'rows' => array(
+ 'rows' => [
'filter' => FILTER_VALIDATE_INT,
'pageset' => true,
'default' => '-1'
- ),
- 'page' => array(
+ ],
+ 'page' => [
'filter' => FILTER_VALIDATE_INT,
'default' => '1'
- ),
- 'filter' => array(
+ ],
+ 'filter' => [
'filter' => FILTER_DEFAULT,
'pageset' => true,
'default' => ''
- ),
+ ],
'sort_column' => array(
'filter' => FILTER_CALLBACK,
'default' => 'title',
- 'options' => array('options' => 'sanitize_search_string')
+ 'options' => ['options' => 'sanitize_search_string']
),
'sort_direction' => array(
'filter' => FILTER_CALLBACK,
'default' => 'ASC',
- 'options' => array('options' => 'sanitize_search_string')
+ 'options' => ['options' => 'sanitize_search_string']
)
);
diff --git a/flowview_upgrade.php b/flowview_upgrade.php
index f3a437e..520d24d 100644
--- a/flowview_upgrade.php
+++ b/flowview_upgrade.php
@@ -118,13 +118,13 @@ function flowview_upgrade($current, $old) {
db_execute_prepared("UPDATE plugin_config SET
version = ?, name = ?, author = ?, webpage = ?
WHERE directory = ?",
- array(
+ [
$info['version'],
$info['longname'],
$info['author'],
$info['homepage'],
$info['name']
- )
+ ]
);
}
@@ -340,7 +340,7 @@ function flowview_upgrade($current, $old) {
flowview_db_execute("UPDATE plugin_flowview_schedules SET title='Ugraded Schedule' WHERE title=''");
/* Set the new version */
- db_execute_prepared("REPLACE INTO settings (name, value) VALUES ('plugin_flowview_version', ?)", array($current));
+ db_execute_prepared("REPLACE INTO settings (name, value) VALUES ('plugin_flowview_version', ?)", [$current]);
flowview_db_execute('ALTER TABLE plugin_flowview_devices ENGINE=InnoDB');
}
@@ -547,7 +547,7 @@ function flowview_upgrade($current, $old) {
$columns = array_rekey(
flowview_db_fetch_assoc('SHOW COLUMNS FROM ' . $t['TABLE_NAME']),
- 'Field', array('Type', 'Null', 'Key', 'Default', 'Extra')
+ 'Field', ['Type', 'Null', 'Key', 'Default', 'Extra']
);
if (isset($columns['ex_addr']) && stripos($columns['ex_addr']['Type'], 'VARCHAR') === false) {
diff --git a/functions-pre13.php b/functions-pre13.php
index e68be45..f2fd53d 100644
--- a/functions-pre13.php
+++ b/functions-pre13.php
@@ -1,4 +1,5 @@
0 ? true:false;
}
@@ -189,7 +190,7 @@ function edit_filter() {
$page = 'flowview_filters.php';
}
- $report = array();
+ $report = [];
if (!isempty_request_var('id')) {
$report = flowview_db_fetch_row_prepared('SELECT *
FROM plugin_flowview_queries
@@ -236,15 +237,15 @@ function edit_filter() {
get_timespan($span, time(), get_request_var('predefined_timespan'), read_user_setting('first_weekdayid'));
- $filter_edit['date1'] = array(
+ $filter_edit['date1'] = [
'value' => $span['current_value_date1'],
'method' => 'hidden'
- );
+ ];
- $filter_edit['date2'] = array(
+ $filter_edit['date2'] = [
'value' => $span['current_value_date2'],
'method' => 'hidden'
- );
+ ];
if ($found) {
if (cacti_sizeof($report)) {
@@ -269,7 +270,7 @@ function edit_filter() {
draw_edit_form(
array(
- 'config' => array('no_form_tag' => true),
+ 'config' => ['no_form_tag' => true],
'fields' => inject_form_variables($filter_edit, $report)
)
);
@@ -590,7 +591,7 @@ function flowview_gettimespan() {
$timespan = get_filter_request_var('predefined_timespan');
$date1 = get_nfilter_request_var('date1');
$date2 = get_nfilter_request_var('date2');
- $span = array();
+ $span = [];
if ($timespan > 0) {
get_timespan($span, time(), $timespan, read_user_setting('first_weekdayid'));
@@ -731,7 +732,7 @@ function flowview_display_filter() {
0) {
$reports[0] = __('Select a Report', 'flowview');
@@ -839,7 +840,7 @@ function flowview_display_filter() {
>
>
" . __('Top %d Samples', $s, 'flowview') . '';
@@ -1790,7 +1791,7 @@ function get_port_name($port_num, $port_proto = 6) {
FROM plugin_flowview_ports
WHERE port = ?
AND proto = ?',
- array($port_num, $port_proto));
+ [$port_num, $port_proto]);
if ($port_name != '') {
return sprintf('%s (%s)', $port_name, $port_num, 'flowview');
@@ -1808,12 +1809,12 @@ function plugin_flowview_run_schedule($id, $report_id) {
$schedule = flowview_db_fetch_row_prepared('SELECT *
FROM plugin_flowview_schedules
WHERE id = ?',
- array($id));
+ [$id]);
$query = flowview_db_fetch_row_prepared('SELECT *
FROM plugin_flowview_queries
WHERE id = ?',
- array($schedule['query_id']));
+ [$schedule['query_id']]);
/* get the timespan from the query */
get_timespan($span, time(), $query['timespan'], read_user_setting('first_weekdayid'));
@@ -1874,7 +1875,7 @@ function plugin_flowview_run_schedule($id, $report_id) {
$headers['X-Priority'] = '1';
if (cacti_sizeof($data['data'])) {
- reports_log_and_notify($report_id, $start_time, 'html', 'flowview', $id, $subject, $data['data'], $body, $body_html, $body_text, array(), $headers);
+ reports_log_and_notify($report_id, $start_time, 'html', 'flowview', $id, $subject, $data['data'], $body, $body_html, $body_text, [], $headers);
} else {
cacti_log(sprintf('WARNING: Running of Flowview Schedule %s Returned not Data. Please Check your Flowview Schedule', $report_id), false, 'FLOWVIEW');
}
@@ -1947,7 +1948,7 @@ function load_data_for_filter($id = 0, $start = false, $end = false) {
$output = '';
$title = '';
$time = time();
- $data = array();
+ $data = [];
/* override for graph drilldowns */
if (isset_request_var('timespan') && get_nfilter_request_var('timespan') == 'session') {
@@ -1966,9 +1967,9 @@ function load_data_for_filter($id = 0, $start = false, $end = false) {
$timespan = flowview_db_fetch_cell_prepared('SELECT timespan
FROM plugin_flowview_queries
WHERE id = ?',
- array($id));
+ [$id]);
- $span = array();
+ $span = [];
get_timespan($span, time(), $timespan, read_user_setting('first_weekdayid'));
$start = strtotime($span['current_value_date1']);
@@ -1981,9 +1982,9 @@ function load_data_for_filter($id = 0, $start = false, $end = false) {
$timespan = flowview_db_fetch_cell_prepared('SELECT timespan
FROM plugin_flowview_queries
WHERE id = ?',
- array($id));
+ [$id]);
- $span = array();
+ $span = [];
get_timespan($span, time(), $timespan, read_user_setting('first_weekdayid'));
set_request_var('date1', $span['current_value_date1']);
set_request_var('date2', $span['current_value_date2']);
@@ -2022,7 +2023,7 @@ function load_data_for_filter($id = 0, $start = false, $end = false) {
*
*/
function get_numeric_filter($sql_where, &$sql_params, $value, $column) {
- $values = array();
+ $values = [];
$sql_where = trim($sql_where);
@@ -2067,7 +2068,7 @@ function get_ip_filter($sql_where, &$sql_params, $value, $column) {
$sql_where = trim($sql_where);
if ($value != '') {
- $values = array();
+ $values = [];
$parts = explode(',', $value);
$i = 0;
@@ -2205,7 +2206,7 @@ function get_tables_for_query($start, $end = null) {
include($config['base_path'] . '/plugins/flowview/arrays.php');
$part_type = read_config_option('flowview_partition');
- $inc_tables = array();
+ $inc_tables = [];
if ($end === null) {
$end = time();
@@ -2284,7 +2285,7 @@ function flowview_get_chartdata() {
foreach($category as $c) {
if ($domains != 'false' && strpos($c, 'domain') !== false) {
- $p = array();
+ $p = [];
if (isset($row[$c])) {
if ($row[$c] != '') {
@@ -2334,23 +2335,23 @@ function flowview_get_chartdata() {
$catstring = __('unresolved', 'flowview');
}
- $chartData[] = array(
+ $chartData[] = [
'name' => $catstring,
'value' => $row[$type],
'index' => $index
- );
+ ];
}
- $outputData = array(
+ $outputData = [
$chartData,
- );
+ ];
print json_encode($chartData, JSON_NUMERIC_CHECK);
exit;
}
}
- print json_encode(array());
+ print json_encode([]);
exit;
}
@@ -2364,90 +2365,90 @@ function flowview_get_chartdata() {
* @return array The columns
*/
function get_category_columns($statistics, $domain) {
- $category = array();
+ $category = [];
if ($statistics > 0) {
switch($statistics) {
case 99:
break;
case 2:
- $category = array('src_rdomain');
+ $category = ['src_rdomain'];
break;
case 3:
- $category = array('dst_rdomain');
+ $category = ['dst_rdomain'];
break;
case 4:
- $category = array('src_rdomain', 'dst_rdomain');
+ $category = ['src_rdomain', 'dst_rdomain'];
break;
case 5:
- $category = array('dst_port');
+ $category = ['dst_port'];
break;
case 6:
- $category = array('src_port');
+ $category = ['src_port'];
break;
case 7:
- $category = array('src_port', 'dst_port');
+ $category = ['src_port', 'dst_port'];
break;
case 8:
if ($domain == 'false') {
- $category = array('src_addr', 'dst_addr');
+ $category = ['src_addr', 'dst_addr'];
} else {
- $category = array('src_domain', 'dst_domain');
+ $category = ['src_domain', 'dst_domain'];
}
break;
case 9:
if ($domain == 'false') {
- $category = array('src_addr');
+ $category = ['src_addr'];
} else {
- $category = array('src_domain');
+ $category = ['src_domain'];
}
break;
case 10:
if ($domain == 'false') {
- $category = array('src_addr', 'dst_addr');
+ $category = ['src_addr', 'dst_addr'];
} else {
- $category = array('src_domain', 'dst_domain');
+ $category = ['src_domain', 'dst_domain'];
}
break;
case 11:
if ($domain == 'false') {
- $category = array('src_addr');
+ $category = ['src_addr'];
} else {
- $category = array('src_rdomain');
+ $category = ['src_rdomain'];
}
break;
case 12:
- $category = array('protocol');
+ $category = ['protocol'];
break;
case 17:
- $category = array('src_if');
+ $category = ['src_if'];
break;
case 18:
- $category = array('dst_if');
+ $category = ['dst_if'];
break;
case 23:
- $category = array('src_if', 'dst_if');
+ $category = ['src_if', 'dst_if'];
break;
case 19:
- $category = array('src_as');
+ $category = ['src_as'];
break;
case 20:
- $category = array('dst_as');
+ $category = ['dst_as'];
break;
case 21:
- $category = array('src_as', 'dst_as');
+ $category = ['src_as', 'dst_as'];
break;
case 22:
- $category = array('tos');
+ $category = ['tos'];
break;
case 24:
- $category = array('src_prefix');
+ $category = ['src_prefix'];
break;
case 25:
- $category = array('dst_prefix');
+ $category = ['dst_prefix'];
break;
case 26:
- $category = array('src_prefix', 'dst_prefix');
+ $category = ['src_prefix', 'dst_prefix'];
break;
}
}
@@ -2486,9 +2487,9 @@ function run_flow_query($session, $query_id, $start, $end) {
$time = time();
$sql_where = '';
- $sql_params = array();
+ $sql_params = [];
$sql_range = '';
- $sql_range_params = array();
+ $sql_range_params = [];
$key = get_flowview_session_key($query_id, $start, $end);
if ($session && isset($_SESSION['sess_flowdata'][$key])) {
@@ -2503,12 +2504,12 @@ function run_flow_query($session, $query_id, $start, $end) {
$data = flowview_db_fetch_row_prepared('SELECT *
FROM plugin_flowview_queries
WHERE id = ?',
- array($query_id));
+ [$query_id]);
$title = flowview_db_fetch_cell_prepared('SELECT name
FROM plugin_flowview_queries
WHERE id = ?',
- array($query_id));
+ [$query_id]);
/*-------------------------------------------------------------*/
/* Overrides - These variables can be overridden by the user */
@@ -3092,27 +3093,27 @@ function run_flow_query($session, $query_id, $start, $end) {
/* clean up sql formatting */
if (isset($sql_inner)) {
- $sql_outer = str_replace(array("\n", "\t"), array(' ', ''), $sql_outer);
- $sql_inner = str_replace(array("\n", "\t"), array(' ', ''), $sql_inner);
+ $sql_outer = str_replace(["\n", "\t"], [' ', ''], $sql_outer);
+ $sql_inner = str_replace(["\n", "\t"], [' ', ''], $sql_inner);
- $sql_groupby = str_replace(array("\n", "\t"), array(' ', ''), $sql_groupby);
- $sql_inner_groupby = str_replace(array("\n", "\t"), array(' ', ''), $sql_inner_groupby);
+ $sql_groupby = str_replace(["\n", "\t"], [' ', ''], $sql_groupby);
+ $sql_inner_groupby = str_replace(["\n", "\t"], [' ', ''], $sql_inner_groupby);
} else {
- $sql_outer = str_replace(array("\n", "\t"), array(' ', ''), $sql_outer);
- $sql_inner1 = str_replace(array("\n", "\t"), array(' ', ''), $sql_inner1);
- $sql_inner2 = str_replace(array("\n", "\t"), array(' ', ''), $sql_inner2);
+ $sql_outer = str_replace(["\n", "\t"], [' ', ''], $sql_outer);
+ $sql_inner1 = str_replace(["\n", "\t"], [' ', ''], $sql_inner1);
+ $sql_inner2 = str_replace(["\n", "\t"], [' ', ''], $sql_inner2);
- $sql_groupby = str_replace(array("\n", "\t"), array(' ', ''), $sql_groupby);
- $sql_inner_groupby1 = str_replace(array("\n", "\t"), array(' ', ''), $sql_inner_groupby1);
- $sql_inner_groupby2 = str_replace(array("\n", "\t"), array(' ', ''), $sql_inner_groupby2);
+ $sql_groupby = str_replace(["\n", "\t"], [' ', ''], $sql_groupby);
+ $sql_inner_groupby1 = str_replace(["\n", "\t"], [' ', ''], $sql_inner_groupby1);
+ $sql_inner_groupby2 = str_replace(["\n", "\t"], [' ', ''], $sql_inner_groupby2);
}
$tables = get_tables_for_query($start, $end);
$sql = '';
- $all_params = array();
- $results = array();
+ $all_params = [];
+ $results = [];
$threads = read_config_option('flowview_parallel_threads');
- $requests = array();
+ $requests = [];
if (cacti_sizeof($tables)) {
if (empty($threads) || $threads == 1) {
@@ -3120,7 +3121,7 @@ function run_flow_query($session, $query_id, $start, $end) {
$start_time = strtotime($details['min_date']);
$end_time = strtotime($details['max_date']);
$fsql_where = '';
- $fsql_params = array();
+ $fsql_params = [];
if ($start < $start_time && $end > $end_time) {
$full_scan = true;
@@ -3165,7 +3166,7 @@ function run_flow_query($session, $query_id, $start, $end) {
cacti_log(sprintf('PARALLEL STATS: Time:%0.3f Threads:%d Shards:%d', $end - $start, $threads, $shards), false, 'FLOWVIEW');
} else {
if (isset($sql_inner1)) {
- $stru_inner1 = array(
+ $stru_inner1 = [
'sql_query' => $sql_inner1,
'sql_where' => $sql_where,
'sql_range' => $sql_range,
@@ -3177,9 +3178,9 @@ function run_flow_query($session, $query_id, $start, $end) {
'sql_range_params' => $sql_range_params,
'sql_start_time' => $start,
'sql_end_time' => $end
- );
+ ];
- $stru_inner2 = array(
+ $stru_inner2 = [
'sql_query' => $sql_inner2,
'sql_where' => $sql_where,
'sql_range' => $sql_range,
@@ -3191,17 +3192,17 @@ function run_flow_query($session, $query_id, $start, $end) {
'sql_range_params' => $sql_range_params,
'sql_start_time' => $start,
'sql_end_time' => $end
- );
+ ];
- $stru_outer = array(
+ $stru_outer = [
'sql_query' => $sql_outer,
'sql_where' => '',
'sql_groupby' => $sql_groupby,
'sql_having' => $sql_having,
'sql_order' => $sql_order,
'sql_limit' => $sql_limit,
- 'sql_params' => array()
- );
+ 'sql_params' => []
+ ];
if ($request_type == 'printed') {
$stru_inner1['sql_limit'] = 'LIMIT 100';
@@ -3213,7 +3214,7 @@ function run_flow_query($session, $query_id, $start, $end) {
$requests[] = parallel_database_query_request($tables, $stru_inner1, $stru_outer);
$requests[] = parallel_database_query_request($tables, $stru_inner2, $stru_outer);
} else {
- $stru_inner = array(
+ $stru_inner = [
'sql_query' => $sql_inner,
'sql_where' => $sql_where,
'sql_range' => $sql_range,
@@ -3225,22 +3226,22 @@ function run_flow_query($session, $query_id, $start, $end) {
'sql_range_params' => $sql_range_params,
'sql_start_time' => $start,
'sql_end_time' => $end
- );
+ ];
if ($request_type == 'printed') {
$stru_inner['sql_limit'] = 'LIMIT 100';
$stru_inner['sql_order'] = $sql_order;
}
- $stru_outer = array(
+ $stru_outer = [
'sql_query' => $sql_outer,
'sql_where' => '',
'sql_having' => $sql_having,
'sql_groupby' => $sql_groupby,
'sql_order' => $sql_order,
'sql_limit' => $sql_limit,
- 'sql_params' => array()
- );
+ 'sql_params' => []
+ ];
$requests[] = parallel_database_query_request($tables, $stru_inner, $stru_outer);
}
@@ -3603,12 +3604,12 @@ function flowview_convert_yeardayhour_to_date($range, $year, $day, $hour = 0) {
$start_time = strtotime($start_date);
$end_time = strtotime($end_date);
- return array(
+ return [
'start_date' => $start_date,
'start_time' => $start_time,
'end_date' => $end_date,
'end_time' => $end_time
- );
+ ];
}
/**
* parallel_database_query_request - Given a series of tables and
@@ -3653,7 +3654,7 @@ function flowview_convert_yeardayhour_to_date($range, $year, $day, $hour = 0) {
* 'sql_groupby' => $sql_groupby,
* 'sql_order' => $sql_order,
* 'sql_limit' => $sql_limit,
- * 'sql_params' => array()
+ * 'sql_params' => []
*
* @param array An array of tables to use for the map query
* @param array An array of map query parameters
@@ -3662,7 +3663,7 @@ function flowview_convert_yeardayhour_to_date($range, $year, $day, $hour = 0) {
* @return int A request id that will be used in the run phase
*/
function parallel_database_query_request($tables, $stru_inner, $stru_outer) {
- $save = array();
+ $save = [];
if (isset($_SESSION['sess_user_id'])) {
$user_id = $_SESSION['sess_user_id'];
@@ -3684,7 +3685,7 @@ function parallel_database_query_request($tables, $stru_inner, $stru_outer) {
$map_query = $stru_inner;
$sql_start_time = $stru_inner['sql_start_time'];
$sql_end_time = $stru_inner['sql_end_time'];
- $md5_array = array($stru_inner, $stru_outer);
+ $md5_array = [$stru_inner, $stru_outer];
$query_md5 = md5(json_encode($md5_array));
unset($map_query['sql_range']);
@@ -3706,7 +3707,7 @@ function parallel_database_query_request($tables, $stru_inner, $stru_outer) {
FROM parallel_database_query
WHERE md5sum = ?
AND user_id = ?',
- array($query_md5, $user_id));
+ [$query_md5, $user_id]);
$time_to_live = read_config_option('flowview_parallel_time_to_live');
@@ -3740,7 +3741,7 @@ function parallel_database_query_request($tables, $stru_inner, $stru_outer) {
flowview_db_execute_prepared('UPDATE parallel_database_query
SET map_table = ?
WHERE id = ?',
- array($table_name, $request_id));
+ [$table_name, $request_id]);
$start = $sql_start_time;
$end = $sql_end_time;
@@ -3760,7 +3761,7 @@ function parallel_database_query_request($tables, $stru_inner, $stru_outer) {
}
$fsql_where = '';
- $fsql_params = array();
+ $fsql_params = [];
if ($start < $start_time && $end > $end_time) {
$full_scan = true;
@@ -3815,7 +3816,7 @@ function parallel_database_query_is_running($request_id) {
FROM parallel_database_query
WHERE id = ?
AND status != ?',
- array($request_id, 'complete'));
+ [$request_id, 'complete']);
if ($status != 0) {
return true;
@@ -3847,14 +3848,14 @@ function parallel_database_query_run($requests) {
FROM parallel_database_query
WHERE id = ?
AND status = ?',
- array($request_id, 'pending'));
+ [$request_id, 'pending']);
if ($pending > 0) {
/* prime the table to prevent multiple runs */
flowview_db_execute_prepared('UPDATE parallel_database_query
SET status = ?
WHERE id = ?',
- array('scheduled', $request_id));
+ ['scheduled', $request_id]);
db_debug('Launching FlowView Database Query Process ' . $request_id);
@@ -3900,18 +3901,18 @@ function parallel_database_query_run($requests) {
$results = json_decode(flowview_db_fetch_cell_prepared('SELECT results
FROM parallel_database_query
WHERE id = ?',
- array($request_id)), true);
+ [$request_id]), true);
} else {
$reduce_query = flowview_db_fetch_cell_prepared('SELECT reduce_query
FROM parallel_database_query
WHERE id = ?',
- array($requests[0]));
+ [$requests[0]]);
$tables = array_rekey(
flowview_db_fetch_assoc('SELECT map_table, map_create, results
FROM parallel_database_query
WHERE id IN(' . implode(', ', $requests) . ')'),
- 'map_table', array('map_create', 'results')
+ 'map_table', ['map_create', 'results']
);
if ($reduce_query != '' && cacti_sizeof($tables)) {
@@ -3929,7 +3930,7 @@ function parallel_database_query_run($requests) {
$results = json_decode($data['results'], true);
if (cacti_sizeof($results)) {
- $sql = array();
+ $sql = [];
$columns = array_keys($results[0]);
$sql_prefix = "INSERT INTO $temp_table (";
@@ -3980,7 +3981,7 @@ function parallel_database_query_run($requests) {
flowview_db_execute("DROP TEMPORARY TABLE IF EXISTS $temp_table");
} else {
- $results = array();
+ $results = [];
}
}
@@ -4019,15 +4020,15 @@ function parallel_database_query_create_reduce_table($request_id, $sql_query, $t
$table_name = "parallel_database_query_map_$request_id";
$sql_create = "CREATE TABLE IF NOT EXISTS $table_name (";
- $sql_query = str_replace(array("\n", "\t"), array(' ', ''), $sql_query);
+ $sql_query = str_replace(["\n", "\t"], [' ', ''], $sql_query);
/* get the columns from the base table */
$columns = array_rekey(
flowview_db_fetch_assoc_prepared('SELECT *
FROM INFORMATION_SCHEMA.COLUMNS
WHERE table_name = ?',
- array($table)),
- 'COLUMN_NAME', array('DATA_TYPE', 'COLUMN_TYPE', 'IS_NULLABLE', 'COLUMN_DEFAULT')
+ [$table]),
+ 'COLUMN_NAME', ['DATA_TYPE', 'COLUMN_TYPE', 'IS_NULLABLE', 'COLUMN_DEFAULT']
);
$raw_engine = get_set_default_fast_engine();
@@ -4081,7 +4082,7 @@ function parallel_database_query_create_reduce_table($request_id, $sql_query, $t
flowview_db_execute_prepared('UPDATE parallel_database_query
SET map_create = ?
WHERE id = ?',
- array($sql_create, $request_id));
+ [$sql_create, $request_id]);
return $table_name;
}
@@ -4096,7 +4097,7 @@ function parallel_database_query_expire() {
$expired_queries = flowview_db_fetch_assoc_prepared('SELECT id
FROM parallel_database_query
- WHERE UNIX_TIMESTAMP()-? > time_to_live', array($ttl));
+ WHERE UNIX_TIMESTAMP()-? > time_to_live', [$ttl]);
if (cacti_sizeof($expired_queries)) {
foreach($expired_queries as $q) {
@@ -4112,7 +4113,7 @@ function parallel_database_query_cleanup($request_id, $remove = false) {
$table = flowview_db_fetch_cell_prepared('SELECT map_table
FROM parallel_database_query
WHERE id = ?',
- array($request_id));
+ [$request_id]);
if ($table != '') {
flowview_db_execute_prepared("DROP TABLE IF EXISTS $table");
@@ -4121,16 +4122,16 @@ function parallel_database_query_cleanup($request_id, $remove = false) {
$shards = flowview_db_fetch_assoc_prepared('SELECT *
FROM parallel_database_query_shard
WHERE query_id = ?',
- array($request_id));
+ [$request_id]);
flowview_db_execute_prepared('DELETE FROM parallel_database_query_shard
WHERE query_id = ?',
- array($request_id));
+ [$request_id]);
$processes = db_fetch_assoc_prepared('SELECT *
FROM processes WHERE tasktype = ?
AND taskname LIKE ?',
- array('flowview', "db_query{$request_id}"));
+ ['flowview', "db_query{$request_id}"]);
if (cacti_sizeof($processes)) {
foreach($processes as $p) {
@@ -4140,14 +4141,14 @@ function parallel_database_query_cleanup($request_id, $remove = false) {
db_execute_prepared('DELETE FROM processes
WHERE pid = ?',
- array($p['pid']));
+ [$p['pid']]);
}
}
if ($remove) {
flowview_db_execute_prepared('DELETE FROM parallel_database_query
WHERE id = ?',
- array($request_id));
+ [$request_id]);
}
}
@@ -4157,7 +4158,7 @@ function parallel_database_query_cancel($query_id) {
WHERE tasktype = ?
AND taskname LIKE ?
OR taskname LIKE ?',
- array('flowview', 'db_query_' . $query_id, 'db_shard_' . $query_id));
+ ['flowview', 'db_query_' . $query_id, 'db_shard_' . $query_id]);
if (cacti_sizeof($processes)) {
foreach($processes as $p) {
@@ -4165,7 +4166,7 @@ function parallel_database_query_cancel($query_id) {
posix_kill($p['pid'], SIGKILL);
- db_execute_prepared('DELETE FROM processes WHERE id = ?', array($p['id']));
+ db_execute_prepared('DELETE FROM processes WHERE id = ?', [$p['id']]);
}
}
@@ -4173,7 +4174,7 @@ function parallel_database_query_cancel($query_id) {
flowview_db_execute_prepared("DROP TABLE IF EXISTS parallel_database_query_map_$query_id");
flowview_db_execute_prepared("DELETE FROM parallel_database_query_shard
WHERE query_id = ?",
- array($query_id));
+ [$query_id]);
}
function parallel_database_parent_runner($query_id) {
@@ -4186,7 +4187,7 @@ function parallel_database_parent_runner($query_id) {
$status = flowview_db_fetch_cell_prepared('SELECT status
FROM parallel_database_query
WHERE id = ?',
- array($query_id));
+ [$query_id]);
$max_runtime = read_config_option('flowview_parallel_runlimit');
@@ -4213,18 +4214,18 @@ function parallel_database_parent_runner($query_id) {
$query = flowview_db_fetch_row_prepared('SELECT *
FROM parallel_database_query
WHERE id = ?',
- array($query_id));
+ [$query_id]);
$shards = flowview_db_fetch_cell_prepared('SELECT COUNT(*)
FROM parallel_database_query_shard
WHERE query_id = ?',
- array($query_id));
+ [$query_id]);
$tables = array_rekey(
flowview_db_fetch_assoc_prepared('SELECT map_table
FROM parallel_database_query_shard
WHERE query_id = ?',
- array($query_id)),
+ [$query_id]),
'map_table', 'map_table'
);
@@ -4235,13 +4236,13 @@ function parallel_database_parent_runner($query_id) {
WHERE md5sum = ?
AND min_date BETWEEN ? AND ?
AND max_date BETWEEN ? AND ?',
- array(
+ [
$query['md5sum_tables'],
$map_range[0],
$map_range[1],
$map_range[0],
$map_range[1],
- )
+ ]
),
'map_table', 'map_table'
);
@@ -4268,13 +4269,13 @@ function parallel_database_parent_runner($query_id) {
$running = 0;
$start = microtime(true);
- $stats = array(
+ $stats = [
'threads' => 0,
'shards' => 0,
'cached' => 0,
'total_size' => 0,
'cached_size' => 0
- );
+ ];
if (cacti_sizeof($query)) {
$finished = $query['finished_shards'];
@@ -4286,7 +4287,7 @@ function parallel_database_parent_runner($query_id) {
FROM parallel_database_query_shard
WHERE query_id = ?
AND status = "running"',
- array($query_id));
+ [$query_id]);
flowview_launch_workers($query_id, $threads, $running);
@@ -4296,7 +4297,7 @@ function parallel_database_parent_runner($query_id) {
FROM parallel_database_query_shard
WHERE query_id = ?
AND status != "finished"',
- array($query_id));
+ [$query_id]);
if ($notfinished == 0) {
break;
@@ -4322,22 +4323,22 @@ function parallel_database_parent_runner($query_id) {
flowview_db_execute_prepared('DELETE FROM parallel_database_query_shard
WHERE query_id = ?',
- array($query_id));
+ [$query_id]);
$cached = flowview_db_fetch_cell_prepared('SELECT cached_shards
FROM parallel_database_query
WHERE id = ?',
- array($query_id));
+ [$query_id]);
db_debug("Query $query_id finished");
- $stats = array(
+ $stats = [
'threads' => $threads,
'shards' => $shards,
'cached' => $cached,
'total_size' => $total_size,
'cached_size' => $cached_size
- );
+ ];
}
return $stats;
@@ -4355,14 +4356,14 @@ function parallel_database_child_runner($query_id, $shard_id) {
$query = flowview_db_fetch_row_prepared('SELECT *
FROM parallel_database_query
WHERE id = ?',
- array($query_id), false, $max_cnn);
+ [$query_id], false, $max_cnn);
if (cacti_sizeof($query)) {
$shard = flowview_db_fetch_row_prepared('SELECT *
FROM parallel_database_query_shard
WHERE query_id = ?
AND shard_id = ?',
- array($query_id, $shard_id), false, $max_cnn);
+ [$query_id, $shard_id], false, $max_cnn);
if (cacti_sizeof($shard)) {
$table = $query['map_table'];
@@ -4371,7 +4372,7 @@ function parallel_database_child_runner($query_id, $shard_id) {
SET status = ?
WHERE query_id = ?
AND shard_id = ?',
- array('running', $query_id, $shard_id));
+ ['running', $query_id, $shard_id]);
if ($shard['full_scan']) {
$exists = flowview_db_fetch_row_prepared('SELECT *
@@ -4379,14 +4380,14 @@ function parallel_database_child_runner($query_id, $shard_id) {
WHERE md5sum = ?
AND map_table = ?
AND map_partition = ?',
- array(
+ [
$query['md5sum_tables'],
$shard['map_table'],
$shard['map_partition']
- )
+ ]
);
} else {
- $exists = array();
+ $exists = [];
}
if (!cacti_sizeof($exists)) {
@@ -4395,7 +4396,7 @@ function parallel_database_child_runner($query_id, $shard_id) {
flowview_db_execute_prepared('UPDATE parallel_database_query
SET cached_shards = cached_shards + 1
WHERE id = ?',
- array($query_id));
+ [$query_id]);
$results = json_decode($exists['results'], true);
}
@@ -4429,7 +4430,7 @@ function parallel_database_child_runner($query_id, $shard_id) {
}
if (cacti_sizeof($results)) {
- $sql = array();
+ $sql = [];
$columns = array_keys($results[0]);
$sql_prefix = "INSERT INTO $table (";
@@ -4458,7 +4459,7 @@ function parallel_database_child_runner($query_id, $shard_id) {
SET status = ?
WHERE query_id = ?
AND shard_id = ?',
- array('finished', $query_id, $shard_id));
+ ['finished', $query_id, $shard_id]);
} else {
db_debug("Shard $shard_id Not Found");
}
@@ -4470,7 +4471,7 @@ function parallel_database_child_runner($query_id, $shard_id) {
flowview_db_execute_prepared('UPDATE parallel_database_query
SET finished_shards = finished_shards + 1
- WHERE id = ?', array($query_id));
+ WHERE id = ?', [$query_id]);
db_debug("Query $query_id and Shard $shard_id Complete");
}
@@ -4492,7 +4493,7 @@ function display_domain($domain) {
}
function get_json_params() {
- $arr = array();
+ $arr = [];
foreach($_POST as $var => $val) {
switch($var) {
@@ -4752,7 +4753,7 @@ function parseSummaryReport($output) {
function flowview_explode($string) {
$string=trim($string);
- if (!strlen($string)) return array();
+ if (!strlen($string)) return [];
$array=explode(' ', $string);
foreach($array as $e) {
@@ -4789,7 +4790,7 @@ function plugin_flowview_get_protocol($prot, $prot_hex) {
function plugin_flowview_formatoctet($size, $div = 1024) {
$x=0;
- $tag = array('Bytes', 'KB', 'MB', 'GB', 'TB');
+ $tag = ['Bytes', 'KB', 'MB', 'GB', 'TB'];
while ($size > $div) {
$size = $size / $div;
$x++;
@@ -4820,8 +4821,8 @@ function flowview_get_rdomain_from_domain($domain) {
function flowview_translate_port($port, $is_hex, $detail = true) {
global $config;
- static $services = array();
- static $services_detail = array();
+ static $services = [];
+ static $services_detail = [];
if ($is_hex) {
$port = hexdec($port);
@@ -4836,7 +4837,7 @@ function flowview_translate_port($port, $is_hex, $detail = true) {
$service = flowview_db_fetch_cell_prepared('SELECT service
FROM plugin_flowview_ports
WHERE port = ?
- LIMIT 1', array($port));
+ LIMIT 1', [$port]);
if ($service != '') {
if (!$detail) {
@@ -5134,7 +5135,7 @@ function flowview_get_dns_from_ip($ip, $timeout = 1000) {
$cache = flowview_db_fetch_row_prepared('SELECT *
FROM plugin_flowview_dnscache
WHERE ip = ?',
- array($ip));
+ [$ip]);
if (isset($cache['host'])) {
return $cache['host'];
@@ -5179,7 +5180,7 @@ function flowview_get_dns_from_ip($ip, $timeout = 1000) {
host = VALUES(host),
arin_verified = VALUES(arin_verified),
arin_id = VALUES(arin_id)',
- array($ip, $dns_name, 'Local Domain', $arin_ver, $arin_id, $time));
+ [$ip, $dns_name, 'Local Domain', $arin_ver, $arin_id, $time]);
return $dns_name;
} else {
@@ -5192,7 +5193,7 @@ function flowview_get_dns_from_ip($ip, $timeout = 1000) {
host = VALUES(host),
arin_verified = VALUES(arin_verified),
arin_id = VALUES(arin_id)',
- array($ip, $dns_name, 'Static Private', $arin_ver, $arin_id, $time));
+ [$ip, $dns_name, 'Static Private', $arin_ver, $arin_id, $time]);
return $dns_name;
}
@@ -5211,7 +5212,7 @@ function flowview_get_dns_from_ip($ip, $timeout = 1000) {
host = VALUES(host),
arin_verified = VALUES(arin_verified),
arin_id = VALUES(arin_id)',
- array($ip, $priv_dns_name, 'Local DNS', $arin_ver, $arin_id, $time));
+ [$ip, $priv_dns_name, 'Local DNS', $arin_ver, $arin_id, $time]);
return $priv_dns_name;
}
@@ -5228,10 +5229,10 @@ function flowview_get_dns_from_ip($ip, $timeout = 1000) {
}
$resolver = new Net_DNS2_Resolver(
- array(
+ [
'nameservers' => $nameservers,
'timeout' => $timeout
- )
+ ]
);
try {
@@ -5260,7 +5261,7 @@ function flowview_get_dns_from_ip($ip, $timeout = 1000) {
host = VALUES(host),
arin_verified = VALUES(arin_verified),
arin_id = VALUES(arin_id)',
- array($ip, $dns_name, 'Specified DNS', $arin_ver, $arin_id, $time));
+ [$ip, $dns_name, 'Specified DNS', $arin_ver, $arin_id, $time]);
return $dns_name . $suffix;
}
@@ -5307,7 +5308,7 @@ function flowview_get_dns_from_ip($ip, $timeout = 1000) {
host = VALUES(host),
arin_verified = VALUES(arin_verified),
arin_id = VALUES(arin_id)',
- array($ip, $dns_name, 'ARIN', $arin_ver, $arin_id, $time));
+ [$ip, $dns_name, 'ARIN', $arin_ver, $arin_id, $time]);
return $dns_name;
} else {
@@ -5323,7 +5324,7 @@ function flowview_get_dns_from_ip($ip, $timeout = 1000) {
host = VALUES(host),
arin_verified = VALUES(arin_verified),
arin_id = VALUES(arin_id)',
- array($ip, $dns_name, 'ARIN Error', $arin_ver, $arin_id, $time));
+ [$ip, $dns_name, 'ARIN Error', $arin_ver, $arin_id, $time]);
return $dns_name;
}
@@ -5342,7 +5343,7 @@ function flowview_get_dns_from_ip($ip, $timeout = 1000) {
host = VALUES(host),
arin_verified = VALUES(arin_verified),
arin_id = VALUES(arin_id)',
- array($ip, $dns_name, 'Local DNS', 1, 0, $time));
+ [$ip, $dns_name, 'Local DNS', 1, 0, $time]);
return $dns_name . $suffix;
}
@@ -5368,7 +5369,7 @@ function flowview_get_dns_from_ip($ip, $timeout = 1000) {
host = VALUES(host),
arin_verified = VALUES(arin_verified),
arin_id = VALUES(arin_id)',
- array($ip, $dns_name, 'Local DNS', 1, 0, $time));
+ [$ip, $dns_name, 'Local DNS', 1, 0, $time]);
return $dns_name;
} else {
@@ -5395,7 +5396,7 @@ function flowview_get_dns_from_ip($ip, $timeout = 1000) {
host = VALUES(host),
arin_verified = VALUES(arin_verified),
arin_id = VALUES(arin_id)',
- array($ip, $dns_name, 'ARIN', $arin_ver, $arin_id, $time));
+ [$ip, $dns_name, 'ARIN', $arin_ver, $arin_id, $time]);
return $dns_name;
} else {
@@ -5411,7 +5412,7 @@ function flowview_get_dns_from_ip($ip, $timeout = 1000) {
host = VALUES(host),
arin_verified = VALUES(arin_verified),
arin_id = VALUES(arin_id)',
- array($ip, $ip, 'ARIN Error', $arin_ver, $arin_id, $time));
+ [$ip, $ip, 'ARIN Error', $arin_ver, $arin_id, $time]);
return $dns_name;
}
@@ -5421,7 +5422,7 @@ function flowview_get_dns_from_ip($ip, $timeout = 1000) {
function flowview_get_color($as_array = false) {
static $position = 0;
- $palette = array('#F23C2E', '#32599A', '#F18A47', '#AC9509', '#DAAC10');
+ $palette = ['#F23C2E', '#32599A', '#F18A47', '#AC9509', '#DAAC10'];
if ($as_array) {
$position = 0;
@@ -5463,32 +5464,32 @@ function flowview_report_session() {
'exclude' => array(
'filter' => FILTER_CALLBACK,
'default' => '0',
- 'options' => array('options' => 'sanitize_search_string')
+ 'options' => ['options' => 'sanitize_search_string']
),
'domains' => array(
'filter' => FILTER_CALLBACK,
'default' => 'true',
- 'options' => array('options' => 'sanitize_search_string')
+ 'options' => ['options' => 'sanitize_search_string']
),
'table' => array(
'filter' => FILTER_CALLBACK,
'default' => '',
- 'options' => array('options' => 'sanitize_search_string')
+ 'options' => ['options' => 'sanitize_search_string']
),
'packets' => array(
'filter' => FILTER_CALLBACK,
'default' => '',
- 'options' => array('options' => 'sanitize_search_string')
+ 'options' => ['options' => 'sanitize_search_string']
),
'bytes' => array(
'filter' => FILTER_CALLBACK,
'default' => '',
- 'options' => array('options' => 'sanitize_search_string')
+ 'options' => ['options' => 'sanitize_search_string']
),
'flows' => array(
'filter' => FILTER_CALLBACK,
'default' => '',
- 'options' => array('options' => 'sanitize_search_string')
+ 'options' => ['options' => 'sanitize_search_string']
)
);
@@ -5524,7 +5525,7 @@ function flowview_check_local_iprange($ip) {
$matches = db_fetch_cell_prepared('SELECT
INET_ATON(?) & -1 << 32 - ? = INET_ATON(?) & -1 << 32 - ? AS matches',
- array($ip, $cidr, $range, $cidr));
+ [$ip, $cidr, $range, $cidr]);
if ($matches == 1) {
return true;
@@ -5537,19 +5538,19 @@ function flowview_check_local_iprange($ip) {
function flowview_check_databases($import_only = false, $force = false) {
$databases = array(
- 'afrinic' => array(
+ 'afrinic' => [
'serial' => 'AFRINIC.CURRENTSERIAL',
'files' => 'afrinic.db.gz',
'ftp' => 'ftp://ftp.afrinic.net/pub/dbase/'
- ),
- 'altdb' => array(
+ ],
+ 'altdb' => [
'serial' => 'ALTDB.CURRENTSERIAL',
'files' => 'altdb.db.gz',
'ftp' => 'ftp://ftp.radb.net/radb/dbase/'
- ),
+ ],
'apnic' => array(
'serial' => 'APNIC.CURRENTSERIAL',
- 'files' => array(
+ 'files' => [
'apnic.db.as-block.gz',
'apnic.db.as-set.gz',
'apnic.db.aut-num.gz',
@@ -5568,102 +5569,102 @@ function flowview_check_databases($import_only = false, $force = false) {
'apnic.db.route.gz',
'apnic.db.route6.gz',
'apnic.db.rtr-set.gz'
- ),
+ ],
'ftp' => 'ftp://ftp.apnic.net/apnic/whois/'
),
- 'arin' => array(
+ 'arin' => [
'serial' => 'ARIN.CURRENTSERIAL',
'files' => 'arin.db.gz',
'ftp' => 'ftp://ftp.radb.net/radb/dbase/'
- ),
- 'bboi' => array(
+ ],
+ 'bboi' => [
'serial' => 'BBOI.CURRENTSERIAL',
'files' => 'bboi.db.gz',
'ftp' => 'ftp://ftp.radb.net/radb/dbase/'
- ),
- 'bell' => array(
+ ],
+ 'bell' => [
'serial' => 'BELL.CURRENTSERIAL',
'files' => 'bell.db.gz',
'ftp' => 'ftp://ftp.radb.net/radb/dbase/'
- ),
- 'canarie' => array(
+ ],
+ 'canarie' => [
'serial' => 'CANARIE.CURRENTSERIAL',
'files' => 'canarie.db.gz',
'ftp' => 'ftp://ftp.radb.net/radb/dbase/'
- ),
- 'idnic' => array(
+ ],
+ 'idnic' => [
'serial' => 'IDNIC.CURRENTSERIAL',
'files' => 'idnic.db.gz',
'ftp' => 'ftp://irr-mirror.idnic.net/'
- ),
- 'jpirr' => array(
+ ],
+ 'jpirr' => [
'serial' => 'JPIRR.CURRENTSERIAL',
'files' => 'jpirr.db.gz',
'ftp' => 'ftp://ftp.radb.net/radb/dbase/'
- ),
- 'jpnic' => array(
+ ],
+ 'jpnic' => [
'serial' => 'JPNIC.CURRENTSERIAL',
'files' => 'jpnic.db.gz',
'ftp' => 'ftp://ftp.apnic.net/public/apnic/dbase/data/'
- ),
- 'krnic' => array(
+ ],
+ 'krnic' => [
'serial' => 'KRNIC.CURRENTSERIAL',
'files' => 'krnic.db.gz',
'ftp' => 'ftp://ftp.apnic.net/public/apnic/dbase/data/'
- ),
- 'twnic' => array(
+ ],
+ 'twnic' => [
'serial' => 'TWNIC.CURRENTSERIAL',
'files' => 'twnic.db.gz',
'ftp' => 'ftp://ftp.apnic.net/public/apnic/dbase/data/'
- ),
- 'lacnic' => array(
+ ],
+ 'lacnic' => [
'serial' => 'LACNIC.CURRENTSERIAL',
'files' => 'lacnic.db.gz',
'ftp' => 'https://irr.lacnic.net/'
- ),
- 'level3' => array(
+ ],
+ 'level3' => [
'serial' => 'LEVEL3.CURRENTSERIAL',
'files' => 'level3.db.gz',
'ftp' => 'ftp://rr.level3.net/'
- ),
- 'wcgdb' => array(
+ ],
+ 'wcgdb' => [
'serial' => 'WCGDB.CURRENTSERIAL',
'files' => 'wcgdb.db.gz',
'ftp' => 'ftp://rr.level3.net/'
- ),
+ ],
'netegg' => array(
'serial' => 'NETEGG.CURRENTSERIAL',
- 'files' => array('netegg.db.gz', 'nestegg.db.gz'),
+ 'files' => ['netegg.db.gz', 'nestegg.db.gz'],
'ftp' => 'ftp://ftp.radb.net/radb/dbase/'
),
- 'nttcom' => array(
+ 'nttcom' => [
'serial' => 'NTTCOM.CURRENTSERIAL',
'files' => 'nttcom.db.gz',
'ftp' => 'ftp://ftp.radb.net/radb/dbase/'
- ),
- 'radb' => array(
+ ],
+ 'radb' => [
'serial' => 'RADB.CURRENTSERIAL',
'files' => 'radb.db.gz',
'ftp' => 'ftp://ftp.radb.net/radb/dbase/'
- ),
- 'reach' => array(
+ ],
+ 'reach' => [
'serial' => 'REACH.CURRENTSERIAL',
'files' => 'reach.db.gz',
'ftp' => 'ftp://ftp.radb.net/radb/dbase/'
- ),
- 'ripe' => array(
+ ],
+ 'ripe' => [
'serial' => 'RIPE.CURRENTSERIAL',
'files' => 'ripe.db.gz',
'ftp' => 'ftp://ftp.ripe.net/ripe/dbase/'
- ),
- 'tc' => array(
+ ],
+ 'tc' => [
'serial' => 'TC.CURRENTSERIAL',
'files' => 'tc.db.gz',
'ftp' => 'ftp://ftp.radb.net/radb/dbase/'
- )
+ ]
);
- $supported_tables = array(
+ $supported_tables = [
'as_block',
'as_set',
'aut_num',
@@ -5682,7 +5683,7 @@ function flowview_check_databases($import_only = false, $force = false) {
'route',
'route_set',
'rtr_set'
- );
+ ];
$directory = sys_get_temp_dir();
@@ -5699,7 +5700,7 @@ function flowview_check_databases($import_only = false, $force = false) {
$proxy_password = read_config_option('settings_proxy_password');
curl_setopt($ch, CURLOPT_HEADER, false);
- curl_setopt($ch, CURLOPT_HTTPHEADER, array('Accept:application/json'));
+ curl_setopt($ch, CURLOPT_HTTPHEADER, ['Accept:application/json']);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 120);
@@ -5749,11 +5750,11 @@ function flowview_check_databases($import_only = false, $force = false) {
if (($force || $import_only !== false) || (($last_serial == '' || $curr_serial != $last_serial) && $curr_serial != '')) {
if (!is_array($details['files'])) {
- $details['files'] = array($details['files']);
+ $details['files'] = [$details['files']];
}
foreach($supported_tables as $table) {
- flowview_db_execute_prepared("UPDATE plugin_flowview_irr_$table SET present = 0 WHERE source = ?", array($source));
+ flowview_db_execute_prepared("UPDATE plugin_flowview_irr_$table SET present = 0 WHERE source = ?", [$source]);
}
$files_broken = false;
@@ -5769,7 +5770,7 @@ function flowview_check_databases($import_only = false, $force = false) {
}
$return_var = 0;
- $output = array();
+ $output = [];
$wget_proxy = '';
if (!file_exists($local_file)) {
if ($proxy != '') {
@@ -5803,7 +5804,7 @@ function flowview_check_databases($import_only = false, $force = false) {
if (!$files_broken) {
foreach($supported_tables as $table) {
- flowview_db_execute_prepared("DELETE FROM plugin_flowview_irr_$table WHERE present = 0 AND source = ?", array($source));
+ flowview_db_execute_prepared("DELETE FROM plugin_flowview_irr_$table WHERE present = 0 AND source = ?", [$source]);
}
}
}
@@ -5820,19 +5821,19 @@ function flowview_update_database($source, $irr_file = false) {
}
$file = gzopen($irr_file, 'r');
- $record = array();
- $prefixes = array();
+ $record = [];
+ $prefixes = [];
$column = '';
$skip = false;
$source = strtoupper($source);
- $records = array();
- $record_nums = array();
+ $records = [];
+ $record_nums = [];
$prevc = '';
$section = '';
$curr_section = '';
$start = microtime(true);
- $supported_sections = array(
+ $supported_sections = [
'as-block',
'as-set',
'aut-num',
@@ -5853,11 +5854,11 @@ function flowview_update_database($source, $irr_file = false) {
'route6',
'route-set',
'rtr-set',
- );
+ ];
- $unsupported_sections = array(
+ $unsupported_sections = [
'key-cert',
- );
+ ];
/* prime the template records with base columns */
foreach($supported_sections as $section) {
@@ -5897,7 +5898,7 @@ function flowview_update_database($source, $irr_file = false) {
$prev_irr_column = '';
$name_remove_ct = 1;
$sections_done = 0;
- $record_num = array();
+ $record_num = [];
while (!feof($file) !== false) {
$line = fgets($file);
@@ -5952,8 +5953,8 @@ function flowview_update_database($source, $irr_file = false) {
flowview_insert_irr_sections($records, $prefixes, $supported_sections);
- $records = array();
- $record_num = array();
+ $records = [];
+ $record_num = [];
} else {
$sections_done++;
}
@@ -6064,7 +6065,7 @@ function flowview_insert_irr_sections(&$records, &$prefixes, &$supported_section
$section_chunks = array_chunk($section_rows, 100);
foreach($section_chunks as $section_chunk) {
- $sql_params = array();
+ $sql_params = [];
$sql_insert = $sql_prefix;
foreach($section_chunk as $index => $row) {
@@ -6180,7 +6181,7 @@ function flowview_get_owner_from_arin($host) {
curl_setopt($ch, CURLOPT_URL, 'https://whois.arin.net/rest/ip/' . $host);
curl_setopt($ch, CURLOPT_HEADER, false);
- curl_setopt($ch, CURLOPT_HTTPHEADER, array('Accept:application/json'));
+ curl_setopt($ch, CURLOPT_HTTPHEADER, ['Accept:application/json']);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 40);
@@ -6256,11 +6257,11 @@ function flowview_get_owner_from_arin($host) {
$origin = flowview_db_fetch_cell_prepared('SELECT origin
FROM plugin_flowview_irr_route
WHERE route = ?',
- array($cidr));
+ [$cidr]);
if ($origin == '') {
$return_var = 0;
- $output = array();
+ $output = [];
$origin = '';
if (file_exists($whois_path) && is_executable($whois_path) && $whois_provider != '') {
@@ -6298,7 +6299,7 @@ function flowview_get_owner_from_arin($host) {
last_changed = VALUES(last_changed),
json_data = VALUES(json_data),
comments = VALUES(comments)',
- array(
+ [
$cidr,
$net_range,
$name,
@@ -6311,18 +6312,18 @@ function flowview_get_owner_from_arin($host) {
$self,
$alternate,
$response
- )
+ ]
);
$arin_id = flowview_db_fetch_cell_prepared('SELECT id
FROM plugin_flowview_arin_information
WHERE cidr = ?',
- array($cidr));
+ [$cidr]);
if (isset($json['net']['name']['$'])) {
$dns_name = 'ip-' . str_replace('.', '-', $host) . '.' . strtolower($json['net']['name']['$']) . '.net';
- return array('dns_name' => $dns_name, 'arin_id' => $arin_id);
+ return ['dns_name' => $dns_name, 'arin_id' => $arin_id];
} else {
return false;
}
@@ -6364,22 +6365,22 @@ function flowview_getmax($value) {
function flowview_autoscale($value) {
if ($value < 1000) {
- return array(1, '');
+ return [1, ''];
} elseif ($value < 1000000) {
- return array(1000, 'K');
+ return [1000, 'K'];
} elseif ($value < 1000000000) {
- return array(1000000, 'M');
+ return [1000000, 'M'];
} elseif ($value < 1000000000000) {
- return array(1000000000, 'G');
+ return [1000000000, 'G'];
} else {
- return array(1000000000000, 'P');
+ return [1000000000000, 'P'];
}
}
function create_raw_partition($table) {
global $config;
- $data = array();
+ $data = [];
// Auto increment sequence
$data['columns'][] = array('name' => 'sequence', 'type' => 'bigint(20)', 'unsigned' => true, 'auto_increment' => true);
@@ -6432,18 +6433,18 @@ function create_raw_partition($table) {
$data['columns'][] = array('name' => 'bytes', 'type' => 'bigint(20)', 'unsigned' => true, 'NULL' => false, 'default' => '0');
// Calculated field
- $data['columns'][] = array('name' => 'bytes_ppacket', 'type' => 'double', 'unsigned' => true, 'NULL' => false, 'default' => '0');
+ $data['columns'][] = ['name' => 'bytes_ppacket', 'type' => 'double', 'unsigned' => true, 'NULL' => false, 'default' => '0'];
// Type of service and flags
$data['columns'][] = array('name' => 'tos', 'type' => 'int(11)', 'unsigned' => true, 'NULL' => false, 'default' => '0');
$data['columns'][] = array('name' => 'flags', 'type' => 'int(11)', 'unsigned' => true, 'NULL' => false, 'default' => '0');
$data['primary'] = 'sequence';
- $data['keys'][] = array('name' => 'listener_id', 'columns' => 'listener_id');
- $data['keys'][] = array('name' => 'template_id', 'columns' => 'template_id');
- $data['keys'][] = array('name' => 'ex_addr', 'columns' => 'ex_addr');
- $data['keys'][] = array('name' => 'start_time', 'columns' => 'start_time');
- $data['keys'][] = array('name' => 'end_time', 'columns' => 'end_time');
+ $data['keys'][] = ['name' => 'listener_id', 'columns' => 'listener_id'];
+ $data['keys'][] = ['name' => 'template_id', 'columns' => 'template_id'];
+ $data['keys'][] = ['name' => 'ex_addr', 'columns' => 'ex_addr'];
+ $data['keys'][] = ['name' => 'start_time', 'columns' => 'start_time'];
+ $data['keys'][] = ['name' => 'end_time', 'columns' => 'end_time'];
$data['type'] = 'InnoDB';
$data['collate'] = 'latin1_swedish_ci';
@@ -6526,7 +6527,7 @@ function flowview_load_flow_file_into_database($file, $listener_id) {
cacti_log('Can not find flow-export binary for import file ' . $file, false, 'FLOWVIEW');
}
- $sql = array();
+ $sql = [];
if ($data != '') {
$data = explode("\n", $data);
@@ -6647,7 +6648,7 @@ function flowview_load_flow_file_into_database($file, $listener_id) {
if ($i > 100) {
flowview_db_execute($sql_prefix . implode(', ', $sql));
$i = 0;
- $sql = array();
+ $sql = [];
}
}
@@ -6658,7 +6659,7 @@ function flowview_load_flow_file_into_database($file, $listener_id) {
}
function get_tables_range($begin, $end = null) {
- $tables = array();
+ $tables = [];
$partition = read_config_option('flowview_partition');
if ($end == null) {
diff --git a/images/index.php b/images/index.php
index 828ecbe..362957c 100644
--- a/images/index.php
+++ b/images/index.php
@@ -1,4 +1,5 @@
$data) {
if ($setting != 'reports_timeout' && $setting != 'scheduler_timeout') {
$nsettings[$setting] = $data;
} else {
- $processes = array();
+ $processes = [];
for($i = 1; $i <= 10; $i++) {
if ($i == 1) {
@@ -443,7 +444,7 @@ function flowview_config_settings() {
'id', 'name'
);
} else {
- $queries = array();
+ $queries = [];
}
$temp = array(
@@ -1089,8 +1090,8 @@ function flowview_drop_table($tables) {
function flowview_graph_button($data) {
global $config, $timespan, $graph_timeshifts;
- static $flow_hosts = array();
- static $flow_hosts_map = array();
+ static $flow_hosts = [];
+ static $flow_hosts_map = [];
static $flowview_default_filter;
$flowview_default_filter = read_config_option('flowview_default_filter');
@@ -1119,7 +1120,7 @@ function flowview_graph_button($data) {
$host_id = db_fetch_cell_prepared('SELECT host_id
FROM graph_local
WHERE id = ?',
- array($local_graph_id));
+ [$local_graph_id]);
/* get all the IP addresses and hostname for various streams */
if (!cacti_sizeof($flow_hosts)) {
@@ -1133,7 +1134,7 @@ function flowview_graph_button($data) {
$sql_where1 = '';
$sql_where2 = '';
- $sql_params = array();
+ $sql_params = [];
/**
* Find an elegant way to match the queries stream clients
@@ -1145,8 +1146,8 @@ function flowview_graph_button($data) {
*/
if (cacti_sizeof($flow_hosts)) {
$i = 0;
- $sql_params1 = array();
- $sql_params2 = array();
+ $sql_params1 = [];
+ $sql_params2 = [];
foreach($flow_hosts as $id => $host) {
if ($i == 0) {
@@ -1233,7 +1234,7 @@ function flowview_graph_button($data) {
FROM plugin_flowview_queries
WHERE device_id = ?
LIMIT 1',
- array($host['id']));
+ [$host['id']]);
$flow_hosts_map[$host_id]['ex_addr'] = $ex_addr;
@@ -1255,7 +1256,7 @@ function flowview_graph_button($data) {
/* initialize settings from the database if they are not set already */
if (cacti_sizeof($query_data)) {
- $columns = array(
+ $columns = [
'device_id',
'includeif',
'sortfield',
@@ -1270,7 +1271,7 @@ function flowview_graph_button($data) {
'panel_bytes',
'panel_packets',
'panel_flows'
- );
+ ];
foreach($columns as $c) {
if (strpos($c, 'panel') !== false) {
diff --git a/themes/index.php b/themes/index.php
index 828ecbe..362957c 100644
--- a/themes/index.php
+++ b/themes/index.php
@@ -1,4 +1,5 @@