hello,

I am writing a C code that discovers and browses virtual images on a KVM server.
I can discover virtual images with libvirt API.
I can correctly read (bytes - by - bytes ) virtual images with qemu-io -c "read -v 0 512" command line.

But I prefer to perform this step by calling a library and not the qemu-io command line.

Are the qemu-io capabilites exposed through a shared object I can dynamically load at runtime ?

I mean I need something like the libvirt virDomainBlockPeek.
 
Ex:
sectors = qemu_read_sector_from_image () -> which works just like qemu-io -c "read -v "


Thanks,
Francesco