forked from jhaddix/massdns
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmassdns.h
52 lines (46 loc) · 1.14 KB
/
massdns.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
#ifndef MASSDNS_MASSDNS_H
#define MASSDNS_MASSDNS_H
#include "buffers.h"
#include "hashmap.h"
struct massdns_context;
typedef struct
{
void (*handle_response)(struct massdns_context *context, ldns_pkt *packet, struct sockaddr_storage *server);
} massdns_module_t;
typedef struct massdns_context
{
int sock;
buffer_t resolvers;
Hashmap *map;
struct timeval next_update;
size_t current_rate;
bool initial;
struct timeval start_time;
size_t total_domains;
struct timeval cooldown_time;
bool cooldown;
bool stdin;
FILE *outfile;
FILE *logfile;
struct sockaddr_storage server_addr;
struct cmd_args
{
bool ip6;
bool root;
char *resolvers;
char *domains;
enum ldns_enum_rr_type record_types;
unsigned char resolve_count;
size_t hashmap_size;
unsigned int interval_ms;
bool no_authority;
bool only_responses;
bool additional;
bool norecurse;
bool show_progress;
bool finalstats;
bool quiet;
} cmd_args;
massdns_module_t module;
} massdns_context_t;
#endif // MASSDNS_MASSDNS_H