This file contains functions to read and write the cache(s) to text format. More...
#include "daemon/remote.h"
Functions | |
int | dump_cache (RES *ssl, struct worker *worker) |
Dump cache(s) to text. More... | |
int | load_cache (RES *ssl, struct worker *worker) |
Load cache(s) from text. More... | |
int | print_deleg_lookup (RES *ssl, struct worker *worker, uint8_t *nm, size_t nmlen, int nmlabs) |
Print the delegation used to lookup for this name. More... | |
This file contains functions to read and write the cache(s) to text format.
The format of the file is as follows: [RRset cache] [Message cache] EOF – fixed string "EOF" before end of the file.
The RRset cache is: START_RRSET_CACHE [rrset]* END_RRSET_CACHE
rrset is: ;rrset [nsec_apex] TTL rr_count rrsig_count trust security resource records, one per line, in zonefile format rrsig records, one per line, in zonefile format If the text conversion fails, BADRR is printed on the line.
The Message cache is: START_MSG_CACHE [msg]* END_MSG_CACHE
msg is: msg name class type flags qdcount ttl security an ns ar list of rrset references, one per line. If conversion fails, BADREF reference is: name class type flags
Expired cache entries are not printed.
Dump cache(s) to text.
ssl | to print to |
worker | worker that is available (buffers, etc) and has ptrs to the caches. |
References dump_msg_cache(), dump_rrset_cache(), and ssl_printf().
Referenced by execute_cmd().
Load cache(s) from text.
ssl | to read from |
worker | worker that is available (buffers, etc) and has ptrs to the caches. |
References worker::env, load_msg_cache(), load_rrset_cache(), read_fixed(), and module_env::scratch_buffer.
Referenced by execute_cmd().
int print_deleg_lookup | ( | RES * | ssl, |
struct worker * | worker, | ||
uint8_t * | nm, | ||
size_t | nmlen, | ||
int | nmlabs | ||
) |
Print the delegation used to lookup for this name.
ssl | to read from |
worker | worker that is available (buffers, etc) and has ptrs to the caches. |
nm | name to lookup |
nmlen | length of name. |
nmlabs | labels in name. |
Referenced by do_lookup().