---
name: "rpc_localaddr"
section: "9"
platform: "linux"
package: "linux-manual-4.9"
version: "4.9.228-1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/rpc_localaddr"
---

# rpc\_localaddr(9)

discover local endpoint address for an RPC client

## NAME

rpc\_localaddr - discover local endpoint address for an RPC client

## SYNOPSIS

**int rpc\_localaddr(struct rpc\_clnt \*** *clnt***, struct sockaddr \*** *buf***, size\_t** *buflen***);**

## ARGUMENTS

*clnt*

RPC client structure

*buf*

target buffer

*buflen*

size of target buffer, in bytes

## 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.

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.

## COPYRIGHT
