aboutsummaryrefslogtreecommitdiff
path: root/src/ats/gnunet-service-ats_preferences.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-02-05 19:48:15 +0000
committerChristian Grothoff <christian@grothoff.org>2015-02-05 19:48:15 +0000
commit21264a59434a5b18b4f5e85e735a2d3ec5c3c6c6 (patch)
treedb7c1187ddbba17641e0c0fcd631331803d19983 /src/ats/gnunet-service-ats_preferences.h
parent88031e0e8188e96d7ae4ce3659e6ed0d90a64f26 (diff)
downloadgnunet-21264a59434a5b18b4f5e85e735a2d3ec5c3c6c6.tar.gz
gnunet-21264a59434a5b18b4f5e85e735a2d3ec5c3c6c6.zip
cleaning up gnunet-service-ats_normalization.c
Diffstat (limited to 'src/ats/gnunet-service-ats_preferences.h')
-rw-r--r--src/ats/gnunet-service-ats_preferences.h51
1 files changed, 51 insertions, 0 deletions
diff --git a/src/ats/gnunet-service-ats_preferences.h b/src/ats/gnunet-service-ats_preferences.h
index cecc9d5f6..66610d470 100644
--- a/src/ats/gnunet-service-ats_preferences.h
+++ b/src/ats/gnunet-service-ats_preferences.h
@@ -49,6 +49,57 @@ GAS_preference_client_disconnect (struct GNUNET_SERVER_Client *client);
49 49
50 50
51/** 51/**
52 * Get the normalized preference values for a specific peer.
53 *
54 * @param cls ignored
55 * @param id the peer
56 * @return pointer to the values, can be indexed
57 * with GNUNET_ATS_PreferenceKind, NULL if peer does not exist
58 */
59const double *
60GAS_normalization_get_preferences_by_peer (void *cls,
61 const struct GNUNET_PeerIdentity *id);
62
63
64/**
65 * Get the normalized preference values for a specific client and peer
66 *
67 * @param client client
68 * @param peer the peer
69 * @param pref the preference type
70 * @return the value
71 */
72double
73GAS_normalization_get_preferences_by_client (const void *client,
74 const struct GNUNET_PeerIdentity *peer,
75 enum GNUNET_ATS_PreferenceKind pref);
76
77
78/**
79 * Normalize an updated preference value
80 *
81 * @param client the client with this preference
82 * @param peer the peer to change the preference for
83 * @param kind the kind to change the preference
84 * @param score_abs the normalized score
85 */
86void
87GAS_normalization_normalize_preference (void *client,
88 const struct GNUNET_PeerIdentity *peer,
89 enum GNUNET_ATS_PreferenceKind kind,
90 float score_abs);
91
92
93/**
94 * A performance client disconnected
95 *
96 * @param client the disconnecting client
97 */
98void
99GAS_normalization_preference_client_disconnect (void *client);
100
101
102/**
52 * Handle 'preference change' messages from clients. 103 * Handle 'preference change' messages from clients.
53 * 104 *
54 * @param cls unused, NULL 105 * @param cls unused, NULL