Wes,

I am working off 5.1.1. Doesn't look like that version uses this method, is that
correct? Can I use version 5.1.1? Will this work for SNMP V1 and V2c as well as 
V3?

Thanks

 Glenn 

Quoting Wes Hardaker <[EMAIL PROTECTED]>:

> >>>>> On Mon, 27 Jun 2005 14:03:53 -0400, Glenn MacGregor
> <[EMAIL PROTECTED]> said:
> 
> Glenn> I originally wanted to do this by knowing the ip address that
> Glenn> was queried then I could go to the correct device and get the
> Glenn> correct value. There is no way to know the address that was
> Glenn> queried when the request gets to the subagent. So the use of
> Glenn> context's was suggested. Can anyone point me in the direction
> Glenn> of some docs on using contexts for this?
> 
> snmptrapd actually does this now with the usmUserTable.  It is a
> subagent to the main snmpd agent.  The snmpd agent has its own copy of
> the usmUserTable which is *different* than the copy that snmptrapd
> has.  Functionally, this happens when the snmptrapd application
> eventually calls this routine (which is inside
> init_register_usmUser_context):
> 
>     register_mib_context("snmpv3/usmUser",
>                          (struct variable *) usmUser_variables,
>                          sizeof(struct variable4),
>                          sizeof(usmUser_variables)/sizeof(struct
> variable4),
>                          usmUser_variables_oid,
>                          sizeof(usmUser_variables_oid)/sizeof(oid),
>                          DEFAULT_MIB_PRIORITY, 0, 0, NULL,
>                          "snmptrapd", -1, 0);
> 
> IE, the function registers itself in the "snmptrapd" context for the
> usmUser table.  It thus doesn't conflict with the agent's
> usmUserTable, which is registered at the default "".
> 
> Now I can access both tables from the same master agent:
> 
> # snmpgetnext localhost usmUserTable
> SNMP-USER-BASED-SM-MIB::usmUserSecurityName.\"[EMAIL PROTECTED]".\"wes\" =
> STRING: wes
> 
> # snmpgetnext -n snmptrapd localhost usmUserTable
> SNMP-USER-BASED-SM-MIB::usmUserSecurityName.\".."\".\"user\" = STRING: user
> 
> 
> As you can see, two different sets of data.
> 
> -- 
> Wes Hardaker
> Sparta, Inc.
> 


Glenn MacGregor
HighStreet Networks

-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
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

Reply via email to