Dear Igor (or anyone else interested in this problem),

I am trying to have one master agent, and multiple AgentX subagents, each 
implementing a row of the same table.  It sounds like you have done this, but I 
have not been able to.  From what I understand you to say, you call 
netsnmp_create_handler_registration(), with oid set to the entire oid of a 
column object (the first one, I assume), including the index, then set 
range_subid to the OID_LEN of the entire oid, including the index.  Then set 
range_ubound to the upper bound of the set of rows you want to handle.  In my 
case, it's the same as the index, since I want one row each.  Then the handler 
will be called for ALL columns with that index.

Do I have this right?

I don't really understand this.  How does netsnmp_create_handler_registration() 
know that you want all the columns for that row, and not just the single column 
at that row?

Also, how do I tie the handler to netsnmp_register_table_data_set()?  You need 
to pass that the oid of the table.  Have you tried this?

Have you seen any other mail or docs about this?  Do you have any more detailed 
code examples?

Thanks,

Phil Gillis

-----Original Message-----
From: Grasic Igor [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 01, 2004 3:18 AM
To: [EMAIL PROTECTED]
Subject: Re: Adding interfaces to the IFMIB via AgentX 

     Hello codders, John,

The third way to register some rows in table via AgentX is to use
'netsnmp_register_handler' with set 'range_subid' and 'range_ubound' to the
point in the oid, where is defined column number for the object and with the
oid for the whole (!) row, included with the ifIndex at the end.

In that way registered handler will always get only the request for the
registered ifIndex, but for all column objects. Of course, in the handler
you shouldn't forget to implement  serving multiple request and
MODE_GET_NEXT requests (depends on the flags)...

Anyway, if you gonna look at mailing list, I already made some questions
concerning the same problem you have. I tried with registering intances,
but... if you have big number of objects, memory consumption of the running
agent drasticaly increase.

I hope, that this will help you some way.

Enjoy,
Igor G.





Igor Grasic, Ms. D.
Development Engineer
Iskra Transmission, d. d., Ljubljana
Stegne 11, SI-1000 Ljubljana, Slovenia
www.iskratr.si, www.iskratr.com




   SNMP Coders,

 I have searched online for a couple of days now, and
 have read rstory"s faq quite throughly, but I can"t
 seem to find a good way to register additional rows to
 an existing (standard) table such as the ifmib through
 AgentX.  The only way I have found to do this is to
 register each OID in the table for each inteface using
 netsnmp_watcher and netsnmp_instance... which means
 alot of registering, and alot of function handlers.
 This is very inefficient and non-extensible.

 AgentX will be running on another machine and I want
 that sub agent to add in (register) its ethernet
 interfaces to an exisiting agent.  That way, when the
 network manager walks the IFMIB of the exisiting
 agent, it will be able to see the interfaces on the
 exisiting agent AND the interfaces on the machine that
 is running the subagent.  I hope this makes sense.  If
 you need me to draw up some pictures to explain more
 clearly, let me know.

 Thank you for any support you can provide,

 John



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
Net-snmp-coders mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
_______________________________________________
Net-snmp-coders mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to