diff options
Diffstat (limited to 'src/transport/gnunet-service-transport_ats-new.h')
-rw-r--r-- | src/transport/gnunet-service-transport_ats-new.h | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/src/transport/gnunet-service-transport_ats-new.h b/src/transport/gnunet-service-transport_ats-new.h index 360674bb9..e4e85fee1 100644 --- a/src/transport/gnunet-service-transport_ats-new.h +++ b/src/transport/gnunet-service-transport_ats-new.h | |||
@@ -29,6 +29,7 @@ | |||
29 | #include "gnunet_constants.h" | 29 | #include "gnunet_constants.h" |
30 | #include "gnunet_util_lib.h" | 30 | #include "gnunet_util_lib.h" |
31 | #include "gnunet_transport_service.h" | 31 | #include "gnunet_transport_service.h" |
32 | #include "gnunet_transport_plugin.h" | ||
32 | 33 | ||
33 | 34 | ||
34 | /** | 35 | /** |
@@ -47,13 +48,15 @@ struct GST_AtsHandle; | |||
47 | * @param cls closure | 48 | * @param cls closure |
48 | * @param peer identity of the peer | 49 | * @param peer identity of the peer |
49 | * @param plugin_name name of the transport plugin, NULL to disconnect | 50 | * @param plugin_name name of the transport plugin, NULL to disconnect |
50 | * @param plugin_addr address to use, NULL to disconnect | 51 | * @param session session to use (if available) |
52 | * @param plugin_addr address to use (if available) | ||
51 | * @param plugin_addr_len number of bytes in addr | 53 | * @param plugin_addr_len number of bytes in addr |
52 | * @param bandwidth assigned bandwidth for the connection | 54 | * @param bandwidth assigned bandwidth for the connection |
53 | */ | 55 | */ |
54 | typedef void (*GNUNET_TRANSPORT_ATS_AllocationNotification)(void *cls, | 56 | typedef void (*GNUNET_TRANSPORT_ATS_AllocationNotification)(void *cls, |
55 | const struct GNUNET_PeerIdentity *peer, | 57 | const struct GNUNET_PeerIdentity *peer, |
56 | const char *plugin_name, | 58 | const char *plugin_name, |
59 | struct Session *session, | ||
57 | const void *plugin_addr, | 60 | const void *plugin_addr, |
58 | size_t plugin_addr_len, | 61 | size_t plugin_addr_len, |
59 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth); | 62 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth); |
@@ -89,7 +92,8 @@ GST_ats_shutdown (struct GST_AtsHandle *atc); | |||
89 | * @param atc handle | 92 | * @param atc handle |
90 | * @param peer identity of the new peer | 93 | * @param peer identity of the new peer |
91 | * @param plugin_name name of the currently used transport plugin | 94 | * @param plugin_name name of the currently used transport plugin |
92 | * @param plugin_addr address in use | 95 | * @param session session in use (if available) |
96 | * @param plugin_addr address in use (if available) | ||
93 | * @param plugin_addr_len number of bytes in plugin_addr | 97 | * @param plugin_addr_len number of bytes in plugin_addr |
94 | * @param ats performance data for the connection | 98 | * @param ats performance data for the connection |
95 | * @param ats_count number of performance records in 'ats' | 99 | * @param ats_count number of performance records in 'ats' |
@@ -98,6 +102,7 @@ void | |||
98 | GST_ats_peer_connect (struct GST_AtsHandle *atc, | 102 | GST_ats_peer_connect (struct GST_AtsHandle *atc, |
99 | const struct GNUNET_PeerIdentity *peer, | 103 | const struct GNUNET_PeerIdentity *peer, |
100 | const char *plugin_name, | 104 | const char *plugin_name, |
105 | struct Session *session, | ||
101 | const void *plugin_addr, | 106 | const void *plugin_addr, |
102 | size_t plugin_addr_len, | 107 | size_t plugin_addr_len, |
103 | const struct GNUNET_TRANSPORT_ATS_Information *ats, | 108 | const struct GNUNET_TRANSPORT_ATS_Information *ats, |
@@ -110,7 +115,7 @@ GST_ats_peer_connect (struct GST_AtsHandle *atc, | |||
110 | * Calculate bandwidth assignments without the peer. | 115 | * Calculate bandwidth assignments without the peer. |
111 | * | 116 | * |
112 | * @param atc handle | 117 | * @param atc handle |
113 | * @param peer identity of the new peer | 118 | * @param peer identity of the peer |
114 | */ | 119 | */ |
115 | void | 120 | void |
116 | GST_ats_peer_disconnect (struct GST_AtsHandle *atc, | 121 | GST_ats_peer_disconnect (struct GST_AtsHandle *atc, |
@@ -118,6 +123,19 @@ GST_ats_peer_disconnect (struct GST_AtsHandle *atc, | |||
118 | 123 | ||
119 | 124 | ||
120 | /** | 125 | /** |
126 | * A session got destroyed, stop including it as a valid address. | ||
127 | * | ||
128 | * @param atc handle | ||
129 | * @param peer identity of the peer | ||
130 | * @param session session handle that is no longer valid | ||
131 | */ | ||
132 | void | ||
133 | GST_ats_session_destroyed (struct GST_AtsHandle *atc, | ||
134 | const struct GNUNET_PeerIdentity *peer, | ||
135 | const struct Session *session); | ||
136 | |||
137 | |||
138 | /** | ||
121 | * We have updated performance statistics for a given address. Note | 139 | * We have updated performance statistics for a given address. Note |
122 | * that this function can be called for addresses that are currently | 140 | * that this function can be called for addresses that are currently |
123 | * in use as well as addresses that are valid but not actively in use. | 141 | * in use as well as addresses that are valid but not actively in use. |
@@ -128,7 +146,8 @@ GST_ats_peer_disconnect (struct GST_AtsHandle *atc, | |||
128 | * @param atc handle | 146 | * @param atc handle |
129 | * @param peer identity of the new peer | 147 | * @param peer identity of the new peer |
130 | * @param plugin_name name of the transport plugin | 148 | * @param plugin_name name of the transport plugin |
131 | * @param plugin_addr address | 149 | * @param session session handle (if available) |
150 | * @param plugin_addr address (if available) | ||
132 | * @param plugin_addr_len number of bytes in plugin_addr | 151 | * @param plugin_addr_len number of bytes in plugin_addr |
133 | * @param ats performance data for the address | 152 | * @param ats performance data for the address |
134 | * @param ats_count number of performance records in 'ats' | 153 | * @param ats_count number of performance records in 'ats' |
@@ -137,6 +156,7 @@ void | |||
137 | GST_ats_address_update (struct GST_AtsHandle *atc, | 156 | GST_ats_address_update (struct GST_AtsHandle *atc, |
138 | const struct GNUNET_PeerIdentity *peer, | 157 | const struct GNUNET_PeerIdentity *peer, |
139 | const char *plugin_name, | 158 | const char *plugin_name, |
159 | struct Session *session, | ||
140 | const void *plugin_addr, | 160 | const void *plugin_addr, |
141 | size_t plugin_addr_len, | 161 | size_t plugin_addr_len, |
142 | const struct GNUNET_TRANSPORT_ATS_Information *ats, | 162 | const struct GNUNET_TRANSPORT_ATS_Information *ats, |