I'm trying to get all of the current ip addresses for the peers connected to my node. A bit similar to what bitnodes is doing. I can't figure out if there is an API call to be sent from the bitcoind client which returns a list of addresses.
I've read about the getaddr
message but have no idea how to send it to the node's peers.
You can use the getpeerinfo command, Returns data about each connected node.