24#include <freeradius-devel/server/protocol.h>
25#include <freeradius-devel/util/debug.h>
26#include <freeradius-devel/arp/arp.h>
61#define PROCESS_PACKET_TYPE fr_arp_packet_code_t
62#define PROCESS_CODE_MAX FR_ARP_CODE_MAX
63#define PROCESS_CODE_DO_NOT_RESPOND FR_ARP_DO_NOT_RESPOND
64#define PROCESS_PACKET_CODE_VALID FR_ARP_PACKET_CODE_VALID
65#define PROCESS_INST process_arp_t
66#include <freeradius-devel/server/process.h>
83 .resume = resume_recv_generic,
84 .section_offset = PROCESS_CONF_OFFSET(request),
100 .resume = resume_send_generic,
101 .section_offset = PROCESS_CONF_OFFSET(reply),
117 .recv = recv_generic,
118 .resume = resume_recv_generic,
119 .section_offset = PROCESS_CONF_OFFSET(reverse_request),
134 .send = send_generic,
135 .resume = resume_send_generic,
136 .section_offset = PROCESS_CONF_OFFSET(reverse_reply),
154 .send = send_generic,
155 .resume = resume_send_generic,
156 .section_offset = PROCESS_CONF_OFFSET(do_not_respond),
169 received ?
"Received" :
"Sending",
172 if (received || request->parent) {
181 fr_process_state_t
const *state;
188 request->component =
"arp";
189 request->module = NULL;
192 UPDATE_STATE(packet);
195 REDEBUG(
"Invalid packet type (%u)", request->packet->code);
201 return state->recv(p_result, mctx, request);
209 .offset = PROCESS_CONF_OFFSET(request),
214 .offset = PROCESS_CONF_OFFSET(reply),
219 .offset = PROCESS_CONF_OFFSET(recv_reply),
224 .offset = PROCESS_CONF_OFFSET(reverse_request),
229 .offset = PROCESS_CONF_OFFSET(reverse_reply),
234 .offset = PROCESS_CONF_OFFSET(do_not_respond),
unlang_action_t
Returned by unlang_op_t calls, determine the next action of the interpreter.
char const * fr_arp_packet_codes[FR_ARP_CODE_MAX]
A section grouping multiple CONF_PAIR.
fr_dict_attr_t const ** out
Where to write a pointer to the resolved fr_dict_attr_t.
fr_dict_t const ** out
Where to write a pointer to the loaded/resolved fr_dict_t.
Specifies an attribute which must be present for the module to function.
Specifies a dictionary which must be loaded/loadable for the module to function.
#define MODULE_MAGIC_INIT
Stop people using different module/library/server versions together.
fr_dict_attr_t const * attr_packet_type
void log_request_proto_pair_list(fr_log_lvl_t lvl, request_t *request, fr_pair_t const *parent, fr_pair_list_t const *vps, char const *prefix)
Print a list of protocol fr_pair_ts.
void log_request(fr_log_type_t type, fr_log_lvl_t lvl, request_t *request, char const *file, int line, char const *fmt,...)
Marshal variadic log arguments into a va_list and pass to normal logging functions.
void log_request_pair_list(fr_log_lvl_t lvl, request_t *request, fr_pair_t const *parent, fr_pair_list_t const *vps, char const *prefix)
Print a fr_pair_list_t.
@ L_DBG_LVL_1
Highest priority debug messages (-x).
@ L_DBG
Only displayed when debugging is enabled.
@ FR_TYPE_UINT32
32 Bit unsigned integer.
unlang_mod_actions_t const mod_actions_postauth
unlang_mod_action_t actions[RLM_MODULE_NUMCODES]
module_instance_t const * mi
Instance of the module being instantiated.
Temporary structure to hold arguments for module calls.
static unlang_action_t mod_process(rlm_rcode_t *p_result, module_ctx_t const *mctx, request_t *request)
process_arp_sections_t sections
CONF_SECTION * reverse_reply
static void arp_packet_debug(request_t *request, fr_packet_t const *packet, fr_pair_list_t const *list, bool received)
fr_dict_autoload_t process_arp_dict[]
fr_dict_attr_autoload_t process_arp_dict_attr[]
static const virtual_server_compile_t compile_list[]
static fr_process_state_t const process_state[]
CONF_SECTION * recv_reply
static fr_dict_t const * dict_arp
CONF_SECTION * reverse_request
fr_process_module_t process_arp
#define PROCESS_PACKET_CODE_VALID
CONF_SECTION * do_not_respond
#define PROCESS_TRACE
Trace each state function as it's entered.
module_t common
Common fields for all loadable modules.
Common public symbol definition for all process modules.
#define RETURN_MODULE_FAIL
rlm_rcode_t
Return codes indicating the result of the module call.
@ RLM_MODULE_INVALID
The module considers the request invalid.
@ RLM_MODULE_OK
The module is OK, continue.
@ RLM_MODULE_FAIL
Module failed, don't reply.
@ RLM_MODULE_DISALLOW
Reject the request (user is locked out).
@ RLM_MODULE_REJECT
Immediately reject the request.
@ RLM_MODULE_NOTFOUND
User not found.
@ RLM_MODULE_UPDATED
OK (pairs modified).
@ RLM_MODULE_NOOP
Module succeeded without doing anything.
#define SECTION_NAME(_name1, _name2)
Define a section name consisting of a verb and a noun.
size_t inst_size
Size of the module's instance data.
void * data
Module's instance data.
#define talloc_get_type_abort_const
unsigned int code
Packet code (type).
#define COMPILE_TERMINATOR
section_name_t const * section
Identifier for the section.
Processing sections which are allowed in this virtual server.