8 #include "v3_user_keyed_stream.h"
11 int v3_user_keyed_stream_attach(char *vmdev, char *url)
16 struct palacios_user_keyed_stream_url *u;
18 u=malloc(sizeof(struct palacios_user_keyed_stream_url)+strlen(url)+1);
25 u->len = strlen(url)+1;
28 if ((vmfd=open(vmdev,O_RDWR))<0) {
33 devfd = ioctl(vmfd,V3_VM_KSTREAM_USER_CONNECT,u);
42 int v3_user_keyed_stream_detach(int devfd)
48 int v3_user_keyed_stream_have_request(int devfd)
52 int rc=ioctl(devfd,V3_KSTREAM_REQUEST_SIZE_IOCTL,&len);
57 int v3_user_keyed_stream_pull_request(int devfd, struct palacios_user_keyed_stream_op **req)
62 rc=ioctl(devfd,V3_KSTREAM_REQUEST_SIZE_IOCTL,&len);
67 struct palacios_user_keyed_stream_op *r = malloc(len);
70 fprintf(stderr,"malloc failed\n");
74 rc=ioctl(devfd, V3_KSTREAM_REQUEST_PULL_IOCTL,r);
88 int v3_user_keyed_stream_push_response(int devfd, struct palacios_user_keyed_stream_op *resp)
92 rc=ioctl(devfd,V3_KSTREAM_RESPONSE_PUSH_IOCTL,resp);