2 * This program is free software; you can redistribute it and/or modify
3 * it under the terms of the GNU General Public License as published by
4 * the Free Software Foundation; either version 2 of the License, or
5 * (at your option) any later version.
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
12 * You should have received a copy of the GNU General Public License
13 * along with this program; if not, write to the Free Software
14 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
22 * @brief Structures, prototypes and global variables for the FreeRADIUS server.
24 * @copyright 1999-2000,2002-2008 The FreeRADIUS server project
27 RCSIDH(radiusd_h, "$Id$")
29 #include <freeradius-devel/libradius.h>
30 #include <freeradius-devel/radpaths.h>
31 #include <freeradius-devel/conf.h>
32 #include <freeradius-devel/conffile.h>
33 #include <freeradius-devel/event.h>
34 #include <freeradius-devel/connection.h>
35 #include <freeradius-devel/map.h>
37 typedef struct rad_request REQUEST;
39 #include <freeradius-devel/log.h>
44 # include <sys/wait.h>
48 # define REQUEST_MAGIC (0xdeadbeef)
52 * WITH_VMPS is handled by src/include/features.h
59 # include <freeradius-devel/tls.h>
62 #include <freeradius-devel/stats.h>
63 #include <freeradius-devel/realms.h>
72 typedef struct request_data_t request_data_t;
74 typedef struct radclient {
76 fr_ipaddr_t src_ipaddr;
79 char const *shortname;
80 bool message_authenticator;
85 int number; /* internal use only */
86 CONF_SECTION const *cs;
89 #ifdef WITH_ACCOUNTING
98 struct timeval response_window;
102 fr_socket_limit_t limit;
108 #ifdef WITH_DYNAMIC_CLIENTS
110 uint32_t dynamic; /* was dynamically defined */
112 time_t last_new_client;
113 char const *client_server;
118 char const *coa_name;
119 home_server_t *coa_server;
120 home_pool_t *coa_pool;
125 * Types of listeners.
127 * Ordered by priority!
129 typedef enum RAD_LISTEN_TYPE {
135 #ifdef WITH_ACCOUNTING
147 #ifdef WITH_COMMAND_SOCKET
156 /** Return codes indicating the result of the module call
158 * All module functions must return one of the codes listed below (apart from
159 * RLM_MODULE_NUMCODES, which is used to check for validity).
161 typedef enum rlm_rcodes {
162 RLM_MODULE_REJECT = 0, //!< Immediately reject the request.
163 RLM_MODULE_FAIL, //!< Module failed, don't reply.
164 RLM_MODULE_OK, //!< The module is OK, continue.
165 RLM_MODULE_HANDLED, //!< The module handled the request, so stop.
166 RLM_MODULE_INVALID, //!< The module considers the request invalid.
167 RLM_MODULE_USERLOCK, //!< Reject the request (user is locked out).
168 RLM_MODULE_NOTFOUND, //!< User not found.
169 RLM_MODULE_NOOP, //!< Module succeeded without doing anything.
170 RLM_MODULE_UPDATED, //!< OK (pairs modified).
171 RLM_MODULE_NUMCODES, //!< How many valid return codes there are.
172 RLM_MODULE_UNKNOWN //!< Error resolving rcode (should not be
173 //!< returned by modules).
175 extern const FR_NAME_NUMBER modreturn_table[];
178 * For listening on multiple IP's and ports.
180 typedef struct rad_listen_t rad_listen_t;
182 typedef void (*fr_request_process_t)(REQUEST *, int);
184 * Function handler for requests.
186 typedef int (*RAD_REQUEST_FUNP)(REQUEST *);
188 #define REQUEST_DATA_REGEX (0xadbeef00)
189 #define REQUEST_MAX_REGEX (8)
191 #if defined(WITH_VERIFY_PTR)
192 # define VERIFY_REQUEST(_x) verify_request(_x)
195 * Even if were building without WITH_VERIFY_PTR
196 * the pointer must not be NULL when these various macros are used
197 * so we can add some sneaky asserts.
199 # define VERIFY_REQUEST(_x) rad_assert(_x)
204 REQUEST_STOP_PROCESSING,
206 } rad_master_state_t;
207 #define REQUEST_MASTER_NUM_STATES (REQUEST_COUNTED + 1)
213 REQUEST_RESPONSE_DELAY,
214 REQUEST_CLEANUP_DELAY,
217 #define REQUEST_CHILD_NUM_STATES (REQUEST_DONE + 1)
221 uint32_t magic; //!< Magic number used to detect memory corruption,
222 //!< or request structs that have not been properly initialised.
224 RADIUS_PACKET *packet; //!< Incoming request.
226 RADIUS_PACKET *proxy; //!< Outgoing request.
228 RADIUS_PACKET *reply; //!< Outgoing response.
230 RADIUS_PACKET *proxy_reply; //!< Incoming response.
232 VALUE_PAIR *config_items; //!< VALUE_PAIRs used to set per request parameters
233 //!< for modules and the server core at runtime.
234 VALUE_PAIR *username; //!< Cached username VALUE_PAIR.
235 VALUE_PAIR *password; //!< Cached password VALUE_PAIR.
237 fr_request_process_t process; //!< The function to call to move the request through the state machine.
239 RAD_REQUEST_FUNP handle; //!< The function to call to move the request through the
240 //!< various server configuration sections.
242 struct main_config_t *root; //!< Pointer to the main config hack to try and deal with hup.
244 request_data_t *data; //!< Request metadata.
246 RADCLIENT *client; //!< The client that originally sent us the request.
248 #ifdef HAVE_PTHREAD_H
249 pthread_t child_pid; //!< Current thread handling the request.
251 time_t timestamp; //!< When the request was received.
252 unsigned int number; //!< Monotonically increasing request number. Reset on server restart.
254 rad_listen_t *listener; //!< The listener that received the request.
256 rad_listen_t *proxy_listener;//!< Listener for outgoing requests.
259 rlm_rcode_t rcode; //!< Last rcode returned by a module
261 int simul_max; //!< Maximum number of concurrent sessions for this user.
262 #ifdef WITH_SESSION_MGMT
263 int simul_count; //!< The current number of sessions for this user.
264 int simul_mpp; //!< WEIRD: 1 is false, 2 is true.
267 char const *module; //!< Module the request is currently being processed by.
268 char const *component; //!< Section the request is in.
272 rad_master_state_t master_state;
273 rad_child_state_t child_state;
274 RAD_LISTEN_TYPE priority;
280 bool in_request_hash;
284 home_server_t *home_server;
285 home_pool_t *home_pool; //!< For dynamic failover
287 struct timeval proxy_retransmit;
289 uint32_t num_proxied_requests;
290 uint32_t num_proxied_responses;
297 radlog_func_t func; //!< Function to call to output log messages about this
300 log_debug_t lvl; //!< Request options, currently just holds the debug level or
303 uint8_t indent; //!< By how much to indent log messages. uin8_t so it's obvious
304 //!< when a request has been exdented too much.
308 REQUEST *coa; //!< CoA request originated by this request.
309 uint32_t num_coa_requests;//!< Counter for number of requests sent including
312 }; /* REQUEST typedef */
314 #define RAD_REQUEST_OPTION_NONE (0)
315 #define RAD_REQUEST_OPTION_DEBUG (1)
316 #define RAD_REQUEST_OPTION_DEBUG2 (2)
317 #define RAD_REQUEST_OPTION_DEBUG3 (3)
318 #define RAD_REQUEST_OPTION_DEBUG4 (4)
320 typedef struct radclient_list RADCLIENT_LIST;
322 typedef int (*rad_listen_recv_t)(rad_listen_t *);
323 typedef int (*rad_listen_send_t)(rad_listen_t *, REQUEST *);
324 typedef int (*rad_listen_print_t)(rad_listen_t const *, char *, size_t);
325 typedef int (*rad_listen_encode_t)(rad_listen_t *, REQUEST *);
326 typedef int (*rad_listen_decode_t)(rad_listen_t *, REQUEST *);
328 struct rad_listen_t {
329 struct rad_listen_t *next; /* should be rbtree stuff */
332 * For normal sockets.
334 RAD_LISTEN_TYPE type;
347 fr_tls_server_conf_t *tls;
350 rad_listen_recv_t recv;
351 rad_listen_send_t send;
352 rad_listen_encode_t encode;
353 rad_listen_decode_t decode;
354 rad_listen_print_t print;
356 CONF_SECTION const *cs;
365 * This shouldn't really be exposed...
367 typedef struct listen_socket_t {
369 * For normal sockets.
371 fr_ipaddr_t my_ipaddr;
374 char const *interface;
379 uint32_t rate_pps_old;
380 uint32_t rate_pps_now;
383 /* for outgoing sockets */
385 fr_ipaddr_t other_ipaddr;
391 /* for a proxy connecting to home servers */
396 fr_socket_limit_t limit;
398 struct listen_socket_t *parent;
401 RADIUS_PACKET *packet; /* for reading partial packets */
406 REQUEST *request; /* horrible hacks */
408 pthread_mutex_t mutex;
413 RADCLIENT_LIST *clients;
416 #define RAD_LISTEN_STATUS_INIT (0)
417 #define RAD_LISTEN_STATUS_KNOWN (1)
418 #define RAD_LISTEN_STATUS_EOL (2)
419 #define RAD_LISTEN_STATUS_REMOVE_NOW (3)
421 typedef struct main_config_t {
422 struct main_config *next;
423 fr_ipaddr_t myip; /* from the command-line only */
424 uint16_t port; /* from the command-line only */
426 bool log_auth_badpass;
427 bool log_auth_goodpass;
428 bool allow_core_dumps;
429 uint32_t debug_level;
434 uint32_t reject_delay;
436 char const *allow_vulnerable_openssl;
438 uint32_t max_request_time;
439 uint32_t cleanup_delay;
440 uint32_t max_requests;
441 char const *log_file;
442 char const *dictionary_dir;
443 char const *checkrad;
444 char const *pid_file;
445 rad_listen_t *listen;
447 CONF_SECTION *config;
449 char const *auth_badpass_msg;
450 char const *auth_goodpass_msg;
453 char const *panic_action;
454 char const *denied_msg;
455 struct timeval init_delay; /* initial request processing delay */
458 #define SECONDS_PER_DAY 86400
459 #define MAX_REQUEST_TIME 30
460 #define CLEANUP_DELAY 5
461 #define MAX_REQUESTS 256
462 #define RETRY_DELAY 5
463 #define RETRY_COUNT 3
464 #define DEAD_TIME 120
465 #define EXEC_TIMEOUT 10
467 /* for paircompare_register */
468 typedef int (*RAD_COMPARE_FUNC)(void *instance, REQUEST *,VALUE_PAIR *, VALUE_PAIR *, VALUE_PAIR *, VALUE_PAIR **);
470 typedef enum request_fail {
471 REQUEST_FAIL_UNKNOWN = 0,
472 REQUEST_FAIL_NO_THREADS, //!< No threads to handle it.
473 REQUEST_FAIL_DECODE, //!< Rad_decode didn't like it.
474 REQUEST_FAIL_PROXY, //!< Call to proxy modules failed.
475 REQUEST_FAIL_PROXY_SEND, //!< Proxy_send didn't like it.
476 REQUEST_FAIL_NO_RESPONSE, //!< We weren't told to respond, so we reject.
477 REQUEST_FAIL_HOME_SERVER, //!< The home server didn't respond.
478 REQUEST_FAIL_HOME_SERVER2, //!< Another case of the above.
479 REQUEST_FAIL_HOME_SERVER3, //!< Another case of the above.
480 REQUEST_FAIL_NORMAL_REJECT, //!< Authentication failure.
481 REQUEST_FAIL_SERVER_TIMEOUT //!< The server took too long to process the request.
487 * We really shouldn't have this many.
489 extern char const *progname;
490 extern log_debug_t debug_flag;
491 extern char const *radacct_dir;
492 extern char const *radlog_dir;
493 extern char const *radlib_dir;
494 extern char const *radius_libdir;
495 extern uint32_t expiration_seconds;
496 extern bool log_stripped_names;
497 extern bool log_auth_detail;
498 extern char const *radiusd_version;
499 void radius_signal_self(int flag);
502 RADIUS_SIGNAL_SELF_NONE = (0),
503 RADIUS_SIGNAL_SELF_HUP = (1 << 0),
504 RADIUS_SIGNAL_SELF_TERM = (1 << 1),
505 RADIUS_SIGNAL_SELF_EXIT = (1 << 2),
506 RADIUS_SIGNAL_SELF_DETAIL = (1 << 3),
507 RADIUS_SIGNAL_SELF_NEW_FD = (1 << 4),
508 RADIUS_SIGNAL_SELF_MAX = (1 << 5)
511 * Function prototypes.
515 int rad_accounting(REQUEST *);
518 int rad_check_ts(uint32_t nasaddr, uint32_t nas_port, char const *user, char const *sessionid);
519 int session_zap(REQUEST *request, uint32_t nasaddr,
520 uint32_t nas_port, char const *user,
521 char const *sessionid, uint32_t cliaddr,
522 char proto, int session_time);
526 void debug_pair(VALUE_PAIR *);
527 void debug_pair_list(VALUE_PAIR *);
528 void rdebug_pair_list(int, REQUEST *, VALUE_PAIR *);
529 int log_err (char *);
532 #define MEM(x) if (!(x)) { ERROR("Out of memory"); exit(1); }
533 void (*reset_signal(int signo, void (*func)(int)))(int);
534 int request_opaque_free(REQUEST *request);
535 int rad_mkdir(char *directory, mode_t mode);
536 void *rad_malloc(size_t size); /* calls exit(1) on error! */
537 void rad_const_free(void const *ptr);
538 REQUEST *request_alloc(TALLOC_CTX *ctx);
539 REQUEST *request_alloc_fake(REQUEST *oldreq);
540 REQUEST *request_alloc_coa(REQUEST *request);
541 int request_data_add(REQUEST *request,
542 void *unique_ptr, int unique_int,
543 void *opaque, bool free_opaque);
544 void *request_data_get(REQUEST *request,
545 void *unique_ptr, int unique_int);
546 void *request_data_reference(REQUEST *request,
547 void *unique_ptr, int unique_int);
548 int rad_copy_string(char *dst, char const *src);
549 int rad_copy_string_bare(char *dst, char const *src);
550 int rad_copy_variable(char *dst, char const *from);
551 uint32_t rad_pps(uint32_t *past, uint32_t *present, time_t *then, struct timeval *now);
552 int rad_expand_xlat(REQUEST *request, char const *cmd,
553 int max_argc, char *argv[], bool can_fail,
554 size_t argv_buflen, char *argv_buf);
555 void rad_regcapture(REQUEST *request, int compare, char const *value,
556 regmatch_t rxmatch[]);
557 void verify_request(REQUEST *request); /* only for special debug builds */
560 RADCLIENT_LIST *clients_init(CONF_SECTION *cs);
561 void clients_free(RADCLIENT_LIST *clients);
562 RADCLIENT_LIST *clients_parse_section(CONF_SECTION *section, bool tls_required);
563 void client_free(RADCLIENT *client);
564 int client_add(RADCLIENT_LIST *clients, RADCLIENT *client);
565 #ifdef WITH_DYNAMIC_CLIENTS
566 void client_delete(RADCLIENT_LIST *clients, RADCLIENT *client);
567 RADCLIENT *client_from_request(RADCLIENT_LIST *clients, REQUEST *request);
569 RADCLIENT *client_from_query(TALLOC_CTX *ctx, char const *identifier, char const *secret, char const *shortname,
570 char const *type, char const *server, bool require_ma) CC_HINT(nonnull(2, 3));
572 RADCLIENT *client_find(RADCLIENT_LIST const *clients,
573 fr_ipaddr_t const *ipaddr, int proto);
575 RADCLIENT *client_findbynumber(RADCLIENT_LIST const *clients,
577 RADCLIENT *client_find_old(fr_ipaddr_t const *ipaddr);
578 bool client_validate(RADCLIENT_LIST *clients, RADCLIENT *master, RADCLIENT *c);
579 RADCLIENT *client_read(char const *filename, int in_server, int flag);
583 int pairlist_read(TALLOC_CTX *ctx, char const *file, PAIR_LIST **list, int complain);
584 void pairlist_free(PAIR_LIST **);
587 int rad_check_lib_magic(uint64_t magic);
588 int ssl_check_consistency(void);
589 char const *ssl_version_by_num(uint64_t version);
590 char const *ssl_version_range(uint64_t low, uint64_t high);
591 char const *ssl_version(void);
595 char *auth_name(char *buf, size_t buflen, REQUEST *request, bool do_cli);
596 int rad_authenticate (REQUEST *);
597 int rad_postauth(REQUEST *);
598 int rad_virtual_server(REQUEST *);
601 pid_t radius_start_program(char const *cmd, REQUEST *request, bool exec_wait,
602 int *input_fd, int *output_fd,
603 VALUE_PAIR *input_pairs, bool shell_escape);
604 int radius_readfrom_program(REQUEST *request, int fd, pid_t pid, int timeout,
605 char *answer, int left);
606 int radius_exec_program(REQUEST *request, char const *cmd, bool exec_wait, bool shell_escape,
607 char *user_msg, size_t msg_len, int timeout,
608 VALUE_PAIR *input_pairs, VALUE_PAIR **output_pairs);
609 void exec_trigger(REQUEST *request, CONF_SECTION *cs, char const *name, int quench)
610 CC_HINT(nonnull (3));
613 int paircompare_register(DICT_ATTR const *attribute, DICT_ATTR const *from,
614 bool first_only, RAD_COMPARE_FUNC func, void *instance);
615 void paircompare_unregister(DICT_ATTR const *attr, RAD_COMPARE_FUNC func);
616 void paircompare_unregister_instance(void *instance);
617 int paircompare(REQUEST *request, VALUE_PAIR *req_list,
618 VALUE_PAIR *check, VALUE_PAIR **rep_list);
619 value_pair_tmpl_t *radius_xlat2tmpl(TALLOC_CTX *ctx, xlat_exp_t *xlat);
620 int radius_xlat_do(REQUEST *request, VALUE_PAIR *vp);
621 int radius_compare_vps(REQUEST *request, VALUE_PAIR *check, VALUE_PAIR *vp);
622 int radius_callback_compare(REQUEST *request, VALUE_PAIR *req,
623 VALUE_PAIR *check, VALUE_PAIR *check_pairs,
624 VALUE_PAIR **reply_pairs);
625 int radius_find_compare(DICT_ATTR const *attribute);
626 VALUE_PAIR *radius_paircreate(TALLOC_CTX *ctx, VALUE_PAIR **vps, unsigned int attribute, unsigned int vendor);
628 void module_failure_msg(REQUEST *request, char const *fmt, ...) CC_HINT(format (printf, 2, 3));
629 void vmodule_failure_msg(REQUEST *request, char const *fmt, va_list ap) CC_HINT(format (printf, 2, 0));
632 * Less code == fewer bugs
634 * @param _a attribute
638 #define pairmake_packet(_a, _b, _c) pairmake(request->packet, &request->packet->vps, _a, _b, _c)
639 #define pairmake_reply(_a, _b, _c) pairmake(request->reply, &request->reply->vps, _a, _b, _c)
640 #define pairmake_config(_a, _b, _c) pairmake(request, &request->config_items, _a, _b, _c)
644 typedef size_t (*RADIUS_ESCAPE_STRING)(REQUEST *, char *out, size_t outlen, char const *in, void *arg);
646 ssize_t radius_xlat(char *out, size_t outlen, REQUEST *request, char const *fmt, RADIUS_ESCAPE_STRING escape,
648 CC_HINT(nonnull (1 ,3 ,4));
650 ssize_t radius_axlat(char **out, REQUEST *request, char const *fmt, RADIUS_ESCAPE_STRING escape, void *escape_ctx)
651 CC_HINT(nonnull (1, 2, 3));
653 ssize_t radius_axlat_struct(char **out, REQUEST *request, xlat_exp_t const *xlat, RADIUS_ESCAPE_STRING escape,
655 CC_HINT(nonnull (1, 2, 3));
657 typedef ssize_t (*RAD_XLAT_FUNC)(void *instance, REQUEST *, char const *, char *, size_t);
658 int xlat_register(char const *module, RAD_XLAT_FUNC func, RADIUS_ESCAPE_STRING escape,
660 void xlat_unregister(char const *module, RAD_XLAT_FUNC func, void *instance);
661 ssize_t xlat_fmt_to_ref(uint8_t const **out, REQUEST *request, char const *fmt);
662 void xlat_free(void);
665 extern int thread_pool_init(CONF_SECTION *cs, bool *spawn_flag);
666 extern void thread_pool_stop(void);
667 extern int thread_pool_addrequest(REQUEST *, RAD_REQUEST_FUNP);
668 extern pid_t rad_fork(void);
669 extern pid_t rad_waitpid(pid_t pid, int *status);
670 extern int total_active_threads(void);
671 extern void thread_pool_lock(void);
672 extern void thread_pool_unlock(void);
673 extern void thread_pool_queue_stats(int array[RAD_LISTEN_MAX], int pps[2]);
675 #ifndef HAVE_PTHREAD_H
676 #define rad_fork(n) fork()
677 #define rad_waitpid(a,b) waitpid(a,b, 0)
681 /* Define a global config structure */
682 extern struct main_config_t main_config;
684 void set_radius_dir(TALLOC_CTX *ctx, char const *path);
685 char const *get_radius_dir(void);
686 int main_config_init(void);
687 int main_config_free(void);
688 void main_config_hup(void);
689 void hup_logfile(void);
690 void fr_suid_down(void);
691 void fr_suid_up(void);
692 void fr_suid_down_permanent(void);
695 void listen_free(rad_listen_t **head);
696 int listen_init(CONF_SECTION *cs, rad_listen_t **head, bool spawn_flag);
697 rad_listen_t *proxy_new_listener(home_server_t *home, uint16_t src_port);
698 RADCLIENT *client_listener_find(rad_listen_t *listener, fr_ipaddr_t const *ipaddr, uint16_t src_port);
701 RADCLIENT_LIST *listener_find_client_list(fr_ipaddr_t const *ipaddr, uint16_t port);
703 rad_listen_t *listener_find_byipaddr(fr_ipaddr_t const *ipaddr, uint16_t port, int proto);
704 int rad_status_server(REQUEST *request);
707 typedef enum event_corral_t {
708 EVENT_CORRAL_MAIN = 0, //!< Always main thread event list
709 EVENT_CORRAL_AUX //!< Maybe main thread or one shared by modules
712 fr_event_list_t *radius_event_list_corral(event_corral_t hint);
713 int radius_event_init(TALLOC_CTX *ctx);
714 int radius_event_start(CONF_SECTION *cs, bool spawn_flag);
715 void radius_event_free(void);
716 int radius_event_process(void);
717 void radius_update_listener(rad_listen_t *listener);
718 void revive_home_server(void *ctx);
719 void mark_home_server_dead(home_server_t *home, struct timeval *when);
722 typedef struct fr_cond_t fr_cond_t;
723 typedef int (*radius_tmpl_getvalue_t)(VALUE_PAIR **out, REQUEST *request, value_pair_map_t const *map, void *ctx);
725 int radius_evaluate_tmpl(REQUEST *request, int modreturn, int depth,
726 value_pair_tmpl_t const *vpt);
727 int radius_evaluate_map(REQUEST *request, int modreturn, int depth,
729 int radius_evaluate_cond(REQUEST *request, int modreturn, int depth,
731 void radius_pairmove(REQUEST *request, VALUE_PAIR **to, VALUE_PAIR *from, bool do_xlat) CC_HINT(nonnull);
733 VALUE_PAIR **radius_list(REQUEST *request, pair_lists_t list);
734 TALLOC_CTX *radius_list_ctx(REQUEST *request, pair_lists_t list_name);
735 pair_lists_t radius_list_name(char const **name, pair_lists_t unknown);
736 int radius_request(REQUEST **request, request_refs_t name);
737 request_refs_t radius_request_name(char const **name, request_refs_t unknown);
739 int radius_mapexec(VALUE_PAIR **out, REQUEST *request, value_pair_map_t const *map);
740 int radius_map2vp(VALUE_PAIR **out, REQUEST *request, value_pair_map_t const *map, void *ctx) CC_HINT(nonnull (1,2,3));
741 void radius_map_debug(REQUEST *request, value_pair_map_t const *map, VALUE_PAIR const *vp) CC_HINT(nonnull(1, 2));
742 int radius_map2request(REQUEST *request, value_pair_map_t const *map, radius_tmpl_getvalue_t func, void *ctx);
744 int radius_strpair2map(value_pair_map_t **out, REQUEST *request, char const *raw,
745 request_refs_t dst_request_def, pair_lists_t dst_list_def,
746 request_refs_t src_request_def, pair_lists_t src_list_def);
747 bool radius_map_dst_valid(REQUEST *request, value_pair_map_t const *map);
748 int radius_tmpl_get_vp(VALUE_PAIR **out, REQUEST *request, value_pair_tmpl_t const *vpt);
749 int radius_get_vp(VALUE_PAIR **out, REQUEST *request, char const *name);
750 int radius_tmpl_copy_vp(VALUE_PAIR **out, REQUEST *request, value_pair_tmpl_t const *vpt);
751 int radius_copy_vp(VALUE_PAIR **out, REQUEST *request, char const *name);
755 * For run-time patching of which function handles which socket.
757 int dual_tls_recv(rad_listen_t *listener);
758 int dual_tls_send(rad_listen_t *listener, REQUEST *request);
759 int proxy_tls_recv(rad_listen_t *listener);
760 int proxy_tls_send(rad_listen_t *listener, REQUEST *request);
764 * For radmin over TCP.
766 #define PW_RADMIN_PORT 18120