diff options
author | rl1987 <rl1987@sdf.lonestar.org> | 2014-09-21 14:35:48 +0300 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2014-09-22 14:18:01 -0400 |
commit | 80622c0664741e7947ace3972d106d94340aaf7c (patch) | |
tree | 0e34363c6661756c52121ecb728560c742eed16c /src | |
parent | 45fc0612d3c496c33c33bdfc9d6c0c754a785d9a (diff) | |
download | tor-80622c0664741e7947ace3972d106d94340aaf7c.tar.gz tor-80622c0664741e7947ace3972d106d94340aaf7c.zip |
Writing comments for newly added functions.
Diffstat (limited to 'src')
-rw-r--r-- | src/or/policies.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/or/policies.c b/src/or/policies.c index ffeda1fa4c..7090eda2c4 100644 --- a/src/or/policies.c +++ b/src/or/policies.c @@ -984,6 +984,18 @@ policies_parse_exit_policy_internal(config_line_t *cfg, smartlist_t **dest, return 0; } +/** Parse exit policy in <b>cfg</b> into <b>dest</b> smartlist. + * + * Add entry that rejects all IPv6 destinations unless + * <b>EXIT_POLICY_IPV6_ENABLED</b> bit is set in <b>options</b> bitmask. + * + * If <b>EXIT_POLICY_REJECT_PRIVATE</b> bit is set in <b>options</b>, + * do add entry that rejects all destinations in private subnetwork + * Tor is running in. + * + * Respectively, if <b>EXIT_POLICY_ADD_DEFAULT</b> bit is set, add + * default exit policy entries to <b>result</b> smartlist. + */ int policies_parse_exit_policy(config_line_t *cfg, smartlist_t **dest, exit_policy_parser_cfg_t options, @@ -999,6 +1011,18 @@ policies_parse_exit_policy(config_line_t *cfg, smartlist_t **dest, add_default); } +/** Parse <b>ExitPolicy</b> member of <b>or_options</b> into <b>result</b> + * smartlist. + * If <b>or_options->IPv6Exit</b> is false, add an entry that + * rejects all IPv6 destinations. + * + * If <b>or_options->ExitPolicyRejectPrivate</b> is true, add entry that + * rejects all destinations in the private subnetwork of machine Tor + * instance is running in. + * + * If <b>or_options->BridgeRelay</b> is false, add entries of default + * Tor exit policy into <b>result</b> smartlist. + */ int policies_parse_exit_policy_from_options(const or_options_t *or_options, uint32_t local_address, |