wip
[oweals/gnunet.git] / src / transport / test_transport_api.c
index 3b528d84d0aa9dfb779534387624c73ec1b4bbdc..d78e3264bb3e85294c727a923b93a41e1f011ef6 100644 (file)
@@ -76,6 +76,8 @@ static int is_tcp_nat;
 
 static int is_udp;
 
+static int is_unix;
+
 static int is_udp_nat;
 
 static int is_http;
@@ -349,7 +351,7 @@ exchange_hello (void *cls,
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "Received HELLO size %d\n", GNUNET_HELLO_size((const struct GNUNET_HELLO_Message *)message));
 
-  GNUNET_TRANSPORT_offer_hello (p2.th, message);
+  GNUNET_TRANSPORT_offer_hello (p2.th, message, NULL, NULL);
   GNUNET_TRANSPORT_get_hello (p2.th, &exchange_hello_last, &p2);
 }
 
@@ -369,6 +371,12 @@ run (void *cls,
       setup_peer (&p1, "test_transport_api_udp_peer1.conf");
       setup_peer (&p2, "test_transport_api_udp_peer2.conf");
     }
+  if (is_unix)
+    {
+      GNUNET_log(GNUNET_ERROR_TYPE_WARNING, "Using unix domain socket transport\n");
+      setup_peer (&p1, "test_transport_api_unix_peer1.conf");
+      setup_peer (&p2, "test_transport_api_unix_peer2.conf");
+    }
   if (is_multi_protocol)
     {
       setup_peer (&p1, "test_transport_api_multi_peer1.conf");
@@ -634,6 +642,10 @@ main (int argc, char *argv[])
     {
       is_udp = GNUNET_YES;
     }
+  else if (strstr(argv[0], "unix") != NULL)
+    {
+      is_unix = GNUNET_YES;
+    }
   else if (strstr(argv[0], "https") != NULL)
     {
       is_https = GNUNET_YES;