How can my perl script receive SNMP traps?

Joel Hansell <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
Hi,

I would like to do the following, but I'm not sure I'm using the best method:

A perl script, running on a Sparc/Solaris 10 machine, should wait for
incoming SNMP trap packets (on port 162 for instance). When it
receives a trap, it should decode it and do some processing on it, and
then resume waiting for the next trap.

Am I correct in assuming that this cannot be done from within Perl
with the net-snmp perl modules?

I found some clues elsewhere that I should use the "snmptrapd" binary
and use the embedded perl functions of it, to call my script when
snmptrapd receives a message. This could work, but would be
impractical since the embedded perl option requires a perl binary
compiled without large file support. I do not own the target system
and hence cannot replace the compiler/interpreter. I could ship my
software with a specially-compiled perl, but that would give me
cross-platform issues I was hoping to avoid.

Best regards,
Joel Hansell

------------------------------------------------------------------------------
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.