Skip to content
Commit 54e6f97b authored by Lennart Poettering's avatar Lennart Poettering
Browse files

local-addresses: add helper for determining local "outbound" IP addresses

This adds a small helper, similar in style to local_addresses() and
local_gateways() that determines the local "outbound" addresses.

What's an "outbound" address supposed to be? The local IP addresses that
are the most likely used for outbound communication. It's determined
by using connect() towards the default gws on an UDP socket, and then
reading the address of the socket this caused it to be bound to.

This is not the "public" or "external" IP address of the local system,
and is not supposed to be. It's just the local IP addresses that are
likely the ones going to be used by the local IP stack for
communication with other hosts.
parent ce0cedac
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment