summaryrefslogtreecommitdiff
path: root/src/or/or.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2011-11-08 16:10:38 -0500
committerNick Mathewson <nickm@torproject.org>2011-11-30 11:55:44 -0500
commit5f0a8dcd2cfcbafc3deb3a6717808b607a459dac (patch)
treecab98ff453a2116811274dd2118e61290aadd514 /src/or/or.h
parent628b735fe39e13cc37afb567b32d4b006da51c89 (diff)
downloadtor-5f0a8dcd2cfcbafc3deb3a6717808b607a459dac.tar.gz
tor-5f0a8dcd2cfcbafc3deb3a6717808b607a459dac.zip
Initial hacking for proposal 186.
This code handles the new ORPort options, and incidentally makes all remaining port types use the new port configuration systems. There are some rough edges! It doesn't do well in the case where your Address says one thing but you say to Advertise another ORPort. It doesn't handle AllAddrs. It doesn't actually advertise anything besides the first listed advertised IPv4 ORPort and DirPort. It doesn't do port forwarding to them either. It's not tested either, it needs more documentation, and it probably forgets to put the milk back in the refrigerator.
Diffstat (limited to 'src/or/or.h')
-rw-r--r--src/or/or.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/or/or.h b/src/or/or.h
index 9d6f605024..c2db88aab6 100644
--- a/src/or/or.h
+++ b/src/or/or.h
@@ -2833,6 +2833,13 @@ typedef struct port_cfg_t {
int session_group; /**< A session group, or -1 if this port is not in a
* session group. */
+ /* Server port types (or, dir) only: */
+ unsigned int no_advertise : 1;
+ unsigned int no_listen : 1;
+ unsigned int all_addrs : 1;
+ unsigned int ipv4_only : 1;
+ unsigned int ipv6_only : 1;
+
/* Unix sockets only: */
/** Path for an AF_UNIX address */
char unix_addr[FLEXIBLE_ARRAY_MEMBER];
@@ -2948,17 +2955,17 @@ typedef struct {
int DirAllowPrivateAddresses;
char *User; /**< Name of user to run Tor as. */
char *Group; /**< Name of group to run Tor as. */
- int ORPort; /**< Port to listen on for OR connections. */
+ config_line_t *ORPort; /**< Ports to listen on for OR connections. */
config_line_t *SocksPort; /**< Ports to listen on for SOCKS connections. */
/** Ports to listen on for transparent pf/netfilter connections. */
config_line_t *TransPort;
config_line_t *NATDPort; /**< Ports to listen on for transparent natd
* connections. */
- int ControlPort; /**< Port to listen on for control connections. */
+ config_line_t *ControlPort; /**< Port to listen on for control connections. */
config_line_t *ControlSocket; /**< List of Unix Domain Sockets to listen on
* for control connections. */
int ControlSocketsGroupWritable; /**< Boolean: Are control sockets g+rw? */
- int DirPort; /**< Port to listen on for directory connections. */
+ config_line_t *DirPort; /**< Port to listen on for directory connections. */
config_line_t *DNSPort; /**< Port to listen on for DNS requests. */
int AssumeReachable; /**< Whether to publish our descriptor regardless. */
int AuthoritativeDir; /**< Boolean: is this an authoritative directory? */