rc_send_server(3)
π rc_send_server β the "hey server, u up?" function (NAME)
okay bestie, welcome to rc_send_server(3), from the Radius client library β aka radcli. this is the page where your program slides into a RADIUS server's DMs and then sits there, refreshing, waiting for a reply. it's giving desperate but make it protocol. π
β¨ SYNOPSIS β¨
#include <radcli/radcli.h>
int rc_send_server(
rc_handle *rh,
SEND_DATA *data,
char *msg,
rc_type type
);
π¦ DESCRIPTION π¦
so what does it actually do? it sends a request to a RADIUS server and then waits for the reply. that's it. that's the whole vibe. you hand it the goods, it yeets them over, and it waits. patiently. like a bestie holding your bag while you try on jeans. π«Ά
π PARAMETERS π
rhβ a handle to your parsed configuration. it's the receipts from all your setup, basically.dataβ a pointer to aSEND_DATAstructure. yes, the struct gets its own section, keep scrolling boo.msgβ must be an array ofPW_MAX_MSG_SIZEorNULL; will contain the concatenation of anyPW_REPLY_MESSAGEreceived. so if the server leaves you a lil note, this is where it gets stapled together. πtypeβ must beAUTHorACCT. those are the only two options, no third door, no secret menu. periodt.
π§ STRUCTURES π§
here's the whole thing, exactly as it lives, no edits no notes:
struct send_data {
uint8_t code; // RADIUS packet code.
uint8_t seq_nbr; // Packet sequence number.
char *server; // Name/address of RADIUS server.
int svc_port; // RADIUS protocol destination port.
char *secret; // Shared secret of RADIUS server.
int timeout; // Session timeout in seconds.
int retries;
VALUE_PAIR *send_pairs; // More a/v pairs to send.
VALUE_PAIR *receive_pairs; // Where to place received a/v pairs.
};
look at all those fields. send_pairs is what you're saying, receive_pairs is where the server's response lands, and retries is literally just "how many times are we gonna try this before we accept it's not happening." π iconic behavior tbh.
π RETURN VALUE π
here's the report card:
OK_RC(0) on success β slay, we ate. π₯TIMEOUT_RCon timeout β the server left you on read. πREJECT_RCon access reject β it said no, and it meant no.- negative on failure as return value β something went sideways, negative numbers are the universal "nah."
not me getting a negative return and having to cope π
π SEE ALSO π
the whole friend group, alphabetized like the little overachievers they are:
radcli.h(3), rc_aaa(3), rc_aaa_ctx(3), rc_aaa_ctx_free(3), rc_aaa_ctx_get_secret(3), rc_aaa_ctx_get_vector(3), rc_aaa_ctx_server(3), rc_acct(3), rc_acct_proxy(3), rc_add_config(3), rc_apply_config(3), rc_auth(3), rc_auth_proxy(3), rc_avpair_add(3), rc_avpair_assign(3), rc_avpair_copy(3), rc_avpair_free(3), rc_avpair_gen(3), rc_avpair_get(3), rc_avpair_get_attr(3), rc_avpair_get_in6(3), rc_avpair_get_raw(3), rc_avpair_get_uint32(3), rc_avpair_insert(3), rc_avpair_log(3), rc_avpair_new(3), rc_avpair_next(3), rc_avpair_parse(3), rc_avpair_remove(3), rc_avpair_tostr(3), rc_buildreq(3), rc_check(3), rc_check_tls(3), rc_conf_int(3), rc_conf_srv(3), rc_conf_str(3), rc_config_free(3), rc_config_init(3), rc_destroy(3), rc_dict_addattr(3), rc_dict_addval(3), rc_dict_addvend(3), rc_dict_findattr(3), rc_dict_findval(3), rc_dict_findvend(3), rc_dict_free(3), rc_dict_getattr(3), rc_dict_getval(3), rc_dict_getvend(3), rc_find_server_addr(3), rc_get_socket_type(3), rc_get_srcaddr(3), rc_getport(3), rc_mksid(3), rc_new(3), rc_openlog(3), rc_own_hostname(3), rc_read_config(3), rc_read_dictionary(3), rc_read_dictionary_from_buffer(3), rc_send_server(3), rc_setdebug(3), rc_test_config(3), rc_tls_fd(3)
okay that's the whole page bestie, go forth and send some servers π«Άβ¨
this lil masterpiece is brought to you by radcli, dated 2023-01-29 β she's been around a minute and she still ate. π π
π¦ where this page comes from
- alpine 3.24: radcli-doc 1.4.0-r0 Β· BSD-2-Clause AND MIT
- epel 10: radcli-devel 1.5.2-3.el10_3 Β· BSD-2-Clause AND UMich-Merit AND HPND-Fenneberg-Livingston
- fedora 43: radcli-devel 1.4.0-5.fc43 Β· BSD-2-Clause AND UMich-Merit AND HPND-Fenneberg-Livingston
- fedora 43: radcli-devel 1.4.0-5.fc43 Β· BSD-2-Clause AND UMich-Merit AND HPND-Fenneberg-Livingston
- fedora 44: radcli-devel 1.4.0-6.fc44 Β· BSD-2-Clause AND UMich-Merit AND HPND-Fenneberg-Livingston
- fedora 44: radcli-devel 1.4.0-6.fc44 Β· BSD-2-Clause AND UMich-Merit AND HPND-Fenneberg-Livingston
- fedora 44: radcli-devel 1.5.2-3.fc44 Β· BSD-2-Clause AND UMich-Merit AND HPND-Fenneberg-Livingston
- fedora 44: radcli-devel 1.5.2-3.fc44 Β· BSD-2-Clause AND UMich-Merit AND HPND-Fenneberg-Livingston
- nixos 26.05: radcli 1.5.1
- nixpkgs unstable: radcli 1.5.2
- opensuse-leap 16.0: radcli-devel 1.4.0-bp160.1.11 Β· BSD-2-Clause AND MIT
- opensuse-leap 16.0: radcli-devel 1.4.0-bp160.1.11 Β· BSD-2-Clause AND MIT
- opensuse-leap 16.0: radcli-devel 1.4.0-bp160.1.11 Β· BSD-2-Clause AND MIT
- opensuse-leap 16.0: radcli-devel 1.4.0-bp160.1.11 Β· BSD-2-Clause AND MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms