diff options
Diffstat (limited to 'src/transport')
-rw-r--r-- | src/transport/perf_unix_peer1.conf | 53 | ||||
-rw-r--r-- | src/transport/perf_unix_peer2.conf | 57 | ||||
-rw-r--r-- | src/transport/plugin_transport_unix.c | 11 |
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] | ||
3 | GNUNET_TEST_HOME = /tmp/test-transport/api-tcp-p1/ | ||
4 | |||
5 | [transport] | ||
6 | PORT = 12001 | ||
7 | UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-p1-service-transport.sock | ||
8 | PLUGINS = unix | ||
9 | |||
10 | [transport-unix] | ||
11 | UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-p1-unix.sock | ||
12 | |||
13 | [arm] | ||
14 | PORT = 12005 | ||
15 | DEFAULTSERVICES = transport hostlist | ||
16 | UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-p1-service-arm.sock | ||
17 | |||
18 | [statistics] | ||
19 | PORT = 12004 | ||
20 | UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-p1-service-statistics.sock | ||
21 | |||
22 | [resolver] | ||
23 | PORT = 12003 | ||
24 | UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-p1-service-resolver.sock | ||
25 | |||
26 | [peerinfo] | ||
27 | PORT = 12002 | ||
28 | UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-p1-service-peerinfo.sock | ||
29 | |||
30 | [hostlist] | ||
31 | OPTIONS = -b | ||
32 | SERVERS = http://localhost:9080/ | ||
33 | |||
34 | [ats] | ||
35 | # Network specific inbound/outbound quotas | ||
36 | UNSPECIFIED_QUOTA_IN = unlimited | ||
37 | UNSPECIFIED_QUOTA_OUT = unlimited | ||
38 | # LOOPBACK | ||
39 | LOOPBACK_QUOTA_IN = unlimited | ||
40 | LOOPBACK_QUOTA_OUT = unlimited | ||
41 | # LAN | ||
42 | LAN_QUOTA_IN = unlimited | ||
43 | LAN_QUOTA_OUT = unlimited | ||
44 | # WAN | ||
45 | WAN_QUOTA_IN = unlimited | ||
46 | WAN_QUOTA_OUT = unlimited | ||
47 | # WLAN | ||
48 | WLAN_QUOTA_IN = unlimited | ||
49 | WLAN_QUOTA_OUT = unlimited | ||
50 | # BLUETOOTH | ||
51 | BLUETOOTH_QUOTA_IN = unlimited | ||
52 | BLUETOOTH_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] | ||
3 | GNUNET_TEST_HOME = /tmp/test-transport/api-tcp-p2/ | ||
4 | |||
5 | [transport] | ||
6 | PORT = 12010 | ||
7 | PLUGINS = unix | ||
8 | UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-p2-service-transport.sock | ||
9 | |||
10 | |||
11 | [transport-unix] | ||
12 | UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-p2-unix.sock | ||
13 | |||
14 | [arm] | ||
15 | PORT = 12014 | ||
16 | DEFAULTSERVICES = transport hostlist | ||
17 | UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-p2-service-arm.sock | ||
18 | |||
19 | [statistics] | ||
20 | PORT = 12013 | ||
21 | UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-p2-service-statistics.sock | ||
22 | |||
23 | [resolver] | ||
24 | PORT = 12012 | ||
25 | UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-p2-service-resolver.sock | ||
26 | |||
27 | [peerinfo] | ||
28 | PORT = 12011 | ||
29 | UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-p2-service-peerinfo.sock | ||
30 | |||
31 | [hostlist] | ||
32 | HTTPPORT = 9080 | ||
33 | OPTIONS = -p | ||
34 | BINDTOIPV4 = YES | ||
35 | BINDTOIP = 127.0.0.1 | ||
36 | |||
37 | [ats] | ||
38 | # Network specific inbound/outbound quotas | ||
39 | UNSPECIFIED_QUOTA_IN = unlimited | ||
40 | UNSPECIFIED_QUOTA_OUT = unlimited | ||
41 | # LOOPBACK | ||
42 | LOOPBACK_QUOTA_IN = unlimited | ||
43 | LOOPBACK_QUOTA_OUT = unlimited | ||
44 | # LAN | ||
45 | LAN_QUOTA_IN = unlimited | ||
46 | LAN_QUOTA_OUT = unlimited | ||
47 | # WAN | ||
48 | WAN_QUOTA_IN = unlimited | ||
49 | WAN_QUOTA_OUT = unlimited | ||
50 | # WLAN | ||
51 | WLAN_QUOTA_IN = unlimited | ||
52 | WLAN_QUOTA_OUT = unlimited | ||
53 | # BLUETOOTH | ||
54 | BLUETOOTH_QUOTA_IN = unlimited | ||
55 | BLUETOOTH_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); |