Dear all, I'm now working on extending Net-SNMP main agent with dynamically loadable sub- agents. The sub-agent registers to main agent its OIDs and converts SNMP requests (GET and SET) received in the registered handler to RS232 commands for my piece of equipment. This technique can be improved in many points but, for the moment, it works very fine. So I can connect by RS232 my piece of equipment A to an embedded Linux box running Net-SNMP agent and my sub-agent. The user can manage A from remote by using SNMP manager.
The problem arises when I consider that the machine user has is composed by many pieces of equipments. For example, one user has a machine composed by A and B; another user can have a machine composed by A, A and B (two pieces of A equipment). I'd like to connect all the pieces to a bus (RS485 instead of RS232) and use *only one* Linux box connected to the same bus. In this way, the sub-agent can send commands to a piece depending on OID received. And it works very fine. The question I can't answer is: "what kind of MIB I should write?" In the first case, when each piece of equipment has its Linux-box and its SNMP agent, the problem is simple. I have a MIB for A, another MIB for B and so on. MIB-A is registered to the subtree ...enterprises.mycompany.A... MIB-B is registered to the subtree ...enterprises.mycompany.B... and so on This is very simple. If I have just one SNMP agent serving many pieces of equipment, what could be the structure of the MIB? I think I must register a subtree for each combination of the pieces: The user with a machine composed by A and B pieces I have two subtrees: ...enterprises.mycompany.user1.A... ...enterprises.mycompany.user1.B... The user with a machine composed by A, A and B: ...enterprises.mycompany.user2.A1... ...enterprises.mycompany.user2.A2... ...enterprises.mycompany.user2.B... I think it's not a good way to proceed. In short time my company will have a very complex MIB, for me and for my users! I'm not sure but I imagine there is a better method... ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Net-snmp-coders mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
