Package radcli
RADIUS protocol client library
http://radcli.github.io/radcli/
The radcli library is a library for writing RADIUS Clients. The library's
approach is to allow writing RADIUS-aware application in less than 50 lines
of C code. It provides radcli2.h, a new, self-sufficient API, and radcli.h,
a legacy API kept source compatible with freeradius-client (see the
radcli-compat subpackage).
Version: 2.0.0
See also: radcli-compat-devel.
Library Functions | |
| radcli2.h | |
| radcli_aaa | Perform an authentication or accounting exchange with Acct-Delay-Time autofill and fail-over across every configured server. |
| radcli_attr_def_name | Return an attribute definition's canonical name. |
| radcli_attr_def_oid | Render an attribute definition's RFC 6929 §2.7 OID notation. |
| radcli_attr_def_type | Return an attribute definition's wire type. |
| radcli_avp_add_bytes | Append an attribute holding an arbitrary byte string. |
| radcli_avp_add_bytes_by_num | Look up an attribute by legacy numeric ID and append its bytes. |
| radcli_avp_add_gigawords64 | Append a 64-bit counter as an Octets/Gigawords attribute pair. |
| radcli_avp_add_gigawords64_by_num | Look up the octets attribute by legacy numeric ID and append a 64-bit counter as an Octets/Gigawords pair. |
| radcli_avp_add_ip4 | Append an IPv4-address-typed attribute from a struct in_addr. |
| radcli_avp_add_ip4_by_num | Look up an IPv4-address-typed attribute by legacy numeric ID and append it. |
| radcli_avp_add_ip4prefix | Append an IPv4-prefix-typed attribute. |
| radcli_avp_add_ip4prefix_by_num | Look up an IPv4-prefix-typed attribute by legacy numeric ID and append it. |
| radcli_avp_add_ip6 | Append an IPv6-address or IPv6-prefix-typed attribute. |
| radcli_avp_add_ip6_by_num | Look up an IPv6-address or IPv6-prefix-typed attribute by legacy numeric ID and append it. |
| radcli_avp_add_str | Append a string- or text-typed attribute. |
| radcli_avp_add_str_by_num | Look up a string-typed attribute by legacy numeric ID and append it. |
| radcli_avp_add_uint32 | Append an integer/IPv4-address/date-typed attribute. |
| radcli_avp_add_uint32_by_num | Look up an integer/IPv4-address/date-typed attribute by legacy numeric ID and append it. |
| radcli_avp_add_uint64 | Append a 64-bit integer- or ifid-typed attribute. |
| radcli_avp_add_uint64_by_num | Look up a 64-bit integer-typed attribute by legacy numeric ID and append it. |
| radcli_avp_add_username | Append a User-Name AVP, appending a realm as "username@realm" unless username already contains one. |
| radcli_avp_concat_str | Concatenate every occurrence of an attribute into a bounded buffer. |
| radcli_avp_concat_str_by_num | Look up an attribute by legacy numeric ID and concatenate every occurrence into a bounded buffer. |
| radcli_avp_def | Return the attribute definition of a. |
| radcli_avp_get | Find the idx-th occurrence of an attribute in a list. |
| radcli_avp_get_by_num | Look up the idx-th occurrence of an attribute by legacy numeric ID. |
| radcli_avp_get_bytes | Read an attribute's value as raw bytes. |
| radcli_avp_get_bytes_by_num | Look up an attribute by legacy numeric ID and read its first occurrence's raw bytes. |
| radcli_avp_get_cstr | Read an attribute's value as a NUL-terminated string, with no allocation or copy. |
| radcli_avp_get_cstr_by_num | Look up an attribute by legacy numeric ID and read its first occurrence as a NUL-terminated string. |
| radcli_avp_get_gigawords64 | Reassemble a 64-bit counter from an Octets/Gigawords attribute pair. |
| radcli_avp_get_gigawords64_by_num | Look up the octets attribute by legacy numeric ID and reassemble a 64-bit counter from an Octets/Gigawords pair. |
| radcli_avp_get_ip4prefix | Read an attribute's value as an IPv4 prefix. |
| radcli_avp_get_ip4prefix_by_num | Look up an IPv4-prefix-typed attribute by legacy numeric ID and read its first occurrence. |
| radcli_avp_get_ip6 | Read an attribute's value as an IPv6 address or prefix. |
| radcli_avp_get_ip6_by_num | Look up an IPv6-address or IPv6-prefix-typed attribute by legacy numeric ID and read its first occurrence. |
| radcli_avp_get_uint32 | Read an attribute's value as an integer/IPv4-address/date. |
| radcli_avp_get_uint32_by_num | Look up an integer/IPv4-address/date-typed attribute by legacy numeric ID and read its first occurrence. |
| radcli_avp_get_uint64 | Read an attribute's value as a 64-bit integer or ifid. |
| radcli_avp_get_uint64_by_num | Look up a 64-bit integer-typed attribute by legacy numeric ID and read its first occurrence. |
| radcli_avp_iter_next | Return the current attribute and advance. |
| radcli_avp_list_error | Check whether any radcli_avp_add_*()/_by_num() call on list has ever failed. |
| radcli_avp_list_free | Free a list and every attribute it holds. |
| radcli_avp_list_iter | Begin iterating list. |
| radcli_avp_list_new | Create an empty attribute-value pair list. |
| radcli_ctx_apply | Validate the options set so far and initialise the transport. |
| radcli_ctx_dispatch | Read what is ready on ctx's descriptor(s), validate it, and invoke the registered handler for anything that passes see radcli_dae_set_handler(). Also: drains… |
| radcli_ctx_free | Release a context. |
| radcli_ctx_get_opt_int | Read back an integer-typed configuration option. |
| radcli_ctx_get_opt_str | Read back a string-typed configuration option. |
| radcli_ctx_get_poll | Report what to wait for on ctx's behalf, for the caller's own event loop radcli never calls poll()/select()/epoll_wait() itself. |
| radcli_ctx_new | Create an empty context, ready for radcli_ctx_set_opt_str()/ _set_opt_int() and radcli_ctx_apply() the fully programmatic ("backup") way to configure radcli… |
| radcli_ctx_read_config | Create a context by parsing a config file the main, recommended way to configure radcli. |
| radcli_ctx_read_dictionary | Load an additional attribute dictionary. |
| radcli_ctx_read_dictionary_from_buffer | Load an additional attribute dictionary from an in-memory buffer. |
| radcli_ctx_set_opt_int | Set an integer-typed configuration option. |
| radcli_ctx_set_opt_str | Set a string-typed configuration option. |
| radcli_ctx_set_secret | Set the RADIUS shared secret for the configured authserver and/or acctserver. |
| radcli_ctx_set_tls_psk | Set the RFC 6614/7360 TLS-transport Pre-Shared Key credentials for the configured authserver. |
| radcli_dae_free | Release a listener, closing its socket if radcli_dae_start() opened one. |
| radcli_dae_new | Validate dae-* configuration and build a dynamic-authorization listener. Opens no socket see radcli_dae_start(). |
| radcli_dae_process | Validate a caller-supplied packet, without a radcli-owned socket the L0 counterpart of radcli_ctx_dispatch(), running the identical validation pipeline… |
| radcli_dae_reply | Answer a request with an ACK or NAK, selecting 41/42 or 44/45 from the request's own code, mirroring its Proxy-State attributes, and computing the Response… |
| radcli_dae_reply_error | Answer a request with a NAK carrying the given Error-Cause. |
| radcli_dae_reply_to_buffer | Produce a reply as bytes instead of sending it the L0 counterpart of radcli_dae_reply()/radcli_dae_reply_error(), for a request that came from… |
| radcli_dae_req_attrs | Return the request's decoded attributes. |
| radcli_dae_req_code | Return the received packet's RADIUS code. |
| radcli_dae_req_framed_ip | Return the request's Framed-IP-Address or Framed-IPv6-Address. |
| radcli_dae_req_nas_port | Return the request's NAS-Port. |
| radcli_dae_req_session_id | Return the request's Acct-Session-Id, if it carried one. |
| radcli_dae_req_user_name | Return the request's User-Name, if it carried one. |
| radcli_dae_request_free | Release a request. |
| radcli_dae_set_handler | Register the callback radcli_ctx_dispatch() invokes for each validated request. May be called before or after radcli_dae_start(). |
| radcli_dae_start | Start receiving: binds the socket described by dae-listen. |
| radcli_dict_lookup | Look up a dictionary attribute by its canonical name. |
| radcli_dict_lookup_num | Look up a dictionary attribute by its legacy numeric ID and vendor. |
| radcli_dict_lookup_oid | Look up a dictionary attribute by RFC 6929 §2.7 OID notation. |
| radcli_dict_lookup_value | Resolve a dictionary VALUE by name, scoped to one attribute. |
| radcli_request_attrs | Return the reply's decoded attributes. |
| radcli_request_code | Return the reply's RADIUS code. |
| radcli_request_done | Report r's outcome once radcli_ctx_dispatch() has resolved it a pure state query, performing no I/O of its own. |
| radcli_request_free | Release a request. |
| radcli_request_new | Create a request to send. |
| radcli_request_perform | Send a request, optionally waiting for the reply. |
| radcli_request_server | Return the name of the server a request was (or will be) sent to. |