]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Module-document dnsserv.c, policies.c, routerkeys.c
authorNick Mathewson <nickm@torproject.org>
Mon, 24 Oct 2016 15:47:40 +0000 (11:47 -0400)
committerNick Mathewson <nickm@torproject.org>
Mon, 24 Oct 2016 15:47:40 +0000 (11:47 -0400)
src/or/dnsserv.c
src/or/policies.c
src/or/routerkeys.c

index 04be3e8a6acfcd57482e1c5cc2c96902c534f748..8dce832d4743c5ab7063eb19392c368e0b5f6b13 100644 (file)
@@ -3,10 +3,22 @@
 
 /**
  * \file dnsserv.c
- * \brief Implements client-side DNS proxy server code.  Note:
- * this is the DNS Server code, not the Server DNS code.  Confused?  This code
- * runs on client-side, and acts as a DNS server.  The code in dns.c, on the
- * other hand, runs on Tor servers, and acts as a DNS client.
+ * \brief Implements client-side DNS proxy server code.
+ *
+ * When a user enables the DNSPort configuration option to have their local
+ * Tor client handle DNS requests, this module handles it.  It functions as a
+ * "DNS Server" on the client side, which client applications use.
+ *
+ * Inbound DNS requests are represented as entry_connection_t here (since
+ * that's how Tor represents client-side streams), which are kept associated
+ * with an evdns_server_request structure as exposed by Libevent's
+ * evdns code.
+ *
+ * Upon receiving a DNS request, libevent calls our evdns_server_callback()
+ * function here, which causes this module to create an entry_connection_t
+ * request as appropriate.  Later, when that request is answered,
+ * connection_edge.c calls dnsserv_resolved() so we can finish up and tell the
+ * DNS client.
  **/
 
 #include "or.h"
index 44a46d2fe20feb77fc48ac01859828bf6e634a27..4b26c697c8d10898384958ca0ce49fd3952b9f91 100644 (file)
@@ -6,6 +6,13 @@
 /**
  * \file policies.c
  * \brief Code to parse and use address policies and exit policies.
+ *
+ * We have two key kinds of address policy: full and compressed.  A full
+ * policy is an array of accept/reject patterns, to be applied in order.
+ * A short policy is simply a list of ports.  This module handles both
+ * kinds, including generic functions to apply them to addresses, and
+ * also including code to manage the global policies that we apply to
+ * incoming and outgoing connections.
  **/
 
 #define POLICIES_PRIVATE
index ca32228fc7815e5d2b0a104449c799d409e510ef..7a1a2c9b2df2a98cb34cb6d3e0b257b72992e554 100644 (file)
@@ -5,8 +5,13 @@
  * \file routerkeys.c
  *
  * \brief Functions and structures to handle generating and maintaining the
- *  set of keypairs necessary to be an OR. (Some of the code in router.c
- *  belongs here.)
+ *  set of keypairs necessary to be an OR.
+ *
+ * The keys handled here now are the Ed25519 keys that Tor relays use to sign
+ * descriptors, authenticate themselves on links, and identify one another
+ * uniquely.  Other keys are maintained in router.c and rendservice.c.
+ *
+ * (TODO: The keys in router.c should go here too.)
  */
 
 #include "or.h"