The FreeRADIUS server
$Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
|
#include <freeradius-devel/io/control.h>
#include <freeradius-devel/io/listen.h>
#include <freeradius-devel/io/worker.h>
#include <freeradius-devel/util/debug.h>
#include <freeradius-devel/util/syserror.h>
#include <freeradius-devel/util/talloc.h>
#include <pthread.h>
#include <signal.h>
#include <sys/event.h>
Go to the source code of this file.
Data Structures | |
struct | fr_schedule_worker_t |
Scheduler specific information for worker threads. More... | |
Macros | |
#define | MAX_CONTROL_PLANE (1024) |
#define | MAX_KEVENTS (10) |
#define | MAX_MESSAGES (2048) |
#define | MAX_WORKERS (1024) |
#define | MPRINT1 if (debug_lvl) printf |
#define | MPRINT2 if (debug_lvl > 1) printf |
Typedefs | |
typedef struct request_s | request_t |
Functions | |
int | main (int argc, char *argv[]) |
static void | master_process (void) |
request_t * | request_alloc (UNUSED TALLOC_CTX *ctx, UNUSED request_init_args_t const *args) |
void | request_verify (UNUSED char const *file, UNUSED int line, UNUSED request_t const *request) |
static void | sig_ignore (int sig) |
static int | test_decode (UNUSED void const *instance, request_t *request, uint8_t *const data, size_t data_len) |
static ssize_t | test_encode (void const *instance, request_t *request, uint8_t *const data, size_t data_len) |
static size_t | test_nak (UNUSED void const *instance, void *packet_ctx, uint8_t *const packet, size_t packet_len, uint8_t *reply, UNUSED size_t reply_len) |
static rlm_rcode_t | test_process (UNUSED void const *inst, request_t *request, fr_io_action_t action) |
static NEVER_RETURNS void | usage (void) |
static void * | worker_thread (void *arg) |
Variables | |
static fr_app_io_t | app_io |
static fr_atomic_queue_t * | aq_master |
static fr_control_t * | control_master |
static int | debug_lvl = 0 |
static int | kq_master |
static int | max_control_plane = 0 |
static int | max_messages = 10 |
static int | max_outstanding = 1 |
static int | num_workers = 1 |
static bool | quiet = false |
static bool | touch_memory = false |
static fr_schedule_worker_t | workers [MAX_WORKERS] |
struct fr_schedule_worker_t |
Scheduler specific information for worker threads.
Wraps a fr_worker_t, tracking additional information that the scheduler uses.
Definition at line 83 of file schedule.c.
Data Fields | ||
---|---|---|
fr_channel_t * | ch | channel for communicating with the worker |
fr_time_t | cpu_time | how much CPU time this worker has used |
TALLOC_CTX * | ctx | our allocation ctx |
fr_event_list_t * | el | our event list |
fr_dlist_t | entry | our entry into the linked list of workers |
unsigned int | id |
a unique ID ID of the worker 0..N. |
int | id | ID of the worker 0..N. |
pthread_t | pthread_id |
the thread of this worker pthread ID of the worker |
fr_schedule_t * | sc | the scheduler we are running under |
fr_schedule_child_status_t | status | status of the worker |
int | uses | how many network threads are using it |
fr_worker_t * | worker |
the worker data structure pointer to the worker |
#define MAX_CONTROL_PLANE (1024) |
Definition at line 42 of file worker_test.c.
#define MAX_KEVENTS (10) |
Definition at line 43 of file worker_test.c.
#define MAX_MESSAGES (2048) |
Definition at line 41 of file worker_test.c.
#define MAX_WORKERS (1024) |
Definition at line 44 of file worker_test.c.
Definition at line 46 of file worker_test.c.
Definition at line 47 of file worker_test.c.
Definition at line 66 of file worker_test.c.
int main | ( | int | argc, |
char * | argv[] | ||
) |
|
static |
Definition at line 188 of file worker_test.c.
request_t* request_alloc | ( | UNUSED TALLOC_CTX * | ctx, |
UNUSED request_init_args_t const * | args | ||
) |
Definition at line 71 of file worker_test.c.
Definition at line 76 of file worker_test.c.
|
static |
|
static |
Definition at line 119 of file worker_test.c.
|
static |
Definition at line 127 of file worker_test.c.
|
static |
|
static |
|
static |
Definition at line 150 of file worker_test.c.
|
static |
Definition at line 142 of file worker_test.c.
|
static |
Definition at line 58 of file worker_test.c.
|
static |
Definition at line 59 of file worker_test.c.
|
static |
Definition at line 56 of file worker_test.c.
|
static |
Definition at line 57 of file worker_test.c.
|
static |
Definition at line 61 of file worker_test.c.
|
static |
Definition at line 60 of file worker_test.c.
|
static |
Definition at line 62 of file worker_test.c.
|
static |
Definition at line 64 of file worker_test.c.
Definition at line 65 of file worker_test.c.
Definition at line 63 of file worker_test.c.
|
static |
Definition at line 66 of file worker_test.c.