[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r16219 - gnunet/src/vpn
From: |
gnunet |
Subject: |
[GNUnet-SVN] r16219 - gnunet/src/vpn |
Date: |
Wed, 27 Jul 2011 09:28:09 +0200 |
Author: toelke
Date: 2011-07-27 09:28:09 +0200 (Wed, 27 Jul 2011)
New Revision: 16219
Modified:
gnunet/src/vpn/gnunet-daemon-vpn-helper.c
Log:
save the udp and tcp tunnels
Modified: gnunet/src/vpn/gnunet-daemon-vpn-helper.c
===================================================================
--- gnunet/src/vpn/gnunet-daemon-vpn-helper.c 2011-07-27 07:28:08 UTC (rev
16218)
+++ gnunet/src/vpn/gnunet-daemon-vpn-helper.c 2011-07-27 07:28:09 UTC (rev
16219)
@@ -46,6 +46,12 @@
struct GNUNET_VPN_HELPER_Handle *helper_handle;
/**
+ * The tunnels that will be used to send tcp- and udp-packets
+ */
+static struct GNUNET_MESH_Tunnel* tcp_tunnel;
+static struct GNUNET_MESH_Tunnel* udp_tunnel;
+
+/**
* Start the helper-process
*
* If cls != NULL it is assumed that this function is called as a result of a
dying
@@ -325,6 +331,8 @@
memcpy (hc + 1, &pkt6_udp->udp_hdr,
ntohs (pkt6_udp->udp_hdr.len));
app_type = GNUNET_APPLICATION_TYPE_INTERNET_UDP_GATEWAY;
+ if (NULL != udp_tunnel)
+ me->tunnel = udp_tunnel;
}
else if (s->proto == 0x06)
{
@@ -332,6 +340,8 @@
memcpy (hc + 1, &pkt6_tcp->tcp_hdr,
ntohs (pkt6->ip6_hdr.paylgth));
app_type = GNUNET_APPLICATION_TYPE_INTERNET_TCP_GATEWAY;
+ if (NULL != tcp_tunnel)
+ me->tunnel = tcp_tunnel;
}
if (me->tunnel == NULL && NULL != cls)
{
@@ -342,6 +352,10 @@
NULL,
cls);
me->tunnel = *cls;
+ if (GNUNET_APPLICATION_TYPE_INTERNET_UDP_GATEWAY ==
app_type)
+ udp_tunnel = *cls;
+ else if (GNUNET_APPLICATION_TYPE_INTERNET_TCP_GATEWAY ==
app_type)
+ tcp_tunnel = *cls;
}
else if (NULL != cls)
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r16219 - gnunet/src/vpn,
gnunet <=