tor

The Tor anonymity network
git clone https://git.dasho.dev/tor.git
Log | Files | Refs | README | LICENSE

conflux.trunnel (1934B)


      1 /*
      2  * This file contains the definition for the Conflux related cells. See
      3  * proposal 329.
      4  */
      5 
      6 /* No Opinion means the endpoint can choose whatever it thinks is best. */
      7 const CONFLUX_UX_NO_OPINION = 0x00;
      8 /* Min latency always only uses the lowest RTT */
      9 const CONFLUX_UX_MIN_LATENCY = 0x01;
     10 /* Min latency always only uses the lowest RTT */
     11 const CONFLUX_UX_LOW_MEM_LATENCY = 0x02;
     12 /* Use a high-throughput algorithm that maximizes throughput
     13  * by using the full congestion window of all circuits, at the expense
     14  * of more reordering queue at the receiver */
     15 const CONFLUX_UX_HIGH_THROUGHPUT  = 0x03;
     16 /* THRPT_LO uses a high-throughput algorithm that tries to minimize
     17  * out-of-order queues at the receiver */
     18 const CONFLUX_UX_LOW_MEM_THROUGHPUT  = 0x04;
     19 
     20 /* The RELAY_CONFLUX_LINK definition. */
     21 struct trn_cell_conflux_link {
     22   /* Version field. */
     23   u8 version IN [0x01];
     24 
     25   /* Payload */
     26   u8 payload[];
     27 };
     28 
     29 /* The RELAY_CIRCUIT_LINKED definition. */
     30 struct trn_cell_conflux_linked {
     31   /* Version field. */
     32   u8 version IN [0x01];
     33 
     34   /* Payload of the cell. */
     35   u8 payload[];
     36 };
     37 
     38 /* The RELAY_CONFLUX_LINKED_ACK definition. */
     39 struct trn_cell_conflux_linked_ack {
     40   /* Payload. At the moment, empty. */
     41   u8 payload[];
     42 };
     43 
     44 /* The RELAY_CONFLUX_SWITCH definition. */
     45 struct trn_cell_conflux_switch {
     46   /* Relative sequence number. */
     47   u32 seqnum;
     48 };
     49 
     50 /* The payload version 1 of RELAY_CONFLUX_LINK and RELAY_CIRCUIT_LINKED cells.
     51  * */
     52 struct trn_cell_conflux_link_payload_v1 {
     53   /* Used to identify the other conflux to link with. */
     54   u8 nonce[32];
     55 
     56   /* Last sequence number sent and received. */
     57   u64 last_seqno_sent;
     58   u64 last_seqno_recv;
     59 
     60   /* Desired user experience behavior */
     61   u8 desired_ux IN [CONFLUX_UX_NO_OPINION,
     62                    CONFLUX_UX_MIN_LATENCY,
     63                    CONFLUX_UX_LOW_MEM_LATENCY,
     64                    CONFLUX_UX_LOW_MEM_THROUGHPUT,
     65                    CONFLUX_UX_HIGH_THROUGHPUT];
     66 };