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 have not 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:


© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 02 June 2005