aboutsummaryrefslogtreecommitdiff
path: root/src/mesh/mesh_api.c
diff options
context:
space:
mode:
authorPhilipp Tölke <toelke@in.tum.de>2011-07-27 07:28:18 +0000
committerPhilipp Tölke <toelke@in.tum.de>2011-07-27 07:28:18 +0000
commite8fac5ff0ff5dece01bdfd51a57a2af7b4117d52 (patch)
tree19a68ad459c01ef59dd77c9dc28cdc2bd371d65c /src/mesh/mesh_api.c
parent98760f1bfe7a96e87f762c6948825f12ab9bb736 (diff)
downloadgnunet-e8fac5ff0ff5dece01bdfd51a57a2af7b4117d52.tar.gz
gnunet-e8fac5ff0ff5dece01bdfd51a57a2af7b4117d52.zip
queue transmits to tunnels
Diffstat (limited to 'src/mesh/mesh_api.c')
-rw-r--r--src/mesh/mesh_api.c44
1 files changed, 44 insertions, 0 deletions
diff --git a/src/mesh/mesh_api.c b/src/mesh/mesh_api.c
index fc22cbeb4..445c74388 100644
--- a/src/mesh/mesh_api.c
+++ b/src/mesh/mesh_api.c
@@ -77,6 +77,13 @@ struct GNUNET_MESH_Tunnel
77 77
78 /* The context of the receive-function. */ 78 /* The context of the receive-function. */
79 void *ctx; 79 void *ctx;
80
81 /* A list, usable by application-code (for queues) */
82 void* app_head;
83 void* app_tail;
84
85 /* A pointer, usable by application-code */
86 void* app_data;
80}; 87};
81 88
82struct tunnel_list_element 89struct tunnel_list_element
@@ -699,6 +706,43 @@ GNUNET_MESH_notify_transmit_ready_cancel (struct GNUNET_MESH_TransmitHandle
699 *) th); 706 *) th);
700} 707}
701 708
709void
710GNUNET_MESH_tunnel_set_head (struct GNUNET_MESH_Tunnel *tunnel, void *head)
711{
712 tunnel->app_head = head;
713}
714
715void
716GNUNET_MESH_tunnel_set_tail (struct GNUNET_MESH_Tunnel *tunnel, void *tail)
717{
718 tunnel->app_tail = tail;
719}
720
721void *
722GNUNET_MESH_tunnel_get_head (struct GNUNET_MESH_Tunnel *tunnel)
723{
724 return tunnel->app_head;
725}
726
727void *
728GNUNET_MESH_tunnel_get_tail (struct GNUNET_MESH_Tunnel *tunnel)
729{
730 return tunnel->app_head;
731}
732
733void
734GNUNET_MESH_tunnel_set_data (struct GNUNET_MESH_Tunnel *tunnel, void *data)
735{
736 tunnel->app_data = data;
737}
738
739void *
740GNUNET_MESH_tunnel_get_data (struct GNUNET_MESH_Tunnel *tunnel)
741{
742 return tunnel->app_data;
743}
744
745
702void build_hello_message(struct GNUNET_MESH_Handle* handle, 746void build_hello_message(struct GNUNET_MESH_Handle* handle,
703 const GNUNET_MESH_ApplicationType *stypes) 747 const GNUNET_MESH_ApplicationType *stypes)
704{ 748{