LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   MIB and SNMP (https://www.linuxquestions.org/questions/programming-9/mib-and-snmp-400374/)

allomeen 01-06-2006 05:38 PM

MIB and SNMP
 
Hello,
Do you know how can I parse an MIB file for OID and their values ? I'm using SNMP++ with C++. I have an MIB file and i get the OID from SNMP agent, but i get numbers like (.1.2.3.4.5.6.0 = value). How can I get what is this number represent in my MIB file?. Do you have any recommendation for library to do this? Or can I use SNMP++ to do this?

Thanks
Alaa G

paulsm4 01-07-2006 12:42 AM

As I'm sure you know, the OIDs are the only thing that's stored in the SNMP agent's database, and the only thing that's transmitted in the SNMP datagrams. What the OID's actually "mean" (in human readable text) is stored elsewhere (e.g. a text file that you import nito your SNMP manager, so you can supplement the standard MIB with your site-specific OIDs).

I've worked with SNMP in the past (distant past ;-)), but I'm unfamiliar with SNMP++ per se.

I'm sure you've already Read The Fine Manual for SNMP++, and it didn't tell you.

If your SNMP++ library is a purchased product, definitely ask your vendor's tech support (that's what they're paid for ;-).

Otherwise, here's a package, an "SMI MIB compiler" you might be able to integrate in to your SNMP++ based application:

http://www.ibr.cs.tu-bs.de/projects/libsmi/

allomeen 01-17-2006 10:23 AM

Thanks for the help. I brute force it since I only need few oid, so I didn't have to go the MIB file

Alaa G


All times are GMT -5. The time now is 10:39 AM.