From: <no...@so...> - 2001-05-26 15:57:02
|
Patches item #416026, was updated on 2001-04-13 14:30 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=312694&aid=416026&group_id=12694 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: John Naylon (jbpn) Summary: row registristraion for agentx Initial Comment: This patch adds row registration capability for agentx. A new registry function (register_mib_table_row() ) was added. There are several fixes to handle the case where the registration of a single row in a table is registered for. In this case you are actually registering fully qualified instances. The function register_mib_table_row() allows the caller to register a single row or a set of rows. The function is similar to register_mib_context(), but different enough that I thought I should implement it in another function. I did not what to break working code. If some one with more knowledge than I wants to merge the two, please do. For the registration to work properly, the oid supplied must be the oid of the first column in the table with at least the first subid of the index portion of the instance. If registering for a single row, the entire index for the row must be present and the flags argument must be set to FULLY_QUALIFIED_INSTANCE. Because the oid is the oid of the first column in the table, the length field in the variable table produced by mib2c should be set to 0 for all entries. The following is a list files that were modified: new/agent/agent_registry.c: --------------------------- ++ added several fixes to handle fully qualified instances ++ added the function register_mib_table_row() new/agent/agent_registry.h -------------------------- ++ added the prototype for the register_mib_table_row() ++ added a new member "flags" to the register_parameters structure This was needed to make sure the AGENTX_MSG_FLAG_INSTANCE_REGISTER flag was set properly. new/agent/mibgroup/agentx/client.c ----------------------------------- ++ added the argument flags to agentx_register() . Allows the AGENTX_MSG_FLAG_INSTANCE_REGISTER to set properly. ++ added the logic to set the AGENTX_MSG_FLAG_INSTANCE_REGISTER bit in the agentx header. new/agent/mibgroup/agentx/client.h ----------------------------------- ++ modified the protoype of agentx_register() to match the function new/agent/mibgroup/agentx/master_admin.c ----------------------------------------- ++ added more logic to handle fully qualified instances on the master agent side. new/agent/mibgroup/agentx/master_request.c ------------------------------------------- ++ handles special cases for getnext with fully qualified instances new/agent/mibgroup/agentx/subagent.c ------------------------------------ ++ agentx_registration_callback() calls agentx_register(), needed to add the flags argument to the function agentx_register(). This makes it consistant with change in client.c new/agent/var_struct.h ---------------------- ++ added #define FULLY_QUALIFIED_INSTANCE 0x01. This is intended to be stored in the flags member of the subtree structure. ---------------------------------------------------------------------- >Comment By: John Naylon (jbpn) Date: 2001-05-26 08:57 Message: Logged In: YES user_id=93926 This doesn't work for me, but perhaps I am doing something wrong. Can you provide a small example please? It seems to me that snmp_vars.c: search_subtree_vars() also needs extending to detect and cope with fully qualified instance registrations. ---------------------------------------------------------------------- Comment By: John Naylon (jbpn) Date: 2001-05-25 09:05 Message: Logged In: YES user_id=93926 Thanks very much for this patch. I am evaluating it at the moment (looks good) and I will apply it to the CVS tree shortly. ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=312694&aid=416026&group_id=12694 |