mirror of
https://github.com/pi-hole/dnsmasq.git
synced 2025-12-19 10:18:25 +00:00
Add --cache-rr to enable caching of arbitrary RR types.
This commit is contained in:
@@ -282,7 +282,8 @@ struct event_desc {
|
||||
#define OPT_STRIP_MAC 70
|
||||
#define OPT_NORR 71
|
||||
#define OPT_NO_IDENT 72
|
||||
#define OPT_LAST 73
|
||||
#define OPT_CACHE_RR 73
|
||||
#define OPT_LAST 74
|
||||
|
||||
#define OPTION_BITS (sizeof(unsigned int)*8)
|
||||
#define OPTION_SIZE ( (OPT_LAST/OPTION_BITS)+((OPT_LAST%OPTION_BITS)!=0) )
|
||||
@@ -337,7 +338,7 @@ union all_addr {
|
||||
/* for arbitrary RR record. */
|
||||
struct {
|
||||
struct blockdata *rrdata;
|
||||
u16 rrtype;
|
||||
unsigned short rrtype, datalen;
|
||||
} rr;
|
||||
};
|
||||
|
||||
@@ -663,6 +664,11 @@ struct iname {
|
||||
struct iname *next;
|
||||
};
|
||||
|
||||
struct rrlist {
|
||||
unsigned short rr;
|
||||
struct rrlist *next;
|
||||
};
|
||||
|
||||
/* subnet parameters from command line */
|
||||
struct mysubnet {
|
||||
union mysockaddr addr;
|
||||
@@ -1128,6 +1134,7 @@ extern struct daemon {
|
||||
struct naptr *naptr;
|
||||
struct txt_record *txt, *rr;
|
||||
struct ptr_record *ptr;
|
||||
struct rrlist *cache_rr, filter_rr;
|
||||
struct host_record *host_records, *host_records_tail;
|
||||
struct cname *cnames;
|
||||
struct auth_zone *auth_zones;
|
||||
@@ -1309,6 +1316,7 @@ struct server_details {
|
||||
|
||||
/* cache.c */
|
||||
void cache_init(void);
|
||||
unsigned short rrtype(char *in);
|
||||
void next_uid(struct crec *crecp);
|
||||
void log_query(unsigned int flags, char *name, union all_addr *addr, char *arg, unsigned short type);
|
||||
char *record_source(unsigned int index);
|
||||
@@ -1342,6 +1350,8 @@ int read_hostsfile(char *filename, unsigned int index, int cache_size,
|
||||
void blockdata_init(void);
|
||||
void blockdata_report(void);
|
||||
struct blockdata *blockdata_alloc(char *data, size_t len);
|
||||
int blockdata_expand(struct blockdata *block, size_t oldlen,
|
||||
char *data, size_t newlen);
|
||||
void *blockdata_retrieve(struct blockdata *block, size_t len, void *data);
|
||||
struct blockdata *blockdata_read(int fd, size_t len);
|
||||
void blockdata_write(struct blockdata *block, size_t len, int fd);
|
||||
@@ -1423,6 +1433,7 @@ void rand_init(void);
|
||||
unsigned short rand16(void);
|
||||
u32 rand32(void);
|
||||
u64 rand64(void);
|
||||
int rr_on_list(struct rrlist *list, unsigned short rr);
|
||||
int legal_hostname(char *name);
|
||||
char *canonicalise(char *in, int *nomem);
|
||||
unsigned char *do_rfc1035_name(unsigned char *p, char *sval, char *limit);
|
||||
@@ -1817,13 +1828,16 @@ int do_poll(int timeout);
|
||||
|
||||
/* rrfilter.c */
|
||||
size_t rrfilter(struct dns_header *header, size_t *plen, int mode);
|
||||
u16 *rrfilter_desc(int type);
|
||||
short *rrfilter_desc(int type);
|
||||
int expand_workspace(unsigned char ***wkspc, int *szp, int new);
|
||||
int to_wire(char *name);
|
||||
void from_wire(char *name);
|
||||
/* modes. */
|
||||
#define RRFILTER_EDNS0 0
|
||||
#define RRFILTER_DNSSEC 1
|
||||
#define RRFILTER_A 2
|
||||
#define RRFILTER_AAAA 3
|
||||
|
||||
/* edns0.c */
|
||||
unsigned char *find_pseudoheader(struct dns_header *header, size_t plen,
|
||||
size_t *len, unsigned char **p, int *is_sign, int *is_last);
|
||||
|
||||
Reference in New Issue
Block a user