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
This commit is contained in:
Nick Mathewson 2006-07-28 15:11:28 +00:00
parent 85f381153b
commit 84c2a6c16b
2 changed files with 15 additions and 8 deletions

View File

@ -58,21 +58,23 @@ N . Improve memory usage on tight-memory machines.
o Mmap cached-routers file; when building it, go oldest-to-newest.
- More unit tests and asserts for cached-routers file: ensure digest
for the right router. Verify dl by digest, fp, etc.
- Make sure cached-routers values and offsets are correct in the
. Make sure cached-routers values and offsets are correct in the
presence of windows FS insanity.
- Save and mmap v1 directories; store them zipped, not uncompressed.
- Save and mmap v1 directories; store them zipped, not
uncompressed.
- Store networkstatus docs zipped, not uncompressed. Maaaybe mmap
them too.
- Be a little more OO to save memory in frequently
o Be a little more OO to save memory in frequently
replicated structs.
o Split circuit_t into origin circuits and or circuits
. Move as many fields as reasonable out of base class.
o Move as many fields as reasonable out of base class.
o Re-pack structs to avoid wasted bytes.
o Split connection_t based on type field.
- "bandwidth classes", for incoming vs initiated-here conns.
o Asynchronous DNS
- and test it
. and test it
- Make it work on windows.
- make it the default on platforms where it works
- Security improvements

View File

@ -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.*/