On Wed, Jan 9, 2013 at 3:54 AM, pradipta <pradipt...@gmail.com> wrote: > > Hello, > > I am trying to get the enterprise ID of a snmp device.I am using the > sysObjectID - 1.3.6.1.2.1.1.2 to query .But is there any way to get the > enterprise ID only > > Technically, there is no standard variable that contains the enterprise ID of the device. When it comes to SNMP, a device might actually support a number of MIBs from a number of vendors.
Most times, a vendor of a specific device may place something into their sysObjectID that can be used to identify the device type, but it is not limited (or restricted) to containing their enterprise # as part of it. For example: If it uses Net-SNMP on Linux, (by default) it provides .1.3.6.1.4.1.8072.3.2.10. However if you query the devices _I_ manufacture you will see something like: 1.3.6.1.4.1.1978.5.7 as the above query gives me total dot notation upto > some value which include the enterprise id .I have to parse it > > Correct. If you see the value you are interested in, inside the sysObjectID, it is your requirement/responsibility to extract it (from wherever you find it). > but I > need a query by which I can get the enterprise ID only. > > example :11 for HP etc. I need only 11 in this case to identify it is HP > device. > > I am using the net-snmp library to query to a perticular device using a > program and I am using the oid - > 1.3.6.1.2.1.1.2 and sending it to the device and getting the response back > which > I am storing in the buffer.but the problem is I am not getting the enterprise > ID only (11 in case of HP ). > Is there any query to get the ID only. > > ... because the variable is defined-as/contains a sysObjectID, not an enterpriseNumber. > If the above is not possible then kindly tell me how to get the result only > in numerical for as > in command line we have a option *-On* Displays the OID numerically.How to > get the result of a query in > program that is in numeric as it is coming with the string > > SNMPv2-SMI::enterprises.11.2.3.9.1[with string] ----> 1.3.6.1.4.1.11.2.3.9.1 > [numeric]. > >
------------------------------------------------------------------------------ Master Java SE, Java EE, Eclipse, Spring, Hibernate, JavaScript, jQuery and much more. Keep your Java skills current with LearnJavaNow - 200+ hours of step-by-step video tutorials by Java experts. SALE $49.99 this month only -- learn more at: http://p.sf.net/sfu/learnmore_122612
_______________________________________________ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users