cdb_seek -- search for a key in a constant database


SYNOPSIS

       #include <freecdb.h>

       int cdb_seek(int fd, char *key, unsigned int len, uint32
       *dlen);


DESCRIPTION

       cdb_seek looks up the key key of length len from the con­
       stant database open on file descriptor fd.

       On success, it seeks fd to the start of key value, and
       sets dlen to the value size.


RETURN VALUE

       1 on a match, 0 on a miss, -1 on error.


RESTRICTIONS

       There is no way to read multiple records with the same
       key.

       Seeking modifes the location of the file descriptor. Don't
       try to do simultaneous searches.

       Updates to the constant database will only be seen after a
       close(2) and open(2).


SEE ALSO

       cdb_hash(3)


Man(1) output converted with man2html