diff options
author | Christian Grothoff <christian@grothoff.org> | 2015-01-22 22:13:42 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2015-01-22 22:13:42 +0000 |
commit | bfc6d94bd600d3048c155dc2a48c2e1faee484d0 (patch) | |
tree | 19697bbf1930693da0195b1d0683e195b1d589b1 /src/ats/ats_api_scheduling.c | |
parent | 0d4797b47c3cf73137935f0e7eab9dd1277487b9 (diff) | |
download | gnunet-bfc6d94bd600d3048c155dc2a48c2e1faee484d0.tar.gz gnunet-bfc6d94bd600d3048c155dc2a48c2e1faee484d0.zip |
-improving docs
Diffstat (limited to 'src/ats/ats_api_scheduling.c')
-rw-r--r-- | src/ats/ats_api_scheduling.c | 33 |
1 files changed, 22 insertions, 11 deletions
diff --git a/src/ats/ats_api_scheduling.c b/src/ats/ats_api_scheduling.c index 90e3de731..13b5ef46d 100644 --- a/src/ats/ats_api_scheduling.c +++ b/src/ats/ats_api_scheduling.c | |||
@@ -22,6 +22,14 @@ | |||
22 | * @brief automatic transport selection and outbound bandwidth determination | 22 | * @brief automatic transport selection and outbound bandwidth determination |
23 | * @author Christian Grothoff | 23 | * @author Christian Grothoff |
24 | * @author Matthias Wachs | 24 | * @author Matthias Wachs |
25 | * | ||
26 | * TODO: | ||
27 | * - we could avoid a linear scan over the | ||
28 | * active addresses in some cases, so if | ||
29 | * there is need, we can still optimize here | ||
30 | * - we might want to split off the logic to | ||
31 | * determine LAN vs. WAN, as it has nothing | ||
32 | * to do with accessing the ATS service. | ||
25 | */ | 33 | */ |
26 | #include "platform.h" | 34 | #include "platform.h" |
27 | #include "gnunet_ats_service.h" | 35 | #include "gnunet_ats_service.h" |
@@ -40,11 +48,9 @@ | |||
40 | 48 | ||
41 | 49 | ||
42 | /** | 50 | /** |
43 | * Information we track per address. | 51 | * Information we track per address, incoming or outgoing. It also |
44 | * FIXME: but what about *incoming* connections? | 52 | * doesn't matter if we have a session, any address that ATS is |
45 | * "address" tells us about those, those | 53 | * allowed to suggest right now should be tracked. |
46 | * are only valid while we have a session. | ||
47 | * Need to clarify all this!!! | ||
48 | */ | 54 | */ |
49 | struct GNUNET_ATS_AddressRecord | 55 | struct GNUNET_ATS_AddressRecord |
50 | { | 56 | { |
@@ -86,15 +92,16 @@ struct GNUNET_ATS_AddressRecord | |||
86 | uint32_t slot; | 92 | uint32_t slot; |
87 | 93 | ||
88 | /** | 94 | /** |
89 | * Is this address currently in use? | 95 | * Is this address currently in use? In use means |
90 | * FIXME: document what "in use" means, and why it | 96 | * that the transport service will use this address |
91 | * is important! | 97 | * for sending. |
92 | */ | 98 | */ |
93 | int in_use; | 99 | int in_use; |
94 | 100 | ||
95 | /** | 101 | /** |
96 | * We're about to destroy this address record, just ATS does | 102 | * We're about to destroy this address record, just ATS does |
97 | * not know this yet. | 103 | * not know this yet. Once ATS confirms its destruction, |
104 | * we can clean up. | ||
98 | */ | 105 | */ |
99 | int in_destroy; | 106 | int in_destroy; |
100 | }; | 107 | }; |
@@ -104,7 +111,10 @@ struct GNUNET_ATS_AddressRecord | |||
104 | * We keep a list of our local networks so we can answer | 111 | * We keep a list of our local networks so we can answer |
105 | * LAN vs. WAN questions. Note: WLAN is not detected yet. | 112 | * LAN vs. WAN questions. Note: WLAN is not detected yet. |
106 | * (maybe we can do that heuristically based on interface | 113 | * (maybe we can do that heuristically based on interface |
107 | * name in the future?) | 114 | * name in the future?). |
115 | * | ||
116 | * FIXME: should this be part of the ATS scheduling API? | ||
117 | * Seems to be more generic and independent of ATS. | ||
108 | */ | 118 | */ |
109 | struct ATS_Network | 119 | struct ATS_Network |
110 | { | 120 | { |
@@ -429,7 +439,8 @@ process_ats_session_release_message (void *cls, | |||
429 | const struct SessionReleaseMessage *srm; | 439 | const struct SessionReleaseMessage *srm; |
430 | 440 | ||
431 | srm = (const struct SessionReleaseMessage *) msg; | 441 | srm = (const struct SessionReleaseMessage *) msg; |
432 | /* FIXME: peer field in srm not necessary anymore */ | 442 | /* Note: peer field in srm not necessary right now, |
443 | but might be good to have in the future */ | ||
433 | release_session (sh, | 444 | release_session (sh, |
434 | ntohl (srm->session_id)); | 445 | ntohl (srm->session_id)); |
435 | } | 446 | } |