Create dns.h

This commit is contained in:
Sebastian Hahn 2010-07-22 12:24:25 +02:00
parent 85f7d54418
commit dc2f1666ff
8 changed files with 37 additions and 17 deletions

View File

@ -21,6 +21,7 @@
#include "cpuworker.h"
#include "dirserv.h"
#include "dirvote.h"
#include "dns.h"
#include "geoip.h"
#include "rendclient.h"
#include "rendservice.h"

View File

@ -23,6 +23,7 @@
#include "cpuworker.h"
#include "directory.h"
#include "dirserv.h"
#include "dns.h"
#include "dnsserv.h"
#include "geoip.h"
#include "rendclient.h"

View File

@ -18,6 +18,7 @@
#include "connection_edge.h"
#include "connection_or.h"
#include "control.h"
#include "dns.h"
#include "dnsserv.h"
#include "dirserv.h"
#include "rendclient.h"

View File

@ -18,6 +18,7 @@
#include "connection.h"
#include "connection_edge.h"
#include "control.h"
#include "dns.h"
#include "router.h"
#include "ht.h"
#ifdef HAVE_EVENT2_DNS_H

31
src/or/dns.h Normal file
View File

@ -0,0 +1,31 @@
/* Copyright (c) 2001 Matej Pfajfar.
* Copyright (c) 2001-2004, Roger Dingledine.
* Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
* Copyright (c) 2007-2010, The Tor Project, Inc. */
/* See LICENSE for licensing information */
/**
* \file dns.h
* \brief Header file for dns.c.
**/
#ifndef _TOR_DNS_H
#define _TOR_DNS_H
int dns_init(void);
int has_dns_init_failed(void);
void dns_free_all(void);
uint32_t dns_clip_ttl(uint32_t ttl);
int dns_reset(void);
void connection_dns_remove(edge_connection_t *conn);
void assert_connection_edge_not_dns_pending(edge_connection_t *conn);
void assert_all_pending_dns_resolves_ok(void);
void dns_cancel_pending_resolve(const char *question);
int dns_resolve(edge_connection_t *exitconn);
void dns_launch_correctness_checks(void);
int dns_seems_to_be_broken(void);
void dns_reset_correctness_checks(void);
void dump_dns_mem_usage(int severity);
#endif

View File

@ -26,6 +26,7 @@
#include "directory.h"
#include "dirserv.h"
#include "dirvote.h"
#include "dns.h"
#include "dnsserv.h"
#include "geoip.h"
#include "rendclient.h"

View File

@ -3197,23 +3197,6 @@ typedef struct vote_timing_t {
int dist_delay;
} vote_timing_t;
/********************************* dns.c ***************************/
int dns_init(void);
int has_dns_init_failed(void);
void dns_free_all(void);
uint32_t dns_clip_ttl(uint32_t ttl);
int dns_reset(void);
void connection_dns_remove(edge_connection_t *conn);
void assert_connection_edge_not_dns_pending(edge_connection_t *conn);
void assert_all_pending_dns_resolves_ok(void);
void dns_cancel_pending_resolve(const char *question);
int dns_resolve(edge_connection_t *exitconn);
void dns_launch_correctness_checks(void);
int dns_seems_to_be_broken(void);
void dns_reset_correctness_checks(void);
void dump_dns_mem_usage(int severity);
/********************************* geoip.c **************************/
/** Round all GeoIP results to the next multiple of this value, to avoid

View File

@ -14,6 +14,7 @@
#include "control.h"
#include "directory.h"
#include "dirserv.h"
#include "dns.h"
#include "geoip.h"
#include "router.h"
#include "routerlist.h"