Trap handling

<[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
Hi,
 
We have a requirement to support trap handling in our project.
 
Requirement is whenever a trap is received a function should be called
which extracts the community string and performs some operation. 
 
With were able to do it with scotty(opening  a listener session and
binding it with a callback function. Please see the code below). 
 
set session [Tnm::snmp listener -port 162  -version SNMPv1 -transport
udp -tags {}]
$session bind trap { 
set pdu "%V" 
set community "%C"
}
 
How can the same functionality be achieved using net-snmp(a callback
function should be called whenever a trap is received).
 
I read about snmptrapd and snmptrapd.conf, but I am not sure how to use
it to achieve the above functionality.
 
Can anybody help me with this problem?
 
 

Thanks in advance 

Regards,
Sushma
Blank Bkgrd.gif (image/gif, 145 B) - not displayed
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.