Solved

About SNMP

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Problem to skip loop 6 57
VB6 - Convert HH:MM into Decimal 8 56
Need Nag Screen for Reboot if system up time is over 14 days 12 51
VB6 - Scroll Mouse wheel on Picturebox 13 44
There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
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…
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…

831 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