core-lightning/gossipd/netaddress.h
Rusty Russell 73cd009a4c gossipd/lightningd: use wireaddr_internal.
This replacement is a little menial, but it explicitly catches all
the places where we allow a local socket.  The actual implementation of
opening a AF_UNIX socket is almost hidden in the patch.

The detection of "valid address" is now more complex:

	p->addr.itype != ADDR_INTERNAL_WIREADDR || p->addr.u.wireaddr.type != ADDR_TYPE_PADDING

But most places we do this, we should audit: I'm pretty sure we can't
get an invalid address any more from gossipd (they may be in db, but
we should fix that too).

Closes: #1323
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-05-07 22:37:28 +02:00

12 lines
347 B
C

#ifndef LIGHTNING_GOSSIPD_NETADDRESS_H
#define LIGHTNING_GOSSIPD_NETADDRESS_H
#include "config.h"
#include <ccan/short_types/short_types.h>
#include <common/wireaddr.h>
void guess_addresses(struct wireaddr_internal **wireaddrs,
enum addr_listen_announce **listen_announce,
u16 portnum);
#endif /* LIGHTNING_GOSSIPD_NETADDRESS_H */