From 8712a30e91fa61de03ed1525b174b3d0ae8cddac Mon Sep 17 00:00:00 2001 From: Roger Dingledine Date: Tue, 16 Dec 2003 09:48:17 +0000 Subject: 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 --- src/or/connection_or.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/or/connection_or.c') 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); } /**************************************************************/ -- cgit v1.2.3-54-g00ecf