specification - Onion Routing
specification - Onion Routing
specification - Onion Routing
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
1. Introduction<br />
This document specifies the requirements for each of the sub-systems of the onion routing network, version number<br />
2.0, and for the common data objects shared by those sub-systems.<br />
2. Common Data Objects<br />
This section describes the common data objects, their content, and requirements for operations related to their use.<br />
2.1 Cells<br />
A cell is a data structure consisting of a cell header section and a payload section. The cell is the minimum message<br />
unit transmitted on an anonymous circuit or a virtual pipe. Cells carry both user application data and network control<br />
and maintenance data.<br />
2.1.1 Cell Structure<br />
Cells consist of a header section and a payload section. Cell header structures are common to all cells. However,<br />
cell payload structures are different for each type of cell. The following diagram outlines the cell structure.<br />
3 2 1<br />
1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0<br />
Command<br />
Anonymous Circuit Identifier<br />
Payload (132 bytes)<br />
ÿ<br />
ÿ<br />
ÿ<br />
Figure 2.1.1 - Cell Structure<br />
All of the fields in all of the various cell types, except an ONION_INFO cell, are formatted in network byte order.<br />
Therefore, conversion routines such as htonl(3N), htons(3N), ntohl(3N), and ntohs(3N) must be used when<br />
formatting or retrieving data from cell fields respectively. The ONION_INFO cell is different because the data<br />
fields in the payload of an ONION_INFO cell are specified in host byte order. The fields of the cell will be<br />
explained in more detail in subsequent sections.<br />
2.1.1.1 Cell Header Field Structure<br />
The header consists of two fields, the command field and the anonymous circuit identifier.<br />
The command field is one byte and identifies the cell type. The command field can be set to one of the following<br />
symbolic values:<br />
a) CREATE<br />
b) DATA<br />
c) DESTROY<br />
d) PADDING<br />
e) ONION_INFO<br />
f) DB_UPDATE<br />
g) DB_QUERY<br />
5