bproc_masteraddr -- return the address of the master node


#include <sys/bproc.h>

int bproc_masteraddr( struct sockaddr * addr, int * size );


bproc_masteraddr 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 the master node may have multiple addresses if it is listening on multiple interfaces. If this is the case, bproc_masteraddr will return the first address if called from the front end. If called from a slave node, it will return the address of the interface that that node is connected to.

Return Value

On success, bproc_masteraddr will return 0. On error, it will return -1 and errno will be set appropriately.



The BProc system is not running.

See Also

bproc_nodeaddr(2), bproc_nodenumber(2)