aboutsummaryrefslogtreecommitdiff
path: root/src/transport/plugin_transport_template.c
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2013-07-10 07:48:41 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2013-07-10 07:48:41 +0000
commitf3ddecf43857f42021779f826a2973e6ca7c289e (patch)
treed9aabacff61ac6692559ba0066dc6e49f53938d7 /src/transport/plugin_transport_template.c
parent6b8400966a5e6c2194785b3a33f91b748cfa7b7b (diff)
downloadgnunet-f3ddecf43857f42021779f826a2973e6ca7c289e.tar.gz
gnunet-f3ddecf43857f42021779f826a2973e6ca7c289e.zip
changed return type to enum
added get_network to template
Diffstat (limited to 'src/transport/plugin_transport_template.c')
-rw-r--r--src/transport/plugin_transport_template.c15
1 files changed, 15 insertions, 0 deletions
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}