summaryrefslogtreecommitdiff
path: root/src/transport
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2014-02-07 14:21:26 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2014-02-07 14:21:26 +0000
commite0454193d828a6a96ea662f53666be38f8369a8f (patch)
tree2a5d87d2fb2cc7e8fd20f63767e89274fad150be /src/transport
parentb6955082fe0ef42d79164ecce19c84f74f68d3a0 (diff)
unix domain sockets used hardcoded path instead of configuration setting
- removing UNIX domain sockets port support and UNIX domain socket NAT support
Diffstat (limited to 'src/transport')
-rw-r--r--src/transport/plugin_transport_unix.c32
-rw-r--r--src/transport/transport.conf.in2
2 files changed, 12 insertions, 22 deletions
diff --git a/src/transport/plugin_transport_unix.c b/src/transport/plugin_transport_unix.c
index 9fc4ba735..56e1de426 100644
--- a/src/transport/plugin_transport_unix.c
+++ b/src/transport/plugin_transport_unix.c
@@ -50,13 +50,6 @@
*/
#define HOSTNAME_RESOLVE_TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 5)
-/**
- * Default "port" to use, if configuration does not specify.
- * Essentially just a number appended to the UNIX path.
- */
-#define UNIX_NAT_DEFAULT_PORT 22086
-
-
#define LOG(kind,...) GNUNET_log_from (kind, "transport-unix",__VA_ARGS__)
@@ -316,11 +309,6 @@ struct Plugin
*/
int with_ws;
- /**
- * Integer to append to unix domain socket.
- */
- uint16_t port;
-
};
@@ -1572,7 +1560,6 @@ void *
libgnunet_plugin_transport_unix_init (void *cls)
{
struct GNUNET_TRANSPORT_PluginEnvironment *env = cls;
- unsigned long long port;
struct GNUNET_TRANSPORT_PluginFunctions *api;
struct Plugin *plugin;
int sockets_created;
@@ -1588,16 +1575,19 @@ libgnunet_plugin_transport_unix_init (void *cls)
api->string_to_address = &unix_string_to_address;
return api;
}
- if (GNUNET_OK !=
- GNUNET_CONFIGURATION_get_value_number (env->cfg, "transport-unix", "PORT",
- &port))
- port = UNIX_NAT_DEFAULT_PORT;
+
plugin = GNUNET_new (struct Plugin);
- plugin->port = port;
+ if (GNUNET_OK !=
+ GNUNET_CONFIGURATION_get_value_filename(env->cfg, "transport-unix", "UNIXPATH",
+ &plugin->unix_socket_path))
+ {
+ LOG (GNUNET_ERROR_TYPE_ERROR,
+ _("No UNIXPATH given in configuration!\n"));
+ GNUNET_free (plugin);
+ return NULL;
+ }
+
plugin->env = env;
- GNUNET_asprintf (&plugin->unix_socket_path,
- "/tmp/unix-plugin-sock.%d",
- plugin->port);
/* Initialize my flags */
myoptions = 0;
diff --git a/src/transport/transport.conf.in b/src/transport/transport.conf.in
index 575f4dc20..00807c701 100644
--- a/src/transport/transport.conf.in
+++ b/src/transport/transport.conf.in
@@ -32,7 +32,7 @@ UNIX_MATCH_GID = YES
[transport-unix]
-PORT = 22086
+UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-transport-plugin-unix.sock
TESTING_IGNORE_KEYS = ACCEPT_FROM;
[transport-tcp]