summaryrefslogtreecommitdiff
path: root/usr.sbin/nsd/options.h
diff options
context:
space:
mode:
authorFlorian Obser <florian@cvs.openbsd.org>2020-05-14 06:08:42 +0000
committerFlorian Obser <florian@cvs.openbsd.org>2020-05-14 06:08:42 +0000
commitf57fb0d0486d7aafc358ce2efaa001618a4eb084 (patch)
treefa5705167711c032ea4c61c37b240999e5f32cc7 /usr.sbin/nsd/options.h
parent989557496ac66d0804ed6d9c4d50fff6000a8bc9 (diff)
Update to 4.3.1
Testing & OK sthen
Diffstat (limited to 'usr.sbin/nsd/options.h')
-rw-r--r--usr.sbin/nsd/options.h34
1 files changed, 30 insertions, 4 deletions
diff --git a/usr.sbin/nsd/options.h b/usr.sbin/nsd/options.h
index beb07741c3b..52605a02009 100644
--- a/usr.sbin/nsd/options.h
+++ b/usr.sbin/nsd/options.h
@@ -23,10 +23,14 @@ struct nsd;
typedef struct nsd_options nsd_options_type;
typedef struct pattern_options pattern_options_type;
typedef struct zone_options zone_options_type;
+typedef struct range_option range_option_type;
typedef struct ip_address_option ip_address_option_type;
+typedef struct cpu_option cpu_option_type;
+typedef struct cpu_map_option cpu_map_option_type;
typedef struct acl_options acl_options_type;
typedef struct key_options key_options_type;
typedef struct config_parser_state config_parser_state_type;
+
/*
* Options global for nsd.
*/
@@ -67,6 +71,7 @@ struct nsd_options {
int verbosity;
int hide_version;
int hide_identity;
+ int drop_updates;
int do_ip4;
int do_ip6;
const char* database;
@@ -74,6 +79,8 @@ struct nsd_options {
const char* version;
const char* logfile;
int server_count;
+ struct cpu_option* cpu_affinity;
+ struct cpu_map_option* service_cpu_affinity;
int tcp_count;
int tcp_reject_overflow;
int confine_to_zone;
@@ -159,9 +166,29 @@ struct nsd_options {
region_type* region;
};
+struct range_option {
+ struct range_option* next;
+ int first;
+ int last;
+};
+
struct ip_address_option {
struct ip_address_option* next;
char* address;
+ struct range_option* servers;
+ int dev;
+ int fib;
+};
+
+struct cpu_option {
+ struct cpu_option* next;
+ int cpu;
+};
+
+struct cpu_map_option {
+ struct cpu_map_option* next;
+ int service;
+ int cpu;
};
/*
@@ -300,12 +327,10 @@ struct config_parser_state {
int line;
int errors;
struct nsd_options* opt;
- /* pointer to memory where options for the configuration block that is
- currently parsed must be stored. memory is dynamically allocated,
- the block is promoted once it is closed. */
struct pattern_options *pattern;
struct zone_options *zone;
struct key_options *key;
+ struct ip_address_option *ip;
void (*err)(void*,const char*);
void* err_arg;
};
@@ -387,7 +412,8 @@ int acl_addr_matches_host(struct acl_options* acl, struct acl_options* host);
int acl_addr_matches(struct acl_options* acl, struct query* q);
int acl_key_matches(struct acl_options* acl, struct query* q);
int acl_addr_match_mask(uint32_t* a, uint32_t* b, uint32_t* mask, size_t sz);
-int acl_addr_match_range(uint32_t* minval, uint32_t* x, uint32_t* maxval, size_t sz);
+int acl_addr_match_range_v6(uint32_t* minval, uint32_t* x, uint32_t* maxval, size_t sz);
+int acl_addr_match_range_v4(uint32_t* minval, uint32_t* x, uint32_t* maxval, size_t sz);
/* returns true if acls are both from the same host */
int acl_same_host(struct acl_options* a, struct acl_options* b);