wiki:ServerAddress

Version 7 (modified by ph3-der-loewe, 12 years ago) (diff)

+ToC

Server Address

The server address is the address the client uses to connect to the server. Depending on the used transport the address format is different.In common cases server auto locating is used and the server address is not given explicitly by the user. This page describes the format of the server address and how the auto locating works.

Address syntax

The syntax depends on the used transport. Some implementations do not support all transports. See NetworkMatrix for details on support of transports by implementations.

Type Syntax Defaults Notes
UNIX /path/to/socket ~/.roar, /tmp/roar Used if filename is a socket
DECnet node::obj, node::, ::obj, :: node: localnode, object: roar (none)
IPv4 hostname:port, hostname, ip:port, ip host: localhost, port: 16002 Usage of hostnames is recommended.
IPv6 hostname:port, hostname host: localhost, port: 16002 IPv6 addresses are not supported. Hostnames must be used.
Chardev /path/to/dev (none) Used if filename is a char device
Special +type (none) See list below

Special addresses

The following special addresses are assigned at the moment:

Address Supported by Description
+fork libroar Fork a new server process only bound to this client.
+slp libroar Use OpenSLP to locate the server.
+abstract libroar Address in abstract name space.
+invalid libroar An invalid address. This is to be used for testing.

More special addresses may be added later.

Auto locating of servers

To find a server the client (library) tries several locations. The table below lists the recommended steps to locate the server. Implementations may behave differently.

When a step do not result in a valid address the next step is processed. The column "Continue when failed" indicates if the next step is also processed when the step resulted in a valid server address but the server was unreachable.

# Step Continue Supported by Description
when failed libroar µRoar
0 Server given by application/user No Yes Yes This is the address given directly to the open function
1 Server given by application default No Yes No This address is the application's default
2 $ROAR_SERVER No Yes Yes Server address given by environment
3 Server in Display's ROAR_SERVER-prop No Yes No Server set in X11 servers ROAR_SERVER property or similar for other windowing environments
4 /etc/roarserver No Yes Yes This is a symlink to the server address. It is ready with readlink().
5 Server: ~/.roar Yes Yes Yes
6 Server: /tmp/roar Yes Yes Yes
7 Server: localhost:roar Yes Yes Yes
8 Server: localnode::roar Yes Yes No
9 Server: +abstract Yes Yes No
10 OpenSLP (with cache) Yes Yes No Locate a server using OpenSLP. Local cache enabled.
11 OpenSLP (without cache) Yes Yes No Locate a server using OpenSLP. Local cache disabled to force fresh lookup.
-- Retries some of the above Yes Yes -- This is specific to libroar
12 Client address from SSH environment Yes Yes No This the first part of $SSH_CLIENT and $SSH_CONNECTION
-- Retries some of the above Yes Yes -- This is specific to libroar
-- Server: /tmp/muroard Yes Yes -- This is specific to libroar
13 Try all DECnet neighbours Yes Yes No
14 Try all IP neighbours Yes Yes No IP neighborhood table is also known as ARP table
15 All Nodes in local node database Yes No No On GNU/Linux this file is /etc/decnet.conf
16 All Hosts in local host database Yes No No On most this file is /etc/hosts
17 All Nodes in local ether database Yes No No On most this file is /etc/ethers