diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2013-03-18 16:10:31 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2013-03-18 16:10:31 +0000 |
commit | 6cc556bed0898dcdb168248658574862920818da (patch) | |
tree | 1e4850a7756e0940142ff2009e0fabab1c7660bd /src/include/gnunet_transport_plugin.h | |
parent | 2bfa211933d6285ffbdc7d871e695838b5d08b9f (diff) | |
download | gnunet-6cc556bed0898dcdb168248658574862920818da.tar.gz gnunet-6cc556bed0898dcdb168248658574862920818da.zip |
transport plugin api change: split of address receive and ats updates
Diffstat (limited to 'src/include/gnunet_transport_plugin.h')
-rw-r--r-- | src/include/gnunet_transport_plugin.h | 50 |
1 files changed, 32 insertions, 18 deletions
diff --git a/src/include/gnunet_transport_plugin.h b/src/include/gnunet_transport_plugin.h index 520c93b2c..bc635b1cc 100644 --- a/src/include/gnunet_transport_plugin.h +++ b/src/include/gnunet_transport_plugin.h | |||
@@ -100,24 +100,11 @@ typedef void (*GNUNET_TRANSPORT_SessionEnd) (void *cls, | |||
100 | */ | 100 | */ |
101 | typedef struct | 101 | typedef struct |
102 | GNUNET_TIME_Relative (*GNUNET_TRANSPORT_PluginReceiveCallback) (void *cls, | 102 | GNUNET_TIME_Relative (*GNUNET_TRANSPORT_PluginReceiveCallback) (void *cls, |
103 | const struct | 103 | const struct GNUNET_PeerIdentity *peer, |
104 | GNUNET_PeerIdentity | 104 | const struct GNUNET_MessageHeader *message, |
105 | * peer, | 105 | struct Session *session, |
106 | const struct | 106 | const char *sender_address, |
107 | GNUNET_MessageHeader | 107 | uint16_t sender_address_len); |
108 | * message, | ||
109 | const struct | ||
110 | GNUNET_ATS_Information | ||
111 | * ats, | ||
112 | uint32_t | ||
113 | ats_count, | ||
114 | struct | ||
115 | Session * | ||
116 | session, | ||
117 | const char | ||
118 | *sender_address, | ||
119 | uint16_t | ||
120 | sender_address_len); | ||
121 | 108 | ||
122 | 109 | ||
123 | /** | 110 | /** |
@@ -134,6 +121,27 @@ typedef struct GNUNET_ATS_Information | |||
134 | const struct sockaddr *addr, | 121 | const struct sockaddr *addr, |
135 | size_t addrlen); | 122 | size_t addrlen); |
136 | 123 | ||
124 | |||
125 | /** | ||
126 | * Function called when quality properties of an address change. | ||
127 | * | ||
128 | * @param cls closure | ||
129 | * @param peer peer | ||
130 | * @param address address | ||
131 | * @param address_len length of the address | ||
132 | * @param session session | ||
133 | * @param ats ATS information | ||
134 | * @param ats_count number of ATS information contained | ||
135 | */ | ||
136 | typedef void | ||
137 | (*GNUNET_TRANSPORT_UpdateAddressMetrics) (void *cls, | ||
138 | const struct GNUNET_PeerIdentity *peer, | ||
139 | const char *address, | ||
140 | uint16_t address_len, | ||
141 | struct Session *session, | ||
142 | struct GNUNET_ATS_Information *ats, | ||
143 | uint32_t ats_count); | ||
144 | |||
137 | /** | 145 | /** |
138 | * Function that will be called for each address the transport | 146 | * Function that will be called for each address the transport |
139 | * is aware that it might be reachable under. | 147 | * is aware that it might be reachable under. |
@@ -246,6 +254,12 @@ struct GNUNET_TRANSPORT_PluginEnvironment | |||
246 | */ | 254 | */ |
247 | GNUNET_TRANSPORT_AddressToType get_address_type; | 255 | GNUNET_TRANSPORT_AddressToType get_address_type; |
248 | 256 | ||
257 | /** | ||
258 | * Function that will be called to figure if an address is an loopback, | ||
259 | * LAN, WAN etc. address | ||
260 | */ | ||
261 | GNUNET_TRANSPORT_UpdateAddressMetrics update_address_metrics; | ||
262 | |||
249 | 263 | ||
250 | /** | 264 | /** |
251 | * What is the maximum number of connections that this transport | 265 | * What is the maximum number of connections that this transport |