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

BFD processing. More...

#include <freeradius-devel/server/protocol.h>
#include <freeradius-devel/util/debug.h>
#include <freeradius-devel/bfd/bfd.h>
#include "bfd/session.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_bfd_sections_t
 
struct  process_bfd_t
 

Macros

#define PROCESS_CODE_MAX   FR_BFD_CODE_MAX
 
#define PROCESS_INST   process_bfd_t
 
#define PROCESS_PACKET_CODE_VALID   FR_BFD_PACKET_CODE_VALID
 
#define PROCESS_PACKET_TYPE   fr_bfd_packet_code_t
 
#define PROCESS_SEND_RECV   (1)
 
#define SECTION(_x)
 
#define SEND_RECV(_x, _y)
 

Functions

static void bfd_packet_debug (request_t *request, fr_packet_t *packet, fr_pair_list_t *list, bool received)
 
static unlang_action_t mod_process (rlm_rcode_t *p_result, module_ctx_t const *mctx, request_t *request)
 
 RESUME_NO_MCTX (recv_bfd)
 

Variables

static fr_dict_attr_t const * attr_bfd_packet
 
static fr_dict_attr_t const * attr_bfd_state
 
static fr_dict_attr_t const * attr_packet_type
 
static const virtual_server_compile_t compile_list []
 
static fr_dict_t const * dict_bfd
 
fr_process_module_t process_bfd
 
fr_dict_autoload_t process_bfd_dict []
 
fr_dict_attr_autoload_t process_bfd_dict_attr []
 
static fr_process_state_t const process_state_packet []
 
static fr_process_state_t const process_state_reply []
 

Detailed Description

BFD processing.

Id
1e63dbf0a51538de406cfde701fbcc1d640356ca

Definition in file base.c.


Data Structure Documentation

◆ process_bfd_t

struct process_bfd_t

Definition at line 64 of file base.c.

+ Collaboration diagram for process_bfd_t:
Data Fields
process_bfd_sections_t sections
bool unused

Macro Definition Documentation

◆ PROCESS_CODE_MAX

#define PROCESS_CODE_MAX   FR_BFD_CODE_MAX

Definition at line 71 of file base.c.

◆ PROCESS_INST

#define PROCESS_INST   process_bfd_t

Definition at line 73 of file base.c.

◆ PROCESS_PACKET_CODE_VALID

#define PROCESS_PACKET_CODE_VALID   FR_BFD_PACKET_CODE_VALID

Definition at line 72 of file base.c.

◆ PROCESS_PACKET_TYPE

#define PROCESS_PACKET_TYPE   fr_bfd_packet_code_t

Definition at line 70 of file base.c.

◆ PROCESS_SEND_RECV

#define PROCESS_SEND_RECV   (1)

Definition at line 75 of file base.c.

◆ SECTION

#define SECTION (   _x)
Value:
CONF_SECTION *recv_ ## _x; \
CONF_SECTION *send_ ## _x
A section grouping multiple CONF_PAIR.
Definition: cf_priv.h:101

Definition at line 51 of file base.c.

◆ SEND_RECV

#define SEND_RECV (   _x,
  _y 
)
Value:
{ \
.section = SECTION_NAME("recv", _x), \
.actions = &mod_actions_postauth, \
.offset = PROCESS_CONF_OFFSET(recv_ ## _y), \
}, \
{ \
.section = SECTION_NAME("send", _x), \
.actions = &mod_actions_postauth, \
.offset = PROCESS_CONF_OFFSET(send_ ## _y), \
}
unlang_mod_actions_t const mod_actions_postauth
Definition: mod_action.c:88
#define SECTION_NAME(_name1, _name2)
Define a section name consisting of a verb and a noun.
Definition: section.h:40

Definition at line 273 of file base.c.

Function Documentation

◆ bfd_packet_debug()

static void bfd_packet_debug ( request_t request,
fr_packet_t packet,
fr_pair_list_t list,
bool  received 
)
static

Definition at line 82 of file base.c.

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

◆ 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 227 of file base.c.

+ Here is the call graph for this function:

◆ RESUME_NO_MCTX()

RESUME_NO_MCTX ( recv_bfd  )

Definition at line 121 of file base.c.

+ Here is the call graph for this function:

Variable Documentation

◆ attr_bfd_packet

fr_dict_attr_t const* attr_bfd_packet
static

Definition at line 38 of file base.c.

◆ attr_bfd_state

fr_dict_attr_t const* attr_bfd_state
static

Definition at line 39 of file base.c.

◆ attr_packet_type

fr_dict_attr_t const* attr_packet_type
static

Definition at line 37 of file base.c.

◆ compile_list

const virtual_server_compile_t compile_list[]
static
Initial value:
= {
SEND_RECV("Admin-Down", admin_down),
SEND_RECV("Down", down),
SEND_RECV("Init", init),
SEND_RECV("Up", up),
}
#define SEND_RECV(_x, _y)
Definition: base.c:273
init
Enter the EAP-IDENTITY state.
Definition: state_machine.c:90
#define COMPILE_TERMINATOR

Definition at line 285 of file base.c.

◆ dict_bfd

fr_dict_t const* dict_bfd
static

Definition at line 29 of file base.c.

◆ process_bfd

fr_process_module_t process_bfd
Initial value:
= {
.common = {
.name = "bfd",
.inst_size = sizeof(process_bfd_t),
},
.process = mod_process,
.compile_list = compile_list,
.dict = &dict_bfd,
}
#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:227
static const virtual_server_compile_t compile_list[]
Definition: base.c:285
static fr_dict_t const * dict_bfd
Definition: base.c:29

Definition at line 296 of file base.c.

◆ process_bfd_dict

fr_dict_autoload_t process_bfd_dict
Initial value:
= {
{ .out = &dict_bfd, .proto = "bfd" },
{ NULL }
}

Definition at line 32 of file base.c.

◆ process_bfd_dict_attr

fr_dict_attr_autoload_t process_bfd_dict_attr
Initial value:
= {
{ .out = &attr_packet_type, .name = "Packet-Type", .type = FR_TYPE_UINT32, .dict = &dict_bfd},
{ .out = &attr_bfd_packet, .name = "Packet", .type = FR_TYPE_STRUCT, .dict = &dict_bfd},
{ .out = &attr_bfd_state, .name = "Packet.state", .type = FR_TYPE_UINT8, .dict = &dict_bfd},
{ NULL }
}
fr_dict_attr_t const * attr_packet_type
Definition: base.c:91
@ FR_TYPE_UINT8
8 Bit unsigned integer.
Definition: merged_model.c:97
@ FR_TYPE_UINT32
32 Bit unsigned integer.
Definition: merged_model.c:99
@ FR_TYPE_STRUCT
like TLV, but without T or L, and fixed-width children
Definition: merged_model.c:119
static fr_dict_attr_t const * attr_bfd_packet
Definition: base.c:38
static fr_dict_attr_t const * attr_bfd_state
Definition: base.c:39

Definition at line 42 of file base.c.

◆ process_state_packet

fr_process_state_t const process_state_packet[]
static

Definition at line 160 of file base.c.

◆ process_state_reply

fr_process_state_t const process_state_reply[]
static
Initial value:
= {
.rcode = RLM_MODULE_NOOP,
.send = send_generic,
.resume = resume_send_generic,
.section_offset = offsetof(process_bfd_sections_t, send_admin_down),
},
[ FR_BFD_DOWN ] = {
.rcode = RLM_MODULE_NOOP,
.send = send_generic,
.resume = resume_send_generic,
.section_offset = offsetof(process_bfd_sections_t, send_down),
},
[ FR_BFD_INIT ] = {
.rcode = RLM_MODULE_NOOP,
.send = send_generic,
.resume = resume_send_generic,
.section_offset = offsetof(process_bfd_sections_t, send_init),
},
[ FR_BFD_UP ] = {
.rcode = RLM_MODULE_NOOP,
.send = send_generic,
.resume = resume_send_generic,
.section_offset = offsetof(process_bfd_sections_t, send_up),
},
}
@ FR_BFD_INIT
Definition: bfd.h:146
@ FR_BFD_ADMIN_DOWN
Definition: bfd.h:144
@ FR_BFD_UP
Definition: bfd.h:147
@ FR_BFD_DOWN
Definition: bfd.h:145
@ RLM_MODULE_NOOP
Module succeeded without doing anything.
Definition: rcode.h:48

Definition at line 197 of file base.c.