Experimental IPMI 2.0 RMCP+ protocol and read-only client for MoonBit native
# macOS
brew install openssl@3 pkg-config
# Debian/Ubuntu (if not already installed)
sudo apt-get install libssl-dev pkg-config python3 build-essential
moon update
moon check --target native --deny-warn
moon test --target native --deny-warn
moon build --target native --deny-warn
moon run examples/offline --target native
python3 tools/interop.py _build/native/debug/build/examples/loopback/loopback.exelet client = @ipmi.Client::connect(addr, username, password, timeout_ms=2000)
defer client.abort()
let device = client.read(GetDeviceId).device_id()
client.close()pub struct Client {
// private fields
}pub struct RakpChallenge {
bmc_random : Bytes
bmc_guid : Bytes
authentication_code : Bytes
}fn ReadCommand::decode(self : ReadCommand, data : Bytes, sequence : Int) -> Response raise ProtocolErrorfn decode_open_session(data : Bytes, tag : Int, console_id : UInt) -> OpenSession raise ProtocolErrorfn decode_response(data : Bytes, netfn : Int, command : Int, sequence : Int) -> Response raise ProtocolErrorfn encode_request(netfn : Int, command : Int, sequence : Int, data : Bytes) -> Bytes raise ProtocolErrorfn rakp1_request(tag : Int, bmc_id : UInt, console_random : Bytes, username : Bytes) -> Bytes raise ProtocolErrorfn rakp3_request(tag : Int, bmc_id : UInt, authentication_code : Bytes) -> Bytes raise ProtocolErrorInstall
Download zipExperimental IPMI 2.0 RMCP+ protocol and read-only client for MoonBit native