Thanks for that explanation Joan -----Original Message----- From: dave.shi...@googlemail.com [mailto:dave.shi...@googlemail.com] On Behalf Of Dave Shield Sent: Friday, February 20, 2009 3:22 AM To: Joan Landry Cc: net-snmp-users@lists.sourceforge.net Subject: Re: How can I access the pdu in a handler
2009/2/19 Joan Landry <joan.lan...@overturenetworks.com>: > I would like to know if there is a way to get the community name from > the pdu inside a handler request? > I tried both of these: > reqinfo->asp->pdu->community_len > reqinfo->asp->orig_pdu->community_len Those should work, yes. But *only* if the PDU that is being processed is a community-based SNMP request. > I am using the tdata helper functions running agentX. If your handler is part of an AgentX subagent, then the PDU that it's working with will be an AgentX request, not an SNMPv{1,2c} request. So the contents of reqinfo->asp->pdu will reflect this. If you check the AgentX specs, you'll see that AgentX requests do not include a community string (or any authentication information). Access control is handled by the master agent, and the AgentX subagent is solely concerned the OIDs being requested. An AgentX subagent will not be passed the community string, so this information is not available to AgentX handlers. Dave ------------------------------------------------------------------------------ Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H _______________________________________________ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users