table of contents
radcli.h(3) | Radius client library | radcli.h(3) |
NAME¶
radcli.h -
SYNOPSIS¶
#include <radcli/radcli.h>
DESCRIPTION¶
int rc_aaa(rc_handle *, uint32_t, VALUE_PAIR *, VALUE_PAIR **, char *, int, rc_standard_codes); int rc_aaa_ctx(rc_handle *, RC_AAA_CTX **, uint32_t, VALUE_PAIR *, VALUE_PAIR **, char *, int, rc_standard_codes); void rc_aaa_ctx_free(RC_AAA_CTX *); const char *rc_aaa_ctx_get_secret(RC_AAA_CTX *); const void *rc_aaa_ctx_get_vector(RC_AAA_CTX *); int rc_aaa_ctx_server(rc_handle *, RC_AAA_CTX **, SERVER *, rc_type, uint32_t, VALUE_PAIR *, VALUE_PAIR **, char *, int, rc_standard_codes); int rc_acct(rc_handle *, uint32_t, VALUE_PAIR *); int rc_acct_proxy(rc_handle *, VALUE_PAIR *); int rc_add_config(rc_handle *, char const *, char const *, char const *, int); int rc_apply_config(rc_handle *); int rc_auth(rc_handle *, uint32_t, VALUE_PAIR *, VALUE_PAIR **, char *); int rc_auth_proxy(rc_handle *, VALUE_PAIR *, VALUE_PAIR **, char *); VALUE_PAIR *rc_avpair_add(rc_handle const *, VALUE_PAIR **, uint32_t, void const *, int, uint32_t); int rc_avpair_assign(VALUE_PAIR *, void const *, int); VALUE_PAIR *rc_avpair_copy(VALUE_PAIR *); void rc_avpair_free(VALUE_PAIR *); VALUE_PAIR *rc_avpair_gen(rc_handle const *, VALUE_PAIR *, unsigned char const *, int, uint32_t); VALUE_PAIR *rc_avpair_get(VALUE_PAIR *, uint32_t, uint32_t); void rc_avpair_get_attr(VALUE_PAIR *, unsigned *, unsigned *); int rc_avpair_get_in6(VALUE_PAIR *, struct in6_addr *, unsigned *); int rc_avpair_get_raw(VALUE_PAIR *, char **, unsigned *); int rc_avpair_get_uint32(VALUE_PAIR *, uint32_t *); void rc_avpair_insert(VALUE_PAIR **, VALUE_PAIR *, VALUE_PAIR *); char *rc_avpair_log(rc_handle const *, VALUE_PAIR *, char *, size_t); VALUE_PAIR *rc_avpair_new(rc_handle const *, uint32_t, void const *, int, uint32_t); VALUE_PAIR *rc_avpair_next(VALUE_PAIR *); int rc_avpair_parse(rc_handle const *, char const *, VALUE_PAIR **); void rc_avpair_remove(VALUE_PAIR **, uint32_t, uint32_t); int rc_avpair_tostr(rc_handle const *, VALUE_PAIR *, char *, int, char *, int); void rc_buildreq(rc_handle const *, SEND_DATA *, int, char *, unsigned short, char *, int, int); int rc_check(rc_handle *, char *, char *, unsigned short, char *); int rc_check_tls(rc_handle *); int rc_conf_int(rc_handle const *, char const *); SERVER *rc_conf_srv(rc_handle const *, char const *); char *rc_conf_str(rc_handle const *, char const *); void rc_config_free(rc_handle *); rc_handle *rc_config_init(rc_handle *); void rc_destroy(rc_handle *); DICT_ATTR *rc_dict_addattr(rc_handle *, char const *, uint32_t, int, uint32_t); DICT_VALUE *rc_dict_addval(rc_handle *, char const *, char const *, uint32_t); DICT_VENDOR *rc_dict_addvend(rc_handle *, char const *, uint32_t); DICT_ATTR *rc_dict_findattr(rc_handle const *, char const *); DICT_VALUE *rc_dict_findval(rc_handle const *, char const *); DICT_VENDOR *rc_dict_findvend(rc_handle const *, char const *); void rc_dict_free(rc_handle *); DICT_ATTR *rc_dict_getattr(rc_handle const *, uint64_t); DICT_VALUE *rc_dict_getval(rc_handle const *, uint32_t, char const *); DICT_VENDOR *rc_dict_getvend(rc_handle const *, uint32_t); int rc_find_server_addr(rc_handle const *, char const *, struct addrinfo **, char *, rc_type); rc_socket_type rc_get_socket_type(rc_handle *); int rc_get_srcaddr(struct sockaddr *, const struct sockaddr *); unsigned short rc_getport(int); char *rc_mksid(void); rc_handle *rc_new(void); void rc_openlog(char const *); int rc_own_hostname(char *, int); rc_handle *rc_read_config(char const *); int rc_read_dictionary(rc_handle *, char const *); int rc_read_dictionary_from_buffer(rc_handle *, char const *, size_t); int rc_send_server(rc_handle *, SEND_DATA *, char *, rc_type); void rc_setdebug(int); int rc_test_config(rc_handle *, char const *); int rc_tls_fd(rc_handle *);
¶
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. };
¶
Avoid using this structure directly, it is included for backwards compatibility only. Several of its fields have been deprecated.
struct server {
int max;
char *name[RC_SERVER_MAX];
uint16_t port[RC_SERVER_MAX];
char *secret[RC_SERVER_MAX];
double deadtime_ends[RC_SERVER_MAX]; // unused };
¶
Avoid using this structure directly. Use the rc_avpair_get_ functions.
struct rc_value_pair {
char name[RC_NAME_LENGTH+1]; // attribute name if known.
uint64_t attribute; // attribute numeric value of type rc_attr_id including vendor; use VENDOR() and ATTRID() to separate.
rc_attr_type type; // attribute type.
uint32_t lvalue; // attribute value if type is PW_TYPE_INTEGER, PW_TYPE_DATE or PW_TYPE_IPADDR.
char strvalue[AUTH_STRING_LEN+1]; // contains attribute value in other cases.
struct rc_value_pair *next;
char pad[32]; // unused pad };
SEE ALSO¶
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)
2023-01-29 | radcli |