Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How do I get the entire list of addresses returned by the 'addr' response in bitcoin protocol?

After building the 'getaddr' message from a Bitcoin node, I managed getting the 'addr' response. In it, it contains a list of IP addresses of peer nodes. In some of the addr response, it is possible that one 'addr' response contains multiple IP addresses of peer nodes (I found this by checking the packet in Wireshark). Using pyshark, we can obtain the IP address of 'addr' response using the attribute bitcoin.address_address given that bitcoin.command == 'addr' However using bitcoin.address_address in pyshark only gives me a single IP address out of the entire list of IP addresses. Is there a possible way to retrieve the entire list of IP addresses?

Thank You