diff --git a/lib/client.js b/lib/client.js index 52be399..1df973c 100644 --- a/lib/client.js +++ b/lib/client.js @@ -176,7 +176,15 @@ Client.prototype.getBulk = function (ip, community, non_repeaters, repeaters, Client.prototype.SNMPv2_Trap = Client.prototype.inform = function (ip, community, uptime, oid, varbinds, cb) { var self = this; - send(this, ip, 162, message.createMessage({ + + var port = 162; + var addr = ip.split(":"); + if (addr.length == 2) { + ip = addr[0]; + port = parseInt(addr[1]); + } + + send(this, ip, port, message.createMessage({ version: 1, community: community, pdu: PDU.createPDU({