>>>>> On Mon, 18 Apr 2005 07:53:46 +0200, Kodel Oleg <[EMAIL PROTECTED]> said:

Kodel> In my subagent, in the get/set handlers I need to reach the
Kodel> fields of the SNMPv2 header, such as RequestID, AgentAddress,
Kodel> Community.  Is it possible to retrieve these fields using
Kodel> regular APIs from the registered handler (registered with
Kodel> netsnmp_register_instance) ?

generally you should never do this.  If you're doing it then you'd
probably be best rethinking what you're trying to do in a different
way.  What exactly are you trying to do?

now, having said that, you can access the information through the
asp->pdu pointer found in the netsnmp_agent_request_info structure.
However, if you do so your code could fail in the future because you
suddenly decided to use SNMPv3 or agentx or some other mechanism which
the above will make non-portable.  I urge you not to do what you're
thinking about if it can be avoided.

-- 
Wes Hardaker
Sparta, Inc.


-------------------------------------------------------
This SF.Net email is sponsored by: New Crystal Reports XI.
Version 11 adds new functionality designed to reduce time involved in
creating, integrating, and deploying reporting solutions. Free runtime info,
new features, or free trial, at: http://www.businessobjects.com/devxi/728
_______________________________________________
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

Reply via email to