aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/transport/perf_unix_peer1.conf53
-rw-r--r--src/transport/perf_unix_peer2.conf57
-rw-r--r--src/transport/plugin_transport_unix.c11
3 files changed, 113 insertions, 8 deletions
diff --git a/src/transport/perf_unix_peer1.conf b/src/transport/perf_unix_peer1.conf
new file mode 100644
index 000000000..297ae4cbc
--- /dev/null
+++ b/src/transport/perf_unix_peer1.conf
@@ -0,0 +1,53 @@
1@INLINE@ template_cfg_peer1.conf
2[PATHS]
3GNUNET_TEST_HOME = /tmp/test-transport/api-tcp-p1/
4
5[transport]
6PORT = 12001
7UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-p1-service-transport.sock
8PLUGINS = unix
9
10[transport-unix]
11UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-p1-unix.sock
12
13[arm]
14PORT = 12005
15DEFAULTSERVICES = transport hostlist
16UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-p1-service-arm.sock
17
18[statistics]
19PORT = 12004
20UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-p1-service-statistics.sock
21
22[resolver]
23PORT = 12003
24UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-p1-service-resolver.sock
25
26[peerinfo]
27PORT = 12002
28UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-p1-service-peerinfo.sock
29
30[hostlist]
31OPTIONS = -b
32SERVERS = http://localhost:9080/
33
34[ats]
35# Network specific inbound/outbound quotas
36UNSPECIFIED_QUOTA_IN = unlimited
37UNSPECIFIED_QUOTA_OUT = unlimited
38# LOOPBACK
39LOOPBACK_QUOTA_IN = unlimited
40LOOPBACK_QUOTA_OUT = unlimited
41# LAN
42LAN_QUOTA_IN = unlimited
43LAN_QUOTA_OUT = unlimited
44# WAN
45WAN_QUOTA_IN = unlimited
46WAN_QUOTA_OUT = unlimited
47# WLAN
48WLAN_QUOTA_IN = unlimited
49WLAN_QUOTA_OUT = unlimited
50# BLUETOOTH
51BLUETOOTH_QUOTA_IN = unlimited
52BLUETOOTH_QUOTA_OUT = unlimited
53# ATS options
diff --git a/src/transport/perf_unix_peer2.conf b/src/transport/perf_unix_peer2.conf
new file mode 100644
index 000000000..587b47b68
--- /dev/null
+++ b/src/transport/perf_unix_peer2.conf
@@ -0,0 +1,57 @@
1@INLINE@ template_cfg_peer2.conf
2[PATHS]
3GNUNET_TEST_HOME = /tmp/test-transport/api-tcp-p2/
4
5[transport]
6PORT = 12010
7PLUGINS = unix
8UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-p2-service-transport.sock
9
10
11[transport-unix]
12UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-p2-unix.sock
13
14[arm]
15PORT = 12014
16DEFAULTSERVICES = transport hostlist
17UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-p2-service-arm.sock
18
19[statistics]
20PORT = 12013
21UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-p2-service-statistics.sock
22
23[resolver]
24PORT = 12012
25UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-p2-service-resolver.sock
26
27[peerinfo]
28PORT = 12011
29UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-p2-service-peerinfo.sock
30
31[hostlist]
32HTTPPORT = 9080
33OPTIONS = -p
34BINDTOIPV4 = YES
35BINDTOIP = 127.0.0.1
36
37[ats]
38# Network specific inbound/outbound quotas
39UNSPECIFIED_QUOTA_IN = unlimited
40UNSPECIFIED_QUOTA_OUT = unlimited
41# LOOPBACK
42LOOPBACK_QUOTA_IN = unlimited
43LOOPBACK_QUOTA_OUT = unlimited
44# LAN
45LAN_QUOTA_IN = unlimited
46LAN_QUOTA_OUT = unlimited
47# WAN
48WAN_QUOTA_IN = unlimited
49WAN_QUOTA_OUT = unlimited
50# WLAN
51WLAN_QUOTA_IN = unlimited
52WLAN_QUOTA_OUT = unlimited
53# BLUETOOTH
54BLUETOOTH_QUOTA_IN = unlimited
55BLUETOOTH_QUOTA_OUT = unlimited
56# ATS options
57
diff --git a/src/transport/plugin_transport_unix.c b/src/transport/plugin_transport_unix.c
index 947ec5d71..8a0aa72a0 100644
--- a/src/transport/plugin_transport_unix.c
+++ b/src/transport/plugin_transport_unix.c
@@ -243,13 +243,6 @@ struct UNIX_Sock_Info
243 * The network handle 243 * The network handle
244 */ 244 */
245 struct GNUNET_NETWORK_Handle *desc; 245 struct GNUNET_NETWORK_Handle *desc;
246
247 /**
248 * The port we bound to (not an actual PORT, as UNIX domain sockets
249 * don't have ports, but rather a number in the path name to make this
250 * one unique).
251 */
252 uint16_t port;
253}; 246};
254 247
255 248
@@ -300,7 +293,7 @@ struct Plugin
300 struct UNIXMessageWrapper *msg_tail; 293 struct UNIXMessageWrapper *msg_tail;
301 294
302 /** 295 /**
303 * Path of our unix domain socket (/tmp/unix-plugin-PORT) 296 * Path of our unix domain socket (/tmp/unix-plugin)
304 */ 297 */
305 char *unix_socket_path; 298 char *unix_socket_path;
306 299
@@ -1420,6 +1413,8 @@ unix_transport_server_start (void *cls)
1420 (const struct sockaddr *) un, un_len)) 1413 (const struct sockaddr *) un, un_len))
1421 { 1414 {
1422 GNUNET_log_strerror (GNUNET_ERROR_TYPE_ERROR, "bind"); 1415 GNUNET_log_strerror (GNUNET_ERROR_TYPE_ERROR, "bind");
1416 LOG (GNUNET_ERROR_TYPE_ERROR, _("Cannot bind to `%s'\n"),
1417 un->sun_path);
1423 GNUNET_NETWORK_socket_close (plugin->unix_sock.desc); 1418 GNUNET_NETWORK_socket_close (plugin->unix_sock.desc);
1424 plugin->unix_sock.desc = NULL; 1419 plugin->unix_sock.desc = NULL;
1425 GNUNET_free (un); 1420 GNUNET_free (un);