Developing SMUX peers for SNMP agents

Implementing an SMUX peer

This topic describes the tasks required to implement an SMUX peer:

The SMUX API contains a reference peer called foosmuxd which you can modify for your SMUX peer. foosmuxd is a ``dummy'' peer, in that it pretends to manage an imaginary multiport serial board; because the serial board does not actually exist, foosmuxd ``gets'' hard-coded data. If your peer needs to communicate with a device or to read/write a file in order to manage the device, you have to add this capability to foosmuxd. If you are developing your own peer, you should replace all occurrences of the string ``foo'' with your company name or some string which uniquely describes your peer.

The foo SMUX peer daemon is implemented with the following five files:

The foo MIB module is described in this file in concise MIB format. This MIB module is a simplified one that pretends to be for a multiport serial board; a real MIB module would be much larger. This is the input file for the MIB compiler mosy. If you are writing your own MIB module you must modify this file.


This file implements the foo MIB module. It contains functions which allow the MIB objects to be read and written. If you are writing your own peer you must modify this file.


This file contains the SMUX peer main() function and the infinite loop of the daemon. The data structures and functions in foomib.c are used by the code in this file. If you are writing your own SMUX peer you will probably not need to modify this file.

This is the make file for the foo SMUX peer daemon. If you are writing your own SMUX peer you will need to modify this file to refer to your files instead of the ``foo'' files.


This is a header file used by foomib.c and foosmuxd.c. You will only need to modify this file if you wish to define enterprise-specific traps. See ``Peer sends trap to agent'' and ``Generating traps'' for more information.

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