aboutsummaryrefslogtreecommitdiff
path: root/src/vpn/gnunet-daemon-vpn.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vpn/gnunet-daemon-vpn.c')
-rw-r--r--src/vpn/gnunet-daemon-vpn.c30
1 files changed, 12 insertions, 18 deletions
diff --git a/src/vpn/gnunet-daemon-vpn.c b/src/vpn/gnunet-daemon-vpn.c
index 376d3574e..6b65b709e 100644
--- a/src/vpn/gnunet-daemon-vpn.c
+++ b/src/vpn/gnunet-daemon-vpn.c
@@ -78,8 +78,7 @@ GNUNET_SCHEDULER_TaskIdentifier shs_task;
78 *{{{ 78 *{{{
79 */ 79 */
80static void 80static void
81cleanup (void *cls 81cleanup (void *cls GNUNET_UNUSED,
82 GNUNET_UNUSED,
83 const struct GNUNET_SCHEDULER_TaskContext *tskctx) 82 const struct GNUNET_SCHEDULER_TaskContext *tskctx)
84{ 83{
85 GNUNET_assert (0 != (tskctx->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)); 84 GNUNET_assert (0 != (tskctx->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN));
@@ -168,8 +167,7 @@ address4_mapping_exists (uint32_t addr)
168} 167}
169 168
170static void 169static void
171collect_mappings (void *cls 170collect_mappings (void *cls GNUNET_UNUSED,
172 GNUNET_UNUSED,
173 const struct GNUNET_SCHEDULER_TaskContext *tc) 171 const struct GNUNET_SCHEDULER_TaskContext *tc)
174{ 172{
175 if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) 173 if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0)
@@ -335,8 +333,7 @@ port_in_ports (uint64_t ports, uint16_t port)
335 333
336void 334void
337send_pkt_to_peer (void *cls, const struct GNUNET_PeerIdentity *peer, 335send_pkt_to_peer (void *cls, const struct GNUNET_PeerIdentity *peer,
338 const struct GNUNET_ATS_Information *atsi 336 const struct GNUNET_ATS_Information *atsi GNUNET_UNUSED)
339 GNUNET_UNUSED)
340{ 337{
341 /* peer == NULL means that all peers in this request are connected */ 338 /* peer == NULL means that all peers in this request are connected */
342 if (peer == NULL) 339 if (peer == NULL)
@@ -856,12 +853,10 @@ add_additional_port (struct map_entry *me, uint16_t port)
856} 853}
857 854
858static int 855static int
859receive_udp_back (void *cls 856receive_udp_back (void *cls GNUNET_UNUSED, struct GNUNET_MESH_Tunnel *tunnel,
860 GNUNET_UNUSED, struct GNUNET_MESH_Tunnel *tunnel,
861 void **tunnel_ctx, const struct GNUNET_PeerIdentity *sender, 857 void **tunnel_ctx, const struct GNUNET_PeerIdentity *sender,
862 const struct GNUNET_MessageHeader *message, 858 const struct GNUNET_MessageHeader *message,
863 const struct GNUNET_ATS_Information *atsi 859 const struct GNUNET_ATS_Information *atsi GNUNET_UNUSED)
864 GNUNET_UNUSED)
865{ 860{
866 GNUNET_HashCode *desc = (GNUNET_HashCode *) (message + 1); 861 GNUNET_HashCode *desc = (GNUNET_HashCode *) (message + 1);
867 struct remote_addr *s = (struct remote_addr *) desc; 862 struct remote_addr *s = (struct remote_addr *) desc;
@@ -1033,13 +1028,11 @@ receive_udp_back (void *cls
1033} 1028}
1034 1029
1035static int 1030static int
1036receive_tcp_back (void *cls 1031receive_tcp_back (void *cls GNUNET_UNUSED, struct GNUNET_MESH_Tunnel *tunnel,
1037 GNUNET_UNUSED, struct GNUNET_MESH_Tunnel *tunnel, 1032 void **tunnel_ctx,
1038 void **tunnel_ctx, const struct GNUNET_PeerIdentity *sender 1033 const struct GNUNET_PeerIdentity *sender GNUNET_UNUSED,
1039 GNUNET_UNUSED,
1040 const struct GNUNET_MessageHeader *message, 1034 const struct GNUNET_MessageHeader *message,
1041 const struct GNUNET_ATS_Information *atsi 1035 const struct GNUNET_ATS_Information *atsi GNUNET_UNUSED)
1042 GNUNET_UNUSED)
1043{ 1036{
1044 GNUNET_HashCode *desc = (GNUNET_HashCode *) (message + 1); 1037 GNUNET_HashCode *desc = (GNUNET_HashCode *) (message + 1);
1045 struct remote_addr *s = (struct remote_addr *) desc; 1038 struct remote_addr *s = (struct remote_addr *) desc;
@@ -1245,8 +1238,9 @@ cleaner (void *cls, const struct GNUNET_MESH_Tunnel *tunnel, void *tunnel_ctx)
1245 * @param cfg_ configuration 1238 * @param cfg_ configuration
1246 */ 1239 */
1247static void 1240static void
1248run (void *cls, char *const *args GNUNET_UNUSED, const char *cfgfile 1241run (void *cls, char *const *args GNUNET_UNUSED,
1249 GNUNET_UNUSED, const struct GNUNET_CONFIGURATION_Handle *cfg_) 1242 const char *cfgfile GNUNET_UNUSED,
1243 const struct GNUNET_CONFIGURATION_Handle *cfg_)
1250{ 1244{
1251 static const struct GNUNET_MESH_MessageHandler handlers[] = { 1245 static const struct GNUNET_MESH_MessageHandler handlers[] = {
1252 {receive_udp_back, GNUNET_MESSAGE_TYPE_VPN_SERVICE_UDP_BACK, 0}, 1246 {receive_udp_back, GNUNET_MESSAGE_TYPE_VPN_SERVICE_UDP_BACK, 0},