Operating System - OpenVMS
cancel
Showing results for 
Search instead for 
Did you mean: 

calling esnmp API from DECC

 
SAMI AHMAD
Regular Advisor

calling esnmp API from DECC

hi all!

I could not find anyway to send an snmp trap via esnmp API in C , becuase one of the parameters to esnmp should have been the snmp host IP address which is not there so how esnmp API is used to send snmp traps ?
I can send an snmp trap from DCL but I am looking for ways to send the snmp traps via DECC.

Thanks
8 REPLIES 8
Wim Van den Wyngaert
Honored Contributor

Re: calling esnmp API from DECC

SAMI AHMAD
Regular Advisor

Re: calling esnmp API from DECC

hi Wim!
thanks for the prompt reply but this article does not help me because it talks about capabilities of recieving snmp traps and the esnmp utility.
let me explain a bit more what my problem is .
On DCL if i use the snmp_trapsend utility I can send an snmp trap to the openview trap server running on solaris. and I achieve this by supplying the IP address as parameter to the snmp_trapsend utility, but Iam not sure and how if possible to achieve the same via esnmp utility , cause there is no way to specify an snmp master server to send the trap to via esnmp.
Richard Whalen
Honored Contributor

Re: calling esnmp API from DECC

The eSNMP API is actually an API for the SNMP Agent Extensibility Protocol (RFC 2741). A program that uses this protocol must first do an init call, then a register, then the trap call can be done. Note that the call really asks the master agent to send a trap, and has no mechanism for specifying where to send a trap. My guess is that traps would be send based upon how the master agent is configured.
SAMI AHMAD
Regular Advisor

Re: calling esnmp API from DECC

I looked at the esnmp_init() and esnmp_register() API calls but they too dont have any parameters specifying the master IP address .
what is the difference between sending traps via snmp_trapsnd at DCL or via esnmp through some high level language? understanding this difference might help solve my problem quicker.
and if esnmp indeed can be used to send snmp traps to an snmp host recieving snmp traps then there must be discrete steps available by hp on how to do this.
Richard Whalen
Honored Contributor

Re: calling esnmp API from DECC

Since the esnmp_init() routine does not allow for an address to be specified, then it is probably written such that it always connect to localhost. The primary design of the protocol is to allow applications to extend the SNMP MIB trees on the localhost, so it's possible that the API's authors decided that it was not necessary to allow it to talk to other hosts. (The underlying protocol is not constrained to sub agents running on the same system as the master agent.)
SAMI AHMAD
Regular Advisor

Re: calling esnmp API from DECC

so whats the verdict .. HP doesnt have an API to send an smtp trap to remote host ?
Hoff
Honored Contributor

Re: calling esnmp API from DECC

Assuming you can't find something useful in the existing TCP/IP Services libraries and SYS$EXAMPLES: source code examples (eg: Chess), or digging around for, say, http://mvb.saic.com/freeware/freewarev50/vouters/snmp_director.txt , you could switch IP stacks, or you could haul over netsnmp or one of the perl modules, and move along to the next issue

The TCP/IP Services documentation is certainly lacking hereabouts.

SAMI AHMAD
Regular Advisor

Re: calling esnmp API from DECC

thanks I dropped the idea of using esnmp trap I use trap_send rather