Solved

About SNMP

Posted on 2000-03-08
2
697 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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 …
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

758 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

21 Experts available now in Live!

Get 1:1 Help Now