Files

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
357 B
PHP
Raw Permalink Normal View History

2018-08-11 23:37:45 +02:00
<?php
use LibreNMS\Config;
function process_trap($device, $entry)
{
$oid = trim(strstr($entry[3], ' '));
$oid = str_replace('::', '', strstr($oid, '::'));
$file = Config::get('install_dir') . '/includes/snmptrap/' . $oid . '.inc.php';
if (is_file($file)) {
include $file;
} else {
echo "unknown trap ($file)";
}
}