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.


Initial integration and reimplementation of user-space interface for keyed streams
[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 // get size of pending request
11 #define V3_KSTREAM_REQUEST_SIZE_IOCTL  (11244+1)
12 // get the pending request
13 #define V3_KSTREAM_REQUEST_PULL_IOCTL  (11244+2)
14 // push a response to the previously pulled request
15 #define V3_KSTREAM_RESPONSE_PUSH_IOCTL (11244+3)
16
17 #ifdef __KERNEL__
18 #define USER __user
19 #else
20 #define USER
21 #endif
22
23 struct palacios_user_keyed_stream_url {
24     uint64_t len;
25     char     url[0];  // len describes it
26 };
27
28
29 //
30 // This structure is used for both requests (kernel->user)
31 // and responses (user->kernel)
32 //
33 struct palacios_user_keyed_stream_op {
34
35     uint64_t len; // total structure length (all)
36
37     int     type; // request or response type
38 #define PALACIOS_KSTREAM_OPEN      1  // not used
39 #define PALACIOS_KSTREAM_CLOSE     2  // not used
40 #define PALACIOS_KSTREAM_OPEN_KEY  3
41 #define PALACIOS_KSTREAM_CLOSE_KEY 4
42 #define PALACIOS_KSTREAM_WRITE_KEY 5
43 #define PALACIOS_KSTREAM_READ_KEY  6
44
45     sint64_t xfer;      // total bytes read or written (request/response)
46
47     void    *user_key;  // user tag for an open key (response)
48
49     uint64_t buf_len;   // buffer len
50     char buf[0];        // expanded as needed (key or valye)
51
52     // The buffer contains the key or the value
53 };
54
55
56
57
58
59 #endif