Re: snmpwalk without OID

2009-11-04 Thread dan anderson
> when we do snmpwalk or snmpgetbulk, we know which tree/subtree is used to > retriving the values from. Not really. A GETNEXT query can't return a lexicographically earlier object, but apart from that you don't really know what'll be returned. If you did, you could just issue consecutive GET que

ok to run the agent in one thread & send traps from another?

2009-11-04 Thread dan anderson
Hi all, The FAQs suggest that the agent is not designed to be run multithreaded. Is it ok, however, to run the agent in one thread and to send traps using the net-snmp API in another? I'm currently doing so, sending traps using snmp_sess_init, snmp_open and snmp_sess_transport to set up the connec

table_dataset2 in comments

2009-09-29 Thread dan anderson
man/netsnmp_table_dataset.3 (line 130) (which I think is used to generate http://net-snmp.sourceforge.net/dev/agent/group__table__dataset.html, which has this too) and agent/helpers/table_dataset.c (line 40) both say "This helper is obsolete. If you are writing a new module, please consider using t

Re: addrCache

2009-08-23 Thread dan anderson
2009/8/23 Magnus Fromreide : > I have now looked further and it seems that the function of the address > cache is to rate limit the number of > LOG_INFO: Received SNMP packet(s) from > log messages Oh, the line 'snmp_log(LOG_INFO, "Received SNMP packet(s) from %s\n", addr);'? I thought that loggi

addrCache

2009-08-20 Thread dan anderson
I'm looking at net-snmp-5.4.2/agent/snmp_agent.c and addrCache within. As far as I can tell, while this cache is initialized and maintained by the agent, it's never actually *accessed* beyond keeping it up to date. Is this vestigial code that the agent has evolved past needing? In 5.5 RC1's snmp_ag

Re: MIBS=ALL not needed?

2009-06-09 Thread dan anderson
Aha, I hadn't changed --default-mibs. That's it. Thanks kindly! -Dan 2009/6/9 Wes Hardaker : >>>>>> On Tue, 9 Jun 2009 15:57:58 -0700, dan anderson >>>>>> said: > > da> A few places in the docs it is mentioned that MIBS=ALL is needed to

MIBS=ALL not needed?

2009-06-09 Thread dan anderson
A few places in the docs it is mentioned that MIBS=ALL is needed to denote that all mib files (normally in /usr/local/share/snmp/mibs/) should be loaded. Alternately, individual mibs can be specified instead of the ALL keyword. In my testing, library calls to snmp_parse_oid parse the mibs in that d

Re: Net-SNMP and web server

2009-04-22 Thread dan anderson
> Oh yes, I could use this third approach, but in that case I need to > write the "retrieval routines" two times: in HTTP and in Net-SNMP > agent. If you can afford the overhead, and the data is small enough that RS232's limited bandwidth won't be a bottleneck, why don't you write a simple common

Re: snmptrap ignores user-supplied source IP?

2009-03-31 Thread dan anderson
given). If anyone has the knowledge to be able to say whether it's the app or the lib's behaviour that's incorrect, I'd appreciate knowing. Cheers, -D 2009/3/31 dan anderson : > Tested and confirmed that setting pdu->agent_addr does not cause that > to be used a

Re: snmptrap ignores user-supplied source IP?

2009-03-31 Thread dan anderson
is this field actually supposed to be used as the agent's source address, making it a bug in the library? -Dan 2009/3/30 dan anderson : > The snmptrap util seems to be ignoring the source ip provided. > > Details: > pdu->agent_addr is where snmptrap (apps/snmptrap.c) store

snmptrap ignores user-supplied source IP?

2009-03-30 Thread dan anderson
The snmptrap util seems to be ignoring the source ip provided. Details: pdu->agent_addr is where snmptrap (apps/snmptrap.c) stores the user-supplied source IP. snmpdtrap sends packets using snmp_send from snmp_api.c, which in short order calls _sess_async_send, which if UDP is being used eventuall

com2SecList

2009-01-09 Thread dan anderson
Why is there no exposed API for adding to com2SecList in snmpUDPDomain.[c|h]? Right now the only way to add a community->securityname mapping programatically is to call the token parser; is this because of a plan to deprecate com2SecList? Also, why are vacm_conf.c:vacm_in_view() and vacm_conf.c:va

Re: net-snmp agent API document is lacking

2008-11-21 Thread dan anderson
-Dan 2008/11/21 Jared Gisin <[EMAIL PROTECTED]>: > How do I get involved in helping clean up this documentation? > > -Original Message- > From: dan anderson [mailto:[EMAIL PROTECTED] > Sent: Wednesday, November 19, 2008 3:11 PM > To: Jared Gisin > Cc: net-snmp-

Re: net-snmp agent API document is lacking

2008-11-19 Thread dan anderson
Oh, and I haven't got it handy but there is definitely a page somewhere on net-snmp.org with info on multiple handlers for a given mib object. 2008/11/19 dan anderson <[EMAIL PROTECTED]>: > Try http://net-snmp.sourceforge.net/dev/agent/group__handler.html#_details > for some inf

Re: net-snmp agent API document is lacking

2008-11-19 Thread dan anderson
Try http://net-snmp.sourceforge.net/dev/agent/group__handler.html#_details for some information to start off. Yeah, the docs are a little lacking in some areas. If you find yourself understanding things and able to articulate that knowledge, I'm sure many people would be grateful if you wrote it u

Re: patches?

2008-11-10 Thread dan anderson
0 Thomas Anders <[EMAIL PROTECTED]>: > dan anderson wrote: >> Er, I just realized that the net-snmp site says to submit patches >> using this list, but I don't recall actually seeing any - is this the >> right place? > > Not sure where this is stated. The be

patches?

2008-11-10 Thread dan anderson
Er, I just realized that the net-snmp site says to submit patches using this list, but I don't recall actually seeing any - is this the right place? -Dan - This SF.Net email is sponsored by the Moblin Your Move Developer's ch

comment patch

2008-11-10 Thread dan anderson
For $SNMP_ROOT/snmplib/snmpusm.c: 3031,3033d3030 < * Note: userList must not be NULL (obviously), as thats a rather trivial < * addition and is left to the API user. < * Since that statement is wrong - misleadingly so. -Dan -

USM user to netsnmp_session

2008-10-29 Thread dan anderson
Hi all, There is a session->usmUser converter, but I can't find a usmUser->session converter. It's not quite as simple as copying over fields, since in a multilingual situation the snmpCommunityTable might need to be referenced. Does this converter exist somewhere, and am I just not finding it? -