Qsmtp
0.30dev
|
headers of function to read from CDB database More...
#include <sys/stat.h>
Go to the source code of this file.
Functions | |
const char * | cdb_seekmm (int, const char *, unsigned int, char **, const struct stat *) |
headers of function to read from CDB database
const char* cdb_seekmm | ( | int | fd, |
const char * | key, | ||
unsigned int | len, | ||
char ** | mm, | ||
const struct stat * | st | ||
) |
perform cdb search on the given file
fd | file descriptor to search (will be closed) |
key | key to search for |
len | length of key |
mm | base of mmapped address space |
st | file information |
NULL | no key found in database or error |
If the function returns NULL and errno is 0 everything worked fine but there is no entry for key in the file. On error errno is set.
The file is mmaped into memory, the result pointer will point inside that memory. The caller must munmap() the value returned in mm if the function does not return NULL. fd will be closed before the function returns.