[ECOS] Sending SNMP Traps and registering an IP Address

Andrew Lunn andrew.lunn@ascom.ch
Tue Jan 22 07:13:00 GMT 2002


On Tue, Jan 22, 2002 at 03:04:31PM -0000, Crumpton, Neil wrote:
> Hi,
> 	I've been working with the eCos and UCD SNMP stack to create an
> agent. I wrote a MIB, generated the relevant C files using mib2c, and am
> able to get and set values in this MIB. I am now trying to send traps from
> my agent to a management workstation. My problem is as follows:
> I can't seem to figure out how to actually generate the traps as there
> doesn't appear to be any traps generated by the current agent for me to
> learn how to implement the process. I have tried using the
> send_easy_trap(int, int) method but to no avail. Could this be because I
> haven't registered a management IP Address? and if so how do I go about
> doing this?
> 
> Also what is the interface to use for generating traps?

You have to declare a trap sink using the function
create_trap_session(). You pass the host, port, community etc. 

To send a trap either use send_easy_trap(), or send_trap_vars() when
you want to pass more information.

FYI: There is a problem using SNMP and DHCP when you have traps or
your own mibs which are not incorporated into the normal snmp
startup. I will put in a bugzilla bug soon.

         Andrew

> ---------------------------------------------------------------------------
> The information transmitted in this e-mail is intended only for the person
> or entity to which it is addressed and may contain confidential and/or
> privileged material. Any review, retransmission, dissemination or other use
> of, or taking of any action in reliance upon, this information by persons or
> entities other than the intended recipient is prohibited.  We do not accept
> responsibility for changes made to this message after it was sent.
> ---------------------------------------------------------------------------
> If you received this in error, please inform info@quantumbeam.com and delete
> the material from your computer.

Do you really want such a footer on an OpenSource mailling list?



More information about the Ecos-discuss mailing list