]> git.meshlink.io Git - meshlink/log
meshlink
5 years agoAdd support for opening a MeshLink instance without permanent storage. encrypted-storage
Guus Sliepen [Wed, 19 Dec 2018 20:26:36 +0000 (21:26 +0100)]
Add support for opening a MeshLink instance without permanent storage.

5 years agoAdd missing declaration of chacha_ivsetup_96().
Guus Sliepen [Wed, 19 Dec 2018 20:24:25 +0000 (21:24 +0100)]
Add missing declaration of chacha_ivsetup_96().

5 years agoAdd support for encrypted storage.
Guus Sliepen [Fri, 14 Dec 2018 21:21:17 +0000 (22:21 +0100)]
Add support for encrypted storage.

This is a large overhaul of how configuration files are handled. All files
are now in PackMessage format, and are read from disk in to memory in one
go, and also saved to disk from memory in one go, using functions in conf.c.

5 years agoAdd the PackMessage library.
Guus Sliepen [Mon, 17 Dec 2018 02:12:55 +0000 (03:12 +0100)]
Add the PackMessage library.

5 years agoReduce locking in Catta callback functions to a minimum.
Guus Sliepen [Mon, 17 Dec 2018 02:14:45 +0000 (03:14 +0100)]
Reduce locking in Catta callback functions to a minimum.

5 years agoCode formatting.
Guus Sliepen [Tue, 20 Nov 2018 15:21:58 +0000 (16:21 +0100)]
Code formatting.

5 years agoFix indentation.
Guus Sliepen [Tue, 20 Nov 2018 15:12:45 +0000 (16:12 +0100)]
Fix indentation.

5 years agoFix discovering node addresses from edges.
Guus Sliepen [Tue, 20 Nov 2018 15:10:17 +0000 (16:10 +0100)]
Fix discovering node addresses from edges.

The logic always skipped the first unique address found via edges, and since
in most cases there is only one such address, this would skip them altogether.

5 years agoSimplify rate limiting of incoming connections.
Guus Sliepen [Tue, 20 Nov 2018 15:07:44 +0000 (16:07 +0100)]
Simplify rate limiting of incoming connections.

We now really allow max_connection_burst connections per second, rather
than only allowing one second per connection on average, but allowing
a burst of max_connection_burst connections to go through.

5 years agoFix a potential segfault.
Guus Sliepen [Tue, 20 Nov 2018 15:01:12 +0000 (16:01 +0100)]
Fix a potential segfault.

This was found by Lakshminarayana Gurram.

5 years agoRemove debug messages printed to stderr.
Guus Sliepen [Tue, 20 Nov 2018 14:59:34 +0000 (15:59 +0100)]
Remove debug messages printed to stderr.

5 years agoFix socket leak every time meshlink_invite() is called.
Guus Sliepen [Tue, 20 Nov 2018 14:58:41 +0000 (15:58 +0100)]
Fix socket leak every time meshlink_invite() is called.

getlocaladdrname() would leak a socket every time it was called, which is
twice for every call to meshlink_invite() using the default flags.

5 years agoTry all CanonicalAddress and Address statements.
Guus Sliepen [Sun, 18 Nov 2018 23:03:27 +0000 (00:03 +0100)]
Try all CanonicalAddress and Address statements.

5 years agoAdd autoconf checks for LXC and cmocka.
Guus Sliepen [Sun, 18 Nov 2018 14:15:13 +0000 (15:15 +0100)]
Add autoconf checks for LXC and cmocka.

If LXC or cmocka are not installed, don't build the blackbox test suite.

5 years agoAdd the blackbox channel connection tests.
Guus Sliepen [Sun, 18 Nov 2018 13:50:08 +0000 (14:50 +0100)]
Add the blackbox channel connection tests.

5 years agoAdd the blackbox container based test suite.
Elear Solutions Dev [Thu, 8 Nov 2018 20:01:10 +0000 (21:01 +0100)]
Add the blackbox container based test suite.

This test suite uses LXC containers to simulate various nodes connected
to each other in different network topologies, and allows for realistic
testing of the MeshLink library.

5 years agoReally add both local and external address to the invitation URL.
Guus Sliepen [Tue, 9 Oct 2018 21:27:05 +0000 (23:27 +0200)]
Really add both local and external address to the invitation URL.

Also make sure we add both IPv4 and IPv6 if possible, use numeric addresses
unless hostnames resolve back to the same numeric address.

Add meshlink_invite_ex() that takes a flag that makes URL generation more
configurable.

5 years agoReformat the code.
Guus Sliepen [Tue, 9 Oct 2018 14:08:20 +0000 (16:08 +0200)]
Reformat the code.

5 years agoAdd an example using curses to monitor the state of MeshLink.
Guus Sliepen [Tue, 9 Oct 2018 14:06:50 +0000 (16:06 +0200)]
Add an example using curses to monitor the state of MeshLink.

5 years agoLock meshlink.conf to ensure only one instance can run at a time.
Guus Sliepen [Tue, 9 Oct 2018 12:06:04 +0000 (14:06 +0200)]
Lock meshlink.conf to ensure only one instance can run at a time.

5 years agoFix "Connection from (null)" log message.
Guus Sliepen [Thu, 30 Aug 2018 17:52:18 +0000 (19:52 +0200)]
Fix "Connection from (null)" log message.

5 years agoAlways add both CanonicalAddress and any local address to the invitation URL.
Guus Sliepen [Thu, 30 Aug 2018 17:45:13 +0000 (19:45 +0200)]
Always add both CanonicalAddress and any local address to the invitation URL.

We don't know in advance if the invitee will be on the LAN or outside
the LAN, and because hairpin routing is not working on many home
routers, it is safer to add all possible addresses.

Also, add the port number to each individual address in the URL, instead
of allowing only one port number.

5 years agoAdd missing code for the duplicate node testcase.
Guus Sliepen [Thu, 30 Aug 2018 17:44:08 +0000 (19:44 +0200)]
Add missing code for the duplicate node testcase.

5 years agoAdd duplicate node detection callback.
Guus Sliepen [Sun, 12 Aug 2018 15:09:20 +0000 (17:09 +0200)]
Add duplicate node detection callback.

MeshLink can detect if two nodes are online simultaneously using the same
Name. Normally, one or both of the duplicate nodes will terminate its
connection. Now there is a duplicate node callback that will be called when
the local node detects a duplicate node. One use for this is to blacklist
the duplicate node and/or notify the user of the problem.

5 years agoRemove the -fPIE and -pie compiler flags.
Guus Sliepen [Tue, 7 Aug 2018 18:43:19 +0000 (20:43 +0200)]
Remove the -fPIE and -pie compiler flags.

Since we are building a library, these flags shouldn't be used. They
appear to cause problems when linking libmeshlink into another shared
library.

5 years agoUpdate UTCP to allow meshlink_channel_send() immediately.
Guus Sliepen [Sun, 22 Jul 2018 11:32:01 +0000 (13:32 +0200)]
Update UTCP to allow meshlink_channel_send() immediately.

5 years agoAllow compiling without support for Catta.
Guus Sliepen [Sat, 21 Jul 2018 15:52:07 +0000 (17:52 +0200)]
Allow compiling without support for Catta.

Configuring with --disable-catta will cause MeshLink to not be linked to
the Catta library, and local discovery will not be available.

5 years agoAdd COPYING.README, detailing license obligations for users of MeshLink.
Guus Sliepen [Sat, 21 Jul 2018 15:10:35 +0000 (17:10 +0200)]
Add COPYING.README, detailing license obligations for users of MeshLink.

MeshLink itself depends on other libraries, and this document mainly
summarizes what obligations users of the MeshLink library have when they
distribute their software in binary form.

5 years agoPass appname in the ID string during invitations as well.
Guus Sliepen [Sun, 15 Jul 2018 09:19:19 +0000 (11:19 +0200)]
Pass appname in the ID string during invitations as well.

5 years agoPass appname in the ID string.
Guus Sliepen [Tue, 3 Jul 2018 18:21:40 +0000 (20:21 +0200)]
Pass appname in the ID string.

This is completely ignored by MeshLink itself at the moment, but is just
a hint to any proxy/relay.

5 years agoRemove old host config files when joining using an invitation.
Guus Sliepen [Tue, 26 Jun 2018 15:10:53 +0000 (17:10 +0200)]
Remove old host config files when joining using an invitation.

5 years agoAdd meshlink_set_invitation_timeout().
Guus Sliepen [Tue, 26 Jun 2018 14:42:57 +0000 (16:42 +0200)]
Add meshlink_set_invitation_timeout().

This sets a global timeout for invitation files. If a node tries to join
with an invitation whose file is older than the timeout, the invitation is
rejected.

5 years agoFix a compiler warning.
Guus Sliepen [Tue, 26 Jun 2018 14:33:29 +0000 (16:33 +0200)]
Fix a compiler warning.

5 years agoAdd meshlink_set_canonical_address().
Guus Sliepen [Tue, 26 Jun 2018 14:12:28 +0000 (16:12 +0200)]
Add meshlink_set_canonical_address().

This introduces the concept of a canonical address for a node, which is
its "official" address/port. It is only set manually, and never updated
or removed when other addresses have been discovered for this node.

Also, this changed meshlink_add_address(mesh, address) to be equivalent to
meshlink_set_canonical_address(mesh, meshlink_get_self(mesh), address, NULL).
While not strictly equivalent to the old behaviour, it matches the
documented intent of this function.

5 years agoFix valgrind warnings about reading uninitialized bytes.
Guus Sliepen [Tue, 26 Jun 2018 14:09:54 +0000 (16:09 +0200)]
Fix valgrind warnings about reading uninitialized bytes.

This is caused by memcpy()ing sockaddr_t structs that have only been
partially written to.

5 years agoUpdate .gitignore files.
Guus Sliepen [Tue, 26 Jun 2018 14:07:35 +0000 (16:07 +0200)]
Update .gitignore files.

5 years agoFix a potential segfault when closing a stopped meshlink handle.
Guus Sliepen [Tue, 26 Jun 2018 12:23:04 +0000 (14:23 +0200)]
Fix a potential segfault when closing a stopped meshlink handle.

If meshlink_stop() was called before meshlink_close(), the latter would
cause pthread_join() being called on a thread that was already joined.

5 years agoFix a potential segfault when closing a meshlink handle.
Guus Sliepen [Tue, 26 Jun 2018 12:20:17 +0000 (14:20 +0200)]
Fix a potential segfault when closing a meshlink handle.

Freeing the UTCP instance of a node would result in meshlink_send() being
called on a node that was already partially freed.

5 years agoDon't allow any unused variables in invitation files.
Guus Sliepen [Thu, 21 Jun 2018 13:26:10 +0000 (15:26 +0200)]
Don't allow any unused variables in invitation files.

5 years agoCode reformatting.
Guus Sliepen [Tue, 5 Jun 2018 18:33:08 +0000 (20:33 +0200)]
Code reformatting.

5 years agoFix a potential NULL-pointer dereference when generating invitations.
Guus Sliepen [Tue, 5 Jun 2018 18:31:04 +0000 (20:31 +0200)]
Fix a potential NULL-pointer dereference when generating invitations.

Closes #47 on GitHub.

5 years agoUse getsockname() to get a listening sockets actual address in meshlink_stop().
Guus Sliepen [Mon, 21 May 2018 20:03:47 +0000 (22:03 +0200)]
Use getsockname() to get a listening sockets actual address in meshlink_stop().

This should be better than sending a packet to the listening address,
which might be a link-local address for which a valid scope-id is
necessary, and which might not be in listen_socket.sa.

5 years agoEnsure -export-symbols-regex is not lost.
Guus Sliepen [Tue, 8 May 2018 15:05:00 +0000 (17:05 +0200)]
Ensure -export-symbols-regex is not lost.

An earlier commit accidentily caused libmeshlink_la_LDFLAGS to be
overwritten later in src/Makefile.am, and this caused
-export-symbols-regex to be dropped, thereby exposing internal symbols
of the library.

5 years agoEnable Catta by default, as documented.
Guus Sliepen [Sun, 6 May 2018 21:08:24 +0000 (23:08 +0200)]
Enable Catta by default, as documented.

5 years agoTry to be smarter generating invitation URLs.
Guus Sliepen [Sun, 6 May 2018 20:46:36 +0000 (22:46 +0200)]
Try to be smarter generating invitation URLs.

If we have a symbol hostname associated with us, use that. Otherwise, try
to find out which external addresses we have for both IPv4 and IPv6. If we
cannot connect to www.meshlink.io, then use the local address used for
outgoing connections as a fallback. Also, don't forget to add a port number
in all cases.

The generated invitation URL can now contain two addresses in the hostname
part, separated by a comma.

5 years agoAllow multiple addresses in an invitation URL.
Guus Sliepen [Thu, 3 May 2018 20:33:58 +0000 (22:33 +0200)]
Allow multiple addresses in an invitation URL.

This allows the address field in an invitation URL to be a
comma-separated list. The goal is to allow both IPv4 and IPv6 addresses
to be encoded in a single URL.

This commit also ensures that if a hostname is given, that all address
records associated with that hostname are tried.

5 years agoFix all compiler warnings found using -Wall -W -pedantic.
Guus Sliepen [Tue, 1 May 2018 13:24:35 +0000 (15:24 +0200)]
Fix all compiler warnings found using -Wall -W -pedantic.

Using both GCC 8 and Clang 7.

5 years agoCheck the return value of check_port().
Guus Sliepen [Tue, 1 May 2018 12:10:45 +0000 (14:10 +0200)]
Check the return value of check_port().

When initializing a new MeshLink instance, fail if there is no port
available for listening. When starting an already configured instance,
if no Port statement is found in the local node's host config file,
select and add a new one.

5 years agoOnly set -fno-strict-overflow if -fwrapv is not available.
Guus Sliepen [Mon, 30 Apr 2018 19:06:51 +0000 (21:06 +0200)]
Only set -fno-strict-overflow if -fwrapv is not available.

When -fwrapv is set, -fno-strict-overflow has no effect. Clang then
decides to give an obnoxious warning.

5 years agoUse AX_PTHREAD to set the proper pthread flags.
Guus Sliepen [Mon, 30 Apr 2018 19:01:44 +0000 (21:01 +0200)]
Use AX_PTHREAD to set the proper pthread flags.

6 years agoDon't use SOL_IP and SOL_IPV6.
Guus Sliepen [Sat, 16 Dec 2017 21:38:48 +0000 (22:38 +0100)]
Don't use SOL_IP and SOL_IPV6.

These macros do not exist on all platforms, instead one should use
IPPROTO_IP and IPPROTO_IPV6. This fixes a bug on macOS where the
IPV6_V6ONLY flag would not be applied and could result in IPv4 sockets
not working.

6 years agodevtools.h must not rely on internal types.
Guus Sliepen [Thu, 9 Nov 2017 19:13:07 +0000 (20:13 +0100)]
devtools.h must not rely on internal types.

6 years agoProperly initialize mesh->outpacketqueue.
Guus Sliepen [Thu, 9 Nov 2017 19:12:29 +0000 (20:12 +0100)]
Properly initialize mesh->outpacketqueue.

6 years agoAdd a devtool function to query the status of a given node.
Guus Sliepen [Mon, 9 Oct 2017 19:47:52 +0000 (21:47 +0200)]
Add a devtool function to query the status of a given node.

6 years agoRemove PROXY_EXEC support.
Guus Sliepen [Sun, 8 Oct 2017 18:27:30 +0000 (20:27 +0200)]
Remove PROXY_EXEC support.

This calls fork(), which is not desirable from a library.

6 years agoEnsure make distcheck runs without errors.
Guus Sliepen [Sun, 8 Oct 2017 18:22:56 +0000 (20:22 +0200)]
Ensure make distcheck runs without errors.

6 years agoRemove unused/obsolete checks from configure.ac and unused functions from dropin.c.
Guus Sliepen [Sun, 8 Oct 2017 15:11:19 +0000 (17:11 +0200)]
Remove unused/obsolete checks from configure.ac and unused functions from dropin.c.

6 years agoFormat the examples and test suite.
Guus Sliepen [Mon, 2 Oct 2017 21:07:34 +0000 (23:07 +0200)]
Format the examples and test suite.

6 years agoUpdate astylerc and reformat the code.
Guus Sliepen [Mon, 2 Oct 2017 20:58:49 +0000 (22:58 +0200)]
Update astylerc and reformat the code.

Changes:

- Add braces to one-line if/else statements.
- Add empty lines around control blocks.
- Indent multi-line #defines with tabs.

6 years agoFix compiling with -Wall -W.
Guus Sliepen [Mon, 2 Oct 2017 20:25:19 +0000 (22:25 +0200)]
Fix compiling with -Wall -W.

6 years agoAdd an --enable-install-tests option to configure.
Guus Sliepen [Thu, 7 Sep 2017 18:46:52 +0000 (20:46 +0200)]
Add an --enable-install-tests option to configure.

This will enable the installation of the test binaries when running
make install. This feature is intended to make continuous integration
easier.

6 years agoAutomatically configure and compile catta.
Guus Sliepen [Thu, 7 Sep 2017 18:32:04 +0000 (20:32 +0200)]
Automatically configure and compile catta.

6 years agoReally bind to a free port if the configured port is not available.
Guus Sliepen [Wed, 16 Aug 2017 20:10:47 +0000 (22:10 +0200)]
Really bind to a free port if the configured port is not available.

6 years agoMake member variables in public structs more const.
Guus Sliepen [Wed, 16 Aug 2017 17:48:43 +0000 (19:48 +0200)]
Make member variables in public structs more const.

6 years agoCheck that autoconnect works as expected.
Guus Sliepen [Tue, 15 Aug 2017 19:00:44 +0000 (21:00 +0200)]
Check that autoconnect works as expected.

6 years agoMove meshlink_get_all_edges_state() to devtools_get_all_edges().
Guus Sliepen [Tue, 15 Aug 2017 18:59:38 +0000 (20:59 +0200)]
Move meshlink_get_all_edges_state() to devtools_get_all_edges().

There should be no reason for the application to query the list of edges,
so move this functionality to devtools.[ch].

Also, flatten the array to reduce the amount of memory allocations and
bookkeeping necessary.

6 years agoFix errors found by Clang's static analyzer.
Guus Sliepen [Mon, 14 Aug 2017 20:42:14 +0000 (22:42 +0200)]
Fix errors found by Clang's static analyzer.

6 years agoFix compiler warnings.
Guus Sliepen [Mon, 14 Aug 2017 20:31:31 +0000 (22:31 +0200)]
Fix compiler warnings.

6 years agoForce -Wall.
Guus Sliepen [Mon, 14 Aug 2017 20:31:04 +0000 (22:31 +0200)]
Force -Wall.

AM_INIT_AUTOMAKE should ensure -Wall is set, but for some reason it doesn't.
Force it by adding it to AM_CPPFLAGS.

6 years agoRemove unused/duplicate autoconf/automake definitions.
Guus Sliepen [Mon, 14 Aug 2017 20:30:14 +0000 (22:30 +0200)]
Remove unused/duplicate autoconf/automake definitions.

6 years agoGet rid of ->hostname.
Guus Sliepen [Mon, 14 Aug 2017 20:29:06 +0000 (22:29 +0200)]
Get rid of ->hostname.

This takes up memory and is only used for logging.

6 years agoRemember recently used addresses of other nodes.
Guus Sliepen [Mon, 14 Aug 2017 19:24:57 +0000 (21:24 +0200)]
Remember recently used addresses of other nodes.

6 years agoOnly keep at most 5 Address hints.
Guus Sliepen [Mon, 14 Aug 2017 19:23:50 +0000 (21:23 +0200)]
Only keep at most 5 Address hints.

6 years agoClose meta-connections in meshlink_stop().
Guus Sliepen [Mon, 14 Aug 2017 19:22:43 +0000 (21:22 +0200)]
Close meta-connections in meshlink_stop().

If we stop MeshLink for an extended time, we don't want to have open
sockets lying around that we don't take care of. Terminate all of them.

6 years agoAdd a test for a constellation of three nodes.
Guus Sliepen [Mon, 14 Aug 2017 19:19:41 +0000 (21:19 +0200)]
Add a test for a constellation of three nodes.

In particular, test whether two nodes that have been introduced to each
other via a third node can still continue to communicate with each other
when the third node goes offline.

6 years agoDon't install the example programs.
Guus Sliepen [Mon, 14 Aug 2017 17:35:49 +0000 (19:35 +0200)]
Don't install the example programs.

6 years agoDon't build SPTPS test programs.
Guus Sliepen [Mon, 14 Aug 2017 17:29:03 +0000 (19:29 +0200)]
Don't build SPTPS test programs.

6 years agoTest cornercases of MeshLink channels.
Guus Sliepen [Sun, 13 Aug 2017 21:08:56 +0000 (23:08 +0200)]
Test cornercases of MeshLink channels.

- Ensure we can open a channel before starting MeshLink.
- Check that opening channels to a peer that has unregistered its accept
  callback will not result in the poll callback to be called with a non-
  zero length.

6 years agoAdd utility functions to create paired MeshLink instances.
Guus Sliepen [Sun, 13 Aug 2017 21:07:25 +0000 (23:07 +0200)]
Add utility functions to create paired MeshLink instances.

This also adds a start_meshlink_pair() function which starts the two instances
and waits for them to establish a connection with each other. A condition
variable is used to avoid having to poll.

6 years agoDon't accept channels if we set channel_accept_cb to NULL.
Guus Sliepen [Sun, 13 Aug 2017 20:53:23 +0000 (22:53 +0200)]
Don't accept channels if we set channel_accept_cb to NULL.

6 years agoProperly destroy unclosed channels at meshlink_close() time.
Guus Sliepen [Sun, 13 Aug 2017 19:53:55 +0000 (21:53 +0200)]
Properly destroy unclosed channels at meshlink_close() time.

6 years agoReset UTCP timers after a succesful key exchange.
Guus Sliepen [Sun, 13 Aug 2017 15:51:28 +0000 (17:51 +0200)]
Reset UTCP timers after a succesful key exchange.

The problem is that MeshLink does key exchange with peers on-demand. One
has to start a channel for key exchange to be initiated, but it also tries
to send the first SYN packet immediately. This will not work, and then it
has to wait for the retransmit timer to expire before it will try to send
the SYN again. Since the retransmit timer is increased exponentially, this
can potentially take a long time. So when key exchange is finished, we now
force a reset of the timers of all UTCP connections with the peer.

6 years agoEnforce spaces around operators.
Guus Sliepen [Sun, 13 Aug 2017 13:14:27 +0000 (15:14 +0200)]
Enforce spaces around operators.

6 years agoConvert sizeof foo to sizeof(foo).
Guus Sliepen [Sun, 13 Aug 2017 13:06:51 +0000 (15:06 +0200)]
Convert sizeof foo to sizeof(foo).

While technically sizeof is an operator and doesn't need the parentheses
around expressions it operates on, except if they are type names, code
formatters don't seem to handle this very well.

6 years agoRemove hack to wait for a valid key.
Guus Sliepen [Sun, 13 Aug 2017 12:57:29 +0000 (14:57 +0200)]
Remove hack to wait for a valid key.

This was obviously only necessary because the missing retransmits of SYN
packets. Now, if a channel is opened before we have finished the key
exchange with the peer, UTCP will retry after a second.

6 years agoAllow Catta to be disabled.
Guus Sliepen [Sun, 13 Aug 2017 12:53:51 +0000 (14:53 +0200)]
Allow Catta to be disabled.

Normally, we want to enable Catta, however for testing it produces a lot
of unwanted network packets and log messages.

6 years agoDrop dependency on zlib.
Guus Sliepen [Thu, 27 Jul 2017 13:06:17 +0000 (15:06 +0200)]
Drop dependency on zlib.

It's not used, since nothing in the code enables compression. If the
application wants to use compression, it should perform this itself.

6 years agoEnable silent build rules.
Guus Sliepen [Thu, 27 Jul 2017 13:00:55 +0000 (15:00 +0200)]
Enable silent build rules.

6 years agoUpdate all header guards.
Guus Sliepen [Thu, 27 Jul 2017 12:58:13 +0000 (14:58 +0200)]
Update all header guards.

Don't start with underscores, as those are reserved for system
libraries. Make sure all start with MESHLINK_, and that they appear at
the top of the file.

6 years agoAdd an astylerc file and reformat all code.
Guus Sliepen [Thu, 27 Jul 2017 12:26:47 +0000 (14:26 +0200)]
Add an astylerc file and reformat all code.

This allows astyle to be used as a pre-commit hook.

6 years agoRemove avahi submodule.
Guus Sliepen [Thu, 27 Jul 2017 09:38:35 +0000 (11:38 +0200)]
Remove avahi submodule.

6 years agoUse new version of UTCP which also return errors via the poll callback.
Guus Sliepen [Thu, 27 Jul 2017 09:27:58 +0000 (11:27 +0200)]
Use new version of UTCP which also return errors via the poll callback.

6 years agoDon't call abort() when no channel receive callback is set.
Guus Sliepen [Thu, 27 Jul 2017 09:03:09 +0000 (11:03 +0200)]
Don't call abort() when no channel receive callback is set.

6 years agoIf binding to the configured port fails, ask the OS to provide a port.
Guus Sliepen [Thu, 27 Jul 2017 08:50:23 +0000 (10:50 +0200)]
If binding to the configured port fails, ask the OS to provide a port.

This will still allow MeshLink to make outgoing connections to other
nodes.

6 years agoCall srand() at startup.
Guus Sliepen [Thu, 27 Jul 2017 08:38:50 +0000 (10:38 +0200)]
Call srand() at startup.

6 years agoRestart the mesh after a failed join() in the other examples as well.
Guus Sliepen [Thu, 6 Jul 2017 20:08:37 +0000 (22:08 +0200)]
Restart the mesh after a failed join() in the other examples as well.

6 years agoRestart the mesh even after a failed join().
Guus Sliepen [Thu, 6 Jul 2017 20:04:00 +0000 (22:04 +0200)]
Restart the mesh even after a failed join().

6 years agoSet a timeout of 5 seconds on sockets in meshlink_join() and get_external_address().
Guus Sliepen [Thu, 6 Jul 2017 20:00:34 +0000 (22:00 +0200)]
Set a timeout of 5 seconds on sockets in meshlink_join() and get_external_address().

6 years agoDocument that meshlink_join() and meshlink_get_external_address() are blocking.
Guus Sliepen [Thu, 6 Jul 2017 19:59:17 +0000 (21:59 +0200)]
Document that meshlink_join() and meshlink_get_external_address() are blocking.

6 years agoAdd meshlink_channel_open_ex().
Guus Sliepen [Mon, 3 Jul 2017 21:36:45 +0000 (23:36 +0200)]
Add meshlink_channel_open_ex().

This allows flags to be passed to the underlying UTCP connection, which
determines what kind of connection semantics to use.