The FreeRADIUS server  $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
Data Structures | Macros | Typedefs | Functions | Variables
control_test.c File Reference
#include <freeradius-devel/io/control.h>
#include <freeradius-devel/util/debug.h>
#include <freeradius-devel/util/syserror.h>
#include <freeradius-devel/util/talloc.h>
#include <freeradius-devel/util/time.h>
#include <sys/event.h>
#include <stdio.h>
#include <string.h>
#include <pthread.h>
+ Include dependency graph for control_test.c:

Go to the source code of this file.

Data Structures

struct  my_message_t
 

Macros

#define CONTROL_MAGIC   0xabcd6809
 
#define MEM(x)   if (!(x)) { fprintf(stderr, "%s[%u] OUT OF MEMORY\n", __FILE__, __LINE__); _exit(EXIT_FAILURE); }
 
#define MPRINT1   if (debug_lvl) printf
 

Typedefs

typedef struct request_s request_t
 

Functions

static void * control_master (UNUSED void *arg)
 
static void * control_worker (UNUSED void *arg)
 
int main (int argc, char *argv[])
 
request_trequest_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 *request)
 
static NEVER_RETURNS void usage (void)
 

Variables

static fr_atomic_queue_taq
 
static int aq_size = 16
 
static fr_control_tcontrol = NULL
 
static int debug_lvl = 0
 
static int kq = -1
 
static size_t max_messages = 10
 
static fr_ring_buffer_trb = NULL
 

Data Structure Documentation

◆ my_message_t

struct my_message_t

Definition at line 78 of file control_test.c.

Data Fields
size_t counter
uint32_t header

Macro Definition Documentation

◆ CONTROL_MAGIC

#define CONTROL_MAGIC   0xabcd6809

Definition at line 43 of file control_test.c.

◆ MEM

#define MEM (   x)    if (!(x)) { fprintf(stderr, "%s[%u] OUT OF MEMORY\n", __FILE__, __LINE__); _exit(EXIT_FAILURE); }

Definition at line 41 of file control_test.c.

◆ MPRINT1

#define MPRINT1   if (debug_lvl) printf

Definition at line 42 of file control_test.c.

Typedef Documentation

◆ request_t

typedef struct request_s request_t

Definition at line 51 of file control_test.c.

Function Documentation

◆ control_master()

static void* control_master ( UNUSED void *  arg)
static

Definition at line 83 of file control_test.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ control_worker()

static void* control_worker ( UNUSED void *  arg)
static

Definition at line 141 of file control_test.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ main()

int main ( int  argc,
char *  argv[] 
)

Definition at line 175 of file control_test.c.

+ Here is the call graph for this function:

◆ request_alloc()

request_t* request_alloc ( UNUSED TALLOC_CTX *  ctx,
UNUSED request_init_args_t const *  args 
)

Definition at line 58 of file control_test.c.

◆ request_verify()

void request_verify ( UNUSED char const *  file,
UNUSED int  line,
UNUSED request_t request 
)

Definition at line 63 of file control_test.c.

◆ usage()

static NEVER_RETURNS void usage ( void  )
static

Definition at line 69 of file control_test.c.

+ Here is the caller graph for this function:

Variable Documentation

◆ aq

fr_atomic_queue_t* aq
static

Definition at line 47 of file control_test.c.

◆ aq_size

int aq_size = 16
static

Definition at line 49 of file control_test.c.

◆ control

fr_control_t* control = NULL
static

Definition at line 50 of file control_test.c.

◆ debug_lvl

int debug_lvl = 0
static

Definition at line 45 of file control_test.c.

◆ kq

int kq = -1
static

Definition at line 46 of file control_test.c.

◆ max_messages

size_t max_messages = 10
static

Definition at line 48 of file control_test.c.

◆ rb

fr_ring_buffer_t* rb = NULL
static

Definition at line 51 of file control_test.c.