]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Split headers for dnsserv.c functions out of or.h
authorSebastian Hahn <sebastian@torproject.org>
Wed, 21 Jul 2010 10:26:18 +0000 (12:26 +0200)
committerSebastian Hahn <sebastian@torproject.org>
Tue, 27 Jul 2010 05:56:25 +0000 (07:56 +0200)
The next series of commits begins addressing the issue that we're
currently including the complete or.h file in all of our source files.
To change that, we're splitting function definitions into new header
files (one header file per source file).

src/or/connection.c
src/or/connection_edge.c
src/or/control.c
src/or/dnsserv.c
src/or/dnsserv.h [new file with mode: 0644]
src/or/geoip.c
src/or/main.c
src/or/or.h

index 7b1493bfc5421dc2e2146c31c7fd69f1208ac0dd..82764ec4ce377bc76a6f8c2b190ef5b7051462fb 100644 (file)
@@ -11,6 +11,7 @@
  **/
 
 #include "or.h"
+#include "dnsserv.h"
 
 static connection_t *connection_create_listener(
                                struct sockaddr *listensockaddr,
index a173dc1226d415b996cf6fac8ce264b31d515574..941f7b7e56986264c29c41e719d36ab74ed2a678 100644 (file)
@@ -10,6 +10,7 @@
  **/
 
 #include "or.h"
+#include "dnsserv.h"
 
 #ifdef HAVE_LINUX_TYPES_H
 #include <linux/types.h>
index ab17bec8a42d4493e026c696d1c4a024af5d9229..68921663e108aecade1647e6322db3f6141f4bb3 100644 (file)
@@ -11,6 +11,7 @@
 #define CONTROL_PRIVATE
 
 #include "or.h"
+#include "dnsserv.h"
 
 /** Yield true iff <b>s</b> is the state of a control_connection_t that has
  * finished authentication and is accepting commands. */
index 2e5301eae0243bbe9184a482369555ad3f5b22ba..390ef2f7b1bf7210eab01165deb6a58a079e9dc8 100644 (file)
@@ -9,6 +9,7 @@
  **/
 
 #include "or.h"
+#include "dnsserv.h"
 #ifdef HAVE_EVENT2_DNS_H
 #include <event2/dns.h>
 #include <event2/dns_compat.h>
diff --git a/src/or/dnsserv.h b/src/or/dnsserv.h
new file mode 100644 (file)
index 0000000..f3b73d4
--- /dev/null
@@ -0,0 +1,26 @@
+/* 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 dnsserv.h
+ * \brief Header file for dnsserv functions
+ **/
+
+#ifndef _TOR_DNSSERV_H
+#define _TOR_DNSSERV_H
+
+void dnsserv_configure_listener(connection_t *conn);
+void dnsserv_close_listener(connection_t *conn);
+void dnsserv_resolved(edge_connection_t *conn,
+                      int answer_type,
+                      size_t answer_len,
+                      const char *answer,
+                      int ttl);
+void dnsserv_reject_request(edge_connection_t *conn);
+int dnsserv_launch_request(const char *name, int is_reverse);
+
+#endif
+
index 7f6cf79d8b216639e57e486bb2f826b42f6d1190..248c68ea46d6801853a4c94b5373b406d9bebf86 100644 (file)
@@ -10,6 +10,7 @@
 #define GEOIP_PRIVATE
 #include "or.h"
 #include "ht.h"
+#include "dnsserv.h"
 
 static void clear_geoip_db(void);
 
index 0dcc45464a3ea6effd0d9668f3f58635ff34ecb1..521d2c2ca71bf97595e0b3dd53d64293725f8365 100644 (file)
@@ -12,6 +12,7 @@
 
 #define MAIN_PRIVATE
 #include "or.h"
+#include "dnsserv.h"
 #ifdef USE_DMALLOC
 #include <dmalloc.h>
 #include <openssl/crypto.h>
index 2321f2f3c26478d8104ba54f111cb833225b551c..10165d4937b24f1e01b3c5e6209aa406dd373198 100644 (file)
@@ -4092,18 +4092,6 @@ int dns_seems_to_be_broken(void);
 void dns_reset_correctness_checks(void);
 void dump_dns_mem_usage(int severity);
 
-/********************************* dnsserv.c ************************/
-
-void dnsserv_configure_listener(connection_t *conn);
-void dnsserv_close_listener(connection_t *conn);
-void dnsserv_resolved(edge_connection_t *conn,
-                      int answer_type,
-                      size_t answer_len,
-                      const char *answer,
-                      int ttl);
-void dnsserv_reject_request(edge_connection_t *conn);
-int dnsserv_launch_request(const char *name, int is_reverse);
-
 /********************************* geoip.c **************************/
 
 /** Round all GeoIP results to the next multiple of this value, to avoid