On Mon, 2005-10-03 at 18:01 -0400, John J. Reardon wrote: > Is it possible to obtain the SNMP community of a given > request when you are in the agentx subagent? > > I think that the answer is 'no'.
Correct. The administrative settings of the incoming SNMP request are not passed to the AgentX subagent. This isn't part of the AgentX protocol. And remember that there may not *be* an SNMP community, if the request was sent using SNMPv3. > It looks like there is code that will optionally write a context into > the community part of a pdu - but it doesn't really look like it this > can be set by the agentx master (at least not with standard APIs). Context and Community are two *completely* different things. Using the community field was a mistake (which I thought we'd since corrected - I'll check that). Don't try and link the two. [Someone will probably jump in now and point out that a given community name *can* be linked with a particular context, but that probably just likely to confuse things at this stage. Start by regarding them as separate ideas for now.] > I find myself wanting to be both a 'server' in my agentx subagent > (what 99.9% of the world does). But I also want to be able to send > set requests in my agentx subagent (i.e. be a client) and I wanted to > 'steal' the community string of the incoming request in order to use > in my outgoing set request. It's not particularly clear to me, exactly what you are trying to do here. Can you give a more concrete illustration? > I am guessing that this is NOT possible without patching the master > agent, yes? It's worse than that - this is not possible without breaking the AgentX protocol. Dave ------------------------------------------------------- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl _______________________________________________ Net-snmp-coders mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
