sending back PDU response to a SET?

[email protected]
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
Hi Guys,
I want send a PDU response of SET command in a sub-agent.  Is there any
example code for that?
Can I do something like the following?
In a handler,
handle_testoid(netsnmp_mib_handler *handler,
                          netsnmp_handler_registration *reginfo,
                          netsnmp_agent_request_info   *reqinfo,
                          netsnmp_request_info         *requests)

{
netsnmp_pdu *pdu;

switch(reqinfo->mode) 
{
        case MODE_SET_ACTION:
            /* XXX: perform the value change here */
	
		pdu = snmp_pdu_create(SNMP_MSG_SET);
            netsnmp_set_request_error(reqinfo, requests, pdu->errstat);

}
 }

Thanks

------------------------------------------------------------------------------

_______________________________________________
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.