use mctp::{Eid, ReqChannel, MCTP_TYPE_CONTROL};
use mctp_linux::MctpLinuxReq;
fn main() -> std::io::Result<()> {
const EID: Eid = Eid(8);
let mut ep = MctpLinuxReq::new(EID, None)?;
let tx_buf = vec![0x02u8];
ep.send(MCTP_TYPE_CONTROL, &tx_buf)?;
let mut rx_buf = vec![0u8; 16];
let (typ, ic, rx_buf) = ep.recv(&mut rx_buf)?;
println!("response type {}, ic {:?}: {:x?}", typ, ic, rx_buf);
Ok(())
}