The FreeRADIUS server
$Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
|
Control a running radiusd process. More...
#include <assert.h>
#include <pwd.h>
#include <grp.h>
#include <fcntl.h>
#include <freeradius-devel/server/cf_parse.h>
#include <freeradius-devel/server/cf_file.h>
#include <freeradius-devel/server/main_config.h>
#include <freeradius-devel/server/radmin.h>
#include <freeradius-devel/util/conf.h>
#include <freeradius-devel/util/md5.h>
#include <freeradius-devel/util/socket.h>
#include <freeradius-devel/util/atexit.h>
#include "conduit.h"
Go to the source code of this file.
Data Structures | |
struct | radmin_conn_t |
A connection to a server. More... | |
struct | radmin_state_t |
Radmin state. More... | |
Macros | |
#define | add_history(line) |
#define | LOG_PREFIX "radmin" |
#define | MAX_COMMANDS (256) |
#define | MAX_STACK (64) |
#define | radmin_free(_x) |
#define | write_history(history_file) |
Enumerations | |
enum | radmin_conn_type_t { RADMIN_CONN_NONE = 0 , RADMIN_CONN_UNIX , RADMIN_CONN_TCP } |
Functions | |
static int | check_server (CONF_SECTION *subcs, uid_t uid, gid_t gid, char const **file_p, char const **server_p) |
static int | client_socket (char const *server) |
static ssize_t | cmd_copy (char const *cmd) |
static int | cmd_test (FILE *fp, UNUSED FILE *fp_err, UNUSED void *ctx, UNUSED fr_cmd_info_t const *info) |
static ssize_t | do_challenge (int fd) |
static int | do_connect (int *out, char const *file, char const *server) |
static ssize_t | flush_conduits (int fd, char *buffer, size_t bufsize) |
static int | local_command (char *line) |
int | main (int argc, char **argv) |
static char * | my_readline (char const *prompt, FILE *fp_in, FILE *fp_out) |
static ssize_t | run_command (int fd, char const *command, char *buffer, size_t bufsize) |
static NEVER_RETURNS void | usage (int status) |
Variables | |
static char | cmd_buffer [65536] |
static fr_cmd_table_t | cmd_table [] |
static bool | echo = false |
Main radmin state. More... | |
static char | io_buffer [65536] |
static fr_cmd_t * | local_cmds = NULL |
static fr_cmd_info_t | local_info |
static char const * | progname = "radmin" |
static fr_log_t | radmin_log |
static char const * | radmin_version = RADIUSD_VERSION_BUILD("radmin") |
static char * | readline_buffer [1024] |
static char const * | secret = "" |
static int | sockfd = -1 |
static char * | stack [MAX_STACK] |
static int | stack_depth |
static bool | unbuffered = false |
static bool | use_readline = true |
Control a running radiusd process.
Definition in file radmin.c.
struct radmin_conn_t |
Data Fields | ||
---|---|---|
fr_cs_buffer_t | co | |
bool | connected | Whether this connection is currently connected. |
fr_event_list_t * | event_list | Event list this fd is serviced by. |
int | fd | Control socket descriptor. |
char * | last_command | Last command we executed on this connection. |
bool | nonblock | Whether this connection should operate in non-blocking mode. |
char * | secret | We use to authenticate ourselves to the server. |
char * | server | Path or FQDN of server we're connected to. |
radmin_conn_type_t | type | Type of connection. |
struct radmin_state_t |
Radmin state.
Many of the readline functions don't take callbacks, so we need to use a global structure to communicate radmin state.
Data Fields | ||
---|---|---|
radmin_conn_t * | active_conn | Connection to remote entity. |
fr_event_list_t * | event_list | Our main event list. |
enum radmin_conn_type_t |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
int main | ( | int | argc, |
char ** | argv | ||
) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |