On Fri, 10 Sep 2004 16:54:44 -0400 bill wrote:
BS> > If you check the recent snmpd.conf man page, the com2sec token can
BS> > specify a context, which you could easily make the same as the community
BS> > string, and thus the sub-agent would get passed the community string as
BS> > the context.
BS> > 
BS> > com2sec -Cn host10-10-10-1 mynet default host10-10-10-1
BS> > com2sec -Cn host10-10-10-2 mynet default host10-10-10-2
BS> > 
BS> This is exactly what I want to do.  I understand the man page
BS> instructions, but not clear on which data structure would contain the
BS> contextName  - it shows up in snmp_pdu and snmp_session - which I
BS> beleive are the same

They aren't the same, and I would expect it would show up in the pdu. But you
shouldn't be poking around in the pdu.

First, I haven't tried any of this, so don't quote me. But, I think you have to
register your sub-agent for each context you want to handle. So you should use
the void pointer for your handler to determine which context is in play.

BS> Correct  me if I am wrong here: Using this approach, I am forced to
BS> use V3 at the client?

No. With V3 you can use contexts directly - it is part of the protocol.
Net-SNMP offers a mapping function to provide a context based on the community
string provided in a v1 request.

-- 
Robert Story; NET-SNMP Junkie <http://www.net-snmp.org/>
<irc://irc.freenode.net/#net-snmp>  
Archive: <http://sourceforge.net/mailarchive/forum.php?forum=net-snmp-users>

You are lost in a twisty maze of little standards, all different. 


-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM. 
Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php
_______________________________________________
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