Get Service Configuration
更新时间: 2025/06/26
在Gitcode上查看源码10h-获取服务配置信息(Get-Service-Configuration)
修订记录
| openUBMC版本号 | 修订日期 | 修订内容 |
|---|---|---|
| 25.06 | 2025/06/26 | 初稿,新增命令详情 |
基本信息
功能说明
获取服务配置信息。
权限
ReadOnly
命令信息
请求信息
| 字节顺序 | 域取值说明 |
|---|---|
| NetFn | 30h |
| CMD | 93h |
| 1:3 | Manufacturer ID,LS Byte first。长度固定3个字节,例如,某厂家ID是2011,对应十六进制为0x0007DB,则字节序为第1个字节为DBh、第2个字节为07h、第3个字节为00h。 |
| 4 | Sub command,子命令=10h |
| 5 | Service ID,见 表1 |
| 6 | Service Parameter,见 表2 |
| 7 | Block Selector (00h if parameter does not require a block number) |
| 8 | Read Offset,读取的数据偏移,从0开始 |
| 9 | Length,读取长度 |
响应信息
| 字节顺序 | 域取值说明 |
|---|---|
| 1 | Completion Code |
| 2:4 | Manufacturer ID,LS Byte first。长度固定3个字节,例如,某厂家ID是2011,对应十六进制为0x0007DB,则字节序为第1个字节为DBh、第2个字节为07h、第3个字节为00h。 |
| 5 | End of List,表示当前数据是否结束。当参数数据比较长的时候,可能需要分多次读取,通过此字段可以判断数据是否读完。 [7:1]: reserved [0]: End of list 0=last data 1=middle data |
| 6:N | Data,实际返回的数据可能小于等于Read length。 |
命令样例
获取ssh端口
请求:
ipmitool raw 0x30 0x93 0xDB 0x07 0x00 0x10 0x02 0x02 0x00 0x00 0xff响应:
db 07 00 00 00 16 00附表1 Service IDs
| Parameter | Parameter Data |
|---|---|
| FTP | 1 |
| SSH | 2 |
| Telnet | 3 |
| KVM | 4 |
| VMM | 5 |
| CIM Server | 6 |
| WS-MAN | 7 |
| SNMP Agent | 8 |
| Web Server | 9 |
| IPMI LAN | 0x0A |
| Video | 0x0B |
| BlackBox | 0x0C |
| VNC | 0x0D |
| ALL Service | 0xFF,只支持 表2 中的“service control”和“service port”。 |
附表2 Service parameters
| Parameter | Parameter Data | # (Decimal Format) | |
|---|---|---|---|
| Service control | Read and write | Block Selector --- 表示Service Protocol ID,见Protocol ID Parameter表。 data1-Get/Set Service/Protocol Start/Stop [7:3]-Service Protocol ID, 见Protocol ID Parameter表 [2:0]–Service/Protocol Status 0-stop 1-start | 1 |
| Service port | Read and write | Get/Set Service Port data1-Block Selector =Service Protocol and Port ID [7:4]-Service Protocol ID, based 1 [2:0]-Service Port ID, based 1,0表示默认端口号 data2:3-Get/Set Service Port LS-byte first | 2 |
| Service session timeout | Read and write | data1:2-Get/Set Service Session Timeout Seconds LS-byte first | 3 |
| Service session maximum | Read and write | data1-Get/Set Service Session Maximum | 4 |
| Service session active number | Read and write | data1-Get/Set Service Session Active Number | 5 |
| Service session source address | Read only | Get the Session Source Addr data1-Block Selector=session No., based 1 data2-real session id data3:N-Source Addr, IPv4 or IPv6 or Hostname, data type:string Max 255 Bytes.End by null if less than 255 Bytes. | 6 |
| Service session status | Read and write | Get the session status, and set the session disconnect data1- Block Selector=real session id data2-session status 0h-disconnect 1h-connect other reserved | 7 |