Lines Matching full:ttl

173 	char* key, uint8_t* data, size_t data_len, time_t ATTR_UNUSED(ttl))  in testframe_store()  argument
402 /* We don't store the reply if its TTL is 0 unless serve-expired is in prep_data()
406 if(qstate->return_msg->rep->ttl == 0 && in prep_data()
426 * store that, we also store the smallest ttl in the packet+time(0) in prep_data()
428 /* qstate->return_msg->rep->ttl contains that relative shortest ttl */ in prep_data()
430 expiry = timestamp + (uint64_t)qstate->return_msg->rep->ttl; in prep_data()
470 /* Adjust the TTL of the given RRset by 'subtract'. If 'subtract' is
471 * negative, set the TTL to 0. */
477 if(subtract >= 0 && data->ttl > subtract) in packed_rrset_ttl_subtract()
478 data->ttl -= subtract; in packed_rrset_ttl_subtract()
479 else data->ttl = 0; in packed_rrset_ttl_subtract()
488 /* Adjust the TTL of a DNS message and its RRs by 'adjust'. If 'adjust' is
494 if(adjust >= 0 && msg->rep->ttl > adjust) in adjust_msg_ttl()
495 msg->rep->ttl -= adjust; in adjust_msg_ttl()
497 msg->rep->ttl = 0; in adjust_msg_ttl()
498 msg->rep->prefetch_ttl = PREFETCH_TTL_CALC(msg->rep->ttl); in adjust_msg_ttl()
499 msg->rep->serve_expired_ttl = msg->rep->ttl + SERVE_EXPIRED_TTL; in adjust_msg_ttl()
507 /* Set the TTL of the given RRset to fixed value. */
509 packed_rrset_ttl_set(struct packed_rrset_data* data, time_t ttl) in packed_rrset_ttl_set() argument
513 data->ttl = ttl; in packed_rrset_ttl_set()
515 data->rr_ttl[i] = ttl; in packed_rrset_ttl_set()
520 /* Set the TTL of a DNS message and its RRs by to a fixed value. */
522 set_msg_ttl(struct dns_msg* msg, time_t ttl) in set_msg_ttl() argument
525 msg->rep->ttl = ttl; in set_msg_ttl()
526 msg->rep->prefetch_ttl = PREFETCH_TTL_CALC(msg->rep->ttl); in set_msg_ttl()
527 msg->rep->serve_expired_ttl = msg->rep->ttl + SERVE_EXPIRED_TTL; in set_msg_ttl()
531 rep->rrsets[i]->entry.data, ttl); in set_msg_ttl()
600 /* see how much of the TTL expired, and remove it */ in parse_data()
606 if(qstate->return_msg->rep->ttl < adjust) { in parse_data()
610 * setting the TTL to 0. */ in parse_data()
688 qstate->return_msg->rep->ttl); in cachedb_extcache_store()