diff options
author | Roger Dingledine <arma@torproject.org> | 2003-09-21 06:15:43 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2003-09-21 06:15:43 +0000 |
commit | ed51df7453b51ac5263fcc43f46cea26022d17da (patch) | |
tree | 8a1b76a63a28375b310077c564c9ca01c85a72ab /src/or/or.h | |
parent | 7afe2adbaf09a3743ff6ce05d2c6ccdb19dca50c (diff) | |
download | tor-ed51df7453b51ac5263fcc43f46cea26022d17da.tar tor-ed51df7453b51ac5263fcc43f46cea26022d17da.tar.gz |
bugfixes and note missing features
deal with content-length headers better when reading http
don't assume struct socks4_info is a packed struct
fail the socks handshake if destip is zero
flesh out conn_state_to_string() for dir conn
fix typo (bug) in connection_handle_read()
directory get is now called fetch, post is now upload
reopen logs on sighup
svn:r475
Diffstat (limited to 'src/or/or.h')
-rw-r--r-- | src/or/or.h | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/src/or/or.h b/src/or/or.h index 915c6deff..234a507d7 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -156,12 +156,12 @@ #define _AP_CONN_STATE_MAX 5 #define _DIR_CONN_STATE_MIN 0 -#define DIR_CONN_STATE_CONNECTING_GET 0 -#define DIR_CONN_STATE_CONNECTING_POST 1 -#define DIR_CONN_STATE_CLIENT_SENDING_GET 2 -#define DIR_CONN_STATE_CLIENT_SENDING_POST 3 -#define DIR_CONN_STATE_CLIENT_READING_GET 4 -#define DIR_CONN_STATE_CLIENT_READING_POST 5 +#define DIR_CONN_STATE_CONNECTING_FETCH 0 +#define DIR_CONN_STATE_CONNECTING_UPLOAD 1 +#define DIR_CONN_STATE_CLIENT_SENDING_FETCH 2 +#define DIR_CONN_STATE_CLIENT_SENDING_UPLOAD 3 +#define DIR_CONN_STATE_CLIENT_READING_FETCH 4 +#define DIR_CONN_STATE_CLIENT_READING_UPLOAD 5 #define DIR_CONN_STATE_SERVER_COMMAND_WAIT 6 #define DIR_CONN_STATE_SERVER_WRITING 7 #define _DIR_CONN_STATE_MAX 7 @@ -219,12 +219,14 @@ typedef struct { unsigned char version; /* socks version number */ unsigned char command; /* command code */ - unsigned char destport[2]; /* destination port, network order */ - unsigned char destip[4]; /* destination address */ - /* userid follows, terminated by a NULL */ - /* dest host follows, terminated by a NULL */ + uint16_t destport; /* destination port, network order */ + uint32_t destip; /* destination address, host order */ + /* userid follows, terminated by a \0 */ + /* dest host follows, terminated by a \0 */ } socks4_t; +#define SOCKS4_NETWORK_LEN 8 + typedef uint16_t aci_t; /* cell definition */ |