Re: agent does not get called when registered at '.1'

Mark Ellison <[email protected]>
Newsgroups gmane.network.net-snmp.user
Organization Ellison Software Consulting, Inc.
Message-ID <[email protected]>
Hi Fulko,

On 04/01/2009 02:00 PM, Fulko Hew wrote:
>
> I've managed to get a lot farther in my universal agent/network simulator,
> but todays problem is:
>
> "An agent registered at '.1' does not receive any requests,
> but agents registered at '.1.x' (and elsewhere) do receive requests"
>
> For example: Lets say I query the agent with getNext ('1.3.6.1.2.1.1.1')
> And given the agent code:
>
> my $regoid = new NetSNMP::OID('.1.3');
> $agent->register($0, $regoid, \&my_snmp_handler);
>
> my agent receives the query, but...
> if I register my agent with the OID '.1'  instead (right at the
> top of the tree so I get _every_ request) my handler doesn't get
> called, but something inside the daemon does cause it to respond
> with 'noSuchName'.
>
> Any clues?
> Is there something that says registering at the top of
> the OID tree is wrong, illegal, or a bug/feature?
>
The shortest possible OID subtree is two subids in length.  If you 
register '.1' it is likely you are really registering '.0.1'.   (There 
are some funky rules about encoding the first subid in an OID.)

You will still get every request by registering '.1.3'.  Everything 
published for SNMP object-types, etc. is under .1.3.6.1 anyway.  (See 
RFC 1065).

Regards,

Mark
http://EllisonSoftware.com/Company/

------------------------------------------------------------------------------

_______________________________________________
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.