rc_buildreq(3)

πŸ“¦
version 1.5.2 Β· 4 versions
, in alpine 3.24, epel 10, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0

πŸ’– rc_buildreq(3) β€” bestie edition πŸ’–

okay so this is a page from the Radius client library (you know, the radcli girlies). Pull up a chair, we're building RADIUS requests together and it's gonna be cute. πŸŽ€


✨ NAME ✨

rc_buildreq β€” literally just vibing here with no tagline, the manpage said nothing else and I respect the mystery πŸ’…


🌸 SYNOPSIS 🌸

#include <radcli/radcli.h>

void rc_buildreq(
    rc_handle const  *rh,
    SEND_DATA        *data,
    int               code,
    char             *server,
    unsigned short    port,
    char             *secret,
    int               timeout,
    int               retries
);

πŸ¦‹ DESCRIPTION πŸ¦‹

Bestie. Listen. This function builds you a skeleton RADIUS request, and it does it using the info it scoops out of the config file. That's the whole thing. That's the assignment. It's giving "starter pack for a packet" and honestly? Obsessed. ✨


πŸ’œ PARAMETERS πŸ’œ

  • rh β€” a handle to your parsed configuration. It's the main character, show it some respect. πŸ‘‘
  • data β€” a pointer to a SEND_DATA structure. The lil container that's about to get filled up. πŸ“
  • code β€” one of the standard RADIUS codes (like, for example, PW_ACCESS_REQUEST). Pick your fighter.
  • server β€” the name of the server. Yes, its actual name. Ask nicely.
  • port β€” the server's port number. The door number. The address. The vibe. πŸšͺ
  • secret β€” the secret used by the server. 🀫 do not tell anyone, that's the whole point.
  • timeout β€” the timeout, in seconds, of a message. Patience levels: configurable.
  • retries β€” the number of retries. How many times we're gonna try again because we're nothing if not persistent. 😭

πŸŽ€ STRUCTURES πŸŽ€

Here's the struct, bestie, and every single field is staying right where it is because we don't skip details in this house:

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.
};
the comments are the original comments and I am NOT touching them, they're doing great πŸ’›

🌈 SEE ALSO 🌈

The whole squad, the entire friend group chat, no one left out:

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)


and that's the page!! πŸ’–βœ¨πŸ¦‹πŸŒΈπŸŽ€ this lil masterpiece comes to you courtesy of radcli, dated 2023-01-29, and yes the version is literally just "radcli" and it's serving minimalism, we love that for it. mwah. πŸ’…πŸ«Ά

πŸ“¦ where this page comes from