Example of configuring trap recipients?
Jeff Stewart
jstewart____remarq.com
Tue Feb 8 22:33:22 CET 2000
Frank,
In the example code you sent me for sending a trap, there are two lines that
confuse me. Specifically, when encoding the target UDP address:
> OctetStr address;
> for (int i=0; i<4; i++) {
> address += addr[i];
> }
> address += addr.get_port() >> 1;
> address += addr.get_port() & 0x0F;
Should those last two lines read as follows?:
address += addr.get_port() >> 8;
address += addr.get_port() & 0xFF;
?
The latter form seems to work for me. That fix, and browsing the code for a bit to
figure out that the TargetAddrEntry fields belonged in fields 0,1,4, and 5
(skipping 2 and 3 for some reason) was enough to get traps working. Thanks for
your help.
Jeff
More information about the AGENTPP
mailing list