snmp 发送类型ASN_OBJECT_ID

参考链接: http://blog.csdn.net/yin138/article/details/50388878

 

 const oid enterprise_oid[]  = {1,3,6,1,4,1,1000,4,1,1};
 int ret = snmp_set_var_typed_value(requests->requestvb, ASN_OBJECT_ID,
                                      enterprise_oid, sizeof(enterprise_oid));

enterprise_id的数组大小要大于6位,否则用snmp get 时获取的是 enterprises

posted @ 2017-05-17 10:15  cogitoergosum  阅读(661)  评论(0编辑  收藏  举报