Re: pass_persist agent doesn't work with snmpwalk (probable noob question)

2012-03-17 Thread Vincent Bernat
OoO En cette  nuit nuageuse du samedi 17 mars  2012, vers 00:02, Charlie
Martin crmar...@sgi.com disait :

 Use:
 snmpwalk -On -v 2c -c copan psmdev1 1.3.6.1.4.1.59.1.5.3.1.1

 1020 $ snmpwalk -On -v 2c -c copan psmdev1 1.3.6.1.4.1.59.1.5.3.1.1
 .1.3.6.1.4.1.59.1.5.3.1.1 = No Such Instance currently exists at this OID

 Which actually corresponds to the overall problem I'm trying to figure
 out.  So, let's say I send

 snmpget -On -v 2c -c copan psmdev1 1.3.6.1.4.1.59.1.5.3.1.1

You should get No such instance

 and

 snmpgetnext -On -v 2c -c copan psmdev1 1.3.6.1.4.1.59.1.5.3.1.1

You should get 1.3.6.1.4.1.59.1.5.3.1.1.1 = 9 (if I remember correctly)

Maybe you don't handle this last bit in your pass_persist script: if the
requested OID is less than the  first OID you can serve, you must return
the first OID you can serve.

snmpwalk 1.3.6.1.4.1.59.1.5.3.1.1.2 does agetnext on
1.3.6.1.4.1.59.1.5.3.1.1.2   and   get  1.3.6.1.4.1.59.1.5.3.1.1.3   but
returns  nothing because it  is not  included in  the subtree  rooted at
1.3.6.1.4.1.59.1.5.3.1.1.2.
-- 
Vincent Bernat ☯ http://vincent.bernat.im

 /* Nobody will ever see this message :-) */
panic(Cannot initialize video hardware\n);
2.0.38 /usr/src/linux/arch/m68k/atari/atafb.c

--
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


purpose of pipe in netsnmp_callback_send/recv functions

2012-03-17 Thread sarath azad
Hello,
 
 
Is the pipe used in netsnmp_callback_send/recv function, is for synchronization 
purpose ? 
If yes, how is this approch better than other synchronisation methods like 
semaphores as we are storing one character for marking the push/pop from the 
queue?
 
 
Thanks and regards
S Sarath--
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


SNMPv3 trapsess Definition and Engine ID in 5.7.1

2012-03-17 Thread Gary Dunlap
Hi.  Is there any syntax change required for trapsess -v 3  or engineIDType 
statements in snmpd.conf, in Net-SNMP 5.7.1?  I'm comparing to 5.6.1.

My apologies in advance if this is a duplicate question or posted on the wrong 
list.  I looked at the users, bugs, patches, and coders lists for the past year 
and didn't see a match.  I also posted a similar question on the users list but 
didn't get any responses.

It appears that this trapsess user does not become part of the userList, either 
in the MIB usmUserTable or the internal userList.  Then no trap gets sent, 
because the USM name wasn't found.

There's a new function usm_create_user_from_session() and some logic around the 
presence/timing of the engine ID.  The function isn't running due to an 
apparent engine ID length of 0.  I do have an engineID, generated by 
engineIDType 3 and present in /var/net-snmp/snmpd.conf.

The code that handles the trapsess directive, snmpd_parse_config_trapsess(), 
calls snmp_add, which fails for this session due to a zero engineIDLength.  
Snmp_add() is followed by the function snmpv3_get_engineID() and a memdup() 
which might have put the engineID in the session where it was needed.  This is 
just a guess on my part, because there's also code that would seem to probe for 
an engineID.  It was my understanding that a probe for the engineID wouldn't be 
done when snmpd sends a trap, and that instead it would use the engineID of 
snmpd.

I made a workaround by generating the equivalent of the type 3 engineID in 
usm_create_user_from_session, and adding it to the session there.  But it's not 
a general solution.

Thanks for your help.

Gary


Gary Dunlap


--
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders