X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Finclude%2Finterfaces%2Fvmm_stream.h;h=e9c49c7034eb5ba8bac71141bc5d1497519b6478;hb=ef34565873989f5b0240f7f9911c3666a69587c9;hp=513cf73c627b433e0e26652f71b5e0ed7e263382;hpb=ba178554a5f6714e5ceb7b77df462ac72de90b0c;p=palacios.releases.git diff --git a/palacios/include/interfaces/vmm_stream.h b/palacios/include/interfaces/vmm_stream.h index 513cf73..e9c49c7 100644 --- a/palacios/include/interfaces/vmm_stream.h +++ b/palacios/include/interfaces/vmm_stream.h @@ -23,24 +23,34 @@ +struct v3_stream { + void * host_stream_data; + void * guest_stream_data; + uint64_t (*input)(struct v3_stream * stream, uint8_t * buf, uint64_t len); +}; + + #ifdef __V3VEE__ #include -typedef void * v3_stream_t; + /* VM Can be NULL */ -v3_stream_t v3_stream_open(struct v3_vm_info * vm, const char * name); -int v3_stream_write(v3_stream_t stream, uint8_t * buf, uint32_t len); +struct v3_stream * v3_stream_open(struct v3_vm_info * vm, const char * name, + uint64_t (*input)(struct v3_stream * stream, uint8_t * buf, uint64_t len), + void * guest_stream_data); + +uint64_t v3_stream_output(struct v3_stream * stream, uint8_t * buf, uint32_t len); -void v3_stream_close(v3_stream_t stream); +void v3_stream_close(struct v3_stream * stream); #endif struct v3_stream_hooks { - void *(*open)(const char * name, void * private_data); - int (*write)(void * stream, char * buf, int len); - void (*close)(void * stream); + void *(*open)(struct v3_stream * stream, const char * name, void * host_vm_data); + uint64_t (*output)(struct v3_stream * stream, char * buf, int len); + void (*close)(struct v3_stream * stream); };