From 2aeb9884df190077944584342157afd5d32d6c8a Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Tue, 3 Feb 2015 13:20:17 +0000 Subject: document API, do not pass unused 'session' argument --- src/transport/gnunet-service-transport.c | 2 -- .../gnunet-service-transport_neighbours.c | 35 ++++++++++++++++-- .../gnunet-service-transport_neighbours.h | 42 ++++++++++++++++------ 3 files changed, 64 insertions(+), 15 deletions(-) (limited to 'src/transport') diff --git a/src/transport/gnunet-service-transport.c b/src/transport/gnunet-service-transport.c index 936a82bb0..2f0a17360 100644 --- a/src/transport/gnunet-service-transport.c +++ b/src/transport/gnunet-service-transport.c @@ -428,7 +428,6 @@ GST_receive_callback (void *cls, ntohs (message->size), GNUNET_NO); GST_neighbours_notify_data_recv (address, - session, message); switch (type) { @@ -522,7 +521,6 @@ GST_receive_callback (void *cls, ntohs (message->size), GNUNET_NO); GST_neighbours_notify_payload_recv (address, - session, message); ret = process_payload (address, session, diff --git a/src/transport/gnunet-service-transport_neighbours.c b/src/transport/gnunet-service-transport_neighbours.c index 1ecf71517..ff3d51a4b 100644 --- a/src/transport/gnunet-service-transport_neighbours.c +++ b/src/transport/gnunet-service-transport_neighbours.c @@ -2916,9 +2916,16 @@ utilization_transmission (void *cls, } +/** + * Track information about data we received from the + * given address (used to notify ATS about our utilization + * of allocated resources). + * + * @param address the address we got data from + * @param message the message we received (really only the size is used) + */ void GST_neighbours_notify_data_recv (const struct GNUNET_HELLO_Address *address, - struct Session *session, const struct GNUNET_MessageHeader *message) { struct NeighbourMapEntry *n; @@ -2930,9 +2937,16 @@ GST_neighbours_notify_data_recv (const struct GNUNET_HELLO_Address *address, } +/** + * Track information about payload (useful data) we received from the + * given address (used to notify ATS about our utilization of + * allocated resources). + * + * @param address the address we got data from + * @param message the message we received (really only the size is used) + */ void GST_neighbours_notify_payload_recv (const struct GNUNET_HELLO_Address *address, - struct Session *session, const struct GNUNET_MessageHeader *message) { struct NeighbourMapEntry *n; @@ -2944,6 +2958,15 @@ GST_neighbours_notify_payload_recv (const struct GNUNET_HELLO_Address *address, } +/** + * Track information about data we transmitted using the given @a + * address and @a session (used to notify ATS about our utilization of + * allocated resources). + * + * @param address the address we transmitted data to + * @param session session we used to transmit data + * @param message the message we sent (really only the size is used) + */ void GST_neighbours_notify_data_sent (const struct GNUNET_HELLO_Address *address, struct Session *session, @@ -2960,6 +2983,14 @@ GST_neighbours_notify_data_sent (const struct GNUNET_HELLO_Address *address, } +/** + * Track information about payload (useful data) we transmitted using the + * given address (used to notify ATS about our utilization of + * allocated resources). + * + * @param address the address we transmitted data to + * @param message the message we sent (really only the size is used) + */ void GST_neighbours_notify_payload_sent (const struct GNUNET_PeerIdentity *peer, size_t size) diff --git a/src/transport/gnunet-service-transport_neighbours.h b/src/transport/gnunet-service-transport_neighbours.h index 710439b10..ee3a34a79 100644 --- a/src/transport/gnunet-service-transport_neighbours.h +++ b/src/transport/gnunet-service-transport_neighbours.h @@ -209,38 +209,58 @@ GST_neighbours_session_terminated (const struct GNUNET_PeerIdentity *peer, /** - * FIXME + * Track information about data we received from the + * given address (used to notify ATS about our utilization + * of allocated resources). + * + * @param address the address we got data from + * @param message the message we received (really only the size is used) */ void GST_neighbours_notify_data_recv (const struct GNUNET_HELLO_Address *address, - struct Session *session, const struct GNUNET_MessageHeader *message); /** - * FIXME + * Track information about payload (useful data) we received from the + * given address (used to notify ATS about our utilization of + * allocated resources). + * + * @param address the address we got data from + * @param message the message we received (really only the size is used) */ void GST_neighbours_notify_payload_recv (const struct GNUNET_HELLO_Address *address, - struct Session *session, const struct GNUNET_MessageHeader *message); /** - * FIXME + * Track information about data we transmitted using the given @a + * address and @a session (used to notify ATS about our utilization of + * allocated resources). + * + * @param address the address we transmitted data to + * @param session session we used to transmit data + * @param message the message we sent (really only the size is used) */ void -GST_neighbours_notify_payload_sent (const struct GNUNET_PeerIdentity *peer, - size_t size); +GST_neighbours_notify_data_sent (const struct GNUNET_HELLO_Address *address, + struct Session *session, + size_t size); /** - * FIXME + * Track information about payload (useful data) we transmitted using the + * given address (used to notify ATS about our utilization of + * allocated resources). + * + * @param address the address we transmitted data to + * @param message the message we sent (really only the size is used) */ void -GST_neighbours_notify_data_sent (const struct GNUNET_HELLO_Address *address, - struct Session *session, - size_t size); +GST_neighbours_notify_payload_sent (const struct GNUNET_PeerIdentity *peer, + size_t size); + /** -- cgit v1.2.3