diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-08-16 16:03:20 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-08-16 16:03:20 +0000 |
commit | 16a6919a9f98ee9fa1fee9dd262906c321004a19 (patch) | |
tree | e09d4fe5191dc329b3e1b667f2914f8313bcba59 /src/transport/gnunet-service-transport_neighbours.h | |
parent | 4d7904c62bb867c44e90b8e9f7cdbb4b283abc44 (diff) | |
download | gnunet-16a6919a9f98ee9fa1fee9dd262906c321004a19.tar.gz gnunet-16a6919a9f98ee9fa1fee9dd262906c321004a19.zip |
even nicer indentation, thanks to LRN's indent patch
Diffstat (limited to 'src/transport/gnunet-service-transport_neighbours.h')
-rw-r--r-- | src/transport/gnunet-service-transport_neighbours.h | 66 |
1 files changed, 34 insertions, 32 deletions
diff --git a/src/transport/gnunet-service-transport_neighbours.h b/src/transport/gnunet-service-transport_neighbours.h index c0cee01a6..db29d66aa 100644 --- a/src/transport/gnunet-service-transport_neighbours.h +++ b/src/transport/gnunet-service-transport_neighbours.h | |||
@@ -43,14 +43,16 @@ | |||
43 | * @param connect_cb function to call if we connect to a peer | 43 | * @param connect_cb function to call if we connect to a peer |
44 | * @param disconnect_cb function to call if we disconnect from a peer | 44 | * @param disconnect_cb function to call if we disconnect from a peer |
45 | */ | 45 | */ |
46 | void GST_neighbours_start (void *cls, GNUNET_TRANSPORT_NotifyConnect connect_cb, | 46 | void |
47 | GNUNET_TRANSPORT_NotifyDisconnect disconnect_cb); | 47 | GST_neighbours_start (void *cls, GNUNET_TRANSPORT_NotifyConnect connect_cb, |
48 | GNUNET_TRANSPORT_NotifyDisconnect disconnect_cb); | ||
48 | 49 | ||
49 | 50 | ||
50 | /** | 51 | /** |
51 | * Cleanup the neighbours subsystem. | 52 | * Cleanup the neighbours subsystem. |
52 | */ | 53 | */ |
53 | void GST_neighbours_stop (void); | 54 | void |
55 | GST_neighbours_stop (void); | ||
54 | 56 | ||
55 | 57 | ||
56 | /** | 58 | /** |
@@ -58,7 +60,8 @@ void GST_neighbours_stop (void); | |||
58 | * | 60 | * |
59 | * @param target peer to try to connect to | 61 | * @param target peer to try to connect to |
60 | */ | 62 | */ |
61 | void GST_neighbours_try_connect (const struct GNUNET_PeerIdentity *target); | 63 | void |
64 | GST_neighbours_try_connect (const struct GNUNET_PeerIdentity *target); | ||
62 | 65 | ||
63 | 66 | ||
64 | /** | 67 | /** |
@@ -67,7 +70,8 @@ void GST_neighbours_try_connect (const struct GNUNET_PeerIdentity *target); | |||
67 | * @param target peer to test | 70 | * @param target peer to test |
68 | * @return GNUNET_YES if we are connected, GNUNET_NO if not | 71 | * @return GNUNET_YES if we are connected, GNUNET_NO if not |
69 | */ | 72 | */ |
70 | int GST_neighbours_test_connected (const struct GNUNET_PeerIdentity *target); | 73 | int |
74 | GST_neighbours_test_connected (const struct GNUNET_PeerIdentity *target); | ||
71 | 75 | ||
72 | 76 | ||
73 | /** | 77 | /** |
@@ -89,10 +93,10 @@ typedef void (*GST_NeighbourSendContinuation) (void *cls, int success); | |||
89 | * @param cont function to call when done | 93 | * @param cont function to call when done |
90 | * @param cont_cls closure for 'cont' | 94 | * @param cont_cls closure for 'cont' |
91 | */ | 95 | */ |
92 | void GST_neighbours_send (const struct GNUNET_PeerIdentity *target, | 96 | void |
93 | const void *msg, size_t msg_size, | 97 | GST_neighbours_send (const struct GNUNET_PeerIdentity *target, const void *msg, |
94 | struct GNUNET_TIME_Relative timeout, | 98 | size_t msg_size, struct GNUNET_TIME_Relative timeout, |
95 | GST_NeighbourSendContinuation cont, void *cont_cls); | 99 | GST_NeighbourSendContinuation cont, void *cont_cls); |
96 | 100 | ||
97 | 101 | ||
98 | /** | 102 | /** |
@@ -106,13 +110,9 @@ void GST_neighbours_send (const struct GNUNET_PeerIdentity *target, | |||
106 | * GNUNET_NO if the neighbour is not connected or violates the quota | 110 | * GNUNET_NO if the neighbour is not connected or violates the quota |
107 | * @return how long to wait before reading more from this sender | 111 | * @return how long to wait before reading more from this sender |
108 | */ | 112 | */ |
109 | struct GNUNET_TIME_Relative GST_neighbours_calculate_receive_delay (const struct | 113 | struct GNUNET_TIME_Relative |
110 | GNUNET_PeerIdentity | 114 | GST_neighbours_calculate_receive_delay (const struct GNUNET_PeerIdentity |
111 | *sender, | 115 | *sender, ssize_t size, int *do_forward); |
112 | ssize_t | ||
113 | size, | ||
114 | int | ||
115 | *do_forward); | ||
116 | 116 | ||
117 | 117 | ||
118 | /** | 118 | /** |
@@ -121,7 +121,8 @@ struct GNUNET_TIME_Relative GST_neighbours_calculate_receive_delay (const struct | |||
121 | * | 121 | * |
122 | * @param neighbour neighbour to keep alive | 122 | * @param neighbour neighbour to keep alive |
123 | */ | 123 | */ |
124 | void GST_neighbours_keepalive (const struct GNUNET_PeerIdentity *neighbour); | 124 | void |
125 | GST_neighbours_keepalive (const struct GNUNET_PeerIdentity *neighbour); | ||
125 | 126 | ||
126 | 127 | ||
127 | /** | 128 | /** |
@@ -130,10 +131,9 @@ void GST_neighbours_keepalive (const struct GNUNET_PeerIdentity *neighbour); | |||
130 | * @param neighbour identity of peer to change qutoa for | 131 | * @param neighbour identity of peer to change qutoa for |
131 | * @param quota new quota | 132 | * @param quota new quota |
132 | */ | 133 | */ |
133 | void GST_neighbours_set_incoming_quota (const struct GNUNET_PeerIdentity | 134 | void |
134 | *neighbour, | 135 | GST_neighbours_set_incoming_quota (const struct GNUNET_PeerIdentity *neighbour, |
135 | struct GNUNET_BANDWIDTH_Value32NBO | 136 | struct GNUNET_BANDWIDTH_Value32NBO quota); |
136 | quota); | ||
137 | 137 | ||
138 | 138 | ||
139 | /** | 139 | /** |
@@ -141,7 +141,8 @@ void GST_neighbours_set_incoming_quota (const struct GNUNET_PeerIdentity | |||
141 | * | 141 | * |
142 | * @param target peer to disconnect from | 142 | * @param target peer to disconnect from |
143 | */ | 143 | */ |
144 | void GST_neighbours_force_disconnect (const struct GNUNET_PeerIdentity *target); | 144 | void |
145 | GST_neighbours_force_disconnect (const struct GNUNET_PeerIdentity *target); | ||
145 | 146 | ||
146 | 147 | ||
147 | /** | 148 | /** |
@@ -166,7 +167,8 @@ typedef void (*GST_NeighbourIterator) (void *cls, | |||
166 | * @param cb function to call | 167 | * @param cb function to call |
167 | * @param cb_cls closure for cb | 168 | * @param cb_cls closure for cb |
168 | */ | 169 | */ |
169 | void GST_neighbours_iterate (GST_NeighbourIterator cb, void *cb_cls); | 170 | void |
171 | GST_neighbours_iterate (GST_NeighbourIterator cb, void *cb_cls); | ||
170 | 172 | ||
171 | 173 | ||
172 | /** | 174 | /** |
@@ -175,8 +177,9 @@ void GST_neighbours_iterate (GST_NeighbourIterator cb, void *cb_cls); | |||
175 | * @param peer identity of the peer where the session died | 177 | * @param peer identity of the peer where the session died |
176 | * @param session session that is gone | 178 | * @param session session that is gone |
177 | */ | 179 | */ |
178 | void GST_neighbours_session_terminated (const struct GNUNET_PeerIdentity *peer, | 180 | void |
179 | struct Session *session); | 181 | GST_neighbours_session_terminated (const struct GNUNET_PeerIdentity *peer, |
182 | struct Session *session); | ||
180 | 183 | ||
181 | 184 | ||
182 | /** | 185 | /** |
@@ -192,13 +195,12 @@ void GST_neighbours_session_terminated (const struct GNUNET_PeerIdentity *peer, | |||
192 | * @param ats performance data | 195 | * @param ats performance data |
193 | * @param ats_count number of entries in ats (excluding 0-termination) | 196 | * @param ats_count number of entries in ats (excluding 0-termination) |
194 | */ | 197 | */ |
195 | void GST_neighbours_switch_to_address (const struct GNUNET_PeerIdentity *peer, | 198 | void |
196 | const char *plugin_name, | 199 | GST_neighbours_switch_to_address (const struct GNUNET_PeerIdentity *peer, |
197 | const void *address, size_t address_len, | 200 | const char *plugin_name, const void *address, |
198 | struct Session *session, | 201 | size_t address_len, struct Session *session, |
199 | const struct | 202 | const struct GNUNET_TRANSPORT_ATS_Information |
200 | GNUNET_TRANSPORT_ATS_Information *ats, | 203 | *ats, uint32_t ats_count); |
201 | uint32_t ats_count); | ||
202 | 204 | ||
203 | 205 | ||
204 | #endif | 206 | #endif |