On Tue, 14 Jul 2015 15:07:07 +0000 (UTC) Albert wrote:
AS> in a mib which my c application supportsi have a table for
AS> which i have generated code with mib2c, using
AS> mib2c.array-user.conf. this works so far, but now multiple
AS> instances of my subagent are required to run. the design is
AS> such that the table shall now contain rows delivered by
AS> different subagent instances(a column to hold the subagent
AS> instance id has been added to the table index).

Did you add the subagent id as the first index or the last?

AS> i heard that for this i need to register each row which is
AS> inserted into the table - so that the master agent (snmpd) can
AS> know which subagent instance to ask, to answer a request for
AS> row data. 

I'm not 100% positive, but I don't think this is the case. I just
did some quick skimming of the agentx spec, and you don't have to
register a complete OID. So if your subagent id is the first index,
you should just need to register once per subagent.

AS> i have tried to achieve this with "netsnmp_register_instance"

No, the instance handler is just for scalars, not tables.

AS> maybe i need to use register_mib_table_row, or
AS> register_mib_range?or is even the code generated by
AS> mib2c.array-user.conf incompatible with what i need? 

The netsnmp_handler_registration (my_handler) contains the items
you'll need to set up for a partial registration (range_subid and
range_ubound). See rfc 2741 (6.2.3. The agentx-Register-PDU) for
details on range registrations, and netsnmp_table_row_register()
for and example of registering a single row. (I think that what you
need would be similar, just with one more sub-oid for the sub-agent
instance id).

AS> i am using net-snmp 5.5.

Hmm... If your initial testing doesn't pan out quickly with 5.5, I
suggest that you switch to 5.7.x for testing. Once things work with
5.7.x, then you can go back to 5.5 and see if it still works there.

Robert

------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to