aboutsummaryrefslogtreecommitdiff
path: root/src/mesh/gnunet-service-mesh.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesh/gnunet-service-mesh.c')
-rw-r--r--src/mesh/gnunet-service-mesh.c38
1 files changed, 27 insertions, 11 deletions
diff --git a/src/mesh/gnunet-service-mesh.c b/src/mesh/gnunet-service-mesh.c
index 94196be84..19650dcb6 100644
--- a/src/mesh/gnunet-service-mesh.c
+++ b/src/mesh/gnunet-service-mesh.c
@@ -2265,6 +2265,7 @@ send_core_path_ack (void *cls, size_t size, void *buf)
2265 * @param message message 2265 * @param message message
2266 * @param peer peer identity this notification is about 2266 * @param peer peer identity this notification is about
2267 * @param atsi performance data 2267 * @param atsi performance data
2268 * @param atsi_count number of records in 'atsi'
2268 * 2269 *
2269 * @return GNUNET_OK to keep the connection open, 2270 * @return GNUNET_OK to keep the connection open,
2270 * GNUNET_SYSERR to close it (signal serious error) 2271 * GNUNET_SYSERR to close it (signal serious error)
@@ -2272,7 +2273,8 @@ send_core_path_ack (void *cls, size_t size, void *buf)
2272static int 2273static int
2273handle_mesh_path_create (void *cls, const struct GNUNET_PeerIdentity *peer, 2274handle_mesh_path_create (void *cls, const struct GNUNET_PeerIdentity *peer,
2274 const struct GNUNET_MessageHeader *message, 2275 const struct GNUNET_MessageHeader *message,
2275 const struct GNUNET_ATS_Information *atsi) 2276 const struct GNUNET_ATS_Information *atsi,
2277 unsigned int atsi_count)
2276{ 2278{
2277 unsigned int own_pos; 2279 unsigned int own_pos;
2278 uint16_t size; 2280 uint16_t size;
@@ -2462,6 +2464,7 @@ handle_mesh_path_create (void *cls, const struct GNUNET_PeerIdentity *peer,
2462 * @param message message 2464 * @param message message
2463 * @param peer peer identity this notification is about 2465 * @param peer peer identity this notification is about
2464 * @param atsi performance data 2466 * @param atsi performance data
2467 * @param atsi_count number of records in 'atsi'
2465 * 2468 *
2466 * @return GNUNET_OK to keep the connection open, 2469 * @return GNUNET_OK to keep the connection open,
2467 * GNUNET_SYSERR to close it (signal serious error) 2470 * GNUNET_SYSERR to close it (signal serious error)
@@ -2469,7 +2472,8 @@ handle_mesh_path_create (void *cls, const struct GNUNET_PeerIdentity *peer,
2469static int 2472static int
2470handle_mesh_path_destroy (void *cls, const struct GNUNET_PeerIdentity *peer, 2473handle_mesh_path_destroy (void *cls, const struct GNUNET_PeerIdentity *peer,
2471 const struct GNUNET_MessageHeader *message, 2474 const struct GNUNET_MessageHeader *message,
2472 const struct GNUNET_ATS_Information *atsi) 2475 const struct GNUNET_ATS_Information *atsi,
2476 unsigned int atsi_count)
2473{ 2477{
2474 struct GNUNET_MESH_ManipulatePath *msg; 2478 struct GNUNET_MESH_ManipulatePath *msg;
2475 struct GNUNET_PeerIdentity *pi; 2479 struct GNUNET_PeerIdentity *pi;
@@ -2546,6 +2550,7 @@ handle_mesh_path_destroy (void *cls, const struct GNUNET_PeerIdentity *peer,
2546 * @param message message 2550 * @param message message
2547 * @param peer peer identity this notification is about 2551 * @param peer peer identity this notification is about
2548 * @param atsi performance data 2552 * @param atsi performance data
2553 * @param atsi_count number of records in 'atsi'
2549 * 2554 *
2550 * @return GNUNET_OK to keep the connection open, 2555 * @return GNUNET_OK to keep the connection open,
2551 * GNUNET_SYSERR to close it (signal serious error) 2556 * GNUNET_SYSERR to close it (signal serious error)
@@ -2553,7 +2558,8 @@ handle_mesh_path_destroy (void *cls, const struct GNUNET_PeerIdentity *peer,
2553static int 2558static int
2554handle_mesh_tunnel_destroy (void *cls, const struct GNUNET_PeerIdentity *peer, 2559handle_mesh_tunnel_destroy (void *cls, const struct GNUNET_PeerIdentity *peer,
2555 const struct GNUNET_MessageHeader *message, 2560 const struct GNUNET_MessageHeader *message,
2556 const struct GNUNET_ATS_Information *atsi) 2561 const struct GNUNET_ATS_Information *atsi,
2562 unsigned int atsi_count)
2557{ 2563{
2558 struct GNUNET_MESH_TunnelDestroy *msg; 2564 struct GNUNET_MESH_TunnelDestroy *msg;
2559 struct MeshTunnel *t; 2565 struct MeshTunnel *t;
@@ -2596,13 +2602,15 @@ handle_mesh_tunnel_destroy (void *cls, const struct GNUNET_PeerIdentity *peer,
2596 * @param peer peer identity this notification is about 2602 * @param peer peer identity this notification is about
2597 * @param message message 2603 * @param message message
2598 * @param atsi performance data 2604 * @param atsi performance data
2605 * @param atsi_count number of records in 'atsi'
2599 * @return GNUNET_OK to keep the connection open, 2606 * @return GNUNET_OK to keep the connection open,
2600 * GNUNET_SYSERR to close it (signal serious error) 2607 * GNUNET_SYSERR to close it (signal serious error)
2601 */ 2608 */
2602static int 2609static int
2603handle_mesh_data_unicast (void *cls, const struct GNUNET_PeerIdentity *peer, 2610handle_mesh_data_unicast (void *cls, const struct GNUNET_PeerIdentity *peer,
2604 const struct GNUNET_MessageHeader *message, 2611 const struct GNUNET_MessageHeader *message,
2605 const struct GNUNET_ATS_Information *atsi) 2612 const struct GNUNET_ATS_Information *atsi,
2613 unsigned int atsi_count)
2606{ 2614{
2607 struct GNUNET_MESH_Unicast *msg; 2615 struct GNUNET_MESH_Unicast *msg;
2608 struct MeshTunnel *t; 2616 struct MeshTunnel *t;
@@ -2654,6 +2662,7 @@ handle_mesh_data_unicast (void *cls, const struct GNUNET_PeerIdentity *peer,
2654 * @param message message 2662 * @param message message
2655 * @param peer peer identity this notification is about 2663 * @param peer peer identity this notification is about
2656 * @param atsi performance data 2664 * @param atsi performance data
2665 * @param atsi_count number of records in 'atsi'
2657 * @return GNUNET_OK to keep the connection open, 2666 * @return GNUNET_OK to keep the connection open,
2658 * GNUNET_SYSERR to close it (signal serious error) 2667 * GNUNET_SYSERR to close it (signal serious error)
2659 * 2668 *
@@ -2662,7 +2671,8 @@ handle_mesh_data_unicast (void *cls, const struct GNUNET_PeerIdentity *peer,
2662static int 2671static int
2663handle_mesh_data_multicast (void *cls, const struct GNUNET_PeerIdentity *peer, 2672handle_mesh_data_multicast (void *cls, const struct GNUNET_PeerIdentity *peer,
2664 const struct GNUNET_MessageHeader *message, 2673 const struct GNUNET_MessageHeader *message,
2665 const struct GNUNET_ATS_Information *atsi) 2674 const struct GNUNET_ATS_Information *atsi,
2675 unsigned int atsi_count)
2666{ 2676{
2667 struct GNUNET_MESH_Multicast *msg; 2677 struct GNUNET_MESH_Multicast *msg;
2668 struct MeshTunnel *t; 2678 struct MeshTunnel *t;
@@ -2707,6 +2717,7 @@ handle_mesh_data_multicast (void *cls, const struct GNUNET_PeerIdentity *peer,
2707 * @param message message 2717 * @param message message
2708 * @param peer peer identity this notification is about 2718 * @param peer peer identity this notification is about
2709 * @param atsi performance data 2719 * @param atsi performance data
2720 * @param atsi_count number of records in 'atsi'
2710 * 2721 *
2711 * @return GNUNET_OK to keep the connection open, 2722 * @return GNUNET_OK to keep the connection open,
2712 * GNUNET_SYSERR to close it (signal serious error) 2723 * GNUNET_SYSERR to close it (signal serious error)
@@ -2714,7 +2725,8 @@ handle_mesh_data_multicast (void *cls, const struct GNUNET_PeerIdentity *peer,
2714static int 2725static int
2715handle_mesh_data_to_orig (void *cls, const struct GNUNET_PeerIdentity *peer, 2726handle_mesh_data_to_orig (void *cls, const struct GNUNET_PeerIdentity *peer,
2716 const struct GNUNET_MessageHeader *message, 2727 const struct GNUNET_MessageHeader *message,
2717 const struct GNUNET_ATS_Information *atsi) 2728 const struct GNUNET_ATS_Information *atsi,
2729 unsigned int atsi_count)
2718{ 2730{
2719 struct GNUNET_MESH_ToOrigin *msg; 2731 struct GNUNET_MESH_ToOrigin *msg;
2720 struct GNUNET_PeerIdentity id; 2732 struct GNUNET_PeerIdentity id;
@@ -2794,6 +2806,7 @@ handle_mesh_data_to_orig (void *cls, const struct GNUNET_PeerIdentity *peer,
2794 * @param message message 2806 * @param message message
2795 * @param peer peer identity this notification is about 2807 * @param peer peer identity this notification is about
2796 * @param atsi performance data 2808 * @param atsi performance data
2809 * @param atsi_count number of records in 'atsi'
2797 * 2810 *
2798 * @return GNUNET_OK to keep the connection open, 2811 * @return GNUNET_OK to keep the connection open,
2799 * GNUNET_SYSERR to close it (signal serious error) 2812 * GNUNET_SYSERR to close it (signal serious error)
@@ -2801,7 +2814,8 @@ handle_mesh_data_to_orig (void *cls, const struct GNUNET_PeerIdentity *peer,
2801static int 2814static int
2802handle_mesh_path_ack (void *cls, const struct GNUNET_PeerIdentity *peer, 2815handle_mesh_path_ack (void *cls, const struct GNUNET_PeerIdentity *peer,
2803 const struct GNUNET_MessageHeader *message, 2816 const struct GNUNET_MessageHeader *message,
2804 const struct GNUNET_ATS_Information *atsi) 2817 const struct GNUNET_ATS_Information *atsi,
2818 unsigned int atsi_count)
2805{ 2819{
2806 struct GNUNET_MESH_PathACK *msg; 2820 struct GNUNET_MESH_PathACK *msg;
2807 struct GNUNET_PeerIdentity id; 2821 struct GNUNET_PeerIdentity id;
@@ -3739,7 +3753,7 @@ handle_local_unicast (void *cls, struct GNUNET_SERVER_Client *client,
3739 copy->tid = htonl (t->id.tid); 3753 copy->tid = htonl (t->id.tid);
3740 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 3754 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
3741 "MESH: calling generic handler...\n"); 3755 "MESH: calling generic handler...\n");
3742 handle_mesh_data_unicast (NULL, &my_full_id, &copy->header, NULL); 3756 handle_mesh_data_unicast (NULL, &my_full_id, &copy->header, NULL, 0);
3743 } 3757 }
3744 GNUNET_SERVER_receive_done (client, GNUNET_OK); 3758 GNUNET_SERVER_receive_done (client, GNUNET_OK);
3745 return; 3759 return;
@@ -3825,7 +3839,7 @@ handle_local_to_origin (void *cls, struct GNUNET_SERVER_Client *client,
3825 copy->sender = my_full_id; 3839 copy->sender = my_full_id;
3826 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 3840 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
3827 "MESH: calling generic handler...\n"); 3841 "MESH: calling generic handler...\n");
3828 handle_mesh_data_to_orig (NULL, &my_full_id, &copy->header, NULL); 3842 handle_mesh_data_to_orig (NULL, &my_full_id, &copy->header, NULL, 0);
3829 } 3843 }
3830 GNUNET_SERVER_receive_done (client, GNUNET_OK); 3844 GNUNET_SERVER_receive_done (client, GNUNET_OK);
3831 return; 3845 return;
@@ -3896,7 +3910,7 @@ handle_local_multicast (void *cls, struct GNUNET_SERVER_Client *client,
3896 copy->tid = htonl(t->id.tid); 3910 copy->tid = htonl(t->id.tid);
3897 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 3911 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
3898 "MESH: calling generic handler...\n"); 3912 "MESH: calling generic handler...\n");
3899 handle_mesh_data_multicast(client, &my_full_id, &copy->header, NULL); 3913 handle_mesh_data_multicast(client, &my_full_id, &copy->header, NULL, 0);
3900 } 3914 }
3901 3915
3902 /* receive done gets called when last copy is sent to a neighbor */ 3916 /* receive done gets called when last copy is sent to a neighbor */
@@ -3961,10 +3975,12 @@ core_init (void *cls, struct GNUNET_CORE_Handle *server,
3961 * @param cls closure 3975 * @param cls closure
3962 * @param peer peer identity this notification is about 3976 * @param peer peer identity this notification is about
3963 * @param atsi performance data for the connection 3977 * @param atsi performance data for the connection
3978 * @param atsi_count number of records in 'atsi'
3964 */ 3979 */
3965static void 3980static void
3966core_connect (void *cls, const struct GNUNET_PeerIdentity *peer, 3981core_connect (void *cls, const struct GNUNET_PeerIdentity *peer,
3967 const struct GNUNET_ATS_Information *atsi) 3982 const struct GNUNET_ATS_Information *atsi,
3983 unsigned int atsi_count)
3968{ 3984{
3969 struct MeshPeerInfo *peer_info; 3985 struct MeshPeerInfo *peer_info;
3970 struct MeshPeerPath *path; 3986 struct MeshPeerPath *path;