Thank you for providing the full code. Compiling this, it became clear very quickly that the problem is nothing to do with the handling of notifications. I tried the following:
- Commented out all of the code relating to traps; compiled the agent; walked your subtree. This listed the first four scalars (up to systemType) and then the agent crashed. - Restarted the agent; Issued a GET request on systemStatus.0 The agent crashed again. - Restarted the agent; Issued a GET request on systemJBODNumber.0 The agent crashed again. - Commented out the registration of these two objects; compiled the agent; walked your subtree. This complete successfully. You need to look more closely at the handler routines for these two MIB objects. Some more general advice: Don't try to implement the whole MIB in one go. Build it up piece by piece. Start with the code for the scalar objects - and check each of these individually (using "snmpget"). Once your happy that these work in isolation, run "snmpwalk" on the whole lot to make sure things are OK. Then move on to the table Once you're happy that the main management objects are working properly - *then* (and only then) is it sensible to start thinking about the notifications. Trying to do everything in one go - particularly when you are not very experienced - is simply asking for trouble. There's also a problem with the implementation of the IP address and PhysAddress objects. These are meant to be *binary* strings, not text strings. You need something like unsigned char ipaddress[] = {201, 201, 201, 201}; unsigned char macaddress[] = {0, 0x0c, 0x29, 0xd5, 0xbc, 0xb7 }; and then use "sizeof" rather than "strlen" in the handler routines. But the basic problem is in the handler routines for the Status and JBODNumber objects. Dave ------------------------------------------------------------------------------ The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com _______________________________________________ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users