[AGENT++] How to Stop Response to Request

Jochen Katz katz at agentpp.com
Fri Jan 6 21:44:58 CET 2006


Hi,

> I have used agent++ to implement a SNMP agent and it's responding to
> SNMP get-request now. Next, I wish to add some codes in the
> instrumentation section of every get_request() such that if a certain
> flag is set, it will ask agent++ to simply not respond to the
> get-request packet, resulting in a device down or timout at the
> network manager. How may I do this?

it's easier to do this in the main loop:

while (run) {
   req = reqList->receive(2);
   if (req) {
	if (let_it_time_out)
          delete req;
        else
          mib->process_request(req);
   }
   else {
      mib->cleanup();
   }
}

Regards,
  Jochen



More information about the AGENTPP mailing list