English 中文(简体)
SNMP 类型未签名32 的正确编码是什么?
原标题:What is the correct encoding for SNMP type Unsigned32?

我正在写SNMP代理物,MIB的定义包括未签名32型的OID。

Unix 执行该剂使用 Net- SNMP, 并将 OID 设为 ASN_UNSigned 类型, 因为没有 ASN_UNSigned32 。 当我看到用 Wireshark 的 Get 响应时, 它解码为“ Gauge32 ” 值。 这在第一眼上是有道理的, 因为根据 RFC 1902 无符号32 和 Gauge32 都是一样的 。

视窗的安装基于 Windows SnmpAPI.lib, 将 OID 设置为 ASN_UNSigned32, 当我看到用 Wireshark 的 Get 响应时, 它解码为“ 未签名32 ” 。 这对我来说更好。

为何这2个执行者在电线上产生不同的结果?

究竟哪个版本正确, 我怎样才能从两个执行中得到相同的效果?

最佳回答

结果发现, Net- SNMP 使用目前的 RFC 1902 编码, 其中未签名32 和 Gauge32 相同, Windows 使用过时的 RFC 1442 编码, 其中未签名32 和 Gauge32 有不同的编码。

问题回答

如果您保存 Windows 上的 Wireshark 捕捉功能, 然后在 Unix 上的 Wireshark 中打开它。 然后您可以看到它所显示的类型。 无符号32 和 Gauge32 是标准定义的可互换的, 因此在所有 SNMP 执行中不应有任何不同 。 在线上, 它应该传输相同的字节 。





相关问题
Undefined reference

I m getting this linker error. I know a way around it, but it s bugging me because another part of the project s linking fine and it s designed almost identically. First, I have namespace LCD. Then I ...

C++ Equivalent of Tidy

Is there an equivalent to tidy for HTML code for C++? I have searched on the internet, but I find nothing but C++ wrappers for tidy, etc... I think the keyword tidy is what has me hung up. I am ...

Template Classes in C++ ... a required skill set?

I m new to C++ and am wondering how much time I should invest in learning how to implement template classes. Are they widely used in industry, or is this something I should move through quickly?

Print possible strings created from a Number

Given a 10 digit Telephone Number, we have to print all possible strings created from that. The mapping of the numbers is the one as exactly on a phone s keypad. i.e. for 1,0-> No Letter for 2->...

typedef ing STL wstring

Why is it when i do the following i get errors when relating to with wchar_t? namespace Foo { typedef std::wstring String; } Now i declare all my strings as Foo::String through out the program, ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

Window iconification status via Xlib

Is it possible to check with the means of pure X11/Xlib only whether the given window is iconified/minimized, and, if it is, how?

热门标签