[AGENT++] OID value as IP address

Zhenyu Zhou zzy.cs.sxfs at gmail.com
Fri Oct 21 21:50:17 CEST 2016


Hello,

I'm using SNMP++ library to parse the packet I received (by `unload()` to
convert snmpmsg into pdu). However, I find when the OID value is IP
address, even if my packet is valid, I will only get a pdu without any
variable bindings.

I debugged it and found SNMP++ checks whether the IP address is valid by
`gethostbyname()`. But of course such behavior makes the address given by
the remote device invalid and not being put into my pdu. (For example, the
address I got is "10.0.0.1" and it is not valid on my host machine.)

Any idea to fix this, or disable such checking?

Thanks!

Best Regards!

Zhou, Zhenyu


More information about the AGENTPP mailing list