diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2014-01-16 12:29:57 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2014-01-16 12:29:57 +0000 |
commit | 8a5993b15da336afade45be6ee4619a39561956a (patch) | |
tree | 362f51ad0697f94ded8990cafd82ae7793d6c1be /src/include/gnunet_transport_service.h | |
parent | b0c00af6d9eee5788c0220da6e427e8bacf81637 (diff) | |
download | gnunet-8a5993b15da336afade45be6ee4619a39561956a.tar.gz gnunet-8a5993b15da336afade45be6ee4619a39561956a.zip |
documentation for transport service
Diffstat (limited to 'src/include/gnunet_transport_service.h')
-rw-r--r-- | src/include/gnunet_transport_service.h | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/src/include/gnunet_transport_service.h b/src/include/gnunet_transport_service.h index 5eab5c929..a2f1e07b7 100644 --- a/src/include/gnunet_transport_service.h +++ b/src/include/gnunet_transport_service.h | |||
@@ -45,53 +45,53 @@ extern "C" | |||
45 | 45 | ||
46 | 46 | ||
47 | /** | 47 | /** |
48 | * Possible state of a neighbour. Initially, we are #S_NOT_CONNECTED. | 48 | * Possible state of a neighbour. Initially, we are #GNUNET_TRANSPORT_PS_NOT_CONNECTED. |
49 | * | 49 | * |
50 | * Then, there are two main paths. If we receive a CONNECT message, we | 50 | * Then, there are two main paths. If we receive a CONNECT message, we |
51 | * first run a check against the blacklist (#S_CONNECT_RECV_BLACKLIST_INBOUND). | 51 | * first run a check against the blacklist (#GNUNET_TRANSPORT_PS_CONNECT_RECV_BLACKLIST_INBOUND). |
52 | * If this check is successful, we give the inbound address to ATS. | 52 | * If this check is successful, we give the inbound address to ATS. |
53 | * After the check we ask ATS for a suggestion (S_CONNECT_RECV_ATS). | 53 | * After the check we ask ATS for a suggestion (#GNUNET_TRANSPORT_PS_CONNECT_RECV_ATS). |
54 | * If ATS makes a suggestion, we ALSO give that suggestion to the blacklist | 54 | * If ATS makes a suggestion, we ALSO give that suggestion to the blacklist |
55 | * (#S_CONNECT_RECV_BLACKLIST). Once the blacklist approves the | 55 | * (#GNUNET_TRANSPORT_PS_CONNECT_RECV_BLACKLIST). Once the blacklist approves the |
56 | * address we got from ATS, we send our CONNECT_ACK and go to | 56 | * address we got from ATS, we send our CONNECT_ACK and go to |
57 | * #S_CONNECT_RECV_ACK. If we receive a SESSION_ACK, we go to | 57 | * #GNUNET_TRANSPORT_PS_CONNECT_RECV_ACK. If we receive a SESSION_ACK, we go to |
58 | * #S_CONNECTED (and notify everyone about the new connection). If the | 58 | * #GNUNET_TRANSPORT_PS_CONNECTED (and notify everyone about the new connection). |
59 | * operation times out, we go to #S_DISCONNECT. | 59 | * If the operation times out, we go to #GNUNET_TRANSPORT_PS_DISCONNECT. |
60 | * | 60 | * |
61 | * The other case is where we transmit a CONNECT message first. We | 61 | * The other case is where we transmit a CONNECT message first. We |
62 | * start with #S_INIT_ATS. If we get an address, we enter | 62 | * start with #GNUNET_TRANSPORT_PS_INIT_ATS. If we get an address, we enter |
63 | * #S_INIT_BLACKLIST and check the blacklist. If the blacklist is OK | 63 | * #GNUNET_TRANSPORT_PS_INIT_BLACKLIST and check the blacklist. If the blacklist is OK |
64 | * with the connection, we actually send the CONNECT message and go to | 64 | * with the connection, we actually send the CONNECT message and go to |
65 | * state S_CONNECT_SENT. Once we receive a CONNECT_ACK, we go to | 65 | * state #GNUNET_TRANSPORT_PS_CONNECT_SENT. Once we receive a CONNECT_ACK, we go to |
66 | * #S_CONNECTED (and notify everyone about the new connection and send | 66 | * #GNUNET_TRANSPORT_PS_CONNECTED (and notify everyone about the new connection and send |
67 | * back a SESSION_ACK). If the operation times out, we go to | 67 | * back a SESSION_ACK). If the operation times out, we go to |
68 | * #S_DISCONNECT. | 68 | * #GNUNET_TRANSPORT_PS_DISCONNECT. |
69 | * | 69 | * |
70 | * If the session is in trouble (i.e. transport-level disconnect or | 70 | * If the session is in trouble (i.e. transport-level disconnect or |
71 | * timeout), we go to #S_RECONNECT_ATS where we ask ATS for a new | 71 | * timeout), we go to #GNUNET_TRANSPORT_PS_RECONNECT_ATS where we ask ATS for a new |
72 | * address (we don't notify anyone about the disconnect yet). Once we | 72 | * address (we don't notify anyone about the disconnect yet). Once we |
73 | * have a new address, we go to #S_RECONNECT_BLACKLIST to check the new | 73 | * have a new address, we go to #GNUNET_TRANSPORT_PS_RECONNECT_BLACKLIST to check the new |
74 | * address against the blacklist. If the blacklist approves, we enter | 74 | * address against the blacklist. If the blacklist approves, we enter |
75 | * #S_RECONNECT_SENT and send a CONNECT message. If we receive a | 75 | * #GNUNET_TRANSPORT_PS_RECONNECT_SENT and send a CONNECT message. If we receive a |
76 | * CONNECT_ACK, we go to #S_CONNECTED and nobody noticed that we had | 76 | * CONNECT_ACK, we go to #GNUNET_TRANSPORT_PS_CONNECTED and nobody noticed that we had |
77 | * trouble; we also send a SESSION_ACK at this time just in case. If | 77 | * trouble; we also send a SESSION_ACK at this time just in case. If |
78 | * the operation times out, we go to S_DISCONNECT (and notify everyone | 78 | * the operation times out, we go to #GNUNET_TRANSPORT_PS_DISCONNECT (and notify everyone |
79 | * about the lost connection). | 79 | * about the lost connection). |
80 | * | 80 | * |
81 | * If ATS decides to switch addresses while we have a normal | 81 | * If ATS decides to switch addresses while we have a normal |
82 | * connection, we go to #S_CONNECTED_SWITCHING_BLACKLIST to check the | 82 | * connection, we go to #GNUNET_TRANSPORT_PS_CONNECTED_SWITCHING_BLACKLIST to check the |
83 | * new address against the blacklist. If the blacklist approves, we | 83 | * new address against the blacklist. If the blacklist approves, we |
84 | * go to #S_CONNECTED_SWITCHING_CONNECT_SENT and send a | 84 | * go to #GNUNET_TRANSPORT_PS_CONNECTED_SWITCHING_CONNECT_SENT and send a |
85 | * SESSION_CONNECT. If we get a SESSION_ACK back, we switch the | 85 | * SESSION_CONNECT. If we get a SESSION_ACK back, we switch the |
86 | * primary connection to the suggested alternative from ATS, go back | 86 | * primary connection to the suggested alternative from ATS, go back |
87 | * to #S_CONNECTED and send a SESSION_ACK to the other peer just to be | 87 | * to #GNUNET_TRANSPORT_PS_CONNECTED and send a SESSION_ACK to the other peer just to be |
88 | * sure. If the operation times out (or the blacklist disapproves), | 88 | * sure. If the operation times out (or the blacklist disapproves), |
89 | * we go to #S_CONNECTED (and notify ATS that the given alternative | 89 | * we go to #GNUNET_TRANSPORT_PS_CONNECTED (and notify ATS that the given alternative |
90 | * address is "invalid"). | 90 | * address is "invalid"). |
91 | * | 91 | * |
92 | * Once a session is in #S_DISCONNECT, it is cleaned up and then goes | 92 | * Once a session is in #GNUNET_TRANSPORT_PS_DISCONNECT, it is cleaned up and then goes |
93 | * to (#S_DISCONNECT_FINISHED). If we receive an explicit disconnect | 93 | * to (#GNUNET_TRANSPORT_PS_DISCONNECT_FINISHED). If we receive an explicit disconnect |
94 | * request, we can go from any state to #S_DISCONNECT, possibly after | 94 | * request, we can go from any state to #GNUNET_TRANSPORT_PS_DISCONNECT, possibly after |
95 | * generating disconnect notifications. | 95 | * generating disconnect notifications. |
96 | * | 96 | * |
97 | * Note that it is quite possible that while we are in any of these | 97 | * Note that it is quite possible that while we are in any of these |
@@ -101,7 +101,7 @@ extern "C" | |||
101 | * set to 1. If our state machine allows us to send a 'CONNECT_ACK' | 101 | * set to 1. If our state machine allows us to send a 'CONNECT_ACK' |
102 | * (because we have an acceptable address), we send the 'CONNECT_ACK' | 102 | * (because we have an acceptable address), we send the 'CONNECT_ACK' |
103 | * and set the 'send_connect_ack' to 2. If we then receive a | 103 | * and set the 'send_connect_ack' to 2. If we then receive a |
104 | * 'SESSION_ACK', we go to #S_CONNECTED (and reset 'send_connect_ack' | 104 | * 'SESSION_ACK', we go to #GNUNET_TRANSPORT_PS_CONNECTED (and reset 'send_connect_ack' |
105 | * to 0). | 105 | * to 0). |
106 | * | 106 | * |
107 | */ | 107 | */ |