Re: Problem with scotty

Juergen Schoenwaelder (schoenw@gaertner.de)
Fri, 11 Apr 1997 15:35:17 +0200

Malcom.Bright@jet.uk said:

Malcom> Thanks for your reply. As it was a small routine could you
Malcom> send a copy of it and what changes to call it (no need for a
Malcom> proper patch file). So I may include in our 2.1.5 version.

OK, here is the new function which goes into tnmSnmpUtil.c:

u_int
TnmSnmpGetRequestId()
{
u_int id;
Tnm_SnmpRequest *rPtr = queueHead;

do {
id = rand();
for (rPtr = queueHead; rPtr && rPtr->id != id; rPtr = rPtr->nextPtr) {
/* empty body */
}
} while (rPtr);

return id;
}

This function should be called at several places in tnmSnmpTcl.c where
you usually find an assignement like:

pdu->request_id = ++session->reqid

This should do the trick. However, you might have to make some
adjustments because I have not tested this with 2.1.5.

Juergen

-- 
Juergen Schoenwaelder     <schoenw@gaertner.de>     (Tel: +49-531-23873-0)
Gaertner Datensysteme, Hamburger Strasse 273a, 38114 Braunschweig, Germany
--
!! This message is brought to you via the `tkined & scotty' mailing list.
!! Please do not reply to this message to unsubscribe. To subscribe or
!! unsubscribe, send a mail message to <tkined-request@ibr.cs.tu-bs.de>.
!! See http://wwwsnmp.cs.utwente.nl/~schoenw/scotty/ for more information.