Is it possible to specify the port to send a SNMP Set to?

Jochen Katz katz____agentpp.com
Fri Jun 23 20:11:47 CEST 2000


Hi,

> I apologize, I meant Sending Traps instead of Set statements. I need to be
> able to specify a port to send the trap to other than port 162.
> 
> > I see the XXX.set_port(port) function in the example and in
> > address.cpp but
> > as far as I can tell it isn't working for Set statements, It does seem to
> > work for Get and Walk routines. Anyone have any ideas?

the snmp++/consoleExamples/snmpTraps example can send traps to any port
and the same thing can be done using SnmpRequest::trap(...) (see below)
or the 
NotificationOriginator (see agent++/examples/atm_mib/src/agent.cpp).

Best regards,
  Jochen
____________________________________
UdpAddress a("172.20.41.43/1001");
CTarget t(a);
Vbx* vbs = new Vbx[1];

vbs[0].set_oid("1.3.1.3.1.3");
vbs[0].set_value(10);

t.set_version(version2c);
t.set_readcommunity("public");

SnmpRequest::trap(t, vbs, 1,"1.3.1.3.99", "1.3.1.4.42");
-------------------------------------



More information about the AGENTPP mailing list