bproc_nodeaddr places the address of the master node in struct sockaddr pointed to by addr. The size parameter should be intialized to the amount of space pointed to by addr. The mount of space used in addr is returned in size.
Note that nodes may have multiple IP addresses. If the node is up when bproc_nodeaddr is called, it will return the address that that node is currently up at. Otherwise, it will return the last address the node was up at or if it's never been up, the first address.
On success, bproc_nodeaddr will return 0. On error, it will return -1 and errno will be set appropriately.