Solved

About SNMP

Posted on 2000-03-08
2
704 Views
Last Modified: 2012-06-21
I am trying to  build a application to get some parameters from CISCO Router
or CISCO Switch Using SNMP protocol in vb6,
Can anybody give me some suggestion?

If there is a good sample code,
I will increase the points.
0
Comment
Question by:hxb
2 Comments
 
LVL 3

Accepted Solution

by:
3rsrichard earned 100 total points
ID: 2596288
The best solution is to look at
http://www.dart.com
they sell third party software which will let you talk to your router.
You can get a trial version to learn with.  It has good documentation and help.

Here is an example of what the code would look like;

Public Function getmibvalue(itsoid As String) As Variant

'Read the value stored at mib address itsoid
' Input parameter itsoid- the oid address of the item to be read
' Return - the value read as a variant

    Dim value As SnmpVariable
    Dim returned As Variant
   
    If gblnDebug = False Then
      ' Start the SNMP manager - see Dart documentation

      frmSNMP.Manager1.Open
      frmSNMP.Manager1.Message.Reset
      frmSNMP.Manager1.AgentName = UnitIP
      frmSNMP.Manager1.AgentPort = 161
   
      'Get the sysContact for the agent using the AgentVariable property
       Set value = frmSNMP.Manager1.AgentVariable(itsoid)

       returned = value.value
   
     ' Close the SNMP manager
       frmSNMP.Manager1.Message.Reset
       frmSNMP.Manager1.Close
       Unload frmSNMP

       getmibvalue = returned
    Else
        getmibvalue = TestMIB(itsoid)
    End If
End Function

You can also get source support code for SNMP++, which will do the same things from the SNMP++ list at Intel.  The trouble is that you have to compile the code yourself.

If you want to do-it-yourself you might start with
http://users.neca.com/vmis/ber.htm
http://users.neca.com/vmis/snmp.htm

If you want pointers to specific subjects ask, and I'll post answers or links.
0
 

Author Comment

by:hxb
ID: 2626017
thank
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now