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

Registering MIB modules

Once smux_simple_open returns OK, the peer program calls smux_register to register the MIB module it will manage. A MIB module can be registered in one of three modes: readOnly, readWrite, or delete. delete mode is used to remove an existing registration.

A return value of OK from smux_register means only that the registration request was queued for the SNMP agent via the SMUX protocol. At some later time, the agent will issue a response PDU.

On failure, smux_error will be set to one of parameterMissing, invalidOperation, congestion, or youLoseBig. foosmuxd takes the appropriate action based on the error code returned.

    if (smux_register(tc->t_name, -1, tc->t_access) == NOTOK) {
        LIB_ERROR2("smux_register: %s [%s]", smux_error(smux_errno), smux_info);
        smux_fd = NOTOK;
        return;
    }

Next topic: Main loop
Previous topic: Opening

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