Lines Matching defs:dbuf
106 static int print_rec(TDB_CONTEXT *the_tdb, TDB_DATA key, TDB_DATA dbuf, void *state);
107 static int print_key(TDB_CONTEXT *the_tdb, TDB_DATA key, TDB_DATA dbuf, void *state);
108 static int print_hexkey(TDB_CONTEXT *the_tdb, TDB_DATA key, TDB_DATA dbuf, void *state);
208 TDB_DATA key, dbuf;
217 dbuf.dptr = (unsigned char *)data;
218 dbuf.dsize = datalen;
220 if (tdb_store(tdb, key, dbuf, TDB_INSERT) == -1) {
227 TDB_DATA key, dbuf;
241 dbuf.dptr = (unsigned char *)data;
242 dbuf.dsize = datalen;
245 print_rec(tdb, key, dbuf, NULL);
247 if (tdb_store(tdb, key, dbuf, TDB_REPLACE) == -1) {
254 TDB_DATA key, dbuf;
264 dbuf = tdb_fetch(tdb, key);
265 if (!dbuf.dptr) {
270 print_rec(tdb, key, dbuf, NULL);
272 free( dbuf.dptr );
296 TDB_DATA key, dbuf;
312 dbuf = tdb_fetch(tdb, key);
313 if (!dbuf.dptr) {
318 print_rec(tdb, key, dbuf, NULL);
326 if ( tdb_store( dst_tdb, key, dbuf, TDB_REPLACE ) == -1 ) {
337 static int print_rec(TDB_CONTEXT *the_tdb, TDB_DATA key, TDB_DATA dbuf, void *state)
341 printf("\ndata %d bytes\n", (int)dbuf.dsize);
342 print_data((const char *)dbuf.dptr, dbuf.dsize);
346 static int print_key(TDB_CONTEXT *the_tdb, TDB_DATA key, TDB_DATA dbuf, void *state)
354 static int print_hexkey(TDB_CONTEXT *the_tdb, TDB_DATA key, TDB_DATA dbuf, void *state)
364 static int traverse_fn(TDB_CONTEXT *the_tdb, TDB_DATA key, TDB_DATA dbuf, void *state)
366 total_bytes += dbuf.dsize;
392 static int do_delete_fn(TDB_CONTEXT *the_tdb, TDB_DATA key, TDB_DATA dbuf,
400 TDB_DATA dbuf;
403 dbuf = tdb_fetch(the_tdb, *pkey);
404 if (!dbuf.dptr) terror("fetch failed");
406 print_rec(the_tdb, *pkey, dbuf, NULL);
412 TDB_DATA dbuf;
415 dbuf = tdb_fetch(the_tdb, *pkey);
416 if (!dbuf.dptr)
419 print_rec(the_tdb, *pkey, dbuf, NULL);