aboutsummaryrefslogtreecommitdiff
path: root/src/transport/plugin_transport_unix.c
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2011-12-13 15:15:12 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2011-12-13 15:15:12 +0000
commitb123d4d0fd1483966936d0997cd26fa0b6a0f6b5 (patch)
treeb01900539d14ae8a272b9a1a65401372fae510e0 /src/transport/plugin_transport_unix.c
parent5838db58281b2f734b29a7801d70f42fda9310cd (diff)
downloadgnunet-b123d4d0fd1483966936d0997cd26fa0b6a0f6b5.tar.gz
gnunet-b123d4d0fd1483966936d0997cd26fa0b6a0f6b5.zip
added ATS addresstype information to unix
Diffstat (limited to 'src/transport/plugin_transport_unix.c')
-rw-r--r--src/transport/plugin_transport_unix.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/transport/plugin_transport_unix.c b/src/transport/plugin_transport_unix.c
index 07dc50bb3..fc5719b3d 100644
--- a/src/transport/plugin_transport_unix.c
+++ b/src/transport/plugin_transport_unix.c
@@ -719,10 +719,12 @@ unix_demultiplexer (struct Plugin *plugin, struct GNUNET_PeerIdentity *sender,
719 const struct GNUNET_MessageHeader *currhdr, 719 const struct GNUNET_MessageHeader *currhdr,
720 const struct sockaddr_un *un, size_t fromlen) 720 const struct sockaddr_un *un, size_t fromlen)
721{ 721{
722 struct GNUNET_ATS_Information distance; 722 struct GNUNET_ATS_Information ats[2];
723 723
724 distance.type = htonl (GNUNET_ATS_QUALITY_NET_DISTANCE); 724 ats[0].type = htonl (GNUNET_ATS_QUALITY_NET_DISTANCE);
725 distance.value = htonl (UNIX_DIRECT_DISTANCE); 725 ats[0].value = htonl (UNIX_DIRECT_DISTANCE);
726 ats[1].type = htonl (GNUNET_ATS_NETWORK_TYPE);
727 ats[1].value = htonl (GNUNET_ATS_NET_LOOPBACK);
726 728
727 GNUNET_assert (fromlen >= sizeof (struct sockaddr_un)); 729 GNUNET_assert (fromlen >= sizeof (struct sockaddr_un));
728 730
@@ -731,7 +733,7 @@ unix_demultiplexer (struct Plugin *plugin, struct GNUNET_PeerIdentity *sender,
731 un->sun_path); 733 un->sun_path);
732#endif 734#endif
733 plugin->env->receive (plugin->env->cls, sender, currhdr, 735 plugin->env->receive (plugin->env->cls, sender, currhdr,
734 (const struct GNUNET_ATS_Information *) &distance, 1, 736 (const struct GNUNET_ATS_Information *) &ats, 2,
735 NULL, un->sun_path, strlen (un->sun_path) + 1); 737 NULL, un->sun_path, strlen (un->sun_path) + 1);
736} 738}
737 739