Lines Matching refs:data
93 DB *data; /* dns_data database handle */
109 char *data;
135 * bdbhpt_parse_data function. The char (type & data) fields should not
136 * be "free"d as that memory is part of the DBT data field. It will be
157 * remaining data
222 /* save pointer to remainder of DNS data */
223 pd->data = tmp;
245 DBT key, data;
258 key.data = strdup(name);
259 if (key.data == NULL) {
263 key.size = strlen(key.data);
265 memset(&data, 0, sizeof(DBT));
266 data.flags = DB_DBT_MALLOC;
267 data.data = strdup(client);
268 if (data.data == NULL) {
272 data.size = strlen(data.data);
274 switch(db->client->get(db->client, NULL, &key, &data, DB_GET_BOTH)) {
287 if (key.data != NULL)
288 free(key.data);
290 /* free any memory allocated to the data field. */
291 if (data.data != NULL)
292 free(data.data);
304 * is associated to the primary DB with the DNS data. Then have
309 * 2) Blow up database size by storing DNS data twice. Once for
317 * together to lookup the data in the dns_data database. YES -
342 xfr_key.data = tmp_zone = strdup(zone);
343 if (xfr_key.data == NULL)
346 xfr_key.size = strlen(xfr_key.data);
355 if (db->data->cursor(db->data, NULL, &dns_cursor, 0) != 0) {
372 dns_key.data = tmp_zone_host = malloc(dns_key.size + 1);
373 if (dns_key.data == NULL)
380 strcpy(dns_key.data, zone);
381 strcat(dns_key.data, " ");
382 strncat(dns_key.data, xfr_data.data, xfr_data.size);
398 /* copy data to tmp string, and append null term. */
399 strncpy(tmp, dns_data.data, dns_data.size);
402 /* split string into dns data parts. */
407 pd.type, pd.ttl, pd.data);
449 if (db->data != NULL)
450 db->data->close(db->data, 0);
478 DBT key, data;
481 memset(&data, 0, sizeof(DBT));
482 data.flags = DB_DBT_MALLOC;
489 key.data = strdup(name);
491 if (key.data == NULL)
499 key.data = bdbhpt_strrev(key.data);
500 key.size = strlen(key.data);
502 switch(db->zone->get(db->zone, NULL, &key, &data, 0)) {
514 if (key.data != NULL)
515 free(key.data);
517 /* free any memory allocated to the data field. */
518 if (data.data != NULL)
519 free(data.data);
541 DBT key, data;
555 memset(&data, 0, sizeof(DBT));
560 key.data = keyStr = malloc((key.size + 1) * sizeof(char));
569 /* get a cursor to loop through data */
570 if (db->data->cursor(db->data, NULL, &data_cursor, 0) != 0) {
578 while ((bdbhptres = data_cursor->c_get(data_cursor, &key, &data,
582 tmp = realloc(tmp, data.size + 1);
586 strncpy(tmp, data.data, data.size);
587 tmp[data.size] = '\0';
592 result = db->putrr(lookup, pd.type, pd.ttl, pd.data);
755 result = bdbhpt_opendb(db->log, db->dbenv, DB_UNKNOWN, &db->data,