tnq->len = mlen;
tdm = (struct GNUNET_EXIT_TcpDataMessage *) &tnq[1];
tdm->header.size = htons ((uint16_t) mlen);
- tdm->header.type = htons (GNUNET_MESSAGE_TYPE_VPN_TCP_DATA);
+ tdm->header.type = htons (GNUNET_MESSAGE_TYPE_VPN_TCP_DATA_TO_VPN);
tdm->reserved = htonl (0);
memcpy (&tdm->tcp_header,
buf,
_("IPv4 packet options received. Ignored.\n"));
return;
}
+
size -= sizeof (struct GNUNET_TUN_IPv4Header);
switch (pkt4->protocol)
{
{&receive_udp_remote, GNUNET_MESSAGE_TYPE_VPN_UDP_TO_INTERNET, 0},
{&receive_tcp_service, GNUNET_MESSAGE_TYPE_VPN_TCP_TO_SERVICE_START, 0},
{&receive_tcp_remote, GNUNET_MESSAGE_TYPE_VPN_TCP_TO_INTERNET_START, 0},
- {&receive_tcp_data, GNUNET_MESSAGE_TYPE_VPN_TCP_DATA, 0},
+ {&receive_tcp_data, GNUNET_MESSAGE_TYPE_VPN_TCP_DATA_TO_EXIT, 0},
{NULL, 0, 0}
};
/**
* Type of messages containing an DNS request for a DNS exit service.
*/
-#define GNUNET_MESSAGE_TYPE_VPN_DNS_TO_INTERNET 194
+#define GNUNET_MESSAGE_TYPE_VPN_DNS_TO_INTERNET 193
/**
* Type of messages containing an DNS reply from a DNS exit service.
*/
-#define GNUNET_MESSAGE_TYPE_VPN_DNS_FROM_INTERNET 195
+#define GNUNET_MESSAGE_TYPE_VPN_DNS_FROM_INTERNET 194
/**
* Type of messages containing an TCP packet for a service.
*/
-#define GNUNET_MESSAGE_TYPE_VPN_TCP_TO_SERVICE_START 196
+#define GNUNET_MESSAGE_TYPE_VPN_TCP_TO_SERVICE_START 195
/**
* Type of messages containing an TCP packet for the Internet.
*/
-#define GNUNET_MESSAGE_TYPE_VPN_TCP_TO_INTERNET_START 197
+#define GNUNET_MESSAGE_TYPE_VPN_TCP_TO_INTERNET_START 196
/**
* Type of messages containing an TCP packet of an established connection.
*/
-#define GNUNET_MESSAGE_TYPE_VPN_TCP_DATA 198
+#define GNUNET_MESSAGE_TYPE_VPN_TCP_DATA_TO_EXIT 197
+
+/**
+ * Type of messages containing an TCP packet of an established connection.
+ */
+#define GNUNET_MESSAGE_TYPE_VPN_TCP_DATA_TO_VPN 198
/**
* Type of messages containing an UDP packet for a service.
tnq->msg = &tnq[1];
tdm = (struct GNUNET_EXIT_TcpDataMessage *) &tnq[1];
tdm->header.size = htons ((uint16_t) mlen);
- tdm->header.type = htons (GNUNET_MESSAGE_TYPE_VPN_TCP_DATA);
+ tdm->header.type = htons (GNUNET_MESSAGE_TYPE_VPN_TCP_DATA_TO_EXIT);
tdm->reserved = htonl (0);
tdm->tcp_header = *tcp;
memcpy (&tdm[1],
};
static const struct GNUNET_MESH_MessageHandler mesh_handlers[] = {
{ &receive_udp_back, GNUNET_MESSAGE_TYPE_VPN_UDP_REPLY, 0},
- { &receive_tcp_back, GNUNET_MESSAGE_TYPE_VPN_TCP_DATA, 0},
+ { &receive_tcp_back, GNUNET_MESSAGE_TYPE_VPN_TCP_DATA_TO_VPN, 0},
{NULL, 0, 0}
};
static const GNUNET_MESH_ApplicationType types[] = {