graphene-ipc.h 751 B

1234567891011121314151617181920212223242526272829303132333435
  1. #ifndef _GRAPHENE_IPC_H
  2. #define _GRAPHENE_IPC_H
  3. #include <linux/ioctl.h>
  4. #define GIPC_FILE "/dev/gipc"
  5. #define GIPC_MINOR 240
  6. /* Ioctl codes */
  7. #define GIPC_SEND _IOW('k', 0, void*)
  8. #define GIPC_RECV _IOR('k', 1, void*)
  9. #define GIPC_CREATE _IOR('k', 2, void*)
  10. #define GIPC_JOIN _IOR('k', 3, void*)
  11. // Must be a power of 2!
  12. #define PAGE_QUEUE 2048
  13. #define PAGE_BITS (PAGE_QUEUE / sizeof(unsigned long))
  14. #define PAGE_PRESENT 1
  15. /* Argument Structures */
  16. typedef struct gipc_send {
  17. unsigned long entries;
  18. unsigned long* addr;
  19. unsigned long* len;
  20. } gipc_send;
  21. typedef struct gipc_recv {
  22. unsigned long entries;
  23. unsigned long* addr;
  24. unsigned long* len;
  25. unsigned long* prot;
  26. } gipc_recv;
  27. #endif // _GRAPHENE_IPC_H