diff options
author | Roger Dingledine <arma@torproject.org> | 2003-12-16 09:48:17 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2003-12-16 09:48:17 +0000 |
commit | 8712a30e91fa61de03ed1525b174b3d0ae8cddac (patch) | |
tree | 98349cff3e7462fba74fcf173229e75ac800695b /src/or/connection_or.c | |
parent | 961ecf7abfc80571ab858099d1d4f6362b791ea0 (diff) | |
download | tor-8712a30e91fa61de03ed1525b174b3d0ae8cddac.tar.gz tor-8712a30e91fa61de03ed1525b174b3d0ae8cddac.zip |
move cell size to 512 bytes
move length to 2 bytes, put it in the relay header
remove 4 reserved bytes in cell
add 4 bytes to relay header for the integrity check
svn:r942
Diffstat (limited to 'src/or/connection_or.c')
-rw-r--r-- | src/or/connection_or.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/or/connection_or.c b/src/or/connection_or.c index 212453411b..e516913877 100644 --- a/src/or/connection_or.c +++ b/src/or/connection_or.c @@ -14,17 +14,13 @@ static int connection_or_process_cell_from_inbuf(connection_t *conn); static void cell_pack(char *dest, const cell_t *src) { *(uint16_t*)dest = htons(src->circ_id); *(uint8_t*)(dest+2) = src->command; - *(uint8_t*)(dest+3) = src->length; - *(uint32_t*)(dest+4) = 0; /* Reserved */ - memcpy(dest+8, src->payload, CELL_PAYLOAD_SIZE); + memcpy(dest+3, src->payload, CELL_PAYLOAD_SIZE); } static void cell_unpack(cell_t *dest, const char *src) { dest->circ_id = ntohs(*(uint16_t*)(src)); dest->command = *(uint8_t*)(src+2); - dest->length = *(uint8_t*)(src+3); - dest->seq = ntohl(*(uint32_t*)(src+4)); - memcpy(dest->payload, src+8, CELL_PAYLOAD_SIZE); + memcpy(dest->payload, src+3, CELL_PAYLOAD_SIZE); } /**************************************************************/ |