aboutsummaryrefslogtreecommitdiff
path: root/src/transport
diff options
context:
space:
mode:
Diffstat (limited to 'src/transport')
-rw-r--r--src/transport/plugin_transport_http_client.c4
-rw-r--r--src/transport/plugin_transport_http_server.c4
-rw-r--r--src/transport/plugin_transport_tcp.c4
-rw-r--r--src/transport/plugin_transport_template.c15
-rw-r--r--src/transport/plugin_transport_udp.c4
-rw-r--r--src/transport/plugin_transport_unix.c4
-rw-r--r--src/transport/plugin_transport_wlan.c4
7 files changed, 27 insertions, 12 deletions
diff --git a/src/transport/plugin_transport_http_client.c b/src/transport/plugin_transport_http_client.c
index 7c3cebee3..365a3c2bd 100644
--- a/src/transport/plugin_transport_http_client.c
+++ b/src/transport/plugin_transport_http_client.c
@@ -1444,8 +1444,8 @@ client_connect (struct Session *s)
1444 * @param session the session 1444 * @param session the session
1445 * @return the network type in HBO or GNUNET_SYSERR 1445 * @return the network type in HBO or GNUNET_SYSERR
1446 */ 1446 */
1447int http_client_get_network (void *cls, 1447static enum GNUNET_ATS_Network_Type
1448 void *session) 1448http_client_get_network (void *cls, void *session)
1449{ 1449{
1450 struct Session *s = (struct Session *) session; 1450 struct Session *s = (struct Session *) session;
1451 GNUNET_assert (NULL != s); 1451 GNUNET_assert (NULL != s);
diff --git a/src/transport/plugin_transport_http_server.c b/src/transport/plugin_transport_http_server.c
index dfa3a4998..2cd6eb660 100644
--- a/src/transport/plugin_transport_http_server.c
+++ b/src/transport/plugin_transport_http_server.c
@@ -3011,8 +3011,8 @@ const char *http_plugin_address_to_string (void *cls,
3011 * @param session the session 3011 * @param session the session
3012 * @return the network type in HBO or GNUNET_SYSERR 3012 * @return the network type in HBO or GNUNET_SYSERR
3013 */ 3013 */
3014int http_server_get_network (void *cls, 3014static enum GNUNET_ATS_Network_Type
3015 void *session) 3015http_server_get_network (void *cls, void *session)
3016{ 3016{
3017 struct Session *s = (struct Session *) session; 3017 struct Session *s = (struct Session *) session;
3018 GNUNET_assert (NULL != s); 3018 GNUNET_assert (NULL != s);
diff --git a/src/transport/plugin_transport_tcp.c b/src/transport/plugin_transport_tcp.c
index 025554a26..18d033556 100644
--- a/src/transport/plugin_transport_tcp.c
+++ b/src/transport/plugin_transport_tcp.c
@@ -2386,8 +2386,8 @@ stop_session_timeout (struct Session *s)
2386 * @param session the session 2386 * @param session the session
2387 * @return the network type in HBO or GNUNET_SYSERR 2387 * @return the network type in HBO or GNUNET_SYSERR
2388 */ 2388 */
2389int tcp_get_network (void *cls, 2389static enum GNUNET_ATS_Network_Type
2390 void *session) 2390tcp_get_network (void *cls,void *session)
2391{ 2391{
2392 struct Session *s = (struct Session *) session; 2392 struct Session *s = (struct Session *) session;
2393 GNUNET_assert (NULL != session); 2393 GNUNET_assert (NULL != session);
diff --git a/src/transport/plugin_transport_template.c b/src/transport/plugin_transport_template.c
index dfe6ff6fa..e8874d14e 100644
--- a/src/transport/plugin_transport_template.c
+++ b/src/transport/plugin_transport_template.c
@@ -205,6 +205,20 @@ template_plugin_disconnect (void *cls, const struct GNUNET_PeerIdentity *target)
205 // FIXME 205 // FIXME
206} 206}
207 207
208/**
209 * Function obtain the network type for a session
210 *
211 * @param cls closure ('struct Plugin*')
212 * @param session the session
213 * @return the network type in HBO or GNUNET_SYSERR
214 */
215static enum GNUNET_ATS_Network_Type
216template_plugin_get_network (void *cls, void *session)
217{
218 struct Session *s = (struct Session *) session;
219 GNUNET_assert (NULL != s);
220 return GNUNET_ATS_NET_UNSPECIFIED; /* Change to correct network type */
221}
208 222
209/** 223/**
210 * Convert the transports address to a nice, human-readable 224 * Convert the transports address to a nice, human-readable
@@ -354,6 +368,7 @@ libgnunet_plugin_transport_template_init (void *cls)
354 api->address_to_string = &template_plugin_address_to_string; 368 api->address_to_string = &template_plugin_address_to_string;
355 api->string_to_address = &template_plugin_string_to_address; 369 api->string_to_address = &template_plugin_string_to_address;
356 api->get_session = &template_plugin_get_session; 370 api->get_session = &template_plugin_get_session;
371 api->get_network = &template_plugin_get_network;
357 LOG (GNUNET_ERROR_TYPE_INFO, "Template plugin successfully loaded\n"); 372 LOG (GNUNET_ERROR_TYPE_INFO, "Template plugin successfully loaded\n");
358 return api; 373 return api;
359} 374}
diff --git a/src/transport/plugin_transport_udp.c b/src/transport/plugin_transport_udp.c
index 565573081..ff9425c83 100644
--- a/src/transport/plugin_transport_udp.c
+++ b/src/transport/plugin_transport_udp.c
@@ -1434,8 +1434,8 @@ session_cmp_it (void *cls,
1434 * @param session the session 1434 * @param session the session
1435 * @return the network type in HBO or GNUNET_SYSERR 1435 * @return the network type in HBO or GNUNET_SYSERR
1436 */ 1436 */
1437int udp_get_network (void *cls, 1437static enum GNUNET_ATS_Network_Type
1438 void *session) 1438udp_get_network (void *cls, void *session)
1439{ 1439{
1440 struct Session *s = (struct Session *) session; 1440 struct Session *s = (struct Session *) session;
1441 1441
diff --git a/src/transport/plugin_transport_unix.c b/src/transport/plugin_transport_unix.c
index 6efb423fb..cf9396dc5 100644
--- a/src/transport/plugin_transport_unix.c
+++ b/src/transport/plugin_transport_unix.c
@@ -733,8 +733,8 @@ session_timeout (void *cls,
733 * @param session the session 733 * @param session the session
734 * @return the network type in HBO or GNUNET_SYSERR 734 * @return the network type in HBO or GNUNET_SYSERR
735 */ 735 */
736int unix_get_network (void *cls, 736static enum GNUNET_ATS_Network_Type
737 void *session) 737unix_get_network (void *cls, void *session)
738{ 738{
739 GNUNET_assert (NULL != session); 739 GNUNET_assert (NULL != session);
740 return GNUNET_ATS_NET_LOOPBACK; 740 return GNUNET_ATS_NET_LOOPBACK;
diff --git a/src/transport/plugin_transport_wlan.c b/src/transport/plugin_transport_wlan.c
index 1c480dee5..ee3163dd9 100644
--- a/src/transport/plugin_transport_wlan.c
+++ b/src/transport/plugin_transport_wlan.c
@@ -1029,8 +1029,8 @@ create_macendpoint (struct Plugin *plugin,
1029 * @param session the session 1029 * @param session the session
1030 * @return the network type in HBO or GNUNET_SYSERR 1030 * @return the network type in HBO or GNUNET_SYSERR
1031 */ 1031 */
1032int wlan_get_network (void *cls, 1032static enum GNUNET_ATS_Network_Type
1033 void *session) 1033wlan_get_network (void *cls, void *session)
1034{ 1034{
1035 GNUNET_assert (NULL != session); 1035 GNUNET_assert (NULL != session);
1036 return GNUNET_ATS_NET_WLAN; 1036 return GNUNET_ATS_NET_WLAN;