/* gs-domains.h */

#ifndef _h_domains
#define _h_domains

#include "getstats.h"

donode *NewDomainInfo(	char *sofar,	logr *r, treebranch *br);
donode *NewDomain(	vhost *vh,	char *dir);
int get_do_list(	vhost *vh,	char *dir);
donode *wantDomain(	vhost *vh,	char *dir);

void AddDomEntry(logr *r, domainbranch *dns_hosts, domainbranch *num_hosts);
void PrintDomainHeader(	FILE *rpt,	donode *dome,	int maxlevel);
void PrintDomainLevel(	FILE *rpt,	domainbranch *br,
			int level,	int maxlevel);
void TopTenDOM(		donode *dome,	domainbranch *br,
			char *suffix,	int level);
void ResetDomainLevel(	domainbranch *br);
int CompareDomainNodes(	domainbranch *node1,
			domainbranch *node2,
			sortType skey);
void PrintDomainName(	FILE *rpt,	struct domainbranch *br,
			int level);
domainbranch *NewDomBranch(char *domain, char *fulldom);
domainbranch *AddDomReq(domainbranch *br, char *domain, char *fulldom,
			float nbytes);
int isip(		char *address);
void makelower(		char *string);
void WriteDomainReports(vhost *vh);
void CountUniqueHosts(donode *dome);
int WriteReportDOM(	char *rptfilnam, int lev,
			vhost *thisvhost, donode *dome);

#endif
