mirror of
				https://github.com/librenms/librenms.git
				synced 2024-10-07 16:52:45 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			17 lines
		
	
	
		
			357 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			17 lines
		
	
	
		
			357 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
<?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)";
 | 
						|
    }
 | 
						|
}
 |