Use [ -n "$x" ] in place of [ ! -z "$x" ] in chutney-git-bisect
[tor.git] / src / trunnel / circpad_negotiation.trunnel
blobabbc929cc554ad1251d4663b440bc96d1338459f
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;
14 /**
15  * This command tells the relay to alter its min and max netflow
16  * timeout range values, and send padding at that rate (resuming
17  * if stopped). */
18 struct circpad_negotiate {
19   u8 version IN [0];
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 */
24   u8 machine_type;
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];
32 /**
33  * This command tells the relay to alter its min and max netflow
34  * timeout range values, and send padding at that rate (resuming
35  * if stopped). */
36 struct circpad_negotiated {
37   u8 version IN [0];
38   u8 command IN [CIRCPAD_COMMAND_START, CIRCPAD_COMMAND_STOP];
39   u8 response IN [CIRCPAD_RESPONSE_OK, CIRCPAD_RESPONSE_ERR];
41   /** Machine type is left unbounded because we can specify
42    * new machines in the consensus */
43   u8 machine_type;