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 ''; } - 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() {
    ' . __('No Details Found', 'flowview') . '