2008/6/30 deka aditia <[EMAIL PROTECTED]>:
> currently i'm developing an application that will listen to SNMP Port,
> when there is snmp packet incoming then my application will translate
> the request and send it back to user .
That sounds suspiciously like an "SNMP agent".
We provide exactly such a beast - why not use that,
rather than re-inventing the wheel.
> Before i will start deveIoping this application, i have a basic questions :
> How we i detect a new incoming SNMP packet using net-snmp ?
If you are determined to implement an agent for yourself,
please see the routine "receive()" in the file 'agent/snmpd.c'
This contains the main event loop, for detecting incoming requests
and processing them. The vital elements of this are:
snmp_select_info()
select()
snmp_read()
But I'd strongly advise against trying to write your own agent.
There's best part of twenty years work gone into the Net-SNMP
agent - it's going to take you a while to reproduce that!
Dave
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders