summaryrefslogtreecommitdiff
path: root/src/or/policies.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2007-02-16 20:01:02 +0000
committerNick Mathewson <nickm@torproject.org>2007-02-16 20:01:02 +0000
commit11e5656ab7fdbf8bad2e041261542f2bda6a5a8c (patch)
tree0ab37c179ee7e8466c2d4504edf2491d3411ffb2 /src/or/policies.c
parentae7576a19e5294b3c586363397a45585e2a523bc (diff)
downloadtor-11e5656ab7fdbf8bad2e041261542f2bda6a5a8c.tar.gz
tor-11e5656ab7fdbf8bad2e041261542f2bda6a5a8c.zip
r11826@catbus: nickm | 2007-02-16 14:58:38 -0500
Resolve 56 DOCDOC comments. svn:r9594
Diffstat (limited to 'src/or/policies.c')
-rw-r--r--src/or/policies.c27
1 files changed, 18 insertions, 9 deletions
diff --git a/src/or/policies.c b/src/or/policies.c
index 73a342f6bf..392385ce5a 100644
--- a/src/or/policies.c
+++ b/src/or/policies.c
@@ -12,15 +12,18 @@ const char policies_c_id[] = \
#include "or.h"
-/** DOCDOC */
+/** Policy that addresses for incoming SOCKS connections must match. */
static addr_policy_t *socks_policy = NULL;
-/** DOCDOC */
+/** Policy that addresses for incoming directory connections must match. */
static addr_policy_t *dir_policy = NULL;
-/** DOCDOC */
+/** Policy that addresses for incoming router descriptors must match in order
+ * to be published by us. */
static addr_policy_t *authdir_reject_policy = NULL;
-/** DOCDOC */
+/** Policy that addresses for incoming router descriptors must match in order
+ * to be marked as valid in our networkstatus. */
static addr_policy_t *authdir_invalid_policy = NULL;
-/** DOCDOC */
+/** Policy that addresses for incoming router descriptors must <b>not</b>
+ * match in order to not be marked as BadExit. */
static addr_policy_t *authdir_badexit_policy = NULL;
/** Parsed addr_policy_t describing which addresses we believe we can start
@@ -153,6 +156,7 @@ addr_policy_permits_address(uint32_t addr, uint16_t port,
}
}
+/** DOCDOC */
int
fascist_firewall_allows_address_or(uint32_t addr, uint16_t port)
{
@@ -160,6 +164,7 @@ fascist_firewall_allows_address_or(uint32_t addr, uint16_t port)
reachable_or_addr_policy);
}
+/** DOCDOC */
int
fascist_firewall_allows_address_dir(uint32_t addr, uint16_t port)
{
@@ -215,7 +220,9 @@ authdir_policy_badexit_address(uint32_t addr, uint16_t port)
#define REJECT(arg) \
do { *msg = tor_strdup(arg); goto err; } while (0)
-/** DOCDOC */
+/** Config helper: If there's any problem with the policy configuration
+ * options in <b>options</b>, return -1 and set <b>msg</b> to a newly
+ * allocated description of the error. Else return 0. */
int
validate_addr_policies(or_options_t *options, char **msg)
{
@@ -273,7 +280,8 @@ load_policy_from_option(config_line_t *config, addr_policy_t **policy,
}
}
-/** DOCDOC */
+/** Set all policies based on <b>options</b>, which should have been validated
+ * first. */
void
policies_parse_from_options(or_options_t *options)
{
@@ -663,7 +671,8 @@ policy_write_item(char *buf, size_t buflen, addr_policy_t *policy)
return (int)written;
}
-/** DOCDOC */
+/** Implementation for GETINFO control command: knows the answer for questions
+ * about "exit-policy/..." */
int
getinfo_helper_policies(control_connection_t *conn,
const char *question, char **answer)
@@ -689,7 +698,7 @@ addr_policy_free(addr_policy_t *p)
}
}
-/** DOCDOC */
+/** Release all storage held by policy variables. */
void
policies_free_all(void)
{