Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


Merge branch 'devel' of newskysaw.cs.northwestern.edu:/home/palacios/palacios into...
[palacios.git] / linux_module / iface-keyed-stream-user.h
1 #ifndef _PALACIOS_KEYED_STREAM_USER_H_
2 #define _PALACIOS_KEYED_STREAM_USER_H_
3
4 /*
5  * Palacios Keyed Stream User Interface
6  * (c) Clint Sbisa, 2011
7  */
8
9
10 // Attach to the VM
11 #define V3_VM_KSTREAM_USER_CONNECT     (11244+1)
12
13 // get size of pending request
14 // Note that this is not the wrong ioctl - the connect ioctl applies to the VM device
15 // the following ioctls apply to the FD returned by the connect
16 #define V3_KSTREAM_REQUEST_SIZE_IOCTL  (11244+1)
17 // get the pending request
18 #define V3_KSTREAM_REQUEST_PULL_IOCTL  (11244+2)
19 // push a response to the previously pulled request
20 #define V3_KSTREAM_RESPONSE_PUSH_IOCTL (11244+3)
21
22 #ifdef __KERNEL__
23 #define USER __user
24 #else
25 #define USER
26 #endif
27
28
29 struct palacios_user_keyed_stream_url {
30     uint64_t len;
31     char     url[0];  // len describes it
32 };
33
34
35 //
36 // This structure is used for both requests (kernel->user)
37 // and responses (user->kernel)
38 //
39 struct palacios_user_keyed_stream_op {
40
41     uint64_t len; // total structure length (all)
42
43     int     type; // request or response type
44 #define PALACIOS_KSTREAM_OPEN      1  // not used
45 #define PALACIOS_KSTREAM_CLOSE     2  // not used
46 #define PALACIOS_KSTREAM_OPEN_KEY  3
47 #define PALACIOS_KSTREAM_CLOSE_KEY 4
48 #define PALACIOS_KSTREAM_WRITE_KEY 5
49 #define PALACIOS_KSTREAM_READ_KEY  6
50
51     sint64_t xfer;      // total bytes read or written (request/response)
52
53     void    *user_key;  // user tag for an open key (response)
54
55     uint64_t buf_len;   // buffer len
56     char buf[0];        // expanded as needed (key or valye)
57
58     // The buffer contains the key or the value
59 };
60
61
62
63
64
65 #endif