I'm trying to send OctetString in SNMP trap. I'm using SNMP4J to do so.

The problem is that I need to put colon (':') in my string. Since the OctetString use colon as a separator my string is cut in the middle (where the colon is).

Is there a way to escape my message?

Thanks

有帮助吗?

解决方案

You may capture network packets to see at which spot the packet becomes corrupt. OCTET STRING type does not use colon as separator, and this is according to SNMP protocols.

其他提示

With SNMP4J's OctetString you do not have to put a colon in your string. This is only the case when you create an OctetString instance form a HEX string using the default format. If you have an UTF-8 string, simply use new OctetString("myString").

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top