1 /* These are the padding negotiation commands */
2 const CIRCPAD_COMMAND_STOP = 1;
3 const CIRCPAD_COMMAND_START = 2;
5 /* Responses to commands */
6 const CIRCPAD_RESPONSE_OK = 1;
7 const CIRCPAD_RESPONSE_ERR = 2;
9 /* Built-in machine types */
11 /* 1) Machine that obscures circuit setup */
12 const CIRCPAD_MACHINE_CIRC_SETUP = 1;
15 * This command tells the relay to alter its min and max netflow
16 * timeout range values, and send padding at that rate (resuming
18 struct circpad_negotiate {
20 u8 command IN [CIRCPAD_COMMAND_START, CIRCPAD_COMMAND_STOP];
22 /** Machine type is left unbounded because we can specify
23 * new machines in the consensus */
26 /** If true, send a relay_drop reply.. */
27 // FIXME-MP-AP: Maybe we just say to transition to the first state
28 // here instead.. Also what about delay before responding?
29 u8 echo_request IN [0,1];
31 // This field is used for shutdown synchronization. It is OK if
32 // it wraps, because all we need to do is make sure the STOP
33 // command is actually for the currently active machine.
34 // For backward-compatibility, though, 0 has special meaning
35 // (it means match any machine).
40 * This command tells the relay to alter its min and max netflow
41 * timeout range values, and send padding at that rate (resuming
43 struct circpad_negotiated {
45 u8 command IN [CIRCPAD_COMMAND_START, CIRCPAD_COMMAND_STOP];
46 u8 response IN [CIRCPAD_RESPONSE_OK, CIRCPAD_RESPONSE_ERR];
48 /** Machine type is left unbounded because we can specify
49 * new machines in the consensus */
53 * This field is used for shutdown synchronization. It is OK if
54 * it wraps, because all we need to do is make sure the STOP
55 * command is actually for the currently active machine.
56 * For backward-compatibility, though, 0 has special meaning
57 * (it means match any machine).