On Thu, 19 May 2005 15:56:26 -0400 Haizhu wrote:
HL> I am using net-snmp 5.0.8. I am trying the example code on the web: I have 
HL> my host registered as a trap receiver, and the code is as follows. I don't 
HL> understand why it hangs over select(). Similar piece of code worked okay 
HL> with ucd-snmp 4.2.5 version.
HL> 
HL>    snmp_sess_init( &snmp_session_data );
HL>    snmp_session_data.peername = host_addr;   // trap receiver ip addr
HL>    snmp_session_data.local_port = SNMP_TRAP_PORT;
HL> 
HL> psnmp_session_data  = snmp_open(&snmp_session_data);

A new 'transport' system was introduced in the 5.0 line, and it works a little
differently. Take a look at what snmptrapd.c does to open the trap port, and
mimic that instead.

-- 
NOTE: messages sent directly to me, instead of the lists, will be deleted
      unless they are requests for paid consulting services.

Robert Story; NET-SNMP Junkie
Support: <http://www.net-snmp.org/> <irc://irc.freenode.net/#net-snmp>
Archive: <http://sourceforge.net/mailarchive/forum.php?forum=net-snmp-coders>

You are lost in a twisty maze of little standards, all different. 


-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to