]> git.meshlink.io Git - meshlink/commit
Determine the local node's address(es) and add them to its host config file.
authorGuus Sliepen <guus@meshlink.io>
Tue, 13 Oct 2015 12:14:08 +0000 (14:14 +0200)
committerGuus Sliepen <guus@meshlink.io>
Sun, 25 Jun 2017 08:20:32 +0000 (10:20 +0200)
commitff72e68fcde755cddd425599c83dc052aeff6efb
tree2b42bfeff2d8e6fd9b17491700c3dce86d4568eb
parent9bc18d95a44be1eea1b39b16e6a6916355b9db08
Determine the local node's address(es) and add them to its host config file.

Use the "UDP connect() to an external IP address" trick to determine the
local node's addresses in a platform independent way, without sending any
actual packets. Do this at meshlink_open() time, so the application has
immediate access to them when calling meshlink_export().
src/meshlink.c