summaryrefslogtreecommitdiff
path: root/src/or/or.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2006-07-28 15:11:28 +0000
committerNick Mathewson <nickm@torproject.org>2006-07-28 15:11:28 +0000
commit84c2a6c16b00a78fc3329b7f717cfe6989fe3f28 (patch)
tree5330aba931cd21a3f7f27599b62508d2bac07937 /src/or/or.h
parent85f381153ba6a3c87e3e43e2640b313c27d9b2ff (diff)
downloadtor-84c2a6c16b00a78fc3329b7f717cfe6989fe3f28.tar.gz
tor-84c2a6c16b00a78fc3329b7f717cfe6989fe3f28.zip
r6950@Kushana: nickm | 2006-07-28 10:32:08 -0400
Document split fields better. Now, I think we can take a break from type splitting for a bit. svn:r6935
Diffstat (limited to 'src/or/or.h')
-rw-r--r--src/or/or.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/or/or.h b/src/or/or.h
index d05475617c..02290eb59c 100644
--- a/src/or/or.h
+++ b/src/or/or.h
@@ -607,6 +607,10 @@ typedef struct connection_t {
uint8_t type; /**< What kind of connection is this? */
uint8_t state; /**< Current state of this connection. */
uint8_t purpose; /**< Only used for DIR and EXIT types currently. */
+
+ /* The next fields are all one-bit booleans. Some are only applicable
+ * to connection subtypes, but we hold them here anyway, to save space.
+ * (Currently, they all fit into a single byte.) */
unsigned wants_to_read:1; /**< Boolean: should we start reading again once
* the bandwidth throttler allows it? */
unsigned wants_to_write:1; /**< Boolean: should we start writing again once
@@ -614,18 +618,19 @@ typedef struct connection_t {
unsigned hold_open_until_flushed:1; /**< Despite this connection's being
* marked for close, do we flush it
* before closing it? */
+ unsigned int inbuf_reached_eof:1; /**< Boolean: did read() return 0 on this
+ * conn? */
unsigned edge_has_sent_end:1; /**< For debugging; only used on edge
* connections. Set once we've set the stream end,
* and check in circuit_about_to_close_connection(). */
/** For control connections only. If set, we send extended info with control
* events as appropriate. */
unsigned int control_events_are_extended:1;
- /** Used for OR conns that shouldn't get any new circs attached to them. !!*/
+ /** Used for OR conns that shouldn't get any new circs attached to them. */
unsigned int or_is_obsolete:1;
/** For AP connections only. If 1, and we fail to reach the chosen exit,
* stop requiring it. */
unsigned int chosen_exit_optional:1;
- int inbuf_reached_eof:1; /**< Boolean: did read() return 0 on this conn? */
int s; /**< Our socket; -1 if this connection is closed. */
int conn_array_index; /**< Index into the global connection array. */
@@ -1281,7 +1286,7 @@ typedef struct or_circuit_t {
*/
char rend_token[REND_TOKEN_LEN];
- char handshake_digest[DIGEST_LEN]; /**< Stores KH for intermediate hops. */
+ char handshake_digest[DIGEST_LEN]; /**< Stores KH for the handshake. */
} or_circuit_t;
/** Convert a circuit subtype to a circuit_t.*/