#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <atalk/afp.h>
#include <atalk/logger.h>
#include <atalk/uuid.h>
#include "cache.h"
Data Structures | |
struct | cacheduser |
Typedefs | |
typedef struct cacheduser | cacheduser_t |
Functions | |
void | uuidcache_dump (void) |
static unsigned char | hashstring (unsigned char *str) |
static unsigned char | hashuuid (uuidp_t uuid) |
int | add_cachebyname (const char *inname, const uuidp_t inuuid, const uuidtype_t type, const unsigned long uid _U_) |
int | search_cachebyname (const char *name, uuidtype_t *type, unsigned char *uuid) |
int | search_cachebyuuid (uuidp_t uuidp, char **name, uuidtype_t *type) |
int | add_cachebyuuid (uuidp_t inuuid, const char *inname, uuidtype_t type, const unsigned long uid _U_) |
Variables | |
static cacheduser_t * | namecache [256] |
static cacheduser_t * | uuidcache [256] |
typedef struct cacheduser cacheduser_t |
int add_cachebyname | ( | const char * | inname, |
const uuidp_t | inuuid, | ||
const uuidtype_t | type, | ||
const unsigned long uid | _U_ ) |
int add_cachebyuuid | ( | uuidp_t | inuuid, |
const char * | inname, | ||
uuidtype_t | type, | ||
const unsigned long uid | _U_ ) |
|
static |
|
static |
int search_cachebyname | ( | const char * | name, |
uuidtype_t * | type, | ||
unsigned char * | uuid ) |
Search cache by name and uuid type
name | (r) name to search |
type | (rw) type (user or group) of name, returns found type here which might mark it as a negative entry |
uuid | (w) found uuid is returned here |
int search_cachebyuuid | ( | uuidp_t | uuidp, |
char ** | name, | ||
uuidtype_t * | type ) |
void uuidcache_dump | ( | void | ) |
|
static |
|
static |