All ..

I copied/modified the cisco_catos include script using the OIDs that I
found per http://www.notarus.net/networking/foundry_snmp.html
I managed to get via manual scan w/o portscan all of the 16 GigEthernet
Ports and the Reachability Interfaces. One interface was an error.

Here is the code and file name ... Was I on the right track?
Also, would it be alright to start some sort of repository for JFFNMS
addons/customizations?

<CODE>
<?
/* This file is part of JFFNMS
 * Copyright (C) <2002-2005> Javier Szyszlican <[EMAIL PROTECTED]>
 * This program is licensed under the GNU GPL, full terms in the LICENSE
file
 */
    //CISCO-STACK-MIB Configuration Downloader Implementation for CatOS
(tested on 5513)
    //from:
http://www.cisco.com/warp/public/477/SNMP/move_files_images_snmp.html
    //thanks to Paul Stewart from Nexicom for let me use his hardware.
    //tftpResult Values: (1) : inProgress, (2) : success, >= 3 Errors
     
    function config_cisco_catos_get ($ip, $rwcommunity, $server,
$filename) {

        if ($ip && $rwcommunity && $server && $filename) {
            $tftpHostOID   = ".1.3.6.1.4.1.1991.1.1.2.1.5.0";
            $tftpFileOID   = ".1.3.6.1.4.1.1991.1.1.2.1.8.0";
            //$tftpModuleOID = ".1.3.6.1.4.1.9.5.1.5.3.0";    #Commented
out since no Foundry OID matches this?
            $tftpActionOID = ".1.3.6.1.4.1.1991.1.1.2.1.9.0";
            $tftpResultOID = ".1.3.6.1.4.1.1991.1.1.2.1.9.0";
                                
            $resultHost = snmp_set($ip,$rwcommunity,$tftpHostOID,"s",
$server); //set the TFTP Server
                                
            if ($resultHost==true)
                $resultFile = snmp_set($ip,$rwcommunity,
$tftpFileOID,"s",$filename); //set the Filename
                                
                if ($resultFile==true)
                $resultModule = snmp_set($ip,$rwcommunity,
$tftpModuleOID,"i",2); //set Supervisor Module (FIXME this could
change)                            
                                
            //* if ($resultModule==true)
                $resultAction = snmp_set($ip,$rwcommunity,
$tftpActionOID,"i",3); //set the action to Upload
            *//
                                
            if ($resultAction==true)
                $result = snmp_get($ip,$rwcommunity,
$tftpResultOID); //get Status of the transfer
                                
            if ($result < 3) return true; 
        }                       
        return false;           
    }                           
                                
    function config_cisco_catos_wait ($ip, $rwcommunity, $server,
$filename) {
        $i = 1;                 
        $result = 1;            
        $tftpResultOID = ".1.3.6.1.4.1.1991.1.1.2.1.9.0";    #not sure
about this one either, using same OID as Action?
        while (($result == 1) and ($i++ < 30)) { 
            $result = snmp_get($ip,$rwcommunity,$tftpResultOID);
            sleep(2);           
        }                       
        if ($result == 2) return true; 
        return false;           
    }                           
?>                              
</CODE>

On Tue, 2007-05-22 at 15:48 +1000, Craig Small wrote:

> On Mon, May 21, 2007 at 03:35:55PM -0400, Jeff Singleton wrote:
> > I just do not know php well enough to try and write my own scripts (ie
> > cat_os, cat_cc)
> > I was hoping it would be as simple as copying and modifying one of the
> > files that came with jffnms, but it isn't.
> > I've got all of the MIBs for all of the Foundry devices but still cannot
> > figure out how to make a new Host type.
> Hmm, I am pretty sure I have done this already. Javier, do you have an
> email from me about the Foundry config transfer?
> 
> If not, send me the OIDs you use for it to make it happen. It should be
> about 3 or for of them to do it.
> 
> Even better, write a shell script to test your theory then send me that.
> 
>  - Craig
> 

--
Jeff Singleton
Network Systems Admin (Trusted Source)
Secure Computing Corporation
4800 North Point Pkwy
Alpharetta, GA 30022
O: 678-904-3694
C: 770-820-2909
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
jffnms-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jffnms-users

Reply via email to