简体   繁体   English

SNMP代理如何将正确的数据映射到相应的对象标识符

[英]How does an SNMP agent map the correct data to the corresponding Object identifier

For example, sending a GET request to receive how many hours a device has been on for. 例如,发送GET请求以接收设备使用了多少小时。 You send the OID value with the GET request from the manager to an agent, so the agent knows which MIB to traverse into etc... But once it has checked and validated the OID exists how does the correct data get mapped to that specific OID in order to send it back? 您将带有GET请求的OID值从管理器发送到代理,因此代理知道要遍历的MIB等。但是,一旦检查并验证了OID的存在,如何将正确的数据映射到该特定的OID为了发回去?

Thanks. 谢谢。

It is very specific to SNMP agent implementation. 它非常特定于SNMP代理实施。 SNMP does not cover this part. SNMP不涵盖此部分。 It is up to you as SNMP agent developer to decide how you bind OIDs and values. 作为SNMP代理开发人员,由您决定如何绑定OID和值。

Usually, it is some sort of hash table that maps oid to value. 通常,它是将oid映射到值的某种哈希表。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM