[ First - *please* don't mail me privately, without copying
any responses to the mailing list. I don't have the time
or inclination to offer private, unpaid, SNMP consultancy.
Keep discussions to the list, where others can both learn
and offer advice. Thanks. ]
2008/6/30 deka aditia <[EMAIL PROTECTED]>:
> On 6/30/08, Dave Shield <[EMAIL PROTECTED]> wrote:
>> 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.
>>
>
> OK Mr. Dave i prefer to choose "SNMP listener" rather than "SNMP agent"
> i'm just confuse with what i should asking
The standard terminology within the SNMP community is
either "command responder" or "agent".
The term "SNMP listener" is ambiguous, as it would
cover several different types of application.
I suggest you follow established practise, rather than
inventing your own terminology.
>>> 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'
>>
>
> it's just a program that listen to some SNMP request which OID is'nt
> come to standard MIB, moreover it will access some hardware
> information and send the response ...
Yes - that is exactly the behaviour of an agent.
I would suggest that you concentrate on developing a MIB
module for your particular needs, and use this within the
existing Net-SNMP agent framework.
Trying to code the whole thing from scratch will involve a
lot of unnecessary duplication.
>> 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
>>
>
> could you explain more about 3 procedure above :D .....
I repeat - I would *STRONGLY* suggest that you do not
try to implement an agent from scratch. The existing
agent will handle accepting incoming requests, decoding
them into a useable data structure, and passing the
request off to the appropriate MIB module handlers.
There is a lot of fiddly detail here, which would take
you a long time to reproduce for yourself.
If you use the Net-SNMP agent, then you don't need to
worry about any of this - it's all handled for you. You can
concentrate on the important task, of handling your
hardware and implementing the corresponding MIB.
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