On 26/02/2008, Devvrat Tripathi <[EMAIL PROTECTED]> wrote: > Suppose you have registered a handler for a particular OID will the > requests->requestvb contain the name and name_length of that OID. I > registered my handler for a particular OID and inside my handler i direct > the SET request somewhere else.
OK so far. > for that i need to add a variable using snmp_add_var. Why? What exactly are you trying to do? > I do > snmp_add_var(pdu,requests->requestvb->name, > requests->requestvb->name_length, > type,(const char *)mystring); Which "pdu" structure are you adding this varbind to? I hope you're not messing with the PDU from the SET request! > Somehow the agent stops working after i do it. If you are mangling the incoming SET request, then this will indeed utterly confuse the agent. Within the handler routine, the *only* thing you should touch is the 'requests' list (and the requestvb structures that hang off it). Dave ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ 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
