"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/dnsmasq.h" between
dnsmasq-2.82.tar.xz and dnsmasq-2.83.tar.xz

About: Dnsmasq is a lightweight caching DNS forwarder and DHCP server.

dnsmasq.h  (dnsmasq-2.82.tar.xz):dnsmasq.h  (dnsmasq-2.83.tar.xz)
skipping to change at line 160 skipping to change at line 160
extern int capget(cap_user_header_t header, cap_user_data_t data); extern int capget(cap_user_header_t header, cap_user_data_t data);
#define LINUX_CAPABILITY_VERSION_1 0x19980330 #define LINUX_CAPABILITY_VERSION_1 0x19980330
#define LINUX_CAPABILITY_VERSION_2 0x20071026 #define LINUX_CAPABILITY_VERSION_2 0x20071026
#define LINUX_CAPABILITY_VERSION_3 0x20080522 #define LINUX_CAPABILITY_VERSION_3 0x20080522
#include <sys/prctl.h> #include <sys/prctl.h>
#elif defined(HAVE_SOLARIS_NETWORK) #elif defined(HAVE_SOLARIS_NETWORK)
#include <priv.h> #include <priv.h>
#endif #endif
#ifdef HAVE_DNSSEC #if defined(HAVE_DNSSEC) || defined(HAVE_NETTLEHASH)
# include <nettle/nettle-meta.h> # include <nettle/nettle-meta.h>
#endif #endif
/* daemon is function in the C library.... */ /* daemon is function in the C library.... */
#define daemon dnsmasq_daemon #define daemon dnsmasq_daemon
#define ADDRSTRLEN INET6_ADDRSTRLEN #define ADDRSTRLEN INET6_ADDRSTRLEN
/* Async event queue */ /* Async event queue */
struct event_desc { struct event_desc {
skipping to change at line 653 skipping to change at line 653
#define FREC_NOREBIND 1 #define FREC_NOREBIND 1
#define FREC_CHECKING_DISABLED 2 #define FREC_CHECKING_DISABLED 2
#define FREC_HAS_SUBNET 4 #define FREC_HAS_SUBNET 4
#define FREC_DNSKEY_QUERY 8 #define FREC_DNSKEY_QUERY 8
#define FREC_DS_QUERY 16 #define FREC_DS_QUERY 16
#define FREC_AD_QUESTION 32 #define FREC_AD_QUESTION 32
#define FREC_DO_QUESTION 64 #define FREC_DO_QUESTION 64
#define FREC_ADDED_PHEADER 128 #define FREC_ADDED_PHEADER 128
#define FREC_TEST_PKTSZ 256 #define FREC_TEST_PKTSZ 256
#define FREC_HAS_EXTRADATA 512 #define FREC_HAS_EXTRADATA 512
#define FREC_HAS_PHEADER 1024
#define FREC_NO_CACHE 2048
#ifdef HAVE_DNSSEC #define HASH_SIZE 32 /* SHA-256 digest size */
#define HASH_SIZE 20 /* SHA-1 digest size */
#else
#define HASH_SIZE sizeof(int)
#endif
struct frec { struct frec {
union mysockaddr source; struct frec_src {
union all_addr dest; union mysockaddr source;
union all_addr dest;
unsigned int iface, log_id;
unsigned short orig_id;
struct frec_src *next;
} frec_src;
struct server *sentto; /* NULL means free */ struct server *sentto; /* NULL means free */
struct randfd *rfd4; struct randfd *rfd4;
struct randfd *rfd6; struct randfd *rfd6;
unsigned int iface; unsigned short new_id;
unsigned short orig_id, new_id; int fd, forwardall, flags;
int log_id, fd, forwardall, flags;
time_t time; time_t time;
unsigned char *hash[HASH_SIZE]; unsigned char *hash[HASH_SIZE];
#ifdef HAVE_DNSSEC #ifdef HAVE_DNSSEC
int class, work_counter; int class, work_counter;
struct blockdata *stash; /* Saved reply, whilst we validate */ struct blockdata *stash; /* Saved reply, whilst we validate */
size_t stash_len; size_t stash_len;
struct frec *dependent; /* Query awaiting internally-generated DNSKEY or DS qu ery */ struct frec *dependent; /* Query awaiting internally-generated DNSKEY or DS qu ery */
struct frec *blocking_query; /* Query which is blocking us. */ struct frec *blocking_query; /* Query which is blocking us. */
#endif #endif
struct frec *next; struct frec *next;
skipping to change at line 828 skipping to change at line 830
#define DHOPT_FORCE 16 #define DHOPT_FORCE 16
#define DHOPT_BANK 32 #define DHOPT_BANK 32
#define DHOPT_ENCAP_DONE 64 #define DHOPT_ENCAP_DONE 64
#define DHOPT_MATCH 128 #define DHOPT_MATCH 128
#define DHOPT_VENDOR 256 #define DHOPT_VENDOR 256
#define DHOPT_HEX 512 #define DHOPT_HEX 512
#define DHOPT_VENDOR_MATCH 1024 #define DHOPT_VENDOR_MATCH 1024
#define DHOPT_RFC3925 2048 #define DHOPT_RFC3925 2048
#define DHOPT_TAGOK 4096 #define DHOPT_TAGOK 4096
#define DHOPT_ADDR6 8192 #define DHOPT_ADDR6 8192
#define DHOPT_VENDOR_PXE 16384
struct dhcp_boot { struct dhcp_boot {
char *file, *sname, *tftp_sname; char *file, *sname, *tftp_sname;
struct in_addr next_server; struct in_addr next_server;
struct dhcp_netid *netid; struct dhcp_netid *netid;
struct dhcp_boot *next; struct dhcp_boot *next;
}; };
struct dhcp_match_name { struct dhcp_match_name {
char *name; char *name;
skipping to change at line 851 skipping to change at line 854
}; };
struct pxe_service { struct pxe_service {
unsigned short CSA, type; unsigned short CSA, type;
char *menu, *basename, *sname; char *menu, *basename, *sname;
struct in_addr server; struct in_addr server;
struct dhcp_netid *netid; struct dhcp_netid *netid;
struct pxe_service *next; struct pxe_service *next;
}; };
#define DHCP_PXE_DEF_VENDOR "PXEClient"
#define MATCH_VENDOR 1 #define MATCH_VENDOR 1
#define MATCH_USER 2 #define MATCH_USER 2
#define MATCH_CIRCUIT 3 #define MATCH_CIRCUIT 3
#define MATCH_REMOTE 4 #define MATCH_REMOTE 4
#define MATCH_SUBSCRIBER 5 #define MATCH_SUBSCRIBER 5
/* vendorclass, userclass, remote-id or circuit-id */ /* vendorclass, userclass, remote-id or circuit-id */
struct dhcp_vendor { struct dhcp_vendor {
int len, match_type; int len, match_type;
unsigned int enterprise; unsigned int enterprise;
char *data; char *data;
struct dhcp_netid netid; struct dhcp_netid netid;
struct dhcp_vendor *next; struct dhcp_vendor *next;
}; };
struct dhcp_pxe_vendor {
char *data;
struct dhcp_pxe_vendor *next;
};
struct dhcp_mac { struct dhcp_mac {
unsigned int mask; unsigned int mask;
int hwaddr_len, hwaddr_type; int hwaddr_len, hwaddr_type;
unsigned char hwaddr[DHCP_CHADDR_MAX]; unsigned char hwaddr[DHCP_CHADDR_MAX];
struct dhcp_netid netid; struct dhcp_netid netid;
struct dhcp_mac *next; struct dhcp_mac *next;
}; };
struct dhcp_bridge { struct dhcp_bridge {
char iface[IF_NAMESIZE]; char iface[IF_NAMESIZE];
skipping to change at line 1039 skipping to change at line 1049
int cachesize, ftabsize; int cachesize, ftabsize;
int port, query_port, min_port, max_port; int port, query_port, min_port, max_port;
unsigned long local_ttl, neg_ttl, max_ttl, min_cache_ttl, max_cache_ttl, auth_ ttl, dhcp_ttl, use_dhcp_ttl; unsigned long local_ttl, neg_ttl, max_ttl, min_cache_ttl, max_cache_ttl, auth_ ttl, dhcp_ttl, use_dhcp_ttl;
char *dns_client_id; char *dns_client_id;
struct hostsfile *addn_hosts; struct hostsfile *addn_hosts;
struct dhcp_context *dhcp, *dhcp6; struct dhcp_context *dhcp, *dhcp6;
struct ra_interface *ra_interfaces; struct ra_interface *ra_interfaces;
struct dhcp_config *dhcp_conf; struct dhcp_config *dhcp_conf;
struct dhcp_opt *dhcp_opts, *dhcp_match, *dhcp_opts6, *dhcp_match6; struct dhcp_opt *dhcp_opts, *dhcp_match, *dhcp_opts6, *dhcp_match6;
struct dhcp_match_name *dhcp_name_match; struct dhcp_match_name *dhcp_name_match;
struct dhcp_pxe_vendor *dhcp_pxe_vendors;
struct dhcp_vendor *dhcp_vendors; struct dhcp_vendor *dhcp_vendors;
struct dhcp_mac *dhcp_macs; struct dhcp_mac *dhcp_macs;
struct dhcp_boot *boot_config; struct dhcp_boot *boot_config;
struct pxe_service *pxe_services; struct pxe_service *pxe_services;
struct tag_if *tag_if; struct tag_if *tag_if;
struct addr_list *override_relays; struct addr_list *override_relays;
struct dhcp_relay *relay4, *relay6; struct dhcp_relay *relay4, *relay6;
struct delay_config *delay_conf; struct delay_config *delay_conf;
int override; int override;
int enable_pxe; int enable_pxe;
skipping to change at line 1087 skipping to change at line 1098
char *namebuff; /* MAXDNAME size buffer */ char *namebuff; /* MAXDNAME size buffer */
#ifdef HAVE_DNSSEC #ifdef HAVE_DNSSEC
char *keyname; /* MAXDNAME size buffer */ char *keyname; /* MAXDNAME size buffer */
char *workspacename; /* ditto */ char *workspacename; /* ditto */
unsigned long *rr_status; /* ceiling in TTL from DNSSEC or zero for insecure * / unsigned long *rr_status; /* ceiling in TTL from DNSSEC or zero for insecure * /
int rr_status_sz; int rr_status_sz;
int dnssec_no_time_check; int dnssec_no_time_check;
int back_to_the_future; int back_to_the_future;
#endif #endif
struct frec *frec_list; struct frec *frec_list;
struct frec_src *free_frec_src;
int frec_src_count;
struct serverfd *sfds; struct serverfd *sfds;
struct irec *interfaces; struct irec *interfaces;
struct listener *listeners; struct listener *listeners;
struct server *last_server; struct server *last_server;
time_t forwardtime; time_t forwardtime;
int forwardcount; int forwardcount;
struct server *srv_save; /* Used for resend on DoD */ struct server *srv_save; /* Used for resend on DoD */
size_t packet_len; /* " " */ size_t packet_len; /* " " */
struct randfd *rfd_save; /* " " */ struct randfd *rfd_save; /* " " */
pid_t tcp_pids[MAX_PROCS]; pid_t tcp_pids[MAX_PROCS];
skipping to change at line 1219 skipping to change at line 1232
int extract_addresses(struct dns_header *header, size_t qlen, char *name, int extract_addresses(struct dns_header *header, size_t qlen, char *name,
time_t now, char **ipsets, int is_sign, int check_rebind, time_t now, char **ipsets, int is_sign, int check_rebind,
int no_cache_dnssec, int secure, int *doctored); int no_cache_dnssec, int secure, int *doctored);
size_t answer_request(struct dns_header *header, char *limit, size_t qlen, size_t answer_request(struct dns_header *header, char *limit, size_t qlen,
struct in_addr local_addr, struct in_addr local_netmask, struct in_addr local_addr, struct in_addr local_netmask,
time_t now, int ad_reqd, int do_bit, int have_pseudoheader) ; time_t now, int ad_reqd, int do_bit, int have_pseudoheader) ;
int check_for_bogus_wildcard(struct dns_header *header, size_t qlen, char *name, int check_for_bogus_wildcard(struct dns_header *header, size_t qlen, char *name,
struct bogus_addr *baddr, time_t now); struct bogus_addr *baddr, time_t now);
int check_for_ignored_address(struct dns_header *header, size_t qlen, struct bog us_addr *baddr); int check_for_ignored_address(struct dns_header *header, size_t qlen, struct bog us_addr *baddr);
int check_for_local_domain(char *name, time_t now); int check_for_local_domain(char *name, time_t now);
unsigned int questions_crc(struct dns_header *header, size_t plen, char *name);
size_t resize_packet(struct dns_header *header, size_t plen, size_t resize_packet(struct dns_header *header, size_t plen,
unsigned char *pheader, size_t hlen); unsigned char *pheader, size_t hlen);
int add_resource_record(struct dns_header *header, char *limit, int *truncp, int add_resource_record(struct dns_header *header, char *limit, int *truncp,
int nameoffset, unsigned char **pp, unsigned long ttl, int nameoffset, unsigned char **pp, unsigned long ttl,
int *offset, unsigned short type, unsigned short class, c har *format, ...); int *offset, unsigned short type, unsigned short class, c har *format, ...);
int in_arpa_name_2_addr(char *namein, union all_addr *addrp); int in_arpa_name_2_addr(char *namein, union all_addr *addrp);
int private_net(struct in_addr addr, int ban_localhost); int private_net(struct in_addr addr, int ban_localhost);
/* auth.c */ /* auth.c */
#ifdef HAVE_AUTH #ifdef HAVE_AUTH
skipping to change at line 1244 skipping to change at line 1256
#endif #endif
/* dnssec.c */ /* dnssec.c */
size_t dnssec_generate_query(struct dns_header *header, unsigned char *end, char *name, int class, int type, int edns_pktsz); size_t dnssec_generate_query(struct dns_header *header, unsigned char *end, char *name, int class, int type, int edns_pktsz);
int dnssec_validate_by_ds(time_t now, struct dns_header *header, size_t plen, ch ar *name, char *keyname, int class); int dnssec_validate_by_ds(time_t now, struct dns_header *header, size_t plen, ch ar *name, char *keyname, int class);
int dnssec_validate_ds(time_t now, struct dns_header *header, size_t plen, char *name, char *keyname, int class); int dnssec_validate_ds(time_t now, struct dns_header *header, size_t plen, char *name, char *keyname, int class);
int dnssec_validate_reply(time_t now, struct dns_header *header, size_t plen, ch ar *name, char *keyname, int *class, int dnssec_validate_reply(time_t now, struct dns_header *header, size_t plen, ch ar *name, char *keyname, int *class,
int check_unsigned, int *neganswer, int *nons, int *nse c_ttl); int check_unsigned, int *neganswer, int *nons, int *nse c_ttl);
int dnskey_keytag(int alg, int flags, unsigned char *key, int keylen); int dnskey_keytag(int alg, int flags, unsigned char *key, int keylen);
size_t filter_rrsigs(struct dns_header *header, size_t plen); size_t filter_rrsigs(struct dns_header *header, size_t plen);
unsigned char* hash_questions(struct dns_header *header, size_t plen, char *name );
int setup_timestamp(void); int setup_timestamp(void);
/* hash_questions.c */
unsigned char *hash_questions(struct dns_header *header, size_t plen, char *name
);
/* crypto.c */ /* crypto.c */
const struct nettle_hash *hash_find(char *name); const struct nettle_hash *hash_find(char *name);
int hash_init(const struct nettle_hash *hash, void **ctxp, unsigned char **diges tp); int hash_init(const struct nettle_hash *hash, void **ctxp, unsigned char **diges tp);
int verify(struct blockdata *key_data, unsigned int key_len, unsigned char *sig, size_t sig_len, int verify(struct blockdata *key_data, unsigned int key_len, unsigned char *sig, size_t sig_len,
unsigned char *digest, size_t digest_len, int algo); unsigned char *digest, size_t digest_len, int algo);
char *ds_digest_name(int digest); char *ds_digest_name(int digest);
char *algo_digest_name(int algo); char *algo_digest_name(int algo);
char *nsec3_digest_name(int digest); char *nsec3_digest_name(int digest);
/* util.c */ /* util.c */
skipping to change at line 1643 skipping to change at line 1657
u16 *rrfilter_desc(int type); u16 *rrfilter_desc(int type);
int expand_workspace(unsigned char ***wkspc, int *szp, int new); int expand_workspace(unsigned char ***wkspc, int *szp, int new);
/* edns0.c */ /* edns0.c */
unsigned char *find_pseudoheader(struct dns_header *header, size_t plen, unsigned char *find_pseudoheader(struct dns_header *header, size_t plen,
size_t *len, unsigned char **p, int *is_sign, int *is_last); size_t *len, unsigned char **p, int *is_sign, int *is_last);
size_t add_pseudoheader(struct dns_header *header, size_t plen, unsigned char *l imit, size_t add_pseudoheader(struct dns_header *header, size_t plen, unsigned char *l imit,
unsigned short udp_sz, int optno, unsigned char *opt, siz e_t optlen, int set_do, int replace); unsigned short udp_sz, int optno, unsigned char *opt, siz e_t optlen, int set_do, int replace);
size_t add_do_bit(struct dns_header *header, size_t plen, unsigned char *limit); size_t add_do_bit(struct dns_header *header, size_t plen, unsigned char *limit);
size_t add_edns0_config(struct dns_header *header, size_t plen, unsigned char *l imit, size_t add_edns0_config(struct dns_header *header, size_t plen, unsigned char *l imit,
union mysockaddr *source, time_t now, int *check_subnet); union mysockaddr *source, time_t now, int *check_subnet, int *cacheable);
int check_source(struct dns_header *header, size_t plen, unsigned char *pseudohe ader, union mysockaddr *peer); int check_source(struct dns_header *header, size_t plen, unsigned char *pseudohe ader, union mysockaddr *peer);
/* arp.c */ /* arp.c */
int find_mac(union mysockaddr *addr, unsigned char *mac, int lazy, time_t now); int find_mac(union mysockaddr *addr, unsigned char *mac, int lazy, time_t now);
int do_arp_script_run(void); int do_arp_script_run(void);
/* dump.c */ /* dump.c */
#ifdef HAVE_DUMPFILE #ifdef HAVE_DUMPFILE
void dump_init(void); void dump_init(void);
void dump_packet(int mask, void *packet, size_t len, union mysockaddr *src, unio n mysockaddr *dst); void dump_packet(int mask, void *packet, size_t len, union mysockaddr *src, unio n mysockaddr *dst);
 End of changes. 14 change blocks. 
14 lines changed or deleted 29 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)