diff options
author | Nick Mathewson <nickm@torproject.org> | 2008-02-08 21:13:15 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2008-02-08 21:13:15 +0000 |
commit | 141a5877f3dad587e3af16a1e589a668fc227a41 (patch) | |
tree | 4266c24380dbfbfd0bedddb131c8f71c7668c778 /src/or/or.h | |
parent | de827f89df460e5920239a14addd1dd264b76bb5 (diff) | |
download | tor-141a5877f3dad587e3af16a1e589a668fc227a41.tar.gz tor-141a5877f3dad587e3af16a1e589a668fc227a41.zip |
r14063@tombo: nickm | 2008-02-08 15:48:32 -0500
Add a bunch more code documentation; change the interface of fetch_var_cell_from_buf() so it takes the current link protocol into account and can't get confused by weird command bytes on v1 connections.
svn:r13430
Diffstat (limited to 'src/or/or.h')
-rw-r--r-- | src/or/or.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/or/or.h b/src/or/or.h index 7d1904b992..50c2c93375 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -245,14 +245,17 @@ typedef enum { #define OR_CONN_STATE_PROXY_FLUSHING 2 /** State for a connection to an OR: waiting for proxy response. */ #define OR_CONN_STATE_PROXY_READING 3 -/** State for a connection to an OR: SSL is handshaking, not done yet. */ +/** State for a connection to an OR or client: SSL is handshaking, not done + * yet. */ #define OR_CONN_STATE_TLS_HANDSHAKING 4 -/** DOCDOC */ +/** State for a connection to an OR: We're doing a second SSL handshake for + * renegotiation purposes. */ #define OR_CONN_STATE_TLS_CLIENT_RENEGOTIATING 5 -/** DOCDOC */ +/** State for a connection at an OR: We're waiting for the client to + * renegotiate. */ #define OR_CONN_STATE_TLS_SERVER_RENEGOTIATING 6 /** State for a connection to an OR: We're done with our SSL handshake, but we - * haven't yet negotiated link protocol versions and finished authenticating. + * haven't yet negotiated link protocol versions and sent a netinfo cell. */ #define OR_CONN_STATE_OR_HANDSHAKING 7 /** State for a connection to an OR: Ready to send/receive cells. */ @@ -2457,7 +2460,7 @@ int write_to_buf_zlib(buf_t *buf, tor_zlib_state_t *state, const char *data, size_t data_len, int done); int move_buf_to_buf(buf_t *buf_out, buf_t *buf_in, size_t *buf_flushlen); int fetch_from_buf(char *string, size_t string_len, buf_t *buf); -int fetch_var_cell_from_buf(buf_t *buf, var_cell_t **out); +int fetch_var_cell_from_buf(buf_t *buf, var_cell_t **out, int linkproto); int fetch_from_buf_http(buf_t *buf, char **headers_out, size_t max_headerlen, char **body_out, size_t *body_used, size_t max_bodylen, |