summaryrefslogtreecommitdiff
path: root/tools/libltgrey.h
diff options
context:
space:
mode:
authorJohn Denker <jsd@av8n.com>2012-07-30 04:07:01 (GMT)
committerJohn Denker <jsd@av8n.com>2012-07-30 04:07:01 (GMT)
commit292a76b35fd16cf11613f79ea38693449e3317f6 (patch)
treeed1a516a2a8576279cc69e92fb10b20ca2915b64 /tools/libltgrey.h
parent63be414b62f3234ad80607b95e8e71e33bfd8025 (diff)
separate dnscheck functionality from other features; clean up a little
Diffstat (limited to 'tools/libltgrey.h')
-rw-r--r--tools/libltgrey.h23
1 files changed, 7 insertions, 16 deletions
diff --git a/tools/libltgrey.h b/tools/libltgrey.h
index 585ec01..6f516b4 100644
--- a/tools/libltgrey.h
+++ b/tools/libltgrey.h
@@ -4,35 +4,26 @@
class whatsit{
public:
- std::string dirname;
+ std::string parent_dir;
std::string progname;
pid_t mypid;
timeval now;
- char* ipvar;
- char* hostvar;
- std::string ipbase;
- std::string ipname;
- std::string hostname;
int mod_age;
int ac_age;
std::string suffix;
std::string progid;
int verbosity;
- whatsit(const std::string name, const std::string _dirname)
- : dirname(_dirname), progname(name), mypid(getpid()),
- mod_age(0), ac_age(0),
- verbosity(0)
- {
- gettimeofday(&now, NULL);
- }
+ whatsit(const std::string name, const std::string _parent_dir);
int doit(const int penalty, const int stain);
// access comes after modification:
void update(const std::string msg, const timeval new_mod,
const timeval new_ac, const int penalty, const int stain);
int setup();
- int check_dns();
- int check_dns_sub(std::string &addr, std::string &host,
- std::vector<std::string> &checked);
+ int check_dns(const char* ipvar, const char* namevar);
+ int check_dns_sub(const char* ipvar, const char* namevar,
+ std::string &addr, std::string &host,
+ std::vector<std::string> &checked);
void dump(const std::string var);
+ int maybe_mkdir(const std::string somedir, const std::string msg);
};