ncsi: Add a NCSI-over-MCTP transport
Add a facility for performing NCSI commands over a NCSI-over-MCTP
interface, alongside the existing Netlink transport.
This adds a new Interface subclass, MCTPInterface, which performs the
MCTP encapsulation/decapsulation, over an AF_MCTP socket.
Tested: able to perform NCSI commands over a MCTP link, to both emulated
and hardware NIC devices. The -m argument can now target a NIC using
MCTP.
For example, sending a raw command to perform a Get Version ID (type
0x15):
root@bmc:~# ncsi-cmd -m 9 --package 0 raw 0x15
<7> Command: type 0x15, payload 0 bytes:
<7> Response 60 bytes: 00 01 00 2b 95 [...]
Change-Id: I9a7bfddfc4fd1b5bb8d0bff187936a0258d3dade
Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
3 files changed