I've modified snmpd.conf and now contextName thing is working fine for scalars. 
How ever when I give same lines in the tables  its giving segmentation 
fault problem. The trace and the code is as below:reg 
=        
netsnmp_create_handler_registration("MylTable",                                           
 
MyTable_handler,                                           
 
MyTable_oid,                       &nbsp
 
;                   
 
MyTable_oid_len,                                           
 HANDLER_CAN_RWRITE);    reg->contextName = 
strdup("mycontext");    netsnmp_register_handler(reg);the seg 
fault back trace is: #0  0xb772c36b in strlen () from 
/lib/libc.so.6#1  0xb772c0d5 in strdup () from /lib/libc.so.6#2  
0xb79fa0f3 in agentx_register () from /usr/lib/libnetsnmpagent.so.15#3  
0xb79e8af1 in agentx_registration_callback () from 
/usr/lib/libnetsnmpagent.so.15#4  0xb795a727 in snmp_call_callbacks () 
from /usr/lib/libnetsnmp.so.15#5  0xb79dd1e0 in register_mib_reattach_node 
() from /usr/lib/libnetsnmpagent.so.15#6&n
 bsp; 0xb79dd22f in register_mib_reattach () from 
/usr/lib/libnetsnmpagent.so.15#7  0xb79e96ca in agentx_reopen_session () 
from /usr/lib/libnetsnmpagent.so.15#8  0xb79e6ca3 in subagent_startup () 
from /usr/lib/libnetsnmpagent.so.15#9  0xb795a727 in snmp_call_callbacks 
() from /usr/lib/libnetsnmp.so.15#10 0xb794dfff in read_configs () from 
/usr/lib/libnetsnmp.so.15#11 0xb792b118 in init_snmp () from 
/usr/lib/libnetsnmp.so.15#12 0x082b6aac in snmpsubagent () at 
/root/home/snmp/src/SnmpInit.cc:407#13 0xb7ba8001 in ?? () from 
/lib/libpthread.so.0#14 0x00000000 in ?? ()For tables do I have to do anything 
different?On Fri, 4 Jan 2008 12:46:30 +0000 "Dave Shield"  wrote  On 4 Jan 2008 
12:35:06 -0000, girish  wrote:  > Well here is the snmpd.conf file which I 
've configured    Just concentrating the access control settings,  you have:    
> rwuser myuser  > rwuser myuser  > rwuser myuser  > rwuser myuser  
  i.e. four copies of the same entry!  plus:    &g
 t; access mygroup "mycontext" authNoPriv myuser    which is not the correct 
syntax for the "access" directive.    Please re-read the documentation for 
access control,  either in snmpd.conf(5) or the FAQ entry     I don't 
understand the new access control stuff - what does it mean?          
http://www.net-snmp.org/wiki/index.php/FAQ:Agent_24    If you don't configure 
things correctly, then no - it won't work.    Dave    
-------------------------------------------------------------------------  This 
SF.net email is sponsored by: Microsoft  Defy all challenges. Microsoft(R) 
Visual Studio 2005.  http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/  
_______________________________________________  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    


Regards,
Girish
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
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