Get SNMP MIB Configuration
更新时间: 2025/06/26
在Gitcode上查看源码

2Ah-获取SNMP-MIB参数(Get-SNMP-MIB-Configuration)

修订记录

openUBMC版本号修订日期修订内容
25.062025/06/26初稿,新增命令详情

基本信息

功能说明

获取SNMP MIB参数。

权限

命令信息

请求信息

字节顺序域取值说明
NetFn30h
CMD93h
1:3Manufacturer ID,LS Byte first。长度固定3个字节,例如,某厂家ID是2011,对应十六进制为0x0007DB,则字节序为第1个字节为DBh、第2个字节为07h、第3个字节为00h。
4Sub command,子命令=2Ah
5SNMP MIB Parameter,见 表1 。
6Block Selector (00h if parameter does not require a block number)
7Sub Block Selector (00h if parameter does not require a sub block number)

响应信息

字节顺序域取值说明
8Read Offset,读取的数据偏移,从0开始。
9Length,读取长度
1Completion Code
2:4Manufacturer ID,LS Byte first。长度固定3个字节,例如,某厂家ID是2011,对应十六进制为0x0007DB,则字节序为第1个字节为DBh、第2个字节为07h、第3个字节为00h。
5End of List,表示当前数据是否结束。
当参数数据比较长的时候,可能需要分多次读取,通过此字段可以判断数据是否读完。
[7:1]:reserved
[0]:End of list
0=last data
1=middle data
6:NData,实际返回的数据可能小于等于Read length。

命令样例

查询置SNMP MIB参数

请求:

ipmicmd -k "0f 00 MM NN" smi 0

响应:

0f MM NN

附表1 SNMP MIB Parameter

ParameterParameter Data#(10进制)
Access TypeBlock Selector=Item Selector考虑扩展,取值:1~5,目前只取值1和2有效
data1-Access Type
1h-read-only
2h-read-write
1
CommunityBlock Selector=Item Selector考虑扩展,取值:1~5,目前只取值1和2有效
data1:N-Community
Max 18 Bytes. End by null if less than 18 Bytes
2
Access IP AddrBlock Selector=Item Selector考虑扩展,取值:1~5,目前只取值1和2有效
Sub Block Selector=Select IP,取值1~3
data1:N-Source Addr, IPv4 or IPv6 or Hostname, data type:string
Max 255 Bytes. End by null if less than 255 Bytes
3

返回到索引