Skip to content

Commit

Permalink
Move global constants RESOLVE_INTERVAL and RERESOLVE_INTERVAL to FTL.h
Browse files Browse the repository at this point in the history
Signed-off-by: DL6ER <[email protected]>
  • Loading branch information
DL6ER committed Apr 12, 2019
1 parent 8e67784 commit 9c4c9d7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 8 additions & 0 deletions FTL.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,14 @@
// can be 24 hours + 59 minutes
#define OVERTIME_SLOTS ((MAXLOGAGE+1)*3600/OVERTIME_INTERVAL)

// Interval for resolving NEW client and upstream server host names [seconds]
// Default: 60 (once every minute)
#define RESOLVE_INTERVAL 60

// Interval for re-resolving ALL known host names [seconds]
// Default: 3600 (once every hour)
#define RERESOLVE_INTERVAL 3600

// FTLDNS enums
enum { DATABASE_WRITE_TIMER, EXIT_TIMER, GC_TIMER, LISTS_TIMER, REGEX_TIMER, ARP_TIMER, LAST_TIMER };
enum { QUERIES, FORWARDED, CLIENTS, DOMAINS, OVERTIME, WILDCARD };
Expand Down
8 changes: 0 additions & 8 deletions resolve.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,6 @@
#include "FTL.h"
#include "shmem.h"

// Resolve new client and upstream server host names
// once every minute
#define RESOLVE_INTERVAL 60

// Re-resolve client names
// once every hour
#define RERESOLVE_INTERVAL 3600

static char *resolveHostname(const char *addr)
{
// Get host name
Expand Down

0 comments on commit 9c4c9d7

Please sign in to comment.