mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-17 19:03:42 +01:00
wireaddr: remove FQDN_ADDRLEN in favor of LARGEST_ADDRLEN.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
c1e0a4d572
commit
7d95dbbd0a
@ -108,7 +108,7 @@ bool fromwire_wireaddr_internal(const u8 **cursor, size_t *max,
|
||||
|
||||
char *fmt_wireaddr(const tal_t *ctx, const struct wireaddr *a)
|
||||
{
|
||||
char addrstr[FQDN_ADDRLEN];
|
||||
char addrstr[LARGEST_ADDRLEN];
|
||||
char *ret, *hex;
|
||||
|
||||
switch (a->type) {
|
||||
@ -212,7 +212,7 @@ REGISTER_TYPE_TO_STRING(wireaddr_internal, fmt_wireaddr_internal);
|
||||
|
||||
char *fmt_wireaddr_without_port(const tal_t * ctx, const struct wireaddr *a)
|
||||
{
|
||||
char addrstr[FQDN_ADDRLEN];
|
||||
char addrstr[LARGEST_ADDRLEN];
|
||||
char *ret, *hex;
|
||||
|
||||
switch (a->type) {
|
||||
|
@ -33,7 +33,7 @@ struct sockaddr_un;
|
||||
|
||||
#define TOR_V2_ADDRLEN 12
|
||||
#define TOR_V3_ADDRLEN 37
|
||||
#define FQDN_ADDRLEN 255
|
||||
#define LARGEST_ADDRLEN 37
|
||||
|
||||
enum wire_addr_type {
|
||||
ADDR_TYPE_PADDING = 0,
|
||||
@ -47,7 +47,7 @@ enum wire_addr_type {
|
||||
struct wireaddr {
|
||||
enum wire_addr_type type;
|
||||
u8 addrlen;
|
||||
u8 addr[TOR_V3_ADDRLEN]; //or FQDN_ADDRLEN ?
|
||||
u8 addr[LARGEST_ADDRLEN];
|
||||
u16 port;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user