Get SNMP MIB Configuration
更新时间: 2026/08/06
在Gitcode上查看源码Get SNMP MIB Configuration
Change History
| openUBMC Version | Revision Date | Description |
|---|---|---|
| 25.06 | 2025/06/26 | Initial draft: add command details |
Basic Information
Function Description
Obtain SNMP MIB parameters.
Privilege
Command Information
Request Information
| Byte | Data Field |
|---|---|
| NetFn | 30h |
| CMD | 93h |
| 1:3 | Manufacturer ID, LS Byte first. The length is fixed to three bytes. For example, if the vendor ID is 2011 and the corresponding hexadecimal value is 0x0007DB, the first byte is DBh, the second byte is 07h, and the third byte is 00h. |
| 4 | Sub command: 2 Ah |
| 5 | SNMP MIB parameter. For details, see Table 1. |
| 6 | Block Selector (00h if parameter does not require a block number) |
| 7 | Sub Block Selector (00h if parameter does not require a sub block number) |
Response Information
| Byte | Data Field |
|---|---|
| 8 | Indicates the read offset. The value starts from 0. |
| 9 | Indicates the read length. |
| 1 | Completion Code |
| 2:4 | Manufacturer ID, LS Byte first. The length is fixed to three bytes. For example, if the vendor ID is 2011 and the corresponding hexadecimal value is 0x0007DB, the first byte is DBh, the second byte is 07h, and the third byte is 00h. |
| 5 | End of List, indicating whether the current data is complete. Long data may need to be read multiple times. This field is used to check whether data is completely read. [7:1]: reserved [0]: End of list 0=last data 1=middle data |
| 6:N | Indicates the data. The returned data may be less than or equal to the read length. |
Reference
Table 1 SNMP MIB Parameter
| Parameter | Parameter Data | No. (Decimal) |
|---|---|---|
| Access Type | Block Selector=Item Selector is extended. The value ranges from 1 to 5. Currently, only the values 1 and 2 are valid. data1-Access Type 1h-read-only 2h-read-write | 1 |
| Community | Block Selector=Item Selector is extended. The value ranges from 1 to 5. Currently, only the values 1 and 2 are valid. data1:N-Community Max 18 Bytes. End by null if less than 18 Bytes | 2 |
| Access IP Addr | Block Selector=Item Selector is extended. The value ranges from 1 to 5. Currently, only the values 1 and 2 are valid. Sub Block Selector=Select IP. The value ranges from 1 to 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 |
Command Example
Query and set SNMP MIB parameters.
Request:
bash
ipmicmd -k "0f 00 MM NN" smi 0Response:
text
0f MM NN