genErr in getRequest?

Alex Finogenov afinogenov____malibunet.com
Thu Apr 4 20:00:21 CEST 2002


Marcus,

Agent++ returns all SNMP errors automatically.

If you need to return an error from your code in addition to the agent++, you can use

Mib::requestList-error(req-get_transaction_id(), subRequestId, status);

where req is the request being processed, subRequestId is the varbind's index inside the request, and status is an SNMP error code defined in include/snmperrs.h of SNMP++.

If you keep a reference or pointer to the request being processed, you can also use Request::error():

req->error(subRequestId, SNMP_ERROR_NO_CREATION);

Hope this helps,
Alex


P.S. As it was noted before, please DO NOT send html encoded messages to the forum.




-----Original Message-----
From: Hellsten, Marcus [mailto:Marcus.Hellsten____peek.se]
Sent: Thursday, April 04, 2002 4:16 AM
To: 'agentpp-dl____fock.de'
Subject: genErr in getRequest?


How do I return a genErr to the manager side while processing a getRequest with Agent++? 
Thanks, 
Marcus 




PEEK 
Marcus Hellsten 
Peek Traffic AB 
PO Box 10158 
SE-121 28 STOCKHOLM GLOBEN 
SWEDEN 
Tel:  +46 8 55610700 
Fax: +46 8 6488540 
mailto:marcus.hellsten____peek.se 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.agentpp.org/pipermail/agentpp/attachments/20020404/aa6aaba1/attachment.htm 


More information about the AGENTPP mailing list