---
name: "radcli_request_perform"
section: "3"
platform: "linux"
package: "radcli"
version: "2.0.1-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/radcli_request_perform"
---

# radcli\_request\_perform(3)

Send a request, optionally waiting for the reply.

## NAME

radcli\_request\_perform - Send a request, optionally waiting for the reply.

## SYNOPSIS

```
#include <radcli/>

int radcli_request_perform(
    radcli_request  *r,
    unsigned         flags
);
```

## DESCRIPTION

By default (flags == RADCLI\_REQUEST\_NONE), sends r and waits for the reply. With RADCLI\_REQUEST\_SENDONLY, transmits r a single time and returns once the packet is handed to the network, without blocking for a reply  either as a pure fire-and-forget notification whose outcome the caller does not act on (call radcli\_request\_free() without ever calling radcli\_ctx\_dispatch(); radcli.h's rc\_acct\_async() is the equivalent call in the legacy API), or to read the reply later via radcli\_request\_done(), driven by the caller's own radcli\_ctx\_get\_poll()/radcli\_ctx\_dispatch() loop (lib/dae.c).

May be called only once per request; construct a new radcli\_request for a retransmission with different content.

## PARAMETERS

- **r**

  a request from radcli\_request\_new().

- **flags**

  a bitwise OR of radcli\_request\_flags.

## RETURN VALUE

with RADCLI\_REQUEST\_NONE: RADCLI\_OK if a validated reply was received (see radcli\_request\_code() for which one), RADCLI\_TIMEOUT if none of the server's addresses replied, or RADCLI\_ERROR on failure. With RADCLI\_REQUEST\_SENDONLY: RADCLI\_OK once the packet is handed to the network, RADCLI\_ERROR on failure (e.g. name resolution or encoding failed); never RADCLI\_TIMEOUT.

## SEE ALSO

[*radcli\_aaa*(3)](/radcli_aaa/3.md), [*radcli\_request\_attrs*(3)](/radcli_request_attrs/3.md), [*radcli\_request\_code*(3)](/radcli_request_code/3.md), [*radcli\_request\_done*(3)](/radcli_request_done/3.md), [*radcli\_request\_free*(3)](/radcli_request_free/3.md), [*radcli\_request\_new*(3)](/radcli_request_new/3.md), [*radcli\_request\_server*(3)](/radcli_request_server/3.md)
