---
name: "cdb_init"
section: "3"
platform: "linux"
package: "libowfat-dev"
version: "0.32-5"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/cdb_init"
---

# cdb\_init(3)

open a constant database

## NAME

cdb\_init - open a constant database

## SYNTAX

**#include \<libowfat/cdb.h\>**

int cdb\_init(struct cdb \**c*,int *fd*);

## DESCRIPTION

**cdb\_init** places information about *fd* into a struct cdb variable *c*. *fd* has to be a seekable file previously opened for reading.

On systems that support mmap, cdb\_init will try to map the whole constant database into memory.

The inverse operation to cdb\_init is cdb\_free.

## SEE ALSO

[cdb\_free(3)](/cdb_free/3.md), [cdb\_read(3)](/cdb_read/3.md), [cdb\_find(3)](/cdb_find/3.md), [cdbmake(1)](/cdbmake/1.md)
