summaryrefslogtreecommitdiffstats
path: root/include/outtacache.h
blob: 6865935bab8f062b27571f84d331163193bb66ef (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#ifndef INCLUDE_OUTTACACHE_H
#define INCLUDE_OUTTACACHE_H

#define CACHE_BUFSIZE (20000000)
#define OC_HEADERLEN  (sizeof(OCkey_t) + sizeof(int))
#define OC_KEYLEN     (sizeof(OCkey_t))
#define OC_pidadd     10000000
#define OC_msto  5111
#define OC_mtos  5112

typedef struct {
    pid_t   pid;
    char    cacheid;
} OCkey_t;

typedef struct {
    OCkey_t key;
    int     length;
    char    buf[CACHE_BUFSIZE];
} OCbuf_t;


typedef struct {
    time_t  mtime;
    OCbuf_t data;
} OCstore_t;
    
#endif