1. NAME

rpc_localaddr - discover local endpoint address for an RPC client

2. SYNOPSIS

int rpc_localaddr(struct rpc_clnt *  clnt , struct sockaddr *  buf , size_t  buflen );

3. ARGUMENTS

clnt
    RPC client structure

buf
    target buffer

buflen
    size of target buffer, in bytes

4. DESCRIPTION

Returns zero and fills in « buf » and « buflen » if successful; otherwise, a negative errno is returned.

This works even if the underlying transport is not currently connected, or if the upper layer never previously provided a source address.

5. THE RESULT OF THIS FUNCTION CALL IS TRANSIENT

multiple calls in succession may give different results, depending on how local networking configuration changes over time.

6. COPYRIGHT