]> Pileus Git - ~andy/linux/blob - drivers/staging/p9auth/p9auth.h
Staging: p9auth: fix dependency/build error
[~andy/linux] / drivers / staging / p9auth / p9auth.h
1 #ifndef CAP_MAJOR
2 #define CAP_MAJOR 0
3 #endif
4
5 #ifndef CAP_NR_DEVS
6 #define CAP_NR_DEVS 2           /* caphash and capuse */
7 #endif
8
9 #ifndef CAP_NODE_SIZE
10 #define CAP_NODE_SIZE 20
11 #endif
12
13 #define MAX_DIGEST_SIZE  20
14
15 struct cap_node {
16         char data[CAP_NODE_SIZE];
17         struct list_head list;
18 };
19
20 struct cap_dev {
21         struct cap_node *head;
22         int node_size;
23         unsigned long size;
24         struct semaphore sem;
25         struct cdev cdev;
26 };
27
28 extern int cap_major;
29 extern int cap_nr_devs;
30 extern int cap_node_size;
31
32 int cap_trim(struct cap_dev *);
33 ssize_t cap_write(struct file *, const char __user *, size_t, loff_t *);
34 char *cap_hash(char *plain_text, unsigned int plain_text_size, char *key, unsigned int key_size);
35 void hex_dump(unsigned char * buf, unsigned int len);