src/server/daemon/auth.h

branch
config
changeset 254
4784c14aa639
parent 91
fac51f87def0
child 400
d814b29e8d96
equal deleted inserted replaced
253:ddfead6ea863 254:4784c14aa639
31 31
32 #include <sys/types.h> 32 #include <sys/types.h>
33 #include <inttypes.h> 33 #include <inttypes.h>
34 #include "../public/auth.h" 34 #include "../public/auth.h"
35 35
36 #include <ucx/map.h>
37
36 #ifdef __cplusplus 38 #ifdef __cplusplus
37 extern "C" { 39 extern "C" {
38 #endif 40 #endif
39 41
40 typedef struct { 42 typedef struct {
46 uint32_t ref; 48 uint32_t ref;
47 } CachedUser; 49 } CachedUser;
48 50
49 typedef struct user_cache_elm UserCacheElm; 51 typedef struct user_cache_elm UserCacheElm;
50 struct user_cache_elm { 52 struct user_cache_elm {
51 CachedUser *user; 53 CachedUser *user;
52 UserCacheElm *next_user; // next elm in the cached user list 54 UserCacheElm *next_user; // next elm in the cached user list
53 UcxKey key; // key to access this element 55 UcxKey key; // key to access this element
54 size_t slot; // slot in the map 56 size_t slot; // slot in the map
55 UserCacheElm *next_elm; // next element in this map slot 57 UserCacheElm *next_elm; // next element in this map slot
56 time_t created; 58 time_t created;
57 }; 59 };
58 60
59 typedef struct { 61 typedef struct {
60 UserCacheElm **map; 62 UserCacheElm **map;
61 size_t size; 63 size_t size;

mercurial