What is [::]:0 address in bitcoin debug.log?

3

I am trying to run and connect multiple nodes on a single machine, i.e different nodes using different ports. I am having trouble in connecting the nodes and making them talk to each other. While debugging, I inserted a LogPrintf("%s\n",addr) in the while loop of ThreadOpenConnections() in net.cpp file.

The output in the debug.log file is always [::]:0. What does this address mean ? Is it for localhost representation or something else ?

bawejakunal

Posted 2015-10-23T03:48:17.677

Reputation: 467

Answers

1

[::] is IPv6's version of localhost (0.0.0.0).

Geremia

Posted 2015-10-23T03:48:17.677

Reputation: 3 665

[::] or [::0] is 'unspecified', equivalent to v4 INADDR_ANY = 0.0.0.0; [::1] is the equivalent of INADDR_LOOPBACK = 127.0.0.1. See https://en.wikipedia.org/wiki/IPv6_address#Special_addressesdave_thompson_085 2015-10-26T09:36:43.460

@dave_thompson_085 thanks for the correction. [::]:0 must then mean 0.0.0.0, port 0.Geremia 2015-10-26T12:03:40.917