Solved

About SNMP

Posted on 2000-03-08
2
733 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Using "ScreenUpdating" 6 83
Access query that references subform 5 48
RUNRMTCMD from AS/400 13 89
backup program with robocopy 6 70
Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…

756 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