core-lightning/gossipd
Rusty Russell fe96fe10c7 Clean up network options.
It's become clear that our network options are insufficient, with the coming
addition of Tor and unix domain support.

Currently:

1. We always bind to local IPv4 and IPv6 sockets, unless --port=0, --offline,
   or any address is specified explicitly.  If they're routable, we announce.
2. --addr is used to announce, but not to control binding.

After this change:

1. --port is deprecated.
2. --addr controls what we bind to and announce.
3. --bind-addr/--announce-addr can be used to control one and not the other.
4. Unless --autolisten=0, we add local IPv4 & IPv6 port 9735 (and announce if they are routable).
5. --offline still overrides listening (though announcing is still the same).

This means we can bind to as many ports/interfaces as we want, and for
special effects we can announce different things (eg. we're sitting
behind a port forward or a proxy).

What remains to implement is semi-automatic binding: we should be able
to say '--addr=0.0.0.0:9999' and have the address resolve at bind
time, or even '--addr=0.0.0.0:0' and have the port autoresolve too
(you could determine what it was from 'lightning-cli getinfo'.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-05-07 22:37:28 +02:00
..
test Avoid static analyzer warnings about potentially uninitialized values 2018-05-01 17:14:33 +02:00
broadcast.c gossipd: make struct queued_message private. 2018-03-14 02:19:37 +00:00
broadcast.h Use expected LIGHTNING_DIR_FILE_H define 2018-03-25 23:54:21 +00:00
gossip.c Clean up network options. 2018-05-07 22:37:28 +02:00
gossip_store.c gossipd: Handle failed lseek(...) 2018-05-06 20:45:10 +02:00
gossip_store.csv gossip_store: Save local_add_channel messages and replay them 2018-04-22 12:50:34 +02:00
gossip_store.h gossip_store: Save local_add_channel messages and replay them 2018-04-22 12:50:34 +02:00
gossip_wire.csv Clean up network options. 2018-05-07 22:37:28 +02:00
handshake.c gossipd: give more distinct errors. 2018-04-26 05:47:57 +00:00
handshake.h Use expected LIGHTNING_DIR_FILE_H define 2018-03-25 23:54:21 +00:00
Makefile common: Moving some bech32 related utilities to bech32_util 2018-04-25 12:34:55 +02:00
routing.c gossip: HalfChans are public if we have an update and the Chan is 2018-05-07 01:10:48 +00:00
routing.h moveonly: Move handle_local_add_channel to routing.h 2018-04-22 12:50:34 +02:00