Setting a Scalar

Simon Chamlian <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <CAJTs9VnSG=iLmQ=K=2x4=nLRi0Q5Xiba1hvfYUHQjt=EsRLPDg@mail.gmail.com>
Hi,

While setting a scalar, I see that

MODE_SET_RESERVE2

and

MODE_SET_COMMIT

are called in the handler.

What do we use them for?

i.e.,

int handle_xxx(netsnmp_mib_handler *handler,
                      netsnmp_handler_registration *reginfo,
                      netsnmp_agent_request_info   *reqinfo,
                      netsnmp_request_info         *requests)
{
    int ret;


    switch(reqinfo->mode) {

        case MODE_GET:
            // ....
            break;

        case MODE_SET_RESERVE1:
            // ....
            break;

        case MODE_SET_ACTION:
            // ....
            break;

        case MODE_SET_RESERVE2:
            // ....
            break;

        case MODE_SET_FREE:
            // ....
            break;

        case MODE_SET_COMMIT:
            // ....
            break;

        case MODE_SET_UNDO:
            // ....
            break;

        default:
            /* we should never get here, so this is a really bad error */
            return SNMP_ERR_GENERR;
    }

    return SNMP_ERR_NOERROR;
}

Thanks,
S

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure

_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.