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;
80 char const *shortname;
81 bool message_authenticator;
86 int number; /* internal use only */
87 CONF_SECTION const *cs;
90 #ifdef WITH_ACCOUNTING
99 struct timeval response_window;
103 fr_socket_limit_t limit;
109 #ifdef WITH_DYNAMIC_CLIENTS
111 int dynamic; /* was dynamically defined */
113 time_t last_new_client;
120 home_server_t *coa_server;
121 home_pool_t *coa_pool;
126 * Types of listeners.
128 * Ordered by priority!
130 typedef enum RAD_LISTEN_TYPE {
136 #ifdef WITH_ACCOUNTING
148 #ifdef WITH_COMMAND_SOCKET
157 /** Return codes indicating the result of the module call
159 * All module functions must return one of the codes listed below (apart from
160 * RLM_MODULE_NUMCODES, which is used to check for validity).
162 typedef enum rlm_rcodes {
163 RLM_MODULE_REJECT = 0, //!< Immediately reject the request.
164 RLM_MODULE_FAIL, //!< Module failed, don't reply.
165 RLM_MODULE_OK, //!< The module is OK, continue.
166 RLM_MODULE_HANDLED, //!< The module handled the request, so stop.
167 RLM_MODULE_INVALID, //!< The module considers the request invalid.
168 RLM_MODULE_USERLOCK, //!< Reject the request (user is locked out).
169 RLM_MODULE_NOTFOUND, //!< User not found.
170 RLM_MODULE_NOOP, //!< Module succeeded without doing anything.
171 RLM_MODULE_UPDATED, //!< OK (pairs modified).
172 RLM_MODULE_NUMCODES, //!< How many valid return codes there are.
173 RLM_MODULE_UNKNOWN //!< Error resolving rcode (should not be
174 //!< returned by modules).
176 extern const FR_NAME_NUMBER modreturn_table[];
179 * For listening on multiple IP's and ports.
181 typedef struct rad_listen_t rad_listen_t;
183 typedef void (*fr_request_process_t)(REQUEST *, int);
185 * Function handler for requests.
187 typedef int (*RAD_REQUEST_FUNP)(REQUEST *);
189 #define REQUEST_DATA_REGEX (0xadbeef00)
190 #define REQUEST_MAX_REGEX (8)
192 #if defined(WITH_VERIFY_PTR)
193 #define VERIFY_REQUEST(_x) (void) talloc_get_type_abort(_x, REQUEST)
195 #define VERIFY_REQUEST(_x)
200 REQUEST_STOP_PROCESSING,
202 } rad_master_state_t;
203 #define REQUEST_MASTER_NUM_STATES (REQUEST_COUNTED + 1)
209 REQUEST_RESPONSE_DELAY,
210 REQUEST_CLEANUP_DELAY,
213 #define REQUEST_CHILD_NUM_STATES (REQUEST_DONE + 1)
217 uint32_t magic; //!< Magic number used to detect memory corruption,
218 //!< or request structs that have not been properly initialised.
220 RADIUS_PACKET *packet; //!< Incoming request.
222 RADIUS_PACKET *proxy; //!< Outgoing request.
224 RADIUS_PACKET *reply; //!< Outgoing response.
226 RADIUS_PACKET *proxy_reply; //!< Incoming response.
228 VALUE_PAIR *config_items; //!< VALUE_PAIRs used to set per request parameters
229 //!< for modules and the server core at runtime.
230 VALUE_PAIR *username; //!< Cached username VALUE_PAIR.
231 VALUE_PAIR *password; //!< Cached password VALUE_PAIR.
233 fr_request_process_t process; //!< The function to call to move the request through the state machine.
235 RAD_REQUEST_FUNP handle; //!< The function to call to move the request through the
236 //!< various server configuration sections.
238 struct main_config_t *root; //!< Pointer to the main config hack to try and deal with hup.
240 request_data_t *data; //!< Request metadata.
242 RADCLIENT *client; //!< The client that originally sent us the request.
244 #ifdef HAVE_PTHREAD_H
245 pthread_t child_pid; //!< Current thread handling the request.
247 time_t timestamp; //!< When the request was received.
248 unsigned int number; //!< Monotonically increasing request number. Reset on server restart.
250 rad_listen_t *listener; //!< The listener that received the request.
252 rad_listen_t *proxy_listener;//!< Listener for outgoing requests.
255 rlm_rcode_t rcode; //!< Last rcode returned by a module
257 int simul_max; //!< Maximum number of concurrent sessions for this user.
258 #ifdef WITH_SESSION_MGMT
259 int simul_count; //!< The current number of sessions for this user.
260 int simul_mpp; //!< WEIRD: 1 is false, 2 is true.
263 char const *module; //!< Module the request is currently being processed by.
264 char const *component; //!< Section the request is in.
268 rad_master_state_t master_state;
269 rad_child_state_t child_state;
270 RAD_LISTEN_TYPE priority;
276 bool in_request_hash;
280 home_server_t *home_server;
281 home_pool_t *home_pool; //!< For dynamic failover
283 struct timeval proxy_retransmit;
285 uint32_t num_proxied_requests;
286 uint32_t num_proxied_responses;
293 radlog_func_t func; //!< Function to call to output log messages about this
296 log_debug_t lvl; //!< Request options, currently just holds the debug level or
299 uint8_t indent; //!< By how much to indent log messages. uin8_t so it's obvious
300 //!< when a request has been exdented too much.
304 REQUEST *coa; //!< CoA request originated by this request.
305 uint32_t num_coa_requests;//!< Counter for number of requests sent including
308 }; /* REQUEST typedef */
310 #define RAD_REQUEST_OPTION_NONE (0)
311 #define RAD_REQUEST_OPTION_DEBUG (1)
312 #define RAD_REQUEST_OPTION_DEBUG2 (2)
313 #define RAD_REQUEST_OPTION_DEBUG3 (3)
314 #define RAD_REQUEST_OPTION_DEBUG4 (4)
316 typedef struct radclient_list RADCLIENT_LIST;
318 typedef int (*rad_listen_recv_t)(rad_listen_t *);
319 typedef int (*rad_listen_send_t)(rad_listen_t *, REQUEST *);
320 typedef int (*rad_listen_print_t)(rad_listen_t const *, char *, size_t);
321 typedef int (*rad_listen_encode_t)(rad_listen_t *, REQUEST *);
322 typedef int (*rad_listen_decode_t)(rad_listen_t *, REQUEST *);
324 struct rad_listen_t {
325 struct rad_listen_t *next; /* should be rbtree stuff */
328 * For normal sockets.
330 RAD_LISTEN_TYPE type;
343 fr_tls_server_conf_t *tls;
346 rad_listen_recv_t recv;
347 rad_listen_send_t send;
348 rad_listen_encode_t encode;
349 rad_listen_decode_t decode;
350 rad_listen_print_t print;
352 CONF_SECTION const *cs;
361 * This shouldn't really be exposed...
363 typedef struct listen_socket_t {
365 * For normal sockets.
367 fr_ipaddr_t my_ipaddr;
370 char const *interface;
375 uint32_t rate_pps_old;
376 uint32_t rate_pps_now;
379 /* for outgoing sockets */
381 fr_ipaddr_t other_ipaddr;
387 /* for a proxy connecting to home servers */
392 fr_socket_limit_t limit;
394 struct listen_socket_t *parent;
397 RADIUS_PACKET *packet; /* for reading partial packets */
402 REQUEST *request; /* horrible hacks */
404 pthread_mutex_t mutex;
409 RADCLIENT_LIST *clients;
412 #define RAD_LISTEN_STATUS_INIT (0)
413 #define RAD_LISTEN_STATUS_KNOWN (1)
414 #define RAD_LISTEN_STATUS_EOL (2)
415 #define RAD_LISTEN_STATUS_REMOVE_NOW (3)
417 typedef struct main_config_t {
418 struct main_config *next;
419 fr_ipaddr_t myip; /* from the command-line only */
420 uint16_t port; /* from the command-line only */
422 bool log_auth_badpass;
423 bool log_auth_goodpass;
424 bool allow_core_dumps;
425 uint32_t debug_level;
430 uint32_t reject_delay;
432 char const *allow_vulnerable_openssl;
434 uint32_t max_request_time;
435 uint32_t cleanup_delay;
436 uint32_t max_requests;
437 char const *log_file;
438 char const *dictionary_dir;
439 char const *checkrad;
440 char const *pid_file;
441 rad_listen_t *listen;
443 CONF_SECTION *config;
445 char const *auth_badpass_msg;
446 char const *auth_goodpass_msg;
449 char const *panic_action;
450 char const *denied_msg;
451 struct timeval min_response_window; /* for home servers */
454 #define SECONDS_PER_DAY 86400
455 #define MAX_REQUEST_TIME 30
456 #define CLEANUP_DELAY 5
457 #define MAX_REQUESTS 256
458 #define RETRY_DELAY 5
459 #define RETRY_COUNT 3
460 #define DEAD_TIME 120
461 #define EXEC_TIMEOUT 10
463 /* for paircompare_register */
464 typedef int (*RAD_COMPARE_FUNC)(void *instance, REQUEST *,VALUE_PAIR *, VALUE_PAIR *, VALUE_PAIR *, VALUE_PAIR **);
466 typedef enum request_fail {
467 REQUEST_FAIL_UNKNOWN = 0,
468 REQUEST_FAIL_NO_THREADS, //!< No threads to handle it.
469 REQUEST_FAIL_DECODE, //!< Rad_decode didn't like it.
470 REQUEST_FAIL_PROXY, //!< Call to proxy modules failed.
471 REQUEST_FAIL_PROXY_SEND, //!< Proxy_send didn't like it.
472 REQUEST_FAIL_NO_RESPONSE, //!< We weren't told to respond, so we reject.
473 REQUEST_FAIL_HOME_SERVER, //!< The home server didn't respond.
474 REQUEST_FAIL_HOME_SERVER2, //!< Another case of the above.
475 REQUEST_FAIL_HOME_SERVER3, //!< Another case of the above.
476 REQUEST_FAIL_NORMAL_REJECT, //!< Authentication failure.
477 REQUEST_FAIL_SERVER_TIMEOUT //!< The server took too long to process the request.
483 * We really shouldn't have this many.
485 extern char const *progname;
486 extern log_debug_t debug_flag;
487 extern char const *radacct_dir;
488 extern char const *radlog_dir;
489 extern char const *radlib_dir;
490 extern char const *radius_libdir;
491 extern uint32_t expiration_seconds;
492 extern bool log_stripped_names;
493 extern bool log_auth_detail;
494 extern char const *radiusd_version;
495 void radius_signal_self(int flag);
497 #define RADIUS_SIGNAL_SELF_NONE (0)
498 #define RADIUS_SIGNAL_SELF_HUP (1 << 0)
499 #define RADIUS_SIGNAL_SELF_TERM (1 << 1)
500 #define RADIUS_SIGNAL_SELF_EXIT (1 << 2)
501 #define RADIUS_SIGNAL_SELF_DETAIL (1 << 3)
502 #define RADIUS_SIGNAL_SELF_NEW_FD (1 << 4)
503 #define RADIUS_SIGNAL_SELF_MAX (1 << 5)
506 * Function prototypes.
510 int rad_accounting(REQUEST *);
513 int rad_check_ts(uint32_t nasaddr, uint32_t nas_port, char const *user, char const *sessionid);
514 int session_zap(REQUEST *request, uint32_t nasaddr,
515 uint32_t nas_port, char const *user,
516 char const *sessionid, uint32_t cliaddr,
517 char proto, int session_time);
521 void debug_pair(VALUE_PAIR *);
522 void debug_pair_list(VALUE_PAIR *);
523 void rdebug_pair_list(int, REQUEST *, VALUE_PAIR *);
524 int log_err (char *);
527 #define MEM(x) if (!(x)) { ERROR("Out of memory"); exit(1); }
528 void (*reset_signal(int signo, void (*func)(int)))(int);
529 void request_free(REQUEST **request);
530 int request_opaque_free(REQUEST *request);
531 int rad_mkdir(char *directory, mode_t mode);
532 void *rad_malloc(size_t size); /* calls exit(1) on error! */
533 void rad_const_free(void const *ptr);
534 REQUEST *request_alloc(TALLOC_CTX *ctx);
535 REQUEST *request_alloc_fake(REQUEST *oldreq);
536 REQUEST *request_alloc_coa(REQUEST *request);
537 int request_data_add(REQUEST *request,
538 void *unique_ptr, int unique_int,
539 void *opaque, bool free_opaque);
540 void *request_data_get(REQUEST *request,
541 void *unique_ptr, int unique_int);
542 void *request_data_reference(REQUEST *request,
543 void *unique_ptr, int unique_int);
544 int rad_copy_string(char *dst, char const *src);
545 int rad_copy_string_bare(char *dst, char const *src);
546 int rad_copy_variable(char *dst, char const *from);
547 uint32_t rad_pps(uint32_t *past, uint32_t *present, time_t *then, struct timeval *now);
548 int rad_expand_xlat(REQUEST *request, char const *cmd,
549 int max_argc, char *argv[], bool can_fail,
550 size_t argv_buflen, char *argv_buf);
551 void rad_regcapture(REQUEST *request, int compare, char const *value,
552 regmatch_t rxmatch[]);
553 void verify_request(REQUEST *request); /* only for special debug builds */
556 RADCLIENT_LIST *clients_init(CONF_SECTION *cs);
557 void clients_free(RADCLIENT_LIST *clients);
558 RADCLIENT_LIST *clients_parse_section(CONF_SECTION *section, bool tls_required);
559 void client_free(RADCLIENT *client);
560 int client_add(RADCLIENT_LIST *clients, RADCLIENT *client);
561 #ifdef WITH_DYNAMIC_CLIENTS
562 void client_delete(RADCLIENT_LIST *clients, RADCLIENT *client);
563 RADCLIENT *client_from_request(RADCLIENT_LIST *clients, REQUEST *request);
565 RADCLIENT *client_from_query(TALLOC_CTX *ctx, char const *identifier, char const *secret, char const *shortname,
566 char const *type, char const *server, bool require_ma);
567 RADCLIENT *client_find(RADCLIENT_LIST const *clients,
568 fr_ipaddr_t const *ipaddr, int proto);
570 RADCLIENT *client_findbynumber(RADCLIENT_LIST const *clients,
572 RADCLIENT *client_find_old(fr_ipaddr_t const *ipaddr);
573 bool client_validate(RADCLIENT_LIST *clients, RADCLIENT *master, RADCLIENT *c);
574 RADCLIENT *client_read(char const *filename, int in_server, int flag);
578 int pairlist_read(TALLOC_CTX *ctx, char const *file, PAIR_LIST **list, int complain);
579 void pairlist_free(PAIR_LIST **);
582 int rad_check_lib_magic(uint64_t magic);
583 int ssl_check_consistency(void);
584 char const *ssl_version_by_num(uint64_t version);
585 char const *ssl_version_range(uint64_t low, uint64_t high);
586 char const *ssl_version(void);
590 char *auth_name(char *buf, size_t buflen, REQUEST *request, bool do_cli);
591 int rad_authenticate (REQUEST *);
592 int rad_postauth(REQUEST *);
593 int rad_virtual_server(REQUEST *);
596 pid_t radius_start_program(char const *cmd, REQUEST *request, bool exec_wait,
597 int *input_fd, int *output_fd,
598 VALUE_PAIR *input_pairs, bool shell_escape);
599 int radius_readfrom_program(REQUEST *request, int fd, pid_t pid, int timeout,
600 char *answer, int left);
601 int radius_exec_program(REQUEST *request, char const *cmd, bool exec_wait, bool shell_escape,
602 char *user_msg, size_t msg_len, int timeout,
603 VALUE_PAIR *input_pairs, VALUE_PAIR **output_pairs);
604 void exec_trigger(REQUEST *request, CONF_SECTION *cs, char const *name, int quench)
605 CC_HINT(nonnull (3));
608 int paircompare_register(DICT_ATTR const *attribute, DICT_ATTR const *from,
609 bool first_only, RAD_COMPARE_FUNC func, void *instance);
610 void paircompare_unregister(DICT_ATTR const *attr, RAD_COMPARE_FUNC func);
611 void paircompare_unregister_instance(void *instance);
612 int paircompare(REQUEST *request, VALUE_PAIR *req_list,
613 VALUE_PAIR *check, VALUE_PAIR **rep_list);
614 value_pair_tmpl_t *radius_xlat2tmpl(TALLOC_CTX *ctx, xlat_exp_t *xlat);
615 int radius_xlat_do(REQUEST *request, VALUE_PAIR *vp);
616 int radius_compare_vps(REQUEST *request, VALUE_PAIR *check, VALUE_PAIR *vp);
617 int radius_callback_compare(REQUEST *request, VALUE_PAIR *req,
618 VALUE_PAIR *check, VALUE_PAIR *check_pairs,
619 VALUE_PAIR **reply_pairs);
620 int radius_find_compare(DICT_ATTR const *attribute);
621 VALUE_PAIR *radius_paircreate(TALLOC_CTX *ctx, VALUE_PAIR **vps, unsigned int attribute, unsigned int vendor);
623 void module_failure_msg(REQUEST *request, char const *fmt, ...) CC_HINT(format (printf, 2, 3));
624 void vmodule_failure_msg(REQUEST *request, char const *fmt, va_list ap) CC_HINT(format (printf, 2, 0));
627 * Less code == fewer bugs
629 * @param _a attribute
633 #define pairmake_packet(_a, _b, _c) pairmake(request->packet, &request->packet->vps, _a, _b, _c)
634 #define pairmake_reply(_a, _b, _c) pairmake(request->reply, &request->reply->vps, _a, _b, _c)
635 #define pairmake_config(_a, _b, _c) pairmake(request, &request->config_items, _a, _b, _c)
639 typedef size_t (*RADIUS_ESCAPE_STRING)(REQUEST *, char *out, size_t outlen, char const *in, void *arg);
641 ssize_t radius_xlat(char *out, size_t outlen, REQUEST *request, char const *fmt, RADIUS_ESCAPE_STRING escape,
643 CC_HINT(nonnull (1 ,3 ,4));
645 ssize_t radius_axlat(char **out, REQUEST *request, char const *fmt, RADIUS_ESCAPE_STRING escape, void *escape_ctx)
646 CC_HINT(nonnull (1, 2, 3));
648 ssize_t radius_axlat_struct(char **out, REQUEST *request, xlat_exp_t const *xlat, RADIUS_ESCAPE_STRING escape,
650 CC_HINT(nonnull (1, 2, 3));
652 typedef ssize_t (*RAD_XLAT_FUNC)(void *instance, REQUEST *, char const *, char *, size_t);
653 int xlat_register(char const *module, RAD_XLAT_FUNC func, RADIUS_ESCAPE_STRING escape,
655 void xlat_unregister(char const *module, RAD_XLAT_FUNC func, void *instance);
656 ssize_t xlat_fmt_to_ref(uint8_t const **out, REQUEST *request, char const *fmt);
657 void xlat_free(void);
660 extern int thread_pool_init(CONF_SECTION *cs, bool *spawn_flag);
661 extern void thread_pool_stop(void);
662 extern int thread_pool_addrequest(REQUEST *, RAD_REQUEST_FUNP);
663 extern pid_t rad_fork(void);
664 extern pid_t rad_waitpid(pid_t pid, int *status);
665 extern int total_active_threads(void);
666 extern void thread_pool_lock(void);
667 extern void thread_pool_unlock(void);
668 extern void thread_pool_queue_stats(int array[RAD_LISTEN_MAX], int pps[2]);
670 #ifndef HAVE_PTHREAD_H
671 #define rad_fork(n) fork()
672 #define rad_waitpid(a,b) waitpid(a,b, 0)
676 /* Define a global config structure */
677 extern struct main_config_t main_config;
679 void set_radius_dir(TALLOC_CTX *ctx, char const *path);
680 char const *get_radius_dir(void);
681 int main_config_init(void);
682 int main_config_free(void);
683 void main_config_hup(void);
684 void hup_logfile(void);
685 void fr_suid_down(void);
686 void fr_suid_up(void);
687 void fr_suid_down_permanent(void);
690 void listen_free(rad_listen_t **head);
691 int listen_init(CONF_SECTION *cs, rad_listen_t **head, bool spawn_flag);
692 rad_listen_t *proxy_new_listener(home_server_t *home, uint16_t src_port);
693 RADCLIENT *client_listener_find(rad_listen_t *listener, fr_ipaddr_t const *ipaddr, uint16_t src_port);
696 RADCLIENT_LIST *listener_find_client_list(fr_ipaddr_t const *ipaddr, uint16_t port);
698 rad_listen_t *listener_find_byipaddr(fr_ipaddr_t const *ipaddr, uint16_t port, int proto);
699 int rad_status_server(REQUEST *request);
702 typedef enum event_corral_t {
703 EVENT_CORRAL_MAIN = 0, //!< Always main thread event list
704 EVENT_CORRAL_AUX //!< Maybe main thread or one shared by modules
707 fr_event_list_t *radius_event_list_corral(event_corral_t hint);
708 int radius_event_init(TALLOC_CTX *ctx);
709 int radius_event_start(CONF_SECTION *cs, bool spawn_flag);
710 void radius_event_free(void);
711 int radius_event_process(void);
712 void radius_update_listener(rad_listen_t *listener);
713 void revive_home_server(void *ctx);
714 void mark_home_server_dead(home_server_t *home, struct timeval *when);
717 typedef struct fr_cond_t fr_cond_t;
718 typedef int (*radius_tmpl_getvalue_t)(VALUE_PAIR **out, REQUEST *request, value_pair_map_t const *map, void *ctx);
720 int radius_evaluate_tmpl(REQUEST *request, int modreturn, int depth,
721 value_pair_tmpl_t const *vpt);
722 int radius_evaluate_map(REQUEST *request, int modreturn, int depth,
724 int radius_evaluate_cond(REQUEST *request, int modreturn, int depth,
726 void radius_pairmove(REQUEST *request, VALUE_PAIR **to, VALUE_PAIR *from, bool do_xlat) CC_HINT(nonnull);
728 VALUE_PAIR **radius_list(REQUEST *request, pair_lists_t list);
729 TALLOC_CTX *radius_list_ctx(REQUEST *request, pair_lists_t list_name);
730 pair_lists_t radius_list_name(char const **name, pair_lists_t unknown);
731 int radius_request(REQUEST **request, request_refs_t name);
732 request_refs_t radius_request_name(char const **name, request_refs_t unknown);
734 int radius_mapexec(VALUE_PAIR **out, REQUEST *request, value_pair_map_t const *map);
735 int CC_HINT(nonnull (1,2,3)) radius_map2vp(VALUE_PAIR **out, REQUEST *request, value_pair_map_t const *map, void *ctx);
736 int radius_map2request(REQUEST *request, value_pair_map_t const *map,
737 char const *src, radius_tmpl_getvalue_t func, void *ctx);
739 int radius_strpair2map(value_pair_map_t **out, REQUEST *request, char const *raw,
740 request_refs_t dst_request_def, pair_lists_t dst_list_def,
741 request_refs_t src_request_def, pair_lists_t src_list_def);
742 int radius_vpt_get_vp(VALUE_PAIR **out, REQUEST *request, value_pair_tmpl_t const *vpt);
743 int radius_get_vp(VALUE_PAIR **out, REQUEST *request, char const *name);
744 int radius_vpt_copy_vp(VALUE_PAIR **out, REQUEST *request, value_pair_tmpl_t const *vpt);
745 int radius_copy_vp(VALUE_PAIR **out, REQUEST *request, char const *name);
749 * For run-time patching of which function handles which socket.
751 int dual_tls_recv(rad_listen_t *listener);
752 int dual_tls_send(rad_listen_t *listener, REQUEST *request);
753 int proxy_tls_recv(rad_listen_t *listener);
754 int proxy_tls_send(rad_listen_t *listener, REQUEST *request);
758 * For radmin over TCP.
760 #define PW_RADMIN_PORT 18120