2 * command.c Command socket processing.
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20 * Copyright 2008 The FreeRADIUS server project
21 * Copyright 2008 Alan DeKok <aland@deployingradius.com>
24 #ifdef WITH_COMMAND_SOCKET
26 #include <freeradius-devel/modpriv.h>
27 #include <freeradius-devel/conffile.h>
33 #ifdef HAVE_SYS_STAT_H
45 typedef struct fr_command_table_t fr_command_table_t;
47 typedef int (*fr_command_func_t)(rad_listen_t *, int, char *argv[]);
49 struct fr_command_table_t {
52 fr_command_func_t func;
53 fr_command_table_t *table;
56 #define COMMAND_BUFFER_SIZE (1024)
58 typedef struct fr_command_socket_t {
67 char buffer[COMMAND_BUFFER_SIZE];
68 } fr_command_socket_t;
70 static const CONF_PARSER command_config[] = {
71 { "socket", PW_TYPE_STRING_PTR,
72 offsetof(fr_command_socket_t, path), NULL, "${run_dir}/radiusd.sock"},
73 { "uid", PW_TYPE_STRING_PTR,
74 offsetof(fr_command_socket_t, uid_name), NULL, NULL},
75 { "gid", PW_TYPE_STRING_PTR,
76 offsetof(fr_command_socket_t, gid_name), NULL, NULL},
78 { NULL, -1, 0, NULL, NULL } /* end the list */
81 static ssize_t cprintf(rad_listen_t *listener, const char *fmt, ...)
83 __attribute__ ((format (printf, 2, 3)))
87 #ifndef HAVE_GETPEEREID
88 static int getpeereid(int s, uid_t *euid, gid_t *egid)
94 socklen_t cl = sizeof(cr);
96 if (getsockopt(s, SOL_SOCKET, SO_PEERCRED, &cr, &cl) < 0) {
103 #endif /* SO_PEERCRED */
105 #endif /* HAVE_GETPEEREID */
108 static int fr_server_domain_socket(const char *path)
113 struct sockaddr_un salocal;
117 if (len >= sizeof(salocal.sun_path)) {
118 radlog(L_ERR, "Path too long in socket filename.");
122 if ((sockfd = socket(AF_UNIX, SOCK_STREAM, 0)) < 0) {
123 radlog(L_ERR, "Failed creating socket: %s",
128 memset(&salocal, 0, sizeof(salocal));
129 salocal.sun_family = AF_UNIX;
130 memcpy(salocal.sun_path, path, len); /* not zero terminated */
132 socklen = sizeof(salocal.sun_family) + len;
137 if (stat(path, &buf) < 0) {
138 if (errno != ENOENT) {
139 radlog(L_ERR, "Failed to stat %s: %s",
140 path, strerror(errno));
145 * FIXME: Check the enclosing directory?
147 } else { /* it exists */
148 if (!S_ISREG(buf.st_mode)
150 && !S_ISSOCK(buf.st_mode)
153 radlog(L_ERR, "Cannot turn %s into socket", path);
158 * Refuse to open sockets not owned by us.
160 if (buf.st_uid != geteuid()) {
161 radlog(L_ERR, "We do not own %s", path);
165 if (unlink(path) < 0) {
166 radlog(L_ERR, "Failed to delete %s: %s",
167 path, strerror(errno));
172 if (bind(sockfd, (struct sockaddr *)&salocal, socklen) < 0) {
173 radlog(L_ERR, "Failed binding to %s: %s",
174 path, strerror(errno));
180 * FIXME: There's a race condition here. But Linux
181 * doesn't seem to permit fchmod on domain sockets.
183 if (chmod(path, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP) < 0) {
184 radlog(L_ERR, "Failed setting permissions on %s: %s",
185 path, strerror(errno));
190 if (listen(sockfd, 8) < 0) {
191 radlog(L_ERR, "Failed listening to %s: %s",
192 path, strerror(errno));
201 if ((flags = fcntl(sockfd, F_GETFL, NULL)) < 0) {
202 radlog(L_ERR, "Failure getting socket flags: %s",
209 if( fcntl(sockfd, F_SETFL, flags) < 0) {
210 radlog(L_ERR, "Failure setting socket flags: %s",
222 static ssize_t cprintf(rad_listen_t *listener, const char *fmt, ...)
229 len = vsnprintf(buffer, sizeof(buffer), fmt, ap);
232 if (listener->status == RAD_LISTEN_STATUS_CLOSED) return 0;
234 len = write(listener->fd, buffer, len);
236 listener->status = RAD_LISTEN_STATUS_CLOSED;
237 event_new_fd(listener);
241 * FIXME: Keep writing until done?
246 static int command_hup(rad_listen_t *listener, int argc, char *argv[])
249 module_instance_t *mi;
252 radius_signal_self(RADIUS_SIGNAL_SELF_HUP);
256 cs = cf_section_find("modules");
259 mi = find_module_instance(cs, argv[0], 0);
261 cprintf(listener, "ERROR: No such module \"%s\"\n", argv[0]);
265 if ((mi->entry->module->type & RLM_TYPE_HUP_SAFE) == 0) {
266 cprintf(listener, "ERROR: Module %s cannot be hup'd\n",
271 if (!module_hup_module(mi->cs, mi, time(NULL))) {
272 cprintf(listener, "ERROR: Failed to reload module\n");
276 return 1; /* success */
279 static int command_terminate(UNUSED rad_listen_t *listener,
280 UNUSED int argc, UNUSED char *argv[])
282 radius_signal_self(RADIUS_SIGNAL_SELF_TERM);
284 return 1; /* success */
287 extern time_t fr_start_time;
289 static int command_uptime(rad_listen_t *listener,
290 UNUSED int argc, UNUSED char *argv[])
294 CTIME_R(&fr_start_time, buffer, sizeof(buffer));
295 cprintf(listener, "Up since %s", buffer); /* no \r\n */
297 return 1; /* success */
300 static const char *tabs = "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t";
303 * FIXME: Recurse && indent?
305 static void cprint_conf_parser(rad_listen_t *listener, int indent, CONF_SECTION *cs,
311 const char *name1 = cf_section_name1(cs);
312 const char *name2 = cf_section_name2(cs);
313 const CONF_PARSER *variables = cf_section_parse_table(cs);
317 cprintf(listener, "%.*s%s %s {\n", indent, tabs, name1, name2);
319 cprintf(listener, "%.*s%s {\n", indent, tabs, name1);
327 if (variables) for (i = 0; variables[i].name != NULL; i++) {
329 * No base struct offset, data must be the pointer.
330 * If data doesn't exist, ignore the entry, there
331 * must be something wrong.
334 if (!variables[i].data) {
338 data = variables[i].data;;
340 } else if (variables[i].data) {
341 data = variables[i].data;;
344 data = (((char *)base) + variables[i].offset);
347 switch (variables[i].type) {
349 cprintf(listener, "%.*s%s = ?\n", indent, tabs,
353 case PW_TYPE_INTEGER:
354 cprintf(listener, "%.*s%s = %u\n", indent, tabs,
355 variables[i].name, *(int *) data);
359 inet_ntop(AF_INET, data, buffer, sizeof(buffer));
362 case PW_TYPE_IPV6ADDR:
363 inet_ntop(AF_INET6, data, buffer, sizeof(buffer));
366 case PW_TYPE_BOOLEAN:
367 cprintf(listener, "%.*s%s = %s\n", indent, tabs,
369 ((*(int *) data) == 0) ? "no" : "yes");
372 case PW_TYPE_STRING_PTR:
373 case PW_TYPE_FILENAME:
375 * FIXME: Escape things in the string!
377 if (*(char **) data) {
378 cprintf(listener, "%.*s%s = \"%s\"\n", indent, tabs,
379 variables[i].name, *(char **) data);
381 cprintf(listener, "%.*s%s = \n", indent, tabs,
391 cprintf(listener, "%.*s}\n", indent, tabs);
394 static int command_show_module_config(rad_listen_t *listener, int argc, char *argv[])
397 module_instance_t *mi;
400 cprintf(listener, "ERROR: No module name was given\n");
404 cs = cf_section_find("modules");
407 mi = find_module_instance(cs, argv[0], 0);
409 cprintf(listener, "ERROR: No such module \"%s\"\n", argv[0]);
413 cprint_conf_parser(listener, 0, mi->cs, mi->insthandle);
415 return 1; /* success */
418 static const char *method_names[RLM_COMPONENT_COUNT] = {
430 static int command_show_module_methods(rad_listen_t *listener, int argc, char *argv[])
434 const module_instance_t *mi;
438 cprintf(listener, "ERROR: No module name was given\n");
442 cs = cf_section_find("modules");
445 mi = find_module_instance(cs, argv[0], 0);
447 cprintf(listener, "ERROR: No such module \"%s\"\n", argv[0]);
451 mod = mi->entry->module;
453 for (i = 0; i < RLM_COMPONENT_COUNT; i++) {
454 if (mod->methods[i]) cprintf(listener, "\t%s\n", method_names[i]);
457 return 1; /* success */
461 static int command_show_module_flags(rad_listen_t *listener, int argc, char *argv[])
464 const module_instance_t *mi;
468 cprintf(listener, "ERROR: No module name was given\n");
472 cs = cf_section_find("modules");
475 mi = find_module_instance(cs, argv[0], 0);
477 cprintf(listener, "ERROR: No such module \"%s\"\n", argv[0]);
481 mod = mi->entry->module;
483 if ((mod->type & RLM_TYPE_THREAD_SAFE) != 0)
484 cprintf(listener, "\tthread-safe\n");
487 if ((mod->type & RLM_TYPE_CHECK_CONFIG_SAFE) != 0)
488 cprintf(listener, "\twill-check-config\n");
491 if ((mod->type & RLM_TYPE_HUP_SAFE) != 0)
492 cprintf(listener, "\treload-on-hup\n");
494 return 1; /* success */
499 * Show all loaded modules
501 static int command_show_modules(rad_listen_t *listener, UNUSED int argc, UNUSED char *argv[])
503 CONF_SECTION *cs, *subcs;
505 cs = cf_section_find("modules");
509 while ((subcs = cf_subsection_find_next(cs, subcs, NULL)) != NULL) {
510 const char *name1 = cf_section_name1(subcs);
511 const char *name2 = cf_section_name2(subcs);
513 module_instance_t *mi;
516 mi = find_module_instance(cs, name2, 0);
519 cprintf(listener, "\t%s (%s)\n", name2, name1);
521 mi = find_module_instance(cs, name1, 0);
524 cprintf(listener, "\t%s\n", name1);
528 return 1; /* success */
531 static int command_show_xml(rad_listen_t *listener, UNUSED int argc, UNUSED char *argv[])
534 FILE *fp = fdopen(dup(listener->fd), "a");
537 cprintf(listener, "ERROR: Can't dup %s\n", strerror(errno));
542 cprintf(listener, "ERROR: <reference> is required\n");
546 ci = cf_reference_item(mainconfig.config, mainconfig.config, argv[0]);
548 cprintf(listener, "ERROR: No such item <reference>\n");
552 if (cf_item_is_section(ci)) {
553 cf_section2xml(fp, cf_itemtosection(ci));
555 } else if (cf_item_is_pair(ci)) {
556 cf_pair2xml(fp, cf_itemtopair(ci));
559 cprintf(listener, "ERROR: No such item <reference>\n");
566 return 1; /* success */
569 static int command_debug_level(rad_listen_t *listener, int argc, char *argv[])
574 cprintf(listener, "ERROR: Must specify <number>\n");
578 number = atoi(argv[0]);
579 if ((number < 0) || (number > 4)) {
580 cprintf(listener, "ERROR: <number> must be between 0 and 4\n");
584 fr_debug_flag = debug_flag = number;
589 extern char *debug_log_file;
590 static int command_debug_file(rad_listen_t *listener, int argc, char *argv[])
593 cprintf(listener, "ERROR: Must specify <filename>\n");
597 if (debug_log_file) {
598 free(debug_log_file);
599 debug_log_file = NULL;
601 debug_log_file = strdup(argv[0]);
606 extern char *debug_condition;
607 static int command_debug_condition(rad_listen_t *listener, int argc, char *argv[])
610 * Delete old condition.
612 * This is thread-safe because the condition is evaluated
613 * in the main server thread, as is this code.
615 free(debug_condition);
616 debug_condition = NULL;
625 debug_condition = strdup(argv[0]);
630 static fr_command_table_t command_table_debug[] = {
632 "debug condition <condition> - Enable debugging for requests matching <condition>",
633 command_debug_condition, NULL },
636 "debug level <number> - Set debug level to <number>. Higher is more debugging.",
637 command_debug_level, NULL },
640 "debug file <filename> - Send all debuggin output to <filename>",
641 command_debug_file, NULL },
643 { NULL, NULL, NULL, NULL }
646 static fr_command_table_t command_table_show_module[] = {
648 "show module config <module> - show configuration for <module>",
649 command_show_module_config, NULL },
651 "show module flags <module> - show other module properties",
652 command_show_module_flags, NULL },
654 "shows list of loaded modules",
655 command_show_modules, NULL },
657 "show module methods <module> - show sections where <module> may be used",
658 command_show_module_methods, NULL },
660 { NULL, NULL, NULL, NULL }
664 static fr_command_table_t command_table_show[] = {
666 "show config <module> - show configuration for module",
667 command_show_module_config, NULL },
669 "show module <command> - do sub-command of module",
670 NULL, command_table_show_module },
672 "show modules - shows list of loaded modules",
673 command_show_modules, NULL },
675 "show uptime - shows time at which server started",
676 command_uptime, NULL },
678 "show xml <reference> - Prints out configuration as XML",
679 command_show_xml, NULL },
680 { NULL, NULL, NULL, NULL }
684 static int command_set_module_config(rad_listen_t *listener, int argc, char *argv[])
689 module_instance_t *mi;
690 const CONF_PARSER *variables;
694 cprintf(listener, "ERROR: No module name or variable was given\n");
698 cs = cf_section_find("modules");
701 mi = find_module_instance(cs, argv[0], 0);
703 cprintf(listener, "ERROR: No such module \"%s\"\n", argv[0]);
707 if ((mi->entry->module->type & RLM_TYPE_HUP_SAFE) == 0) {
708 cprintf(listener, "ERROR: Cannot change configuration of module as it is cannot be HUP'd.\n");
712 variables = cf_section_parse_table(mi->cs);
714 cprintf(listener, "ERROR: Cannot find configuration for module\n");
719 for (i = 0; variables[i].name != NULL; i++) {
721 * FIXME: Recurse into sub-types somehow...
723 if (variables[i].type == PW_TYPE_SUBSECTION) continue;
725 if (strcmp(variables[i].name, argv[1]) == 0) {
732 cprintf(listener, "ERROR: No such variable \"%s\"\n", argv[1]);
736 i = rcode; /* just to be safe */
739 * It's not part of the dynamic configuration. The module
740 * needs to re-parse && validate things.
742 if (variables[i].data) {
743 cprintf(listener, "ERROR: Variable cannot be dynamically updated\n");
747 data = ((char *) mi->insthandle) + variables[i].offset;
749 cp = cf_pair_find(mi->cs, argv[1]);
753 * Replace the OLD value in the configuration file with
756 * FIXME: Parse argv[2] depending on it's data type!
757 * If it's a string, look for leading single/double quotes,
758 * end then call tokenize functions???
760 cf_pair_replace(mi->cs, cp, argv[2]);
762 rcode = cf_item_parse(mi->cs, argv[1], variables[i].type,
765 cprintf(listener, "ERROR: Failed to parse value\n");
769 return 1; /* success */
773 static fr_command_table_t command_table_set_module[] = {
775 "set module config <module> variable value - set configuration for <module>",
776 command_set_module_config, NULL },
778 { NULL, NULL, NULL, NULL }
782 static fr_command_table_t command_table_set[] = {
783 { "module", NULL, NULL, command_table_set_module },
785 { NULL, NULL, NULL, NULL }
789 static fr_command_table_t command_table[] = {
791 "debug <command> - debugging commands",
792 NULL, command_table_debug },
794 "hup [module] - sends a HUP signal to the server, or optionally to one module",
797 "terminate - terminates the server, and causes it to exit",
798 command_terminate, NULL },
799 { "show", NULL, NULL, command_table_show },
800 { "set", NULL, NULL, command_table_set },
802 { NULL, NULL, NULL, NULL }
807 * FIXME: Unix domain sockets!
809 static int command_socket_parse(CONF_SECTION *cs, rad_listen_t *this)
811 fr_command_socket_t *sock;
815 if (cf_section_parse(cs, sock, command_config) < 0) {
819 #if defined(HAVE_GETPEEREID) || defined (SO_PEERCRED)
820 if (sock->uid_name) {
823 pw = getpwnam(sock->uid_name);
825 radlog(L_ERR, "Failed getting uid for %s: %s",
826 sock->uid_name, strerror(errno));
830 sock->uid = pw->pw_uid;
833 if (sock->gid_name) {
836 gr = getgrnam(sock->gid_name);
838 radlog(L_ERR, "Failed getting gid for %s: %s",
839 sock->gid_name, strerror(errno));
842 sock->gid = gr->gr_gid;
845 #else /* can't get uid or gid of connecting user */
847 if (sock->uid_name || sock->gid_name) {
848 radlog(L_ERR, "System does not support uid or gid authentication for sockets");
855 * FIXME: check for absolute pathnames?
856 * check for uid/gid on the other end...
859 this->fd = fr_server_domain_socket(sock->path);
867 static int command_socket_print(rad_listen_t *this, char *buffer, size_t bufsize)
869 fr_command_socket_t *sock = this->data;
871 snprintf(buffer, bufsize, "command file %s", sock->path);
877 * String split routine. Splits an input string IN PLACE
878 * into pieces, based on spaces.
880 static int str2argv(char *str, char **argv, int max_argc)
887 if (argc >= max_argc) return argc;
890 * Chop out comments early.
897 while ((*str == ' ') ||
900 (*str == '\n')) *(str++) = '\0';
902 if (!*str) return argc;
904 if ((*str == '\'') || (*str == '"')) {
908 token = gettoken((const char **) &p, buffer,
910 if ((token != T_SINGLE_QUOTED_STRING) &&
911 (token != T_DOUBLE_QUOTED_STRING)) {
915 len = strlen(buffer);
916 if (len >= (size_t) (p - str)) {
920 memcpy(str, buffer, len + 1);
933 (*str != '\n')) str++;
939 #define MAX_ARGV (16)
942 * Check if an incoming request is "ok"
944 * It takes packets, not requests. It sees if the packet looks
945 * OK. If so, it does a number of sanity checks on it.
947 static int command_domain_recv(rad_listen_t *listener,
948 UNUSED RAD_REQUEST_FUNP *pfun,
949 UNUSED REQUEST **prequest)
954 char *my_argv[MAX_ARGV], **argv;
955 fr_command_table_t *table;
956 fr_command_socket_t *co = listener->data;
965 len = recv(listener->fd, co->buffer + co->offset,
966 sizeof(co->buffer) - co->offset - 1, 0);
967 if (len == 0) goto close_socket; /* clean close */
970 if ((errno == EAGAIN) || (errno == EINTR)) {
979 if ((co->offset == 0) && (co->buffer[0] == 0x04)) {
981 listener->status = RAD_LISTEN_STATUS_CLOSED;
982 event_new_fd(listener);
987 * See if there are multiple lines in the buffer.
989 p = co->buffer + co->offset;
992 for (c = 0; c < len; c++) {
993 if ((*p == '\r') || (*p == '\n')) {
998 * FIXME: do real buffering...
999 * handling of CTRL-C, etc.
1004 * \r \n followed by ASCII...
1015 * Saw CR/LF. Set next element, and exit.
1018 co->next = p - co->buffer;
1022 if (co->offset >= (ssize_t) (sizeof(co->buffer) - 1)) {
1023 radlog(L_ERR, "Line too long!");
1030 argc = str2argv(co->buffer, my_argv, MAX_ARGV);
1031 if (argc == 0) goto do_next; /* empty strings are OK */
1034 cprintf(listener, "ERROR: Failed parsing command.\n");
1040 for (len = 0; len <= co->offset; len++) {
1041 if (co->buffer[len] < 0x20) {
1042 co->buffer[len] = '\0';
1048 * Hard-code exit && quit.
1050 if ((strcmp(argv[0], "exit") == 0) ||
1051 (strcmp(argv[0], "quit") == 0)) goto close_socket;
1055 if (strcmp(argv[0], "login") != 0) {
1056 cprintf(listener, "ERROR: Login required\n");
1061 cprintf(listener, "ERROR: login <user> <password>\n");
1066 * FIXME: Generate && process fake RADIUS request.
1068 if ((strcmp(argv[1], "root") == 0) &&
1069 (strcmp(argv[2], "password") == 0)) {
1070 strlcpy(co->user, argv[1], sizeof(co->user));
1074 cprintf(listener, "ERROR: Login incorrect\n");
1079 table = command_table;
1082 for (i = 0; table[i].command != NULL; i++) {
1083 if (strcmp(table[i].command, argv[0]) == 0) {
1084 if (table[i].table) {
1086 * This is the last argument, but
1087 * there's a sub-table. Print help.
1091 table = table[i].table;
1097 table = table[i].table;
1102 rcode = table[i].func(listener,
1103 argc - 1, argv + 1);
1112 if ((strcmp(argv[0], "help") == 0) ||
1113 (strcmp(argv[0], "?") == 0)) {
1115 for (i = 0; table[i].command != NULL; i++) {
1116 if (table[i].help) {
1117 cprintf(listener, "%s\n",
1120 cprintf(listener, "%s <command> - do sub-command of %s\n",
1121 table[i].command, table[i].command);
1127 cprintf(listener, "ERROR: Unknown command \"%s\"\r\n",
1132 cprintf(listener, "radmin> ");
1134 if (co->next <= co->offset) {
1137 memmove(co->buffer, co->buffer + co->next,
1138 co->offset - co->next);
1139 co->offset -= co->next;
1146 static int command_domain_accept(rad_listen_t *listener,
1147 UNUSED RAD_REQUEST_FUNP *pfun,
1148 UNUSED REQUEST **prequest)
1154 struct sockaddr_storage src;
1155 fr_command_socket_t *sock = listener->data;
1157 salen = sizeof(src);
1159 DEBUG2(" ... new connection request on command socket.");
1161 newfd = accept(listener->fd, (struct sockaddr *) &src, &salen);
1164 * Non-blocking sockets must handle this.
1166 if (errno == EWOULDBLOCK) {
1170 DEBUG2(" ... failed to accept connection.");
1175 * Perform user authentication.
1177 if (sock->uid_name || sock->gid_name) {
1181 if (getpeereid(listener->fd, &uid, &gid) < 0) {
1182 radlog(L_ERR, "Failed getting peer credentials for %s: %s",
1183 sock->path, strerror(errno));
1188 if (sock->uid_name && (sock->uid != uid)) {
1189 radlog(L_ERR, "Unauthorized connection to %s from uid %ld",
1190 sock->path, (long int) uid);
1195 if (sock->gid_name && (sock->gid != gid)) {
1196 radlog(L_ERR, "Unauthorized connection to %s from gid %ld",
1197 sock->path, (long int) gid);
1204 * Write 32-bit magic number && version information.
1206 magic = htonl(0xf7eead15);
1207 if (write(newfd, &magic, 4) < 0) {
1208 radlog(L_ERR, "Failed writing initial data to socket: %s",
1213 magic = htonl(1); /* protocol version */
1214 if (write(newfd, &magic, 4) < 0) {
1215 radlog(L_ERR, "Failed writing initial data to socket: %s",
1223 * Add the new listener.
1225 this = listen_alloc(listener->type);
1226 if (!this) return -1;
1229 * Copy everything, including the pointer to the socket
1233 memcpy(this, listener, sizeof(*this));
1234 this->status = RAD_LISTEN_STATUS_INIT;
1236 this->data = sock; /* fix it back */
1239 sock->user[0] = '\0';
1240 sock->path = ((fr_command_socket_t *) listener->data)->path;
1243 this->recv = command_domain_recv;
1246 * Tell the event loop that we have a new FD
1255 * Send an authentication response packet
1257 static int command_domain_send(UNUSED rad_listen_t *listener,
1258 UNUSED REQUEST *request)
1264 static int command_socket_encode(UNUSED rad_listen_t *listener,
1265 UNUSED REQUEST *request)
1271 static int command_socket_decode(UNUSED rad_listen_t *listener,
1272 UNUSED REQUEST *request)
1277 #endif /* WITH_COMMAND_SOCKET */