DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Developing SMUX peers for SNMP agents

Generating traps

You may find it useful (or perhaps necessary) to have your SMUX peer generate traps based on the occurrence of certain types of events, such as specific errors. Implementing these enterpriseSpecific traps will involve the following steps:

  1. Define the required enterpriseSpecific traps.

  2. Make sure that all objects appearing in the VarBindList have been defined in the peer's MIB module. If they haven't been, you will have to define them there now.

  3. Write code that constructs a VarBindList and then issues a trap message.

Now consider this example, in which foosmuxd could be modified to generate a trap when a serial line ``dies'':

  1. First, the file smuxpeer.h must be edited to #define this enterpriseSpecific trap:
        #define    LINE_DEATH_ERROR_TRAP    1
    

  2. When a serial line death occurs, this example trap will convey the board status and serial line number. Both of these values are already defined in the foo MIB under the object names boardStatus and serialLineNumber, so no further modification of the foo MIB module is necessary.

  3. The following code should be put in the code path that is executed whenever the serial line dies:



Next topic: Configuration files
Previous topic: Writing set functions

© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003