diff options
Diffstat (limited to 'src/vpn/gnunet-daemon-exit.c')
-rw-r--r-- | src/vpn/gnunet-daemon-exit.c | 73 |
1 files changed, 27 insertions, 46 deletions
diff --git a/src/vpn/gnunet-daemon-exit.c b/src/vpn/gnunet-daemon-exit.c index e7d904120..2e8061024 100644 --- a/src/vpn/gnunet-daemon-exit.c +++ b/src/vpn/gnunet-daemon-exit.c | |||
@@ -170,8 +170,8 @@ struct tunnel_state | |||
170 | * Function that frees everything from a hashmap | 170 | * Function that frees everything from a hashmap |
171 | */ | 171 | */ |
172 | static int | 172 | static int |
173 | free_iterate (void *cls GNUNET_UNUSED, const GNUNET_HashCode * hash | 173 | free_iterate (void *cls GNUNET_UNUSED, |
174 | GNUNET_UNUSED, void *value) | 174 | const GNUNET_HashCode * hash GNUNET_UNUSED, void *value) |
175 | { | 175 | { |
176 | GNUNET_free (value); | 176 | GNUNET_free (value); |
177 | return GNUNET_YES; | 177 | return GNUNET_YES; |
@@ -181,8 +181,7 @@ free_iterate (void *cls GNUNET_UNUSED, const GNUNET_HashCode * hash | |||
181 | * Function scheduled as very last function, cleans up after us | 181 | * Function scheduled as very last function, cleans up after us |
182 | */ | 182 | */ |
183 | static void | 183 | static void |
184 | cleanup (void *cls | 184 | cleanup (void *cls GNUNET_UNUSED, |
185 | GNUNET_UNUSED, | ||
186 | const struct GNUNET_SCHEDULER_TaskContext *tskctx) | 185 | const struct GNUNET_SCHEDULER_TaskContext *tskctx) |
187 | { | 186 | { |
188 | GNUNET_assert (0 != (tskctx->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)); | 187 | GNUNET_assert (0 != (tskctx->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)); |
@@ -199,11 +198,9 @@ cleanup (void *cls | |||
199 | } | 198 | } |
200 | 199 | ||
201 | static void * | 200 | static void * |
202 | new_tunnel (void *cls | 201 | new_tunnel (void *cls GNUNET_UNUSED, struct GNUNET_MESH_Tunnel *tunnel, |
203 | GNUNET_UNUSED, struct GNUNET_MESH_Tunnel *tunnel, | 202 | const struct GNUNET_PeerIdentity *initiator GNUNET_UNUSED, |
204 | const struct GNUNET_PeerIdentity *initiator | 203 | const struct GNUNET_ATS_Information *ats GNUNET_UNUSED) |
205 | GNUNET_UNUSED, const struct GNUNET_ATS_Information *ats | ||
206 | GNUNET_UNUSED) | ||
207 | { | 204 | { |
208 | struct tunnel_state *s = GNUNET_malloc (sizeof *s); | 205 | struct tunnel_state *s = GNUNET_malloc (sizeof *s); |
209 | 206 | ||
@@ -214,8 +211,7 @@ new_tunnel (void *cls | |||
214 | } | 211 | } |
215 | 212 | ||
216 | static void | 213 | static void |
217 | clean_tunnel (void *cls | 214 | clean_tunnel (void *cls GNUNET_UNUSED, const struct GNUNET_MESH_Tunnel *tunnel, |
218 | GNUNET_UNUSED, const struct GNUNET_MESH_Tunnel *tunnel, | ||
219 | void *tunnel_ctx) | 215 | void *tunnel_ctx) |
220 | { | 216 | { |
221 | GNUNET_free (tunnel_ctx); | 217 | GNUNET_free (tunnel_ctx); |
@@ -531,8 +527,7 @@ tcp_from_helper (struct tcp_pkt *tcp, unsigned char *dadr, size_t addrlen, | |||
531 | * Receive packets from the helper-process | 527 | * Receive packets from the helper-process |
532 | */ | 528 | */ |
533 | static void | 529 | static void |
534 | message_token (void *cls GNUNET_UNUSED, void *client | 530 | message_token (void *cls GNUNET_UNUSED, void *client GNUNET_UNUSED, |
535 | GNUNET_UNUSED, | ||
536 | const struct GNUNET_MessageHeader *message) | 531 | const struct GNUNET_MessageHeader *message) |
537 | { | 532 | { |
538 | GNUNET_assert (ntohs (message->type) == GNUNET_MESSAGE_TYPE_VPN_HELPER); | 533 | GNUNET_assert (ntohs (message->type) == GNUNET_MESSAGE_TYPE_VPN_HELPER); |
@@ -1038,15 +1033,11 @@ prepare_ipv6_packet (size_t len, uint16_t pktlen, void *payload, | |||
1038 | * The messages are one GNUNET_HashCode for the service followed by a struct tcp_pkt | 1033 | * The messages are one GNUNET_HashCode for the service followed by a struct tcp_pkt |
1039 | */ | 1034 | */ |
1040 | static int | 1035 | static int |
1041 | receive_tcp_service (void *cls | 1036 | receive_tcp_service (void *cls GNUNET_UNUSED, struct GNUNET_MESH_Tunnel *tunnel, |
1042 | GNUNET_UNUSED, | 1037 | void **tunnel_ctx GNUNET_UNUSED, |
1043 | struct GNUNET_MESH_Tunnel *tunnel, void **tunnel_ctx | 1038 | const struct GNUNET_PeerIdentity *sender GNUNET_UNUSED, |
1044 | GNUNET_UNUSED, | ||
1045 | const struct GNUNET_PeerIdentity *sender | ||
1046 | GNUNET_UNUSED, | ||
1047 | const struct GNUNET_MessageHeader *message, | 1039 | const struct GNUNET_MessageHeader *message, |
1048 | const struct GNUNET_ATS_Information *atsi | 1040 | const struct GNUNET_ATS_Information *atsi GNUNET_UNUSED) |
1049 | GNUNET_UNUSED) | ||
1050 | { | 1041 | { |
1051 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received TCP-Packet\n"); | 1042 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received TCP-Packet\n"); |
1052 | GNUNET_HashCode *desc = (GNUNET_HashCode *) (message + 1); | 1043 | GNUNET_HashCode *desc = (GNUNET_HashCode *) (message + 1); |
@@ -1144,15 +1135,11 @@ receive_tcp_service (void *cls | |||
1144 | } | 1135 | } |
1145 | 1136 | ||
1146 | static int | 1137 | static int |
1147 | receive_tcp_remote (void *cls | 1138 | receive_tcp_remote (void *cls GNUNET_UNUSED, struct GNUNET_MESH_Tunnel *tunnel, |
1148 | GNUNET_UNUSED, struct GNUNET_MESH_Tunnel *tunnel, | 1139 | void **tunnel_ctx GNUNET_UNUSED, |
1149 | void **tunnel_ctx | 1140 | const struct GNUNET_PeerIdentity *sender GNUNET_UNUSED, |
1150 | GNUNET_UNUSED, | ||
1151 | const struct GNUNET_PeerIdentity *sender | ||
1152 | GNUNET_UNUSED, | ||
1153 | const struct GNUNET_MessageHeader *message, | 1141 | const struct GNUNET_MessageHeader *message, |
1154 | const struct GNUNET_ATS_Information *atsi | 1142 | const struct GNUNET_ATS_Information *atsi GNUNET_UNUSED) |
1155 | GNUNET_UNUSED) | ||
1156 | { | 1143 | { |
1157 | GNUNET_HashCode *desc = (GNUNET_HashCode *) (message + 1); | 1144 | GNUNET_HashCode *desc = (GNUNET_HashCode *) (message + 1); |
1158 | struct tcp_pkt *pkt = (struct tcp_pkt *) (desc + 1); | 1145 | struct tcp_pkt *pkt = (struct tcp_pkt *) (desc + 1); |
@@ -1220,15 +1207,11 @@ receive_tcp_remote (void *cls | |||
1220 | } | 1207 | } |
1221 | 1208 | ||
1222 | static int | 1209 | static int |
1223 | receive_udp_remote (void *cls | 1210 | receive_udp_remote (void *cls GNUNET_UNUSED, struct GNUNET_MESH_Tunnel *tunnel, |
1224 | GNUNET_UNUSED, struct GNUNET_MESH_Tunnel *tunnel, | 1211 | void **tunnel_ctx GNUNET_UNUSED, |
1225 | void **tunnel_ctx | 1212 | const struct GNUNET_PeerIdentity *sender GNUNET_UNUSED, |
1226 | GNUNET_UNUSED, | ||
1227 | const struct GNUNET_PeerIdentity *sender | ||
1228 | GNUNET_UNUSED, | ||
1229 | const struct GNUNET_MessageHeader *message, | 1213 | const struct GNUNET_MessageHeader *message, |
1230 | const struct GNUNET_ATS_Information *atsi | 1214 | const struct GNUNET_ATS_Information *atsi GNUNET_UNUSED) |
1231 | GNUNET_UNUSED) | ||
1232 | { | 1215 | { |
1233 | GNUNET_HashCode *desc = (GNUNET_HashCode *) (message + 1); | 1216 | GNUNET_HashCode *desc = (GNUNET_HashCode *) (message + 1); |
1234 | struct udp_pkt *pkt = (struct udp_pkt *) (desc + 1); | 1217 | struct udp_pkt *pkt = (struct udp_pkt *) (desc + 1); |
@@ -1300,14 +1283,11 @@ receive_udp_remote (void *cls | |||
1300 | * The messages are one GNUNET_HashCode for the service, followed by a struct udp_pkt | 1283 | * The messages are one GNUNET_HashCode for the service, followed by a struct udp_pkt |
1301 | */ | 1284 | */ |
1302 | static int | 1285 | static int |
1303 | receive_udp_service (void *cls | 1286 | receive_udp_service (void *cls GNUNET_UNUSED, struct GNUNET_MESH_Tunnel *tunnel, |
1304 | GNUNET_UNUSED, | 1287 | void **tunnel_ctx, |
1305 | struct GNUNET_MESH_Tunnel *tunnel, void **tunnel_ctx, | 1288 | const struct GNUNET_PeerIdentity *sender GNUNET_UNUSED, |
1306 | const struct GNUNET_PeerIdentity *sender | ||
1307 | GNUNET_UNUSED, | ||
1308 | const struct GNUNET_MessageHeader *message, | 1289 | const struct GNUNET_MessageHeader *message, |
1309 | const struct GNUNET_ATS_Information *atsi | 1290 | const struct GNUNET_ATS_Information *atsi GNUNET_UNUSED) |
1310 | GNUNET_UNUSED) | ||
1311 | { | 1291 | { |
1312 | GNUNET_HashCode *desc = (GNUNET_HashCode *) (message + 1); | 1292 | GNUNET_HashCode *desc = (GNUNET_HashCode *) (message + 1); |
1313 | struct udp_pkt *pkt = (struct udp_pkt *) (desc + 1); | 1293 | struct udp_pkt *pkt = (struct udp_pkt *) (desc + 1); |
@@ -1463,8 +1443,9 @@ connect_to_mesh () | |||
1463 | * @param cfg_ configuration | 1443 | * @param cfg_ configuration |
1464 | */ | 1444 | */ |
1465 | static void | 1445 | static void |
1466 | run (void *cls, char *const *args GNUNET_UNUSED, const char *cfgfile | 1446 | run (void *cls, char *const *args GNUNET_UNUSED, |
1467 | GNUNET_UNUSED, const struct GNUNET_CONFIGURATION_Handle *cfg_) | 1447 | const char *cfgfile GNUNET_UNUSED, |
1448 | const struct GNUNET_CONFIGURATION_Handle *cfg_) | ||
1468 | { | 1449 | { |
1469 | cfg = cfg_; | 1450 | cfg = cfg_; |
1470 | 1451 | ||