|
From: | Tim Schöndorfer |
Subject: | Re: [Mibble-users] parse TRAP-TYPE |
Date: | Tue, 28 May 2013 14:11:52 +0200 (CEST) |
Mib mib = loader.load(mibfiles.get(i));
System.out.println(mib.getSymbolByOid("1.3.6.1.2.1.2.2.1.7.7").getName());
MibValueSymbol sy = mib.getSymbolByOid("1.3.6.1.2.1.2.2.1.7.7");
SnmpObjectType sno = (SnmpObjectType) sy.getType();
System.out.println(sno.getSyntax());
if(sno.getSyntax() instanceof IntegerType){
IntegerType in = (IntegerType) sno.getSyntax();
MibValueSymbol[] syin = in.getAllSymbols();
for(int j = 0; j<syin.length;j++){
if(syin[j].getValue().toString().contains("1")){
System.out.println(syin[j].getName());
}
}
}
i think i'm starting to have understood Mibble
Thanks,
Tim
Hello,I writing a snmp-trapreceiver with mibble. But mibble can not find the trap in the MIB-file (i think thats because the trap isnt a object-type, it is save in the mib as a TRAP-TYPE).I spending much time on search for a solution, but i didnt find a way to parse the mib file and get the trap description or the trap name. The traps are snmp v1 traps so i get the enterprise oid and a specific number from the trap pdu and i try to parse the mib file with "Mib mib = MibLoader.load(Mib-File) and mib.getSymbolByOid(EnterpriseOid+.0.+specificNumber);" but this doenst work(it only works with normal OIDs). So how can i parse a mib-file with mibble to get the TRAP-TYPEs?Thanks, Tim Schöndorfer
_______________________________________________
Mibble-users mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/mibble-users
[Prev in Thread] | Current Thread | [Next in Thread] |