Coda Distributed File System
Classes | Macros | Functions
rwcdb.h File Reference
#include <sys/types.h>
#include "rwcdb_file.h"
#include "dllist.h"
Include dependency graph for rwcdb.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  rwcdb
 

Macros

#define rwcdb_datalen(c)   ((c)->dlen)
 
#define rwcdb_datapos(c)   ((c)->dpos)
 
#define rwcdb_keylen(c)   ((c)->klen)
 

Functions

int rwcdb_init (struct rwcdb *c, const char *file, const int mode)
 
int rwcdb_free (struct rwcdb *c)
 
int rwcdb_find (struct rwcdb *c, const char *k, const uint32_t klen)
 
int rwcdb_read (struct rwcdb *c, char *d, const uint32_t dlen, const uint32_t dpos)
 
int rwcdb_next (struct rwcdb *c, int init)
 
int rwcdb_readkey (struct rwcdb *c, char *k, const uint32_t klen, const uint32_t dpos)
 
int rwcdb_insert (struct rwcdb *c, const char *k, const uint32_t klen, const char *d, const uint32_t dlen)
 
int rwcdb_delete (struct rwcdb *c, const char *k, const uint32_t klen)
 
int rwcdb_sync (struct rwcdb *c)
 

Macro Definition Documentation

◆ rwcdb_datalen

#define rwcdb_datalen (   c)    ((c)->dlen)

◆ rwcdb_datapos

#define rwcdb_datapos (   c)    ((c)->dpos)

◆ rwcdb_keylen

#define rwcdb_keylen (   c)    ((c)->klen)

Function Documentation

◆ rwcdb_delete()

int rwcdb_delete ( struct rwcdb c,
const char *  k,
const uint32_t  klen 
)

◆ rwcdb_find()

int rwcdb_find ( struct rwcdb c,
const char *  k,
const uint32_t  klen 
)

◆ rwcdb_free()

int rwcdb_free ( struct rwcdb c)

◆ rwcdb_init()

int rwcdb_init ( struct rwcdb c,
const char *  file,
const int  mode 
)

◆ rwcdb_insert()

int rwcdb_insert ( struct rwcdb c,
const char *  k,
const uint32_t  klen,
const char *  d,
const uint32_t  dlen 
)

◆ rwcdb_next()

int rwcdb_next ( struct rwcdb c,
int  init 
)

◆ rwcdb_read()

int rwcdb_read ( struct rwcdb c,
char *  d,
const uint32_t  dlen,
const uint32_t  dpos 
)

◆ rwcdb_readkey()

int rwcdb_readkey ( struct rwcdb c,
char *  k,
const uint32_t  klen,
const uint32_t  dpos 
)

◆ rwcdb_sync()

int rwcdb_sync ( struct rwcdb c)