Sophie

Sophie

distrib > Mandriva > 2011.0 > i586 > media > contrib-release-debug > by-pkgid > e15638eab2afcd5cb258393c684c3bbc > files > 23

drill-debug-0.9.2-7mdv2011.0.i586.rpm

/* drill.h
 *
 * drill header file
 *
 * (c) NLnet Labs, 2004
 *
 * See the file LICENSE for the license
 *
 */

#ifndef _DRILL_H
#define _DRILL_H

#define DRILL_VERSION	"0.9.2"

#define IN_ADDR_ARPA    "in-addr.arpa."
#define IPV6_ARPA       "ip6.arpa."

#define TRACE	1
#define CHASE	2
#define DUMPQUERY 3
#define FROMFILE 4
#define RESOLVE 5
#define NSEC_WALK 6
#define ANSWERFROMFILE 7

#define RET_SUCCESS 0
#define RET_FAILURE 1
/* there too long */
#define RET_SUC 0
#define RET_FAIL 1

#define NO_FOLLOW 0
#define FOLLOW 1

#define NO_PRINT 0
#define PRINT 1

#define NO_LONG 0

#define PROTO_UDP 0
#define PROTO_TCP 1
#define PROTO_ANY 2

#define NO_COMMENT 0
#define COMMENT 1

/**
 * Drill options structure.
 * This structure holds global options values.
 */
struct t_opt {
	/** Manually specified server to query. */
	char *server;
	/** Manually specified type to query for. */
	uint16_t type;
	/** Manually specified name to query for. */
	char *owner;
	/** Manually specified class to query for. */
	uint16_t class;

	/** Port to query on. */
	uint16_t port;
	/** OPT; package size. */
	unsigned int bufsize;	
	/** OPT; dobit; enable dnssec. ('do' is a reserved keyword) */
	uint8_t dnssec;	
	/** Main purpose of a drill run. */
	uint8_t purpose;
	/** Dump hex of packets. */
	uint8_t dumphex;
	/** Be verbose. */
	uint8_t verbose;
	/** Be debuggy. */
	uint8_t debug;
	/** Print DS after each DNSKEY. */ 
	uint8_t ds;
	/** Do a reverse lookup. */
	uint8_t reverse;
	/** Name for dumping or reading queries. */
	char *filename;	
	/** Read answer from file instead of server response. */
	char *answerfile;
	/** Transport layer: 4 only ip4, 6 only ip6, 0 either. */
	unsigned int transport;
	/** don't try the next server on SERVFAIL if 1, 0 is default */
	unsigned int fail;
	/** if 1 don't set the RD bit */
	unsigned int recurse;
};

extern struct t_opt *drill_opt;
#endif /*  _DRILL_H */