The FreeRADIUS server  $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
Data Structures | Macros | Enumerations | Functions | Variables
base.c File Reference

Test state machine, which only does request and reply. More...

#include <freeradius-devel/server/protocol.h>
#include <freeradius-devel/util/debug.h>
#include <freeradius-devel/server/process.h>
+ Include dependency graph for base.c:

Go to the source code of this file.

Data Structures

struct  process_test_sections_t
 
struct  process_test_t
 

Macros

#define FR_TEST_CODE_MAX   (2)
 
#define FR_TEST_PACKET_CODE_VALID(_code)   ((_code == FR_TEST_REQUEST) || (_code == FR_TEST_REPLY))
 
#define PROCESS_CODE_MAX   FR_TEST_CODE_MAX
 
#define PROCESS_INST   process_test_t
 
#define PROCESS_PACKET_CODE_VALID   FR_TEST_PACKET_CODE_VALID
 
#define PROCESS_PACKET_TYPE   fr_test_packet_code_t
 

Enumerations

enum  fr_test_packet_code_t {
  FR_TEST_INVALID = 0 ,
  FR_TEST_REQUEST ,
  FR_TEST_REPLY
}
 

Functions

static unlang_action_t mod_process (rlm_rcode_t *p_result, module_ctx_t const *mctx, request_t *request)
 

Variables

static fr_dict_attr_t const * attr_packet_type
 
static const virtual_server_compile_t compile_list []
 
static fr_dict_t const * dict_test
 
static fr_process_state_t const process_state []
 
fr_process_module_t process_test
 
fr_dict_autoload_t process_test_dict []
 
fr_dict_attr_autoload_t process_test_dict_attr []
 

Detailed Description

Test state machine, which only does request and reply.

Id
f4793ccc83e38fc74cffb181ace7151704e5a616

Definition in file base.c.


Data Structure Documentation

◆ process_test_sections_t

struct process_test_sections_t

Definition at line 43 of file base.c.

+ Collaboration diagram for process_test_sections_t:
Data Fields
uint64_t nothing
CONF_SECTION * recv_request
CONF_SECTION * send_reply

◆ process_test_t

struct process_test_t

Definition at line 50 of file base.c.

+ Collaboration diagram for process_test_t:
Data Fields
process_test_sections_t sections
bool test

Macro Definition Documentation

◆ FR_TEST_CODE_MAX

#define FR_TEST_CODE_MAX   (2)

Definition at line 61 of file base.c.

◆ FR_TEST_PACKET_CODE_VALID

#define FR_TEST_PACKET_CODE_VALID (   _code)    ((_code == FR_TEST_REQUEST) || (_code == FR_TEST_REPLY))

Definition at line 63 of file base.c.

◆ PROCESS_CODE_MAX

#define PROCESS_CODE_MAX   FR_TEST_CODE_MAX

Definition at line 66 of file base.c.

◆ PROCESS_INST

#define PROCESS_INST   process_test_t

Definition at line 68 of file base.c.

◆ PROCESS_PACKET_CODE_VALID

#define PROCESS_PACKET_CODE_VALID   FR_TEST_PACKET_CODE_VALID

Definition at line 67 of file base.c.

◆ PROCESS_PACKET_TYPE

#define PROCESS_PACKET_TYPE   fr_test_packet_code_t

Definition at line 65 of file base.c.

Enumeration Type Documentation

◆ fr_test_packet_code_t

Enumerator
FR_TEST_INVALID 
FR_TEST_REQUEST 
FR_TEST_REPLY 

Definition at line 56 of file base.c.

Function Documentation

◆ mod_process()

static unlang_action_t mod_process ( rlm_rcode_t p_result,
module_ctx_t const *  mctx,
request_t request 
)
static

Definition at line 88 of file base.c.

+ Here is the call graph for this function:

Variable Documentation

◆ attr_packet_type

fr_dict_attr_t const* attr_packet_type
static

Definition at line 35 of file base.c.

◆ compile_list

const virtual_server_compile_t compile_list[]
static
Initial value:
= {
{
.section = SECTION_NAME("recv", "Request"),
.actions = &mod_actions_postauth,
.offset = PROCESS_CONF_OFFSET(recv_request),
},
{
.section = SECTION_NAME("send", "Reply"),
.actions = &mod_actions_postauth,
.offset = PROCESS_CONF_OFFSET(send_reply),
},
}
unlang_mod_actions_t const mod_actions_postauth
Definition: mod_action.c:88
static void send_reply(int sockfd, fr_channel_data_t *reply)
Definition: radius1_test.c:190
#define SECTION_NAME(_name1, _name2)
Define a section name consisting of a verb and a noun.
Definition: section.h:40
#define COMPILE_TERMINATOR

Definition at line 106 of file base.c.

◆ dict_test

fr_dict_t const* dict_test
static

Definition at line 27 of file base.c.

◆ process_state

fr_process_state_t const process_state[]
static
Initial value:
= {
.default_reply = FR_TEST_REPLY,
.rcode = RLM_MODULE_NOOP,
.recv = recv_generic,
.resume = resume_recv_generic,
.section_offset = offsetof(process_test_sections_t, recv_request),
},
[ FR_TEST_REPLY ] = {
.default_reply = FR_TEST_REPLY,
.rcode = RLM_MODULE_NOOP,
.send = send_generic,
.resume = resume_send_generic,
.section_offset = offsetof(process_test_sections_t, send_reply),
},
}
@ FR_TEST_REQUEST
Definition: base.c:58
@ FR_TEST_REPLY
Definition: base.c:59
@ RLM_MODULE_NOOP
Module succeeded without doing anything.
Definition: rcode.h:48

Definition at line 71 of file base.c.

◆ process_test

fr_process_module_t process_test
Initial value:
= {
.common = {
.name = "test",
.inst_size = sizeof(process_test_t),
},
.process = mod_process,
.compile_list = compile_list,
.dict = &dict_test,
}
#define MODULE_MAGIC_INIT
Stop people using different module/library/server versions together.
Definition: dl_module.h:63
static unlang_action_t mod_process(rlm_rcode_t *p_result, module_ctx_t const *mctx, request_t *request)
Definition: base.c:88
static fr_dict_t const * dict_test
Definition: base.c:27
static const virtual_server_compile_t compile_list[]
Definition: base.c:106

Definition at line 123 of file base.c.

◆ process_test_dict

fr_dict_autoload_t process_test_dict
Initial value:
= {
{ .out = &dict_test, .proto = "test" },
{ NULL }
}

Definition at line 30 of file base.c.

◆ process_test_dict_attr

fr_dict_attr_autoload_t process_test_dict_attr
Initial value:
= {
{ .out = &attr_packet_type, .name = "Packet-Type", .type = FR_TYPE_UINT32, .dict = &dict_test},
{ NULL }
}
fr_dict_attr_t const * attr_packet_type
Definition: base.c:91
@ FR_TYPE_UINT32
32 Bit unsigned integer.
Definition: merged_model.c:99

Definition at line 38 of file base.c.