forked from tobez/validns
-
Notifications
You must be signed in to change notification settings - Fork 0
/
common.h
57 lines (50 loc) · 975 Bytes
/
common.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/*
* Part of DNS zone file validator `validns`.
*
* Copyright 2011, Anton Berezin <[email protected]>
* Modified BSD license.
* (See LICENSE file in the distribution.)
*
*/
#ifndef _COMMON_H_
#define _COMMON_H_ 1
struct file_info
{
struct file_info *next;
FILE *file;
int line;
int paren_mode;
char buf[2048];
char name[0];
};
extern struct file_info *file_info;
#define N_POLICY_CHECKS 2
#define POLICY_SINGLE_NS 0
#define POLICY_CNAME_OTHER_DATA 1
struct globals {
struct stats {
int names_count;
int rr_count;
int rrset_count;
int error_count;
int skipped_dup_rr_count;
int soa_rr_count;
} stats;
struct command_line_options
{
int die_on_first_error;
int no_output;
int summary;
int verbose;
char *include_path;
char *current_origin;
uint32_t current_time;
char policy_checks[N_POLICY_CHECKS];
} opt;
int exit_code;
long default_ttl;
int nsec3_present;
int nsec3_opt_out_present;
};
extern struct globals G;
#endif