aboutsummaryrefslogtreecommitdiff
path: root/src/transport/gnunet-service-transport.c
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2014-01-16 12:29:57 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2014-01-16 12:29:57 +0000
commit8a5993b15da336afade45be6ee4619a39561956a (patch)
tree362f51ad0697f94ded8990cafd82ae7793d6c1be /src/transport/gnunet-service-transport.c
parentb0c00af6d9eee5788c0220da6e427e8bacf81637 (diff)
downloadgnunet-8a5993b15da336afade45be6ee4619a39561956a.tar.gz
gnunet-8a5993b15da336afade45be6ee4619a39561956a.zip
documentation for transport service
Diffstat (limited to 'src/transport/gnunet-service-transport.c')
-rw-r--r--src/transport/gnunet-service-transport.c35
1 files changed, 15 insertions, 20 deletions
diff --git a/src/transport/gnunet-service-transport.c b/src/transport/gnunet-service-transport.c
index 66f177145..76a398dc9 100644
--- a/src/transport/gnunet-service-transport.c
+++ b/src/transport/gnunet-service-transport.c
@@ -267,18 +267,12 @@ kill_session (const char *plugin_name, struct Session *session)
267 * Function called by the transport for each received message. 267 * Function called by the transport for each received message.
268 * 268 *
269 * @param cls closure, const char* with the name of the plugin we received the message from 269 * @param cls closure, const char* with the name of the plugin we received the message from
270 * @param peer (claimed) identity of the other peer 270 * @param address address and (claimed) identity of the other peer
271 * @param message the message, NULL if we only care about 271 * @param message the message, NULL if we only care about
272 * learning about the delay until we should receive again 272 * learning about the delay until we should receive again
273 * @param session identifier used for this session (NULL for plugins 273 * @param session identifier used for this session (NULL for plugins
274 * that do not offer bi-directional communication to the sender 274 * that do not offer bi-directional communication to the sender
275 * using the same "connection") 275 * using the same "connection")
276 * @param sender_address binary address of the sender (if we established the
277 * connection or are otherwise sure of it; should be NULL
278 * for inbound TCP/UDP connections since it it not clear
279 * that we could establish ourselves a connection to that
280 * IP address and get the same system)
281 * @param sender_address_len number of bytes in @a sender_address
282 * @return how long the plugin should wait until receiving more data 276 * @return how long the plugin should wait until receiving more data
283 * (plugins that do not support this, can ignore the return value) 277 * (plugins that do not support this, can ignore the return value)
284 */ 278 */
@@ -579,13 +573,10 @@ GST_ats_update_metrics (const struct GNUNET_PeerIdentity *peer,
579} 573}
580 574
581/** 575/**
582 * Function that will be called to figure if an address is an loopback, 576 * Function that will be called to update metrics for an address
583 * LAN, WAN etc. address
584 * 577 *
585 * @param cls closure 578 * @param cls closure
586 * @param peer the peer 579 * @param address address to update metrics for
587 * @param address binary address
588 * @param address_len length of the @a address
589 * @param session the session 580 * @param session the session
590 * @param ats the ats information to update 581 * @param ats the ats information to update
591 * @param ats_count the number of @a ats elements 582 * @param ats_count the number of @a ats elements
@@ -649,6 +640,7 @@ plugin_env_session_start (void *cls, struct GNUNET_HELLO_Address *address,
649 * actually happened. 640 * actually happened.
650 * 641 *
651 * @param cls closure 642 * @param cls closure
643 * @param peer the peer this address is intended for
652 * @param address address to use (for peer given in address) 644 * @param address address to use (for peer given in address)
653 * @param session session to use (if available) 645 * @param session session to use (if available)
654 * @param bandwidth_out assigned outbound bandwidth for the connection in NBO, 646 * @param bandwidth_out assigned outbound bandwidth for the connection in NBO,
@@ -659,11 +651,14 @@ plugin_env_session_start (void *cls, struct GNUNET_HELLO_Address *address,
659 * @param ats_count number of @a ats elements 651 * @param ats_count number of @a ats elements
660 */ 652 */
661static void 653static void
662ats_request_address_change (void *cls, const struct GNUNET_PeerIdentity *peer, 654ats_request_address_change (void *cls,
663 const struct GNUNET_HELLO_Address *address, struct Session *session, 655 const struct GNUNET_PeerIdentity *peer,
656 const struct GNUNET_HELLO_Address *address,
657 struct Session *session,
664 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out, 658 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out,
665 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in, 659 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in,
666 const struct GNUNET_ATS_Information *ats, uint32_t ats_count) 660 const struct GNUNET_ATS_Information *ats,
661 uint32_t ats_count)
667{ 662{
668 uint32_t bw_in = ntohl (bandwidth_in.value__); 663 uint32_t bw_in = ntohl (bandwidth_in.value__);
669 uint32_t bw_out = ntohl (bandwidth_out.value__); 664 uint32_t bw_out = ntohl (bandwidth_out.value__);
@@ -776,11 +771,11 @@ neighbours_changed_notification (void *cls,
776 * 771 *
777 * @param cls closure 772 * @param cls closure
778 * @param peer peer this update is about (never NULL) 773 * @param peer peer this update is about (never NULL)
779 * @param address address, NULL on disconnect 774 * @param address address (never NULL)
780 * @param state current state this peer is in 775 * @param last_validation point in time when last validation was performed
781 * @param state_timeout timeout for the current state of the peer 776 * @param valid_until point in time how long address is valid
782 * @param bandwidth_in bandwidth assigned inbound 777 * @param next_validation point in time when next validation will be performed
783 * @param bandwidth_out bandwidth assigned outbound 778 * @param state state of validation notification
784 */ 779 */
785static void 780static void
786validation_changed_notification (void *cls, 781validation_changed_notification (void *cls,