Hi, Dave

 

I use the mib2c.iterator.conf to generate the c code, and in the function 
initialize_table_exampleTable(), I add reg->contextName = strdup("interface") 
after reg =

netsnmp_create_handler_registration(…).

But when I try to get some information within this table, snmpd hints ‘Error in 
packet

Reason: authorizationError (access denied to that object)’

 

-----邮件原件-----
发件人: [email protected] [mailto:[email protected]] 代表 Dave 
Shield
发送时间: 2009年4月30日 15:25
收件人: Kang Chen
抄送: [email protected]
主题: Re: how to configure and use 'context'?

 

2009/4/30 Kang Chen <[email protected]>:

> In snmpd.conf, I configure as following:

>    access Groupv3  "interface"    usm  auth     exact  if2  if2  if2

 

So that sets up access control to the context "interface"

(to the view 'if2')

 

 

> snmpget -v3 -u leelin -n "interface" .... sysDescr.0

 

and that requests information within the same context.

 

 

> But I can’t get the response from the snmpd.

 

The first question is  what information does the agent actually

provide within the context "interface"?   Note that by default,

all information is registered within the default context.

If you want information in a different context, then you need

to tell the agent about it.

   See the last entry in the FAQ section CODING for more info.

 

 

The second question would be to look at what if covered

by the view 'if2'.   But my guess is that the agent is not

actually providing any information within the context

"interface".

 

Dave

------------------------------------------------------------------------------
Register Now & Save for Velocity, the Web Performance & Operations 
Conference from O'Reilly Media. Velocity features a full day of 
expert-led, hands-on workshops and two days of sessions from industry 
leaders in dedicated Performance & Operations tracks. Use code vel09scf 
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to