質問

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